toiljs 0.0.94 → 0.0.95
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/CHANGELOG.md +5 -0
- package/build/client/.tsbuildinfo +1 -1
- package/build/client/auth.d.ts +53 -2
- package/build/client/auth.js +99 -22
- package/build/client/index.d.ts +1 -1
- package/build/client/index.js +1 -1
- package/package.json +1 -1
- package/src/client/auth.ts +169 -29
- package/src/client/index.ts +13 -0
- package/test/pqauth-email.test.ts +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.es2025.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/hash-wasm/dist/lib/util.d.ts","../../node_modules/hash-wasm/dist/lib/WASMInterface.d.ts","../../node_modules/hash-wasm/dist/lib/adler32.d.ts","../../node_modules/hash-wasm/dist/lib/argon2.d.ts","../../node_modules/hash-wasm/dist/lib/blake2b.d.ts","../../node_modules/hash-wasm/dist/lib/blake2s.d.ts","../../node_modules/hash-wasm/dist/lib/blake3.d.ts","../../node_modules/hash-wasm/dist/lib/crc32.d.ts","../../node_modules/hash-wasm/dist/lib/crc64.d.ts","../../node_modules/hash-wasm/dist/lib/md4.d.ts","../../node_modules/hash-wasm/dist/lib/md5.d.ts","../../node_modules/hash-wasm/dist/lib/sha1.d.ts","../../node_modules/hash-wasm/dist/lib/sha3.d.ts","../../node_modules/hash-wasm/dist/lib/keccak.d.ts","../../node_modules/hash-wasm/dist/lib/sha224.d.ts","../../node_modules/hash-wasm/dist/lib/sha256.d.ts","../../node_modules/hash-wasm/dist/lib/sha384.d.ts","../../node_modules/hash-wasm/dist/lib/sha512.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash32.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash64.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash3.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash128.d.ts","../../node_modules/hash-wasm/dist/lib/ripemd160.d.ts","../../node_modules/hash-wasm/dist/lib/hmac.d.ts","../../node_modules/hash-wasm/dist/lib/pbkdf2.d.ts","../../node_modules/hash-wasm/dist/lib/scrypt.d.ts","../../node_modules/hash-wasm/dist/lib/bcrypt.d.ts","../../node_modules/hash-wasm/dist/lib/whirlpool.d.ts","../../node_modules/hash-wasm/dist/lib/sm3.d.ts","../../node_modules/hash-wasm/dist/lib/index.d.ts","../../node_modules/@noble/hashes/utils.d.ts","../../node_modules/@dacely/noble-post-quantum/utils.d.ts","../../node_modules/@dacely/noble-post-quantum/ml-dsa.d.ts","../../node_modules/@dacely/noble-post-quantum/ml-kem.d.ts","../../node_modules/@noble/curves/utils.d.ts","../../node_modules/@noble/curves/abstract/modular.d.ts","../../node_modules/@noble/curves/abstract/curve.d.ts","../../node_modules/@noble/curves/abstract/edwards.d.ts","../../node_modules/@noble/curves/abstract/hash-to-curve.d.ts","../../node_modules/@noble/curves/abstract/frost.d.ts","../../node_modules/@noble/curves/abstract/montgomery.d.ts","../../node_modules/@noble/curves/abstract/oprf.d.ts","../../node_modules/@noble/curves/ed25519.d.ts","../io/FastMap.d.ts","../io/FastSet.d.ts","../io/codec.d.ts","../io/types.d.ts","../io/index.d.ts","../../src/client/auth.ts","../../src/client/errors.ts","../../node_modules/@types/react-dom/client.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../src/client/navigation/scroll.ts","../../src/client/types.ts","../../src/client/navigation/navigation.ts","../../src/client/ssr/markers.tsx","../../src/client/head/head.ts","../../src/client/routing/match.ts","../../src/client/head/metadata.ts","../../src/client/routing/loader.ts","../../src/client/navigation/prefetch.ts","../../src/client/routing/error-boundary.tsx","../../src/client/routing/params-context.ts","../../src/client/routing/hooks.ts","../../src/client/routing/lazy.ts","../../src/client/routing/slot-context.ts","../../src/client/routing/Router.tsx","../../src/client/dev/error-overlay.tsx","../../src/client/search/search.ts","../../src/client/dev/devtools.tsx","../../src/client/routing/mount.tsx","../../src/client/navigation/Link.tsx","../../src/client/navigation/NavLink.tsx","../../src/client/routing/action.ts","../../src/client/channel/channel.ts","../../src/client/stream/client.ts","../../src/client/search/use-page-search.ts","../../src/client/components/Image.tsx","../../src/client/components/Script.tsx","../../src/client/components/Form.tsx","../../src/client/components/Slot.tsx","../../src/client/rpc.ts","../../src/client/index.ts"],"fileIdsList":[[137],[137,138,139,140],[125],[124],[128,129],[128,129,130],[128,129,130,132],[128],[128,130],[128,130,132],[128,129,130,131,132,133,134,135],[92],[90,91],[94],[94,95],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122],[93,123,126,127,136,141],[92,93],[92,93,167],[92,93,159],[92,93,147,148,151,153,161,162],[93],[92,93,149],[93,150,151],[93,142,143,147,148,149,150,151,152,153,154,157,160,162,164,165,166,167,168,169,170,171,172,173,174,175],[92,93,147,148,154],[92,93,157,165],[92,93,145,146,147],[93,147,151,153],[92,93,146,147,148,150,151,153,155,156,157,158,159],[92,93,147,148,153],[92,93,147],[92,93,147,148,151,153,154,156],[92,93,147,148,150,151,152],[93,144,147,148,154,160,161,163],[92,93,151],[93,152],[92,93,147,148,162]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"dc782ff85b2cb10075ecffc158af7bfb27ff97bf8491c917efea0c3d622d5ac4","impliedFormat":1},{"version":"b838d4c72740eb0afd284bf7575b74c624b105eff2e8c7b4aeead57e7ac320ff","impliedFormat":1},{"version":"a957a1395986cd6863bae5a42c58d66886df90f1931c911fbe406f8321335e6f","impliedFormat":1},{"version":"a2bc59da4f44ff533bd0b7ea20946f8c52eae8895531746dee71603e3b7d5578","impliedFormat":1},{"version":"9828342b073c3d2a51680d84be6e8693c15209142d4c3c49f9af9ad3e8a9dacc","impliedFormat":1},{"version":"7cabf9ff89f3a1de0524b3a50265ba1294a88e495e114dcae8da0cbc50fc92f2","impliedFormat":1},{"version":"9d7a70722e17134d5eab42d3dd710eacbe42fd1210d80287f6639c29ee2a7c10","impliedFormat":1},{"version":"165409ea4281fef67eea472050347967441004e84d22a8977a94e1976823d5be","impliedFormat":1},{"version":"505abecc03fe091b97b747dc320fff4679344de28c922564193151c0cefb3180","impliedFormat":1},{"version":"0f90009e6c417c9336b260496ea53729a9c70933895e2ce545fff272b9301bb2","impliedFormat":1},{"version":"c0a488e0b571aec7a957ecad80792af284c357b48ba6d2d8b4444aa2be6c5a2f","impliedFormat":1},{"version":"ff2ce6f20d8c9346ab61a3444f5bca603f327d26352eb0ab6f40cb1f48e84c84","impliedFormat":1},{"version":"7c9fc8fbe28c6fe364d78be412d8467619b87dc828f2cf5ef525db7d7837c9f7","impliedFormat":1},{"version":"c824d703f55424408de202f826ff50eced9ad4c07edf12ff99fef7a7ca820f5b","impliedFormat":1},{"version":"6efbf9b08c3e5a48b93858e7b96eb61f9ca6d5c5d27709dc16f806e0ba1067cc","impliedFormat":1},{"version":"1b6d8a8926e323af55c6777a6f6561191ea3da6beabe8e7d91c152df3c693bac","impliedFormat":1},{"version":"587173d12395c6996972afd696425044d322eb0174e76d7d5888caf35d88831d","impliedFormat":1},{"version":"de5ba33082f9ac12bd6a9e44c530a5dd708d145fff6cc2dd7cb30321a8882a6b","impliedFormat":1},{"version":"a50a03f03f65f3cc4e012c86464f310755462c7059f1581a9c666b5457d102e1","impliedFormat":1},{"version":"89b954bd9c00a77ce3d889e1cc78b034779e2593fe0adfa14b6e56baafeb5de2","impliedFormat":1},{"version":"9935b6341ac96a5027526efc1ec75114ccf2009b6ed602f65bc82e75ac2089b1","impliedFormat":1},{"version":"f8776dc3e57237b3de45b8ab5f224adc00dd90fe217f1a34ed6442606807c122","impliedFormat":1},{"version":"b0c8c7af35a444fd4054c12d971eabcd7ec4be2e840fc60f8897b5732cb3a20b","impliedFormat":1},{"version":"4f9bd8f00fe9f0ae8b5d2fffed8d47915b61b428e33b2ee9aa3ef159e98e305c","impliedFormat":1},{"version":"bbe6c08cefd08a23dc36eca9dae8aeb30895debf15387ab6904b591e3b6b3217","impliedFormat":1},{"version":"0c3880ad1eee5252b7f02c6ff10bd2666cb9a59ae698d552ec5b0a4a7b9611d8","impliedFormat":1},{"version":"d5d71ded265f144dec6604983fbfaf201844d7cd8614aadab8ad5227e99545d3","impliedFormat":1},{"version":"907d2ea3b3fed567fe2dff6747f7642f57aa8b3c288becf4843113ac98331ee3","impliedFormat":1},{"version":"33da6d63dbab160960cdd6e1dba0716bbc2f60af4aeb229ea9b318303c2015e1","impliedFormat":1},{"version":"6dc0148fe65a487db8bd552670f0fe87498c0a8e644c38092a185a05030282bf","impliedFormat":1},{"version":"6bd476fd8a150f5211488cc1d58d412dabec0da0977295ea1f06957b1d28ed13","impliedFormat":1},{"version":"5e134f083c46ea016764a484ac86f664564303f87bc3ca7cfd4b74ccbacad282","impliedFormat":1},{"version":"5d01f288556ba56b803dfbd9b207502aaaa831afddd9e71b2b5ce250dc395152","impliedFormat":99},{"version":"7b9d4f3cc667e8896241f6c95d2824ced607ce7f2858cedf04058ddd23287602","impliedFormat":99},{"version":"371e624178bb67607b2c63e1f8ec3e5d9585455b39bac8f0816eba540072383f","impliedFormat":99},{"version":"c468447508a5ca66c0a2523ed935cf5cb1d768d890c991e20397df618db741d1","impliedFormat":99},{"version":"b8c741cb7cd15e89b24af6c25b6d95a581b2d79f7c0d959552220743f7269c7f","impliedFormat":99},{"version":"1b65eaf896a59cf1904bae76e68bc64941671555a3b1ee4190bcd6d3b16d5b61","impliedFormat":99},{"version":"2cea0605228c4357d9f57b6d13fd607752579a0a70995ccf70179110b098435b","impliedFormat":99},{"version":"edc4a14bf998e6512257766b4f291c940b5e88fe8bea8aec0c499e2e41da1d34","impliedFormat":99},{"version":"74853f56c2d22c7794408839dc106c4c412818fbd2e855b1d7dc4a70447f8387","impliedFormat":99},{"version":"61d04e1fb8987919928a5c4982fe4b32ec4147bd39491b4da9720bb518fd77ce","impliedFormat":99},{"version":"c1d730d8774ef9d198a2f8ecedd6806b1efd9e00a502ba7e28969f5a2c550ae1","impliedFormat":99},{"version":"9155fc738cfdd9a8dbeb7a9657998407101fc278c1649d8bb24b24b4fc7e5ad4","impliedFormat":99},{"version":"aa9a3b2c5d46f501a49ebde65cbdd59a7c05122f4f15785467bc30b6d8956751","impliedFormat":99},"6a4c287c863003342a42d8bf876c7df4c2e82e95f556af5ade71f05255845200","272e7bc3a3734cc9e7419625f04cff7095131e315e51a83fa992a5134763df49","b9f2341c8b486561706db362b6f89ee6b149ef08fb4fa6aaea1041bce04fe1c5","3952955b5e83c1164fc78d7d54377fd4d09d2c11b79763cba53a7ff4b27a0601","48d0d0bebe2ccfd875953713d746fe4adae81b1e3a91ffafae29ead23fd5c39b",{"version":"5661655283f1c6f9bad2d382fdf2a09b7216f1ee2b0ce18d0b08f72ffb17342f","signature":"d0b36193cdceaefd1a09c44714a7e6ffa9362c1dfb0190351a104a9967d2d0ed"},{"version":"cbc4073fb15a767ab8787ce067b3266807ea2ef8456aa85e3a55ff5a62c33bdd","signature":"7cf224e300294bcb276cf440125703dd0da90e1b5aa8070a3f7ca043475979c1"},{"version":"bc03c3c352f689e38c0ddd50c39b1e65d59273991bfc8858a9e3c0ebb79c023b","impliedFormat":1},{"version":"be1cc4d94ea60cbe567bc29ed479d42587bf1e6cba490f123d329976b0fe4ee5","impliedFormat":1},{"version":"dbafe5664a764167d089a3ecce720259c6f4837696f2cf5e0adb199de6a9150c","signature":"2b2db01796f774852b44cacad054f31b9e63a3c4ed787d12c1dd75c75e602bef"},{"version":"43c268c58c28f2f6f80bc2a42104a2e8ce3891d1c8a2b8767e2a52606e61952b","signature":"d86aae3a61fb2a3734379428044eefd6b048996f3a1a1cd7e57bb94d3d36b02b"},{"version":"31946b8cd45a08d2f4d3be4e8b31b5896e5f0fb24840cc53e6d9a45d71e24506","signature":"50c12b83406070a98041a222f49db12395234ac00db0f16d18d01d8fccfe9d9d"},{"version":"2a0b3b70eae3ac89e80870431490787f00d5b450b6c9767df4daf6aee7eb0978","signature":"dd11f115ef46b611836fe84d45fb6f7889711397a69aad6cc147739cbe5a4072"},{"version":"1f97d3daade701681d6c89a1904123b009db72bdf95ec5fd563076769da2339c","signature":"c12ee6242f6e1108c7cfac4089b422a742417d50a70cbb03d0d24b7217271376"},{"version":"f6eaf207ae99ba6778460fa1d857e80c870be1533e9b1668060f0f53e6aa6b41","signature":"b9f112f8e9a593f362dd5f434f8f997385dd62f15e2d2fb6d316e5d0d9942a51"},{"version":"6647f68fcaa6a2a028711abf7288cd95d8625d0efff1315b5ad3536bf2de9e2b","signature":"919e52d8be47dbe1be9f86aff4b897c9801b8d6d0bf49f68fc321a4dc9251ad4"},{"version":"ef23db21116b6651538dbcb7df065b8340d6b2514bce598087309f5f435a2bcb","signature":"ba8cda0a8ef4aaa88a574d7e25ea6eaac5e6b9a25c862afdd948d8b6780014b6"},{"version":"26a4fb1b862a479d7a5d90aa1745f070d44bc351e79c6e4f8a6481b206a1655b","signature":"ad70244d75add3a5819000694ceb8f6ffca2fff2bd49acbd6786e1457c9d1d82","affectsGlobalScope":true},{"version":"abdc0918e0afd85d5495c618d95ea69c667d1cd095452cc73617168c784904a4","signature":"9382f138465c4775c54940f2a3d4334a083a6fc9a622a7c926c5f8233228cbae"},{"version":"336f74bb2ca217a8b08f3c146c41295de7597a86d52ca333fac5634561261846","signature":"c8525f0be940a19f3d03f06b6e43d4bea21ba910db62fb5024ecc671bcc23932"},{"version":"eb5c9b96b9b90a2c7abd1dd62be278b51ef4fcc1a7181fb7294ae1554b5d2409","signature":"90b4955becdfa8d37df7a1fdd1c93d847cdbea6bb3a113bd3baa6134291531a2"},{"version":"bdf04d4dd9ed94c85da1be565643ef5fad4212b7a545da8f4792deb4cf426665","signature":"c6384012cac726d5b05237d2bd2c9c9da0893feaf54ab1dd0042fe141b9e5bd8"},{"version":"1ac886967a62c940d61ab89f3411f64893d779d69e1435f15215547ba50fa03b","signature":"994bfb8326dca5c985462ba74b5c64146aef0e3ea7bbbbf265ad426d884fbc9e"},{"version":"314ad9d994327a7e9cc1367c1c56fb3f28737fc85716317e01f7649a02e6303b","signature":"00dd4ce0458ebf64e2e0617d4bc04f3a9a569bc388f3a20c1c4416d465e99245"},{"version":"b7a6fa2ad0bbeb531d9fc2a4003d5cc4a6e8142c18914fb2d034ca8b32b760fc","signature":"61814a0254524d3e14d405795a649b8b838386ff0f82caf50a0b7d4c72008c3d"},{"version":"3fcfd875b042c0855e76061aae81b0d8333c1990c1e4ca4d1f3141652b988b06","signature":"b43c263b28c6f20a6d7066e22f6906fe51605b6a4b7709a3c47d7cf6c0ccf93e"},{"version":"1e54ebe6806cac6a9b2ce78a54863cd75732cc68901256507042e3d8cd399224","signature":"58d2bb278ba2b594a3b664571b357e10388c6a1eef2c27e2946d3ee447fb4e16"},{"version":"f40083b8ea073895257a2f5ef2bfc9b8cf031d471744fe76185ecc259847d49b","signature":"e5f0e0e21621bb3e87958857cc9695abf011fb257bd249abd42ae97b3b61e1d0"},{"version":"91df3defe1f0907af6b80d1b7849615c72b36340404efb0bbf6f9fb1f99727fc","signature":"5cf43ceac60fba7927af9ce9b27fb6031854fc923263b78c353fb986857218b9"},{"version":"64837fd5187d6a3c2abc6a265251be66c4a9961c369e5cf647ac87511d328d90","signature":"0caa217adbbdb001facd9aeb363fa2a446eabbeb4e5af2c1f2c3d1ef4bbffc6e"},{"version":"40896dfcdeafc76e4d85bfd4acca390f542032e613c6f5b7c5c8e1e99bb3b63d","signature":"63bfd9f3fbbcb2dc649dd7303b9fdcf5680c25e217228a5abe005674bfc8bed5"},{"version":"f79040aab08b6460794739412f2f175f902517183e6a5196e4aec528d4634347","signature":"bbaa85a96900ee24d770ce38f7807d2d3cc2ca203e223cd4080447680910992e"},{"version":"d8d719cbe4f408a189f1b35d8183e10e8972d238f7df4eeb0c8cb48a365518b6","signature":"497761089898de53e02d017b84843a99061b782b9b0c6d987b1595a31b0260f7"},{"version":"69a362101efd9d9fe1a4d2d246ae3ac1d76ffc26e222817d13146f7a07bfe5cd","signature":"ea9768ee8ae2400a4352956f0937ff7ce12640c4de3c69d6e71e8a2f954ad58a"},{"version":"6ba703e0059aab893149bff3e9d4ab11e61342ca6914bad738f9e79eacb9fe3b","signature":"fe072e91b615ffa8bccb04dcc43149d4095fc5f6e56677346250901a692f4568"},{"version":"5e36c20b72b953b78f812d6d5c5b74f5789a8139870654e38a8fa065aea4575a","signature":"d9ce1372a43589027af010d0293b17099bf27089071c6d12ce30eb94b70191af"},{"version":"f9d363bd3045f41be125a5653330811c52b4849321a4fd6f580ed0d7344d72bf","signature":"dbb3eab27a108491f80873c1031ddc0b1a16c47f4c32e2ec2e70b83e9cee161b"},{"version":"574db92fbafc03af54f69b1a10735093ec1c047ac3480a7bba3cf427ff48d3be","signature":"8aec088c8b901c6fe9e7fe22785892138849af77a640d12b7015ec52a95aa27c"},{"version":"3717d410e1140d12aff0a8459792feda0fc49a0bbdd485bbb359ed7ac8aae3cc","signature":"d358bf9f604d2d3ac588fc908565f9c8a60bcb8e6993461b20ef5ca60e9a8f57"},{"version":"e51c2f73371682e7e7143c40764c5d5121ab8b3d5e9e2d33141d740ced6951b9","signature":"dcc953172cebbbf423013663b3bdc82d2ef9151cd09115a88cfac633d7d7a036"}],"root":[142,143,[146,176]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noImplicitAny":true,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"../../src/client","skipLibCheck":true,"sourceMap":false,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"suppressImplicitAnyIndexErrors":false,"target":99,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[138,1],[141,2],[126,3],[127,3],[125,4],[130,5],[131,6],[133,7],[132,6],[129,8],[134,9],[135,10],[136,11],[128,4],[144,12],[145,12],[92,13],[93,12],[95,14],[96,15],[97,14],[120,14],[98,15],[99,15],[100,15],[101,15],[102,15],[117,15],[123,16],[107,15],[103,15],[104,15],[118,15],[116,15],[119,14],[105,15],[108,15],[109,15],[106,15],[110,15],[111,15],[122,15],[121,15],[115,15],[114,15],[112,15],[113,15],[142,17],[168,18],[173,19],[171,18],[172,18],[174,20],[163,21],[161,18],[143,22],[150,23],[152,24],[176,25],[165,26],[166,27],[148,28],[154,29],[146,22],[160,30],[167,31],[155,32],[157,33],[158,32],[153,34],[151,22],[164,35],[156,36],[159,18],[175,22],[162,37],[170,38],[149,18],[169,22],[147,18]],"version":"6.0.3"}
|
|
1
|
+
{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.es2025.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/hash-wasm/dist/lib/util.d.ts","../../node_modules/hash-wasm/dist/lib/WASMInterface.d.ts","../../node_modules/hash-wasm/dist/lib/adler32.d.ts","../../node_modules/hash-wasm/dist/lib/argon2.d.ts","../../node_modules/hash-wasm/dist/lib/blake2b.d.ts","../../node_modules/hash-wasm/dist/lib/blake2s.d.ts","../../node_modules/hash-wasm/dist/lib/blake3.d.ts","../../node_modules/hash-wasm/dist/lib/crc32.d.ts","../../node_modules/hash-wasm/dist/lib/crc64.d.ts","../../node_modules/hash-wasm/dist/lib/md4.d.ts","../../node_modules/hash-wasm/dist/lib/md5.d.ts","../../node_modules/hash-wasm/dist/lib/sha1.d.ts","../../node_modules/hash-wasm/dist/lib/sha3.d.ts","../../node_modules/hash-wasm/dist/lib/keccak.d.ts","../../node_modules/hash-wasm/dist/lib/sha224.d.ts","../../node_modules/hash-wasm/dist/lib/sha256.d.ts","../../node_modules/hash-wasm/dist/lib/sha384.d.ts","../../node_modules/hash-wasm/dist/lib/sha512.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash32.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash64.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash3.d.ts","../../node_modules/hash-wasm/dist/lib/xxhash128.d.ts","../../node_modules/hash-wasm/dist/lib/ripemd160.d.ts","../../node_modules/hash-wasm/dist/lib/hmac.d.ts","../../node_modules/hash-wasm/dist/lib/pbkdf2.d.ts","../../node_modules/hash-wasm/dist/lib/scrypt.d.ts","../../node_modules/hash-wasm/dist/lib/bcrypt.d.ts","../../node_modules/hash-wasm/dist/lib/whirlpool.d.ts","../../node_modules/hash-wasm/dist/lib/sm3.d.ts","../../node_modules/hash-wasm/dist/lib/index.d.ts","../../node_modules/@noble/hashes/utils.d.ts","../../node_modules/@dacely/noble-post-quantum/utils.d.ts","../../node_modules/@dacely/noble-post-quantum/ml-dsa.d.ts","../../node_modules/@dacely/noble-post-quantum/ml-kem.d.ts","../../node_modules/@noble/curves/utils.d.ts","../../node_modules/@noble/curves/abstract/modular.d.ts","../../node_modules/@noble/curves/abstract/curve.d.ts","../../node_modules/@noble/curves/abstract/edwards.d.ts","../../node_modules/@noble/curves/abstract/hash-to-curve.d.ts","../../node_modules/@noble/curves/abstract/frost.d.ts","../../node_modules/@noble/curves/abstract/montgomery.d.ts","../../node_modules/@noble/curves/abstract/oprf.d.ts","../../node_modules/@noble/curves/ed25519.d.ts","../io/FastMap.d.ts","../io/FastSet.d.ts","../io/codec.d.ts","../io/types.d.ts","../io/index.d.ts","../../src/client/auth.ts","../../src/client/errors.ts","../../node_modules/@types/react-dom/client.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../src/client/navigation/scroll.ts","../../src/client/types.ts","../../src/client/navigation/navigation.ts","../../src/client/ssr/markers.tsx","../../src/client/head/head.ts","../../src/client/routing/match.ts","../../src/client/head/metadata.ts","../../src/client/routing/loader.ts","../../src/client/navigation/prefetch.ts","../../src/client/routing/error-boundary.tsx","../../src/client/routing/params-context.ts","../../src/client/routing/hooks.ts","../../src/client/routing/lazy.ts","../../src/client/routing/slot-context.ts","../../src/client/routing/Router.tsx","../../src/client/dev/error-overlay.tsx","../../src/client/search/search.ts","../../src/client/dev/devtools.tsx","../../src/client/routing/mount.tsx","../../src/client/navigation/Link.tsx","../../src/client/navigation/NavLink.tsx","../../src/client/routing/action.ts","../../src/client/channel/channel.ts","../../src/client/stream/client.ts","../../src/client/search/use-page-search.ts","../../src/client/components/Image.tsx","../../src/client/components/Script.tsx","../../src/client/components/Form.tsx","../../src/client/components/Slot.tsx","../../src/client/rpc.ts","../../src/client/index.ts"],"fileIdsList":[[137],[137,138,139,140],[125],[124],[128,129],[128,129,130],[128,129,130,132],[128],[128,130],[128,130,132],[128,129,130,131,132,133,134,135],[92],[90,91],[94],[94,95],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122],[93,123,126,127,136,141],[92,93],[92,93,167],[92,93,159],[92,93,147,148,151,153,161,162],[93],[92,93,149],[93,150,151],[93,142,143,147,148,149,150,151,152,153,154,157,160,162,164,165,166,167,168,169,170,171,172,173,174,175],[92,93,147,148,154],[92,93,157,165],[92,93,145,146,147],[93,147,151,153],[92,93,146,147,148,150,151,153,155,156,157,158,159],[92,93,147,148,153],[92,93,147],[92,93,147,148,151,153,154,156],[92,93,147,148,150,151,152],[93,144,147,148,154,160,161,163],[92,93,151],[93,152],[92,93,147,148,162]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"dc782ff85b2cb10075ecffc158af7bfb27ff97bf8491c917efea0c3d622d5ac4","impliedFormat":1},{"version":"b838d4c72740eb0afd284bf7575b74c624b105eff2e8c7b4aeead57e7ac320ff","impliedFormat":1},{"version":"a957a1395986cd6863bae5a42c58d66886df90f1931c911fbe406f8321335e6f","impliedFormat":1},{"version":"a2bc59da4f44ff533bd0b7ea20946f8c52eae8895531746dee71603e3b7d5578","impliedFormat":1},{"version":"9828342b073c3d2a51680d84be6e8693c15209142d4c3c49f9af9ad3e8a9dacc","impliedFormat":1},{"version":"7cabf9ff89f3a1de0524b3a50265ba1294a88e495e114dcae8da0cbc50fc92f2","impliedFormat":1},{"version":"9d7a70722e17134d5eab42d3dd710eacbe42fd1210d80287f6639c29ee2a7c10","impliedFormat":1},{"version":"165409ea4281fef67eea472050347967441004e84d22a8977a94e1976823d5be","impliedFormat":1},{"version":"505abecc03fe091b97b747dc320fff4679344de28c922564193151c0cefb3180","impliedFormat":1},{"version":"0f90009e6c417c9336b260496ea53729a9c70933895e2ce545fff272b9301bb2","impliedFormat":1},{"version":"c0a488e0b571aec7a957ecad80792af284c357b48ba6d2d8b4444aa2be6c5a2f","impliedFormat":1},{"version":"ff2ce6f20d8c9346ab61a3444f5bca603f327d26352eb0ab6f40cb1f48e84c84","impliedFormat":1},{"version":"7c9fc8fbe28c6fe364d78be412d8467619b87dc828f2cf5ef525db7d7837c9f7","impliedFormat":1},{"version":"c824d703f55424408de202f826ff50eced9ad4c07edf12ff99fef7a7ca820f5b","impliedFormat":1},{"version":"6efbf9b08c3e5a48b93858e7b96eb61f9ca6d5c5d27709dc16f806e0ba1067cc","impliedFormat":1},{"version":"1b6d8a8926e323af55c6777a6f6561191ea3da6beabe8e7d91c152df3c693bac","impliedFormat":1},{"version":"587173d12395c6996972afd696425044d322eb0174e76d7d5888caf35d88831d","impliedFormat":1},{"version":"de5ba33082f9ac12bd6a9e44c530a5dd708d145fff6cc2dd7cb30321a8882a6b","impliedFormat":1},{"version":"a50a03f03f65f3cc4e012c86464f310755462c7059f1581a9c666b5457d102e1","impliedFormat":1},{"version":"89b954bd9c00a77ce3d889e1cc78b034779e2593fe0adfa14b6e56baafeb5de2","impliedFormat":1},{"version":"9935b6341ac96a5027526efc1ec75114ccf2009b6ed602f65bc82e75ac2089b1","impliedFormat":1},{"version":"f8776dc3e57237b3de45b8ab5f224adc00dd90fe217f1a34ed6442606807c122","impliedFormat":1},{"version":"b0c8c7af35a444fd4054c12d971eabcd7ec4be2e840fc60f8897b5732cb3a20b","impliedFormat":1},{"version":"4f9bd8f00fe9f0ae8b5d2fffed8d47915b61b428e33b2ee9aa3ef159e98e305c","impliedFormat":1},{"version":"bbe6c08cefd08a23dc36eca9dae8aeb30895debf15387ab6904b591e3b6b3217","impliedFormat":1},{"version":"0c3880ad1eee5252b7f02c6ff10bd2666cb9a59ae698d552ec5b0a4a7b9611d8","impliedFormat":1},{"version":"d5d71ded265f144dec6604983fbfaf201844d7cd8614aadab8ad5227e99545d3","impliedFormat":1},{"version":"907d2ea3b3fed567fe2dff6747f7642f57aa8b3c288becf4843113ac98331ee3","impliedFormat":1},{"version":"33da6d63dbab160960cdd6e1dba0716bbc2f60af4aeb229ea9b318303c2015e1","impliedFormat":1},{"version":"6dc0148fe65a487db8bd552670f0fe87498c0a8e644c38092a185a05030282bf","impliedFormat":1},{"version":"6bd476fd8a150f5211488cc1d58d412dabec0da0977295ea1f06957b1d28ed13","impliedFormat":1},{"version":"5e134f083c46ea016764a484ac86f664564303f87bc3ca7cfd4b74ccbacad282","impliedFormat":1},{"version":"5d01f288556ba56b803dfbd9b207502aaaa831afddd9e71b2b5ce250dc395152","impliedFormat":99},{"version":"7b9d4f3cc667e8896241f6c95d2824ced607ce7f2858cedf04058ddd23287602","impliedFormat":99},{"version":"371e624178bb67607b2c63e1f8ec3e5d9585455b39bac8f0816eba540072383f","impliedFormat":99},{"version":"c468447508a5ca66c0a2523ed935cf5cb1d768d890c991e20397df618db741d1","impliedFormat":99},{"version":"b8c741cb7cd15e89b24af6c25b6d95a581b2d79f7c0d959552220743f7269c7f","impliedFormat":99},{"version":"1b65eaf896a59cf1904bae76e68bc64941671555a3b1ee4190bcd6d3b16d5b61","impliedFormat":99},{"version":"2cea0605228c4357d9f57b6d13fd607752579a0a70995ccf70179110b098435b","impliedFormat":99},{"version":"edc4a14bf998e6512257766b4f291c940b5e88fe8bea8aec0c499e2e41da1d34","impliedFormat":99},{"version":"74853f56c2d22c7794408839dc106c4c412818fbd2e855b1d7dc4a70447f8387","impliedFormat":99},{"version":"61d04e1fb8987919928a5c4982fe4b32ec4147bd39491b4da9720bb518fd77ce","impliedFormat":99},{"version":"c1d730d8774ef9d198a2f8ecedd6806b1efd9e00a502ba7e28969f5a2c550ae1","impliedFormat":99},{"version":"9155fc738cfdd9a8dbeb7a9657998407101fc278c1649d8bb24b24b4fc7e5ad4","impliedFormat":99},{"version":"aa9a3b2c5d46f501a49ebde65cbdd59a7c05122f4f15785467bc30b6d8956751","impliedFormat":99},"6a4c287c863003342a42d8bf876c7df4c2e82e95f556af5ade71f05255845200","272e7bc3a3734cc9e7419625f04cff7095131e315e51a83fa992a5134763df49","b9f2341c8b486561706db362b6f89ee6b149ef08fb4fa6aaea1041bce04fe1c5","3952955b5e83c1164fc78d7d54377fd4d09d2c11b79763cba53a7ff4b27a0601","48d0d0bebe2ccfd875953713d746fe4adae81b1e3a91ffafae29ead23fd5c39b",{"version":"2bf822f58e74e5c407a64a42f7af837b674ac34aa9711a05016570c309810fba","signature":"a15fd375b6cd61e3061a9141099bab0091f5bdf890d9e57816bf1bef5319ed8d"},{"version":"cbc4073fb15a767ab8787ce067b3266807ea2ef8456aa85e3a55ff5a62c33bdd","signature":"7cf224e300294bcb276cf440125703dd0da90e1b5aa8070a3f7ca043475979c1"},{"version":"bc03c3c352f689e38c0ddd50c39b1e65d59273991bfc8858a9e3c0ebb79c023b","impliedFormat":1},{"version":"be1cc4d94ea60cbe567bc29ed479d42587bf1e6cba490f123d329976b0fe4ee5","impliedFormat":1},{"version":"dbafe5664a764167d089a3ecce720259c6f4837696f2cf5e0adb199de6a9150c","signature":"2b2db01796f774852b44cacad054f31b9e63a3c4ed787d12c1dd75c75e602bef"},{"version":"43c268c58c28f2f6f80bc2a42104a2e8ce3891d1c8a2b8767e2a52606e61952b","signature":"d86aae3a61fb2a3734379428044eefd6b048996f3a1a1cd7e57bb94d3d36b02b"},{"version":"31946b8cd45a08d2f4d3be4e8b31b5896e5f0fb24840cc53e6d9a45d71e24506","signature":"50c12b83406070a98041a222f49db12395234ac00db0f16d18d01d8fccfe9d9d"},{"version":"2a0b3b70eae3ac89e80870431490787f00d5b450b6c9767df4daf6aee7eb0978","signature":"dd11f115ef46b611836fe84d45fb6f7889711397a69aad6cc147739cbe5a4072"},{"version":"1f97d3daade701681d6c89a1904123b009db72bdf95ec5fd563076769da2339c","signature":"c12ee6242f6e1108c7cfac4089b422a742417d50a70cbb03d0d24b7217271376"},{"version":"f6eaf207ae99ba6778460fa1d857e80c870be1533e9b1668060f0f53e6aa6b41","signature":"b9f112f8e9a593f362dd5f434f8f997385dd62f15e2d2fb6d316e5d0d9942a51"},{"version":"6647f68fcaa6a2a028711abf7288cd95d8625d0efff1315b5ad3536bf2de9e2b","signature":"919e52d8be47dbe1be9f86aff4b897c9801b8d6d0bf49f68fc321a4dc9251ad4"},{"version":"ef23db21116b6651538dbcb7df065b8340d6b2514bce598087309f5f435a2bcb","signature":"ba8cda0a8ef4aaa88a574d7e25ea6eaac5e6b9a25c862afdd948d8b6780014b6"},{"version":"26a4fb1b862a479d7a5d90aa1745f070d44bc351e79c6e4f8a6481b206a1655b","signature":"ad70244d75add3a5819000694ceb8f6ffca2fff2bd49acbd6786e1457c9d1d82","affectsGlobalScope":true},{"version":"abdc0918e0afd85d5495c618d95ea69c667d1cd095452cc73617168c784904a4","signature":"9382f138465c4775c54940f2a3d4334a083a6fc9a622a7c926c5f8233228cbae"},{"version":"336f74bb2ca217a8b08f3c146c41295de7597a86d52ca333fac5634561261846","signature":"c8525f0be940a19f3d03f06b6e43d4bea21ba910db62fb5024ecc671bcc23932"},{"version":"eb5c9b96b9b90a2c7abd1dd62be278b51ef4fcc1a7181fb7294ae1554b5d2409","signature":"90b4955becdfa8d37df7a1fdd1c93d847cdbea6bb3a113bd3baa6134291531a2"},{"version":"bdf04d4dd9ed94c85da1be565643ef5fad4212b7a545da8f4792deb4cf426665","signature":"c6384012cac726d5b05237d2bd2c9c9da0893feaf54ab1dd0042fe141b9e5bd8"},{"version":"1ac886967a62c940d61ab89f3411f64893d779d69e1435f15215547ba50fa03b","signature":"994bfb8326dca5c985462ba74b5c64146aef0e3ea7bbbbf265ad426d884fbc9e"},{"version":"314ad9d994327a7e9cc1367c1c56fb3f28737fc85716317e01f7649a02e6303b","signature":"00dd4ce0458ebf64e2e0617d4bc04f3a9a569bc388f3a20c1c4416d465e99245"},{"version":"b7a6fa2ad0bbeb531d9fc2a4003d5cc4a6e8142c18914fb2d034ca8b32b760fc","signature":"61814a0254524d3e14d405795a649b8b838386ff0f82caf50a0b7d4c72008c3d"},{"version":"3fcfd875b042c0855e76061aae81b0d8333c1990c1e4ca4d1f3141652b988b06","signature":"b43c263b28c6f20a6d7066e22f6906fe51605b6a4b7709a3c47d7cf6c0ccf93e"},{"version":"1e54ebe6806cac6a9b2ce78a54863cd75732cc68901256507042e3d8cd399224","signature":"58d2bb278ba2b594a3b664571b357e10388c6a1eef2c27e2946d3ee447fb4e16"},{"version":"f40083b8ea073895257a2f5ef2bfc9b8cf031d471744fe76185ecc259847d49b","signature":"e5f0e0e21621bb3e87958857cc9695abf011fb257bd249abd42ae97b3b61e1d0"},{"version":"91df3defe1f0907af6b80d1b7849615c72b36340404efb0bbf6f9fb1f99727fc","signature":"5cf43ceac60fba7927af9ce9b27fb6031854fc923263b78c353fb986857218b9"},{"version":"64837fd5187d6a3c2abc6a265251be66c4a9961c369e5cf647ac87511d328d90","signature":"0caa217adbbdb001facd9aeb363fa2a446eabbeb4e5af2c1f2c3d1ef4bbffc6e"},{"version":"40896dfcdeafc76e4d85bfd4acca390f542032e613c6f5b7c5c8e1e99bb3b63d","signature":"63bfd9f3fbbcb2dc649dd7303b9fdcf5680c25e217228a5abe005674bfc8bed5"},{"version":"f79040aab08b6460794739412f2f175f902517183e6a5196e4aec528d4634347","signature":"bbaa85a96900ee24d770ce38f7807d2d3cc2ca203e223cd4080447680910992e"},{"version":"d8d719cbe4f408a189f1b35d8183e10e8972d238f7df4eeb0c8cb48a365518b6","signature":"497761089898de53e02d017b84843a99061b782b9b0c6d987b1595a31b0260f7"},{"version":"69a362101efd9d9fe1a4d2d246ae3ac1d76ffc26e222817d13146f7a07bfe5cd","signature":"ea9768ee8ae2400a4352956f0937ff7ce12640c4de3c69d6e71e8a2f954ad58a"},{"version":"6ba703e0059aab893149bff3e9d4ab11e61342ca6914bad738f9e79eacb9fe3b","signature":"fe072e91b615ffa8bccb04dcc43149d4095fc5f6e56677346250901a692f4568"},{"version":"5e36c20b72b953b78f812d6d5c5b74f5789a8139870654e38a8fa065aea4575a","signature":"d9ce1372a43589027af010d0293b17099bf27089071c6d12ce30eb94b70191af"},{"version":"f9d363bd3045f41be125a5653330811c52b4849321a4fd6f580ed0d7344d72bf","signature":"dbb3eab27a108491f80873c1031ddc0b1a16c47f4c32e2ec2e70b83e9cee161b"},{"version":"574db92fbafc03af54f69b1a10735093ec1c047ac3480a7bba3cf427ff48d3be","signature":"8aec088c8b901c6fe9e7fe22785892138849af77a640d12b7015ec52a95aa27c"},{"version":"3717d410e1140d12aff0a8459792feda0fc49a0bbdd485bbb359ed7ac8aae3cc","signature":"d358bf9f604d2d3ac588fc908565f9c8a60bcb8e6993461b20ef5ca60e9a8f57"},{"version":"4844308ad7e00f75af9a2709c5a05f21ab2dc737164e94adf77c91acb9773e3b","signature":"30fa1b4625972bc419fe814ea22dc12334365cb71c14b3f24ebf779d848060ba"}],"root":[142,143,[146,176]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noImplicitAny":true,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"../../src/client","skipLibCheck":true,"sourceMap":false,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"suppressImplicitAnyIndexErrors":false,"target":99,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[138,1],[141,2],[126,3],[127,3],[125,4],[130,5],[131,6],[133,7],[132,6],[129,8],[134,9],[135,10],[136,11],[128,4],[144,12],[145,12],[92,13],[93,12],[95,14],[96,15],[97,14],[120,14],[98,15],[99,15],[100,15],[101,15],[102,15],[117,15],[123,16],[107,15],[103,15],[104,15],[118,15],[116,15],[119,14],[105,15],[108,15],[109,15],[106,15],[110,15],[111,15],[122,15],[121,15],[115,15],[114,15],[112,15],[113,15],[142,17],[168,18],[173,19],[171,18],[172,18],[174,20],[163,21],[161,18],[143,22],[150,23],[152,24],[176,25],[165,26],[166,27],[148,28],[154,29],[146,22],[160,30],[167,31],[155,32],[157,33],[158,32],[153,34],[151,22],[164,35],[156,36],[159,18],[175,22],[162,37],[170,38],[149,18],[169,22],[147,18]],"version":"6.0.3"}
|
package/build/client/auth.d.ts
CHANGED
|
@@ -23,13 +23,53 @@ export interface AuthOptions {
|
|
|
23
23
|
}
|
|
24
24
|
export declare function register(username: string, password: string, email: string, opts?: AuthOptions): Promise<void>;
|
|
25
25
|
export declare function login(username: string, password: string, opts?: AuthOptions): Promise<Uint8Array>;
|
|
26
|
-
export declare
|
|
26
|
+
export declare enum AuthErrorCode {
|
|
27
|
+
RequestFailed = "request_failed",
|
|
28
|
+
ProtocolError = "protocol_error",
|
|
29
|
+
UsernameTaken = "username_taken",
|
|
30
|
+
EmailInUse = "email_in_use",
|
|
31
|
+
RegistrationRejected = "registration_rejected",
|
|
32
|
+
InvalidCredentials = "invalid_credentials",
|
|
33
|
+
EmailNotConfirmed = "email_not_confirmed",
|
|
34
|
+
TwoFactorRequired = "two_factor_required",
|
|
35
|
+
ServerAuthFailed = "server_auth_failed",
|
|
36
|
+
TwoFactorCodeInvalid = "two_factor_code_invalid",
|
|
37
|
+
TwoFactorSetupFailed = "two_factor_setup_failed",
|
|
38
|
+
ConfirmationInvalid = "confirmation_invalid",
|
|
39
|
+
PasswordResetInvalid = "password_reset_invalid"
|
|
40
|
+
}
|
|
41
|
+
export declare class AuthError extends Error {
|
|
42
|
+
readonly code: AuthErrorCode;
|
|
43
|
+
constructor(code: AuthErrorCode, message: string);
|
|
44
|
+
}
|
|
45
|
+
export declare class UsernameTakenError extends AuthError {
|
|
46
|
+
constructor();
|
|
47
|
+
}
|
|
48
|
+
export declare class EmailInUseError extends AuthError {
|
|
49
|
+
constructor();
|
|
50
|
+
}
|
|
51
|
+
export declare class InvalidCredentialsError extends AuthError {
|
|
52
|
+
constructor();
|
|
53
|
+
}
|
|
54
|
+
export declare class EmailNotConfirmedError extends AuthError {
|
|
27
55
|
constructor();
|
|
28
56
|
}
|
|
29
|
-
export declare class TwoFactorRequiredError extends
|
|
57
|
+
export declare class TwoFactorRequiredError extends AuthError {
|
|
30
58
|
readonly twoFaId: string;
|
|
31
59
|
constructor(twoFaId: string);
|
|
32
60
|
}
|
|
61
|
+
export declare class ServerAuthFailedError extends AuthError {
|
|
62
|
+
constructor();
|
|
63
|
+
}
|
|
64
|
+
export declare class TwoFactorCodeError extends AuthError {
|
|
65
|
+
constructor();
|
|
66
|
+
}
|
|
67
|
+
export declare class ConfirmationInvalidError extends AuthError {
|
|
68
|
+
constructor();
|
|
69
|
+
}
|
|
70
|
+
export declare class PasswordResetInvalidError extends AuthError {
|
|
71
|
+
constructor();
|
|
72
|
+
}
|
|
33
73
|
export declare const TwoFactorMethod: {
|
|
34
74
|
readonly None: 0;
|
|
35
75
|
readonly Email: 1;
|
|
@@ -59,4 +99,15 @@ export declare const Auth: {
|
|
|
59
99
|
};
|
|
60
100
|
readonly buildLoginMessage: typeof buildLoginMessage;
|
|
61
101
|
readonly LOGIN_CONTEXT: "qauth:login:v1";
|
|
102
|
+
readonly AuthError: typeof AuthError;
|
|
103
|
+
readonly AuthErrorCode: typeof AuthErrorCode;
|
|
104
|
+
readonly UsernameTakenError: typeof UsernameTakenError;
|
|
105
|
+
readonly EmailInUseError: typeof EmailInUseError;
|
|
106
|
+
readonly InvalidCredentialsError: typeof InvalidCredentialsError;
|
|
107
|
+
readonly EmailNotConfirmedError: typeof EmailNotConfirmedError;
|
|
108
|
+
readonly TwoFactorRequiredError: typeof TwoFactorRequiredError;
|
|
109
|
+
readonly ServerAuthFailedError: typeof ServerAuthFailedError;
|
|
110
|
+
readonly TwoFactorCodeError: typeof TwoFactorCodeError;
|
|
111
|
+
readonly ConfirmationInvalidError: typeof ConfirmationInvalidError;
|
|
112
|
+
readonly PasswordResetInvalidError: typeof PasswordResetInvalidError;
|
|
62
113
|
};
|
package/build/client/auth.js
CHANGED
|
@@ -110,7 +110,7 @@ async function postBinary(baseUrl, path, body) {
|
|
|
110
110
|
credentials: 'same-origin',
|
|
111
111
|
});
|
|
112
112
|
if (!res.ok)
|
|
113
|
-
throw new
|
|
113
|
+
throw new AuthError(AuthErrorCode.RequestFailed, 'The auth request failed.');
|
|
114
114
|
return new DataReader(new Uint8Array(await res.arrayBuffer()));
|
|
115
115
|
}
|
|
116
116
|
export async function register(username, password, email, opts = {}) {
|
|
@@ -121,7 +121,7 @@ export async function register(username, password, email, opts = {}) {
|
|
|
121
121
|
const start = await postBinary(baseUrl, '/register/start', new DataWriter().writeString(username).writeBytes(blinded).toBytes());
|
|
122
122
|
const status = start.readU8();
|
|
123
123
|
if (status !== 0)
|
|
124
|
-
throw new
|
|
124
|
+
throw new AuthError(AuthErrorCode.RequestFailed, 'Registration is unavailable right now.');
|
|
125
125
|
const kdf = decodeKdf(start);
|
|
126
126
|
const evaluated = start.readBytes();
|
|
127
127
|
const oprfOutput = oprf.finalize(pw, blind, evaluated);
|
|
@@ -144,7 +144,7 @@ export async function register(username, password, email, opts = {}) {
|
|
|
144
144
|
wipe(seed);
|
|
145
145
|
}
|
|
146
146
|
if (publicKey.length !== PUBLIC_KEY_LEN)
|
|
147
|
-
throw new
|
|
147
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'Server returned a bad public key length.');
|
|
148
148
|
const finish = await postBinary(baseUrl, '/register/finish', new DataWriter()
|
|
149
149
|
.writeString(username)
|
|
150
150
|
.writeString(email)
|
|
@@ -153,11 +153,11 @@ export async function register(username, password, email, opts = {}) {
|
|
|
153
153
|
.toBytes());
|
|
154
154
|
const finishStatus = finish.readU8();
|
|
155
155
|
if (finishStatus === 1)
|
|
156
|
-
throw new
|
|
156
|
+
throw new UsernameTakenError();
|
|
157
157
|
if (finishStatus === 2)
|
|
158
|
-
throw new
|
|
158
|
+
throw new EmailInUseError();
|
|
159
159
|
if (finishStatus !== 0)
|
|
160
|
-
throw new
|
|
160
|
+
throw new AuthError(AuthErrorCode.RegistrationRejected, 'Registration was rejected.');
|
|
161
161
|
}
|
|
162
162
|
export async function login(username, password, opts = {}) {
|
|
163
163
|
const baseUrl = opts.baseUrl ?? '/auth';
|
|
@@ -173,7 +173,7 @@ export async function login(username, password, opts = {}) {
|
|
|
173
173
|
const exp = r.readU64();
|
|
174
174
|
const evaluated = r.readBytes();
|
|
175
175
|
if (BigInt(Math.floor(Date.now() / 1000)) >= exp)
|
|
176
|
-
throw new
|
|
176
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'The login challenge expired; retry.');
|
|
177
177
|
const oprfOutput = oprf.finalize(pw, blind, evaluated);
|
|
178
178
|
const seed = await deriveSeed(oprfOutput, kdf);
|
|
179
179
|
const { cipherText, sharedSecret } = ml_kem768.encapsulate(SERVER_KEM_PUBLIC_KEY);
|
|
@@ -193,7 +193,7 @@ export async function login(username, password, opts = {}) {
|
|
|
193
193
|
wipe(seed);
|
|
194
194
|
}
|
|
195
195
|
if (signature.length !== SIGNATURE_LEN)
|
|
196
|
-
throw new
|
|
196
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'Computed a bad signature length.');
|
|
197
197
|
const res = await postBinary(baseUrl, '/login/finish', new DataWriter().writeBytes(cid).writeBytes(cipherText).writeBytes(signature).toBytes());
|
|
198
198
|
const loginStatus = res.readU8();
|
|
199
199
|
if (loginStatus === 2) {
|
|
@@ -202,7 +202,7 @@ export async function login(username, password, opts = {}) {
|
|
|
202
202
|
}
|
|
203
203
|
if (loginStatus !== 0 && loginStatus !== 3) {
|
|
204
204
|
wipe(sharedSecret);
|
|
205
|
-
throw new
|
|
205
|
+
throw new InvalidCredentialsError();
|
|
206
206
|
}
|
|
207
207
|
const first = res.readBytes();
|
|
208
208
|
const serverConfirm = res.readBytes();
|
|
@@ -211,45 +211,111 @@ export async function login(username, password, opts = {}) {
|
|
|
211
211
|
wipe(sharedSecret);
|
|
212
212
|
const expected = await hmacSha256(sessionKey, concatBytes(utf8(SERVER_CONFIRM_LABEL), transcriptHash));
|
|
213
213
|
if (!bytesEqual(expected, serverConfirm))
|
|
214
|
-
throw new
|
|
214
|
+
throw new ServerAuthFailedError();
|
|
215
215
|
if (loginStatus === 3) {
|
|
216
216
|
throw new TwoFactorRequiredError(toHex(first));
|
|
217
217
|
}
|
|
218
218
|
return first;
|
|
219
219
|
}
|
|
220
|
-
export
|
|
220
|
+
export var AuthErrorCode;
|
|
221
|
+
(function (AuthErrorCode) {
|
|
222
|
+
AuthErrorCode["RequestFailed"] = "request_failed";
|
|
223
|
+
AuthErrorCode["ProtocolError"] = "protocol_error";
|
|
224
|
+
AuthErrorCode["UsernameTaken"] = "username_taken";
|
|
225
|
+
AuthErrorCode["EmailInUse"] = "email_in_use";
|
|
226
|
+
AuthErrorCode["RegistrationRejected"] = "registration_rejected";
|
|
227
|
+
AuthErrorCode["InvalidCredentials"] = "invalid_credentials";
|
|
228
|
+
AuthErrorCode["EmailNotConfirmed"] = "email_not_confirmed";
|
|
229
|
+
AuthErrorCode["TwoFactorRequired"] = "two_factor_required";
|
|
230
|
+
AuthErrorCode["ServerAuthFailed"] = "server_auth_failed";
|
|
231
|
+
AuthErrorCode["TwoFactorCodeInvalid"] = "two_factor_code_invalid";
|
|
232
|
+
AuthErrorCode["TwoFactorSetupFailed"] = "two_factor_setup_failed";
|
|
233
|
+
AuthErrorCode["ConfirmationInvalid"] = "confirmation_invalid";
|
|
234
|
+
AuthErrorCode["PasswordResetInvalid"] = "password_reset_invalid";
|
|
235
|
+
})(AuthErrorCode || (AuthErrorCode = {}));
|
|
236
|
+
export class AuthError extends Error {
|
|
237
|
+
code;
|
|
238
|
+
constructor(code, message) {
|
|
239
|
+
super(message);
|
|
240
|
+
this.name = 'AuthError';
|
|
241
|
+
this.code = code;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
export class UsernameTakenError extends AuthError {
|
|
245
|
+
constructor() {
|
|
246
|
+
super(AuthErrorCode.UsernameTaken, 'That username is already registered.');
|
|
247
|
+
this.name = 'UsernameTakenError';
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
export class EmailInUseError extends AuthError {
|
|
251
|
+
constructor() {
|
|
252
|
+
super(AuthErrorCode.EmailInUse, 'That email is already in use.');
|
|
253
|
+
this.name = 'EmailInUseError';
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
export class InvalidCredentialsError extends AuthError {
|
|
257
|
+
constructor() {
|
|
258
|
+
super(AuthErrorCode.InvalidCredentials, 'Incorrect username or password.');
|
|
259
|
+
this.name = 'InvalidCredentialsError';
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
export class EmailNotConfirmedError extends AuthError {
|
|
221
263
|
constructor() {
|
|
222
|
-
super('
|
|
264
|
+
super(AuthErrorCode.EmailNotConfirmed, 'Your email address is not confirmed yet.');
|
|
223
265
|
this.name = 'EmailNotConfirmedError';
|
|
224
266
|
}
|
|
225
267
|
}
|
|
226
|
-
export class TwoFactorRequiredError extends
|
|
268
|
+
export class TwoFactorRequiredError extends AuthError {
|
|
227
269
|
twoFaId;
|
|
228
270
|
constructor(twoFaId) {
|
|
229
|
-
super('
|
|
271
|
+
super(AuthErrorCode.TwoFactorRequired, 'A second factor is required to sign in.');
|
|
230
272
|
this.name = 'TwoFactorRequiredError';
|
|
231
273
|
this.twoFaId = twoFaId;
|
|
232
274
|
}
|
|
233
275
|
}
|
|
276
|
+
export class ServerAuthFailedError extends AuthError {
|
|
277
|
+
constructor() {
|
|
278
|
+
super(AuthErrorCode.ServerAuthFailed, 'Server authentication failed (possible MITM).');
|
|
279
|
+
this.name = 'ServerAuthFailedError';
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
export class TwoFactorCodeError extends AuthError {
|
|
283
|
+
constructor() {
|
|
284
|
+
super(AuthErrorCode.TwoFactorCodeInvalid, 'The verification code is invalid or expired.');
|
|
285
|
+
this.name = 'TwoFactorCodeError';
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
export class ConfirmationInvalidError extends AuthError {
|
|
289
|
+
constructor() {
|
|
290
|
+
super(AuthErrorCode.ConfirmationInvalid, 'This confirmation link is invalid or has expired.');
|
|
291
|
+
this.name = 'ConfirmationInvalidError';
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
export class PasswordResetInvalidError extends AuthError {
|
|
295
|
+
constructor() {
|
|
296
|
+
super(AuthErrorCode.PasswordResetInvalid, 'This password-reset link is invalid or has expired.');
|
|
297
|
+
this.name = 'PasswordResetInvalidError';
|
|
298
|
+
}
|
|
299
|
+
}
|
|
234
300
|
export const TwoFactorMethod = { None: 0, Email: 1 };
|
|
235
301
|
export async function verifyTwoFactor(twoFaId, code, opts = {}) {
|
|
236
302
|
const baseUrl = opts.baseUrl ?? '/auth';
|
|
237
303
|
const res = await postBinary(baseUrl, '/2fa/verify', new DataWriter().writeBytes(fromHex(twoFaId)).writeString(code).toBytes());
|
|
238
304
|
if (res.readU8() !== 0)
|
|
239
|
-
throw new
|
|
305
|
+
throw new TwoFactorCodeError();
|
|
240
306
|
return res.readBytes();
|
|
241
307
|
}
|
|
242
308
|
export async function setupTwoFactor(method, opts = {}) {
|
|
243
309
|
const baseUrl = opts.baseUrl ?? '/auth';
|
|
244
310
|
const res = await postBinary(baseUrl, '/2fa/setup', new DataWriter().writeU8(method).toBytes());
|
|
245
311
|
if (res.readU8() !== 0)
|
|
246
|
-
throw new
|
|
312
|
+
throw new AuthError(AuthErrorCode.TwoFactorSetupFailed, 'Enabling or disabling two-factor failed.');
|
|
247
313
|
}
|
|
248
314
|
export async function confirmTwoFactorSetup(code, opts = {}) {
|
|
249
315
|
const baseUrl = opts.baseUrl ?? '/auth';
|
|
250
316
|
const res = await postBinary(baseUrl, '/2fa/setup/verify', new DataWriter().writeString(code).toBytes());
|
|
251
317
|
if (res.readU8() !== 0)
|
|
252
|
-
throw new
|
|
318
|
+
throw new AuthError(AuthErrorCode.TwoFactorSetupFailed, 'Confirming the two-factor setup failed.');
|
|
253
319
|
}
|
|
254
320
|
export async function twoFactorStatus(opts = {}) {
|
|
255
321
|
const baseUrl = opts.baseUrl ?? '/auth';
|
|
@@ -258,14 +324,14 @@ export async function twoFactorStatus(opts = {}) {
|
|
|
258
324
|
credentials: 'same-origin',
|
|
259
325
|
});
|
|
260
326
|
if (!res.ok)
|
|
261
|
-
throw new
|
|
327
|
+
throw new AuthError(AuthErrorCode.RequestFailed, 'The auth request failed.');
|
|
262
328
|
return new DataReader(new Uint8Array(await res.arrayBuffer())).readU8();
|
|
263
329
|
}
|
|
264
330
|
export async function confirmEmail(token, opts = {}) {
|
|
265
331
|
const baseUrl = opts.baseUrl ?? '/auth';
|
|
266
332
|
const res = await postBinary(baseUrl, '/confirm', new DataWriter().writeBytes(fromHex(token)).toBytes());
|
|
267
333
|
if (res.readU8() !== 0)
|
|
268
|
-
throw new
|
|
334
|
+
throw new ConfirmationInvalidError();
|
|
269
335
|
}
|
|
270
336
|
export async function resendConfirmation(email, opts = {}) {
|
|
271
337
|
const baseUrl = opts.baseUrl ?? '/auth';
|
|
@@ -283,7 +349,7 @@ export async function resetPassword(token, newPassword, opts = {}) {
|
|
|
283
349
|
const { blind, blinded } = oprf.blind(pw);
|
|
284
350
|
const start = await postBinary(baseUrl, '/reset/start', new DataWriter().writeBytes(rawToken).writeBytes(blinded).toBytes());
|
|
285
351
|
if (start.readU8() !== 0)
|
|
286
|
-
throw new
|
|
352
|
+
throw new PasswordResetInvalidError();
|
|
287
353
|
const username = start.readString();
|
|
288
354
|
const kdf = decodeKdf(start);
|
|
289
355
|
const evaluated = start.readBytes();
|
|
@@ -307,10 +373,10 @@ export async function resetPassword(token, newPassword, opts = {}) {
|
|
|
307
373
|
wipe(seed);
|
|
308
374
|
}
|
|
309
375
|
if (publicKey.length !== PUBLIC_KEY_LEN)
|
|
310
|
-
throw new
|
|
376
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'Server returned a bad public key length.');
|
|
311
377
|
const finish = await postBinary(baseUrl, '/reset/finish', new DataWriter().writeBytes(rawToken).writeBytes(publicKey).writeBytes(regProof).toBytes());
|
|
312
378
|
if (finish.readU8() !== 0)
|
|
313
|
-
throw new
|
|
379
|
+
throw new PasswordResetInvalidError();
|
|
314
380
|
}
|
|
315
381
|
export const Auth = {
|
|
316
382
|
register,
|
|
@@ -326,4 +392,15 @@ export const Auth = {
|
|
|
326
392
|
TwoFactorMethod,
|
|
327
393
|
buildLoginMessage,
|
|
328
394
|
LOGIN_CONTEXT,
|
|
395
|
+
AuthError,
|
|
396
|
+
AuthErrorCode,
|
|
397
|
+
UsernameTakenError,
|
|
398
|
+
EmailInUseError,
|
|
399
|
+
InvalidCredentialsError,
|
|
400
|
+
EmailNotConfirmedError,
|
|
401
|
+
TwoFactorRequiredError,
|
|
402
|
+
ServerAuthFailedError,
|
|
403
|
+
TwoFactorCodeError,
|
|
404
|
+
ConfirmationInvalidError,
|
|
405
|
+
PasswordResetInvalidError,
|
|
329
406
|
};
|
package/build/client/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { mount } from './routing/mount.js';
|
|
2
2
|
export { Router } from './routing/Router.js';
|
|
3
|
-
export { Auth, register as authRegister, login as authLogin, buildLoginMessage, LOGIN_CONTEXT, } from './auth.js';
|
|
3
|
+
export { Auth, register as authRegister, login as authLogin, buildLoginMessage, LOGIN_CONTEXT, AuthError, AuthErrorCode, UsernameTakenError, EmailInUseError, InvalidCredentialsError, EmailNotConfirmedError, TwoFactorRequiredError, ServerAuthFailedError, TwoFactorCodeError, ConfirmationInvalidError, PasswordResetInvalidError, } from './auth.js';
|
|
4
4
|
export type { KdfParams, AuthOptions } from './auth.js';
|
|
5
5
|
export { Link } from './navigation/Link.js';
|
|
6
6
|
export type { LinkProps } from './navigation/Link.js';
|
package/build/client/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { mount } from './routing/mount.js';
|
|
2
2
|
export { Router } from './routing/Router.js';
|
|
3
|
-
export { Auth, register as authRegister, login as authLogin, buildLoginMessage, LOGIN_CONTEXT, } from './auth.js';
|
|
3
|
+
export { Auth, register as authRegister, login as authLogin, buildLoginMessage, LOGIN_CONTEXT, AuthError, AuthErrorCode, UsernameTakenError, EmailInUseError, InvalidCredentialsError, EmailNotConfirmedError, TwoFactorRequiredError, ServerAuthFailedError, TwoFactorCodeError, ConfirmationInvalidError, PasswordResetInvalidError, } from './auth.js';
|
|
4
4
|
export { Link } from './navigation/Link.js';
|
|
5
5
|
export { NavLink, matchActive } from './navigation/NavLink.js';
|
|
6
6
|
export { navigate, back, forward, refresh, setViewTransitions, setTransitions, href, } from './navigation/navigation.js';
|
package/package.json
CHANGED
package/src/client/auth.ts
CHANGED
|
@@ -196,7 +196,7 @@ async function postBinary(baseUrl: string, path: string, body: Uint8Array): Prom
|
|
|
196
196
|
body: body as BodyInit,
|
|
197
197
|
credentials: 'same-origin',
|
|
198
198
|
});
|
|
199
|
-
if (!res.ok) throw new
|
|
199
|
+
if (!res.ok) throw new AuthError(AuthErrorCode.RequestFailed, 'The auth request failed.');
|
|
200
200
|
return new DataReader(new Uint8Array(await res.arrayBuffer()));
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -230,7 +230,8 @@ export async function register(
|
|
|
230
230
|
new DataWriter().writeString(username).writeBytes(blinded).toBytes(),
|
|
231
231
|
);
|
|
232
232
|
const status = start.readU8();
|
|
233
|
-
if (status !== 0)
|
|
233
|
+
if (status !== 0)
|
|
234
|
+
throw new AuthError(AuthErrorCode.RequestFailed, 'Registration is unavailable right now.');
|
|
234
235
|
const kdf = decodeKdf(start);
|
|
235
236
|
const evaluated = start.readBytes();
|
|
236
237
|
|
|
@@ -253,7 +254,8 @@ export async function register(
|
|
|
253
254
|
} finally {
|
|
254
255
|
wipe(seed);
|
|
255
256
|
}
|
|
256
|
-
if (publicKey.length !== PUBLIC_KEY_LEN)
|
|
257
|
+
if (publicKey.length !== PUBLIC_KEY_LEN)
|
|
258
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'Server returned a bad public key length.');
|
|
257
259
|
|
|
258
260
|
// 3. Submit the username + email + public key + proof-of-possession.
|
|
259
261
|
const finish = await postBinary(
|
|
@@ -267,9 +269,10 @@ export async function register(
|
|
|
267
269
|
.toBytes(),
|
|
268
270
|
);
|
|
269
271
|
const finishStatus = finish.readU8();
|
|
270
|
-
if (finishStatus === 1) throw new
|
|
271
|
-
if (finishStatus === 2) throw new
|
|
272
|
-
if (finishStatus !== 0)
|
|
272
|
+
if (finishStatus === 1) throw new UsernameTakenError();
|
|
273
|
+
if (finishStatus === 2) throw new EmailInUseError();
|
|
274
|
+
if (finishStatus !== 0)
|
|
275
|
+
throw new AuthError(AuthErrorCode.RegistrationRejected, 'Registration was rejected.');
|
|
273
276
|
}
|
|
274
277
|
|
|
275
278
|
/**
|
|
@@ -310,7 +313,8 @@ export async function login(
|
|
|
310
313
|
const exp = r.readU64();
|
|
311
314
|
const evaluated = r.readBytes();
|
|
312
315
|
// Client-side fast-fail only; the server re-checks expiry authoritatively.
|
|
313
|
-
if (BigInt(Math.floor(Date.now() / 1000)) >= exp)
|
|
316
|
+
if (BigInt(Math.floor(Date.now() / 1000)) >= exp)
|
|
317
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'The login challenge expired; retry.');
|
|
314
318
|
|
|
315
319
|
// 2. OPRF -> keyed salt -> seed.
|
|
316
320
|
const oprfOutput = oprf.finalize(pw, blind, evaluated);
|
|
@@ -344,7 +348,8 @@ export async function login(
|
|
|
344
348
|
} finally {
|
|
345
349
|
wipe(seed);
|
|
346
350
|
}
|
|
347
|
-
if (signature.length !== SIGNATURE_LEN)
|
|
351
|
+
if (signature.length !== SIGNATURE_LEN)
|
|
352
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'Computed a bad signature length.');
|
|
348
353
|
|
|
349
354
|
// 4. Submit {cid, ct, signature}.
|
|
350
355
|
const res = await postBinary(
|
|
@@ -367,7 +372,7 @@ export async function login(
|
|
|
367
372
|
// session token on 0 and the twoFaId on 3.
|
|
368
373
|
if (loginStatus !== 0 && loginStatus !== 3) {
|
|
369
374
|
wipe(sharedSecret);
|
|
370
|
-
throw new
|
|
375
|
+
throw new InvalidCredentialsError();
|
|
371
376
|
}
|
|
372
377
|
const first = res.readBytes();
|
|
373
378
|
const serverConfirm = res.readBytes();
|
|
@@ -387,7 +392,7 @@ export async function login(
|
|
|
387
392
|
sessionKey,
|
|
388
393
|
concatBytes(utf8(SERVER_CONFIRM_LABEL), transcriptHash),
|
|
389
394
|
);
|
|
390
|
-
if (!bytesEqual(expected, serverConfirm)) throw new
|
|
395
|
+
if (!bytesEqual(expected, serverConfirm)) throw new ServerAuthFailedError();
|
|
391
396
|
|
|
392
397
|
if (loginStatus === 3) {
|
|
393
398
|
// The server authenticated itself, but a second factor is required. Surface
|
|
@@ -399,30 +404,150 @@ export async function login(
|
|
|
399
404
|
return first; // session token
|
|
400
405
|
}
|
|
401
406
|
|
|
402
|
-
/**
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
|
|
407
|
+
/**
|
|
408
|
+
* The STABLE, typed discriminant carried by every auth error as `err.code`. Branch
|
|
409
|
+
* on THIS (or on the error class via `instanceof`), never on `err.message` (human
|
|
410
|
+
* facing, may change) nor `err.name` (a bare string, mangled by minifiers). Each
|
|
411
|
+
* value maps 1:1 to an {@link AuthError} subclass below.
|
|
412
|
+
*
|
|
413
|
+
* ```ts
|
|
414
|
+
* try { await Auth.login(email, password); }
|
|
415
|
+
* catch (err) {
|
|
416
|
+
* if (err instanceof Auth.EmailNotConfirmedError) return promptConfirm();
|
|
417
|
+
* if (err instanceof Auth.TwoFactorRequiredError) return promptCode(err.twoFaId);
|
|
418
|
+
* if (err instanceof Auth.AuthError && err.code === Auth.AuthErrorCode.InvalidCredentials)
|
|
419
|
+
* return setError('Incorrect email or password.');
|
|
420
|
+
* throw err;
|
|
421
|
+
* }
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
export enum AuthErrorCode {
|
|
425
|
+
/** Network failure or a non-2xx / malformed response from the auth endpoint. */
|
|
426
|
+
RequestFailed = 'request_failed',
|
|
427
|
+
/** A client/server protocol mismatch (bad key or signature length, expired challenge). */
|
|
428
|
+
ProtocolError = 'protocol_error',
|
|
429
|
+
/** register: the username is already registered. */
|
|
430
|
+
UsernameTaken = 'username_taken',
|
|
431
|
+
/** register: the email is already in use. */
|
|
432
|
+
EmailInUse = 'email_in_use',
|
|
433
|
+
/** register: rejected for another reason (e.g. failed proof-of-possession). */
|
|
434
|
+
RegistrationRejected = 'registration_rejected',
|
|
435
|
+
/** login: wrong username/password. Deliberately indistinguishable from "no such user". */
|
|
436
|
+
InvalidCredentials = 'invalid_credentials',
|
|
437
|
+
/** login: the credential is valid but the account's email is not confirmed. */
|
|
438
|
+
EmailNotConfirmed = 'email_not_confirmed',
|
|
439
|
+
/** login: password + server auth OK, but a second factor is required (no session yet). */
|
|
440
|
+
TwoFactorRequired = 'two_factor_required',
|
|
441
|
+
/** login/2fa: the SERVER failed to authenticate itself (mutual-auth mismatch) -> possible MITM. */
|
|
442
|
+
ServerAuthFailed = 'server_auth_failed',
|
|
443
|
+
/** 2fa: the submitted code was wrong, expired, or already used. */
|
|
444
|
+
TwoFactorCodeInvalid = 'two_factor_code_invalid',
|
|
445
|
+
/** 2fa setup: enabling/disabling the second factor failed. */
|
|
446
|
+
TwoFactorSetupFailed = 'two_factor_setup_failed',
|
|
447
|
+
/** confirm: the email-confirmation link was invalid or expired. */
|
|
448
|
+
ConfirmationInvalid = 'confirmation_invalid',
|
|
449
|
+
/** reset: the password-reset link was invalid or expired. */
|
|
450
|
+
PasswordResetInvalid = 'password_reset_invalid',
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Base class for EVERY error thrown by the auth client. Always carries a typed
|
|
455
|
+
* {@link AuthErrorCode} as `err.code`, so `err instanceof AuthError` narrows the
|
|
456
|
+
* whole family and `err.code` discriminates within it. The specific subclasses
|
|
457
|
+
* below are sugar for the common branches; any error is still an `AuthError`.
|
|
458
|
+
*/
|
|
459
|
+
export class AuthError extends Error {
|
|
460
|
+
/** The stable machine-readable discriminant. Prefer this over `message`/`name`. */
|
|
461
|
+
readonly code: AuthErrorCode;
|
|
462
|
+
constructor(code: AuthErrorCode, message: string) {
|
|
463
|
+
super(message);
|
|
464
|
+
this.name = 'AuthError';
|
|
465
|
+
this.code = code;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/** register: the username is already registered ({@link AuthErrorCode.UsernameTaken}). */
|
|
470
|
+
export class UsernameTakenError extends AuthError {
|
|
471
|
+
constructor() {
|
|
472
|
+
super(AuthErrorCode.UsernameTaken, 'That username is already registered.');
|
|
473
|
+
this.name = 'UsernameTakenError';
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/** register: the email is already in use ({@link AuthErrorCode.EmailInUse}). */
|
|
478
|
+
export class EmailInUseError extends AuthError {
|
|
479
|
+
constructor() {
|
|
480
|
+
super(AuthErrorCode.EmailInUse, 'That email is already in use.');
|
|
481
|
+
this.name = 'EmailInUseError';
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** login: wrong username/password, or no such account ({@link AuthErrorCode.InvalidCredentials}). */
|
|
486
|
+
export class InvalidCredentialsError extends AuthError {
|
|
487
|
+
constructor() {
|
|
488
|
+
super(AuthErrorCode.InvalidCredentials, 'Incorrect username or password.');
|
|
489
|
+
this.name = 'InvalidCredentialsError';
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/** login: the credential is valid but the account's email is not confirmed and the
|
|
494
|
+
* domain requires confirmation. Catch it to prompt the user to confirm (and offer
|
|
495
|
+
* {@link resendConfirmation}). {@link AuthErrorCode.EmailNotConfirmed}. */
|
|
496
|
+
export class EmailNotConfirmedError extends AuthError {
|
|
406
497
|
constructor() {
|
|
407
|
-
super('
|
|
498
|
+
super(AuthErrorCode.EmailNotConfirmed, 'Your email address is not confirmed yet.');
|
|
408
499
|
this.name = 'EmailNotConfirmedError';
|
|
409
500
|
}
|
|
410
501
|
}
|
|
411
502
|
|
|
412
|
-
/**
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
* {@link
|
|
416
|
-
export class TwoFactorRequiredError extends
|
|
503
|
+
/** login: the password verified AND the server authenticated itself (mutual auth
|
|
504
|
+
* passed) but the account requires a SECOND FACTOR. No session exists yet. Catch it,
|
|
505
|
+
* collect the delivered code, and call {@link verifyTwoFactor} with `err.twoFaId`.
|
|
506
|
+
* {@link AuthErrorCode.TwoFactorRequired}. */
|
|
507
|
+
export class TwoFactorRequiredError extends AuthError {
|
|
417
508
|
/** The opaque login-challenge id (hex) to echo to {@link verifyTwoFactor}. */
|
|
418
509
|
readonly twoFaId: string;
|
|
419
510
|
constructor(twoFaId: string) {
|
|
420
|
-
super('
|
|
511
|
+
super(AuthErrorCode.TwoFactorRequired, 'A second factor is required to sign in.');
|
|
421
512
|
this.name = 'TwoFactorRequiredError';
|
|
422
513
|
this.twoFaId = twoFaId;
|
|
423
514
|
}
|
|
424
515
|
}
|
|
425
516
|
|
|
517
|
+
/** login/2fa: the SERVER failed to prove its identity (mutual-auth tag mismatch).
|
|
518
|
+
* Treat as hostile: a genuine server always authenticates. Possible MITM / wrong
|
|
519
|
+
* pinned KEM key. {@link AuthErrorCode.ServerAuthFailed}. */
|
|
520
|
+
export class ServerAuthFailedError extends AuthError {
|
|
521
|
+
constructor() {
|
|
522
|
+
super(AuthErrorCode.ServerAuthFailed, 'Server authentication failed (possible MITM).');
|
|
523
|
+
this.name = 'ServerAuthFailedError';
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/** 2fa: the submitted code was wrong, expired, or already used ({@link AuthErrorCode.TwoFactorCodeInvalid}). */
|
|
528
|
+
export class TwoFactorCodeError extends AuthError {
|
|
529
|
+
constructor() {
|
|
530
|
+
super(AuthErrorCode.TwoFactorCodeInvalid, 'The verification code is invalid or expired.');
|
|
531
|
+
this.name = 'TwoFactorCodeError';
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/** confirm: the email-confirmation link was invalid or expired ({@link AuthErrorCode.ConfirmationInvalid}). */
|
|
536
|
+
export class ConfirmationInvalidError extends AuthError {
|
|
537
|
+
constructor() {
|
|
538
|
+
super(AuthErrorCode.ConfirmationInvalid, 'This confirmation link is invalid or has expired.');
|
|
539
|
+
this.name = 'ConfirmationInvalidError';
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/** reset: the password-reset link was invalid or expired ({@link AuthErrorCode.PasswordResetInvalid}). */
|
|
544
|
+
export class PasswordResetInvalidError extends AuthError {
|
|
545
|
+
constructor() {
|
|
546
|
+
super(AuthErrorCode.PasswordResetInvalid, 'This password-reset link is invalid or has expired.');
|
|
547
|
+
this.name = 'PasswordResetInvalidError';
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
426
551
|
/** The 2FA method values, mirroring the server enum (append-only). */
|
|
427
552
|
export const TwoFactorMethod = { None: 0, Email: 1 } as const;
|
|
428
553
|
|
|
@@ -444,7 +569,7 @@ export async function verifyTwoFactor(
|
|
|
444
569
|
'/2fa/verify',
|
|
445
570
|
new DataWriter().writeBytes(fromHex(twoFaId)).writeString(code).toBytes(),
|
|
446
571
|
);
|
|
447
|
-
if (res.readU8() !== 0) throw new
|
|
572
|
+
if (res.readU8() !== 0) throw new TwoFactorCodeError();
|
|
448
573
|
return res.readBytes(); // opaque session token
|
|
449
574
|
}
|
|
450
575
|
|
|
@@ -462,7 +587,8 @@ export async function setupTwoFactor(method: number, opts: AuthOptions = {}): Pr
|
|
|
462
587
|
'/2fa/setup',
|
|
463
588
|
new DataWriter().writeU8(method).toBytes(),
|
|
464
589
|
);
|
|
465
|
-
if (res.readU8() !== 0)
|
|
590
|
+
if (res.readU8() !== 0)
|
|
591
|
+
throw new AuthError(AuthErrorCode.TwoFactorSetupFailed, 'Enabling or disabling two-factor failed.');
|
|
466
592
|
}
|
|
467
593
|
|
|
468
594
|
/**
|
|
@@ -477,7 +603,8 @@ export async function confirmTwoFactorSetup(code: string, opts: AuthOptions = {}
|
|
|
477
603
|
'/2fa/setup/verify',
|
|
478
604
|
new DataWriter().writeString(code).toBytes(),
|
|
479
605
|
);
|
|
480
|
-
if (res.readU8() !== 0)
|
|
606
|
+
if (res.readU8() !== 0)
|
|
607
|
+
throw new AuthError(AuthErrorCode.TwoFactorSetupFailed, 'Confirming the two-factor setup failed.');
|
|
481
608
|
}
|
|
482
609
|
|
|
483
610
|
/**
|
|
@@ -490,7 +617,7 @@ export async function twoFactorStatus(opts: AuthOptions = {}): Promise<number> {
|
|
|
490
617
|
method: 'GET',
|
|
491
618
|
credentials: 'same-origin',
|
|
492
619
|
});
|
|
493
|
-
if (!res.ok) throw new
|
|
620
|
+
if (!res.ok) throw new AuthError(AuthErrorCode.RequestFailed, 'The auth request failed.');
|
|
494
621
|
return new DataReader(new Uint8Array(await res.arrayBuffer())).readU8();
|
|
495
622
|
}
|
|
496
623
|
|
|
@@ -503,7 +630,7 @@ export async function confirmEmail(token: string, opts: AuthOptions = {}): Promi
|
|
|
503
630
|
'/confirm',
|
|
504
631
|
new DataWriter().writeBytes(fromHex(token)).toBytes(),
|
|
505
632
|
);
|
|
506
|
-
if (res.readU8() !== 0) throw new
|
|
633
|
+
if (res.readU8() !== 0) throw new ConfirmationInvalidError();
|
|
507
634
|
}
|
|
508
635
|
|
|
509
636
|
/** Ask the server to re-send the confirmation email. Resolves regardless of
|
|
@@ -551,7 +678,7 @@ export async function resetPassword(
|
|
|
551
678
|
'/reset/start',
|
|
552
679
|
new DataWriter().writeBytes(rawToken).writeBytes(blinded).toBytes(),
|
|
553
680
|
);
|
|
554
|
-
if (start.readU8() !== 0) throw new
|
|
681
|
+
if (start.readU8() !== 0) throw new PasswordResetInvalidError();
|
|
555
682
|
const username = start.readString();
|
|
556
683
|
const kdf = decodeKdf(start);
|
|
557
684
|
const evaluated = start.readBytes();
|
|
@@ -575,7 +702,8 @@ export async function resetPassword(
|
|
|
575
702
|
} finally {
|
|
576
703
|
wipe(seed);
|
|
577
704
|
}
|
|
578
|
-
if (publicKey.length !== PUBLIC_KEY_LEN)
|
|
705
|
+
if (publicKey.length !== PUBLIC_KEY_LEN)
|
|
706
|
+
throw new AuthError(AuthErrorCode.ProtocolError, 'Server returned a bad public key length.');
|
|
579
707
|
|
|
580
708
|
// 3. Consume the token + overwrite the stored login key.
|
|
581
709
|
const finish = await postBinary(
|
|
@@ -583,7 +711,7 @@ export async function resetPassword(
|
|
|
583
711
|
'/reset/finish',
|
|
584
712
|
new DataWriter().writeBytes(rawToken).writeBytes(publicKey).writeBytes(regProof).toBytes(),
|
|
585
713
|
);
|
|
586
|
-
if (finish.readU8() !== 0) throw new
|
|
714
|
+
if (finish.readU8() !== 0) throw new PasswordResetInvalidError();
|
|
587
715
|
}
|
|
588
716
|
|
|
589
717
|
/** The client auth surface, grouped for `Auth.register` / `Auth.login` use. */
|
|
@@ -601,4 +729,16 @@ export const Auth = {
|
|
|
601
729
|
TwoFactorMethod,
|
|
602
730
|
buildLoginMessage,
|
|
603
731
|
LOGIN_CONTEXT,
|
|
732
|
+
// Typed error surface: branch on `Auth.AuthErrorCode` or `instanceof Auth.<X>Error`.
|
|
733
|
+
AuthError,
|
|
734
|
+
AuthErrorCode,
|
|
735
|
+
UsernameTakenError,
|
|
736
|
+
EmailInUseError,
|
|
737
|
+
InvalidCredentialsError,
|
|
738
|
+
EmailNotConfirmedError,
|
|
739
|
+
TwoFactorRequiredError,
|
|
740
|
+
ServerAuthFailedError,
|
|
741
|
+
TwoFactorCodeError,
|
|
742
|
+
ConfirmationInvalidError,
|
|
743
|
+
PasswordResetInvalidError,
|
|
604
744
|
} as const;
|
package/src/client/index.ts
CHANGED
|
@@ -16,6 +16,19 @@ export {
|
|
|
16
16
|
login as authLogin,
|
|
17
17
|
buildLoginMessage,
|
|
18
18
|
LOGIN_CONTEXT,
|
|
19
|
+
// Typed auth errors + the discriminant enum: catch `AuthError` (or a specific
|
|
20
|
+
// subclass) and branch on `err.code === AuthErrorCode.*`, never on `err.name`.
|
|
21
|
+
AuthError,
|
|
22
|
+
AuthErrorCode,
|
|
23
|
+
UsernameTakenError,
|
|
24
|
+
EmailInUseError,
|
|
25
|
+
InvalidCredentialsError,
|
|
26
|
+
EmailNotConfirmedError,
|
|
27
|
+
TwoFactorRequiredError,
|
|
28
|
+
ServerAuthFailedError,
|
|
29
|
+
TwoFactorCodeError,
|
|
30
|
+
ConfirmationInvalidError,
|
|
31
|
+
PasswordResetInvalidError,
|
|
19
32
|
} from './auth.js';
|
|
20
33
|
export type { KdfParams, AuthOptions } from './auth.js';
|
|
21
34
|
export { Link } from './navigation/Link.js';
|
|
@@ -24,7 +24,13 @@ import { __resetDbForTests } from '../src/devserver/db/index.js';
|
|
|
24
24
|
import { __resetRatelimitForTests } from '../src/devserver/config/ratelimit.js';
|
|
25
25
|
import { clearEnvCache } from '../src/devserver/config/dotenv.js';
|
|
26
26
|
import { __sentEmails, __clearSentEmails } from '../src/devserver/email/index.js';
|
|
27
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
Auth,
|
|
29
|
+
AuthErrorCode,
|
|
30
|
+
EmailInUseError,
|
|
31
|
+
EmailNotConfirmedError,
|
|
32
|
+
TwoFactorRequiredError,
|
|
33
|
+
} from '../src/client/auth.js';
|
|
28
34
|
import { DataReader, DataWriter } from '../src/io/codec.js';
|
|
29
35
|
|
|
30
36
|
const EXAMPLE_WASM = path.resolve(
|
|
@@ -291,9 +297,13 @@ describe.skipIf(!haveWasm)('built-in auth: email verification + password reset (
|
|
|
291
297
|
'duplicate email is rejected at registration (distinct "email already in use")',
|
|
292
298
|
async () => {
|
|
293
299
|
await Auth.register('carol', 'carol-pw-strong', 'dupe@x.com');
|
|
294
|
-
|
|
295
|
-
|
|
300
|
+
// Typed error: a distinct EmailInUseError carrying the stable code, so a UI can
|
|
301
|
+
// branch reliably (never on the message/name string).
|
|
302
|
+
const err = await Auth.register('dave', 'dave-pw-strong', 'dupe@x.com').catch(
|
|
303
|
+
(e: unknown) => e,
|
|
296
304
|
);
|
|
305
|
+
expect(err).toBeInstanceOf(EmailInUseError);
|
|
306
|
+
expect((err as EmailInUseError).code).toBe(AuthErrorCode.EmailInUse);
|
|
297
307
|
},
|
|
298
308
|
60_000,
|
|
299
309
|
);
|