shipscreens 0.1.0 → 0.1.2
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/README.md +0 -8
- package/bin/shipscreens.js +223 -28
- package/cli/assets/demo-screens/01.png +0 -0
- package/cli/assets/demo-screens/02.png +0 -0
- package/cli/assets/demo-screens/03.png +0 -0
- package/cli/assets/demo-screens/04.png +0 -0
- package/cli/commands/build.js +27 -27
- package/cli/schema.js +59 -20
- package/dist/app/assets/{AgentCli-8e28laT4.js → AgentCli-FWNCO1pb.js} +5 -5
- package/dist/app/assets/AgentCli-FWNCO1pb.js.map +1 -0
- package/dist/app/assets/App-yU7CFXCv.js +13 -0
- package/dist/app/assets/App-yU7CFXCv.js.map +1 -0
- package/dist/app/assets/{AppReviewAso-OLwc4Rw_.js → AppReviewAso-BYfaP1Lu.js} +3 -3
- package/dist/{assets/AppReviewAso-OLwc4Rw_.js.map → app/assets/AppReviewAso-BYfaP1Lu.js.map} +1 -1
- package/dist/app/assets/{Cancelled-BoeZQa1S.js → Cancelled-66ixTUrm.js} +2 -2
- package/dist/app/assets/{Cancelled-BoeZQa1S.js.map → Cancelled-66ixTUrm.js.map} +1 -1
- package/dist/app/assets/CliPreflightCard-D7utpFux.js +2 -0
- package/dist/app/assets/{CliPreflightCard-CxYyogdF.js.map → CliPreflightCard-D7utpFux.js.map} +1 -1
- package/dist/app/assets/CopyButton-CmVmSaYn.js +2 -0
- package/dist/app/assets/CopyButton-CmVmSaYn.js.map +1 -0
- package/dist/app/assets/{FastlaneScreenshots-CFT6IiRb.js → FastlaneScreenshots-CRMcetq-.js} +4 -4
- package/dist/{assets/FastlaneScreenshots-CFT6IiRb.js.map → app/assets/FastlaneScreenshots-CRMcetq-.js.map} +1 -1
- package/dist/app/assets/{FirstExport-B_UDacZm.js → FirstExport-C0WgL4Hl.js} +3 -3
- package/dist/{assets/FirstExport-B_UDacZm.js.map → app/assets/FirstExport-C0WgL4Hl.js.map} +1 -1
- package/dist/app/assets/{FivePanelFramework-C1z_xUbe.js → FivePanelFramework-BwCRmXIK.js} +3 -3
- package/dist/{assets/FivePanelFramework-C1z_xUbe.js.map → app/assets/FivePanelFramework-BwCRmXIK.js.map} +1 -1
- package/dist/app/assets/{ForgotPassword-ZQ8U3ejz.js → ForgotPassword-B9_si1tH.js} +2 -2
- package/dist/{assets/ForgotPassword-ZQ8U3ejz.js.map → app/assets/ForgotPassword-B9_si1tH.js.map} +1 -1
- package/dist/app/assets/Landing-s1ni1n-7.js +2 -0
- package/dist/app/assets/Landing-s1ni1n-7.js.map +1 -0
- package/dist/app/assets/{LanguageSwitcher-D93nCuuR.js → LanguageSwitcher-BD9N-dla.js} +2 -2
- package/dist/{assets/LanguageSwitcher-D93nCuuR.js.map → app/assets/LanguageSwitcher-BD9N-dla.js.map} +1 -1
- package/dist/app/assets/{Legal-Koe7vi6H.js → Legal-D3cAXQXw.js} +2 -2
- package/dist/app/assets/{Legal-Koe7vi6H.js.map → Legal-D3cAXQXw.js.map} +1 -1
- package/dist/app/assets/{NotFound-CfY31vMZ.js → NotFound-ClV-6RmP.js} +2 -2
- package/dist/app/assets/{NotFound-CfY31vMZ.js.map → NotFound-ClV-6RmP.js.map} +1 -1
- package/dist/app/assets/{Privacy-CaHf2UM7.js → Privacy-DfxgWwC3.js} +2 -2
- package/dist/{assets/Privacy-CaHf2UM7.js.map → app/assets/Privacy-DfxgWwC3.js.map} +1 -1
- package/dist/app/assets/{SignIn-Cyi2_-Mn.js → SignIn-ghQCKcPe.js} +2 -2
- package/dist/app/assets/{SignIn-Cyi2_-Mn.js.map → SignIn-ghQCKcPe.js.map} +1 -1
- package/dist/app/assets/{SignUp-C9QH5po_.js → SignUp-BKB87hd4.js} +2 -2
- package/dist/app/assets/{SignUp-C9QH5po_.js.map → SignUp-BKB87hd4.js.map} +1 -1
- package/dist/app/assets/SiteHeader-DxsqNPnt.js +2 -0
- package/dist/app/assets/SiteHeader-DxsqNPnt.js.map +1 -0
- package/dist/app/assets/{StickyMobileCta-uyWGVhdc.js → StickyMobileCta-C_x2pUIF.js} +2 -2
- package/dist/app/assets/{StickyMobileCta-uyWGVhdc.js.map → StickyMobileCta-C_x2pUIF.js.map} +1 -1
- package/dist/{assets/StoreAssetsPipeline-BJlnD3kD.js → app/assets/StoreAssetsPipeline-4hXRONUd.js} +3 -3
- package/dist/app/assets/{StoreAssetsPipeline-BJlnD3kD.js.map → StoreAssetsPipeline-4hXRONUd.js.map} +1 -1
- package/dist/app/assets/{Success-B7k7FvJj.js → Success-819qvzmp.js} +2 -2
- package/dist/app/assets/{Success-B7k7FvJj.js.map → Success-819qvzmp.js.map} +1 -1
- package/dist/app/assets/{Terms-DgJWOeUD.js → Terms-7k3nA4SU.js} +2 -2
- package/dist/app/assets/{Terms-DgJWOeUD.js.map → Terms-7k3nA4SU.js.map} +1 -1
- package/dist/app/assets/{ToolsIndex-xMPoFom9.js → ToolsIndex-CzrxymnM.js} +3 -3
- package/dist/{assets/ToolsIndex-xMPoFom9.js.map → app/assets/ToolsIndex-CzrxymnM.js.map} +1 -1
- package/dist/app/assets/{WorkloadCalculator-Bdt6qPR3.js → WorkloadCalculator-D2TuKS4B.js} +4 -4
- package/dist/app/assets/{WorkloadCalculator-Bdt6qPR3.js.map → WorkloadCalculator-D2TuKS4B.js.map} +1 -1
- package/dist/app/assets/{calculator-CWfp5Day.js → calculator-CiqKFdRp.js} +2 -2
- package/dist/app/assets/{calculator-CWfp5Day.js.map → calculator-CiqKFdRp.js.map} +1 -1
- package/dist/app/assets/chevron-down-_xIkRLaA.js +2 -0
- package/dist/app/assets/{chevron-down-DbSAem1L.js.map → chevron-down-_xIkRLaA.js.map} +1 -1
- package/dist/app/assets/{clipboard-copy-DgTgnK84.js → clipboard-copy-DCJioqIc.js} +2 -2
- package/dist/app/assets/{clipboard-copy-DgTgnK84.js.map → clipboard-copy-DCJioqIc.js.map} +1 -1
- package/dist/app/assets/{copy-C9t_FzCZ.js → copy-AQdWJCcs.js} +2 -2
- package/dist/app/assets/{copy-C9t_FzCZ.js.map → copy-AQdWJCcs.js.map} +1 -1
- package/dist/app/assets/{crop-B7IxIx6D.js → crop-DOMVp18h.js} +2 -2
- package/dist/app/assets/{crop-B7IxIx6D.js.map → crop-DOMVp18h.js.map} +1 -1
- package/dist/app/assets/{download-65Zuvgwm.js → download-D5RbyXDm.js} +2 -2
- package/dist/app/assets/{download-65Zuvgwm.js.map → download-D5RbyXDm.js.map} +1 -1
- package/dist/app/assets/{eye-ouNo8Nv5.js → eye-CLcZi_uk.js} +2 -2
- package/dist/{assets/eye-ouNo8Nv5.js.map → app/assets/eye-CLcZi_uk.js.map} +1 -1
- package/dist/app/assets/{grid-3x3-U1Nk_ppf.js → grid-3x3-AKmIrhzv.js} +2 -2
- package/dist/{assets/grid-3x3-U1Nk_ppf.js.map → app/assets/grid-3x3-AKmIrhzv.js.map} +1 -1
- package/dist/app/assets/hero/demo-25s-poster.jpg +0 -0
- package/dist/app/assets/hero/demo-25s.mp4 +0 -0
- package/dist/app/assets/hero/demo-25s.webm +0 -0
- package/dist/app/assets/hero/demo-poster.jpg +0 -0
- package/dist/app/assets/hero/demo.mp4 +0 -0
- package/dist/app/assets/hero/demo.webm +0 -0
- package/dist/{assets/index-B8Y8Y-Mi.js → app/assets/index-Bqv2NztY.js} +6 -6
- package/dist/app/assets/index-Bqv2NztY.js.map +1 -0
- package/dist/{assets/index-hyiQFYGv.css → app/assets/index-DGVMa-P7.css} +1 -1
- package/dist/app/assets/{layout-grid-X9Sgull2.js → layout-grid-CpGXUPMR.js} +2 -2
- package/dist/app/assets/{layout-grid-X9Sgull2.js.map → layout-grid-CpGXUPMR.js.map} +1 -1
- package/dist/app/assets/proof/output-01.png +0 -0
- package/dist/app/assets/proof/output-02.png +0 -0
- package/dist/app/assets/proof/output-03.png +0 -0
- package/dist/app/assets/proof/output-04.png +0 -0
- package/dist/app/assets/{rocket-BjOXauLe.js → rocket-IzRFv1aW.js} +2 -2
- package/dist/app/assets/{rocket-BjOXauLe.js.map → rocket-IzRFv1aW.js.map} +1 -1
- package/dist/app/assets/{shield-check-CFNhE_aD.js → shield-check-CngdN3zn.js} +2 -2
- package/dist/{assets/shield-check-CFNhE_aD.js.map → app/assets/shield-check-CngdN3zn.js.map} +1 -1
- package/dist/app/assets/{signIn-CVoSzqCz.js → signIn-Cn6FaQYi.js} +2 -2
- package/dist/{assets/signIn-CVoSzqCz.js.map → app/assets/signIn-Cn6FaQYi.js.map} +1 -1
- package/dist/app/assets/{smartphone-BcQB9gIh.js → smartphone-CpNG_Pfk.js} +2 -2
- package/dist/app/assets/{smartphone-BcQB9gIh.js.map → smartphone-CpNG_Pfk.js.map} +1 -1
- package/dist/app/assets/{terminal-CGhryJds.js → terminal-BbBESfoU.js} +2 -2
- package/dist/{assets/terminal-CGhryJds.js.map → app/assets/terminal-BbBESfoU.js.map} +1 -1
- package/dist/{assets/useAuth-lZZC20Tl.js → app/assets/useAuth-3WWZ3GCD.js} +2 -2
- package/dist/app/assets/{useAuth-lZZC20Tl.js.map → useAuth-3WWZ3GCD.js.map} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/assets/{AgentCli-8e28laT4.js → AgentCli-FWNCO1pb.js} +5 -5
- package/dist/assets/AgentCli-FWNCO1pb.js.map +1 -0
- package/dist/assets/App-yU7CFXCv.js +13 -0
- package/dist/assets/App-yU7CFXCv.js.map +1 -0
- package/dist/assets/{AppReviewAso-OLwc4Rw_.js → AppReviewAso-BYfaP1Lu.js} +3 -3
- package/dist/{app/assets/AppReviewAso-OLwc4Rw_.js.map → assets/AppReviewAso-BYfaP1Lu.js.map} +1 -1
- package/dist/assets/{Cancelled-BoeZQa1S.js → Cancelled-66ixTUrm.js} +2 -2
- package/dist/assets/{Cancelled-BoeZQa1S.js.map → Cancelled-66ixTUrm.js.map} +1 -1
- package/dist/assets/CliPreflightCard-D7utpFux.js +2 -0
- package/dist/assets/{CliPreflightCard-CxYyogdF.js.map → CliPreflightCard-D7utpFux.js.map} +1 -1
- package/dist/assets/CopyButton-CmVmSaYn.js +2 -0
- package/dist/assets/CopyButton-CmVmSaYn.js.map +1 -0
- package/dist/assets/{FastlaneScreenshots-CFT6IiRb.js → FastlaneScreenshots-CRMcetq-.js} +4 -4
- package/dist/{app/assets/FastlaneScreenshots-CFT6IiRb.js.map → assets/FastlaneScreenshots-CRMcetq-.js.map} +1 -1
- package/dist/assets/{FirstExport-B_UDacZm.js → FirstExport-C0WgL4Hl.js} +3 -3
- package/dist/{app/assets/FirstExport-B_UDacZm.js.map → assets/FirstExport-C0WgL4Hl.js.map} +1 -1
- package/dist/assets/{FivePanelFramework-C1z_xUbe.js → FivePanelFramework-BwCRmXIK.js} +3 -3
- package/dist/{app/assets/FivePanelFramework-C1z_xUbe.js.map → assets/FivePanelFramework-BwCRmXIK.js.map} +1 -1
- package/dist/assets/{ForgotPassword-ZQ8U3ejz.js → ForgotPassword-B9_si1tH.js} +2 -2
- package/dist/{app/assets/ForgotPassword-ZQ8U3ejz.js.map → assets/ForgotPassword-B9_si1tH.js.map} +1 -1
- package/dist/assets/Landing-s1ni1n-7.js +2 -0
- package/dist/assets/Landing-s1ni1n-7.js.map +1 -0
- package/dist/assets/{LanguageSwitcher-D93nCuuR.js → LanguageSwitcher-BD9N-dla.js} +2 -2
- package/dist/{app/assets/LanguageSwitcher-D93nCuuR.js.map → assets/LanguageSwitcher-BD9N-dla.js.map} +1 -1
- package/dist/assets/{Legal-Koe7vi6H.js → Legal-D3cAXQXw.js} +2 -2
- package/dist/assets/{Legal-Koe7vi6H.js.map → Legal-D3cAXQXw.js.map} +1 -1
- package/dist/assets/{NotFound-CfY31vMZ.js → NotFound-ClV-6RmP.js} +2 -2
- package/dist/assets/{NotFound-CfY31vMZ.js.map → NotFound-ClV-6RmP.js.map} +1 -1
- package/dist/assets/{Privacy-CaHf2UM7.js → Privacy-DfxgWwC3.js} +2 -2
- package/dist/{app/assets/Privacy-CaHf2UM7.js.map → assets/Privacy-DfxgWwC3.js.map} +1 -1
- package/dist/assets/{SignIn-Cyi2_-Mn.js → SignIn-ghQCKcPe.js} +2 -2
- package/dist/assets/{SignIn-Cyi2_-Mn.js.map → SignIn-ghQCKcPe.js.map} +1 -1
- package/dist/assets/{SignUp-C9QH5po_.js → SignUp-BKB87hd4.js} +2 -2
- package/dist/assets/{SignUp-C9QH5po_.js.map → SignUp-BKB87hd4.js.map} +1 -1
- package/dist/assets/SiteHeader-DxsqNPnt.js +2 -0
- package/dist/assets/SiteHeader-DxsqNPnt.js.map +1 -0
- package/dist/assets/{StickyMobileCta-uyWGVhdc.js → StickyMobileCta-C_x2pUIF.js} +2 -2
- package/dist/assets/{StickyMobileCta-uyWGVhdc.js.map → StickyMobileCta-C_x2pUIF.js.map} +1 -1
- package/dist/{app/assets/StoreAssetsPipeline-BJlnD3kD.js → assets/StoreAssetsPipeline-4hXRONUd.js} +3 -3
- package/dist/assets/{StoreAssetsPipeline-BJlnD3kD.js.map → StoreAssetsPipeline-4hXRONUd.js.map} +1 -1
- package/dist/assets/{Success-B7k7FvJj.js → Success-819qvzmp.js} +2 -2
- package/dist/assets/{Success-B7k7FvJj.js.map → Success-819qvzmp.js.map} +1 -1
- package/dist/assets/{Terms-DgJWOeUD.js → Terms-7k3nA4SU.js} +2 -2
- package/dist/assets/{Terms-DgJWOeUD.js.map → Terms-7k3nA4SU.js.map} +1 -1
- package/dist/assets/{ToolsIndex-xMPoFom9.js → ToolsIndex-CzrxymnM.js} +3 -3
- package/dist/{app/assets/ToolsIndex-xMPoFom9.js.map → assets/ToolsIndex-CzrxymnM.js.map} +1 -1
- package/dist/assets/{WorkloadCalculator-Bdt6qPR3.js → WorkloadCalculator-D2TuKS4B.js} +4 -4
- package/dist/assets/{WorkloadCalculator-Bdt6qPR3.js.map → WorkloadCalculator-D2TuKS4B.js.map} +1 -1
- package/dist/assets/{calculator-CWfp5Day.js → calculator-CiqKFdRp.js} +2 -2
- package/dist/assets/{calculator-CWfp5Day.js.map → calculator-CiqKFdRp.js.map} +1 -1
- package/dist/assets/chevron-down-_xIkRLaA.js +2 -0
- package/dist/assets/{chevron-down-DbSAem1L.js.map → chevron-down-_xIkRLaA.js.map} +1 -1
- package/dist/assets/{clipboard-copy-DgTgnK84.js → clipboard-copy-DCJioqIc.js} +2 -2
- package/dist/assets/{clipboard-copy-DgTgnK84.js.map → clipboard-copy-DCJioqIc.js.map} +1 -1
- package/dist/assets/{copy-C9t_FzCZ.js → copy-AQdWJCcs.js} +2 -2
- package/dist/assets/{copy-C9t_FzCZ.js.map → copy-AQdWJCcs.js.map} +1 -1
- package/dist/assets/{crop-B7IxIx6D.js → crop-DOMVp18h.js} +2 -2
- package/dist/assets/{crop-B7IxIx6D.js.map → crop-DOMVp18h.js.map} +1 -1
- package/dist/assets/{download-65Zuvgwm.js → download-D5RbyXDm.js} +2 -2
- package/dist/assets/{download-65Zuvgwm.js.map → download-D5RbyXDm.js.map} +1 -1
- package/dist/assets/{eye-ouNo8Nv5.js → eye-CLcZi_uk.js} +2 -2
- package/dist/{app/assets/eye-ouNo8Nv5.js.map → assets/eye-CLcZi_uk.js.map} +1 -1
- package/dist/assets/{grid-3x3-U1Nk_ppf.js → grid-3x3-AKmIrhzv.js} +2 -2
- package/dist/{app/assets/grid-3x3-U1Nk_ppf.js.map → assets/grid-3x3-AKmIrhzv.js.map} +1 -1
- package/dist/assets/hero/demo-25s-poster.jpg +0 -0
- package/dist/assets/hero/demo-25s.mp4 +0 -0
- package/dist/assets/hero/demo-25s.webm +0 -0
- package/dist/assets/hero/demo-poster.jpg +0 -0
- package/dist/assets/hero/demo.mp4 +0 -0
- package/dist/assets/hero/demo.webm +0 -0
- package/dist/{app/assets/index-B8Y8Y-Mi.js → assets/index-Bqv2NztY.js} +6 -6
- package/dist/assets/index-Bqv2NztY.js.map +1 -0
- package/dist/{app/assets/index-hyiQFYGv.css → assets/index-DGVMa-P7.css} +1 -1
- package/dist/assets/{layout-grid-X9Sgull2.js → layout-grid-CpGXUPMR.js} +2 -2
- package/dist/assets/{layout-grid-X9Sgull2.js.map → layout-grid-CpGXUPMR.js.map} +1 -1
- package/dist/assets/proof/output-01.png +0 -0
- package/dist/assets/proof/output-02.png +0 -0
- package/dist/assets/proof/output-03.png +0 -0
- package/dist/assets/proof/output-04.png +0 -0
- package/dist/assets/{rocket-BjOXauLe.js → rocket-IzRFv1aW.js} +2 -2
- package/dist/assets/{rocket-BjOXauLe.js.map → rocket-IzRFv1aW.js.map} +1 -1
- package/dist/assets/{shield-check-CFNhE_aD.js → shield-check-CngdN3zn.js} +2 -2
- package/dist/{app/assets/shield-check-CFNhE_aD.js.map → assets/shield-check-CngdN3zn.js.map} +1 -1
- package/dist/assets/{signIn-CVoSzqCz.js → signIn-Cn6FaQYi.js} +2 -2
- package/dist/{app/assets/signIn-CVoSzqCz.js.map → assets/signIn-Cn6FaQYi.js.map} +1 -1
- package/dist/assets/{smartphone-BcQB9gIh.js → smartphone-CpNG_Pfk.js} +2 -2
- package/dist/assets/{smartphone-BcQB9gIh.js.map → smartphone-CpNG_Pfk.js.map} +1 -1
- package/dist/assets/{terminal-CGhryJds.js → terminal-BbBESfoU.js} +2 -2
- package/dist/{app/assets/terminal-CGhryJds.js.map → assets/terminal-BbBESfoU.js.map} +1 -1
- package/dist/{app/assets/useAuth-lZZC20Tl.js → assets/useAuth-3WWZ3GCD.js} +2 -2
- package/dist/assets/{useAuth-lZZC20Tl.js.map → useAuth-3WWZ3GCD.js.map} +1 -1
- package/dist/cancelled/index.html +2 -2
- package/dist/forgot-password/index.html +2 -2
- package/dist/index.html +2 -2
- package/dist/legal/index.html +2 -2
- package/dist/privacy/index.html +2 -2
- package/dist/signin/index.html +2 -2
- package/dist/signup/index.html +2 -2
- package/dist/sitemap.xml +0 -4
- package/dist/success/index.html +2 -2
- package/dist/terms/index.html +2 -2
- package/dist/tools/5-panel-screenshot-framework/index.html +2 -2
- package/dist/tools/agent-cli/index.html +2 -2
- package/dist/tools/app-review-aso/index.html +2 -2
- package/dist/tools/fastlane-screenshots/index.html +2 -2
- package/dist/tools/first-export/index.html +2 -2
- package/dist/tools/index.html +2 -2
- package/dist/tools/screenshot-workload-calculator/index.html +2 -2
- package/dist/tools/store-assets-pipeline/index.html +2 -2
- package/package.json +3 -3
- package/templates/agent/agent-prompt.txt +8 -0
- package/dist/app/assets/AgentCli-8e28laT4.js.map +0 -1
- package/dist/app/assets/App-DU0xew0e.js +0 -13
- package/dist/app/assets/App-DU0xew0e.js.map +0 -1
- package/dist/app/assets/CliPreflightCard-CxYyogdF.js +0 -2
- package/dist/app/assets/CopyButton-CGfuSJtU.js +0 -2
- package/dist/app/assets/CopyButton-CGfuSJtU.js.map +0 -1
- package/dist/app/assets/Landing-DAIP71DD.js +0 -2
- package/dist/app/assets/Landing-DAIP71DD.js.map +0 -1
- package/dist/app/assets/Pricing-BQwtFVbj.js +0 -2
- package/dist/app/assets/Pricing-BQwtFVbj.js.map +0 -1
- package/dist/app/assets/SiteHeader-Dj3gDOnR.js +0 -2
- package/dist/app/assets/SiteHeader-Dj3gDOnR.js.map +0 -1
- package/dist/app/assets/check-BWCiUZ-C.js +0 -2
- package/dist/app/assets/check-BWCiUZ-C.js.map +0 -1
- package/dist/app/assets/chevron-down-DbSAem1L.js +0 -2
- package/dist/app/assets/circle-check-CeakjiXC.js +0 -2
- package/dist/app/assets/circle-check-CeakjiXC.js.map +0 -1
- package/dist/app/assets/hero/cli-build-tree-15s.mp4 +0 -0
- package/dist/app/assets/hero/cli-build-tree-15s.webm +0 -0
- package/dist/app/assets/hero/cli-build-tree-25s.mp4 +0 -0
- package/dist/app/assets/hero/cli-build-tree-25s.webm +0 -0
- package/dist/app/assets/hero/cli-build-tree-poster.png +0 -0
- package/dist/app/assets/hero/demo.gif +0 -0
- package/dist/app/assets/index-B8Y8Y-Mi.js.map +0 -1
- package/dist/assets/AgentCli-8e28laT4.js.map +0 -1
- package/dist/assets/App-DU0xew0e.js +0 -13
- package/dist/assets/App-DU0xew0e.js.map +0 -1
- package/dist/assets/CliPreflightCard-CxYyogdF.js +0 -2
- package/dist/assets/CopyButton-CGfuSJtU.js +0 -2
- package/dist/assets/CopyButton-CGfuSJtU.js.map +0 -1
- package/dist/assets/Landing-DAIP71DD.js +0 -2
- package/dist/assets/Landing-DAIP71DD.js.map +0 -1
- package/dist/assets/Pricing-BQwtFVbj.js +0 -2
- package/dist/assets/Pricing-BQwtFVbj.js.map +0 -1
- package/dist/assets/SiteHeader-Dj3gDOnR.js +0 -2
- package/dist/assets/SiteHeader-Dj3gDOnR.js.map +0 -1
- package/dist/assets/check-BWCiUZ-C.js +0 -2
- package/dist/assets/check-BWCiUZ-C.js.map +0 -1
- package/dist/assets/chevron-down-DbSAem1L.js +0 -2
- package/dist/assets/circle-check-CeakjiXC.js +0 -2
- package/dist/assets/circle-check-CeakjiXC.js.map +0 -1
- package/dist/assets/hero/cli-build-tree-15s.mp4 +0 -0
- package/dist/assets/hero/cli-build-tree-15s.webm +0 -0
- package/dist/assets/hero/cli-build-tree-25s.mp4 +0 -0
- package/dist/assets/hero/cli-build-tree-25s.webm +0 -0
- package/dist/assets/hero/cli-build-tree-poster.png +0 -0
- package/dist/assets/hero/demo.gif +0 -0
- package/dist/assets/index-B8Y8Y-Mi.js.map +0 -1
- package/dist/pricing/index.html +0 -33
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,u as L,j as l,s as k,c as A,t as N}from"./index-
|
|
2
|
-
//# sourceMappingURL=LanguageSwitcher-
|
|
1
|
+
import{r as i,u as L,j as l,s as k,c as A,t as N}from"./index-Bqv2NztY.js";const E=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();const S=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const T=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase());const x=e=>{const t=T(e);return t.charAt(0).toUpperCase()+t.slice(1)};var $={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const _=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const D=i.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:c,...u},d)=>i.createElement("svg",{ref:d,...$,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:E("lucide",a),...!o&&!_(u)&&{"aria-hidden":"true"},...u},[...c.map(([p,f])=>i.createElement(p,f)),...Array.isArray(o)?o:[o]]));const C=(e,t)=>{const n=i.forwardRef(({className:s,...a},o)=>i.createElement(D,{ref:o,iconNode:t,className:E(`lucide-${S(x(e))}`,`lucide-${e}`,s),...a}));return n.displayName=x(e),n};const M=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],O=C("globe",M);const R=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],z=C("x",R),B='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])',v=e=>{if(!e)return[];const t=e.querySelectorAll(B);return Array.from(t).filter(n=>n&&typeof n.focus=="function")},G=({isOpen:e,onClose:t,panelRef:n,initialFocusRef:s,closeOnEscape:a=!0,trapFocus:o=!0,lockScroll:c=!0,restoreFocus:u=!0}={})=>{const d=i.useRef(null),p=i.useRef(null);i.useEffect(()=>{if(!e||typeof window>"u")return;u&&(d.current=document.activeElement),c&&(p.current=document.body.style.overflow,document.body.style.overflow="hidden");const f=s?.current;if(f&&typeof f.focus=="function")f.focus();else{const r=v(n?.current);r[0]&&r[0].focus()}const h=r=>{if(r.key==="Escape"&&a){r.preventDefault(),t?.();return}if(r.key!=="Tab"||!o)return;const m=n?.current;if(!m)return;const g=v(m);if(g.length===0)return;const w=g[0],y=g[g.length-1],b=document.activeElement;if(!m.contains(b)){r.preventDefault(),w.focus();return}if(r.shiftKey){b===w&&(r.preventDefault(),y.focus());return}b===y&&(r.preventDefault(),w.focus())};return window.addEventListener("keydown",h),()=>{if(window.removeEventListener("keydown",h),c&&(document.body.style.overflow=p.current??""),u){const r=d.current;r&&typeof r.focus=="function"&&r.focus()}}},[a,s,e,c,t,n,u,o])},j=()=>{if("".toLowerCase()==="staging"||"".includes("api-stg"))return!0;if(typeof window<"u"){const n=window.location.hostname.toLowerCase();if(n.includes("develop")||n.includes("stg"))return!0}return!1},I=()=>{const e="".toLowerCase().trim();return e==="1"||e==="true"||e==="yes"||e==="on"},K=(e,t)=>{const{t:n,i18n:s}=L(),a=JSON.stringify(t??{}),o=i.useMemo(()=>JSON.parse(a),[a]);i.useEffect(()=>{const c=n(e,o),u=j()?"[Staging] ":"";c&&(document.title=`${u}${c}`)},[e,n,s.language,o])},P=()=>j()?l.jsx("div",{className:"fixed top-3 left-3 z-[200] px-3 py-1.5 rounded-full bg-amber-500 text-amber-950 text-xs font-bold shadow-lg shadow-amber-500/30 border border-amber-600",children:"STAGING"}):null,J=e=>(e||"").split("-")[0]==="ja"?"ja":"en",F=({className:e=""})=>{const{i18n:t,t:n}=L(),s=J(t.resolvedLanguage||t.language),a=async()=>{const o=s==="en"?"ja":"en",c=typeof window<"u"?window.location.pathname:void 0;k(o),A(o);try{await t.changeLanguage(o),N("lang_switch",{from:s,to:o,path:c})}catch{}};return l.jsxs("button",{type:"button",onClick:a,className:`flex items-center gap-2 px-3 py-1.5 rounded-full border border-slate-200 text-xs font-semibold transition-colors ${e} ${s==="ja"?"bg-slate-50 text-slate-800":"bg-white text-slate-600 hover:bg-slate-50"}`,title:n(s==="en"?"app.header.switchToJa":"app.header.switchToEn"),children:[l.jsx(O,{size:14}),l.jsx("span",{className:s==="ja"?"text-slate-800":"text-slate-400",children:"JA"}),l.jsx("span",{className:"text-slate-300",children:"/"}),l.jsx("span",{className:s==="en"?"text-slate-800":"text-slate-400",children:"EN"})]})};export{F as L,P as S,z as X,K as a,C as c,I as i,G as u};
|
|
2
|
+
//# sourceMappingURL=LanguageSwitcher-BD9N-dla.js.map
|
package/dist/{assets/LanguageSwitcher-D93nCuuR.js.map → app/assets/LanguageSwitcher-BD9N-dla.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher-D93nCuuR.js","sources":["../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js","../../node_modules/lucide-react/dist/esm/defaultAttributes.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js","../../node_modules/lucide-react/dist/esm/Icon.js","../../node_modules/lucide-react/dist/esm/createLucideIcon.js","../../node_modules/lucide-react/dist/esm/icons/globe.js","../../node_modules/lucide-react/dist/esm/icons/x.js","../../src/hooks/useModalA11y.js","../../src/lib/env.js","../../src/hooks/usePageTitle.js","../../src/components/StagingBadge.jsx","../../src/components/LanguageSwitcher.jsx"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses };\n//# sourceMappingURL=mergeClasses.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { toKebabCase };\n//# sourceMappingURL=toKebabCase.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\n\nexport { toCamelCase };\n//# sourceMappingURL=toCamelCase.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { toCamelCase } from './toCamelCase.js';\n\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\n\nexport { toPascalCase };\n//# sourceMappingURL=toPascalCase.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n return false;\n};\n\nexport { hasA11yProp };\n//# sourceMappingURL=hasA11yProp.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { hasA11yProp } from './shared/src/utils/hasA11yProp.js';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.js';\nimport { toKebabCase } from './shared/src/utils/toKebabCase.js';\nimport { toPascalCase } from './shared/src/utils/toPascalCase.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\", key: \"13o1zl\" }],\n [\"path\", { d: \"M2 12h20\", key: \"9i4pu4\" }]\n];\nconst Globe = createLucideIcon(\"globe\", __iconNode);\n\nexport { __iconNode, Globe as default };\n//# sourceMappingURL=globe.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n","import { useEffect, useRef } from 'react';\n\nconst DEFAULT_FOCUSABLE_SELECTOR =\n 'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex=\"-1\"])';\n\nconst getFocusable = (root) => {\n if (!root) return [];\n const nodes = root.querySelectorAll(DEFAULT_FOCUSABLE_SELECTOR);\n return Array.from(nodes).filter((node) => node && typeof node.focus === 'function');\n};\n\nconst useModalA11y = ({\n isOpen,\n onClose,\n panelRef,\n initialFocusRef,\n closeOnEscape = true,\n trapFocus = true,\n lockScroll = true,\n restoreFocus = true,\n} = {}) => {\n const previousFocusRef = useRef(null);\n const previousOverflowRef = useRef(null);\n\n useEffect(() => {\n if (!isOpen) return;\n if (typeof window === 'undefined') return;\n\n if (restoreFocus) previousFocusRef.current = document.activeElement;\n if (lockScroll) {\n previousOverflowRef.current = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n\n const focusTarget = initialFocusRef?.current;\n if (focusTarget && typeof focusTarget.focus === 'function') {\n focusTarget.focus();\n } else {\n const focusable = getFocusable(panelRef?.current);\n if (focusable[0]) focusable[0].focus();\n }\n\n const handleKeyDown = (event) => {\n if (event.key === 'Escape' && closeOnEscape) {\n event.preventDefault();\n onClose?.();\n return;\n }\n\n if (event.key !== 'Tab' || !trapFocus) return;\n\n const panel = panelRef?.current;\n if (!panel) return;\n\n const focusable = getFocusable(panel);\n if (focusable.length === 0) return;\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = document.activeElement;\n\n if (!panel.contains(active)) {\n event.preventDefault();\n first.focus();\n return;\n }\n\n if (event.shiftKey) {\n if (active === first) {\n event.preventDefault();\n last.focus();\n }\n return;\n }\n\n if (active === last) {\n event.preventDefault();\n first.focus();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n\n if (lockScroll) document.body.style.overflow = previousOverflowRef.current ?? '';\n\n if (restoreFocus) {\n const previous = previousFocusRef.current;\n if (previous && typeof previous.focus === 'function') previous.focus();\n }\n };\n }, [closeOnEscape, initialFocusRef, isOpen, lockScroll, onClose, panelRef, restoreFocus, trapFocus]);\n};\n\nexport default useModalA11y;\n\n","export const isStagingEnv = () => {\n const envFlag = (import.meta.env.VITE_APP_ENV || '').toLowerCase();\n if (envFlag === 'staging') return true;\n\n const api = import.meta.env.VITE_API_ENDPOINT || '';\n if (api.includes('api-stg')) return true;\n\n if (typeof window !== 'undefined') {\n const host = window.location.hostname.toLowerCase();\n if (host.includes('develop') || host.includes('stg')) return true;\n }\n\n return false;\n};\n\nexport const isTeamSyncEnabled = () => {\n const flag = (import.meta.env.VITE_FEATURE_TEAM_SYNC || '').toLowerCase().trim();\n return flag === '1' || flag === 'true' || flag === 'yes' || flag === 'on';\n};\n","import { useEffect, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { isStagingEnv } from '../lib/env';\n\n const usePageTitle = (titleKey, options) => {\n const { t, i18n } = useTranslation();\n const optionsKey = JSON.stringify(options ?? {});\n const stableOptions = useMemo(() => JSON.parse(optionsKey), [optionsKey]);\n\n useEffect(() => {\n const base = t(titleKey, stableOptions);\n const prefix = isStagingEnv() ? '[Staging] ' : '';\n if (base) {\n document.title = `${prefix}${base}`;\n }\n }, [titleKey, t, i18n.language, stableOptions]);\n};\n\nexport default usePageTitle;\n","import React from 'react';\nimport { isStagingEnv } from '../lib/env';\n\nconst StagingBadge = () => {\n if (!isStagingEnv()) return null;\n\n return (\n <div className=\"fixed top-3 left-3 z-[200] px-3 py-1.5 rounded-full bg-amber-500 text-amber-950 text-xs font-bold shadow-lg shadow-amber-500/30 border border-amber-600\">\n STAGING\n </div>\n );\n};\n\nexport default StagingBadge;\n","import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Globe } from 'lucide-react';\nimport { setHtmlLang, saveLang } from '../lib/locale';\nimport { trackEvent } from '../lib/analytics';\n\nconst normalizeLang = (lang) => {\n const base = (lang || '').split('-')[0];\n return base === 'ja' ? 'ja' : 'en';\n};\n\nconst LanguageSwitcher = ({ className = '' }) => {\n const { i18n, t } = useTranslation();\n const lang = normalizeLang(i18n.resolvedLanguage || i18n.language);\n\n const toggleLang = async () => {\n const newLang = lang === 'en' ? 'ja' : 'en';\n const path = typeof window !== 'undefined' ? window.location.pathname : undefined;\n setHtmlLang(newLang);\n saveLang(newLang);\n try {\n await i18n.changeLanguage(newLang);\n trackEvent('lang_switch', { from: lang, to: newLang, path });\n } catch {\n // If changeLanguage fails, keep the persisted language for the next load.\n }\n };\n\n return (\n <button\n type=\"button\"\n onClick={toggleLang}\n className={`flex items-center gap-2 px-3 py-1.5 rounded-full border border-slate-200 text-xs font-semibold transition-colors ${className} ${\n lang === 'ja' ? 'bg-slate-50 text-slate-800' : 'bg-white text-slate-600 hover:bg-slate-50'\n }`}\n title={lang === 'en' ? t('app.header.switchToJa') : t('app.header.switchToEn')}\n >\n <Globe size={14} />\n <span className={lang === 'ja' ? 'text-slate-800' : 'text-slate-400'}>JA</span>\n <span className=\"text-slate-300\">/</span>\n <span className={lang === 'en' ? 'text-slate-800' : 'text-slate-400'}>EN</span>\n </button>\n );\n};\n\nexport default LanguageSwitcher;\n"],"names":["mergeClasses","classes","className","index","array","toKebabCase","string","toCamelCase","match","p1","p2","toPascalCase","camelCase","defaultAttributes","hasA11yProp","props","prop","Icon","forwardRef","color","size","strokeWidth","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","tag","attrs","createLucideIcon","iconName","Component","__iconNode","Globe","X","DEFAULT_FOCUSABLE_SELECTOR","getFocusable","root","nodes","node","useModalA11y","isOpen","onClose","panelRef","initialFocusRef","closeOnEscape","trapFocus","lockScroll","restoreFocus","previousFocusRef","useRef","previousOverflowRef","useEffect","focusTarget","focusable","handleKeyDown","event","panel","first","last","active","previous","isStagingEnv","host","isTeamSyncEnabled","flag","usePageTitle","titleKey","options","t","i18n","useTranslation","optionsKey","stableOptions","useMemo","base","prefix","StagingBadge","jsx","normalizeLang","lang","LanguageSwitcher","toggleLang","newLang","path","setHtmlLang","saveLang","trackEvent","jsxs"],"mappings":"2EAOA,MAAMA,EAAe,IAAIC,IAAYA,EAAQ,OAAO,CAACC,EAAWC,EAAOC,IAC9D,EAAQF,GAAcA,EAAU,KAAI,IAAO,IAAME,EAAM,QAAQF,CAAS,IAAMC,CACtF,EAAE,KAAK,GAAG,EAAE,KAAI,ECFjB,MAAME,EAAeC,GAAWA,EAAO,QAAQ,qBAAsB,OAAO,EAAE,YAAW,ECAzF,MAAMC,EAAeD,GAAWA,EAAO,QACrC,wBACA,CAACE,EAAOC,EAAIC,IAAOA,EAAKA,EAAG,YAAW,EAAKD,EAAG,YAAW,CAC3D,ECDA,MAAME,EAAgBL,GAAW,CAC/B,MAAMM,EAAYL,EAAYD,CAAM,EACpC,OAAOM,EAAU,OAAO,CAAC,EAAE,YAAW,EAAKA,EAAU,MAAM,CAAC,CAC9D,ECLA,IAAIC,EAAoB,CACtB,MAAO,6BACP,MAAO,GACP,OAAQ,GACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,YAAa,EACb,cAAe,QACf,eAAgB,OAClB,ECVA,MAAMC,EAAeC,GAAU,CAC7B,UAAWC,KAAQD,EACjB,GAAIC,EAAK,WAAW,OAAO,GAAKA,IAAS,QAAUA,IAAS,QAC1D,MAAO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AAU,iBAAiB,SAAA,IAAC,QACjC,OAAA,CAAK,UAAWE,IAAS,KAAO,iBAAmB,iBAAkB,SAAA,IAAA,CAAE,CAAA,CAAA,CAAA,CAG9E","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher-BD9N-dla.js","sources":["../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js","../../node_modules/lucide-react/dist/esm/defaultAttributes.js","../../node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js","../../node_modules/lucide-react/dist/esm/Icon.js","../../node_modules/lucide-react/dist/esm/createLucideIcon.js","../../node_modules/lucide-react/dist/esm/icons/globe.js","../../node_modules/lucide-react/dist/esm/icons/x.js","../../src/hooks/useModalA11y.js","../../src/lib/env.js","../../src/hooks/usePageTitle.js","../../src/components/StagingBadge.jsx","../../src/components/LanguageSwitcher.jsx"],"sourcesContent":["/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses };\n//# sourceMappingURL=mergeClasses.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { toKebabCase };\n//# sourceMappingURL=toKebabCase.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\n\nexport { toCamelCase };\n//# sourceMappingURL=toCamelCase.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { toCamelCase } from './toCamelCase.js';\n\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\n\nexport { toPascalCase };\n//# sourceMappingURL=toPascalCase.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n return false;\n};\n\nexport { hasA11yProp };\n//# sourceMappingURL=hasA11yProp.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { hasA11yProp } from './shared/src/utils/hasA11yProp.js';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.js';\nimport { toKebabCase } from './shared/src/utils/toKebabCase.js';\nimport { toPascalCase } from './shared/src/utils/toPascalCase.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\", key: \"13o1zl\" }],\n [\"path\", { d: \"M2 12h20\", key: \"9i4pu4\" }]\n];\nconst Globe = createLucideIcon(\"globe\", __iconNode);\n\nexport { __iconNode, Globe as default };\n//# sourceMappingURL=globe.js.map\n","/**\n * @license lucide-react v0.563.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n","import { useEffect, useRef } from 'react';\n\nconst DEFAULT_FOCUSABLE_SELECTOR =\n 'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex=\"-1\"])';\n\nconst getFocusable = (root) => {\n if (!root) return [];\n const nodes = root.querySelectorAll(DEFAULT_FOCUSABLE_SELECTOR);\n return Array.from(nodes).filter((node) => node && typeof node.focus === 'function');\n};\n\nconst useModalA11y = ({\n isOpen,\n onClose,\n panelRef,\n initialFocusRef,\n closeOnEscape = true,\n trapFocus = true,\n lockScroll = true,\n restoreFocus = true,\n} = {}) => {\n const previousFocusRef = useRef(null);\n const previousOverflowRef = useRef(null);\n\n useEffect(() => {\n if (!isOpen) return;\n if (typeof window === 'undefined') return;\n\n if (restoreFocus) previousFocusRef.current = document.activeElement;\n if (lockScroll) {\n previousOverflowRef.current = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n\n const focusTarget = initialFocusRef?.current;\n if (focusTarget && typeof focusTarget.focus === 'function') {\n focusTarget.focus();\n } else {\n const focusable = getFocusable(panelRef?.current);\n if (focusable[0]) focusable[0].focus();\n }\n\n const handleKeyDown = (event) => {\n if (event.key === 'Escape' && closeOnEscape) {\n event.preventDefault();\n onClose?.();\n return;\n }\n\n if (event.key !== 'Tab' || !trapFocus) return;\n\n const panel = panelRef?.current;\n if (!panel) return;\n\n const focusable = getFocusable(panel);\n if (focusable.length === 0) return;\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = document.activeElement;\n\n if (!panel.contains(active)) {\n event.preventDefault();\n first.focus();\n return;\n }\n\n if (event.shiftKey) {\n if (active === first) {\n event.preventDefault();\n last.focus();\n }\n return;\n }\n\n if (active === last) {\n event.preventDefault();\n first.focus();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n\n if (lockScroll) document.body.style.overflow = previousOverflowRef.current ?? '';\n\n if (restoreFocus) {\n const previous = previousFocusRef.current;\n if (previous && typeof previous.focus === 'function') previous.focus();\n }\n };\n }, [closeOnEscape, initialFocusRef, isOpen, lockScroll, onClose, panelRef, restoreFocus, trapFocus]);\n};\n\nexport default useModalA11y;\n\n","export const isStagingEnv = () => {\n const envFlag = (import.meta.env.VITE_APP_ENV || '').toLowerCase();\n if (envFlag === 'staging') return true;\n\n const api = import.meta.env.VITE_API_ENDPOINT || '';\n if (api.includes('api-stg')) return true;\n\n if (typeof window !== 'undefined') {\n const host = window.location.hostname.toLowerCase();\n if (host.includes('develop') || host.includes('stg')) return true;\n }\n\n return false;\n};\n\nexport const isTeamSyncEnabled = () => {\n const flag = (import.meta.env.VITE_FEATURE_TEAM_SYNC || '').toLowerCase().trim();\n return flag === '1' || flag === 'true' || flag === 'yes' || flag === 'on';\n};\n","import { useEffect, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { isStagingEnv } from '../lib/env';\n\n const usePageTitle = (titleKey, options) => {\n const { t, i18n } = useTranslation();\n const optionsKey = JSON.stringify(options ?? {});\n const stableOptions = useMemo(() => JSON.parse(optionsKey), [optionsKey]);\n\n useEffect(() => {\n const base = t(titleKey, stableOptions);\n const prefix = isStagingEnv() ? '[Staging] ' : '';\n if (base) {\n document.title = `${prefix}${base}`;\n }\n }, [titleKey, t, i18n.language, stableOptions]);\n};\n\nexport default usePageTitle;\n","import React from 'react';\nimport { isStagingEnv } from '../lib/env';\n\nconst StagingBadge = () => {\n if (!isStagingEnv()) return null;\n\n return (\n <div className=\"fixed top-3 left-3 z-[200] px-3 py-1.5 rounded-full bg-amber-500 text-amber-950 text-xs font-bold shadow-lg shadow-amber-500/30 border border-amber-600\">\n STAGING\n </div>\n );\n};\n\nexport default StagingBadge;\n","import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Globe } from 'lucide-react';\nimport { setHtmlLang, saveLang } from '../lib/locale';\nimport { trackEvent } from '../lib/analytics';\n\nconst normalizeLang = (lang) => {\n const base = (lang || '').split('-')[0];\n return base === 'ja' ? 'ja' : 'en';\n};\n\nconst LanguageSwitcher = ({ className = '' }) => {\n const { i18n, t } = useTranslation();\n const lang = normalizeLang(i18n.resolvedLanguage || i18n.language);\n\n const toggleLang = async () => {\n const newLang = lang === 'en' ? 'ja' : 'en';\n const path = typeof window !== 'undefined' ? window.location.pathname : undefined;\n setHtmlLang(newLang);\n saveLang(newLang);\n try {\n await i18n.changeLanguage(newLang);\n trackEvent('lang_switch', { from: lang, to: newLang, path });\n } catch {\n // If changeLanguage fails, keep the persisted language for the next load.\n }\n };\n\n return (\n <button\n type=\"button\"\n onClick={toggleLang}\n className={`flex items-center gap-2 px-3 py-1.5 rounded-full border border-slate-200 text-xs font-semibold transition-colors ${className} ${\n lang === 'ja' ? 'bg-slate-50 text-slate-800' : 'bg-white text-slate-600 hover:bg-slate-50'\n }`}\n title={lang === 'en' ? t('app.header.switchToJa') : t('app.header.switchToEn')}\n >\n <Globe size={14} />\n <span className={lang === 'ja' ? 'text-slate-800' : 'text-slate-400'}>JA</span>\n <span className=\"text-slate-300\">/</span>\n <span className={lang === 'en' ? 'text-slate-800' : 'text-slate-400'}>EN</span>\n </button>\n );\n};\n\nexport default LanguageSwitcher;\n"],"names":["mergeClasses","classes","className","index","array","toKebabCase","string","toCamelCase","match","p1","p2","toPascalCase","camelCase","defaultAttributes","hasA11yProp","props","prop","Icon","forwardRef","color","size","strokeWidth","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","tag","attrs","createLucideIcon","iconName","Component","__iconNode","Globe","X","DEFAULT_FOCUSABLE_SELECTOR","getFocusable","root","nodes","node","useModalA11y","isOpen","onClose","panelRef","initialFocusRef","closeOnEscape","trapFocus","lockScroll","restoreFocus","previousFocusRef","useRef","previousOverflowRef","useEffect","focusTarget","focusable","handleKeyDown","event","panel","first","last","active","previous","isStagingEnv","host","isTeamSyncEnabled","flag","usePageTitle","titleKey","options","t","i18n","useTranslation","optionsKey","stableOptions","useMemo","base","prefix","StagingBadge","jsx","normalizeLang","lang","LanguageSwitcher","toggleLang","newLang","path","setHtmlLang","saveLang","trackEvent","jsxs"],"mappings":"2EAOA,MAAMA,EAAe,IAAIC,IAAYA,EAAQ,OAAO,CAACC,EAAWC,EAAOC,IAC9D,EAAQF,GAAcA,EAAU,KAAI,IAAO,IAAME,EAAM,QAAQF,CAAS,IAAMC,CACtF,EAAE,KAAK,GAAG,EAAE,KAAI,ECFjB,MAAME,EAAeC,GAAWA,EAAO,QAAQ,qBAAsB,OAAO,EAAE,YAAW,ECAzF,MAAMC,EAAeD,GAAWA,EAAO,QACrC,wBACA,CAACE,EAAOC,EAAIC,IAAOA,EAAKA,EAAG,YAAW,EAAKD,EAAG,YAAW,CAC3D,ECDA,MAAME,EAAgBL,GAAW,CAC/B,MAAMM,EAAYL,EAAYD,CAAM,EACpC,OAAOM,EAAU,OAAO,CAAC,EAAE,YAAW,EAAKA,EAAU,MAAM,CAAC,CAC9D,ECLA,IAAIC,EAAoB,CACtB,MAAO,6BACP,MAAO,GACP,OAAQ,GACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,YAAa,EACb,cAAe,QACf,eAAgB,OAClB,ECVA,MAAMC,EAAeC,GAAU,CAC7B,UAAWC,KAAQD,EACjB,GAAIC,EAAK,WAAW,OAAO,GAAKA,IAAS,QAAUA,IAAS,QAC1D,MAAO,GAGX,MAAO,EACT,ECFA,MAAMC,EAAOC,EAAAA,WACX,CAAC,CACC,MAAAC,EAAQ,eACR,KAAAC,EAAO,GACP,YAAAC,EAAc,EACd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CAG9E","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as r,j as e}from"./index-
|
|
2
|
-
//# sourceMappingURL=Legal-
|
|
1
|
+
import{u as r,j as e}from"./index-Bqv2NztY.js";import{a as d,S as c}from"./LanguageSwitcher-BD9N-dla.js";import{S as m}from"./SiteHeader-DxsqNPnt.js";const h=()=>{const{t:s}=r();d("titles.legal");const i=s("legal.fields",{returnObjects:!0})||[],t=s("legal.notes",{returnObjects:!0})||[];return e.jsxs("div",{className:"min-h-screen bg-slate-50 text-slate-800",children:[e.jsx(c,{}),e.jsx(m,{variant:"light",showX:!1}),e.jsxs("main",{className:"max-w-4xl mx-auto px-4 py-12",children:[e.jsx("h1",{className:"text-3xl font-bold mb-6",children:s("legal.title")}),e.jsx("p",{className:"mb-6",children:s("legal.intro")}),e.jsx("dl",{className:"bg-white rounded-2xl border border-slate-200 shadow-sm divide-y divide-slate-100",children:i.map((l,a)=>e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[220px_1fr] gap-1 md:gap-3 px-4 py-3",children:[e.jsx("dt",{className:"font-semibold text-slate-700",children:l.label}),e.jsx("dd",{className:"text-slate-800",children:l.value})]},`${l.label}-${a}`))}),t.length>0&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h2",{className:"text-xl font-semibold mb-2",children:s("legal.notesTitle")}),e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-slate-700",children:t.map((l,a)=>e.jsx("li",{children:l},`${l}-${a}`))})]}),e.jsx("p",{className:"mt-6 text-sm text-slate-600",children:s("legal.contact",{email:"support@shimaumaservices.co.jp"})})]})]})};export{h as default};
|
|
2
|
+
//# sourceMappingURL=Legal-D3cAXQXw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Legal-
|
|
1
|
+
{"version":3,"file":"Legal-D3cAXQXw.js","sources":["../../src/pages/Legal.jsx"],"sourcesContent":["import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport StagingBadge from '../components/StagingBadge';\nimport SiteHeader from '../components/SiteHeader';\nimport usePageTitle from '../hooks/usePageTitle';\n\nconst Legal = () => {\n const { t } = useTranslation();\n usePageTitle('titles.legal');\n const fields = t('legal.fields', { returnObjects: true }) || [];\n const notes = t('legal.notes', { returnObjects: true }) || [];\n\n return (\n <div className=\"min-h-screen bg-slate-50 text-slate-800\">\n <StagingBadge />\n <SiteHeader variant=\"light\" showX={false} />\n\n <main className=\"max-w-4xl mx-auto px-4 py-12\">\n <h1 className=\"text-3xl font-bold mb-6\">{t('legal.title')}</h1>\n <p className=\"mb-6\">{t('legal.intro')}</p>\n\n <dl className=\"bg-white rounded-2xl border border-slate-200 shadow-sm divide-y divide-slate-100\">\n {fields.map((item, idx) => (\n <div\n key={`${item.label}-${idx}`}\n className=\"grid grid-cols-1 md:grid-cols-[220px_1fr] gap-1 md:gap-3 px-4 py-3\"\n >\n <dt className=\"font-semibold text-slate-700\">{item.label}</dt>\n <dd className=\"text-slate-800\">{item.value}</dd>\n </div>\n ))}\n </dl>\n\n {notes.length > 0 && (\n <div className=\"mt-8\">\n <h2 className=\"text-xl font-semibold mb-2\">{t('legal.notesTitle')}</h2>\n <ul className=\"list-disc pl-5 space-y-1 text-slate-700\">\n {notes.map((note, idx) => (\n <li key={`${note}-${idx}`}>{note}</li>\n ))}\n </ul>\n </div>\n )}\n\n <p className=\"mt-6 text-sm text-slate-600\">{t('legal.contact', { email: 'support@shimaumaservices.co.jp' })}</p>\n </main>\n </div>\n );\n};\n\r\nexport default Legal;\r\n"],"names":["Legal","t","useTranslation","usePageTitle","fields","notes","jsxs","jsx","StagingBadge","SiteHeader","item","idx","note"],"mappings":"sJAMA,MAAMA,EAAQ,IAAM,CAClB,KAAM,CAAE,EAAAC,CAAA,EAAMC,EAAA,EACdC,EAAa,cAAc,EAC3B,MAAMC,EAASH,EAAE,eAAgB,CAAE,cAAe,EAAA,CAAM,GAAK,CAAA,EACvDI,EAAQ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|
+
import{u as s,j as e}from"./index-Bqv2NztY.js";import{a,S as l}from"./LanguageSwitcher-BD9N-dla.js";import{S as n}from"./SiteHeader-DxsqNPnt.js";const i=()=>{const{t}=s();return a("titles.notFound"),e.jsxs("div",{className:"min-h-screen bg-slate-50 text-slate-800 flex flex-col",children:[e.jsx(l,{}),e.jsx(n,{variant:"light",showX:!1}),e.jsx("main",{className:"flex-1 flex items-center justify-center px-6 py-10",children:e.jsxs("div",{className:"max-w-lg text-center space-y-4",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-slate-200 text-slate-600 font-bold text-xl",children:"404"}),e.jsx("h1",{className:"text-3xl font-bold",children:t("notFound.title")}),e.jsx("p",{className:"text-slate-600",children:t("notFound.description")}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsx("a",{href:"/",className:"px-4 py-2 rounded-lg border border-slate-300 text-slate-700 hover:bg-slate-100",children:t("notFound.backHome")}),e.jsx("a",{href:"/tools/",className:"px-4 py-2 rounded-lg border border-slate-300 text-slate-700 hover:bg-slate-100",children:t("landing.nav.tools")}),e.jsx("a",{href:"/app/",className:"px-4 py-2 rounded-lg bg-slate-900 text-white hover:bg-slate-800",children:t("notFound.openApp")})]})]})})]})};export{i as default};
|
|
2
|
+
//# sourceMappingURL=NotFound-ClV-6RmP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotFound-
|
|
1
|
+
{"version":3,"file":"NotFound-ClV-6RmP.js","sources":["../../src/pages/NotFound.jsx"],"sourcesContent":["import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport usePageTitle from '../hooks/usePageTitle';\nimport StagingBadge from '../components/StagingBadge';\nimport SiteHeader from '../components/SiteHeader';\n\nconst NotFound = () => {\n const { t } = useTranslation();\n usePageTitle('titles.notFound');\n return (\n <div className=\"min-h-screen bg-slate-50 text-slate-800 flex flex-col\">\n <StagingBadge />\n <SiteHeader variant=\"light\" showX={false} />\n <main className=\"flex-1 flex items-center justify-center px-6 py-10\">\n <div className=\"max-w-lg text-center space-y-4\">\n <div className=\"inline-flex items-center justify-center w-16 h-16 rounded-full bg-slate-200 text-slate-600 font-bold text-xl\">\n 404\n </div>\n <h1 className=\"text-3xl font-bold\">{t('notFound.title')}</h1>\n <p className=\"text-slate-600\">{t('notFound.description')}</p>\n <div className=\"flex gap-3 justify-center\">\n <a href=\"/\" className=\"px-4 py-2 rounded-lg border border-slate-300 text-slate-700 hover:bg-slate-100\">\n {t('notFound.backHome')}\n </a>\n <a href=\"/tools/\" className=\"px-4 py-2 rounded-lg border border-slate-300 text-slate-700 hover:bg-slate-100\">\n {t('landing.nav.tools')}\n </a>\n <a href=\"/app/\" className=\"px-4 py-2 rounded-lg bg-slate-900 text-white hover:bg-slate-800\">\n {t('notFound.openApp')}\n </a>\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default NotFound;\n"],"names":["NotFound","useTranslation","usePageTitle","jsxs","jsx","StagingBadge","SiteHeader"],"mappings":"iJAMA,MAAMA,EAAW,IAAM,CACrB,KAAM,CAAE,CAAA,EAAMC,EAAA,EACd,OAAAC,EAAa,iBAAiB,EAE5BC,EAAAA,KAAC,MAAA,CAAI,UAAU,wDACb,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAa,EACdD,EAAAA,IAACE,EAAA,CAAW,QAAQ,QAAQ,MAAO,GAAO,QACzC,OAAA,CAAK,UAAU,qDACd,SAAAH,EAAAA,KAAC,MAAA,CAAI,UAAU,iCACb,SAAA,CAAAC,EAAAA,IAAC,MAAA,CAAI,UAAU,+GAA+G,SAAA,MAE9H,QACC,KAAA,CAAG,UAAU,qBAAsB,SAAA,EAAE,gBAAgB,EAAE,QACvD,IAAA,CAAE,UAAU,iBAAkB,SAAA,EAAE,sBAAsB,EAAE,EACzDD,EAAAA,KAAC,MAAA,CAAI,UAAU,4BACb,SAAA,CAAAC,EAAAA,IAAC,KAAE,KAAK,IAAI,UAAU,iFACnB,SAAA,EAAE,mBAAmB,EACxB,EACAA,EAAAA,IAAC,KAAE,KAAK,UAAU,UAAU,iFACzB,SAAA,EAAE,mBAAmB,EACxB,EACAA,MAAC,KAAE,KAAK,QAAQ,UAAU,kEACvB,SAAA,EAAE,kBAAkB,CAAA,CACvB,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,EACF,CAEJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as l,j as s}from"./index-
|
|
2
|
-
//# sourceMappingURL=Privacy-
|
|
1
|
+
import{u as l,j as s}from"./index-Bqv2NztY.js";import{a as c,S as r}from"./LanguageSwitcher-BD9N-dla.js";import{S as m}from"./SiteHeader-DxsqNPnt.js";const d=()=>{const{t:e}=l();c("titles.privacy");const a=e("privacy.sections",{returnObjects:!0})||[];return s.jsxs("div",{className:"min-h-screen bg-slate-50 text-slate-800",children:[s.jsx(r,{}),s.jsx(m,{variant:"light",showX:!1}),s.jsxs("main",{className:"max-w-4xl mx-auto px-4 py-12",children:[s.jsx("h1",{className:"text-3xl font-bold mb-6",children:e("privacy.title")}),s.jsx("p",{className:"mb-4",children:e("privacy.intro")}),a.map(t=>s.jsx(n,{title:t.title,body:t.body,items:t.items},t.title)),s.jsx("p",{className:"mt-6 text-sm text-slate-600",children:e("privacy.contact",{email:"support@shimaumaservices.co.jp"})})]})]})},n=({title:e,body:a,items:t})=>s.jsxs("section",{children:[s.jsx("h2",{className:"text-xl font-semibold mt-6 mb-2",children:e}),t?s.jsx("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:t.map(i=>s.jsx("li",{children:i},i))}):s.jsx("p",{className:"mb-3",children:a})]});export{d as default};
|
|
2
|
+
//# sourceMappingURL=Privacy-DfxgWwC3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Privacy-
|
|
1
|
+
{"version":3,"file":"Privacy-DfxgWwC3.js","sources":["../../src/pages/Privacy.jsx"],"sourcesContent":["import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport StagingBadge from '../components/StagingBadge';\nimport SiteHeader from '../components/SiteHeader';\nimport usePageTitle from '../hooks/usePageTitle';\n\nconst Privacy = () => {\n const { t } = useTranslation();\n usePageTitle('titles.privacy');\n const sections = t('privacy.sections', { returnObjects: true }) || [];\n\n return (\n <div className=\"min-h-screen bg-slate-50 text-slate-800\">\n <StagingBadge />\n <SiteHeader variant=\"light\" showX={false} />\n\n <main className=\"max-w-4xl mx-auto px-4 py-12\">\n <h1 className=\"text-3xl font-bold mb-6\">{t('privacy.title')}</h1>\n <p className=\"mb-4\">{t('privacy.intro')}</p>\n {sections.map((section) => (\n <Section key={section.title} title={section.title} body={section.body} items={section.items} />\n ))}\n <p className=\"mt-6 text-sm text-slate-600\">{t('privacy.contact', { email: 'support@shimaumaservices.co.jp' })}</p>\n </main>\n </div>\n );\n};\n\r\nconst Section = ({ title, body, items }) => (\r\n <section>\r\n <h2 className=\"text-xl font-semibold mt-6 mb-2\">{title}</h2>\r\n {items ? (\r\n <ul className=\"list-disc pl-6 space-y-2 mb-4\">\r\n {items.map((item) => (\r\n <li key={item}>{item}</li>\r\n ))}\r\n </ul>\r\n ) : (\r\n <p className=\"mb-3\">{body}</p>\r\n )}\r\n </section>\r\n);\r\n\r\nexport default Privacy;\r\n"],"names":["Privacy","t","useTranslation","usePageTitle","sections","jsxs","jsx","StagingBadge","SiteHeader","section","Section","title","body","items","item"],"mappings":"sJAMA,MAAMA,EAAU,IAAM,CACpB,KAAM,CAAE,EAAAC,CAAA,EAAMC,EAAA,EACdC,EAAa,gBAAgB,EAC7B,MAAMC,EAAWH,EAAE,mBAAoB,CAAE,cAAe,EAAA,CAAM,GAAK,CAAA,EAEnE,OACEI,EAAAA,KAAC,MAAA,CAAI,UAAU,0CACb,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAa,EACdD,EAAAA,IAACE,EAAA,CAAW,QAAQ,QAAQ,MAAO,GAAO,EAE1CH,EAAAA,KAAC,OAAA,CAAK,UAAU,+BACd,SAAA,CAAAC,MAAC,KAAA,CAAG,UAAU,0BAA2B,SAAAL,EAAE,eAAe,EAAE,QAC3D,IAAA,CAAE,UAAU,OAAQ,SAAAA,EAAE,eAAe,EAAE,EACvCG,EAAS,IAAKK,GACbH,EAAAA,IAACI,GAA4B,MAAOD,EAAQ,MAAO,KAAMA,EAAQ,KAAM,MAAOA,EAAQ,OAAxEA,EAAQ,KAAuE,CAC9F,EACDH,EAAAA,IAAC,IAAA,CAAE,UAAU,8BAA+B,SAAAL,EAAE,kBAAmB,CAAE,MAAO,gCAAA,CAAkC,CAAA,CAAE,CAAA,CAAA,CAChH,CAAA,EACF,CAEJ,EAEMS,EAAU,CAAC,CAAE,MAAAC,EAAO,KAAAC,EAAM,MAAAC,CAAA,WAC7B,UAAA,CACC,SAAA,CAAAP,EAAAA,IAAC,KAAA,CAAG,UAAU,kCAAmC,SAAAK,EAAM,EACtDE,QACE,KAAA,CAAG,UAAU,gCACX,SAAAA,EAAM,IAAKC,GACVR,EAAAA,IAAC,MAAe,SAAAQ,CAAA,EAAPA,CAAY,CACtB,CAAA,CACH,QAEC,IAAA,CAAE,UAAU,OAAQ,SAAAF,CAAA,CAAK,CAAA,EAE9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as j,r as l,j as e}from"./index-
|
|
2
|
-
//# sourceMappingURL=SignIn-
|
|
1
|
+
import{u as j,r as l,j as e}from"./index-Bqv2NztY.js";import{u as y}from"./useAuth-3WWZ3GCD.js";import{a as v,S as N}from"./LanguageSwitcher-BD9N-dla.js";import{S}from"./SiteHeader-DxsqNPnt.js";import{S as P}from"./smartphone-CpNG_Pfk.js";import{E as C,a as E}from"./eye-CLcZi_uk.js";import{s as k}from"./signIn-Cn6FaQYi.js";const I=()=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search).get("next");return!t||!t.startsWith("/")||t.startsWith("//")?null:t},$=()=>{const{t:s}=j();v("titles.signIn");const{isAuthenticated:t,isLoading:o}=y(),a=I(),[i,m]=l.useState(""),[d,p]=l.useState(""),[n,f]=l.useState(!1),[c,u]=l.useState(""),[b,x]=l.useState(!1);l.useEffect(()=>{!o&&t&&(window.location.href=a||"/app/")},[t,o,a]);const w=async r=>{r.preventDefault(),u(""),x(!0);try{await k({username:i,password:d}),window.location.href=a||"/app/"}catch(h){const g=h?.name||h?.code;u(s(`auth.errors.${g}`,s("auth.errors.default")))}finally{x(!1)}};return e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-slate-950 via-slate-900 to-slate-950 text-white flex flex-col",children:[e.jsx(N,{}),e.jsx(S,{variant:"dark",showX:!1}),e.jsx("main",{className:"flex-1 flex items-center justify-center px-4 pb-12",children:e.jsxs("div",{className:"w-full max-w-md bg-slate-900/70 border border-slate-800 rounded-2xl shadow-2xl p-8 space-y-6",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-slate-800 border border-slate-700 text-white shadow-lg",children:e.jsx(P,{size:24})}),e.jsx("h1",{className:"text-2xl font-bold",children:s("auth.title")}),e.jsx("p",{className:"text-slate-400 text-sm",children:s("auth.subtitle")})]}),e.jsxs("form",{onSubmit:w,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{htmlFor:"signin-email",className:"block text-sm text-slate-300",children:s("auth.email")}),e.jsx("input",{id:"signin-email",type:"email",value:i,onChange:r=>m(r.target.value),required:!0,autoComplete:"email",className:"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:s("auth.placeholders.email")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{htmlFor:"signin-password",className:"block text-sm text-slate-300",children:s("auth.password")}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:"signin-password",type:n?"text":"password",value:d,onChange:r=>p(r.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:s("auth.placeholders.password")}),e.jsx("button",{type:"button",onClick:()=>f(r=>!r),className:"absolute inset-y-0 right-0 flex items-center px-3 text-slate-400 hover:text-slate-200","aria-label":n?s("auth.actions.hidePassword",{defaultValue:"Hide password"}):s("auth.actions.showPassword",{defaultValue:"Show password"}),title:n?s("auth.actions.hidePassword",{defaultValue:"Hide password"}):s("auth.actions.showPassword",{defaultValue:"Show password"}),children:n?e.jsx(C,{size:18}):e.jsx(E,{size:18})})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("a",{href:a?`/forgot-password?next=${encodeURIComponent(a)}`:"/forgot-password",className:"text-xs text-blue-300 hover:text-blue-200 underline underline-offset-4",children:s("auth.links.forgotPassword")})})]}),c&&e.jsx("div",{role:"alert",className:"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2",children:c}),e.jsx("button",{type:"submit",disabled:b,className:"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed",children:s("auth.actions.signIn")})]}),e.jsxs("div",{className:"text-center text-sm text-slate-400 space-y-1",children:[e.jsxs("div",{children:[s("auth.actions.needAccount")," ",e.jsx("button",{type:"button",className:"text-blue-300 hover:text-blue-200 underline",onClick:()=>{window.location.href=a?`/signup?next=${encodeURIComponent(a)}`:"/signup"},children:s("auth.actions.goToSignUp")})]}),e.jsxs("div",{className:"text-slate-500 text-xs",children:[e.jsx("div",{children:s("auth.helper.terms")}),e.jsxs("div",{className:"mt-1 flex items-center justify-center gap-2",children:[e.jsx("a",{href:"/terms",className:"underline underline-offset-4 hover:text-slate-200",children:s("landing.footer.terms")}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("a",{href:"/privacy",className:"underline underline-offset-4 hover:text-slate-200",children:s("landing.footer.privacy")})]})]})]})]})})]})};export{$ as default};
|
|
2
|
+
//# sourceMappingURL=SignIn-ghQCKcPe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn-Cyi2_-Mn.js","sources":["../../src/pages/SignIn.jsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { signIn } from 'aws-amplify/auth';\nimport { Eye, EyeOff, Smartphone } from 'lucide-react';\nimport useAuth from '../hooks/useAuth';\nimport usePageTitle from '../hooks/usePageTitle';\nimport StagingBadge from '../components/StagingBadge';\nimport SiteHeader from '../components/SiteHeader';\n\nconst readNextPath = () => {\n if (typeof window === 'undefined') return null;\n const params = new URLSearchParams(window.location.search);\n const next = params.get('next');\n if (!next) return null;\n if (!next.startsWith('/') || next.startsWith('//')) return null;\n return next;\n};\n\nconst SignIn = () => {\n const { t } = useTranslation();\n usePageTitle('titles.signIn');\n const { isAuthenticated, isLoading } = useAuth();\n const nextPath = readNextPath();\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [passwordVisible, setPasswordVisible] = useState(false);\n const [error, setError] = useState('');\n const [busy, setBusy] = useState(false);\n\n useEffect(() => {\n if (!isLoading && isAuthenticated) {\n window.location.href = nextPath || '/app/';\n }\n }, [isAuthenticated, isLoading, nextPath]);\n\n const handleSubmit = async (e) => {\n e.preventDefault();\n setError('');\n setBusy(true);\n try {\n await signIn({ username: email, password });\n window.location.href = nextPath || '/app/';\n } catch (err) {\n const key = err?.name || err?.code;\n setError(t(`auth.errors.${key}`, t('auth.errors.default')));\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <div className=\"min-h-screen bg-gradient-to-b from-slate-950 via-slate-900 to-slate-950 text-white flex flex-col\">\n <StagingBadge />\n <SiteHeader variant=\"dark\" showX={false} />\n <main className=\"flex-1 flex items-center justify-center px-4 pb-12\">\n <div className=\"w-full max-w-md bg-slate-900/70 border border-slate-800 rounded-2xl shadow-2xl p-8 space-y-6\">\n <div className=\"text-center space-y-2\">\n <div className=\"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-slate-800 border border-slate-700 text-white shadow-lg\">\n <Smartphone size={24} />\n </div>\n <h1 className=\"text-2xl font-bold\">{t('auth.title')}</h1>\n <p className=\"text-slate-400 text-sm\">{t('auth.subtitle')}</p>\n </div>\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"signin-email\" className=\"block text-sm text-slate-300\">\n {t('auth.email')}\n </label>\n <input\n id=\"signin-email\"\n type=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n required\n autoComplete=\"email\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.email')}\n />\n </div>\n <div className=\"space-y-2\">\n <label htmlFor=\"signin-password\" className=\"block text-sm text-slate-300\">\n {t('auth.password')}\n </label>\n <div className=\"relative\">\n <input\n id=\"signin-password\"\n type={passwordVisible ? 'text' : 'password'}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n required\n autoComplete=\"current-password\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.password')}\n />\n <button\n type=\"button\"\n onClick={() => setPasswordVisible((prev) => !prev)}\n className=\"absolute inset-y-0 right-0 flex items-center px-3 text-slate-400 hover:text-slate-200\"\n aria-label={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n title={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n >\n {passwordVisible ? <EyeOff size={18} /> : <Eye size={18} />}\n </button>\n </div>\n <div className=\"flex justify-end\">\n <a\n href={nextPath ? `/forgot-password?next=${encodeURIComponent(nextPath)}` : '/forgot-password'}\n className=\"text-xs text-blue-300 hover:text-blue-200 underline underline-offset-4\"\n >\n {t('auth.links.forgotPassword')}\n </a>\n </div>\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2\"\n >\n {error}\n </div>\n )}\n <button\n type=\"submit\"\n disabled={busy}\n className=\"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed\"\n >\n {t('auth.actions.signIn')}\n </button>\n </form>\n <div className=\"text-center text-sm text-slate-400 space-y-1\">\n <div>\n {t('auth.actions.needAccount')}{' '}\n <button\n type=\"button\"\n className=\"text-blue-300 hover:text-blue-200 underline\"\n onClick={() => {\n window.location.href = nextPath ? `/signup?next=${encodeURIComponent(nextPath)}` : '/signup';\n }}\n >\n {t('auth.actions.goToSignUp')}\n </button>\n </div>\n <div className=\"text-slate-500 text-xs\">\n <div>{t('auth.helper.terms')}</div>\n <div className=\"mt-1 flex items-center justify-center gap-2\">\n <a href=\"/terms\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.terms')}\n </a>\n <span aria-hidden=\"true\">·</span>\n <a href=\"/privacy\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.privacy')}\n </a>\n </div>\n </div>\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default SignIn;\n"],"names":["readNextPath","next","SignIn","t","useTranslation","usePageTitle","isAuthenticated","isLoading","useAuth","nextPath","email","setEmail","useState","password","setPassword","passwordVisible","setPasswordVisible","error","setError","busy","setBusy","useEffect","handleSubmit","e","signIn","err","key","jsxs","jsx","StagingBadge","SiteHeader","Smartphone","prev","EyeOff","Eye"],"mappings":"qUASA,MAAMA,EAAe,IAAM,CACzB,GAAI,OAAO,OAAW,IAAa,OAAO,KAE1C,MAAMC,EADS,IAAI,gBAAgB,OAAO,SAAS,MAAM,EACrC,IAAI,MAAM,EAE9B,MADI,CAACA,GACD,CAACA,EAAK,WAAW,GAAG,GAAKA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AAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CACA,CAAA,CACF,CAAA,EACF,CAEJ"}
|
|
1
|
+
{"version":3,"file":"SignIn-ghQCKcPe.js","sources":["../../src/pages/SignIn.jsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { signIn } from 'aws-amplify/auth';\nimport { Eye, EyeOff, Smartphone } from 'lucide-react';\nimport useAuth from '../hooks/useAuth';\nimport usePageTitle from '../hooks/usePageTitle';\nimport StagingBadge from '../components/StagingBadge';\nimport SiteHeader from '../components/SiteHeader';\n\nconst readNextPath = () => {\n if (typeof window === 'undefined') return null;\n const params = new URLSearchParams(window.location.search);\n const next = params.get('next');\n if (!next) return null;\n if (!next.startsWith('/') || next.startsWith('//')) return null;\n return next;\n};\n\nconst SignIn = () => {\n const { t } = useTranslation();\n usePageTitle('titles.signIn');\n const { isAuthenticated, isLoading } = useAuth();\n const nextPath = readNextPath();\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [passwordVisible, setPasswordVisible] = useState(false);\n const [error, setError] = useState('');\n const [busy, setBusy] = useState(false);\n\n useEffect(() => {\n if (!isLoading && isAuthenticated) {\n window.location.href = nextPath || '/app/';\n }\n }, [isAuthenticated, isLoading, nextPath]);\n\n const handleSubmit = async (e) => {\n e.preventDefault();\n setError('');\n setBusy(true);\n try {\n await signIn({ username: email, password });\n window.location.href = nextPath || '/app/';\n } catch (err) {\n const key = err?.name || err?.code;\n setError(t(`auth.errors.${key}`, t('auth.errors.default')));\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <div className=\"min-h-screen bg-gradient-to-b from-slate-950 via-slate-900 to-slate-950 text-white flex flex-col\">\n <StagingBadge />\n <SiteHeader variant=\"dark\" showX={false} />\n <main className=\"flex-1 flex items-center justify-center px-4 pb-12\">\n <div className=\"w-full max-w-md bg-slate-900/70 border border-slate-800 rounded-2xl shadow-2xl p-8 space-y-6\">\n <div className=\"text-center space-y-2\">\n <div className=\"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-slate-800 border border-slate-700 text-white shadow-lg\">\n <Smartphone size={24} />\n </div>\n <h1 className=\"text-2xl font-bold\">{t('auth.title')}</h1>\n <p className=\"text-slate-400 text-sm\">{t('auth.subtitle')}</p>\n </div>\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"signin-email\" className=\"block text-sm text-slate-300\">\n {t('auth.email')}\n </label>\n <input\n id=\"signin-email\"\n type=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n required\n autoComplete=\"email\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.email')}\n />\n </div>\n <div className=\"space-y-2\">\n <label htmlFor=\"signin-password\" className=\"block text-sm text-slate-300\">\n {t('auth.password')}\n </label>\n <div className=\"relative\">\n <input\n id=\"signin-password\"\n type={passwordVisible ? 'text' : 'password'}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n required\n autoComplete=\"current-password\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.password')}\n />\n <button\n type=\"button\"\n onClick={() => setPasswordVisible((prev) => !prev)}\n className=\"absolute inset-y-0 right-0 flex items-center px-3 text-slate-400 hover:text-slate-200\"\n aria-label={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n title={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n >\n {passwordVisible ? <EyeOff size={18} /> : <Eye size={18} />}\n </button>\n </div>\n <div className=\"flex justify-end\">\n <a\n href={nextPath ? `/forgot-password?next=${encodeURIComponent(nextPath)}` : '/forgot-password'}\n className=\"text-xs text-blue-300 hover:text-blue-200 underline underline-offset-4\"\n >\n {t('auth.links.forgotPassword')}\n </a>\n </div>\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2\"\n >\n {error}\n </div>\n )}\n <button\n type=\"submit\"\n disabled={busy}\n className=\"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed\"\n >\n {t('auth.actions.signIn')}\n </button>\n </form>\n <div className=\"text-center text-sm text-slate-400 space-y-1\">\n <div>\n {t('auth.actions.needAccount')}{' '}\n <button\n type=\"button\"\n className=\"text-blue-300 hover:text-blue-200 underline\"\n onClick={() => {\n window.location.href = nextPath ? `/signup?next=${encodeURIComponent(nextPath)}` : '/signup';\n }}\n >\n {t('auth.actions.goToSignUp')}\n </button>\n </div>\n <div className=\"text-slate-500 text-xs\">\n <div>{t('auth.helper.terms')}</div>\n <div className=\"mt-1 flex items-center justify-center gap-2\">\n <a href=\"/terms\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.terms')}\n </a>\n <span aria-hidden=\"true\">·</span>\n <a href=\"/privacy\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.privacy')}\n </a>\n </div>\n </div>\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default SignIn;\n"],"names":["readNextPath","next","SignIn","t","useTranslation","usePageTitle","isAuthenticated","isLoading","useAuth","nextPath","email","setEmail","useState","password","setPassword","passwordVisible","setPasswordVisible","error","setError","busy","setBusy","useEffect","handleSubmit","e","signIn","err","key","jsxs","jsx","StagingBadge","SiteHeader","Smartphone","prev","EyeOff","Eye"],"mappings":"qUASA,MAAMA,EAAe,IAAM,CACzB,GAAI,OAAO,OAAW,IAAa,OAAO,KAE1C,MAAMC,EADS,IAAI,gBAAgB,OAAO,SAAS,MAAM,EACrC,I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WAAW,UAAU,oDAC1B,SAAAzB,EAAE,wBAAwB,CAAA,CAC7B,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CACA,CAAA,CACF,CAAA,EACF,CAEJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as k,r as o,j as e}from"./index-
|
|
2
|
-
//# sourceMappingURL=SignUp-
|
|
1
|
+
import{u as k,r as o,j as e}from"./index-Bqv2NztY.js";import{c as T,D as V,a as D,b as F,d as O,A as _,e as R,f as N,g as U,h as H,i as L,j as M,k as q,l as P,r as z,H as E,m as $,u as B,s as G}from"./useAuth-3WWZ3GCD.js";import{a as W,S as X}from"./LanguageSwitcher-BD9N-dla.js";import{S as J}from"./SiteHeader-DxsqNPnt.js";import{E as K,a as Q}from"./eye-CLcZi_uk.js";import{s as Y}from"./signIn-Cn6FaQYi.js";const Z=t=>T(O,F("ConfirmSignUp"),D(),{...V,...t});async function ee(t){const{username:a,confirmationCode:p,options:l}=t,r=_.getConfig().Auth?.Cognito;R(r);const{userPoolId:w,userPoolClientId:i,userPoolEndpoint:f}=r,h=l?.clientMetadata;N(!!a,U.EmptyConfirmSignUpUsername),N(!!p,U.EmptyConfirmSignUpCode);const y=H({username:a,userPoolId:w,userPoolClientId:i}),c=Z({endpointResolver:$({endpointOverride:f})}),{Session:S}=await c({region:M(r.userPoolId),userAgentValue:L(q.ConfirmSignUp)},{Username:a,ConfirmationCode:p,ClientMetadata:h,ForceAliasCreation:l?.forceAliasCreation,ClientId:r.userPoolClientId,UserContextData:y});return new Promise((x,j)=>{try{const n={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},d=P.getState();if(!d.active||d.username!==a){x(n),z();return}P.dispatch({type:"SET_SESSION",value:S});const u=E.listen("auth-internal",({payload:m})=>{m.event==="autoSignIn"&&(x({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),u())});E.dispatch("auth-internal",{event:"confirmSignUp",data:n})}catch(n){j(n)}})}const te=()=>{if(typeof window>"u")return null;const a=new URLSearchParams(window.location.search).get("next");return!a||!a.startsWith("/")||a.startsWith("//")?null:a},ie=()=>{const{t}=k();W("titles.signUp");const{isAuthenticated:a,isLoading:p}=B(),l=te(),[r,w]=o.useState("form"),[i,f]=o.useState(""),[h,y]=o.useState(""),[c,S]=o.useState(!1),[x,j]=o.useState(""),[n,d]=o.useState(""),[u,m]=o.useState(""),[C,b]=o.useState(!1);o.useEffect(()=>{!p&&a&&(window.location.href=l||"/app/")},[a,p,l]);const A=async s=>{s.preventDefault(),m(""),d(""),b(!0);try{await G({username:i,password:h,options:{userAttributes:{email:i}}}),d(t("auth.success.signup")),w("confirm")}catch(g){const v=g?.name||g?.code;m(t(`auth.errors.${v}`,t("auth.errors.default")))}finally{b(!1)}},I=async s=>{s.preventDefault(),m(""),d(""),b(!0);try{await ee({username:i,confirmationCode:x}),d(t("auth.success.confirm")),await Y({username:i,password:h}),window.location.href=l||"/app/"}catch(g){const v=g?.name||g?.code;m(t(`auth.errors.${v}`,t("auth.errors.default")))}finally{b(!1)}};return e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-slate-950 via-slate-900 to-slate-950 text-white flex flex-col",children:[e.jsx(X,{}),e.jsx(J,{variant:"dark",showX:!1}),e.jsx("main",{className:"flex-1 flex items-center justify-center px-4 pb-12",children:e.jsxs("div",{className:"w-full max-w-md bg-slate-900/70 border border-slate-800 rounded-2xl shadow-2xl p-8 space-y-6",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-blue-500/10 text-blue-300 border border-blue-500/30",children:e.jsx("span",{className:"font-black text-lg",children:"S"})}),e.jsx("h1",{className:"text-2xl font-bold",children:t(r==="form"?"auth.signupTitle":"auth.actions.confirm")}),e.jsx("p",{className:"text-slate-400 text-sm",children:t(r==="form"?"auth.signupSubtitle":"auth.code")})]}),r==="form"&&e.jsxs("form",{onSubmit:A,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{htmlFor:"signup-email",className:"block text-sm text-slate-300",children:t("auth.email")}),e.jsx("input",{id:"signup-email",type:"email",value:i,onChange:s=>f(s.target.value),required:!0,autoComplete:"email",className:"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:t("auth.placeholders.email")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{htmlFor:"signup-password",className:"block text-sm text-slate-300",children:t("auth.password")}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:"signup-password",type:c?"text":"password",value:h,onChange:s=>y(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:t("auth.placeholders.passwordNew")}),e.jsx("button",{type:"button",onClick:()=>S(s=>!s),className:"absolute inset-y-0 right-0 flex items-center px-3 text-slate-400 hover:text-slate-200","aria-label":c?t("auth.actions.hidePassword",{defaultValue:"Hide password"}):t("auth.actions.showPassword",{defaultValue:"Show password"}),title:c?t("auth.actions.hidePassword",{defaultValue:"Hide password"}):t("auth.actions.showPassword",{defaultValue:"Show password"}),children:c?e.jsx(K,{size:18}):e.jsx(Q,{size:18})})]})]}),u&&e.jsx("div",{role:"alert",className:"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2",children:u}),n&&e.jsx("div",{role:"status",className:"text-sm text-emerald-300 bg-emerald-950/40 border border-emerald-700/50 rounded-lg px-3 py-2",children:n}),e.jsx("button",{type:"submit",disabled:C,className:"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed",children:t("auth.actions.createAccount")})]}),r==="confirm"&&e.jsxs("form",{onSubmit:I,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{htmlFor:"signup-email",className:"block text-sm text-slate-300",children:t("auth.email")}),e.jsx("input",{id:"signup-email",type:"email",value:i,onChange:s=>f(s.target.value),required:!0,autoComplete:"email",className:"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:t("auth.placeholders.email")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{htmlFor:"signup-code",className:"block text-sm text-slate-300",children:t("auth.code")}),e.jsx("input",{id:"signup-code",type:"text",value:x,onChange:s=>j(s.target.value),required:!0,className:"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"123456"})]}),u&&e.jsx("div",{role:"alert",className:"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2",children:u}),n&&e.jsx("div",{role:"status",className:"text-sm text-emerald-300 bg-emerald-950/40 border border-emerald-700/50 rounded-lg px-3 py-2",children:n}),e.jsx("button",{type:"submit",disabled:C,className:"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed",children:t("auth.actions.confirm")})]}),e.jsxs("div",{className:"text-center text-sm text-slate-400 space-y-1",children:[e.jsxs("div",{children:[t("auth.actions.haveAccount")," ",e.jsx("button",{type:"button",className:"text-blue-300 hover:text-blue-200 underline",onClick:()=>{window.location.href=l?`/signin?next=${encodeURIComponent(l)}`:"/signin"},children:t("auth.actions.goToSignIn")})]}),e.jsxs("div",{className:"text-slate-500 text-xs",children:[e.jsx("div",{children:t("auth.helper.terms")}),e.jsxs("div",{className:"mt-1 flex items-center justify-center gap-2",children:[e.jsx("a",{href:"/terms",className:"underline underline-offset-4 hover:text-slate-200",children:t("landing.footer.terms")}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("a",{href:"/privacy",className:"underline underline-offset-4 hover:text-slate-200",children:t("landing.footer.privacy")})]})]})]})]})})]})};export{ie as default};
|
|
2
|
+
//# sourceMappingURL=SignUp-BKB87hd4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUp-C9QH5po_.js","sources":["../../node_modules/aws-amplify/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs","../../node_modules/aws-amplify/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmSignUp.mjs","../../src/pages/SignUp.jsx"],"sourcesContent":["import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmSignUp'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmSignUpClient };\n//# sourceMappingURL=createConfirmSignUpClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction, HubInternal } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createConfirmSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms a new user account.\n *\n * @param input - The ConfirmSignUpInput object.\n * @returns ConfirmSignUpOutput\n * @throws -{@link ConfirmSignUpException }\n * Thrown due to an invalid confirmation code.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmSignUp(input) {\n const { username, confirmationCode, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const clientMetadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmSignUpUsername);\n assertValidationError(!!confirmationCode, AuthValidationErrorCode.EmptyConfirmSignUpCode);\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmSignUpClient = createConfirmSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session: session } = await confirmSignUpClient({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignUp),\n }, {\n Username: username,\n ConfirmationCode: confirmationCode,\n ClientMetadata: clientMetadata,\n ForceAliasCreation: options?.forceAliasCreation,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n return new Promise((resolve, reject) => {\n try {\n const signUpOut = {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (!autoSignInStoreState.active ||\n autoSignInStoreState.username !== username) {\n resolve(signUpOut);\n resetAutoSignIn();\n return;\n }\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n const stopListener = HubInternal.listen('auth-internal', ({ payload }) => {\n switch (payload.event) {\n case 'autoSignIn':\n resolve({\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n });\n stopListener();\n }\n });\n HubInternal.dispatch('auth-internal', {\n event: 'confirmSignUp',\n data: signUpOut,\n });\n }\n catch (error) {\n reject(error);\n }\n });\n}\n\nexport { confirmSignUp };\n//# sourceMappingURL=confirmSignUp.mjs.map\n","import React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { signUp, confirmSignUp, signIn } from 'aws-amplify/auth';\nimport { Eye, EyeOff } from 'lucide-react';\nimport useAuth from '../hooks/useAuth';\nimport usePageTitle from '../hooks/usePageTitle';\nimport StagingBadge from '../components/StagingBadge';\nimport SiteHeader from '../components/SiteHeader';\n\nconst readNextPath = () => {\n if (typeof window === 'undefined') return null;\n const params = new URLSearchParams(window.location.search);\n const next = params.get('next');\n if (!next) return null;\n if (!next.startsWith('/') || next.startsWith('//')) return null;\n return next;\n};\n\nconst SignUp = () => {\n const { t } = useTranslation();\n usePageTitle('titles.signUp');\n const { isAuthenticated, isLoading } = useAuth();\n const nextPath = readNextPath();\n const [stage, setStage] = useState('form'); // form | confirm\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [passwordVisible, setPasswordVisible] = useState(false);\n const [code, setCode] = useState('');\n const [message, setMessage] = useState('');\n const [error, setError] = useState('');\n const [busy, setBusy] = useState(false);\n\n useEffect(() => {\n if (!isLoading && isAuthenticated) {\n window.location.href = nextPath || '/app/';\n }\n }, [isAuthenticated, isLoading, nextPath]);\n\n const handleSignUp = async (e) => {\n e.preventDefault();\n setError('');\n setMessage('');\n setBusy(true);\n try {\n await signUp({ username: email, password, options: { userAttributes: { email } } });\n setMessage(t('auth.success.signup'));\n setStage('confirm');\n } catch (err) {\n const key = err?.name || err?.code;\n setError(t(`auth.errors.${key}`, t('auth.errors.default')));\n } finally {\n setBusy(false);\n }\n };\n\n const handleConfirm = async (e) => {\n e.preventDefault();\n setError('');\n setMessage('');\n setBusy(true);\n try {\n await confirmSignUp({ username: email, confirmationCode: code });\n setMessage(t('auth.success.confirm'));\n // 自動でサインインして /app へ\n await signIn({ username: email, password });\n window.location.href = nextPath || '/app/';\n } catch (err) {\n const key = err?.name || err?.code;\n setError(t(`auth.errors.${key}`, t('auth.errors.default')));\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <div className=\"min-h-screen bg-gradient-to-b from-slate-950 via-slate-900 to-slate-950 text-white flex flex-col\">\n <StagingBadge />\n <SiteHeader variant=\"dark\" showX={false} />\n <main className=\"flex-1 flex items-center justify-center px-4 pb-12\">\n <div className=\"w-full max-w-md bg-slate-900/70 border border-slate-800 rounded-2xl shadow-2xl p-8 space-y-6\">\n <div className=\"text-center space-y-2\">\n <div className=\"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-blue-500/10 text-blue-300 border border-blue-500/30\">\n <span className=\"font-black text-lg\">S</span>\n </div>\n <h1 className=\"text-2xl font-bold\">{stage === 'form' ? t('auth.signupTitle') : t('auth.actions.confirm')}</h1>\n <p className=\"text-slate-400 text-sm\">{stage === 'form' ? t('auth.signupSubtitle') : t('auth.code')}</p>\n </div>\n\n {stage === 'form' && (\n <form onSubmit={handleSignUp} className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-email\" className=\"block text-sm text-slate-300\">\n {t('auth.email')}\n </label>\n <input\n id=\"signup-email\"\n type=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n required\n autoComplete=\"email\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.email')}\n />\n </div>\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-password\" className=\"block text-sm text-slate-300\">\n {t('auth.password')}\n </label>\n <div className=\"relative\">\n <input\n id=\"signup-password\"\n type={passwordVisible ? 'text' : 'password'}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n required\n autoComplete=\"new-password\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.passwordNew')}\n />\n <button\n type=\"button\"\n onClick={() => setPasswordVisible((prev) => !prev)}\n className=\"absolute inset-y-0 right-0 flex items-center px-3 text-slate-400 hover:text-slate-200\"\n aria-label={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n title={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n >\n {passwordVisible ? <EyeOff size={18} /> : <Eye size={18} />}\n </button>\n </div>\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2\"\n >\n {error}\n </div>\n )}\n {message && (\n <div\n role=\"status\"\n className=\"text-sm text-emerald-300 bg-emerald-950/40 border border-emerald-700/50 rounded-lg px-3 py-2\"\n >\n {message}\n </div>\n )}\n <button\n type=\"submit\"\n disabled={busy}\n className=\"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed\"\n >\n {t('auth.actions.createAccount')}\n </button>\n </form>\n )}\n\n {stage === 'confirm' && (\n <form onSubmit={handleConfirm} className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-email\" className=\"block text-sm text-slate-300\">\n {t('auth.email')}\n </label>\n <input\n id=\"signup-email\"\n type=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n required\n autoComplete=\"email\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.email')}\n />\n </div>\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-code\" className=\"block text-sm text-slate-300\">\n {t('auth.code')}\n </label>\n <input\n id=\"signup-code\"\n type=\"text\"\n value={code}\n onChange={(e) => setCode(e.target.value)}\n required\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder=\"123456\"\n />\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2\"\n >\n {error}\n </div>\n )}\n {message && (\n <div\n role=\"status\"\n className=\"text-sm text-emerald-300 bg-emerald-950/40 border border-emerald-700/50 rounded-lg px-3 py-2\"\n >\n {message}\n </div>\n )}\n <button\n type=\"submit\"\n disabled={busy}\n className=\"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed\"\n >\n {t('auth.actions.confirm')}\n </button>\n </form>\n )}\n\n <div className=\"text-center text-sm text-slate-400 space-y-1\">\n <div>\n {t('auth.actions.haveAccount')}{' '}\n <button\n type=\"button\"\n className=\"text-blue-300 hover:text-blue-200 underline\"\n onClick={() => {\n window.location.href = nextPath ? `/signin?next=${encodeURIComponent(nextPath)}` : '/signin';\n }}\n >\n {t('auth.actions.goToSignIn')}\n </button>\n </div>\n <div className=\"text-slate-500 text-xs\">\n <div>{t('auth.helper.terms')}</div>\n <div className=\"mt-1 flex items-center justify-center gap-2\">\n <a href=\"/terms\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.terms')}\n </a>\n <span aria-hidden=\"true\">·</span>\n <a href=\"/privacy\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.privacy')}\n </a>\n </div>\n </div>\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default SignUp;\n"],"names":["createConfirmSignUpClient","config","composeServiceApi","cognitoUserPoolTransferHandler","createUserPoolSerializer","createUserPoolDeserializer","DEFAULT_SERVICE_CLIENT_API_CONFIG","confirmSignUp","input","username","confirmationCode","options","authConfig","Amplify","assertTokenProviderConfig","userPoolId","userPoolClientId","userPoolEndpoint","clientMetadata","assertValidationError","AuthValidationErrorCode","UserContextData","getUserContextData","confirmSignUpClient","createCognitoUserPoolEndpointResolver","session","getRegionFromUserPoolId","getAuthUserAgentValue","AuthAction","resolve","reject","signUpOut","autoSignInStoreState","autoSignInStore","resetAutoSignIn","stopListener","HubInternal","payload","error","readNextPath","next","SignUp","useTranslation","usePageTitle","isAuthenticated","isLoading","useAuth","nextPath","stage","setStage","useState","email","setEmail","password","setPassword","passwordVisible","setPasswordVisible","code","setCode","message","setMessage","setError","busy","setBusy","useEffect","handleSignUp","e","signUp","err","key","handleConfirm","signIn","jsxs","jsx","StagingBadge","SiteHeader","prev","EyeOff","Eye"],"mappings":"2ZAUA,MAAMA,EAA6BC,GAAWC,EAAkBC,EAAgCC,EAAyB,eAAe,EAAGC,IAA8B,CACrK,GAAGC,EACH,GAAGL,CACP,CAAC,ECmBD,eAAeM,GAAcC,EAAO,CAChC,KAAM,CAAE,SAAAC,EAAU,iBAAAC,EAAkB,QAAAC,CAAO,EAAKH,EAC1CI,EAAaC,EAAQ,UAAS,EAAG,MAAM,QAC7CC,EAA0BF,CAAU,EACpC,KAAM,CAAE,WAAAG,EAAY,iBAAAC,EAA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OAAO,SAAS,KAAO1B,EAAW,gBAAgB,mBAAmBA,CAAQ,CAAC,GAAK,SACrF,EAEC,WAAE,yBAAyB,CAAA,CAAA,CAC9B,EACF,EACAyB,EAAAA,KAAC,MAAA,CAAI,UAAU,yBACb,SAAA,CAAAC,EAAAA,IAAC,MAAA,CAAK,SAAA,EAAE,mBAAmB,CAAA,CAAE,EAC7BD,EAAAA,KAAC,MAAA,CAAI,UAAU,8CACb,SAAA,CAAAC,EAAAA,IAAC,KAAE,KAAK,SAAS,UAAU,oDACxB,SAAA,EAAE,sBAAsB,EAC3B,EACAA,EAAAA,IAAC,OAAA,CAAK,cAAY,OAAO,SAAA,IAAC,EAC1BA,MAAC,KAAE,KAAK,WAAW,UAAU,oDAC1B,SAAA,EAAE,wBAAwB,CAAA,CAC7B,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CACA,CAAA,CACF,CAAA,EACF,CAEJ","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"SignUp-BKB87hd4.js","sources":["../../node_modules/aws-amplify/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs","../../node_modules/aws-amplify/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmSignUp.mjs","../../src/pages/SignUp.jsx"],"sourcesContent":["import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmSignUp'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmSignUpClient };\n//# sourceMappingURL=createConfirmSignUpClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction, HubInternal } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createConfirmSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms a new user account.\n *\n * @param input - The ConfirmSignUpInput object.\n * @returns ConfirmSignUpOutput\n * @throws -{@link ConfirmSignUpException }\n * Thrown due to an invalid confirmation code.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmSignUp(input) {\n const { username, confirmationCode, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const clientMetadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmSignUpUsername);\n assertValidationError(!!confirmationCode, AuthValidationErrorCode.EmptyConfirmSignUpCode);\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmSignUpClient = createConfirmSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session: session } = await confirmSignUpClient({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignUp),\n }, {\n Username: username,\n ConfirmationCode: confirmationCode,\n ClientMetadata: clientMetadata,\n ForceAliasCreation: options?.forceAliasCreation,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n return new Promise((resolve, reject) => {\n try {\n const signUpOut = {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (!autoSignInStoreState.active ||\n autoSignInStoreState.username !== username) {\n resolve(signUpOut);\n resetAutoSignIn();\n return;\n }\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n const stopListener = HubInternal.listen('auth-internal', ({ payload }) => {\n switch (payload.event) {\n case 'autoSignIn':\n resolve({\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n });\n stopListener();\n }\n });\n HubInternal.dispatch('auth-internal', {\n event: 'confirmSignUp',\n data: signUpOut,\n });\n }\n catch (error) {\n reject(error);\n }\n });\n}\n\nexport { confirmSignUp };\n//# sourceMappingURL=confirmSignUp.mjs.map\n","import React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { signUp, confirmSignUp, signIn } from 'aws-amplify/auth';\nimport { Eye, EyeOff } from 'lucide-react';\nimport useAuth from '../hooks/useAuth';\nimport usePageTitle from '../hooks/usePageTitle';\nimport StagingBadge from '../components/StagingBadge';\nimport SiteHeader from '../components/SiteHeader';\n\nconst readNextPath = () => {\n if (typeof window === 'undefined') return null;\n const params = new URLSearchParams(window.location.search);\n const next = params.get('next');\n if (!next) return null;\n if (!next.startsWith('/') || next.startsWith('//')) return null;\n return next;\n};\n\nconst SignUp = () => {\n const { t } = useTranslation();\n usePageTitle('titles.signUp');\n const { isAuthenticated, isLoading } = useAuth();\n const nextPath = readNextPath();\n const [stage, setStage] = useState('form'); // form | confirm\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [passwordVisible, setPasswordVisible] = useState(false);\n const [code, setCode] = useState('');\n const [message, setMessage] = useState('');\n const [error, setError] = useState('');\n const [busy, setBusy] = useState(false);\n\n useEffect(() => {\n if (!isLoading && isAuthenticated) {\n window.location.href = nextPath || '/app/';\n }\n }, [isAuthenticated, isLoading, nextPath]);\n\n const handleSignUp = async (e) => {\n e.preventDefault();\n setError('');\n setMessage('');\n setBusy(true);\n try {\n await signUp({ username: email, password, options: { userAttributes: { email } } });\n setMessage(t('auth.success.signup'));\n setStage('confirm');\n } catch (err) {\n const key = err?.name || err?.code;\n setError(t(`auth.errors.${key}`, t('auth.errors.default')));\n } finally {\n setBusy(false);\n }\n };\n\n const handleConfirm = async (e) => {\n e.preventDefault();\n setError('');\n setMessage('');\n setBusy(true);\n try {\n await confirmSignUp({ username: email, confirmationCode: code });\n setMessage(t('auth.success.confirm'));\n // 自動でサインインして /app へ\n await signIn({ username: email, password });\n window.location.href = nextPath || '/app/';\n } catch (err) {\n const key = err?.name || err?.code;\n setError(t(`auth.errors.${key}`, t('auth.errors.default')));\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <div className=\"min-h-screen bg-gradient-to-b from-slate-950 via-slate-900 to-slate-950 text-white flex flex-col\">\n <StagingBadge />\n <SiteHeader variant=\"dark\" showX={false} />\n <main className=\"flex-1 flex items-center justify-center px-4 pb-12\">\n <div className=\"w-full max-w-md bg-slate-900/70 border border-slate-800 rounded-2xl shadow-2xl p-8 space-y-6\">\n <div className=\"text-center space-y-2\">\n <div className=\"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-blue-500/10 text-blue-300 border border-blue-500/30\">\n <span className=\"font-black text-lg\">S</span>\n </div>\n <h1 className=\"text-2xl font-bold\">{stage === 'form' ? t('auth.signupTitle') : t('auth.actions.confirm')}</h1>\n <p className=\"text-slate-400 text-sm\">{stage === 'form' ? t('auth.signupSubtitle') : t('auth.code')}</p>\n </div>\n\n {stage === 'form' && (\n <form onSubmit={handleSignUp} className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-email\" className=\"block text-sm text-slate-300\">\n {t('auth.email')}\n </label>\n <input\n id=\"signup-email\"\n type=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n required\n autoComplete=\"email\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.email')}\n />\n </div>\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-password\" className=\"block text-sm text-slate-300\">\n {t('auth.password')}\n </label>\n <div className=\"relative\">\n <input\n id=\"signup-password\"\n type={passwordVisible ? 'text' : 'password'}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n required\n autoComplete=\"new-password\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 pr-12 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.passwordNew')}\n />\n <button\n type=\"button\"\n onClick={() => setPasswordVisible((prev) => !prev)}\n className=\"absolute inset-y-0 right-0 flex items-center px-3 text-slate-400 hover:text-slate-200\"\n aria-label={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n title={\n passwordVisible\n ? t('auth.actions.hidePassword', { defaultValue: 'Hide password' })\n : t('auth.actions.showPassword', { defaultValue: 'Show password' })\n }\n >\n {passwordVisible ? <EyeOff size={18} /> : <Eye size={18} />}\n </button>\n </div>\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2\"\n >\n {error}\n </div>\n )}\n {message && (\n <div\n role=\"status\"\n className=\"text-sm text-emerald-300 bg-emerald-950/40 border border-emerald-700/50 rounded-lg px-3 py-2\"\n >\n {message}\n </div>\n )}\n <button\n type=\"submit\"\n disabled={busy}\n className=\"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed\"\n >\n {t('auth.actions.createAccount')}\n </button>\n </form>\n )}\n\n {stage === 'confirm' && (\n <form onSubmit={handleConfirm} className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-email\" className=\"block text-sm text-slate-300\">\n {t('auth.email')}\n </label>\n <input\n id=\"signup-email\"\n type=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n required\n autoComplete=\"email\"\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder={t('auth.placeholders.email')}\n />\n </div>\n <div className=\"space-y-2\">\n <label htmlFor=\"signup-code\" className=\"block text-sm text-slate-300\">\n {t('auth.code')}\n </label>\n <input\n id=\"signup-code\"\n type=\"text\"\n value={code}\n onChange={(e) => setCode(e.target.value)}\n required\n className=\"w-full rounded-lg bg-slate-950 border border-slate-700 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder=\"123456\"\n />\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"text-sm text-rose-400 bg-rose-950/40 border border-rose-700/50 rounded-lg px-3 py-2\"\n >\n {error}\n </div>\n )}\n {message && (\n <div\n role=\"status\"\n className=\"text-sm text-emerald-300 bg-emerald-950/40 border border-emerald-700/50 rounded-lg px-3 py-2\"\n >\n {message}\n </div>\n )}\n <button\n type=\"submit\"\n disabled={busy}\n className=\"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg py-3 transition disabled:opacity-60 disabled:cursor-not-allowed\"\n >\n {t('auth.actions.confirm')}\n </button>\n </form>\n )}\n\n <div className=\"text-center text-sm text-slate-400 space-y-1\">\n <div>\n {t('auth.actions.haveAccount')}{' '}\n <button\n type=\"button\"\n className=\"text-blue-300 hover:text-blue-200 underline\"\n onClick={() => {\n window.location.href = nextPath ? `/signin?next=${encodeURIComponent(nextPath)}` : '/signin';\n }}\n >\n {t('auth.actions.goToSignIn')}\n </button>\n </div>\n <div className=\"text-slate-500 text-xs\">\n <div>{t('auth.helper.terms')}</div>\n <div className=\"mt-1 flex items-center justify-center gap-2\">\n <a href=\"/terms\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.terms')}\n </a>\n <span aria-hidden=\"true\">·</span>\n <a href=\"/privacy\" className=\"underline underline-offset-4 hover:text-slate-200\">\n {t('landing.footer.privacy')}\n </a>\n </div>\n </div>\n </div>\n </div>\n </main>\n </div>\n );\n};\n\nexport default SignUp;\n"],"names":["createConfirmSignUpClient","config","composeServiceApi","cognitoUserPoolTransferHandler","createUserPoolSerializer","createUserPoolDeserializer","DEFAULT_SERVICE_CLIENT_API_CONFIG","confirmSignUp","input","username","confirmationCode","options","authConfig","Amplify","assertTokenProviderConfig","userPoolId","userPoolClientId","userPoolEndpoint","clientMetadata","assertValidationError","AuthValidationErrorCode","UserContextData","getUserContextData","confirmSignUpClient","createCognitoUserPoolEndpointResolver","session","getRegionFromUserPoolId","getAuthUserAgentValue","AuthAction","resolve","reject","signUpOut","autoSignInStoreState","autoSignInStore","resetAutoSignIn","stopListener","HubInternal","payload","error","readNextPath","next","SignUp","useTranslation","usePageTitle","isAuthenticated","isLoading","useAuth","nextPath","stage","setStage","useState","email","setEmail","password","setPassword","passwordVisible","setPasswordVisible","code","setCode","message","setMessage","setError","busy","setBusy","useEffect","handleSignUp","e","signUp","err","key","handleConfirm","signIn","jsxs","jsx","StagingBadge","SiteHeader","prev","EyeOff","Eye"],"mappings":"2ZAUA,MAAMA,EAA6BC,GAAWC,EAAkBC,EAAgCC,EAAyB,eAAe,EAAGC,IAA8B,CACrK,GAAGC,EACH,GAAGL,CACP,CAAC,ECmBD,eAAeM,GAAcC,EAAO,CAChC,KAAM,CAAE,SAAAC,EAAU,iBAAAC,EAAkB,QAAAC,CAAO,EAAKH,EAC1CI,EAAaC,EAAQ,UAAS,EAAG,MAAM,QAC7CC,EAA0BF,CAAU,EACpC,KAAM,CAAE,WAAAG,EAAY,iBAAAC,EAAkB,iBAAAC,CAAgB,EAAKL,EACrDM,EAAiBP,GAAS,eAChCQ,EAAsB,CAAC,CAACV,EAAUW,EAAwB,0BAA0B,EACpFD,EAAsB,CAAC,CAACT,EAAkBU,EAAwB,sBAAsB,EACxF,MAAMC,EAAkBC,EAAmB,CACvC,SAAAb,EACA,WAAAM,EACA,iBAAAC,CACR,CAAK,EACKO,EAAsBvB,EAA0B,CAClD,iBAAkBwB,EAAsC,CACpD,iBAAkBP,CAC9B,CAAS,CACT,CAAK,EACK,CAAE,QAASQ,CAAO,EAAK,MAAMF,EAAoB,CACnD,OAAQG,EAAwBd,EAAW,UAAU,EACrD,eAAgBe,EAAsBC,EAAW,aAAa,CACtE,EAAO,CACC,SAAUnB,EACV,iBAAkBC,EAClB,eAAgBQ,EAChB,mBAAoBP,GAAS,mBAC7B,SAAUC,EAAW,iBACrB,gBAAAS,CACR,CAAK,EACD,OAAO,IAAI,QAAQ,CAACQ,EAASC,IAAW,CACpC,GAAI,CACA,MAAMC,EAAY,CACd,iBAAkB,GAClB,SAAU,CACN,WAAY,MAChC,CACA,EACkBC,EAAuBC,EAAgB,SAAQ,EAC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X as K}from"./LanguageSwitcher-BD9N-dla.js";const Q=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],C=G("menu",Q),V=({className:h})=>e.jsx("a",{href:"https://x.com/shipscreenscom",target:"_blank",rel:"noopener noreferrer",className:`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded-md ${h}`,"aria-label":"ShipScreens on X (opens in new tab)",children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M20.5 3h-2.4L12 9.6 6.9 3H3l7.2 9.1L3.2 21h2.4L12 14l6.6 7h3.1l-7.7-9.5L20.5 3Z"})})}),Y=({variant:h="dark",active:a=null,logoHref:$="/",toolsHref:x="/tools/",openAppHref:b="/app/",showTools:m=!0,showOpenApp:f=!0,showX:p=!0,showLanguageSwitcher:g=!0,languageSwitcherClassName:y="hidden sm:flex",onToolsClick:j,onOpenAppClick:v,primaryCta:s=null})=>{const{t:n}=A(),t=h==="dark",M=!!(s?.href&&s?.label),[o,N]=u.useState(!1),S=u.useRef(null),L=u.useRef(null),r=u.useCallback(()=>N(!1),[]);J({isOpen:o,onClose:r,panelRef:S,initialFocusRef:L});const l=t?"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950 rounded-md":"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white rounded-md",_=t?`text-sm text-slate-300 hover:text-white transition-colors ${l}`:`text-sm text-slate-600 hover:text-slate-900 transition-colors ${l}`,D=t?"text-white font-semibold":"text-slate-900 font-semibold",c=i=>`${_}${a===i?` ${D}`:""}`,B=t?`flex items-center justify-between px-3 py-2 rounded-lg border border-slate-800 bg-slate-950 text-sm text-slate-200 hover:bg-slate-900 transition ${l}`:`flex items-center justify-between px-3 py-2 rounded-lg border border-slate-200 bg-white text-sm text-slate-800 hover:bg-slate-50 transition ${l}`,E=t?"border-blue-500 text-white":"border-blue-600 text-slate-900",R=i=>`${B}${a===i?` ${E}`:""}`,F=()=>{if(!o)return null;const i=t?"bg-slate-900/70":"bg-slate-900/40",X=t?"bg-slate-950 border-slate-800 text-white":"bg-white border-slate-200 text-slate-800",I=t?"border-slate-800":"border-slate-200",Z=t?`border-slate-800 text-slate-200 hover:bg-slate-900 ${l}`:`border-slate-200 text-slate-600 hover:bg-slate-50 ${l}`,w=d=>q=>{d?.(q),r()},z=n("common.menu",{defaultValue:"Menu"});return e.jsx("div",{className:`fixed inset-0 z-[2200] ${i} backdrop-blur-sm p-4 sm:hidden`,role:"dialog","aria-modal":"true","aria-label":z,onMouseDown:d=>{d.target===d.currentTarget&&r()},children:e.jsxs("div",{ref:S,id:"shipscreens-mobile-menu",className:`w-full max-w-sm ml-auto rounded-2xl shadow-2xl border overflow-hidden ${X}`,children:[e.jsxs("div",{className:`flex items-center justify-between px-4 py-3 border-b ${I}`,children:[e.jsx("div",{className:"text-sm font-bold",children:z}),e.jsx("button",{ref:L,type:"button",onClick:r,className:`p-2 rounded-lg border transition ${Z}`,"aria-label":n("common.close",{defaultValue:"Close"}),title:n("common.close",{defaultValue:"Close"}),children:e.jsx(K,{size:16})})]}),e.jsxs("div",{className:"p-4 space-y-3",children:[g&&e.jsx(k,{className:"w-full justify-center"}),e.jsxs("div",{className:"space-y-2",children:[m&&e.jsx("a",{href:x,onClick:w(j),className:R("tools"),"aria-current":a==="tools"?"page":void 0,children:e.jsx("span",{children:n("landing.nav.tools")})}),f&&e.jsx("a",{href:b,onClick:w(v),className:R("app"),"aria-current":a==="app"?"page":void 0,children:e.jsx("span",{children:n("landing.nav.openApp")})}),p&&e.jsx("a",{href:"https://x.com/shipscreenscom",target:"_blank",rel:"noopener noreferrer",className:B,children:e.jsx("span",{children:"X"})})]}),s?.href&&s?.label&&e.jsx("a",{href:s.href,onClick:w(s.onClick),className:`w-full inline-flex items-center justify-center px-4 py-2 rounded-lg font-semibold transition ${t?"bg-white text-slate-900 hover:scale-[1.02]":"bg-slate-900 text-white hover:bg-slate-800"} ${l}`,children:s.label})]})]})})},P=t?e.jsxs("header",{className:"max-w-6xl mx-auto px-4 py-4 sm:px-6 sm:py-6 flex items-center justify-between gap-4",children:[e.jsxs("a",{href:$,className:`flex items-center gap-3 hover:opacity-90 transition-opacity ${l}`,children:[e.jsx("div",{className:"w-10 h-10 rounded-xl border border-slate-800 bg-slate-950 p-1 flex items-center justify-center overflow-hidden shadow-sm",children:e.jsx("img",{src:"/app/assets/icons/favicon-32x32.png",alt:"ShipScreens",className:"w-full h-full object-contain",loading:"lazy"})}),e.jsx("span",{className:"text-lg font-bold",children:"ShipScreens"})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[g&&e.jsx(k,{className:y}),p&&e.jsx(V,{className:"hidden sm:inline text-slate-300 hover:text-white transition-colors"}),m&&e.jsx("a",{href:x,onClick:j,className:`hidden sm:inline ${c("tools")}`,"aria-current":a==="tools"?"page":void 0,children:n("landing.nav.tools")}),f&&e.jsx("a",{href:b,onClick:v,className:`${M?"hidden sm:inline ":""}${c("app")}`,"aria-current":a==="app"?"page":void 0,children:n("landing.nav.openApp")}),M&&e.jsx("a",{href:s.href,onClick:s.onClick,className:`px-3 py-1.5 sm:px-4 sm:py-2 text-sm whitespace-nowrap rounded-lg bg-white text-slate-900 font-semibold hover:scale-[1.02] transition ${l}`,children:s.label}),e.jsx("button",{type:"button",onClick:()=>N(!0),className:`sm:hidden p-2 rounded-lg border border-slate-800 bg-slate-950 text-slate-200 hover:bg-slate-900 transition ${l}`,"aria-label":n("common.menu",{defaultValue:"Menu"}),"aria-controls":"shipscreens-mobile-menu","aria-expanded":o,children:e.jsx(C,{size:18})})]})]}):e.jsx("header",{className:"border-b border-slate-200 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-4 flex items-center justify-between gap-4",children:[e.jsxs("a",{href:$,className:`flex items-center gap-3 hover:opacity-90 transition-opacity ${l}`,children:[e.jsx("div",{className:"w-9 h-9 rounded-xl border border-slate-200 bg-white p-1 flex items-center justify-center overflow-hidden shadow-sm",children:e.jsx("img",{src:"/app/assets/icons/favicon-32x32.png",alt:"ShipScreens",className:"w-full h-full object-contain",loading:"lazy"})}),e.jsx("span",{className:"font-bold text-slate-900",children:"ShipScreens"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[g&&e.jsx(k,{className:y}),p&&e.jsx(V,{className:"hidden sm:inline text-slate-500 hover:text-slate-900 transition-colors"}),m&&e.jsx("a",{href:x,onClick:j,className:`hidden sm:inline ${c("tools")}`,"aria-current":a==="tools"?"page":void 0,children:n("landing.nav.tools")}),f&&e.jsx("a",{href:b,onClick:v,className:c("app"),"aria-current":a==="app"?"page":void 0,children:n("landing.nav.openApp")}),s?.href&&s?.label&&e.jsx("a",{href:s.href,onClick:s.onClick,className:`px-4 py-2 rounded-lg bg-slate-900 text-white font-semibold hover:bg-slate-800 transition ${l}`,children:s.label}),e.jsx("button",{type:"button",onClick:()=>N(!0),className:`sm:hidden p-2 rounded-lg border border-slate-200 bg-white text-slate-700 hover:bg-slate-50 transition ${l}`,"aria-label":n("common.menu",{defaultValue:"Menu"}),"aria-controls":"shipscreens-mobile-menu","aria-expanded":o,children:e.jsx(C,{size:18})})]})]})});return e.jsxs(e.Fragment,{children:[P,F()]})};export{Y as S};
|
|
2
|
+
//# sourceMappingURL=SiteHeader-DxsqNPnt.js.map
|