@tinyrack/issuary-server 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/terms-content.entity.d.ts +9 -0
- package/dist/entities/terms-content.entity.d.ts.map +1 -1
- package/dist/entities/terms.entity.d.ts +9 -0
- package/dist/entities/terms.entity.d.ts.map +1 -1
- package/dist/entities/terms.entity.js +4 -0
- package/dist/entities/terms.entity.js.map +1 -1
- package/dist/entities/user-terms-consent.entity.d.ts +9 -0
- package/dist/entities/user-terms-consent.entity.d.ts.map +1 -1
- package/dist/entrypoints/app.d.ts +598 -3
- package/dist/entrypoints/app.d.ts.map +1 -1
- package/dist/entrypoints/database/postgres/compiled-functions.d.ts +19 -16
- package/dist/entrypoints/database/postgres/compiled-functions.d.ts.map +1 -1
- package/dist/entrypoints/database/postgres/compiled-functions.js +133 -76
- package/dist/entrypoints/database/postgres/compiled-functions.js.map +1 -1
- package/dist/entrypoints/database/sqlite/compiled-functions.d.ts +19 -16
- package/dist/entrypoints/database/sqlite/compiled-functions.d.ts.map +1 -1
- package/dist/entrypoints/database/sqlite/compiled-functions.js +133 -76
- package/dist/entrypoints/database/sqlite/compiled-functions.js.map +1 -1
- package/dist/lib/config/branding.d.ts +5 -0
- package/dist/lib/config/branding.d.ts.map +1 -1
- package/dist/lib/config/branding.js +23 -1
- package/dist/lib/config/branding.js.map +1 -1
- package/dist/lib/config/resolved.d.ts +3 -0
- package/dist/lib/config/resolved.d.ts.map +1 -1
- package/dist/lib/interpolate-html.d.ts +3 -3
- package/dist/lib/interpolate-html.js +3 -3
- package/dist/lib/interpolate-html.js.map +1 -1
- package/dist/migrations/postgres/Migration20260827090000_archive_terms.d.ts +6 -0
- package/dist/migrations/postgres/Migration20260827090000_archive_terms.d.ts.map +1 -0
- package/dist/migrations/postgres/Migration20260827090000_archive_terms.js +12 -0
- package/dist/migrations/postgres/Migration20260827090000_archive_terms.js.map +1 -0
- package/dist/migrations/postgres/index.d.ts.map +1 -1
- package/dist/migrations/postgres/index.js +2 -0
- package/dist/migrations/postgres/index.js.map +1 -1
- package/dist/migrations/sqlite/Migration20260827090000_archive_terms.d.ts +6 -0
- package/dist/migrations/sqlite/Migration20260827090000_archive_terms.d.ts.map +1 -0
- package/dist/migrations/sqlite/Migration20260827090000_archive_terms.js +12 -0
- package/dist/migrations/sqlite/Migration20260827090000_archive_terms.js.map +1 -0
- package/dist/migrations/sqlite/index.d.ts.map +1 -1
- package/dist/migrations/sqlite/index.js +2 -0
- package/dist/migrations/sqlite/index.js.map +1 -1
- package/dist/repositories/terms.repository.d.ts.map +1 -1
- package/dist/repositories/terms.repository.js +1 -1
- package/dist/repositories/terms.repository.js.map +1 -1
- package/dist/routes/api/admin/console/index.d.ts +523 -0
- package/dist/routes/api/admin/console/index.d.ts.map +1 -0
- package/dist/routes/api/admin/console/index.js +212 -0
- package/dist/routes/api/admin/console/index.js.map +1 -0
- package/dist/routes/api/admin/index.d.ts +584 -0
- package/dist/routes/api/admin/index.d.ts.map +1 -1
- package/dist/routes/api/admin/index.js +3 -1
- package/dist/routes/api/admin/index.js.map +1 -1
- package/dist/routes/api/admin/users/index.d.ts +64 -0
- package/dist/routes/api/admin/users/index.d.ts.map +1 -1
- package/dist/routes/api/admin/users/index.js +47 -0
- package/dist/routes/api/admin/users/index.js.map +1 -1
- package/dist/routes/api/config/get.d.ts +10 -3
- package/dist/routes/api/config/get.d.ts.map +1 -1
- package/dist/routes/api/config/get.js +3 -0
- package/dist/routes/api/config/get.js.map +1 -1
- package/dist/routes/api/config/index.d.ts +10 -3
- package/dist/routes/api/config/index.d.ts.map +1 -1
- package/dist/routes/api/index.d.ts +594 -3
- package/dist/routes/api/index.d.ts.map +1 -1
- package/dist/routes/index.d.ts +594 -3
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/schemas/response.d.ts +4 -1
- package/dist/schemas/response.d.ts.map +1 -1
- package/dist/schemas/response.js +11 -2
- package/dist/schemas/response.js.map +1 -1
- package/dist/services/admin-console.service.d.ts +407 -0
- package/dist/services/admin-console.service.d.ts.map +1 -0
- package/dist/services/admin-console.service.js +377 -0
- package/dist/services/admin-console.service.js.map +1 -0
- package/dist/services/container.d.ts +5 -0
- package/dist/services/container.d.ts.map +1 -1
- package/dist/services/container.js +3 -0
- package/dist/services/container.js.map +1 -1
- package/dist/services/user.service.d.ts +21 -0
- package/dist/services/user.service.d.ts.map +1 -1
- package/dist/services/user.service.js +65 -1
- package/dist/services/user.service.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/2fa-BowFczF7.js +2 -0
- package/public/assets/2fa-BowFczF7.js.map +1 -0
- package/public/assets/2fa-C_pA-n2i.js +2 -0
- package/public/assets/{2fa-DFTcWEMb.js.map → 2fa-C_pA-n2i.js.map} +1 -1
- package/public/assets/2fa-Cpfhakvn.js +2 -0
- package/public/assets/{2fa-huNZDYU9.js.map → 2fa-Cpfhakvn.js.map} +1 -1
- package/public/assets/2fa-o1a13VHx.js +2 -0
- package/public/assets/2fa-o1a13VHx.js.map +1 -0
- package/public/assets/FieldControl-ShLuCjvG.js +2 -0
- package/public/assets/FieldControl-ShLuCjvG.js.map +1 -0
- package/public/assets/Separator-C6MmGAmP.js +2 -0
- package/public/assets/Separator-C6MmGAmP.js.map +1 -0
- package/public/assets/admin-_jFLs8Ve.js +2 -0
- package/public/assets/admin-_jFLs8Ve.js.map +1 -0
- package/public/assets/admin-shell-B91U4-Ro.js +2 -0
- package/public/assets/admin-shell-B91U4-Ro.js.map +1 -0
- package/public/assets/alert-D3aaK-_3.js +2 -0
- package/public/assets/alert-D3aaK-_3.js.map +1 -0
- package/public/assets/alert-kRxM1xsM.js +2 -0
- package/public/assets/alert-kRxM1xsM.js.map +1 -0
- package/public/assets/auth-choice-row-h4heOMHs.js +2 -0
- package/public/assets/auth-choice-row-h4heOMHs.js.map +1 -0
- package/public/assets/auth-field-BpJ4AHtU.js +2 -0
- package/public/assets/{auth-field-CWyXGKoC.js.map → auth-field-BpJ4AHtU.js.map} +1 -1
- package/public/assets/auth-footer-Du6S-oDG.js +2 -0
- package/public/assets/auth-footer-Du6S-oDG.js.map +1 -0
- package/public/assets/auth-layout-BdRRr0vT.js +2 -0
- package/public/assets/auth-layout-BdRRr0vT.js.map +1 -0
- package/public/assets/auth-page-header-ChaCNNrn.js +2 -0
- package/public/assets/{auth-page-header-DgGAaIiP.js.map → auth-page-header-ChaCNNrn.js.map} +1 -1
- package/public/assets/authorization-context-banner-zVxGX5e8.js +2 -0
- package/public/assets/{authorization-context-banner-DznMDPOX.js.map → authorization-context-banner-zVxGX5e8.js.map} +1 -1
- package/public/assets/avatar-BxTPQIDp.js +2 -0
- package/public/assets/{avatar-D-FRGa1m.js.map → avatar-BxTPQIDp.js.map} +1 -1
- package/public/assets/badge-B8D0Q2qq.js +2 -0
- package/public/assets/{badge-CsOfUji0.js.map → badge-B8D0Q2qq.js.map} +1 -1
- package/public/assets/checkbox-DTPGfvmq.js +2 -0
- package/public/assets/{checkbox-C90dDDza.js.map → checkbox-DTPGfvmq.js.map} +1 -1
- package/public/assets/{circle-check-6QTLhwM_.js → circle-check-Cnzuu7xR.js} +2 -2
- package/public/assets/{circle-check-6QTLhwM_.js.map → circle-check-Cnzuu7xR.js.map} +1 -1
- package/public/assets/clients-DLqy7K3N.js +5 -0
- package/public/assets/clients-DLqy7K3N.js.map +1 -0
- package/public/assets/config-C18-l7z7.js +2 -0
- package/public/assets/config-C18-l7z7.js.map +1 -0
- package/public/assets/{consent-RtCi_85E.js → consent-BWniDzI3.js} +2 -2
- package/public/assets/{consent-RtCi_85E.js.map → consent-BWniDzI3.js.map} +1 -1
- package/public/assets/consent-r_tX8DTb.js +2 -0
- package/public/assets/{consent-B9sQEyO8.js.map → consent-r_tX8DTb.js.map} +1 -1
- package/public/assets/{createLucideIcon-BPpAIXR_.js → createLucideIcon-D-yizrWN.js} +2 -2
- package/public/assets/{createLucideIcon-BPpAIXR_.js.map → createLucideIcon-D-yizrWN.js.map} +1 -1
- package/public/assets/design-system-rich-text-B3NzIRoJ.js +2 -0
- package/public/assets/design-system-rich-text-B3NzIRoJ.js.map +1 -0
- package/public/assets/email-Bx9JlWp3.js +2 -0
- package/public/assets/email-Bx9JlWp3.js.map +1 -0
- package/public/assets/email-Cpfhakvn.js +2 -0
- package/public/assets/email-Cpfhakvn.js.map +1 -0
- package/public/assets/error-DDY8m_Px.js +2 -0
- package/public/assets/error-DDY8m_Px.js.map +1 -0
- package/public/assets/field-CsrUbl__.js +3 -0
- package/public/assets/field-CsrUbl__.js.map +1 -0
- package/public/assets/{fingerprint-pattern-DP62Vk8x.js → fingerprint-pattern-BwUoN1_w.js} +2 -2
- package/public/assets/{fingerprint-pattern-DP62Vk8x.js.map → fingerprint-pattern-BwUoN1_w.js.map} +1 -1
- package/public/assets/forgot-Cpfhakvn.js +2 -0
- package/public/assets/forgot-Cpfhakvn.js.map +1 -0
- package/public/assets/forgot-u52JMu6e.js +2 -0
- package/public/assets/forgot-u52JMu6e.js.map +1 -0
- package/public/assets/form-sJw-V9wb.js +2 -0
- package/public/assets/form-sJw-V9wb.js.map +1 -0
- package/public/assets/index-8mX6CKcW.css +2 -0
- package/public/assets/index-lTEyHSus.js +11 -0
- package/public/assets/index-lTEyHSus.js.map +1 -0
- package/public/assets/initial-avatar-WMjxW3Zz.js +2 -0
- package/public/assets/initial-avatar-WMjxW3Zz.js.map +1 -0
- package/public/assets/input-QvBxPgy5.js +2 -0
- package/public/assets/{input-CxVeC8Pn.js.map → input-QvBxPgy5.js.map} +1 -1
- package/public/assets/{key-round-CdvHb8vT.js → key-round-BxWppK6h.js} +2 -2
- package/public/assets/{key-round-CdvHb8vT.js.map → key-round-BxWppK6h.js.map} +1 -1
- package/public/assets/labeled-separator-DdkyYDWH.js +2 -0
- package/public/assets/labeled-separator-DdkyYDWH.js.map +1 -0
- package/public/assets/link-BHmn75Zo.js +2 -0
- package/public/assets/{link-C-WdTj3F.js.map → link-BHmn75Zo.js.map} +1 -1
- package/public/assets/{lock-7NRyvXBS.js → lock-8wpR2C78.js} +2 -2
- package/public/assets/{lock-7NRyvXBS.js.map → lock-8wpR2C78.js.map} +1 -1
- package/public/assets/login-Cpfhakvn.js +2 -0
- package/public/assets/login-Cpfhakvn.js.map +1 -0
- package/public/assets/login-DRcHjJ2-.js +2 -0
- package/public/assets/login-DRcHjJ2-.js.map +1 -0
- package/public/assets/logout-Dphj1d_0.js +2 -0
- package/public/assets/logout-Dphj1d_0.js.map +1 -0
- package/public/assets/{mail-D0B_1Dzd.js → mail-DVP_XMUi.js} +2 -2
- package/public/assets/{mail-D0B_1Dzd.js.map → mail-DVP_XMUi.js.map} +1 -1
- package/public/assets/modal-JuaLVSyx.js +2 -0
- package/public/assets/modal-JuaLVSyx.js.map +1 -0
- package/public/assets/mutationOptions-Cv_vJkJn.js +2 -0
- package/public/assets/{mutationOptions-DyYFUbyn.js.map → mutationOptions-Cv_vJkJn.js.map} +1 -1
- package/public/assets/passkey-CObBlfKK.js +2 -0
- package/public/assets/passkey-CObBlfKK.js.map +1 -0
- package/public/assets/{passkey-J1qnYp9A.js → passkey-CWTjw19S.js} +2 -2
- package/public/assets/{passkey-J1qnYp9A.js.map → passkey-CWTjw19S.js.map} +1 -1
- package/public/assets/passkey-CavITajY.js +2 -0
- package/public/assets/passkey-CavITajY.js.map +1 -0
- package/public/assets/passkey-Cpfhakvn.js +2 -0
- package/public/assets/passkey-Cpfhakvn.js.map +1 -0
- package/public/assets/{passkey-error-ZqqPQUta.js → passkey-error-CZ26Ss-I.js} +2 -2
- package/public/assets/{passkey-error-ZqqPQUta.js.map → passkey-error-CZ26Ss-I.js.map} +1 -1
- package/public/assets/password-Cpfhakvn.js +2 -0
- package/public/assets/password-Cpfhakvn.js.map +1 -0
- package/public/assets/password-Dk8PwtZN.js +2 -0
- package/public/assets/password-Dk8PwtZN.js.map +1 -0
- package/public/assets/password-reset-BcFpGOop.js +2 -0
- package/public/assets/{password-reset-sU5KkBKi.js.map → password-reset-BcFpGOop.js.map} +1 -1
- package/public/assets/password-strength-Bgvy7kz6.js +2 -0
- package/public/assets/{password-strength-BIPcWiM_.js.map → password-strength-Bgvy7kz6.js.map} +1 -1
- package/public/assets/pin-input-DhsRO4Ei.js +2 -0
- package/public/assets/{pin-input-CITrr-Yc.js.map → pin-input-DhsRO4Ei.js.map} +1 -1
- package/public/assets/profile-PjXEnzA-.js +2 -0
- package/public/assets/profile-PjXEnzA-.js.map +1 -0
- package/public/assets/profile-k66ruDWl.js +2 -0
- package/public/assets/{profile-BHPL9Px_.js.map → profile-k66ruDWl.js.map} +1 -1
- package/public/assets/provider-mark-CeYazOfu.js +2 -0
- package/public/assets/provider-mark-CeYazOfu.js.map +1 -0
- package/public/assets/recovery-hdRyezmb.js +2 -0
- package/public/assets/recovery-hdRyezmb.js.map +1 -0
- package/public/assets/register-Cpfhakvn.js +2 -0
- package/public/assets/register-Cpfhakvn.js.map +1 -0
- package/public/assets/register-DMgKT_fm.js +2 -0
- package/public/assets/register-DMgKT_fm.js.map +1 -0
- package/public/assets/reset-Cpfhakvn.js +2 -0
- package/public/assets/reset-Cpfhakvn.js.map +1 -0
- package/public/assets/reset-DBu3wYpE.js +2 -0
- package/public/assets/reset-DBu3wYpE.js.map +1 -0
- package/public/assets/select-5LheSsRl.js +2 -0
- package/public/assets/select-5LheSsRl.js.map +1 -0
- package/public/assets/select-Cpfhakvn.js +2 -0
- package/public/assets/{select-huNZDYU9.js.map → select-Cpfhakvn.js.map} +1 -1
- package/public/assets/separator-CMGc2Y1q.js +2 -0
- package/public/assets/separator-CMGc2Y1q.js.map +1 -0
- package/public/assets/settings-BVe4k3kJ.js +2 -0
- package/public/assets/settings-BVe4k3kJ.js.map +1 -0
- package/public/assets/shell-header-bar-CdOEWmCT.js +2 -0
- package/public/assets/shell-header-bar-CdOEWmCT.js.map +1 -0
- package/public/assets/{shield-check-D_p8H0ni.js → shield-check-DpYF8yeI.js} +2 -2
- package/public/assets/{shield-check-D_p8H0ni.js.map → shield-check-DpYF8yeI.js.map} +1 -1
- package/public/assets/standard-schema-C50nwAaQ.js +2 -0
- package/public/assets/{standard-schema-e8gtSzGE.js.map → standard-schema-C50nwAaQ.js.map} +1 -1
- package/public/assets/system-BoUqxc5h.js +2 -0
- package/public/assets/system-BoUqxc5h.js.map +1 -0
- package/public/assets/table-Dl89o43x.js +2 -0
- package/public/assets/table-Dl89o43x.js.map +1 -0
- package/public/assets/terms-B2wWfx1d.js +2 -0
- package/public/assets/terms-B2wWfx1d.js.map +1 -0
- package/public/assets/terms-COr3cDw5.js +2 -0
- package/public/assets/terms-COr3cDw5.js.map +1 -0
- package/public/assets/terms-checkbox-list-C9TkDC8Y.js +2 -0
- package/public/assets/terms-checkbox-list-C9TkDC8Y.js.map +1 -0
- package/public/assets/terms-k66ruDWl.js +2 -0
- package/public/assets/terms-k66ruDWl.js.map +1 -0
- package/public/assets/totp-BJycMMTC.js +2 -0
- package/public/assets/totp-BJycMMTC.js.map +1 -0
- package/public/assets/{totp-BNZ904Zm.js → totp-BhElob6P.js} +2 -2
- package/public/assets/{totp-BNZ904Zm.js.map → totp-BhElob6P.js.map} +1 -1
- package/public/assets/totp-C1ba10Is.js +2 -0
- package/public/assets/totp-C1ba10Is.js.map +1 -0
- package/public/assets/{trash-2-DZdKBLvC.js → trash-2-B3NVE8pR.js} +2 -2
- package/public/assets/{trash-2-DZdKBLvC.js.map → trash-2-B3NVE8pR.js.map} +1 -1
- package/public/assets/{triangle-alert-CqNn0kPs.js → triangle-alert-DATO9o3k.js} +2 -2
- package/public/assets/{triangle-alert-CqNn0kPs.js.map → triangle-alert-DATO9o3k.js.map} +1 -1
- package/public/assets/use-admin-selection-D2b7jnym.js +2 -0
- package/public/assets/use-admin-selection-D2b7jnym.js.map +1 -0
- package/public/assets/use-totp-setup-KOVNS2DC.js +3 -0
- package/public/assets/use-totp-setup-KOVNS2DC.js.map +1 -0
- package/public/assets/useAriaLabelledBy-CF3crxLc.js +2 -0
- package/public/assets/{useAriaLabelledBy-IIwdHUss.js.map → useAriaLabelledBy-CF3crxLc.js.map} +1 -1
- package/public/assets/useMutation-DqIIIiBW.js +2 -0
- package/public/assets/{useMutation-BWZ0G4Td.js.map → useMutation-DqIIIiBW.js.map} +1 -1
- package/public/assets/useQuery-CLr9TaKA.js +2 -0
- package/public/assets/{useQuery-Ccv_nzQl.js.map → useQuery-CLr9TaKA.js.map} +1 -1
- package/public/assets/users-BQQQm353.js +2 -0
- package/public/assets/users-BQQQm353.js.map +1 -0
- package/public/assets/{zod-C87S6Tec.js → zod-Dszyrytb.js} +2 -2
- package/public/assets/{zod-C87S6Tec.js.map → zod-Dszyrytb.js.map} +1 -1
- package/public/index.html +6 -6
- package/public/issuary-app-icon-512.png +0 -0
- package/public/issuary-app-icon.svg +8 -0
- package/public/assets/2fa-C9wUlSBS.js +0 -2
- package/public/assets/2fa-C9wUlSBS.js.map +0 -1
- package/public/assets/2fa-DFTcWEMb.js +0 -2
- package/public/assets/2fa-TtshNxXv.js +0 -2
- package/public/assets/2fa-TtshNxXv.js.map +0 -1
- package/public/assets/2fa-huNZDYU9.js +0 -2
- package/public/assets/DialogHandle-DICBMcjK.js +0 -2
- package/public/assets/DialogHandle-DICBMcjK.js.map +0 -1
- package/public/assets/FieldItemContext-BeNfhOsU.js +0 -2
- package/public/assets/FieldItemContext-BeNfhOsU.js.map +0 -1
- package/public/assets/admin-CFZaO1bM.js +0 -2
- package/public/assets/admin-CFZaO1bM.js.map +0 -1
- package/public/assets/admin-users-BK_BN8jm.js +0 -2
- package/public/assets/admin-users-BK_BN8jm.js.map +0 -1
- package/public/assets/alert-leqyvHOp.js +0 -2
- package/public/assets/alert-leqyvHOp.js.map +0 -1
- package/public/assets/auth-choice-row-CXuyJgkR.js +0 -2
- package/public/assets/auth-choice-row-CXuyJgkR.js.map +0 -1
- package/public/assets/auth-field-CWyXGKoC.js +0 -2
- package/public/assets/auth-footer-Cz5ivsDc.js +0 -2
- package/public/assets/auth-footer-Cz5ivsDc.js.map +0 -1
- package/public/assets/auth-layout-CiNn2-Nb.js +0 -2
- package/public/assets/auth-layout-CiNn2-Nb.js.map +0 -1
- package/public/assets/auth-page-header-DgGAaIiP.js +0 -2
- package/public/assets/authorization-context-banner-DznMDPOX.js +0 -2
- package/public/assets/avatar-D-FRGa1m.js +0 -2
- package/public/assets/badge-CsOfUji0.js +0 -2
- package/public/assets/checkbox-C90dDDza.js +0 -2
- package/public/assets/chevron-right-CN0jUyV0.js +0 -2
- package/public/assets/chevron-right-CN0jUyV0.js.map +0 -1
- package/public/assets/config-DTQCUlfZ.js +0 -2
- package/public/assets/config-DTQCUlfZ.js.map +0 -1
- package/public/assets/consent-B9sQEyO8.js +0 -2
- package/public/assets/email-8RKQzeig.js +0 -2
- package/public/assets/email-8RKQzeig.js.map +0 -1
- package/public/assets/email-huNZDYU9.js +0 -2
- package/public/assets/email-huNZDYU9.js.map +0 -1
- package/public/assets/error-BYe3gUMO.js +0 -2
- package/public/assets/error-BYe3gUMO.js.map +0 -1
- package/public/assets/field-BMT214_m.js +0 -3
- package/public/assets/field-BMT214_m.js.map +0 -1
- package/public/assets/forgot-BenoOUxC.js +0 -2
- package/public/assets/forgot-BenoOUxC.js.map +0 -1
- package/public/assets/forgot-huNZDYU9.js +0 -2
- package/public/assets/forgot-huNZDYU9.js.map +0 -1
- package/public/assets/index-CKpnrw9M.js +0 -11
- package/public/assets/index-CKpnrw9M.js.map +0 -1
- package/public/assets/index-Ct9o0oCZ.css +0 -2
- package/public/assets/initial-avatar-E5DK9Igm.js +0 -2
- package/public/assets/initial-avatar-E5DK9Igm.js.map +0 -1
- package/public/assets/input-CxVeC8Pn.js +0 -2
- package/public/assets/labeled-separator-CV7nb0XW.js +0 -2
- package/public/assets/labeled-separator-CV7nb0XW.js.map +0 -1
- package/public/assets/link-C-WdTj3F.js +0 -2
- package/public/assets/login-1YuiZD30.js +0 -2
- package/public/assets/login-1YuiZD30.js.map +0 -1
- package/public/assets/login-huNZDYU9.js +0 -2
- package/public/assets/login-huNZDYU9.js.map +0 -1
- package/public/assets/logout-B5T52P8u.js +0 -2
- package/public/assets/logout-B5T52P8u.js.map +0 -1
- package/public/assets/modal-tByFpy18.js +0 -2
- package/public/assets/modal-tByFpy18.js.map +0 -1
- package/public/assets/mutationOptions-DyYFUbyn.js +0 -2
- package/public/assets/passkey-CgAHaQ1p.js +0 -2
- package/public/assets/passkey-CgAHaQ1p.js.map +0 -1
- package/public/assets/passkey-huNZDYU9.js +0 -2
- package/public/assets/passkey-huNZDYU9.js.map +0 -1
- package/public/assets/passkey-v9Pzv-4A.js +0 -2
- package/public/assets/passkey-v9Pzv-4A.js.map +0 -1
- package/public/assets/password-Cuh9Hnjp.js +0 -2
- package/public/assets/password-Cuh9Hnjp.js.map +0 -1
- package/public/assets/password-huNZDYU9.js +0 -2
- package/public/assets/password-huNZDYU9.js.map +0 -1
- package/public/assets/password-reset-sU5KkBKi.js +0 -2
- package/public/assets/password-strength-BIPcWiM_.js +0 -2
- package/public/assets/pin-input-CITrr-Yc.js +0 -2
- package/public/assets/plus-DSBBSrgj.js +0 -2
- package/public/assets/plus-DSBBSrgj.js.map +0 -1
- package/public/assets/profile-BHPL9Px_.js +0 -2
- package/public/assets/profile-C8KaELVe.js +0 -2
- package/public/assets/profile-C8KaELVe.js.map +0 -1
- package/public/assets/provider-logos-u1YURWQr.js +0 -2
- package/public/assets/provider-logos-u1YURWQr.js.map +0 -1
- package/public/assets/recovery-CVROV9nj.js +0 -2
- package/public/assets/recovery-CVROV9nj.js.map +0 -1
- package/public/assets/register-cpxjX3qr.js +0 -2
- package/public/assets/register-cpxjX3qr.js.map +0 -1
- package/public/assets/register-huNZDYU9.js +0 -2
- package/public/assets/register-huNZDYU9.js.map +0 -1
- package/public/assets/reset-huNZDYU9.js +0 -2
- package/public/assets/reset-huNZDYU9.js.map +0 -1
- package/public/assets/reset-iNqYdsoa.js +0 -2
- package/public/assets/reset-iNqYdsoa.js.map +0 -1
- package/public/assets/select-DdjQtcLJ.js +0 -2
- package/public/assets/select-DdjQtcLJ.js.map +0 -1
- package/public/assets/select-huNZDYU9.js +0 -2
- package/public/assets/separator-B0Bvh1he.js +0 -2
- package/public/assets/separator-B0Bvh1he.js.map +0 -1
- package/public/assets/shell-header-bar-JcFhS7mb.js +0 -2
- package/public/assets/shell-header-bar-JcFhS7mb.js.map +0 -1
- package/public/assets/standard-schema-e8gtSzGE.js +0 -2
- package/public/assets/terms-BHPL9Px_.js +0 -2
- package/public/assets/terms-BHPL9Px_.js.map +0 -1
- package/public/assets/terms-BjwMWDFp.js +0 -2
- package/public/assets/terms-BjwMWDFp.js.map +0 -1
- package/public/assets/terms-checkbox-list-DNOq4Pb2.js +0 -2
- package/public/assets/terms-checkbox-list-DNOq4Pb2.js.map +0 -1
- package/public/assets/totp-D_EWG1h8.js +0 -2
- package/public/assets/totp-D_EWG1h8.js.map +0 -1
- package/public/assets/totp-DetFwOkk.js +0 -2
- package/public/assets/totp-DetFwOkk.js.map +0 -1
- package/public/assets/use-totp-setup-DtlgPUPJ.js +0 -3
- package/public/assets/use-totp-setup-DtlgPUPJ.js.map +0 -1
- package/public/assets/useAriaLabelledBy-IIwdHUss.js +0 -2
- package/public/assets/useMutation-BWZ0G4Td.js +0 -2
- package/public/assets/useQuery-Ccv_nzQl.js +0 -2
- package/public/assets/users-B1gvPM_x.js +0 -2
- package/public/assets/users-B1gvPM_x.js.map +0 -1
- package/public/vite.svg +0 -1
package/public/assets/{password-strength-BIPcWiM_.js.map → password-strength-Bgvy7kz6.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-strength-BIPcWiM_.js","names":["_formatErrorMessage","Meter.Indicator","Meter.Label","Meter.Root","Meter.Track","Meter.Value"],"sources":["../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/root/MeterRootContext.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/root/MeterRoot.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/track/MeterTrack.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/indicator/MeterIndicator.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/value/MeterValue.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/label/MeterLabel.mjs","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-indicator.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-label.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-root.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-track.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-value.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/index.js","../../../frontend/src/components/auth/password-strength.tsx"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MeterRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MeterRootContext.displayName = \"MeterRootContext\";\nexport function useMeterRootContext() {\n const context = React.useContext(MeterRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.' : _formatErrorMessage(38));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\nimport { MeterRootContext } from \"./MeterRootContext.mjs\";\nimport { formatNumber } from \"../../utils/formatNumber.mjs\";\nimport { valueToPercent } from \"../../utils/valueToPercent.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Groups all parts of the meter and provides the value for screen readers.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MeterRoot = /*#__PURE__*/React.forwardRef(function MeterRoot(componentProps, forwardedRef) {\n const {\n format,\n getAriaValueText,\n locale,\n max = 100,\n min = 0,\n value: valueProp,\n render,\n className,\n children,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n\n // `clamp` handles infinity, but NaN needs an explicit fallback before normalizing range outputs.\n const rawPercentage = valueToPercent(valueProp, min, max);\n const percentageValue = clamp(Number.isNaN(rawPercentage) ? 0 : rawPercentage, 0, 100);\n const clampedValue = clamp(Number.isNaN(valueProp) ? min : valueProp, min, max);\n\n // Format the clamped value so visible and accessible text stay in sync with `aria-valuenow` and\n // the indicator fill. The raw value remains available as the second `getAriaValueText` argument.\n const formattedValue = format ? formatNumber(clampedValue, locale, format) : formatNumber(percentageValue / 100, locale, {\n style: 'percent'\n });\n let ariaValuetext = formattedValue;\n if (getAriaValueText) {\n ariaValuetext = getAriaValueText(formattedValue, valueProp);\n }\n const defaultProps = {\n 'aria-labelledby': labelId,\n 'aria-valuemax': max,\n 'aria-valuemin': min,\n 'aria-valuenow': clampedValue,\n 'aria-valuetext': ariaValuetext,\n role: 'meter',\n children: /*#__PURE__*/_jsxs(React.Fragment, {\n children: [children, /*#__PURE__*/_jsx(\"span\", {\n role: \"presentation\",\n style: visuallyHidden,\n children: \"x\"\n })]\n })\n };\n const contextValue = React.useMemo(() => ({\n formattedValue,\n percentageValue,\n setLabelId,\n value: valueProp\n }), [formattedValue, percentageValue, setLabelId, valueProp]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [defaultProps, elementProps]\n });\n return /*#__PURE__*/_jsx(MeterRootContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterRoot.displayName = \"MeterRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Contains the meter indicator and represents the entire range of the meter.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterTrack = /*#__PURE__*/React.forwardRef(function MeterTrack(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: elementProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterTrack.displayName = \"MeterTrack\";","'use client';\n\nimport * as React from 'react';\nimport { useMeterRootContext } from \"../root/MeterRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Visualizes the position of the value along the range.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterIndicator = /*#__PURE__*/React.forwardRef(function MeterIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n percentageValue\n } = useMeterRootContext();\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n style: {\n insetInlineStart: 0,\n height: 'inherit',\n width: `${percentageValue}%`\n }\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterIndicator.displayName = \"MeterIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { useMeterRootContext } from \"../root/MeterRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A text element displaying the current value.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterValue = /*#__PURE__*/React.forwardRef(function MeterValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children,\n style,\n ...elementProps\n } = componentProps;\n const {\n value,\n formattedValue\n } = useMeterRootContext();\n return useRenderElement('span', componentProps, {\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: typeof children === 'function' ? children(formattedValue, value) : formattedValue\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterValue.displayName = \"MeterValue\";","'use client';\n\nimport * as React from 'react';\nimport { useMeterRootContext } from \"../root/MeterRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useRegisteredLabelId } from \"../../utils/useRegisteredLabelId.mjs\";\n\n/**\n * An accessible label for the meter.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterLabel = /*#__PURE__*/React.forwardRef(function MeterLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useMeterRootContext();\n const id = useRegisteredLabelId(idProp, setLabelId);\n return useRenderElement('span', componentProps, {\n ref: forwardedRef,\n props: [{\n id,\n role: 'presentation'\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterLabel.displayName = \"MeterLabel\";","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-indicator.tsx\nconst TRMeterIndicator = createComponentPart(Meter.Indicator, \"tr-meter-indicator\");\n//#endregion\nexport { TRMeterIndicator };\n\n//# sourceMappingURL=meter-indicator.js.map","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-label.tsx\nconst TRMeterLabel = createComponentPart(Meter.Label, \"tr-meter-label\");\n//#endregion\nexport { TRMeterLabel };\n\n//# sourceMappingURL=meter-label.js.map","\"use client\";\nimport { mergeComponentClassName } from \"../../internal/component-class-name.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-root.tsx\nfunction TRMeterRoot({ className, max = 100, min = 0, value, variant = \"neutral\", ...props }) {\n\tconst clampedValue = Math.min(max, Math.max(min, Number.isNaN(value) ? min : value));\n\treturn /* @__PURE__ */ jsx(Meter.Root, {\n\t\t...props,\n\t\tclassName: mergeComponentClassName(\"tr-meter\", className),\n\t\t\"data-variant\": variant,\n\t\tmax,\n\t\tmin,\n\t\tvalue: clampedValue\n\t});\n}\n//#endregion\nexport { TRMeterRoot };\n\n//# sourceMappingURL=meter-root.js.map","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-track.tsx\nconst TRMeterTrack = createComponentPart(Meter.Track, \"tr-meter-track\");\n//#endregion\nexport { TRMeterTrack };\n\n//# sourceMappingURL=meter-track.js.map","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-value.tsx\nconst TRMeterValue = createComponentPart(Meter.Value, \"tr-meter-value\");\n//#endregion\nexport { TRMeterValue };\n\n//# sourceMappingURL=meter-value.js.map","import { TRMeterIndicator } from \"./meter-indicator.js\";\nimport { TRMeterLabel } from \"./meter-label.js\";\nimport { TRMeterRoot } from \"./meter-root.js\";\nimport { TRMeterTrack } from \"./meter-track.js\";\nimport { TRMeterValue } from \"./meter-value.js\";\n//#region src/components/meter/index.tsx\nconst TRMeter = {\n\tRoot: TRMeterRoot,\n\tTrack: TRMeterTrack,\n\tIndicator: TRMeterIndicator,\n\tValue: TRMeterValue,\n\tLabel: TRMeterLabel\n};\n//#endregion\nexport { TRMeter, TRMeterIndicator, TRMeterLabel, TRMeterRoot, TRMeterTrack, TRMeterValue };\n\n//# sourceMappingURL=index.js.map","import { TRMeter } from '@tinyrack/ui/components/meter';\nimport { TRText } from '@tinyrack/ui/components/text';\nimport { useTranslation } from 'react-i18next';\n\ntype PasswordPolicy = {\n min_length: number;\n max_length: number;\n};\n\ntype PasswordStrengthProps = {\n password: string;\n policy: PasswordPolicy;\n};\n\nconst LEVELS = ['weak', 'fair', 'good', 'strong'] as const;\n\nconst VARIANTS = {\n weak: 'danger',\n fair: 'warning',\n good: 'info',\n strong: 'success',\n} as const;\n\n/**\n * Scores a password 1-4 for feedback only.\n *\n * Deliberately simple: length against the deployment's own policy plus\n * character-class variety. The server is the authority on what is acceptable,\n * so this only needs to steer the user, and a full entropy estimator would be\n * a large dependency for a hint bar.\n *\n * Returns 0 for \"nothing to say yet\" so the caller can stay silent.\n */\nfunction scorePassword(password: string, policy: PasswordPolicy): number {\n if (password.length === 0) {\n return 0;\n }\n if (password.length < policy.min_length) {\n return 1;\n }\n\n const classes = [/[a-z]/, /[A-Z]/, /\\d/, /[^a-zA-Z0-9]/].filter((pattern) =>\n pattern.test(password),\n ).length;\n\n const isLong = password.length >= policy.min_length + 4;\n\n if (classes >= 3 && isLong) {\n return 4;\n }\n if (classes >= 2 && isLong) {\n return 3;\n }\n return 2;\n}\n\n/**\n * Strength hint under a new-password field.\n *\n * Renders nothing for an empty field so the form does not shift as soon as it\n * is focused. Announced politely rather than assertively — it updates on every\n * keystroke and should not interrupt typing.\n */\nexport function PasswordStrength({ password, policy }: PasswordStrengthProps) {\n const { t } = useTranslation();\n const score = scorePassword(password, policy);\n\n if (score === 0) {\n return null;\n }\n\n const level = LEVELS[score - 1];\n\n return (\n <TRMeter.Root\n aria-live=\"polite\"\n className=\"flex flex-col gap-tinyrack-xs\"\n max={4}\n min={0}\n value={score}\n variant={VARIANTS[level]}\n >\n <div className=\"flex items-baseline justify-between gap-tinyrack-sm\">\n <TRMeter.Label\n render={\n <TRText color=\"muted\" variant=\"caption\">\n {t('validation.password.strength.label')}\n </TRText>\n }\n />\n <TRMeter.Value\n render={\n <TRText color=\"muted\" variant=\"caption\">\n {t(`validation.password.strength.${level}`)}\n </TRText>\n }\n />\n </div>\n <TRMeter.Track>\n <TRMeter.Indicator />\n </TRMeter.Track>\n </TRMeter.Root>\n );\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11],"mappings":"mRAIa,EAAgC,EAAM,cAAc,IAAA,EAAS,EAE1E,SAAgB,GAAsB,CACpC,IAAM,EAAA,EAAgB,WAAW,CAAgB,EACjD,GAAI,IAAY,IAAA,GACd,MAAU,MAAwIA,EAAoB,EAAE,CAAC,EAE3K,OAAO,CACT,WCKa,EAAyB,EAAM,WAAW,SAAmB,EAAgB,EAAc,CACtG,GAAM,CACJ,SACA,mBACA,SACA,MAAM,IACN,MAAM,EACN,MAAO,EACP,SACA,YACA,WACA,QACA,GAAG,GACD,EACE,CAAC,EAAS,GAAA,EAAoB,SAAS,EAGvC,EAAgB,EAAe,EAAW,EAAK,CAAG,EAClD,EAAkB,EAAM,OAAO,MAAM,CAAa,EAA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,EAAc,EAAkB,EAAgC,CACvE,GAAI,EAAS,SAAW,EACtB,MAAO,GAET,GAAI,EAAS,OAAS,EAAO,WAC3B,MAAO,GAGT,IAAM,EAAU,CAAC,QAAS,QAAS,KAAM,cAAc,CAAC,CAAC,OAAQ,GAC/D,EAAQ,KAAK,CAAQ,CACvB,CAAC,CAAC,OAEI,EAAS,EAAS,QAAU,EAAO,WAAa,EAQtD,OANI,GAAW,GAAK,EACX,EAEL,GAAW,GAAK,EACX,EAEF,CACT,CASA,SAAgB,EAAiB,CAAE,WAAU,UAAiC,CAC5E,GAAM,CAAE,KAAM,EAAe,EACvB,EAAQ,EAAc,EAAU,CAAM,EAE5C,GAAI,IAAU,EACZ,OAAO,KAGT,IAAM,EAAQ,EAAO,EAAQ,GAE7B,OACE,EAAA,EAAA,KAAA,CAAC,EAAQ,KAAT,CACE,YAAU,SACV,UAAU,gCACV,IAAK,EACL,IAAK,EACL,MAAO,EACP,QAAS,EAAS,YANpB,EAQE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,+DAAf,EACE,EAAA,EAAA,IAAA,CAAC,EAAQ,MAAT,CACE,QACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAQ,MAAM,QAAQ,QAAQ,mBAC3B,EAAE,oCAAoC,CACjC,CAAA,CAEX,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,EAAQ,MAAT,CACE,QACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAQ,MAAM,QAAQ,QAAQ,mBAC3B,EAAE,gCAAgC,GAAO,CACpC,CAAA,CAEX,CAAA,CACE,KACL,EAAA,EAAA,IAAA,CAAC,EAAQ,MAAT,CAAA,UACE,EAAA,EAAA,IAAA,CAAC,EAAQ,UAAT,CAAoB,CAAA,CACP,CAAA,CACH,GAElB"}
|
|
1
|
+
{"version":3,"file":"password-strength-Bgvy7kz6.js","names":["_formatErrorMessage","Meter.Indicator","Meter.Label","Meter.Root","Meter.Track","Meter.Value"],"sources":["../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/root/MeterRootContext.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/root/MeterRoot.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/track/MeterTrack.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/indicator/MeterIndicator.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/value/MeterValue.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/meter/label/MeterLabel.mjs","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-indicator.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-label.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-root.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-track.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/meter-value.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/meter/index.js","../../../frontend/src/components/auth/password-strength.tsx"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MeterRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MeterRootContext.displayName = \"MeterRootContext\";\nexport function useMeterRootContext() {\n const context = React.useContext(MeterRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.' : _formatErrorMessage(38));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\nimport { MeterRootContext } from \"./MeterRootContext.mjs\";\nimport { formatNumber } from \"../../utils/formatNumber.mjs\";\nimport { valueToPercent } from \"../../utils/valueToPercent.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Groups all parts of the meter and provides the value for screen readers.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MeterRoot = /*#__PURE__*/React.forwardRef(function MeterRoot(componentProps, forwardedRef) {\n const {\n format,\n getAriaValueText,\n locale,\n max = 100,\n min = 0,\n value: valueProp,\n render,\n className,\n children,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n\n // `clamp` handles infinity, but NaN needs an explicit fallback before normalizing range outputs.\n const rawPercentage = valueToPercent(valueProp, min, max);\n const percentageValue = clamp(Number.isNaN(rawPercentage) ? 0 : rawPercentage, 0, 100);\n const clampedValue = clamp(Number.isNaN(valueProp) ? min : valueProp, min, max);\n\n // Format the clamped value so visible and accessible text stay in sync with `aria-valuenow` and\n // the indicator fill. The raw value remains available as the second `getAriaValueText` argument.\n const formattedValue = format ? formatNumber(clampedValue, locale, format) : formatNumber(percentageValue / 100, locale, {\n style: 'percent'\n });\n let ariaValuetext = formattedValue;\n if (getAriaValueText) {\n ariaValuetext = getAriaValueText(formattedValue, valueProp);\n }\n const defaultProps = {\n 'aria-labelledby': labelId,\n 'aria-valuemax': max,\n 'aria-valuemin': min,\n 'aria-valuenow': clampedValue,\n 'aria-valuetext': ariaValuetext,\n role: 'meter',\n children: /*#__PURE__*/_jsxs(React.Fragment, {\n children: [children, /*#__PURE__*/_jsx(\"span\", {\n role: \"presentation\",\n style: visuallyHidden,\n children: \"x\"\n })]\n })\n };\n const contextValue = React.useMemo(() => ({\n formattedValue,\n percentageValue,\n setLabelId,\n value: valueProp\n }), [formattedValue, percentageValue, setLabelId, valueProp]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [defaultProps, elementProps]\n });\n return /*#__PURE__*/_jsx(MeterRootContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterRoot.displayName = \"MeterRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Contains the meter indicator and represents the entire range of the meter.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterTrack = /*#__PURE__*/React.forwardRef(function MeterTrack(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: elementProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterTrack.displayName = \"MeterTrack\";","'use client';\n\nimport * as React from 'react';\nimport { useMeterRootContext } from \"../root/MeterRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Visualizes the position of the value along the range.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterIndicator = /*#__PURE__*/React.forwardRef(function MeterIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n percentageValue\n } = useMeterRootContext();\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n style: {\n insetInlineStart: 0,\n height: 'inherit',\n width: `${percentageValue}%`\n }\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterIndicator.displayName = \"MeterIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { useMeterRootContext } from \"../root/MeterRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A text element displaying the current value.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterValue = /*#__PURE__*/React.forwardRef(function MeterValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children,\n style,\n ...elementProps\n } = componentProps;\n const {\n value,\n formattedValue\n } = useMeterRootContext();\n return useRenderElement('span', componentProps, {\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: typeof children === 'function' ? children(formattedValue, value) : formattedValue\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterValue.displayName = \"MeterValue\";","'use client';\n\nimport * as React from 'react';\nimport { useMeterRootContext } from \"../root/MeterRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useRegisteredLabelId } from \"../../utils/useRegisteredLabelId.mjs\";\n\n/**\n * An accessible label for the meter.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Meter](https://base-ui.com/react/components/meter)\n */\nexport const MeterLabel = /*#__PURE__*/React.forwardRef(function MeterLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useMeterRootContext();\n const id = useRegisteredLabelId(idProp, setLabelId);\n return useRenderElement('span', componentProps, {\n ref: forwardedRef,\n props: [{\n id,\n role: 'presentation'\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MeterLabel.displayName = \"MeterLabel\";","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-indicator.tsx\nconst TRMeterIndicator = createComponentPart(Meter.Indicator, \"tr-meter-indicator\");\n//#endregion\nexport { TRMeterIndicator };\n\n//# sourceMappingURL=meter-indicator.js.map","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-label.tsx\nconst TRMeterLabel = createComponentPart(Meter.Label, \"tr-meter-label\");\n//#endregion\nexport { TRMeterLabel };\n\n//# sourceMappingURL=meter-label.js.map","\"use client\";\nimport { mergeComponentClassName } from \"../../internal/component-class-name.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-root.tsx\nfunction TRMeterRoot({ className, max = 100, min = 0, value, variant = \"neutral\", ...props }) {\n\tconst clampedValue = Math.min(max, Math.max(min, Number.isNaN(value) ? min : value));\n\treturn /* @__PURE__ */ jsx(Meter.Root, {\n\t\t...props,\n\t\tclassName: mergeComponentClassName(\"tr-meter\", className),\n\t\t\"data-variant\": variant,\n\t\tmax,\n\t\tmin,\n\t\tvalue: clampedValue\n\t});\n}\n//#endregion\nexport { TRMeterRoot };\n\n//# sourceMappingURL=meter-root.js.map","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-track.tsx\nconst TRMeterTrack = createComponentPart(Meter.Track, \"tr-meter-track\");\n//#endregion\nexport { TRMeterTrack };\n\n//# sourceMappingURL=meter-track.js.map","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { Meter } from \"@base-ui/react/meter\";\n//#region src/components/meter/meter-value.tsx\nconst TRMeterValue = createComponentPart(Meter.Value, \"tr-meter-value\");\n//#endregion\nexport { TRMeterValue };\n\n//# sourceMappingURL=meter-value.js.map","import { TRMeterIndicator } from \"./meter-indicator.js\";\nimport { TRMeterLabel } from \"./meter-label.js\";\nimport { TRMeterRoot } from \"./meter-root.js\";\nimport { TRMeterTrack } from \"./meter-track.js\";\nimport { TRMeterValue } from \"./meter-value.js\";\n//#region src/components/meter/index.tsx\nconst TRMeter = {\n\tRoot: TRMeterRoot,\n\tTrack: TRMeterTrack,\n\tIndicator: TRMeterIndicator,\n\tValue: TRMeterValue,\n\tLabel: TRMeterLabel\n};\n//#endregion\nexport { TRMeter, TRMeterIndicator, TRMeterLabel, TRMeterRoot, TRMeterTrack, TRMeterValue };\n\n//# sourceMappingURL=index.js.map","import { TRMeter } from '@tinyrack/ui/components/meter';\nimport { TRText } from '@tinyrack/ui/components/text';\nimport { useTranslation } from 'react-i18next';\n\ntype PasswordPolicy = {\n min_length: number;\n max_length: number;\n};\n\ntype PasswordStrengthProps = {\n password: string;\n policy: PasswordPolicy;\n};\n\nconst LEVELS = ['weak', 'fair', 'good', 'strong'] as const;\n\nconst VARIANTS = {\n weak: 'danger',\n fair: 'warning',\n good: 'info',\n strong: 'success',\n} as const;\n\n/**\n * Scores a password 1-4 for feedback only.\n *\n * Deliberately simple: length against the deployment's own policy plus\n * character-class variety. The server is the authority on what is acceptable,\n * so this only needs to steer the user, and a full entropy estimator would be\n * a large dependency for a hint bar.\n *\n * Returns 0 for \"nothing to say yet\" so the caller can stay silent.\n */\nfunction scorePassword(password: string, policy: PasswordPolicy): number {\n if (password.length === 0) {\n return 0;\n }\n if (password.length < policy.min_length) {\n return 1;\n }\n\n const classes = [/[a-z]/, /[A-Z]/, /\\d/, /[^a-zA-Z0-9]/].filter((pattern) =>\n pattern.test(password),\n ).length;\n\n const isLong = password.length >= policy.min_length + 4;\n\n if (classes >= 3 && isLong) {\n return 4;\n }\n if (classes >= 2 && isLong) {\n return 3;\n }\n return 2;\n}\n\n/**\n * Strength hint under a new-password field.\n *\n * Renders nothing for an empty field so the form does not shift as soon as it\n * is focused. Announced politely rather than assertively — it updates on every\n * keystroke and should not interrupt typing.\n */\nexport function PasswordStrength({ password, policy }: PasswordStrengthProps) {\n const { t } = useTranslation();\n const score = scorePassword(password, policy);\n\n if (score === 0) {\n return null;\n }\n\n const level = LEVELS[score - 1];\n\n return (\n <TRMeter.Root\n aria-live=\"polite\"\n className=\"flex flex-col gap-tinyrack-xs\"\n max={4}\n min={0}\n value={score}\n variant={VARIANTS[level]}\n >\n <div className=\"flex items-baseline justify-between gap-tinyrack-sm\">\n <TRMeter.Label\n render={\n <TRText color=\"muted\" variant=\"caption\">\n {t('validation.password.strength.label')}\n </TRText>\n }\n />\n <TRMeter.Value\n render={\n <TRText color=\"muted\" variant=\"caption\">\n {t(`validation.password.strength.${level}`)}\n </TRText>\n }\n />\n </div>\n <TRMeter.Track>\n <TRMeter.Indicator />\n </TRMeter.Track>\n </TRMeter.Root>\n );\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11],"mappings":"yRAIa,EAAgC,EAAM,cAAc,IAAA,EAAS,EAE1E,SAAgB,GAAsB,CACpC,IAAM,EAAA,EAAgB,WAAW,CAAgB,EACjD,GAAI,IAAY,IAAA,GACd,MAAU,MAAwIA,EAAoB,EAAE,CAAC,EAE3K,OAAO,CACT,WCKa,EAAyB,EAAM,WAAW,SAAmB,EAAgB,EAAc,CACtG,GAAM,CACJ,SACA,mBACA,SACA,MAAM,IACN,MAAM,EACN,M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oB,CAAA,CACP,CAAA,CACH,GAElB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{C as e,J as t,X as n,Z as r,_ as i,c as a,et as o,i as s,n as c,w as l,x as u}from"./createLucideIcon-D-yizrWN.js";import{Et as d,J as f,Jt as p,N as m,On as h,R as g,S as _,Tt as v,Y as y,Z as ee,in as te,q as b,z as x}from"./config-C18-l7z7.js";import{B as ne,E as re,F as ie,G as ae,H as oe,I as S,N as se,R as ce,W as C,l as w}from"./shell-header-bar-CdOEWmCT.js";import{t as T}from"./useAriaLabelledBy-CF3crxLc.js";import{t as E}from"./field-CsrUbl__.js";import{t as D}from"./separator-CMGc2Y1q.js";var O=o(r(),1),k=O.createContext(void 0);function A(){let e=O.useContext(k);if(e===void 0)throw Error(u(98));return e}function j(e,t,n){return{...e,value:t,index:n,filled:t!==``}}var le={value:()=>null,length:()=>null,...C},ue={value:()=>null,index:()=>null,...C},M={numeric:{slotPattern:`\\d{1}`,getRootPattern:e=>`\\d{${e}}`,regexp:/[^\d]/g,inputMode:`numeric`},alpha:{slotPattern:`[a-zA-Z]{1}`,getRootPattern:e=>`[a-zA-Z]{${e}}`,regexp:/[^a-zA-Z]/g,inputMode:`text`},alphanumeric:{slotPattern:`[a-zA-Z0-9]{1}`,getRootPattern:e=>`[a-zA-Z0-9]{${e}}`,regexp:/[^a-zA-Z0-9]/g,inputMode:`text`}};function N(e){return e===`none`?null:M[e]}function de(e){return(e??``).replace(/\s/g,``)}function P(e,t){return t?e.replace(t.regexp,``):e}function F(e,t,n,r){let i=de(e),a=N(n),o=P(i,a),s=i.length>o.length;if(r){let e=r(o);s||=o.length>e.length,o=P(e,a),s||=e.length>o.length}let c=t<0?0:t,l=Array.from(o);return[l.slice(0,c).join(``),s||l.length>c]}function I(e,t,n,r){return F(e,t,n,r)[0]}function fe(e,t,n,r,i,a){let o=I(n,r,i,a);return I(`${e.slice(0,t)}${o}${e.slice(t+o.length)}`,r,i,a)}function L(e,t){return t<0||t>=e.length?e:`${e.slice(0,t)}${e.slice(t+1)}`}var R=n(),z=O.forwardRef(function(t,n){let{"aria-describedby":r,"aria-labelledby":o,id:s,autoComplete:c=`one-time-code`,defaultValue:u,value:f,onValueChange:p,onValueComplete:h,form:_,length:y,autoSubmit:ee=!1,mask:b=!1,inputMode:C,validationType:w=`numeric`,normalizeValue:E,disabled:D=!1,readOnly:A=!1,required:j=!1,name:ue,onValueInvalid:M,render:de,className:P,style:fe,...L}=t,{setDirty:z,validityData:B,disabled:me,setFilled:V,invalid:H,name:he,state:ge,validation:U,validationMode:_e,setFocused:ve,setTouched:ye}=oe(),{clearErrors:be}=ie(),{getDescriptionProps:xe,labelId:Se}=ce(),W=me||D,G=he??ue,[Ce,we]=ae({controlled:f,default:u,name:`OTPField`,state:`value`}),Te=O.useRef(null),K=O.useRef([]),Ee=O.useRef(null),q=O.useRef(null),De=O.useMemo(()=>({get current(){return K.current[0]??null}}),[]),J=S({id:s}),Oe=T(o,Se,De,!0,J),ke=o==null?Oe:void 0,Ae=pe(r,xe({})[`aria-describedby`]),je=N(w),Me=je?.slotPattern,Ne=je?.getRootPattern(y),Pe=C??je?.inputMode,Fe=Number.isInteger(y)&&y>0,Y=I(Ce,y,w,E),X=m(Y),Z=Y!==``,[Ie,Le]=O.useState(0),[Re,ze]=O.useState(()=>Math.min(Y.length,y-1)),[Be,Ve]=O.useState(!1),He=Be?Math.min(Re,Math.max(y-1,0)):Math.min(Y.length,y-1);e(()=>{V(Z)},[Z,V]),ne(De,J,Y,void 0,!W,ue);let Q=l(e=>{let t=Math.min(Math.max(e,0),Math.max(K.current.length-1,0)),n=K.current[t];n?.focus(),n?.select()}),Ue=l((e,t)=>{Ee.current={index:e,value:t}});function We(){let e=U.inputRef.current?.form??K.current[0]?.form??null;if(_){let t=i(Te.current).getElementById(_);t?.tagName===`FORM`&&(e=t)}e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}function Ge(e,t){h?.(e,t),ee&&We()}se(Y,()=>{be(G),z(Y!==B.initialValue),U.change(Y);let e=Ee.current;e!=null&&(Ee.current=null,e.value===Y&&Q(e.index));let t=q.current;t!=null&&(q.current=null,t.value===Y&&Ge(Y,t.eventDetails))});let Ke=l((e,t)=>{let n=I(e,y,w,E),r=(t.reason===`input-change`||t.reason===`input-paste`)&&n.length===y&&(X.current.length!==y||t.reason===`input-paste`)?x(t.reason,t.event):null;return n===X.current?(r!=null&&Ge(n,r),null):(p?.(n,t),t.isCanceled?null:(we(n),r==null?n.length!==y&&(q.current=null):q.current={value:n,eventDetails:r},n))}),qe=l((e,t)=>{M?.(e,t)}),Je=l((e,t)=>{if(e>X.current.length){Q(Math.min(X.current.length,y-1));return}ze(e),Ve(!0),ve(!0),t.currentTarget.select()}),Ye=l(e=>{te(Te.current,e.relatedTarget)||(ye(!0),Ve(!1),ve(!1),_e===`onBlur`&&U.commit(X.current))}),Xe=O.useCallback(e=>{if(J!=null)return e===0?J:`${J}-${e+1}`},[J]),$=O.useMemo(()=>({...ge,complete:Y.length===y,disabled:W,filled:Z,focused:Be,length:y,readOnly:A,required:j,value:Y}),[W,ge,Z,Be,y,A,j,Y]),Ze=O.useMemo(()=>({autoComplete:c,activeIndex:He,disabled:W,form:_,focusInput:Q,queueFocusInput:Ue,getInputId:Xe,handleInputBlur:Ye,handleInputFocus:Je,inputMode:Pe,inputAriaLabelledBy:ke,invalid:H,length:y,mask:b,pattern:Me,reportValueInvalid:qe,readOnly:A,required:j,normalizeValue:E,setValue:Ke,state:$,validationType:w,value:Y}),[He,c,W,Q,_,Xe,Ye,Je,Pe,ke,H,y,b,Me,Ue,A,qe,j,E,Ke,$,w,Y]),Qe=a(`div`,t,{ref:[n,Te],state:$,props:[{role:`group`,"aria-describedby":Ae,"aria-labelledby":Oe},L],stateAttributesMapping:le});return(0,R.jsx)(re,{elementsRef:K,onMapChange:e=>{Le(e.size)},children:(0,R.jsxs)(k.Provider,{value:Ze,children:[Qe,Fe&&(0,R.jsx)(`input`,{...U.getValidationProps(W,{onFocus(){Q(0)},onChange(e){if(e.nativeEvent.defaultPrevented||W||A)return;let t=e.currentTarget.value,[n,r]=F(t,y,w,E);r&&qe(t,x(`input-change`,e.nativeEvent));let i=Ke(n,g(`input-change`,e.nativeEvent));i!=null&&i!==``&&Ue(i.length-1,i)}}),ref:U.inputRef,type:`text`,id:J&&G==null?`${J}-hidden-input`:void 0,form:_,name:G,value:Y,autoComplete:c,inputMode:Pe,minLength:y,maxLength:y,pattern:Ne,disabled:W,readOnly:A,required:j,"aria-hidden":!0,tabIndex:-1,style:G?d:v})]})})});function pe(...e){let t=e.flatMap(e=>e?.split(/\s+/).filter(Boolean)??[]);return t.length>0?Array.from(new Set(t)).join(` `):void 0}var B=h(O.forwardRef(function(e,t){let{"aria-label":n,"aria-labelledby":r,render:i,className:o,style:s,...c}=e,{activeIndex:l,autoComplete:u,disabled:d,form:m,focusInput:h,queueFocusInput:v,getInputId:te,handleInputBlur:ne,handleInputFocus:re,inputMode:ie,inputAriaLabelledBy:ae,invalid:oe,length:S,mask:se,pattern:ce,reportValueInvalid:C,readOnly:T,required:E,normalizeValue:D,setValue:k,state:le,validationType:M,value:N}=A(),{ref:de,index:P}=w({guess:!0}),I=O.useRef(null),R=_(),z=N[P]??``,pe=j(le,z,P),B=n,me=r??ae,V=P===0?void 0:B,H={id:te(P),value:z,type:se?`password`:`text`,inputMode:ie,autoComplete:P===0?u:`off`,autoCorrect:`off`,spellCheck:`false`,enterKeyHint:P===S-1?`done`:`next`,maxLength:P===0?S:void 0,tabIndex:l===P?0:-1,disabled:d,form:m,pattern:ce,readOnly:T,required:E,"aria-labelledby":V==null?me:void 0,"aria-invalid":!d&&oe?!0:void 0,"aria-label":V,onMouseDown(e){e.defaultPrevented||d||(e.preventDefault(),h(P))},onFocus(e){e.defaultPrevented||d||re(P,e)},onBlur(e){e.defaultPrevented||ne(e)},onChange(e){if(e.defaultPrevented||d||T)return;let t=e.currentTarget.value,[n,r]=F(t,S,M,D);if(r&&C(t,x(b,e.nativeEvent)),n===``){t===``?k(L(N,P),g(f,e.nativeEvent)):z!==``&&(e.currentTarget.value=z,e.currentTarget.select());return}let i=fe(N,P,n,S,M,D),a=k(i,g(b,e.nativeEvent));if(a!=null){let e=Math.min(P+n.length,S-1);v(e,a)}},onKeyDown(e){if(e.defaultPrevented||d)return;let t=Math.max(S-1,0),n=Math.min(N.length,t),r=(e.ctrlKey||e.metaKey)&&!e.altKey,i=R===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(e.key===a){p(e),h(r?0:Math.max(0,P-1));return}if(e.key===o){p(e),h(r?n:Math.min(t,P+1));return}if(e.key===`Home`||e.key===`ArrowUp`){p(e),h(0);return}if(e.key===`End`||e.key===`ArrowDown`){p(e),h(n);return}if(T)return;function s(t,n){let r=k(t,g(ee,e.nativeEvent));r!=null&&v(n,r)}if(e.key===`Backspace`&&r){p(e),s(``,0);return}if(e.key===`Delete`){p(e),s(L(N,P),P);return}let c=e.currentTarget.value,l=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===c.length;if(e.key.length===1&&l&&z===e.key){p(e),P<S-1&&h(P+1);return}if(e.key===`Backspace`){p(e);let t=Math.max(0,P-1);s(L(N,z===``?t:P),t)}},onPaste(e){if(e.defaultPrevented||d||T)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{return}e.preventDefault();let[n,r]=F(t,S,M,D);if(r&&C(t,x(y,e.nativeEvent)),n===``)return;let i=k(fe(N,P,n,S,M,D),g(y,e.nativeEvent));if(i!=null){let e=Math.min(P+n.length,S-1);v(e,i)}}};return a(`input`,e,{ref:[t,de,I],state:pe,props:[H,c],stateAttributesMapping:ue})}),`tr-otp-field-digit`,{tracksFocusModality:!0});function me({appearance:e=`solid`,className:n,layout:r=`compact`,uiSize:i=`md`,...a}){return(0,R.jsx)(z,{...a,className:t(`tr-otp-field`,n),"data-appearance":e,"data-layout":r,"data-ui-size":i})}function V({className:e,orientation:n=`vertical`,...r}){return(0,R.jsx)(D,{...r,className:t(`tr-otp-field-separator`,e),orientation:n})}var H={Root:me,Input:B,Separator:V},he=(0,O.forwardRef)(function({length:e=6,error:t,disabled:n=!1,onComplete:r,onChange:i,value:a,autoFocus:o=!1,className:l=``},u){let{t:d}=s(),f=(0,O.useId)(),p=(0,O.useRef)(null),[m,h]=(0,O.useState)(a??``);(0,O.useEffect)(()=>{a!==void 0&&h(a)},[a]),(0,O.useImperativeHandle)(u,()=>({focus:()=>{(p.current?.querySelector(`input`))?.focus()},clear:()=>{h(``),(p.current?.querySelector(`input`))?.focus()}}),[]);let g=(0,O.useCallback)(e=>{h(e),i?.(e)},[i]),_=(0,O.useCallback)(e=>{r?.(e)},[r]);return(0,R.jsxs)(E.Root,{className:`w-full ${l}`,ref:p,children:[(0,R.jsx)(E.Label,{className:`sr-only`,htmlFor:f,children:d(`common.otp.label`)}),(0,R.jsx)(H.Root,{disabled:n,id:f,layout:`stretch`,length:e,onValueChange:g,onValueComplete:_,uiSize:`lg`,validationType:`numeric`,value:m,children:Array.from({length:e},(t,n)=>(0,R.jsx)(H.Input,{"aria-label":n===0?void 0:d(`common.otp.digit`,{label:d(`common.otp.label`),position:n+1,total:e}),autoFocus:o&&n===0},n))}),t&&(0,R.jsx)(c,{align:`center`,as:`p`,className:`mt-tinyrack-sm`,color:`danger`,"data-testid":`pin-input-error`,variant:`bodySm`,children:t.message})]})});export{he as t};
|
|
2
|
+
//# sourceMappingURL=pin-input-DhsRO4Ei.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-input-CITrr-Yc.js","names":["_formatErrorMessage","REASONS.inputChange","REASONS.inputClear","REASONS.keyboard","REASONS.inputPaste","OTPField.Input","OTPField.Root"],"sources":["../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/root/OTPFieldRootContext.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/utils/stateAttributesMapping.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/utils/otp.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/root/OTPFieldRoot.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/input/OTPFieldInput.mjs","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/otp-field-input.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/otp-field-root.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/otp-field-separator.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.29.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/index.js","../../../frontend/src/components/ui/pin-input.tsx"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const OTPFieldRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") OTPFieldRootContext.displayName = \"OTPFieldRootContext\";\nexport function useOTPFieldRootContext() {\n const context = React.useContext(OTPFieldRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: OTPFieldRootContext is missing. OTPField parts must be placed within <OTPField.Root>.' : _formatErrorMessage(98));\n }\n return context;\n}\nexport function getOTPFieldInputState(state, value, index) {\n return {\n ...state,\n value,\n index,\n filled: value !== ''\n };\n}","import { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nexport const rootStateAttributesMapping = {\n value: () => null,\n length: () => null,\n ...fieldValidityMapping\n};\nexport const inputStateAttributesMapping = {\n value: () => null,\n index: () => null,\n ...fieldValidityMapping\n};","const OTP_VALIDATION_CONFIG = {\n numeric: {\n slotPattern: '\\\\d{1}',\n getRootPattern: length => `\\\\d{${length}}`,\n regexp: /[^\\d]/g,\n inputMode: 'numeric'\n },\n alpha: {\n slotPattern: '[a-zA-Z]{1}',\n getRootPattern: length => `[a-zA-Z]{${length}}`,\n regexp: /[^a-zA-Z]/g,\n inputMode: 'text'\n },\n alphanumeric: {\n slotPattern: '[a-zA-Z0-9]{1}',\n getRootPattern: length => `[a-zA-Z0-9]{${length}}`,\n regexp: /[^a-zA-Z0-9]/g,\n inputMode: 'text'\n }\n};\nexport function getOTPValidationConfig(validationType) {\n if (validationType === 'none') {\n return null;\n }\n return OTP_VALIDATION_CONFIG[validationType];\n}\nexport function stripOTPWhitespace(value) {\n return (value ?? '').replace(/\\s/g, '');\n}\nfunction applyOTPValidation(value, validation) {\n return validation ? value.replace(validation.regexp, '') : value;\n}\n\n/**\n * Normalizes user-entered OTP text by stripping whitespace, applying validation and custom\n * normalization, and clamping the final value to the configured slot count.\n */\nexport function normalizeOTPValueWithDetails(value, length, validationType, normalizeValue) {\n const strippedValue = stripOTPWhitespace(value);\n const validation = getOTPValidationConfig(validationType);\n let normalizedValue = applyOTPValidation(strippedValue, validation);\n let didRejectCharacters = strippedValue.length > normalizedValue.length;\n if (normalizeValue) {\n const customNormalizedValue = normalizeValue(normalizedValue);\n didRejectCharacters ||= normalizedValue.length > customNormalizedValue.length;\n normalizedValue = applyOTPValidation(customNormalizedValue, validation);\n didRejectCharacters ||= customNormalizedValue.length > normalizedValue.length;\n }\n\n // Slice by Unicode code points so multi-byte characters do not split across OTP slots.\n const maxLength = length < 0 ? 0 : length;\n const normalizedCharacters = Array.from(normalizedValue);\n return [normalizedCharacters.slice(0, maxLength).join(''), didRejectCharacters || normalizedCharacters.length > maxLength];\n}\nexport function normalizeOTPValue(value, length, validationType, normalizeValue) {\n return normalizeOTPValueWithDetails(value, length, validationType, normalizeValue)[0];\n}\n\n/**\n * Replaces characters starting at the provided slot index, then re-normalizes the final OTP value\n * so paste and multi-character edits stay contiguous and length-bounded.\n */\nexport function replaceOTPValue(currentValue, index, nextValue, length, validationType, normalizeValue) {\n const normalizedValue = normalizeOTPValue(nextValue, length, validationType, normalizeValue);\n const prefix = currentValue.slice(0, index);\n const suffix = currentValue.slice(index + normalizedValue.length);\n return normalizeOTPValue(`${prefix}${normalizedValue}${suffix}`, length, validationType, normalizeValue);\n}\nexport function removeOTPCharacter(currentValue, index) {\n if (index < 0 || index >= currentValue.length) {\n return currentValue;\n }\n return `${currentValue.slice(0, index)}${currentValue.slice(index + 1)}`;\n}","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { warn } from '@base-ui/utils/warn';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { contains } from \"../../floating-ui-react/utils.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { useAriaLabelledBy } from \"../../internals/labelable-provider/useAriaLabelledBy.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { OTPFieldRootContext } from \"./OTPFieldRootContext.mjs\";\nimport { rootStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { getOTPValidationConfig, normalizeOTPValue, normalizeOTPValueWithDetails } from \"../utils/otp.mjs\";\n\n/**\n * Groups all OTP field parts and manages their state.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI OTP Field](https://base-ui.com/react/components/otp-field)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const OTPFieldRoot = /*#__PURE__*/React.forwardRef(function OTPFieldRoot(componentProps, forwardedRef) {\n const {\n 'aria-describedby': ariaDescribedByProp,\n 'aria-labelledby': ariaLabelledByProp,\n id: idProp,\n autoComplete = 'one-time-code',\n defaultValue,\n value: valueProp,\n onValueChange,\n onValueComplete: onValueCompleteProp,\n form,\n length,\n autoSubmit = false,\n mask = false,\n inputMode: inputModeProp,\n validationType = 'numeric',\n normalizeValue,\n disabled: disabledProp = false,\n readOnly = false,\n required = false,\n name: nameProp,\n onValueInvalid,\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n setDirty,\n validityData,\n disabled: fieldDisabled,\n setFilled,\n invalid,\n name: fieldName,\n state: fieldState,\n validation,\n validationMode,\n setFocused,\n setTouched\n } = useFieldRootContext();\n const {\n clearErrors\n } = useFormContext();\n const {\n getDescriptionProps,\n labelId\n } = useLabelableContext();\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const [valueUnwrapped, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'OTPField',\n state: 'value'\n });\n const rootRef = React.useRef(null);\n const inputRefs = React.useRef([]);\n const pendingFocusRef = React.useRef(null);\n const pendingCompleteValueRef = React.useRef(null);\n const firstInputRef = React.useMemo(() => ({\n get current() {\n return inputRefs.current[0] ?? null;\n }\n }), []);\n const id = useLabelableId({\n id: idProp\n });\n const ariaLabelledBy = useAriaLabelledBy(ariaLabelledByProp, labelId, firstInputRef, true, id);\n const inputAriaLabelledBy = ariaLabelledByProp == null ? ariaLabelledBy : undefined;\n const fieldDescriptionProps = getDescriptionProps({});\n const ariaDescribedBy = mergeAriaIds(ariaDescribedByProp, fieldDescriptionProps['aria-describedby']);\n const validationConfig = getOTPValidationConfig(validationType);\n const pattern = validationConfig?.slotPattern;\n const hiddenInputPattern = validationConfig?.getRootPattern(length);\n const inputMode = inputModeProp ?? validationConfig?.inputMode;\n const hasValidLength = Number.isInteger(length) && length > 0;\n const value = normalizeOTPValue(valueUnwrapped, length, validationType, normalizeValue);\n const valueRef = useValueAsRef(value);\n const filled = value !== '';\n const [inputCount, setInputCount] = React.useState(0);\n const [focusedIndex, setFocusedIndex] = React.useState(() => Math.min(value.length, length - 1));\n const [focused, setFocusedState] = React.useState(false);\n const activeIndex = focused ? Math.min(focusedIndex, Math.max(length - 1, 0)) : Math.min(value.length, length - 1);\n useIsoLayoutEffect(() => {\n setFilled(filled);\n }, [filled, setFilled]);\n\n /* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useOTPFieldRootDevWarnings({\n inputCount,\n length\n });\n }\n useRegisterFieldControl(firstInputRef, id, value, undefined, !disabled, nameProp);\n const focusInput = useStableCallback(index => {\n const targetIndex = Math.min(Math.max(index, 0), Math.max(inputRefs.current.length - 1, 0));\n const target = inputRefs.current[targetIndex];\n target?.focus();\n target?.select();\n });\n const queueFocusInput = useStableCallback((index, nextValue) => {\n pendingFocusRef.current = {\n index,\n value: nextValue\n };\n });\n function requestSubmit() {\n // The hidden validation input only renders for a valid `length`, but the slots always do,\n // so fall back to the owning form of the first slot.\n let formElement = validation.inputRef.current?.form ?? inputRefs.current[0]?.form ?? null;\n if (form) {\n const associatedElement = ownerDocument(rootRef.current).getElementById(form);\n if (associatedElement?.tagName === 'FORM') {\n formElement = associatedElement;\n }\n }\n if (formElement && typeof formElement.requestSubmit === 'function') {\n formElement.requestSubmit();\n }\n }\n function completeValue(completedValue, eventDetails) {\n onValueCompleteProp?.(completedValue, eventDetails);\n if (autoSubmit) {\n requestSubmit();\n }\n }\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(value !== validityData.initialValue);\n validation.change(value);\n const pendingFocus = pendingFocusRef.current;\n if (pendingFocus != null) {\n pendingFocusRef.current = null;\n if (pendingFocus.value === value) {\n focusInput(pendingFocus.index);\n }\n }\n const pendingCompleteValue = pendingCompleteValueRef.current;\n if (pendingCompleteValue != null) {\n pendingCompleteValueRef.current = null;\n if (pendingCompleteValue.value === value) {\n completeValue(value, pendingCompleteValue.eventDetails);\n }\n }\n });\n const setValue = useStableCallback((nextValue, details) => {\n const normalizedValue = normalizeOTPValue(nextValue, length, validationType, normalizeValue);\n const canComplete = details.reason === REASONS.inputChange || details.reason === REASONS.inputPaste;\n const completeEventDetails = canComplete && normalizedValue.length === length && (valueRef.current.length !== length || details.reason === REASONS.inputPaste) ? createGenericEventDetails(details.reason, details.event) : null;\n if (normalizedValue === valueRef.current) {\n if (completeEventDetails != null) {\n completeValue(normalizedValue, completeEventDetails);\n }\n return null;\n }\n onValueChange?.(normalizedValue, details);\n if (details.isCanceled) {\n return null;\n }\n setValueUnwrapped(normalizedValue);\n if (completeEventDetails != null) {\n pendingCompleteValueRef.current = {\n value: normalizedValue,\n eventDetails: completeEventDetails\n };\n } else if (normalizedValue.length !== length) {\n pendingCompleteValueRef.current = null;\n }\n return normalizedValue;\n });\n const reportValueInvalid = useStableCallback((invalidValue, details) => {\n onValueInvalid?.(invalidValue, details);\n });\n const handleInputFocus = useStableCallback((index, event) => {\n if (index > valueRef.current.length) {\n focusInput(Math.min(valueRef.current.length, length - 1));\n return;\n }\n setFocusedIndex(index);\n setFocusedState(true);\n setFocused(true);\n event.currentTarget.select();\n });\n const handleInputBlur = useStableCallback(event => {\n if (contains(rootRef.current, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocusedState(false);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(valueRef.current);\n }\n });\n const getInputId = React.useCallback(index => {\n if (id == null) {\n return undefined;\n }\n return index === 0 ? id : `${id}-${index + 1}`;\n }, [id]);\n const state = React.useMemo(() => ({\n ...fieldState,\n complete: value.length === length,\n disabled,\n filled,\n focused,\n length,\n readOnly,\n required,\n value\n }), [disabled, fieldState, filled, focused, length, readOnly, required, value]);\n const contextValue = React.useMemo(() => ({\n autoComplete,\n activeIndex,\n disabled,\n form,\n focusInput,\n queueFocusInput,\n getInputId,\n handleInputBlur,\n handleInputFocus,\n inputMode,\n inputAriaLabelledBy,\n invalid,\n length,\n mask,\n pattern,\n reportValueInvalid,\n readOnly,\n required,\n normalizeValue,\n setValue,\n state,\n validationType,\n value\n }), [activeIndex, autoComplete, disabled, focusInput, form, getInputId, handleInputBlur, handleInputFocus, inputMode, inputAriaLabelledBy, invalid, length, mask, pattern, queueFocusInput, readOnly, reportValueInvalid, required, normalizeValue, setValue, state, validationType, value]);\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, rootRef],\n state,\n props: [{\n role: 'group',\n 'aria-describedby': ariaDescribedBy,\n 'aria-labelledby': ariaLabelledBy\n }, elementProps],\n stateAttributesMapping: rootStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: inputRefs,\n onMapChange: newMap => {\n setInputCount(newMap.size);\n },\n children: /*#__PURE__*/_jsxs(OTPFieldRootContext.Provider, {\n value: contextValue,\n children: [element, hasValidLength && /*#__PURE__*/_jsx(\"input\", {\n ...validation.getValidationProps(disabled, {\n onFocus() {\n focusInput(0);\n },\n onChange(event) {\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const rawValue = event.currentTarget.value;\n const [normalizedValue, didRejectCharacters] = normalizeOTPValueWithDetails(rawValue, length, validationType, normalizeValue);\n if (didRejectCharacters) {\n reportValueInvalid(rawValue, createGenericEventDetails(REASONS.inputChange, event.nativeEvent));\n }\n const committedValue = setValue(normalizedValue, createChangeEventDetails(REASONS.inputChange, event.nativeEvent));\n if (committedValue != null && committedValue !== '') {\n queueFocusInput(committedValue.length - 1, committedValue);\n }\n }\n }),\n ref: validation.inputRef,\n type: \"text\",\n id: id && name == null ? `${id}-hidden-input` : undefined,\n form: form,\n name: name,\n value: value,\n autoComplete: autoComplete,\n inputMode: inputMode,\n minLength: length,\n maxLength: length,\n pattern: hiddenInputPattern,\n disabled: disabled,\n readOnly: readOnly,\n required: required,\n \"aria-hidden\": true,\n tabIndex: -1,\n style: name ? visuallyHiddenInput : visuallyHidden\n })]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") OTPFieldRoot.displayName = \"OTPFieldRoot\";\nfunction mergeAriaIds(...values) {\n const ids = values.flatMap(value => value?.split(/\\s+/).filter(Boolean) ?? []);\n return ids.length > 0 ? Array.from(new Set(ids)).join(' ') : undefined;\n}\nfunction useOTPFieldRootDevWarnings(parameters) {\n const {\n inputCount,\n length\n } = parameters;\n React.useEffect(() => {\n if (!Number.isInteger(length) || length <= 0 || inputCount === 0 || inputCount === length) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = '<OTPField.Root> `length` must match the number of rendered ' + `<OTPField.Input /> parts. Received \\`length={${length}}\\` but rendered ` + `${inputCount} input${inputCount === 1 ? '' : 's'}.`;\n warn(message, ownerStackMessage);\n }, [inputCount, length]);\n React.useEffect(() => {\n if (Number.isInteger(length) && length > 0) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn(`<OTPField.Root> \\`length\\` must be a positive integer. Received \\`length={${String(length)}}\\`.`, ownerStackMessage);\n }, [length]);\n}","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { warn } from '@base-ui/utils/warn';\nimport { stopEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useOTPFieldRootContext, getOTPFieldInputState } from \"../root/OTPFieldRootContext.mjs\";\nimport { inputStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { normalizeOTPValueWithDetails, removeOTPCharacter, replaceOTPValue } from \"../utils/otp.mjs\";\n\n/**\n * An individual OTP character input.\n * Renders an `<input>` element.\n *\n * Documentation: [Base UI OTP Field](https://base-ui.com/react/components/otp-field)\n */\nexport const OTPFieldInput = /*#__PURE__*/React.forwardRef(function OTPFieldInput(componentProps, forwardedRef) {\n const {\n 'aria-label': externalAriaLabel,\n 'aria-labelledby': externalAriaLabelledBy,\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n activeIndex,\n autoComplete,\n disabled,\n form,\n focusInput,\n queueFocusInput,\n getInputId,\n handleInputBlur,\n handleInputFocus,\n inputMode,\n inputAriaLabelledBy,\n invalid,\n length,\n mask,\n pattern,\n reportValueInvalid,\n readOnly,\n required,\n normalizeValue,\n setValue,\n state,\n validationType,\n value\n } = useOTPFieldRootContext();\n const {\n ref: listItemRef,\n index\n } = useCompositeListItem({\n guess: true\n });\n const inputRef = React.useRef(null);\n const direction = useDirection();\n const slotValue = value[index] ?? '';\n const inputState = getOTPFieldInputState(state, slotValue, index);\n const slotAriaLabel = externalAriaLabel;\n const inheritedLabel = externalAriaLabelledBy ?? inputAriaLabelledBy;\n const ariaLabel = index === 0 ? undefined : slotAriaLabel;\n\n /* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (index !== 0 || slotAriaLabel == null || inputRef.current?.labels?.length) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn('<OTPField.Input> ignores `aria-label` on the first input. Use a `<label>` or `<Field.Label>` to label the OTP field.', ownerStackMessage);\n }, [index, slotAriaLabel]);\n }\n const inputProps = {\n id: getInputId(index),\n value: slotValue,\n type: mask ? 'password' : 'text',\n inputMode,\n autoComplete: index === 0 ? autoComplete : 'off',\n autoCorrect: 'off',\n spellCheck: 'false',\n enterKeyHint: index === length - 1 ? 'done' : 'next',\n // Only the first slot has a max length to avoid password manager bubbles appearing after later inputs.\n maxLength: index === 0 ? length : undefined,\n tabIndex: activeIndex === index ? 0 : -1,\n disabled,\n form,\n pattern,\n readOnly,\n required,\n 'aria-labelledby': ariaLabel == null ? inheritedLabel : undefined,\n 'aria-invalid': !disabled && invalid ? true : undefined,\n 'aria-label': ariaLabel,\n onMouseDown(event) {\n if (event.defaultPrevented || disabled) {\n return;\n }\n event.preventDefault();\n focusInput(index);\n },\n onFocus(event) {\n if (event.defaultPrevented || disabled) {\n return;\n }\n handleInputFocus(index, event);\n },\n onBlur(event) {\n if (event.defaultPrevented) {\n return;\n }\n handleInputBlur(event);\n },\n onChange(event) {\n if (event.defaultPrevented || disabled || readOnly) {\n return;\n }\n const rawValue = event.currentTarget.value;\n const [nextDigits, didRejectCharacters] = normalizeOTPValueWithDetails(rawValue, length, validationType, normalizeValue);\n if (didRejectCharacters) {\n reportValueInvalid(rawValue, createGenericEventDetails(REASONS.inputChange, event.nativeEvent));\n }\n if (nextDigits === '') {\n if (rawValue === '') {\n setValue(removeOTPCharacter(value, index), createChangeEventDetails(REASONS.inputClear, event.nativeEvent));\n } else if (slotValue !== '') {\n event.currentTarget.value = slotValue;\n event.currentTarget.select();\n }\n return;\n }\n const nextValue = replaceOTPValue(value, index, nextDigits, length, validationType, normalizeValue);\n const committedValue = setValue(nextValue, createChangeEventDetails(REASONS.inputChange, event.nativeEvent));\n if (committedValue != null) {\n const nextInput = Math.min(index + nextDigits.length, length - 1);\n queueFocusInput(nextInput, committedValue);\n }\n },\n onKeyDown(event) {\n if (event.defaultPrevented || disabled) {\n return;\n }\n const firstIndex = 0;\n const lastIndex = Math.max(length - 1, firstIndex);\n const endTargetIndex = Math.min(value.length, lastIndex);\n const hasBoundaryModifier = (event.ctrlKey || event.metaKey) && !event.altKey;\n const isRtl = direction === 'rtl';\n const previousKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n const nextKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n if (event.key === previousKey) {\n stopEvent(event);\n focusInput(hasBoundaryModifier ? firstIndex : Math.max(firstIndex, index - 1));\n return;\n }\n if (event.key === nextKey) {\n stopEvent(event);\n focusInput(hasBoundaryModifier ? endTargetIndex : Math.min(lastIndex, index + 1));\n return;\n }\n if (event.key === 'Home' || event.key === 'ArrowUp') {\n stopEvent(event);\n focusInput(firstIndex);\n return;\n }\n if (event.key === 'End' || event.key === 'ArrowDown') {\n stopEvent(event);\n focusInput(endTargetIndex);\n return;\n }\n if (readOnly) {\n return;\n }\n function setKeyboardValue(nextValue, targetIndex) {\n const committedValue = setValue(nextValue, createChangeEventDetails(REASONS.keyboard, event.nativeEvent));\n if (committedValue != null) {\n queueFocusInput(targetIndex, committedValue);\n }\n }\n if (event.key === 'Backspace' && hasBoundaryModifier) {\n stopEvent(event);\n setKeyboardValue('', firstIndex);\n return;\n }\n if (event.key === 'Delete') {\n stopEvent(event);\n setKeyboardValue(removeOTPCharacter(value, index), index);\n return;\n }\n const inputValue = event.currentTarget.value;\n const fullSelection = event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === inputValue.length;\n if (event.key.length === 1 && fullSelection && slotValue === event.key) {\n stopEvent(event);\n if (index < length - 1) {\n focusInput(index + 1);\n }\n return;\n }\n if (event.key === 'Backspace') {\n stopEvent(event);\n const targetIndex = Math.max(firstIndex, index - 1);\n const deleteIndex = slotValue === '' ? targetIndex : index;\n setKeyboardValue(removeOTPCharacter(value, deleteIndex), targetIndex);\n }\n },\n onPaste(event) {\n if (event.defaultPrevented || disabled || readOnly) {\n return;\n }\n let rawValue = '';\n try {\n rawValue = event.clipboardData?.getData('text/plain') ?? '';\n } catch {\n /* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */\n if (process.env.NODE_ENV !== 'production') {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn('<OTPField.Input> could not read clipboard text during paste handling.', ownerStackMessage);\n }\n return;\n }\n event.preventDefault();\n const [nextDigits, didRejectCharacters] = normalizeOTPValueWithDetails(rawValue, length, validationType, normalizeValue);\n if (didRejectCharacters) {\n reportValueInvalid(rawValue, createGenericEventDetails(REASONS.inputPaste, event.nativeEvent));\n }\n if (nextDigits === '') {\n return;\n }\n const committedValue = setValue(replaceOTPValue(value, index, nextDigits, length, validationType, normalizeValue), createChangeEventDetails(REASONS.inputPaste, event.nativeEvent));\n if (committedValue != null) {\n const nextInput = Math.min(index + nextDigits.length, length - 1);\n queueFocusInput(nextInput, committedValue);\n }\n }\n };\n const element = useRenderElement('input', componentProps, {\n ref: [forwardedRef, listItemRef, inputRef],\n state: inputState,\n props: [inputProps, elementProps],\n stateAttributesMapping: inputStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") OTPFieldInput.displayName = \"OTPFieldInput\";","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { OTPField } from \"@base-ui/react/otp-field\";\n//#region src/components/otp-field/otp-field-input.tsx\nconst TROTPFieldInput = createComponentPart(OTPField.Input, \"tr-otp-field-digit\", { tracksFocusModality: true });\n//#endregion\nexport { TROTPFieldInput };\n\n//# sourceMappingURL=otp-field-input.js.map","\"use client\";\nimport { mergeComponentClassName } from \"../../internal/component-class-name.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { OTPField } from \"@base-ui/react/otp-field\";\n//#region src/components/otp-field/otp-field-root.tsx\nfunction TROTPFieldRoot({ appearance = \"solid\", className, layout = \"compact\", uiSize = \"md\", ...props }) {\n\treturn /* @__PURE__ */ jsx(OTPField.Root, {\n\t\t...props,\n\t\tclassName: mergeComponentClassName(\"tr-otp-field\", className),\n\t\t\"data-appearance\": appearance,\n\t\t\"data-layout\": layout,\n\t\t\"data-ui-size\": uiSize\n\t});\n}\n//#endregion\nexport { TROTPFieldRoot };\n\n//# sourceMappingURL=otp-field-root.js.map","import { mergeComponentClassName } from \"../../internal/component-class-name.js\";\nimport { TRSeparator } from \"../separator/separator.js\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/components/otp-field/otp-field-separator.tsx\nfunction TROTPFieldSeparator({ className, orientation = \"vertical\", ...props }) {\n\treturn /* @__PURE__ */ jsx(TRSeparator, {\n\t\t...props,\n\t\tclassName: mergeComponentClassName(\"tr-otp-field-separator\", className),\n\t\torientation\n\t});\n}\n//#endregion\nexport { TROTPFieldSeparator };\n\n//# sourceMappingURL=otp-field-separator.js.map","import { TROTPFieldInput } from \"./otp-field-input.js\";\nimport { TROTPFieldRoot } from \"./otp-field-root.js\";\nimport { TROTPFieldSeparator } from \"./otp-field-separator.js\";\n//#region src/components/otp-field/index.tsx\nconst TROTPField = {\n\tRoot: TROTPFieldRoot,\n\tInput: TROTPFieldInput,\n\tSeparator: TROTPFieldSeparator\n};\n//#endregion\nexport { TROTPField, TROTPFieldInput, TROTPFieldRoot, TROTPFieldSeparator };\n\n//# sourceMappingURL=index.js.map","import { TRField } from '@tinyrack/ui/components/field';\nimport { TROTPField } from '@tinyrack/ui/components/otp-field';\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport type { FieldError } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\n\nexport type PinInputRef = {\n focus: () => void;\n clear: () => void;\n};\n\ntype PinInputProps = {\n length?: number;\n error?: FieldError;\n disabled?: boolean;\n onComplete?: (value: string) => void;\n onChange?: (value: string) => void;\n value?: string;\n autoFocus?: boolean;\n className?: string;\n};\n\nexport const PinInput = forwardRef<PinInputRef, PinInputProps>(\n function PinInput(\n {\n length = 6,\n error,\n disabled = false,\n onComplete,\n onChange,\n value: controlledValue,\n autoFocus = false,\n className = '',\n },\n ref,\n ) {\n const { t } = useTranslation();\n const otpId = useId();\n const containerRef = useRef<HTMLDivElement>(null);\n const [internalValue, setInternalValue] = useState(controlledValue ?? '');\n\n useEffect(() => {\n if (controlledValue !== undefined) {\n setInternalValue(controlledValue);\n }\n }, [controlledValue]);\n\n useImperativeHandle(\n ref,\n () => ({\n focus: () => {\n const firstInput = containerRef.current?.querySelector('input');\n firstInput?.focus();\n },\n clear: () => {\n setInternalValue('');\n const firstInput = containerRef.current?.querySelector('input');\n firstInput?.focus();\n },\n }),\n [],\n );\n\n const handleValueChange = useCallback(\n (newValue: string) => {\n setInternalValue(newValue);\n onChange?.(newValue);\n },\n [onChange],\n );\n\n const handleValueComplete = useCallback(\n (completedValue: string) => {\n onComplete?.(completedValue);\n },\n [onComplete],\n );\n\n return (\n <TRField.Root className={`w-full ${className}`} ref={containerRef}>\n {/*\n A real label, not `aria-label`: Base UI deliberately ignores\n `aria-label` on the first OTP input and warns to use a label instead,\n because that input is also the one password managers autofill.\n Visually hidden — the screen's own heading already says what the code\n is, so showing it twice would be noise.\n */}\n <TRField.Label className=\"sr-only\" htmlFor={otpId}>\n {t('common.otp.label')}\n </TRField.Label>\n <TROTPField.Root\n disabled={disabled}\n /*\n * Base UI gives the first slot the root's own id and derives the\n * rest from it, so naming the root is what lets the label point at\n * a real input rather than at the wrapping group.\n */\n id={otpId}\n layout=\"stretch\"\n length={length}\n onValueChange={handleValueChange}\n onValueComplete={handleValueComplete}\n uiSize=\"lg\"\n validationType=\"numeric\"\n value={internalValue}\n >\n {/*\n Each box is a separate input, so each needs to say which position\n it is. Two Base UI behaviours shape this: the first box ignores\n `aria-label` outright (it is the one password managers autofill, so\n it takes the field's own label), and on the rest an `aria-label`\n *replaces* the inherited field name rather than adding to it. So\n the field name is folded into the per-box string, and box one is\n left to the label above.\n */}\n {Array.from({ length }, (_, index) => (\n <TROTPField.Input\n aria-label={\n index === 0\n ? undefined\n : t('common.otp.digit', {\n label: t('common.otp.label'),\n position: index + 1,\n total: length,\n })\n }\n autoFocus={autoFocus && index === 0}\n key={index}\n />\n ))}\n </TROTPField.Root>\n {error && (\n <p\n className=\"mt-tinyrack-sm text-center text-tinyrack-danger-foreground text-tinyrack-sm\"\n data-testid=\"pin-input-error\"\n >\n {error.message}\n </p>\n )}\n </TRField.Root>\n );\n },\n);\n\nexport default PinInput;\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":"ygBAIa,EAAmC,EAAM,cAAc,IAAA,EAAS,EAE7E,SAAgB,IAAyB,CACvC,IAAM,EAAA,EAAgB,WAAW,CAAmB,EACpD,GAAI,IAAY,IAAA,GACd,MAAU,MAAiJA,EAAoB,EAAE,CAAC,EAEpL,OAAO,CACT,CACA,SAAgB,EAAsB,EAAO,EAAO,EAAO,CACzD,MAAO,CACL,GAAG,EACH,QACA,QACA,OAAQ,IAAU,EACpB,CACF,CCnBA,IAAa,EAA6B,CACxC,UAAa,KACb,WAAc,KACd,GAAG,CACL,EACa,EAA8B,CACzC,UAAa,KACb,UAAa,KACb,GAAG,CACL,ECVM,EAAwB,CAC5B,QAAS,CACP,YAAa,SACb,eAAgB,GAAU,OAAO,EAAO,GACxC,OAAQ,SACR,UAAW,SACb,EACA,MAAO,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AA,IAAA,CAAC,EAAW,KAAZ,CACY,WAMV,GAAI,EACJ,OAAO,UACC,SACR,cAAe,EACf,gBAAiB,EACjB,OAAO,KACP,eAAe,UACf,MAAO,YAWN,MAAM,KAAK,CAAE,QAAO,GAAI,EAAG,KAC1B,EAAA,EAAA,IAAA,CAAC,EAAW,MAAZ,CACE,aACE,IAAU,EACN,IAAA,GACA,EAAE,mBAAoB,CACpB,MAAO,EAAE,kBAAkB,EAC3B,SAAU,EAAQ,EAClB,MAAO,CACT,CAAC,EAEP,UAAW,GAAa,IAAU,CAEnC,EADM,CACN,CACF,CACc,CAAA,EAChB,IACC,EAAA,EAAA,IAAA,CAAC,IAAD,CACE,UAAU,8EACV,cAAY,2BAEX,EAAM,OACN,CAAA,CAEO,GAElB,CACF"}
|
|
1
|
+
{"version":3,"file":"pin-input-DhsRO4Ei.js","names":["_formatErrorMessage","REASONS.inputChange","REASONS.inputClear","REASONS.keyboard","REASONS.inputPaste","OTPField.Input","OTPField.Root"],"sources":["../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/root/OTPFieldRootContext.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/utils/stateAttributesMapping.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/utils/otp.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/root/OTPFieldRoot.mjs","../../../../node_modules/.pnpm/@base-ui+react@1.7.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@base-ui/react/otp-field/input/OTPFieldInput.mjs","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/otp-field-input.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/otp-field-root.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/otp-field-separator.js","../../../../node_modules/.pnpm/@tinyrack+ui@0.31.0_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7_shiki@4.4.2_tailwindcss@4.3.2/node_modules/@tinyrack/ui/dist/components/otp-field/index.js","../../../frontend/src/components/ui/pin-input.tsx"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const OTPFieldRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") OTPFieldRootContext.displayName = \"OTPFieldRootContext\";\nexport function useOTPFieldRootContext() {\n const context = React.useContext(OTPFieldRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: OTPFieldRootContext is missing. OTPField parts must be placed within <OTPField.Root>.' : _formatErrorMessage(98));\n }\n return context;\n}\nexport function getOTPFieldInputState(state, value, index) {\n return {\n ...state,\n value,\n index,\n filled: value !== ''\n };\n}","import { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nexport const rootStateAttributesMapping = {\n value: () => null,\n length: () => null,\n ...fieldValidityMapping\n};\nexport const inputStateAttributesMapping = {\n value: () => null,\n index: () => null,\n ...fieldValidityMapping\n};","const OTP_VALIDATION_CONFIG = {\n numeric: {\n slotPattern: '\\\\d{1}',\n getRootPattern: length => `\\\\d{${length}}`,\n regexp: /[^\\d]/g,\n inputMode: 'numeric'\n },\n alpha: {\n slotPattern: '[a-zA-Z]{1}',\n getRootPattern: length => `[a-zA-Z]{${length}}`,\n regexp: /[^a-zA-Z]/g,\n inputMode: 'text'\n },\n alphanumeric: {\n slotPattern: '[a-zA-Z0-9]{1}',\n getRootPattern: length => `[a-zA-Z0-9]{${length}}`,\n regexp: /[^a-zA-Z0-9]/g,\n inputMode: 'text'\n }\n};\nexport function getOTPValidationConfig(validationType) {\n if (validationType === 'none') {\n return null;\n }\n return OTP_VALIDATION_CONFIG[validationType];\n}\nexport function stripOTPWhitespace(value) {\n return (value ?? '').replace(/\\s/g, '');\n}\nfunction applyOTPValidation(value, validation) {\n return validation ? value.replace(validation.regexp, '') : value;\n}\n\n/**\n * Normalizes user-entered OTP text by stripping whitespace, applying validation and custom\n * normalization, and clamping the final value to the configured slot count.\n */\nexport function normalizeOTPValueWithDetails(value, length, validationType, normalizeValue) {\n const strippedValue = stripOTPWhitespace(value);\n const validation = getOTPValidationConfig(validationType);\n let normalizedValue = applyOTPValidation(strippedValue, validation);\n let didRejectCharacters = strippedValue.length > normalizedValue.length;\n if (normalizeValue) {\n const customNormalizedValue = normalizeValue(normalizedValue);\n didRejectCharacters ||= normalizedValue.length > customNormalizedValue.length;\n normalizedValue = applyOTPValidation(customNormalizedValue, validation);\n didRejectCharacters ||= customNormalizedValue.length > normalizedValue.length;\n }\n\n // Slice by Unicode code points so multi-byte characters do not split across OTP slots.\n const maxLength = length < 0 ? 0 : length;\n const normalizedCharacters = Array.from(normalizedValue);\n return [normalizedCharacters.slice(0, maxLength).join(''), didRejectCharacters || normalizedCharacters.length > maxLength];\n}\nexport function normalizeOTPValue(value, length, validationType, normalizeValue) {\n return normalizeOTPValueWithDetails(value, length, validationType, normalizeValue)[0];\n}\n\n/**\n * Replaces characters starting at the provided slot index, then re-normalizes the final OTP value\n * so paste and multi-character edits stay contiguous and length-bounded.\n */\nexport function replaceOTPValue(currentValue, index, nextValue, length, validationType, normalizeValue) {\n const normalizedValue = normalizeOTPValue(nextValue, length, validationType, normalizeValue);\n const prefix = currentValue.slice(0, index);\n const suffix = currentValue.slice(index + normalizedValue.length);\n return normalizeOTPValue(`${prefix}${normalizedValue}${suffix}`, length, validationType, normalizeValue);\n}\nexport function removeOTPCharacter(currentValue, index) {\n if (index < 0 || index >= currentValue.length) {\n return currentValue;\n }\n return `${currentValue.slice(0, index)}${currentValue.slice(index + 1)}`;\n}","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { warn } from '@base-ui/utils/warn';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { contains } from \"../../floating-ui-react/utils.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { useAriaLabelledBy } from \"../../internals/labelable-provider/useAriaLabelledBy.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { OTPFieldRootContext } from \"./OTPFieldRootContext.mjs\";\nimport { rootStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { getOTPValidationConfig, normalizeOTPValue, normalizeOTPValueWithDetails } from \"../utils/otp.mjs\";\n\n/**\n * Groups all OTP field parts and manages their state.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI OTP Field](https://base-ui.com/react/components/otp-field)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const OTPFieldRoot = /*#__PURE__*/React.forwardRef(function OTPFieldRoot(componentProps, forwardedRef) {\n const {\n 'aria-describedby': ariaDescribedByProp,\n 'aria-labelledby': ariaLabelledByProp,\n id: idProp,\n autoComplete = 'one-time-code',\n defaultValue,\n value: valueProp,\n onValueChange,\n onValueComplete: onValueCompleteProp,\n form,\n length,\n autoSubmit = false,\n mask = false,\n inputMode: inputModeProp,\n validationType = 'numeric',\n normalizeValue,\n disabled: disabledProp = false,\n readOnly = false,\n required = false,\n name: nameProp,\n onValueInvalid,\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n setDirty,\n validityData,\n disabled: fieldDisabled,\n setFilled,\n invalid,\n name: fieldName,\n state: fieldState,\n validation,\n validationMode,\n setFocused,\n setTouched\n } = useFieldRootContext();\n const {\n clearErrors\n } = useFormContext();\n const {\n getDescriptionProps,\n labelId\n } = useLabelableContext();\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const [valueUnwrapped, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'OTPField',\n state: 'value'\n });\n const rootRef = React.useRef(null);\n const inputRefs = React.useRef([]);\n const pendingFocusRef = React.useRef(null);\n const pendingCompleteValueRef = React.useRef(null);\n const firstInputRef = React.useMemo(() => ({\n get current() {\n return inputRefs.current[0] ?? null;\n }\n }), []);\n const id = useLabelableId({\n id: idProp\n });\n const ariaLabelledBy = useAriaLabelledBy(ariaLabelledByProp, labelId, firstInputRef, true, id);\n const inputAriaLabelledBy = ariaLabelledByProp == null ? ariaLabelledBy : undefined;\n const fieldDescriptionProps = getDescriptionProps({});\n const ariaDescribedBy = mergeAriaIds(ariaDescribedByProp, fieldDescriptionProps['aria-describedby']);\n const validationConfig = getOTPValidationConfig(validationType);\n const pattern = validationConfig?.slotPattern;\n const hiddenInputPattern = validationConfig?.getRootPattern(length);\n const inputMode = inputModeProp ?? validationConfig?.inputMode;\n const hasValidLength = Number.isInteger(length) && length > 0;\n const value = normalizeOTPValue(valueUnwrapped, length, validationType, normalizeValue);\n const valueRef = useValueAsRef(value);\n const filled = value !== '';\n const [inputCount, setInputCount] = React.useState(0);\n const [focusedIndex, setFocusedIndex] = React.useState(() => Math.min(value.length, length - 1));\n const [focused, setFocusedState] = React.useState(false);\n const activeIndex = focused ? Math.min(focusedIndex, Math.max(length - 1, 0)) : Math.min(value.length, length - 1);\n useIsoLayoutEffect(() => {\n setFilled(filled);\n }, [filled, setFilled]);\n\n /* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useOTPFieldRootDevWarnings({\n inputCount,\n length\n });\n }\n useRegisterFieldControl(firstInputRef, id, value, undefined, !disabled, nameProp);\n const focusInput = useStableCallback(index => {\n const targetIndex = Math.min(Math.max(index, 0), Math.max(inputRefs.current.length - 1, 0));\n const target = inputRefs.current[targetIndex];\n target?.focus();\n target?.select();\n });\n const queueFocusInput = useStableCallback((index, nextValue) => {\n pendingFocusRef.current = {\n index,\n value: nextValue\n };\n });\n function requestSubmit() {\n // The hidden validation input only renders for a valid `length`, but the slots always do,\n // so fall back to the owning form of the first slot.\n let formElement = validation.inputRef.current?.form ?? inputRefs.current[0]?.form ?? null;\n if (form) {\n const associatedElement = ownerDocument(rootRef.current).getElementById(form);\n if (associatedElement?.tagName === 'FORM') {\n formElement = associatedElement;\n }\n }\n if (formElement && typeof formElement.requestSubmit === 'function') {\n formElement.requestSubmit();\n }\n }\n function completeValue(completedValue, eventDetails) {\n onValueCompleteProp?.(completedValue, eventDetails);\n if (autoSubmit) {\n requestSubmit();\n }\n }\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(value !== validityData.initialValue);\n validation.change(value);\n const pendingFocus = pendingFocusRef.current;\n if (pendingFocus != null) {\n pendingFocusRef.current = null;\n if (pendingFocus.value === value) {\n focusInput(pendingFocus.index);\n }\n }\n const pendingCompleteValue = pendingCompleteValueRef.current;\n if (pendingCompleteValue != null) {\n pendingCompleteValueRef.current = null;\n if (pendingCompleteValue.value === value) {\n completeValue(value, pendingCompleteValue.eventDetails);\n }\n }\n });\n const setValue = useStableCallback((nextValue, details) => {\n const normalizedValue = normalizeOTPValue(nextValue, length, validationType, normalizeValue);\n const canComplete = details.reason === REASONS.inputChange || details.reason === REASONS.inputPaste;\n const completeEventDetails = canComplete && normalizedValue.length === length && (valueRef.current.length !== length || details.reason === REASONS.inputPaste) ? createGenericEventDetails(details.reason, details.event) : null;\n if (normalizedValue === valueRef.current) {\n if (completeEventDetails != null) {\n completeValue(normalizedValue, completeEventDetails);\n }\n return null;\n }\n onValueChange?.(normalizedValue, details);\n if (details.isCanceled) {\n return null;\n }\n setValueUnwrapped(normalizedValue);\n if (completeEventDetails != null) {\n pendingCompleteValueRef.current = {\n value: normalizedValue,\n eventDetails: completeEventDetails\n };\n } else if (normalizedValue.length !== length) {\n pendingCompleteValueRef.current = null;\n }\n return normalizedValue;\n });\n const reportValueInvalid = useStableCallback((invalidValue, details) => {\n onValueInvalid?.(invalidValue, details);\n });\n const handleInputFocus = useStableCallback((index, event) => {\n if (index > valueRef.current.length) {\n focusInput(Math.min(valueRef.current.length, length - 1));\n return;\n }\n setFocusedIndex(index);\n setFocusedState(true);\n setFocused(true);\n event.currentTarget.select();\n });\n const handleInputBlur = useStableCallback(event => {\n if (contains(rootRef.current, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocusedState(false);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(valueRef.current);\n }\n });\n const getInputId = React.useCallback(index => {\n if (id == null) {\n return undefined;\n }\n return index === 0 ? id : `${id}-${index + 1}`;\n }, [id]);\n const state = React.useMemo(() => ({\n ...fieldState,\n complete: value.length === length,\n disabled,\n filled,\n focused,\n length,\n readOnly,\n required,\n value\n }), [disabled, fieldState, filled, focused, length, readOnly, required, value]);\n const contextValue = React.useMemo(() => ({\n autoComplete,\n activeIndex,\n disabled,\n form,\n focusInput,\n queueFocusInput,\n getInputId,\n handleInputBlur,\n handleInputFocus,\n inputMode,\n inputAriaLabelledBy,\n invalid,\n length,\n mask,\n pattern,\n reportValueInvalid,\n readOnly,\n required,\n normalizeValue,\n setValue,\n state,\n validationType,\n value\n }), [activeIndex, autoComplete, disabled, focusInput, form, getInputId, handleInputBlur, handleInputFocus, inputMode, inputAriaLabelledBy, invalid, length, mask, pattern, queueFocusInput, readOnly, reportValueInvalid, required, normalizeValue, setValue, state, validationType, value]);\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, rootRef],\n state,\n props: [{\n role: 'group',\n 'aria-describedby': ariaDescribedBy,\n 'aria-labelledby': ariaLabelledBy\n }, elementProps],\n stateAttributesMapping: rootStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: inputRefs,\n onMapChange: newMap => {\n setInputCount(newMap.size);\n },\n children: /*#__PURE__*/_jsxs(OTPFieldRootContext.Provider, {\n value: contextValue,\n children: [element, hasValidLength && /*#__PURE__*/_jsx(\"input\", {\n ...validation.getValidationProps(disabled, {\n onFocus() {\n focusInput(0);\n },\n onChange(event) {\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const rawValue = event.currentTarget.value;\n const [normalizedValue, didRejectCharacters] = normalizeOTPValueWithDetails(rawValue, length, validationType, normalizeValue);\n if (didRejectCharacters) {\n reportValueInvalid(rawValue, createGenericEventDetails(REASONS.inputChange, event.nativeEvent));\n }\n const committedValue = setValue(normalizedValue, createChangeEventDetails(REASONS.inputChange, event.nativeEvent));\n if (committedValue != null && committedValue !== '') {\n queueFocusInput(committedValue.length - 1, committedValue);\n }\n }\n }),\n ref: validation.inputRef,\n type: \"text\",\n id: id && name == null ? `${id}-hidden-input` : undefined,\n form: form,\n name: name,\n value: value,\n autoComplete: autoComplete,\n inputMode: inputMode,\n minLength: length,\n maxLength: length,\n pattern: hiddenInputPattern,\n disabled: disabled,\n readOnly: readOnly,\n required: required,\n \"aria-hidden\": true,\n tabIndex: -1,\n style: name ? visuallyHiddenInput : visuallyHidden\n })]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") OTPFieldRoot.displayName = \"OTPFieldRoot\";\nfunction mergeAriaIds(...values) {\n const ids = values.flatMap(value => value?.split(/\\s+/).filter(Boolean) ?? []);\n return ids.length > 0 ? Array.from(new Set(ids)).join(' ') : undefined;\n}\nfunction useOTPFieldRootDevWarnings(parameters) {\n const {\n inputCount,\n length\n } = parameters;\n React.useEffect(() => {\n if (!Number.isInteger(length) || length <= 0 || inputCount === 0 || inputCount === length) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = '<OTPField.Root> `length` must match the number of rendered ' + `<OTPField.Input /> parts. Received \\`length={${length}}\\` but rendered ` + `${inputCount} input${inputCount === 1 ? '' : 's'}.`;\n warn(message, ownerStackMessage);\n }, [inputCount, length]);\n React.useEffect(() => {\n if (Number.isInteger(length) && length > 0) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn(`<OTPField.Root> \\`length\\` must be a positive integer. Received \\`length={${String(length)}}\\`.`, ownerStackMessage);\n }, [length]);\n}","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { warn } from '@base-ui/utils/warn';\nimport { stopEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useOTPFieldRootContext, getOTPFieldInputState } from \"../root/OTPFieldRootContext.mjs\";\nimport { inputStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { normalizeOTPValueWithDetails, removeOTPCharacter, replaceOTPValue } from \"../utils/otp.mjs\";\n\n/**\n * An individual OTP character input.\n * Renders an `<input>` element.\n *\n * Documentation: [Base UI OTP Field](https://base-ui.com/react/components/otp-field)\n */\nexport const OTPFieldInput = /*#__PURE__*/React.forwardRef(function OTPFieldInput(componentProps, forwardedRef) {\n const {\n 'aria-label': externalAriaLabel,\n 'aria-labelledby': externalAriaLabelledBy,\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n activeIndex,\n autoComplete,\n disabled,\n form,\n focusInput,\n queueFocusInput,\n getInputId,\n handleInputBlur,\n handleInputFocus,\n inputMode,\n inputAriaLabelledBy,\n invalid,\n length,\n mask,\n pattern,\n reportValueInvalid,\n readOnly,\n required,\n normalizeValue,\n setValue,\n state,\n validationType,\n value\n } = useOTPFieldRootContext();\n const {\n ref: listItemRef,\n index\n } = useCompositeListItem({\n guess: true\n });\n const inputRef = React.useRef(null);\n const direction = useDirection();\n const slotValue = value[index] ?? '';\n const inputState = getOTPFieldInputState(state, slotValue, index);\n const slotAriaLabel = externalAriaLabel;\n const inheritedLabel = externalAriaLabelledBy ?? inputAriaLabelledBy;\n const ariaLabel = index === 0 ? undefined : slotAriaLabel;\n\n /* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (index !== 0 || slotAriaLabel == null || inputRef.current?.labels?.length) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn('<OTPField.Input> ignores `aria-label` on the first input. Use a `<label>` or `<Field.Label>` to label the OTP field.', ownerStackMessage);\n }, [index, slotAriaLabel]);\n }\n const inputProps = {\n id: getInputId(index),\n value: slotValue,\n type: mask ? 'password' : 'text',\n inputMode,\n autoComplete: index === 0 ? autoComplete : 'off',\n autoCorrect: 'off',\n spellCheck: 'false',\n enterKeyHint: index === length - 1 ? 'done' : 'next',\n // Only the first slot has a max length to avoid password manager bubbles appearing after later inputs.\n maxLength: index === 0 ? length : undefined,\n tabIndex: activeIndex === index ? 0 : -1,\n disabled,\n form,\n pattern,\n readOnly,\n required,\n 'aria-labelledby': ariaLabel == null ? inheritedLabel : undefined,\n 'aria-invalid': !disabled && invalid ? true : undefined,\n 'aria-label': ariaLabel,\n onMouseDown(event) {\n if (event.defaultPrevented || disabled) {\n return;\n }\n event.preventDefault();\n focusInput(index);\n },\n onFocus(event) {\n if (event.defaultPrevented || disabled) {\n return;\n }\n handleInputFocus(index, event);\n },\n onBlur(event) {\n if (event.defaultPrevented) {\n return;\n }\n handleInputBlur(event);\n },\n onChange(event) {\n if (event.defaultPrevented || disabled || readOnly) {\n return;\n }\n const rawValue = event.currentTarget.value;\n const [nextDigits, didRejectCharacters] = normalizeOTPValueWithDetails(rawValue, length, validationType, normalizeValue);\n if (didRejectCharacters) {\n reportValueInvalid(rawValue, createGenericEventDetails(REASONS.inputChange, event.nativeEvent));\n }\n if (nextDigits === '') {\n if (rawValue === '') {\n setValue(removeOTPCharacter(value, index), createChangeEventDetails(REASONS.inputClear, event.nativeEvent));\n } else if (slotValue !== '') {\n event.currentTarget.value = slotValue;\n event.currentTarget.select();\n }\n return;\n }\n const nextValue = replaceOTPValue(value, index, nextDigits, length, validationType, normalizeValue);\n const committedValue = setValue(nextValue, createChangeEventDetails(REASONS.inputChange, event.nativeEvent));\n if (committedValue != null) {\n const nextInput = Math.min(index + nextDigits.length, length - 1);\n queueFocusInput(nextInput, committedValue);\n }\n },\n onKeyDown(event) {\n if (event.defaultPrevented || disabled) {\n return;\n }\n const firstIndex = 0;\n const lastIndex = Math.max(length - 1, firstIndex);\n const endTargetIndex = Math.min(value.length, lastIndex);\n const hasBoundaryModifier = (event.ctrlKey || event.metaKey) && !event.altKey;\n const isRtl = direction === 'rtl';\n const previousKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n const nextKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n if (event.key === previousKey) {\n stopEvent(event);\n focusInput(hasBoundaryModifier ? firstIndex : Math.max(firstIndex, index - 1));\n return;\n }\n if (event.key === nextKey) {\n stopEvent(event);\n focusInput(hasBoundaryModifier ? endTargetIndex : Math.min(lastIndex, index + 1));\n return;\n }\n if (event.key === 'Home' || event.key === 'ArrowUp') {\n stopEvent(event);\n focusInput(firstIndex);\n return;\n }\n if (event.key === 'End' || event.key === 'ArrowDown') {\n stopEvent(event);\n focusInput(endTargetIndex);\n return;\n }\n if (readOnly) {\n return;\n }\n function setKeyboardValue(nextValue, targetIndex) {\n const committedValue = setValue(nextValue, createChangeEventDetails(REASONS.keyboard, event.nativeEvent));\n if (committedValue != null) {\n queueFocusInput(targetIndex, committedValue);\n }\n }\n if (event.key === 'Backspace' && hasBoundaryModifier) {\n stopEvent(event);\n setKeyboardValue('', firstIndex);\n return;\n }\n if (event.key === 'Delete') {\n stopEvent(event);\n setKeyboardValue(removeOTPCharacter(value, index), index);\n return;\n }\n const inputValue = event.currentTarget.value;\n const fullSelection = event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === inputValue.length;\n if (event.key.length === 1 && fullSelection && slotValue === event.key) {\n stopEvent(event);\n if (index < length - 1) {\n focusInput(index + 1);\n }\n return;\n }\n if (event.key === 'Backspace') {\n stopEvent(event);\n const targetIndex = Math.max(firstIndex, index - 1);\n const deleteIndex = slotValue === '' ? targetIndex : index;\n setKeyboardValue(removeOTPCharacter(value, deleteIndex), targetIndex);\n }\n },\n onPaste(event) {\n if (event.defaultPrevented || disabled || readOnly) {\n return;\n }\n let rawValue = '';\n try {\n rawValue = event.clipboardData?.getData('text/plain') ?? '';\n } catch {\n /* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */\n if (process.env.NODE_ENV !== 'production') {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn('<OTPField.Input> could not read clipboard text during paste handling.', ownerStackMessage);\n }\n return;\n }\n event.preventDefault();\n const [nextDigits, didRejectCharacters] = normalizeOTPValueWithDetails(rawValue, length, validationType, normalizeValue);\n if (didRejectCharacters) {\n reportValueInvalid(rawValue, createGenericEventDetails(REASONS.inputPaste, event.nativeEvent));\n }\n if (nextDigits === '') {\n return;\n }\n const committedValue = setValue(replaceOTPValue(value, index, nextDigits, length, validationType, normalizeValue), createChangeEventDetails(REASONS.inputPaste, event.nativeEvent));\n if (committedValue != null) {\n const nextInput = Math.min(index + nextDigits.length, length - 1);\n queueFocusInput(nextInput, committedValue);\n }\n }\n };\n const element = useRenderElement('input', componentProps, {\n ref: [forwardedRef, listItemRef, inputRef],\n state: inputState,\n props: [inputProps, elementProps],\n stateAttributesMapping: inputStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") OTPFieldInput.displayName = \"OTPFieldInput\";","\"use client\";\nimport { createComponentPart } from \"../../internal/component-part.js\";\nimport { OTPField } from \"@base-ui/react/otp-field\";\n//#region src/components/otp-field/otp-field-input.tsx\nconst TROTPFieldInput = createComponentPart(OTPField.Input, \"tr-otp-field-digit\", { tracksFocusModality: true });\n//#endregion\nexport { TROTPFieldInput };\n\n//# sourceMappingURL=otp-field-input.js.map","\"use client\";\nimport { mergeComponentClassName } from \"../../internal/component-class-name.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { OTPField } from \"@base-ui/react/otp-field\";\n//#region src/components/otp-field/otp-field-root.tsx\nfunction TROTPFieldRoot({ appearance = \"solid\", className, layout = \"compact\", uiSize = \"md\", ...props }) {\n\treturn /* @__PURE__ */ jsx(OTPField.Root, {\n\t\t...props,\n\t\tclassName: mergeComponentClassName(\"tr-otp-field\", className),\n\t\t\"data-appearance\": appearance,\n\t\t\"data-layout\": layout,\n\t\t\"data-ui-size\": uiSize\n\t});\n}\n//#endregion\nexport { TROTPFieldRoot };\n\n//# sourceMappingURL=otp-field-root.js.map","import { mergeComponentClassName } from \"../../internal/component-class-name.js\";\nimport { TRSeparator } from \"../separator/separator.js\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/components/otp-field/otp-field-separator.tsx\nfunction TROTPFieldSeparator({ className, orientation = \"vertical\", ...props }) {\n\treturn /* @__PURE__ */ jsx(TRSeparator, {\n\t\t...props,\n\t\tclassName: mergeComponentClassName(\"tr-otp-field-separator\", className),\n\t\torientation\n\t});\n}\n//#endregion\nexport { TROTPFieldSeparator };\n\n//# sourceMappingURL=otp-field-separator.js.map","import { TROTPFieldInput } from \"./otp-field-input.js\";\nimport { TROTPFieldRoot } from \"./otp-field-root.js\";\nimport { TROTPFieldSeparator } from \"./otp-field-separator.js\";\n//#region src/components/otp-field/index.tsx\nconst TROTPField = {\n\tRoot: TROTPFieldRoot,\n\tInput: TROTPFieldInput,\n\tSeparator: TROTPFieldSeparator\n};\n//#endregion\nexport { TROTPField, TROTPFieldInput, TROTPFieldRoot, TROTPFieldSeparator };\n\n//# sourceMappingURL=index.js.map","import { TRField } from '@tinyrack/ui/components/field';\nimport { TROTPField } from '@tinyrack/ui/components/otp-field';\nimport { TRText } from '@tinyrack/ui/components/text';\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport type { FieldError } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\n\nexport type PinInputRef = {\n focus: () => void;\n clear: () => void;\n};\n\ntype PinInputProps = {\n length?: number;\n error?: FieldError;\n disabled?: boolean;\n onComplete?: (value: string) => void;\n onChange?: (value: string) => void;\n value?: string;\n autoFocus?: boolean;\n className?: string;\n};\n\nexport const PinInput = forwardRef<PinInputRef, PinInputProps>(\n function PinInput(\n {\n length = 6,\n error,\n disabled = false,\n onComplete,\n onChange,\n value: controlledValue,\n autoFocus = false,\n className = '',\n },\n ref,\n ) {\n const { t } = useTranslation();\n const otpId = useId();\n const containerRef = useRef<HTMLDivElement>(null);\n const [internalValue, setInternalValue] = useState(controlledValue ?? '');\n\n useEffect(() => {\n if (controlledValue !== undefined) {\n setInternalValue(controlledValue);\n }\n }, [controlledValue]);\n\n useImperativeHandle(\n ref,\n () => ({\n focus: () => {\n const firstInput = containerRef.current?.querySelector('input');\n firstInput?.focus();\n },\n clear: () => {\n setInternalValue('');\n const firstInput = containerRef.current?.querySelector('input');\n firstInput?.focus();\n },\n }),\n [],\n );\n\n const handleValueChange = useCallback(\n (newValue: string) => {\n setInternalValue(newValue);\n onChange?.(newValue);\n },\n [onChange],\n );\n\n const handleValueComplete = useCallback(\n (completedValue: string) => {\n onComplete?.(completedValue);\n },\n [onComplete],\n );\n\n return (\n <TRField.Root className={`w-full ${className}`} ref={containerRef}>\n {/*\n A real label, not `aria-label`: Base UI deliberately ignores\n `aria-label` on the first OTP input and warns to use a label instead,\n because that input is also the one password managers autofill.\n Visually hidden — the screen's own heading already says what the code\n is, so showing it twice would be noise.\n */}\n <TRField.Label className=\"sr-only\" htmlFor={otpId}>\n {t('common.otp.label')}\n </TRField.Label>\n <TROTPField.Root\n disabled={disabled}\n /*\n * Base UI gives the first slot the root's own id and derives the\n * rest from it, so naming the root is what lets the label point at\n * a real input rather than at the wrapping group.\n */\n id={otpId}\n layout=\"stretch\"\n length={length}\n onValueChange={handleValueChange}\n onValueComplete={handleValueComplete}\n uiSize=\"lg\"\n validationType=\"numeric\"\n value={internalValue}\n >\n {/*\n Each box is a separate input, so each needs to say which position\n it is. Two Base UI behaviours shape this: the first box ignores\n `aria-label` outright (it is the one password managers autofill, so\n it takes the field's own label), and on the rest an `aria-label`\n *replaces* the inherited field name rather than adding to it. So\n the field name is folded into the per-box string, and box one is\n left to the label above.\n */}\n {Array.from({ length }, (_, index) => (\n <TROTPField.Input\n aria-label={\n index === 0\n ? undefined\n : t('common.otp.digit', {\n label: t('common.otp.label'),\n position: index + 1,\n total: length,\n })\n }\n autoFocus={autoFocus && index === 0}\n key={index}\n />\n ))}\n </TROTPField.Root>\n {error && (\n <TRText\n align=\"center\"\n as=\"p\"\n className=\"mt-tinyrack-sm\"\n color=\"danger\"\n data-testid=\"pin-input-error\"\n variant=\"bodySm\"\n >\n {error.message}\n </TRText>\n )}\n </TRField.Root>\n );\n },\n);\n\nexport default PinInput;\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":"8gBAIa,EAAmC,EAAM,cAAc,IAAA,EAAS,EAE7E,SAAgB,GAAyB,CACvC,IAAM,EAAA,EAAgB,WAAW,CAAmB,EACpD,GAAI,IAAY,IAAA,GACd,MAAU,MAAiJA,EAAoB,EAAE,CAAC,EAEpL,OAAO,CACT,CACA,SAAgB,EAAsB,EAAO,EAAO,EAAO,CACzD,MAAO,CACL,GAAG,EACH,QACA,QACA,OAAQ,IAAU,EACpB,CACF,CCnBA,IAAa,GAA6B,CACxC,UAAa,KACb,WAAc,KACd,GAAG,CACL,EACa,GAA8B,CACzC,UAAa,KACb,UAAa,KACb,GAAG,CACL,ECVM,EAAwB,CAC5B,QAAS,CACP,YAAa,SACb,eAAgB,GAAU,OAAO,EAAO,GACxC,OAAQ,SACR,UAAW,SACb,EACA,MAAO,CACL,YAAa,cACb,eAAgB,GAAU,YAAY,EAAO,GAC7C,OAAQ,aACR,UAAW,MACb,EACA,aAAc,CACZ,YAAa,iBACb,eAAgB,GAAU,eAAe,EAAO,GAChD,OAAQ,gBACR,UAAW,MACb,CACF,EACA,SAAgB,EAAuB,EAAgB,CAIrD,OAHI,IAAmB,OACd,KAEF,EAAsB,EAC/B,CACA,SAAgB,GAAmB,EAAO,CACxC,OAAQ,GAAS,GAAA,CAAI,QAAQ,MAAO,EAAE,CACxC,CACA,SAAS,EAAmB,EAAO,EAAY,CAC7C,OAAO,EAAa,EAAM,QAAQ,EAAW,OAAQ,EAAE,EAAI,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AAA,CAAC,EAAD,CACE,MAAM,SACN,GAAG,IACH,UAAU,iBACV,MAAM,SACN,cAAY,kBACZ,QAAQ,kBAEP,EAAM,OACD,CAAA,CAEE,GAElB,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{K as e,X as t,Z as n,et as r,i,n as a,r as o,s,t as c}from"./createLucideIcon-D-yizrWN.js";import{Ar as l,In as u,i as d,n as f,r as p,t as m}from"./config-C18-l7z7.js";import{t as h}from"./mutationOptions-Cv_vJkJn.js";import{t as g}from"./useMutation-DqIIIiBW.js";import{Dt as _,n as v,o as y,q as b,t as x}from"./shell-header-bar-CdOEWmCT.js";import{t as S}from"./useQuery-CLr9TaKA.js";import{a as C,i as w,n as T,r as E,t as D}from"./use-totp-setup-KOVNS2DC.js";import{t as O}from"./auth-field-BpJ4AHtU.js";import{t as k}from"./fingerprint-pattern-BwUoN1_w.js";import{t as A}from"./key-round-BxWppK6h.js";import{n as j,t as M}from"./provider-mark-CeYazOfu.js";import{n as N,r as ee,t as te}from"./logout-Dphj1d_0.js";import{t as P}from"./shield-check-DpYF8yeI.js";import{t as F}from"./trash-2-B3NVE8pR.js";import{t as I}from"./triangle-alert-DATO9o3k.js";import{t as L}from"./zod-Dszyrytb.js";import{D as ne,E as R,G as z,H as B,O as re,T as ie,U as ae,k as oe}from"./index-lTEyHSus.js";import{t as V}from"./badge-B8D0Q2qq.js";import{t as se}from"./auth-page-header-ChaCNNrn.js";import{t as H}from"./alert-D3aaK-_3.js";import{t as ce}from"./initial-avatar-WMjxW3Zz.js";import{t as U}from"./form-sJw-V9wb.js";import{n as W,t as G}from"./modal-JuaLVSyx.js";import{t as K}from"./promise-OpBtq8tG.js";import{a as le,i as ue,n as de,r as fe}from"./passkey-CWTjw19S.js";import{r as q,t as J}from"./standard-schema-C50nwAaQ.js";import{n as pe,r as me}from"./totp-BhElob6P.js";var he=c(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),ge=c(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),_e=c(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),ve=c(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Y=r(n(),1),X=t();function ye({isConfigManaged:e,isDeletionEnabled:t,onDeleteClick:n}){let{t:r}=i();return t?(0,X.jsxs)(z.Root,{className:`border-tinyrack-danger-border bg-tinyrack-danger-surface`,variant:`outlined`,children:[(0,X.jsxs)(z.Header,{className:`border-tinyrack-danger-border border-b-tinyrack-default px-tinyrack-lg py-tinyrack-md`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-tinyrack-sm`,children:[(0,X.jsx)(I,{"aria-hidden":!0,className:`size-tinyrack-lg text-tinyrack-danger-foreground`}),(0,X.jsx)(z.Title,{className:`text-tinyrack-danger-foreground`,children:r(`profile.dangerZone.title`)})]}),(0,X.jsx)(z.Description,{children:r(`profile.dangerZone.description`)})]}),(0,X.jsx)(z.Content,{className:`px-tinyrack-lg py-tinyrack-md`,children:(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-tinyrack-lg`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-tinyrack-3xs`,children:[(0,X.jsx)(a,{as:`p`,variant:`bodySm`,weight:`medium`,children:r(`profile.deleteAccount.title`)}),(0,X.jsx)(a,{as:`p`,color:`muted`,variant:`caption`,children:r(e?`profile.deleteAccount.configManaged`:`profile.deleteAccount.description`)})]}),(0,X.jsxs)(s,{appearance:`outline`,"data-testid":`profile-delete-account`,disabled:e,intent:`danger`,onClick:n,type:`button`,uiSize:`sm`,children:[(0,X.jsx)(F,{"aria-hidden":!0,className:`size-tinyrack-lg`}),r(`profile.deleteAccount.button`)]})]})})]}):null}function be({providerId:e,iconUrl:t,className:n=`size-tinyrack-xl`}){return e===`google`||e===`github`||e===`apple`?(0,X.jsx)(M,{"aria-hidden":!0,className:n,provider:e}):t?(0,X.jsx)(`img`,{alt:``,className:n,src:t}):(0,X.jsx)(j,{"aria-hidden":!0,className:n})}function Z({icon:e,active:t,title:n,status:r,note:i,actions:o}){let s;return s=(0,Y.isValidElement)(e)?e:(0,X.jsx)(e,{"aria-hidden":!0,className:`size-tinyrack-lg ${t?`text-tinyrack-success-foreground`:`text-tinyrack-text-muted`}`}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-tinyrack-lg p-tinyrack-lg`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-tinyrack-md`,children:[(0,X.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-tinyrack-md ${t?`bg-tinyrack-success-surface`:`bg-tinyrack-surface-muted`}`,children:s}),(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-tinyrack-3xs`,children:[(0,X.jsx)(a,{as:`div`,variant:`bodySm`,weight:`medium`,children:n}),(0,X.jsx)(a,{as:`div`,color:`muted`,variant:`caption`,children:r}),i]})]}),o&&(0,X.jsx)(`div`,{className:`flex shrink-0 flex-wrap justify-end gap-tinyrack-xs`,children:o})]})}function xe({providers:e,unlinkingProvider:t,getAuthorizeUrl:n,onUnlinkRequest:r}){let{t:a}=i();return e.length===0?null:(0,X.jsxs)(z.Root,{variant:`outlined`,children:[(0,X.jsxs)(z.Header,{className:`border-tinyrack-border border-b-tinyrack-default px-tinyrack-lg py-tinyrack-md`,children:[(0,X.jsx)(z.Title,{children:a(`profile.linkedAccounts.title`)}),(0,X.jsx)(z.Description,{children:a(`profile.linkedAccounts.description`)})]}),(0,X.jsx)(z.Content,{className:`divide-y divide-tinyrack-border p-0`,children:e.map(e=>(0,X.jsx)(Z,{actions:e.linked?(0,X.jsx)(s,{appearance:`ghost`,intent:`danger`,loading:t===e.id,loadingLabel:a(`profile.linkedAccounts.unlinking`),onClick:()=>r(e),type:`button`,uiSize:`sm`,children:t===e.id?void 0:a(`profile.linkedAccounts.unlink`)}):(0,X.jsx)(ae,{appearance:`outline`,intent:`neutral`,render:(0,X.jsx)(`a`,{href:n(e.id,`link`,`/profile`)}),uiSize:`sm`,children:a(`profile.linkedAccounts.link`)}),active:e.linked,icon:(0,X.jsx)(be,{className:`size-tinyrack-lg`,iconUrl:e.icon_url,providerId:e.id}),status:e.linked?a(`profile.linkedAccounts.connected`):a(`profile.linkedAccounts.notConnected`),title:e.display_name},e.id))})]})}function Se({passkeyCount:e,onOpenModal:t}){let{t:n}=i(),r=e>0;return(0,X.jsx)(Z,{actions:(0,X.jsx)(s,{appearance:`ghost`,intent:`primary`,onClick:()=>t(r?`manage`:`setup`),type:`button`,uiSize:`sm`,children:n(r?`profile.passkey.manage`:`profile.passkey.add`)}),active:r,icon:k,status:r?n(`profile.passkey.status.enabled`,{count:e}):n(`profile.passkey.status.disabled`),title:n(`profile.passkey.title`)})}function Ce({hasPassword:e,hasLinkedOAuth:t,isConfigManaged:n,hasSecondFactorOnly:r,onOpenModal:o}){let{t:c}=i();return(0,X.jsx)(Z,{actions:n?void 0:e?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(s,{appearance:`ghost`,"data-testid":`profile-password-change`,intent:`primary`,onClick:()=>o(`change`),type:`button`,uiSize:`sm`,children:c(`profile.password.change`)}),t?(0,X.jsx)(s,{appearance:`ghost`,"data-testid":`profile-password-remove`,intent:`danger`,onClick:()=>o(`remove`),type:`button`,uiSize:`sm`,children:c(`profile.password.remove`)}):null,!t&&r&&(0,X.jsxs)(v.Root,{children:[(0,X.jsx)(v.Trigger,{render:(0,X.jsx)(s,{appearance:`ghost`,disabled:!0,type:`button`,uiSize:`sm`,children:c(`profile.password.remove`)})}),(0,X.jsx)(v.Portal,{children:(0,X.jsx)(v.Positioner,{children:(0,X.jsx)(v.Popup,{className:`max-w-tinyrack-measure-lg rounded-tinyrack-md border border-tinyrack-border bg-tinyrack-surface p-tinyrack-md text-tinyrack-text text-tinyrack-xs shadow-tinyrack-overlay`,children:(0,X.jsxs)(`div`,{className:`flex items-start gap-tinyrack-sm`,children:[(0,X.jsx)(C,{"aria-hidden":!0,className:`size-tinyrack-lg shrink-0 text-tinyrack-warning-foreground`}),(0,X.jsx)(a,{as:`div`,variant:`caption`,children:c(`profile.password.removeDisabledReason`)})]})})})})]})]}):(0,X.jsx)(s,{appearance:`ghost`,"data-testid":`profile-password-set`,intent:`primary`,onClick:()=>o(`set`),type:`button`,uiSize:`sm`,children:c(`profile.password.set`)}),active:e,icon:A,note:n?(0,X.jsxs)(a,{as:`div`,className:`flex items-center gap-tinyrack-xs`,color:`muted`,variant:`caption`,children:[(0,X.jsx)(N,{"aria-hidden":!0,className:`size-tinyrack-md shrink-0`}),(0,X.jsx)(a,{as:`span`,color:`muted`,variant:`caption`,children:c(`profile.password.configManaged`)})]}):void 0,status:c(e?`profile.password.status.set`:`profile.password.status.notSet`),title:c(`profile.password.title`)})}function we({totpEnabled:e,recoveryCodesMissing:t,onOpenModal:n}){let{t:r}=i();return(0,X.jsx)(Z,{actions:e?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(s,{appearance:`ghost`,"data-testid":`profile-totp-regenerate`,intent:`primary`,onClick:()=>n(`regenerate`),type:`button`,uiSize:`sm`,children:r(`profile.totp.regenerate`)}),(0,X.jsx)(s,{appearance:`ghost`,"data-testid":`profile-totp-disable`,intent:`danger`,onClick:()=>n(`disable`),type:`button`,uiSize:`sm`,children:r(`profile.totp.disable`)})]}):(0,X.jsx)(s,{appearance:`ghost`,"data-testid":`profile-totp-enable`,intent:`primary`,onClick:()=>n(`setup`),type:`button`,uiSize:`sm`,children:r(`profile.totp.enable`)}),active:e,icon:P,status:r(e?t?`profile.totp.status.recoveryCodesMissing`:`profile.totp.status.enabled`:`profile.totp.status.disabled`),title:r(`profile.totp.title`)})}var Te={error:B,warning:I,info:C};function Q({variant:e,children:t}){return(0,X.jsx)(H,{"data-testid":`alert-banner-${e}`,icon:Te[e],type:e,children:t})}function Ee({isOpen:e,onClose:t,providerName:n,isPending:r,onConfirm:a}){let{t:o}=i(),[c,l]=(0,Y.useState)(null),u=()=>{r||(l(null),t())};return(0,X.jsx)(G,{description:o(`profile.linkedAccounts.unlinkModal.description`,{provider:n}),icon:ge,isOpen:e,onClose:u,preventClose:r,title:o(`profile.linkedAccounts.unlinkModal.title`),variant:`destructive`,children:(0,X.jsxs)(`div`,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,children:[(0,X.jsx)(Q,{variant:`warning`,children:o(`profile.linkedAccounts.unlinkModal.warning`,{provider:n})}),c&&(0,X.jsx)(Q,{variant:`error`,children:c}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`unlink-oauth-cancel`,disabled:r,intent:`neutral`,onClick:u,type:`button`,uiSize:`sm`,children:o(`profile.linkedAccounts.unlinkModal.cancel`)}),(0,X.jsx)(s,{"data-testid":`unlink-oauth-unlink`,disabled:r,intent:`danger`,loading:r,loadingLabel:o(`profile.linkedAccounts.unlinking`),onClick:async()=>{l(null);try{await a(),u()}catch{l(o(`profile.linkedAccounts.unlinkError`))}},type:`button`,uiSize:`sm`,children:o(`profile.linkedAccounts.unlink`)})]})]})})}function $({label:e,value:t}){return(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-tinyrack-lg px-tinyrack-lg py-tinyrack-md`,children:[(0,X.jsx)(a,{className:`shrink-0`,color:`muted`,variant:`caption`,children:e}),(0,X.jsx)(a,{truncate:!0,variant:`bodySm`,weight:`medium`,children:t})]})}function De({user:e}){let{t}=i();return(0,X.jsxs)(z.Root,{variant:`outlined`,children:[(0,X.jsxs)(z.Header,{className:`border-tinyrack-border border-b-tinyrack-default px-tinyrack-lg py-tinyrack-md`,children:[(0,X.jsx)(z.Title,{children:t(`profile.account.title`)}),(0,X.jsx)(z.Description,{children:t(`profile.account.description`)})]}),(0,X.jsxs)(z.Content,{className:`divide-y divide-tinyrack-border p-0`,children:[(0,X.jsx)($,{label:t(`profile.id.label`),value:e.sub}),(0,X.jsx)($,{label:t(`profile.email.label`),value:e.email})]})]})}function Oe({children:e,headerActions:t}){return(0,X.jsxs)(`div`,{className:`flex min-h-dvh flex-col bg-tinyrack-surface`,children:[(0,X.jsx)(b,{}),(0,X.jsx)(x,{actions:t,brand:!0}),(0,X.jsx)(`main`,{className:`flex flex-1 justify-center px-tinyrack-lg py-tinyrack-xl`,children:(0,X.jsx)(`div`,{className:`auth-enter flex w-full max-w-tinyrack-overlay-width-md flex-col gap-tinyrack-xl`,children:e})}),(0,X.jsx)(y,{})]})}var ke=h({mutationFn:async e=>d(await p.api.user.password.$post({json:e}))}),Ae=h({mutationFn:async e=>d(await p.api.user.password.$put({json:e}))}),je=h({mutationFn:async e=>d(await p.api.user.password.$delete({json:e}))});function Me({isOpen:e,onClose:t}){let{t:n}=i(),r=l(),{data:a}=_(m),c=a.auth.password.policy,u=q({resolver:J((0,Y.useMemo)(()=>L.object({currentPassword:L.string().min(1,n(`validation.password.required`)),newPassword:L.string().min(c.min_length,n(`validation.password.min`,{count:c.min_length})).max(c.max_length,n(`validation.password.max`,{count:c.max_length})),confirmPassword:L.string()}).refine(e=>e.newPassword===e.confirmPassword,{message:n(`validation.confirmPassword.mismatch`),path:[`confirmPassword`]}),[c.max_length,c.min_length,n])),defaultValues:{currentPassword:``,newPassword:``,confirmPassword:``}}),d=g({...Ae,onSuccess:()=>{r.invalidateQueries({queryKey:R.queryKey}),f()}}),f=()=>{u.reset(),t()},p=u.handleSubmit(async e=>{try{await d.mutateAsync({current_password:e.currentPassword,new_password:e.newPassword})}catch(e){e instanceof o&&e.code===`INVALID_CURRENT_PASSWORD`?u.setError(`currentPassword`,{message:n(`profile.password.changeModal.invalidCurrent`)}):u.setError(`root`,{message:n(`profile.password.changeModal.error`)})}});return(0,X.jsx)(G,{description:n(`profile.password.changeModal.description`),icon:A,isOpen:e,onClose:f,title:n(`profile.password.changeModal.title`),children:(0,X.jsxs)(U,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,onSubmit:p,children:[(0,X.jsx)(O,{error:u.formState.errors.currentPassword,errorTestId:`change-password-error-currentPassword`,id:`current-password`,label:n(`profile.password.changeModal.currentPassword`),placeholder:n(`profile.password.changeModal.currentPasswordPlaceholder`),...u.register(`currentPassword`),type:`password`}),(0,X.jsx)(O,{error:u.formState.errors.newPassword,errorTestId:`change-password-error-newPassword`,id:`new-password-change`,label:n(`profile.password.changeModal.newPassword`),placeholder:n(`profile.password.changeModal.newPasswordPlaceholder`),...u.register(`newPassword`),type:`password`}),(0,X.jsx)(O,{error:u.formState.errors.confirmPassword,errorTestId:`change-password-error-confirmPassword`,id:`confirm-password-change`,label:n(`profile.password.changeModal.confirmPassword`),placeholder:n(`profile.password.changeModal.confirmPasswordPlaceholder`),...u.register(`confirmPassword`),type:`password`}),u.formState.errors.root&&(0,X.jsx)(Q,{variant:`error`,children:u.formState.errors.root.message}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`change-password-cancel`,disabled:d.isPending,intent:`neutral`,onClick:f,type:`button`,uiSize:`sm`,children:n(`profile.password.changeModal.cancel`)}),(0,X.jsx)(s,{"data-testid":`change-password-submit`,disabled:d.isPending,intent:`primary`,loading:d.isPending,loadingLabel:n(`profile.password.changeModal.submitting`),type:`submit`,uiSize:`sm`,children:d.isPending?void 0:n(`profile.password.changeModal.submit`)})]})]})})}var Ne=h({mutationFn:async()=>d(await p.api.user.$delete())});function Pe({isOpen:e,onClose:t,retentionDays:n}){let{t:r}=i(),o=u(),c=l(),d=q({resolver:J((0,Y.useMemo)(()=>L.object({confirmation:L.string().refine(e=>e.toLowerCase()===r(`profile.deleteAccount.modal.confirmPlaceholder`).toLowerCase(),{message:r(`validation.confirmText.mismatch`)})}),[r])),defaultValues:{confirmation:``}}),f=g({...Ne,onSuccess:async()=>{c.setQueryData(R.queryKey,{user:null}),await K(),o.navigate({to:`/login`})}}),p=()=>{f.isPending||(d.reset(),t())},m=d.handleSubmit(async()=>{try{await f.mutateAsync()}catch{d.setError(`root`,{message:r(`profile.deleteAccount.error`)})}});return(0,X.jsx)(G,{icon:F,isOpen:e,onClose:p,preventClose:f.isPending,title:r(`profile.deleteAccount.modal.title`),variant:`destructive`,children:(0,X.jsxs)(U,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,onSubmit:m,children:[(0,X.jsxs)(Q,{variant:`error`,children:[(0,X.jsx)(a,{as:`span`,variant:`bodySm`,children:r(`profile.deleteAccount.modal.description`,{days:n})}),(0,X.jsx)(`br`,{}),(0,X.jsx)(a,{as:`span`,className:`opacity-tinyrack-hover`,variant:`caption`,children:r(`profile.deleteAccount.modal.warning`)})]}),(0,X.jsx)(O,{autoComplete:`off`,error:d.formState.errors.confirmation,errorTestId:`delete-account-error`,id:`delete-confirmation`,label:r(`profile.deleteAccount.modal.confirmLabel`),placeholder:r(`profile.deleteAccount.modal.confirmPlaceholder`),...d.register(`confirmation`),type:`text`}),d.formState.errors.root&&(0,X.jsx)(Q,{variant:`error`,children:d.formState.errors.root.message}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`delete-account-cancel`,disabled:f.isPending,intent:`neutral`,onClick:p,type:`button`,uiSize:`sm`,children:r(`profile.deleteAccount.modal.cancel`)}),(0,X.jsx)(s,{"data-testid":`delete-account-submit`,disabled:f.isPending,intent:`danger`,loading:f.isPending,loadingLabel:r(`profile.deleteAccount.modal.confirming`),type:`submit`,uiSize:`sm`,children:f.isPending?void 0:r(`profile.deleteAccount.modal.confirm`)})]})]})})}function Fe({isOpen:e,onClose:t}){let{t:n}=i(),r=l(),a=q({resolver:J((0,Y.useMemo)(()=>L.object({code:L.string().length(6,n(`validation.totp.length`)).regex(/^\d{6}$/,n(`validation.totp.digits`))}),[n])),defaultValues:{code:``}}),c=g({...pe,onSuccess:()=>{r.invalidateQueries({queryKey:R.queryKey}),u()}}),u=()=>{a.reset(),t()},d=a.handleSubmit(async e=>{try{await c.mutateAsync({code:e.code})}catch(e){if(e instanceof o&&e.code===`CANNOT_REMOVE_LAST_SECOND_FACTOR`){a.setError(`code`,{message:n(`profile.totp.disableModal.cannotRemoveLastSecondFactor`)});return}a.setError(`code`,{message:n(`profile.totp.disableModal.error`)})}});return(0,X.jsx)(G,{description:n(`profile.totp.disableModal.description`),icon:P,isOpen:e,onClose:u,title:n(`profile.totp.disableModal.title`),variant:`destructive`,children:(0,X.jsxs)(U,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,onSubmit:d,children:[(0,X.jsx)(Q,{variant:`warning`,children:n(`profile.totp.disableModal.warning`)}),(0,X.jsx)(O,{autoComplete:`one-time-code`,error:a.formState.errors.code,errorTestId:`disable-totp-error`,id:`disable-totp-code`,inputMode:`numeric`,label:n(`profile.totp.disableModal.codeLabel`),maxLength:6,pattern:`[0-9]*`,placeholder:`000000`,...a.register(`code`),type:`text`}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`disable-totp-cancel`,disabled:c.isPending,intent:`neutral`,onClick:u,type:`button`,uiSize:`sm`,children:n(`profile.totp.disableModal.cancel`)}),(0,X.jsx)(s,{"data-testid":`disable-totp-submit`,disabled:c.isPending,intent:`danger`,loading:c.isPending,loadingLabel:n(`profile.totp.disableModal.disabling`),type:`submit`,uiSize:`sm`,children:c.isPending?void 0:n(`profile.totp.disableModal.disable`)})]})]})})}function Ie({isOpen:t,onClose:n,onAddNew:r}){let{t:c}=i(),u=l(),[d,p]=(0,Y.useState)(null),[m,h]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(null),{data:x,isLoading:C}=S({...fe,enabled:t}),w=g({...de,onSuccess:()=>{u.invalidateQueries({queryKey:f.passkeys()}),u.invalidateQueries({queryKey:R.queryKey})},onSettled:()=>{h(null)}}),T=(0,Y.useCallback)(()=>{p(null),h(null),v(null),b(null),n()},[n]),E=e=>{v(e.id),b(null)},D=()=>{v(null),b(null)},O=async e=>{h(e.id),v(null);try{await w.mutateAsync({id:e.id})}catch(e){if(e instanceof o&&e.code===`CANNOT_REMOVE_LAST_SECOND_FACTOR`){b(c(`profile.passkey.manageModal.cannotRemoveLastSecondFactor`));return}b(c(`profile.passkey.manageModal.deleteError`))}},A=e=>new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}),j=x?.passkeys||[];return(0,X.jsxs)(G,{icon:k,isOpen:t,onClose:T,size:`lg`,title:c(`profile.passkey.manageModal.title`),children:[(0,X.jsxs)(`div`,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-sm`,children:[y&&(0,X.jsx)(Q,{variant:`error`,children:y}),C&&(0,X.jsx)(`div`,{className:`flex justify-center py-tinyrack-xl`,children:(0,X.jsx)(e,{uiSize:`md`})}),!C&&j.length===0&&(0,X.jsx)(a,{align:`center`,className:`py-tinyrack-xl`,color:`muted`,"data-testid":`passkeys-empty`,variant:`bodySm`,children:c(`profile.passkey.manageModal.noPasskeys`)}),!C&&j.length>0&&(0,X.jsx)(`div`,{className:`flex flex-col gap-tinyrack-sm`,children:j.map(e=>(0,X.jsx)(Le,{formatDate:A,isConfirmingDelete:_===e.id,isDeleting:m===e.id,isEditing:d?.id===e.id,onCancelDelete:D,onCancelEdit:()=>p(null),onConfirmDelete:()=>O(e),onEdit:()=>p(e),onRequestDelete:()=>E(e),passkey:e},e.id))})]}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`manage-passkeys-close`,intent:`neutral`,onClick:T,type:`button`,uiSize:`sm`,children:c(`profile.passkey.manageModal.close`)}),(0,X.jsx)(s,{"data-testid":`manage-passkeys-add-new`,intent:`primary`,onClick:()=>{T(),r()},type:`button`,uiSize:`sm`,children:c(`profile.passkey.manageModal.addNew`)})]})]})}function Le({passkey:e,isDeleting:t,isEditing:n,isConfirmingDelete:r,onEdit:o,onCancelEdit:c,onRequestDelete:u,onConfirmDelete:d,onCancelDelete:p,formatDate:m}){let{t:h}=i(),_=l(),v=q({resolver:J((0,Y.useMemo)(()=>L.object({name:L.string().min(1,h(`validation.passkey.name.required`)).max(100,h(`validation.passkey.name.max`))}),[h])),defaultValues:{name:e.name||``}}),y=g({...le,onSuccess:()=>{_.invalidateQueries({queryKey:f.passkeys()}),c()}}),b=v.handleSubmit(async t=>{try{await y.mutateAsync({id:e.id,name:t.name})}catch{v.setError(`name`,{message:h(`profile.passkey.manageModal.renameError`)})}});return n?(0,X.jsxs)(U,{className:`flex flex-col gap-tinyrack-xs rounded-tinyrack-md bg-tinyrack-surface-muted p-tinyrack-sm`,onSubmit:b,children:[(0,X.jsx)(O,{"data-testid":`passkey-rename-input`,error:v.formState.errors.name,errorTestId:`passkey-rename-error`,hideLabel:!0,label:h(`profile.passkey.manageModal.nameLabel`),placeholder:h(`profile.passkey.manageModal.namePlaceholder`),...v.register(`name`),type:`text`}),(0,X.jsxs)(`div`,{className:`flex justify-end gap-tinyrack-xs`,children:[(0,X.jsx)(s,{appearance:`ghost`,disabled:y.isPending,onClick:()=>{v.reset(),c()},type:`button`,uiSize:`sm`,children:h(`profile.passkey.manageModal.cancelEdit`)}),(0,X.jsx)(s,{disabled:y.isPending,intent:`primary`,type:`submit`,uiSize:`sm`,children:y.isPending?h(`profile.passkey.manageModal.saving`):h(`profile.passkey.manageModal.save`)})]})]}):r?(0,X.jsxs)(`div`,{className:`flex items-center justify-between rounded-tinyrack-md border border-tinyrack-danger-border bg-tinyrack-danger-surface p-tinyrack-sm text-tinyrack-danger-foreground`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-tinyrack-sm`,children:[(0,X.jsx)(F,{className:`size-tinyrack-lg`}),(0,X.jsx)(a,{color:`danger`,variant:`caption`,children:h(`profile.passkey.manageModal.deleteConfirmInline`)})]}),(0,X.jsxs)(`div`,{className:`flex gap-tinyrack-xs`,children:[(0,X.jsx)(s,{appearance:`ghost`,onClick:p,type:`button`,uiSize:`sm`,children:h(`profile.passkey.manageModal.cancelEdit`)}),(0,X.jsx)(s,{intent:`danger`,onClick:d,type:`button`,uiSize:`sm`,children:h(`profile.passkey.manageModal.delete`)})]})]}):(0,X.jsxs)(`div`,{className:`flex items-center justify-between rounded-tinyrack-md bg-tinyrack-surface-muted p-tinyrack-sm`,"data-testid":`passkey-item`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-tinyrack-sm`,children:[e.device_type===`multiDevice`?(0,X.jsx)(he,{className:`size-tinyrack-lg text-tinyrack-primary-foreground`}):(0,X.jsx)(ve,{className:`size-tinyrack-lg text-tinyrack-primary-foreground`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(a,{as:`div`,variant:`caption`,weight:`medium`,children:e.name||h(`profile.passkey.manageModal.unnamedPasskey`)}),(0,X.jsxs)(`div`,{className:`flex items-center gap-tinyrack-xs`,children:[(0,X.jsx)(a,{color:`muted`,variant:`caption`,children:h(`profile.passkey.manageModal.createdAt`,{date:m(e.created_at)})}),e.backed_up&&(0,X.jsx)(V,{uiSize:`md`,variant:`success`,children:h(`profile.passkey.manageModal.backedUp`)})]})]})]}),(0,X.jsxs)(`div`,{className:`flex gap-tinyrack-xs`,children:[(0,X.jsx)(s,{appearance:`ghost`,"aria-label":h(`profile.passkey.manageModal.rename`),onClick:o,type:`button`,uiSize:`sm`,children:(0,X.jsx)(_e,{className:`size-tinyrack-lg`})}),(0,X.jsx)(s,{appearance:`ghost`,"aria-label":h(`profile.passkey.manageModal.delete`),disabled:t,intent:`danger`,loading:t,onClick:u,type:`button`,uiSize:`sm`,children:t?void 0:(0,X.jsx)(F,{className:`size-tinyrack-lg`})})]})]})}function Re({isOpen:e,onClose:t}){let{t:n}=i(),r=u(),a=l(),{data:s}=_(m),[c,d]=(0,Y.useState)(`verify`),[f,p]=(0,Y.useState)(null),[h,v]=(0,Y.useState)(null),y=g({...me,onSuccess:async e=>{p(e),d(`recovery`),await a.invalidateQueries({queryKey:R.queryKey})}}),b=(0,Y.useCallback)(()=>{d(`verify`),p(null),v(null),y.reset()},[y]),x=(0,Y.useCallback)(()=>{b(),t()},[t,b]),S=(0,Y.useCallback)(async e=>{v(null);try{await y.mutateAsync({code:e})}catch(e){if(e instanceof o){if(e.code===`INVALID_TOTP_CODE`)throw e;if(e.code===`UNAUTHORIZED`){a.setQueryData(R.queryKey,{user:null}),await K(),r.navigate({to:`/login`});return}if(e.code===`TOTP_NOT_ENABLED`||e.code===`VALIDATION_ERROR`){await a.invalidateQueries({queryKey:R.queryKey}),x();return}}v(n(`profile.totp.regenerateModal.unexpectedError`))}},[x,y,a,r,n]);return s.auth.password.totp.enabled?(0,X.jsx)(G,{description:n(c===`verify`?`profile.totp.regenerateModal.description`:`profile.totp.regenerateModal.recoveryDescription`),icon:P,isOpen:e,onClose:x,preventClose:c===`recovery`,size:`sm`,title:n(c===`verify`?`profile.totp.regenerateModal.title`:`profile.totp.regenerateModal.recoveryTitle`),children:c===`verify`?(0,X.jsxs)(`div`,{className:`mt-tinyrack-lg`,children:[h&&(0,X.jsx)(`div`,{className:`mb-tinyrack-md`,children:(0,X.jsx)(Q,{variant:`error`,children:h})}),(0,X.jsx)(E,{invalidMessage:n(`profile.totp.regenerateModal.error`),isPending:y.isPending,onSubmit:S,pendingText:n(`profile.totp.regenerateModal.submitting`),submitLabel:n(`profile.totp.regenerateModal.submit`)})]}):(0,X.jsx)(`div`,{className:`mt-tinyrack-lg`,children:(0,X.jsx)(w,{onConfirm:x,recoveryCodes:f?.recovery_codes??[]})})}):null}function ze({isOpen:e,onClose:t}){let{t:n}=i(),r=l(),a=q({resolver:J((0,Y.useMemo)(()=>L.object({currentPassword:L.string().min(1,n(`validation.password.required`))}),[n])),defaultValues:{currentPassword:``}}),c=g({...je,onSuccess:()=>{r.invalidateQueries({queryKey:R.queryKey}),u()}}),u=()=>{a.reset(),t()},d=a.handleSubmit(async e=>{try{await c.mutateAsync({current_password:e.currentPassword})}catch(e){if(e instanceof o){if(e.code===`INVALID_CURRENT_PASSWORD`){a.setError(`currentPassword`,{message:n(`profile.password.removeModal.invalidCurrent`)});return}if(e.code===`CANNOT_REMOVE_LAST_AUTH_METHOD`){a.setError(`root`,{message:n(`profile.password.removeModal.noOAuth`)});return}if(e.code===`CANNOT_REMOVE_PASSWORD_WITH_SECOND_FACTOR_ONLY`){a.setError(`root`,{message:n(`profile.password.removeModal.noOAuthWith2FA`)});return}}a.setError(`root`,{message:n(`profile.password.removeModal.error`)})}});return(0,X.jsx)(G,{description:n(`profile.password.removeModal.description`),icon:A,isOpen:e,onClose:u,title:n(`profile.password.removeModal.title`),variant:`destructive`,children:(0,X.jsxs)(U,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,onSubmit:d,children:[(0,X.jsx)(O,{error:a.formState.errors.currentPassword,errorTestId:`remove-password-error`,id:`current-password-remove`,label:n(`profile.password.removeModal.currentPassword`),placeholder:n(`profile.password.removeModal.currentPasswordPlaceholder`),...a.register(`currentPassword`),type:`password`}),a.formState.errors.root&&(0,X.jsx)(Q,{variant:`error`,children:a.formState.errors.root.message}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`remove-password-cancel`,disabled:c.isPending,intent:`neutral`,onClick:u,type:`button`,uiSize:`sm`,children:n(`profile.password.removeModal.cancel`)}),(0,X.jsx)(s,{"data-testid":`remove-password-submit`,disabled:c.isPending,intent:`danger`,loading:c.isPending,loadingLabel:n(`profile.password.removeModal.submitting`),type:`submit`,uiSize:`sm`,children:c.isPending?void 0:n(`profile.password.removeModal.submit`)})]})]})})}function Be({isOpen:e,onClose:t}){let{t:n}=i(),r=l(),{data:a}=_(m),o=a.auth.password.policy,c=q({resolver:J((0,Y.useMemo)(()=>L.object({password:L.string().min(o.min_length,n(`validation.password.min`,{count:o.min_length})).max(o.max_length,n(`validation.password.max`,{count:o.max_length})),confirmPassword:L.string()}).refine(e=>e.password===e.confirmPassword,{message:n(`validation.confirmPassword.mismatch`),path:[`confirmPassword`]}),[o.max_length,o.min_length,n])),defaultValues:{password:``,confirmPassword:``}}),u=g({...ke,onSuccess:()=>{r.invalidateQueries({queryKey:R.queryKey}),d()}}),d=()=>{c.reset(),t()},f=c.handleSubmit(async e=>{try{await u.mutateAsync({password:e.password})}catch{c.setError(`root`,{message:n(`profile.password.setModal.error`)})}});return(0,X.jsx)(G,{description:n(`profile.password.setModal.description`),icon:A,isOpen:e,onClose:d,title:n(`profile.password.setModal.title`),children:(0,X.jsxs)(U,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,onSubmit:f,children:[(0,X.jsx)(O,{error:c.formState.errors.password,errorTestId:`set-password-error-password`,id:`new-password`,label:n(`profile.password.setModal.newPassword`),placeholder:n(`profile.password.setModal.newPasswordPlaceholder`),...c.register(`password`),type:`password`}),(0,X.jsx)(O,{error:c.formState.errors.confirmPassword,errorTestId:`set-password-error-confirmPassword`,id:`confirm-password`,label:n(`profile.password.setModal.confirmPassword`),placeholder:n(`profile.password.setModal.confirmPasswordPlaceholder`),...c.register(`confirmPassword`),type:`password`}),c.formState.errors.root&&(0,X.jsx)(Q,{variant:`error`,children:c.formState.errors.root.message}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`set-password-cancel`,disabled:u.isPending,intent:`neutral`,onClick:d,type:`button`,uiSize:`sm`,children:n(`profile.password.setModal.cancel`)}),(0,X.jsx)(s,{"data-testid":`set-password-submit`,disabled:u.isPending,intent:`primary`,loading:u.isPending,loadingLabel:n(`profile.password.setModal.submitting`),type:`submit`,uiSize:`sm`,children:u.isPending?void 0:n(`profile.password.setModal.submit`)})]})]})})}function Ve({isOpen:t,onClose:n,isRequired:r=!1,canSwitchToTotp:o=!1,onSwitchToTotp:c}){let{t:u}=i(),d=l(),[p,m]=(0,Y.useState)(`name`),[h,_]=(0,Y.useState)(null),v=q({resolver:J((0,Y.useMemo)(()=>L.object({name:L.string().max(100,u(`validation.passkey.name.max`)).optional().transform(e=>e?.trim()||void 0)}),[u])),defaultValues:{name:``}}),y=g({...ue,onSuccess:()=>{d.invalidateQueries({queryKey:f.passkeys()}),d.invalidateQueries({queryKey:R.queryKey}),b()},onError:e=>{m(`name`),e.name===`NotAllowedError`?_(u(`profile.passkey.setupModal.cancelled`)):_(u(`profile.passkey.setupModal.error`))}}),b=(0,Y.useCallback)(()=>{v.reset(),m(`name`),_(null),n()},[v,n]),x=v.handleSubmit(async e=>{m(`register`),_(null);try{await y.mutateAsync({name:e.name})}catch{}}),S=y.isPending;return(0,X.jsxs)(G,{description:r?u(`profile.passkey.setupModal.requiredDescription`):void 0,icon:k,isOpen:t,onClose:b,preventClose:r,size:`sm`,title:u(`profile.passkey.setupModal.title`),children:[p===`name`&&(0,X.jsxs)(U,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,onSubmit:x,children:[(0,X.jsx)(a,{as:`p`,color:`muted`,variant:`caption`,children:u(`profile.passkey.setupModal.description`)}),h&&(0,X.jsx)(Q,{variant:`error`,children:h}),(0,X.jsx)(O,{error:v.formState.errors.name,errorTestId:`setup-passkey-error`,hint:u(`profile.passkey.setupModal.nameHint`),id:`passkey-name`,label:u(`profile.passkey.setupModal.nameLabel`),placeholder:u(`profile.passkey.setupModal.namePlaceholder`),...v.register(`name`),type:`text`}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,"data-testid":`setup-passkey-cancel`,intent:`neutral`,onClick:b,type:`button`,uiSize:`sm`,children:u(`profile.passkey.setupModal.cancel`)}),(0,X.jsx)(s,{"data-testid":`setup-passkey-continue`,intent:`primary`,type:`submit`,uiSize:`sm`,children:u(`profile.passkey.setupModal.continue`)})]}),o&&c&&(0,X.jsx)(a,{align:`center`,as:`p`,className:`mt-tinyrack-sm`,variant:`caption`,children:(0,X.jsx)(s,{appearance:`ghost`,intent:`primary`,onClick:c,type:`button`,uiSize:`sm`,children:u(`profile.passkey.setupModal.switchToTotp`)})})]}),p===`register`&&(0,X.jsxs)(`div`,{className:`mt-tinyrack-lg`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-tinyrack-md py-tinyrack-xl`,"data-testid":`setup-passkey-loading`,children:[(0,X.jsx)(e,{uiSize:`md`}),(0,X.jsx)(a,{align:`center`,as:`p`,color:`muted`,variant:`caption`,children:u(`profile.passkey.setupModal.waitingForDevice`)})]}),(0,X.jsx)(W,{children:(0,X.jsx)(s,{appearance:`outline`,"data-testid":`setup-passkey-cancel`,disabled:S,intent:`neutral`,onClick:b,type:`button`,uiSize:`sm`,children:u(`profile.passkey.setupModal.cancel`)})})]})]})}function He({isOpen:t,onClose:n,isRequired:r=!1,canSwitchToPasskey:o=!1,onSwitchToPasskey:c}){let{t:l}=i(),{step:u,setupData:d,recoveryCodes:f,isSetupPending:p,isVerifyPending:m,isConfirmPending:h,startSetup:g,verify:_,goToVerify:v,goToQr:y,confirmRecoveryCodes:b,reset:x}=D({autoStart:!1,onConfirmSuccess:()=>{x(),n()}}),S=(0,Y.useCallback)(()=>{x(),n()},[n,x]),C=(0,Y.useCallback)(()=>{!d&&!p&&g()},[d,p,g]);t&&!d&&!p&&u!==`error`&&C();let O=(0,Y.useCallback)(async e=>{await _(e)},[_]),k=l(u===`recovery`?`setupTotp.recoveryCodes.title`:`profile.totp.setupModal.title`);return(0,X.jsxs)(G,{description:r?l(`profile.totp.setupModal.requiredDescription`):void 0,icon:P,isOpen:t,onClose:S,preventClose:r||u===`recovery`,size:`sm`,title:k,children:[p&&(0,X.jsx)(`div`,{className:`flex justify-center py-tinyrack-xl`,"data-testid":`setup-totp-loading`,children:(0,X.jsx)(e,{uiSize:`md`})}),u===`error`&&(0,X.jsxs)(`div`,{className:`mt-tinyrack-lg flex flex-col gap-tinyrack-md`,children:[(0,X.jsx)(Q,{variant:`error`,children:l(`profile.totp.setupModal.setupError`)}),(0,X.jsxs)(W,{children:[(0,X.jsx)(s,{appearance:`outline`,intent:`neutral`,onClick:S,type:`button`,uiSize:`sm`,children:l(`profile.totp.setupModal.cancel`)}),(0,X.jsx)(s,{intent:`primary`,onClick:g,type:`button`,uiSize:`sm`,children:l(`profile.totp.setupModal.retry`)})]})]}),d&&u===`qr`&&(0,X.jsx)(`div`,{className:`mt-tinyrack-lg`,children:(0,X.jsx)(T,{additionalActions:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(W,{children:(0,X.jsx)(s,{appearance:`outline`,intent:`neutral`,onClick:S,type:`button`,uiSize:`sm`,children:l(`profile.totp.setupModal.cancel`)})}),o&&c&&(0,X.jsx)(a,{align:`center`,as:`p`,className:`mt-tinyrack-sm`,variant:`caption`,children:(0,X.jsx)(s,{appearance:`ghost`,intent:`primary`,onClick:c,type:`button`,uiSize:`sm`,children:l(`profile.totp.setupModal.switchToPasskey`)})})]}),onNext:v,setupData:d})}),d&&u===`verify`&&(0,X.jsx)(`div`,{className:`mt-tinyrack-lg`,children:(0,X.jsx)(E,{isPending:m,onBack:y,onSubmit:O})}),u===`recovery`&&f.length>0&&(0,X.jsx)(`div`,{className:`mt-tinyrack-lg`,children:(0,X.jsx)(w,{isLoading:h,onConfirm:b,recoveryCodes:f})})]})}var Ue={access_denied:`oauth.error.accessDenied`,temporarily_unavailable:`oauth.error.temporarilyUnavailable`,server_error:`oauth.error.serverError`};function We(){let{t:e}=i(),t=u(),n=l(),r=ie.useSearch().oauth_error,o=r?e(Ue[r]??`oauth.error.failed`):void 0,[c,d]=(0,Y.useState)(null),[f,p]=(0,Y.useState)(null),[h,v]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(null),[C,w]=(0,Y.useState)(!1),{data:T}=_(R),{data:E}=_(re),{data:D}=_(m),O=g({...te,onSuccess:async()=>{n.setQueryData(R.queryKey,{user:null}),await K(),t.navigate({to:`/login`})},onSettled:()=>{n.invalidateQueries({queryKey:R.queryKey})}}),k=g({...oe,onSuccess:()=>{n.invalidateQueries({queryKey:re.queryKey})},onSettled:()=>{d(null)}}),A=async()=>{f&&(d(f.id),await k.mutateAsync(f.id))};if(!T.user)return null;let j=T.user,M=E.available_providers,N=M.some(e=>e.linked),P=j.managed_by===`config`,F=D.auth.password,I=D.auth.passkey,L=F.totp.enabled,ae=I.enabled,V=D.account_deletion.enabled,U=D.account_deletion.retention,W=(()=>{let e=U.match(/^(\d+)([dmy])$/);if(!e)return 30;let t=parseInt(e[1],10);switch(e[2]){case`d`:return t;case`m`:return t*30;case`y`:return t*365;default:return 30}})(),G=!P&&L,le=!P&&ae,ue=M.length>0;return(0,X.jsxs)(Oe,{headerActions:(0,X.jsx)(s,{appearance:`ghost`,"aria-label":e(`profile.logout`),"data-testid":`profile-logout`,disabled:O.isPending,loading:O.isPending,onClick:()=>O.mutate(),type:`button`,uiSize:`sm`,children:O.isPending?void 0:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ee,{"aria-hidden":!0,className:`size-tinyrack-lg`}),(0,X.jsx)(a,{as:`span`,className:`hidden sm:inline`,variant:`bodySm`,children:e(`profile.logout`)})]})}),children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-tinyrack-lg`,children:[(0,X.jsx)(ce,{email:j.email,size:`lg`}),(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-tinyrack-3xs`,children:[(0,X.jsx)(se,{title:e(`profile.title`)}),(0,X.jsx)(a,{as:`p`,color:`muted`,"data-testid":`profile-user-email`,truncate:!0,variant:`bodySm`,children:j.email})]})]}),o&&(0,X.jsx)(H,{icon:B,type:`error`,children:o}),j&&(0,X.jsx)(De,{user:j}),(0,X.jsxs)(z.Root,{variant:`outlined`,children:[(0,X.jsxs)(z.Header,{className:`border-tinyrack-border border-b-tinyrack-default px-tinyrack-lg py-tinyrack-md`,children:[(0,X.jsx)(z.Title,{children:e(`profile.security.title`)}),(0,X.jsx)(z.Description,{children:e(`profile.security.description`)})]}),G&&j.totp_recovery_codes_missing&&(0,X.jsx)(`div`,{className:`border-tinyrack-border border-b-tinyrack-default px-tinyrack-lg py-tinyrack-md`,"data-testid":`profile-totp-recovery-warning`,children:(0,X.jsx)(H,{icon:B,type:`warning`,children:e(`profile.totp.recoveryCodesMissing`)})}),(0,X.jsxs)(z.Content,{className:`divide-y divide-tinyrack-border p-0`,children:[(0,X.jsx)(Ce,{hasLinkedOAuth:N,hasPassword:j.has_password,hasSecondFactorOnly:j.has_password&&!N&&(j.totp_registered||j.passkey_count>0),isConfigManaged:P,onOpenModal:v}),G&&(0,X.jsx)(we,{onOpenModal:b,recoveryCodesMissing:j.totp_recovery_codes_missing,totpEnabled:j.totp_registered}),le&&(0,X.jsx)(Se,{onOpenModal:S,passkeyCount:j.passkey_count})]})]}),ue&&(0,X.jsx)(xe,{getAuthorizeUrl:ne,onUnlinkRequest:e=>p({id:e.id,name:e.display_name}),providers:M,unlinkingProvider:c}),(0,X.jsx)(ye,{isConfigManaged:P,isDeletionEnabled:V,onDeleteClick:()=>w(!0)}),(0,X.jsx)(Be,{isOpen:h===`set`,onClose:()=>v(null)}),(0,X.jsx)(Me,{isOpen:h===`change`,onClose:()=>v(null)}),(0,X.jsx)(ze,{isOpen:h===`remove`,onClose:()=>v(null)}),(0,X.jsx)(He,{isOpen:y===`setup`,onClose:()=>b(null)}),(0,X.jsx)(Fe,{isOpen:y===`disable`,onClose:()=>b(null)}),(0,X.jsx)(Re,{isOpen:y===`regenerate`,onClose:()=>b(null)}),(0,X.jsx)(Ve,{isOpen:x===`setup`,onClose:()=>S(null)}),(0,X.jsx)(Ie,{isOpen:x===`manage`,onAddNew:()=>S(`setup`),onClose:()=>S(null)}),(0,X.jsx)(Ee,{isOpen:f!==null,isPending:k.isPending,onClose:()=>p(null),onConfirm:A,providerName:f?.name??``}),(0,X.jsx)(Pe,{isOpen:C,onClose:()=>w(!1),retentionDays:W})]})}export{We as component};
|
|
2
|
+
//# sourceMappingURL=profile-PjXEnzA-.js.map
|