@mountaya/studio-react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1087 -2
- package/THIRD-PARTY-NOTICES.txt +149 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs +213 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs.map +1 -0
- package/dist/AgentMarkdown-TMN6E2XC.js +206 -0
- package/dist/AgentMarkdown-TMN6E2XC.js.map +1 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js +468 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js.map +1 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs +470 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs.map +1 -0
- package/dist/CopilotPanel-CCLEYZUN.js +29 -0
- package/dist/CopilotPanel-CCLEYZUN.js.map +1 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs +38 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs.map +1 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js +53 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js.map +1 -0
- package/dist/DateTimePickerField-NB456C6F.cjs +55 -0
- package/dist/DateTimePickerField-NB456C6F.cjs.map +1 -0
- package/dist/DirectionsModal-4Y346QFU.cjs +291 -0
- package/dist/DirectionsModal-4Y346QFU.cjs.map +1 -0
- package/dist/DirectionsModal-DRPO2654.js +289 -0
- package/dist/DirectionsModal-DRPO2654.js.map +1 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js +321 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js.map +1 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs +323 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs.map +1 -0
- package/dist/EditCollectionModal-4QYP53SX.js +90 -0
- package/dist/EditCollectionModal-4QYP53SX.js.map +1 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs +92 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs.map +1 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs +62 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs.map +1 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js +60 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js.map +1 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js +72 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js.map +1 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs +74 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs.map +1 -0
- package/dist/ExportModal-5NUZZPXN.cjs +267 -0
- package/dist/ExportModal-5NUZZPXN.cjs.map +1 -0
- package/dist/ExportModal-H7OYP6CK.js +265 -0
- package/dist/ExportModal-H7OYP6CK.js.map +1 -0
- package/dist/FileDropzone-GKPMAZF5.cjs +41 -0
- package/dist/FileDropzone-GKPMAZF5.cjs.map +1 -0
- package/dist/FileDropzone-GRXY4FXR.js +39 -0
- package/dist/FileDropzone-GRXY4FXR.js.map +1 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs +92 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs.map +1 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js +90 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js.map +1 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs +402 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs.map +1 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js +400 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js.map +1 -0
- package/dist/NewCollectionModal-7TBWVA3G.js +75 -0
- package/dist/NewCollectionModal-7TBWVA3G.js.map +1 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs +77 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs.map +1 -0
- package/dist/RoadAccessModal-DNUJV5PC.js +57 -0
- package/dist/RoadAccessModal-DNUJV5PC.js.map +1 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs +59 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs.map +1 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs +81 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs.map +1 -0
- package/dist/SegmentColorPicker-UNLPITUA.js +79 -0
- package/dist/SegmentColorPicker-UNLPITUA.js.map +1 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs +32 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs.map +1 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js +23 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js.map +1 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs +82 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs.map +1 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js +80 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js.map +1 -0
- package/dist/ShareModal-HLYNE7OL.js +115 -0
- package/dist/ShareModal-HLYNE7OL.js.map +1 -0
- package/dist/ShareModal-WISND27S.cjs +117 -0
- package/dist/ShareModal-WISND27S.cjs.map +1 -0
- package/dist/VideoExportWizard-BSDWA3B5.js +44 -0
- package/dist/VideoExportWizard-BSDWA3B5.js.map +1 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs +53 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs.map +1 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js +270 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js.map +1 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs +272 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs.map +1 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs +1204 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs.map +1 -0
- package/dist/WaypointWorkbench-NRCLGU23.js +1202 -0
- package/dist/WaypointWorkbench-NRCLGU23.js.map +1 -0
- package/dist/chunk-22BNE3YV.js +13 -0
- package/dist/chunk-22BNE3YV.js.map +1 -0
- package/dist/chunk-24RNBTO2.cjs +154 -0
- package/dist/chunk-24RNBTO2.cjs.map +1 -0
- package/dist/chunk-2DDL2LIJ.cjs +65 -0
- package/dist/chunk-2DDL2LIJ.cjs.map +1 -0
- package/dist/chunk-2GAMKPS2.cjs +16 -0
- package/dist/chunk-2GAMKPS2.cjs.map +1 -0
- package/dist/chunk-2K4HCCZJ.cjs +51 -0
- package/dist/chunk-2K4HCCZJ.cjs.map +1 -0
- package/dist/chunk-2MHWH3TS.cjs +119 -0
- package/dist/chunk-2MHWH3TS.cjs.map +1 -0
- package/dist/chunk-2MQBPZNR.cjs +12 -0
- package/dist/chunk-2MQBPZNR.cjs.map +1 -0
- package/dist/chunk-2QSPCXLM.js +84 -0
- package/dist/chunk-2QSPCXLM.js.map +1 -0
- package/dist/chunk-32WRG44G.js +66 -0
- package/dist/chunk-32WRG44G.js.map +1 -0
- package/dist/chunk-32XMYLEB.js +9 -0
- package/dist/chunk-32XMYLEB.js.map +1 -0
- package/dist/chunk-3BEHHSVE.cjs +790 -0
- package/dist/chunk-3BEHHSVE.cjs.map +1 -0
- package/dist/chunk-3HF2XZKQ.js +8 -0
- package/dist/chunk-3HF2XZKQ.js.map +1 -0
- package/dist/chunk-3K2NX5FH.js +51 -0
- package/dist/chunk-3K2NX5FH.js.map +1 -0
- package/dist/chunk-3Q23QKNI.cjs +26 -0
- package/dist/chunk-3Q23QKNI.cjs.map +1 -0
- package/dist/chunk-3TQV2M4C.cjs +16 -0
- package/dist/chunk-3TQV2M4C.cjs.map +1 -0
- package/dist/chunk-3XDKDTE6.js +16 -0
- package/dist/chunk-3XDKDTE6.js.map +1 -0
- package/dist/chunk-46EARJWC.js +288 -0
- package/dist/chunk-46EARJWC.js.map +1 -0
- package/dist/chunk-4DQOJIUV.js +96 -0
- package/dist/chunk-4DQOJIUV.js.map +1 -0
- package/dist/chunk-4T52NAVT.js +10 -0
- package/dist/chunk-4T52NAVT.js.map +1 -0
- package/dist/chunk-4TPRVQGY.js +12 -0
- package/dist/chunk-4TPRVQGY.js.map +1 -0
- package/dist/chunk-4TX5E63A.cjs +12 -0
- package/dist/chunk-4TX5E63A.cjs.map +1 -0
- package/dist/chunk-4VKJF24B.js +22 -0
- package/dist/chunk-4VKJF24B.js.map +1 -0
- package/dist/chunk-4Z734K3L.js +15 -0
- package/dist/chunk-4Z734K3L.js.map +1 -0
- package/dist/chunk-4ZRSEOZM.js +629 -0
- package/dist/chunk-4ZRSEOZM.js.map +1 -0
- package/dist/chunk-52T3VZR5.js +55 -0
- package/dist/chunk-52T3VZR5.js.map +1 -0
- package/dist/chunk-56DP2X7U.js +15 -0
- package/dist/chunk-56DP2X7U.js.map +1 -0
- package/dist/chunk-5AHT62LO.js +24 -0
- package/dist/chunk-5AHT62LO.js.map +1 -0
- package/dist/chunk-5BR4CTVV.cjs +17 -0
- package/dist/chunk-5BR4CTVV.cjs.map +1 -0
- package/dist/chunk-5CTZOFDV.cjs +17 -0
- package/dist/chunk-5CTZOFDV.cjs.map +1 -0
- package/dist/chunk-5F55MFIX.cjs +45 -0
- package/dist/chunk-5F55MFIX.cjs.map +1 -0
- package/dist/chunk-5FMQJ4A4.cjs +362 -0
- package/dist/chunk-5FMQJ4A4.cjs.map +1 -0
- package/dist/chunk-5PMEAMHS.js +82 -0
- package/dist/chunk-5PMEAMHS.js.map +1 -0
- package/dist/chunk-676DNRSN.js +85 -0
- package/dist/chunk-676DNRSN.js.map +1 -0
- package/dist/chunk-6H2F7JKL.js +179 -0
- package/dist/chunk-6H2F7JKL.js.map +1 -0
- package/dist/chunk-6HMRMON7.js +10 -0
- package/dist/chunk-6HMRMON7.js.map +1 -0
- package/dist/chunk-6NKPZ3LT.cjs +14 -0
- package/dist/chunk-6NKPZ3LT.cjs.map +1 -0
- package/dist/chunk-6TG2HZDG.js +75 -0
- package/dist/chunk-6TG2HZDG.js.map +1 -0
- package/dist/chunk-6WU7XEQA.cjs +103 -0
- package/dist/chunk-6WU7XEQA.cjs.map +1 -0
- package/dist/chunk-6YD325QI.cjs +90 -0
- package/dist/chunk-6YD325QI.cjs.map +1 -0
- package/dist/chunk-7B6TUEL5.js +20 -0
- package/dist/chunk-7B6TUEL5.js.map +1 -0
- package/dist/chunk-7KS5F27H.js +33 -0
- package/dist/chunk-7KS5F27H.js.map +1 -0
- package/dist/chunk-A2N6553V.cjs +295 -0
- package/dist/chunk-A2N6553V.cjs.map +1 -0
- package/dist/chunk-A66FJAVG.js +44 -0
- package/dist/chunk-A66FJAVG.js.map +1 -0
- package/dist/chunk-AF43JU4W.js +27 -0
- package/dist/chunk-AF43JU4W.js.map +1 -0
- package/dist/chunk-AHGHAWYR.js +99 -0
- package/dist/chunk-AHGHAWYR.js.map +1 -0
- package/dist/chunk-AKN5KIZT.js +1969 -0
- package/dist/chunk-AKN5KIZT.js.map +1 -0
- package/dist/chunk-ANTDR5MJ.cjs +12 -0
- package/dist/chunk-ANTDR5MJ.cjs.map +1 -0
- package/dist/chunk-AQ5JIIAE.js +26 -0
- package/dist/chunk-AQ5JIIAE.js.map +1 -0
- package/dist/chunk-ARHO5MLJ.js +10 -0
- package/dist/chunk-ARHO5MLJ.js.map +1 -0
- package/dist/chunk-BAYGKSWY.cjs +26 -0
- package/dist/chunk-BAYGKSWY.cjs.map +1 -0
- package/dist/chunk-BEJ5I724.js +8 -0
- package/dist/chunk-BEJ5I724.js.map +1 -0
- package/dist/chunk-BFNXXLVV.cjs +34 -0
- package/dist/chunk-BFNXXLVV.cjs.map +1 -0
- package/dist/chunk-BFQJDFGB.js +57 -0
- package/dist/chunk-BFQJDFGB.js.map +1 -0
- package/dist/chunk-CHEQJ6N7.cjs +2214 -0
- package/dist/chunk-CHEQJ6N7.cjs.map +1 -0
- package/dist/chunk-CJOJWZM7.js +92 -0
- package/dist/chunk-CJOJWZM7.js.map +1 -0
- package/dist/chunk-CJRSFC45.cjs +578 -0
- package/dist/chunk-CJRSFC45.cjs.map +1 -0
- package/dist/chunk-CWQ4WHPI.cjs +46 -0
- package/dist/chunk-CWQ4WHPI.cjs.map +1 -0
- package/dist/chunk-D3INXUFT.js +360 -0
- package/dist/chunk-D3INXUFT.js.map +1 -0
- package/dist/chunk-D6CDAYZ6.cjs +18 -0
- package/dist/chunk-D6CDAYZ6.cjs.map +1 -0
- package/dist/chunk-DDPXRXRD.cjs +23 -0
- package/dist/chunk-DDPXRXRD.cjs.map +1 -0
- package/dist/chunk-DUUPWSOZ.cjs +14 -0
- package/dist/chunk-DUUPWSOZ.cjs.map +1 -0
- package/dist/chunk-DVWYOHOB.cjs +43 -0
- package/dist/chunk-DVWYOHOB.cjs.map +1 -0
- package/dist/chunk-DZPHWBMC.cjs +11 -0
- package/dist/chunk-DZPHWBMC.cjs.map +1 -0
- package/dist/chunk-E26FROI3.js +68 -0
- package/dist/chunk-E26FROI3.js.map +1 -0
- package/dist/chunk-E7ZTDAQW.cjs +37 -0
- package/dist/chunk-E7ZTDAQW.cjs.map +1 -0
- package/dist/chunk-ECI4EKIV.cjs +94 -0
- package/dist/chunk-ECI4EKIV.cjs.map +1 -0
- package/dist/chunk-EN5RWYHP.cjs +28 -0
- package/dist/chunk-EN5RWYHP.cjs.map +1 -0
- package/dist/chunk-ET3UASEF.cjs +91 -0
- package/dist/chunk-ET3UASEF.cjs.map +1 -0
- package/dist/chunk-EW5SY246.cjs +97 -0
- package/dist/chunk-EW5SY246.cjs.map +1 -0
- package/dist/chunk-EWWHVV7R.cjs +18 -0
- package/dist/chunk-EWWHVV7R.cjs.map +1 -0
- package/dist/chunk-F2LZZC6X.js +90 -0
- package/dist/chunk-F2LZZC6X.js.map +1 -0
- package/dist/chunk-F6VFOI4U.cjs +12 -0
- package/dist/chunk-F6VFOI4U.cjs.map +1 -0
- package/dist/chunk-FGX3TEU4.cjs +12 -0
- package/dist/chunk-FGX3TEU4.cjs.map +1 -0
- package/dist/chunk-FK4F24KE.js +10 -0
- package/dist/chunk-FK4F24KE.js.map +1 -0
- package/dist/chunk-FLIGKB6K.js +313 -0
- package/dist/chunk-FLIGKB6K.js.map +1 -0
- package/dist/chunk-G2NDWNFB.cjs +185 -0
- package/dist/chunk-G2NDWNFB.cjs.map +1 -0
- package/dist/chunk-G2XORRLH.js +15 -0
- package/dist/chunk-G2XORRLH.js.map +1 -0
- package/dist/chunk-GIZN7NX5.cjs +25 -0
- package/dist/chunk-GIZN7NX5.cjs.map +1 -0
- package/dist/chunk-GM2BQ24D.js +47 -0
- package/dist/chunk-GM2BQ24D.js.map +1 -0
- package/dist/chunk-GMQJZ5N7.cjs +50 -0
- package/dist/chunk-GMQJZ5N7.cjs.map +1 -0
- package/dist/chunk-GT7RJOAA.cjs +315 -0
- package/dist/chunk-GT7RJOAA.cjs.map +1 -0
- package/dist/chunk-GWGUMPOL.js +9 -0
- package/dist/chunk-GWGUMPOL.js.map +1 -0
- package/dist/chunk-GWVKSSE3.cjs +154 -0
- package/dist/chunk-GWVKSSE3.cjs.map +1 -0
- package/dist/chunk-GY7UMPHT.cjs +99 -0
- package/dist/chunk-GY7UMPHT.cjs.map +1 -0
- package/dist/chunk-HMVBS5DU.js +150 -0
- package/dist/chunk-HMVBS5DU.js.map +1 -0
- package/dist/chunk-HXHA2C7C.js +169 -0
- package/dist/chunk-HXHA2C7C.js.map +1 -0
- package/dist/chunk-IHMOFX2A.js +208 -0
- package/dist/chunk-IHMOFX2A.js.map +1 -0
- package/dist/chunk-II6C3LU2.cjs +49 -0
- package/dist/chunk-II6C3LU2.cjs.map +1 -0
- package/dist/chunk-IOOAFCSR.cjs +58 -0
- package/dist/chunk-IOOAFCSR.cjs.map +1 -0
- package/dist/chunk-IQZSIOMM.js +10 -0
- package/dist/chunk-IQZSIOMM.js.map +1 -0
- package/dist/chunk-J2H3WIUM.cjs +12 -0
- package/dist/chunk-J2H3WIUM.cjs.map +1 -0
- package/dist/chunk-J62OBSUE.cjs +54 -0
- package/dist/chunk-J62OBSUE.cjs.map +1 -0
- package/dist/chunk-JFJVSJUX.cjs +16 -0
- package/dist/chunk-JFJVSJUX.cjs.map +1 -0
- package/dist/chunk-JI2M77Y7.cjs +68 -0
- package/dist/chunk-JI2M77Y7.cjs.map +1 -0
- package/dist/chunk-JLSOLL3C.js +31 -0
- package/dist/chunk-JLSOLL3C.js.map +1 -0
- package/dist/chunk-JRME3LCP.cjs +41 -0
- package/dist/chunk-JRME3LCP.cjs.map +1 -0
- package/dist/chunk-JUD3CWTI.cjs +2005 -0
- package/dist/chunk-JUD3CWTI.cjs.map +1 -0
- package/dist/chunk-JVFHF3LE.cjs +11 -0
- package/dist/chunk-JVFHF3LE.cjs.map +1 -0
- package/dist/chunk-JVS2WNKQ.js +26 -0
- package/dist/chunk-JVS2WNKQ.js.map +1 -0
- package/dist/chunk-JXAFIYLV.js +94 -0
- package/dist/chunk-JXAFIYLV.js.map +1 -0
- package/dist/chunk-K2E744ST.cjs +18 -0
- package/dist/chunk-K2E744ST.cjs.map +1 -0
- package/dist/chunk-K2ZEMBJ7.js +56 -0
- package/dist/chunk-K2ZEMBJ7.js.map +1 -0
- package/dist/chunk-KCXNMLKB.js +22 -0
- package/dist/chunk-KCXNMLKB.js.map +1 -0
- package/dist/chunk-KMMDPXY4.js +35 -0
- package/dist/chunk-KMMDPXY4.js.map +1 -0
- package/dist/chunk-KMSGFBAJ.cjs +78 -0
- package/dist/chunk-KMSGFBAJ.cjs.map +1 -0
- package/dist/chunk-KPD7K4XQ.cjs +11 -0
- package/dist/chunk-KPD7K4XQ.cjs.map +1 -0
- package/dist/chunk-KUD3B3BA.js +12 -0
- package/dist/chunk-KUD3B3BA.js.map +1 -0
- package/dist/chunk-L62LSMJ5.js +9 -0
- package/dist/chunk-L62LSMJ5.js.map +1 -0
- package/dist/chunk-LB57H6LF.cjs +261 -0
- package/dist/chunk-LB57H6LF.cjs.map +1 -0
- package/dist/chunk-LCPKNSC4.cjs +48 -0
- package/dist/chunk-LCPKNSC4.cjs.map +1 -0
- package/dist/chunk-LE3W2CSF.cjs +84 -0
- package/dist/chunk-LE3W2CSF.cjs.map +1 -0
- package/dist/chunk-LG736CNC.js +13 -0
- package/dist/chunk-LG736CNC.js.map +1 -0
- package/dist/chunk-LGNTAZ3L.cjs +33 -0
- package/dist/chunk-LGNTAZ3L.cjs.map +1 -0
- package/dist/chunk-LHXINV6N.cjs +47 -0
- package/dist/chunk-LHXINV6N.cjs.map +1 -0
- package/dist/chunk-LLZUTIQB.cjs +24 -0
- package/dist/chunk-LLZUTIQB.cjs.map +1 -0
- package/dist/chunk-LPGXRU7R.cjs +12 -0
- package/dist/chunk-LPGXRU7R.cjs.map +1 -0
- package/dist/chunk-MA2BBWF5.cjs +96 -0
- package/dist/chunk-MA2BBWF5.cjs.map +1 -0
- package/dist/chunk-MLGORMWF.js +23 -0
- package/dist/chunk-MLGORMWF.js.map +1 -0
- package/dist/chunk-MO7XCKLA.js +62 -0
- package/dist/chunk-MO7XCKLA.js.map +1 -0
- package/dist/chunk-N37UE6RQ.cjs +1797 -0
- package/dist/chunk-N37UE6RQ.cjs.map +1 -0
- package/dist/chunk-N6NWKUOR.cjs +60 -0
- package/dist/chunk-N6NWKUOR.cjs.map +1 -0
- package/dist/chunk-NI5CAMFC.js +568 -0
- package/dist/chunk-NI5CAMFC.js.map +1 -0
- package/dist/chunk-NNLCZGZK.js +21 -0
- package/dist/chunk-NNLCZGZK.js.map +1 -0
- package/dist/chunk-NWHFUVYX.js +97 -0
- package/dist/chunk-NWHFUVYX.js.map +1 -0
- package/dist/chunk-OMDB6ZB2.cjs +176 -0
- package/dist/chunk-OMDB6ZB2.cjs.map +1 -0
- package/dist/chunk-P5W4TRJO.cjs +33 -0
- package/dist/chunk-P5W4TRJO.cjs.map +1 -0
- package/dist/chunk-PADS6TDO.js +89 -0
- package/dist/chunk-PADS6TDO.js.map +1 -0
- package/dist/chunk-PFLNOHBT.js +92 -0
- package/dist/chunk-PFLNOHBT.js.map +1 -0
- package/dist/chunk-PTLYNDZS.cjs +13 -0
- package/dist/chunk-PTLYNDZS.cjs.map +1 -0
- package/dist/chunk-QC3X4DAW.cjs +71 -0
- package/dist/chunk-QC3X4DAW.cjs.map +1 -0
- package/dist/chunk-QPTICYGD.cjs +272 -0
- package/dist/chunk-QPTICYGD.cjs.map +1 -0
- package/dist/chunk-QZ7W2E4U.cjs +319 -0
- package/dist/chunk-QZ7W2E4U.cjs.map +1 -0
- package/dist/chunk-RJJPUPOY.cjs +97 -0
- package/dist/chunk-RJJPUPOY.cjs.map +1 -0
- package/dist/chunk-RRSMCCFS.js +43 -0
- package/dist/chunk-RRSMCCFS.js.map +1 -0
- package/dist/chunk-S6VCR6F5.js +91 -0
- package/dist/chunk-S6VCR6F5.js.map +1 -0
- package/dist/chunk-S7Y2GMYJ.cjs +89 -0
- package/dist/chunk-S7Y2GMYJ.cjs.map +1 -0
- package/dist/chunk-SIMEDLX3.cjs +645 -0
- package/dist/chunk-SIMEDLX3.cjs.map +1 -0
- package/dist/chunk-SQYF7HKF.cjs +59 -0
- package/dist/chunk-SQYF7HKF.cjs.map +1 -0
- package/dist/chunk-ST7BNVC2.cjs +13 -0
- package/dist/chunk-ST7BNVC2.cjs.map +1 -0
- package/dist/chunk-SZVRMMLS.js +16 -0
- package/dist/chunk-SZVRMMLS.js.map +1 -0
- package/dist/chunk-T27LICRD.js +2212 -0
- package/dist/chunk-T27LICRD.js.map +1 -0
- package/dist/chunk-TAU5HGJ3.cjs +11 -0
- package/dist/chunk-TAU5HGJ3.cjs.map +1 -0
- package/dist/chunk-TOM7TV5E.js +25 -0
- package/dist/chunk-TOM7TV5E.js.map +1 -0
- package/dist/chunk-TSRUDRT3.js +59 -0
- package/dist/chunk-TSRUDRT3.js.map +1 -0
- package/dist/chunk-U4FX33MW.js +257 -0
- package/dist/chunk-U4FX33MW.js.map +1 -0
- package/dist/chunk-UBOPWQWC.cjs +28 -0
- package/dist/chunk-UBOPWQWC.cjs.map +1 -0
- package/dist/chunk-UFE26GNF.js +42 -0
- package/dist/chunk-UFE26GNF.js.map +1 -0
- package/dist/chunk-UMQQVTEO.js +257 -0
- package/dist/chunk-UMQQVTEO.js.map +1 -0
- package/dist/chunk-UWY3SFAS.js +10 -0
- package/dist/chunk-UWY3SFAS.js.map +1 -0
- package/dist/chunk-V6EIIZPJ.js +57 -0
- package/dist/chunk-V6EIIZPJ.js.map +1 -0
- package/dist/chunk-V6G6W5CF.cjs +61 -0
- package/dist/chunk-V6G6W5CF.cjs.map +1 -0
- package/dist/chunk-VC4ZBWOK.js +152 -0
- package/dist/chunk-VC4ZBWOK.js.map +1 -0
- package/dist/chunk-VJRF6ILX.js +35 -0
- package/dist/chunk-VJRF6ILX.js.map +1 -0
- package/dist/chunk-VNSLCFO4.js +787 -0
- package/dist/chunk-VNSLCFO4.js.map +1 -0
- package/dist/chunk-W7GAP7ST.js +21 -0
- package/dist/chunk-W7GAP7ST.js.map +1 -0
- package/dist/chunk-WFUASJHS.js +64 -0
- package/dist/chunk-WFUASJHS.js.map +1 -0
- package/dist/chunk-WIKSIT3M.js +46 -0
- package/dist/chunk-WIKSIT3M.js.map +1 -0
- package/dist/chunk-WKLZLFLY.cjs +32 -0
- package/dist/chunk-WKLZLFLY.cjs.map +1 -0
- package/dist/chunk-WNB5HYON.cjs +10 -0
- package/dist/chunk-WNB5HYON.cjs.map +1 -0
- package/dist/chunk-WO5P2XBP.js +86 -0
- package/dist/chunk-WO5P2XBP.js.map +1 -0
- package/dist/chunk-WPYC4NGZ.cjs +46 -0
- package/dist/chunk-WPYC4NGZ.cjs.map +1 -0
- package/dist/chunk-WQRYZY67.cjs +89 -0
- package/dist/chunk-WQRYZY67.cjs.map +1 -0
- package/dist/chunk-WVCYVMJU.js +11 -0
- package/dist/chunk-WVCYVMJU.js.map +1 -0
- package/dist/chunk-WX25G2S3.js +116 -0
- package/dist/chunk-WX25G2S3.js.map +1 -0
- package/dist/chunk-X4FE7RRQ.js +23 -0
- package/dist/chunk-X4FE7RRQ.js.map +1 -0
- package/dist/chunk-X6EIJNOQ.cjs +67 -0
- package/dist/chunk-X6EIJNOQ.cjs.map +1 -0
- package/dist/chunk-XUBATJH6.js +1769 -0
- package/dist/chunk-XUBATJH6.js.map +1 -0
- package/dist/chunk-XUMREYMG.js +293 -0
- package/dist/chunk-XUMREYMG.js.map +1 -0
- package/dist/chunk-XYAJ2FS2.js +31 -0
- package/dist/chunk-XYAJ2FS2.js.map +1 -0
- package/dist/chunk-YKES5P4H.cjs +58 -0
- package/dist/chunk-YKES5P4H.cjs.map +1 -0
- package/dist/chunk-YYAQ75AV.cjs +216 -0
- package/dist/chunk-YYAQ75AV.cjs.map +1 -0
- package/dist/chunk-YZ3NJKVV.js +42 -0
- package/dist/chunk-YZ3NJKVV.js.map +1 -0
- package/dist/chunk-Z5ECTUMN.cjs +104 -0
- package/dist/chunk-Z5ECTUMN.cjs.map +1 -0
- package/dist/chunk-ZAKVHYDL.cjs +28 -0
- package/dist/chunk-ZAKVHYDL.cjs.map +1 -0
- package/dist/chunk-ZF34JXGU.js +39 -0
- package/dist/chunk-ZF34JXGU.js.map +1 -0
- package/dist/chunk-ZHGWDP2M.cjs +101 -0
- package/dist/chunk-ZHGWDP2M.cjs.map +1 -0
- package/dist/chunk-ZLHTQQLT.js +13 -0
- package/dist/chunk-ZLHTQQLT.js.map +1 -0
- package/dist/chunk-ZPAMY3IZ.cjs +25 -0
- package/dist/chunk-ZPAMY3IZ.cjs.map +1 -0
- package/dist/chunk-ZR63UB4V.js +42 -0
- package/dist/chunk-ZR63UB4V.js.map +1 -0
- package/dist/chunk-ZRCEB3KL.js +11 -0
- package/dist/chunk-ZRCEB3KL.js.map +1 -0
- package/dist/chunk-ZRGQNRQI.cjs +36 -0
- package/dist/chunk-ZRGQNRQI.cjs.map +1 -0
- package/dist/chunk-ZVY4IL7O.cjs +22 -0
- package/dist/chunk-ZVY4IL7O.cjs.map +1 -0
- package/dist/chunk-ZWIVKODQ.js +49 -0
- package/dist/chunk-ZWIVKODQ.js.map +1 -0
- package/dist/chunk-ZYF2HNMZ.js +10 -0
- package/dist/chunk-ZYF2HNMZ.js.map +1 -0
- package/dist/copilot/index.cjs +43 -0
- package/dist/copilot/index.cjs.map +1 -0
- package/dist/copilot/index.d.cts +66 -0
- package/dist/copilot/index.d.ts +66 -0
- package/dist/copilot/index.js +30 -0
- package/dist/copilot/index.js.map +1 -0
- package/dist/directionsPdf-GITP3SCP.cjs +274 -0
- package/dist/directionsPdf-GITP3SCP.cjs.map +1 -0
- package/dist/directionsPdf-TDKVUBCU.js +272 -0
- package/dist/directionsPdf-TDKVUBCU.js.map +1 -0
- package/dist/embed/index.cjs +1816 -0
- package/dist/embed/index.cjs.map +1 -0
- package/dist/embed/index.d.cts +300 -0
- package/dist/embed/index.d.ts +300 -0
- package/dist/embed/index.js +1809 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/headless/index.cjs +408 -0
- package/dist/headless/index.cjs.map +1 -0
- package/dist/headless/index.d.cts +23 -0
- package/dist/headless/index.d.ts +23 -0
- package/dist/headless/index.js +31 -0
- package/dist/headless/index.js.map +1 -0
- package/dist/hostRegistry-BTG-KkRY.d.cts +115 -0
- package/dist/hostRegistry-BTG-KkRY.d.ts +115 -0
- package/dist/import/index.cjs +433 -0
- package/dist/import/index.cjs.map +1 -0
- package/dist/import/index.d.cts +169 -0
- package/dist/import/index.d.ts +169 -0
- package/dist/import/index.js +421 -0
- package/dist/import/index.js.map +1 -0
- package/dist/index-CELBpE13.d.cts +4198 -0
- package/dist/index-nqc3A-ty.d.ts +4198 -0
- package/dist/index.cjs +10597 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4949 -0
- package/dist/index.d.ts +4949 -0
- package/dist/index.js +9907 -0
- package/dist/index.js.map +1 -0
- package/dist/map/index.cjs +122 -0
- package/dist/map/index.cjs.map +1 -0
- package/dist/map/index.d.cts +988 -0
- package/dist/map/index.d.ts +988 -0
- package/dist/map/index.js +25 -0
- package/dist/map/index.js.map +1 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.cts +22 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.ts +22 -0
- package/dist/studioStrings-lNvOeC1g.d.cts +72 -0
- package/dist/studioStrings-lNvOeC1g.d.ts +72 -0
- package/dist/styles.css +14677 -0
- package/dist/testing/index.cjs +357 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +319 -0
- package/dist/testing/index.d.ts +319 -0
- package/dist/testing/index.js +344 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/video/index.cjs +53 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +127 -0
- package/dist/video/index.d.ts +127 -0
- package/dist/video/index.js +44 -0
- package/dist/video/index.js.map +1 -0
- package/package.json +227 -4
- package/src/agent/components/ActivityRow.tsx +226 -0
- package/src/agent/components/AgentEntityIndicator.tsx +67 -0
- package/src/agent/components/AgentMarkdown.tsx +530 -0
- package/src/agent/components/ChatComposer.tsx +161 -0
- package/src/agent/components/ChatTranscript.tsx +1358 -0
- package/src/agent/components/CopilotPanel.tsx +415 -0
- package/src/agent/components/CopilotStates.tsx +238 -0
- package/src/agent/components/CopilotTranscript.tsx +191 -0
- package/src/agent/components/MessageFeedback.tsx +100 -0
- package/src/agent/hooks/useAgentChatTransport.ts +61 -0
- package/src/agent/hooks/useAgentErrorCopy.ts +27 -0
- package/src/agent/hooks/useCopilotOpen.ts +68 -0
- package/src/agent/providers/AgentThreadsProvider.tsx +360 -0
- package/src/agent/providers/PromptPanelConversation.tsx +135 -0
- package/src/agent/rules/drawnNode.ts +24 -0
- package/src/alerts/components/MapAlerts.tsx +127 -0
- package/src/cache/hooks/useStudioCache.ts +40 -0
- package/src/cache/rules/studioCache.ts +145 -0
- package/src/collab/components/PeerEntityIndicator.tsx +150 -0
- package/src/collab/components/PresenceRoster.tsx +113 -0
- package/src/collab/components/peerLock.tsx +59 -0
- package/src/collab/hooks/useCollabOrganizationId.ts +24 -0
- package/src/collab/hooks/usePeerLockLabel.ts +41 -0
- package/src/collections/components/CollectionFormModal.tsx +280 -0
- package/src/collections/components/CollectionMultiSelect.tsx +640 -0
- package/src/collections/components/EditCollectionModal.tsx +114 -0
- package/src/collections/components/ManageCollectionsModal.tsx +692 -0
- package/src/collections/components/NewCollectionModal.tsx +87 -0
- package/src/collections/components/ShareCollectionModal.tsx +150 -0
- package/src/collections/hooks/useEntityCollections.ts +126 -0
- package/src/collections/hooks/useEveryPage.ts +33 -0
- package/src/controls/components/MapControlTooltip.tsx +84 -0
- package/src/controls/components/PoiOverlayMenu.tsx +342 -0
- package/src/controls/components/StudioControls.tsx +278 -0
- package/src/controls/rules/constants.ts +34 -0
- package/src/copilot/hooks/useStudioCopilotInset.ts +39 -0
- package/src/copilot/index.ts +29 -0
- package/src/directions/components/DirectionsModal.tsx +447 -0
- package/src/directions/components/directionsPdf.tsx +557 -0
- package/src/embed/components/DefaultViewControl.tsx +159 -0
- package/src/embed/components/EmbedBaseMapPicker.tsx +107 -0
- package/src/embed/components/EmbedCodeSection.tsx +329 -0
- package/src/embed/components/EmbedColumnsSection.tsx +167 -0
- package/src/embed/components/EmbedConfigForm.tsx +239 -0
- package/src/embed/components/EmbedElementSwitcher.tsx +87 -0
- package/src/embed/components/EmbedFieldControl.tsx +488 -0
- package/src/embed/components/EmbedGeneralSection.tsx +279 -0
- package/src/embed/components/EmbedKeyPanel.tsx +138 -0
- package/src/embed/components/EmbedSnippetCode.tsx +154 -0
- package/src/embed/components/EmbedStage.tsx +505 -0
- package/src/embed/components/EmbedTablePreview.tsx +134 -0
- package/src/embed/components/EmbedThemePicker.tsx +74 -0
- package/src/embed/components/EmbedTintPicker.tsx +76 -0
- package/src/embed/components/EmbedWizard.tsx +1031 -0
- package/src/embed/hooks/useEmbedCode.ts +170 -0
- package/src/embed/hooks/useEmbedCollectionItineraries.ts +42 -0
- package/src/embed/hooks/useEmbedLayerOptions.ts +75 -0
- package/src/embed/hooks/useEmbedPreviewCamera.ts +169 -0
- package/src/embed/index.ts +48 -0
- package/src/fullscreen/components/FullscreenHeader.tsx +77 -0
- package/src/fullscreen/components/FullscreenModal.tsx +80 -0
- package/src/fullscreen/components/WizardLayout.tsx +129 -0
- package/src/guards/components/AgentDrivingGuard.tsx +59 -0
- package/src/guards/components/UnsavedEditsGuard.tsx +210 -0
- package/src/guards/hooks/useReportUnsavedForm.ts +34 -0
- package/src/guards/hooks/useUnsavedEditsGuard.ts +44 -0
- package/src/headless/hooks/useAgentDriving.ts +21 -0
- package/src/headless/hooks/useBeginSegmentEdit.ts +89 -0
- package/src/headless/hooks/useBeginWaypointEdit.ts +74 -0
- package/src/headless/hooks/useCapabilitySet.ts +65 -0
- package/src/headless/hooks/useCollabResources.ts +148 -0
- package/src/headless/hooks/useCollectionScope.ts +37 -0
- package/src/headless/hooks/useEditActions.ts +250 -0
- package/src/headless/hooks/useEscapeKey.ts +43 -0
- package/src/headless/hooks/useInlineRename.ts +276 -0
- package/src/headless/hooks/useLiveAwareSegments.ts +88 -0
- package/src/headless/hooks/useLiveAwareWaypoints.ts +39 -0
- package/src/headless/hooks/useMapHoveredRow.ts +76 -0
- package/src/headless/hooks/usePlatformViewer.ts +452 -0
- package/src/headless/hooks/usePluginSlot.ts +235 -0
- package/src/headless/hooks/useRowEmphasis.ts +66 -0
- package/src/headless/hooks/useSegmentList.ts +428 -0
- package/src/headless/hooks/useSegmentRow.ts +366 -0
- package/src/headless/hooks/useSegmentRowActions.ts +267 -0
- package/src/headless/hooks/useShallowSelector.ts +145 -0
- package/src/headless/hooks/useStableMembers.ts +74 -0
- package/src/headless/hooks/useStoreSlice.ts +52 -0
- package/src/headless/hooks/useStreetViewCorridor.ts +120 -0
- package/src/headless/hooks/useStudioApi.ts +18 -0
- package/src/headless/hooks/useStudioDispatch.ts +181 -0
- package/src/headless/hooks/useStudioDispatchCount.ts +147 -0
- package/src/headless/hooks/useStudioDispatchUnsafe.ts +111 -0
- package/src/headless/hooks/useStudioEntitlement.ts +29 -0
- package/src/headless/hooks/useStudioFailureAlert.ts +67 -0
- package/src/headless/hooks/useStudioObserve.ts +38 -0
- package/src/headless/hooks/useStudioPreferences.ts +8 -0
- package/src/headless/hooks/useStudioSignedIn.ts +12 -0
- package/src/headless/hooks/useStudioStore.ts +72 -0
- package/src/headless/hooks/useStudioUnits.ts +23 -0
- package/src/headless/hooks/useStudioUrl.ts +24 -0
- package/src/headless/hooks/useStudioUserId.ts +5 -0
- package/src/headless/hooks/useStudioVerbHeld.ts +43 -0
- package/src/headless/hooks/useStudioViewer.ts +19 -0
- package/src/headless/hooks/useStudioViewerEntitlement.ts +40 -0
- package/src/headless/hooks/useStudioViewerItineraryLimit.ts +34 -0
- package/src/headless/hooks/useStudioViewerPreferences.ts +44 -0
- package/src/headless/hooks/useStudioViewerUnits.ts +50 -0
- package/src/headless/hooks/useStudioViewerUserId.ts +23 -0
- package/src/headless/hooks/useUiStore.ts +91 -0
- package/src/headless/hooks/useUiStoreShallow.ts +43 -0
- package/src/headless/hooks/useWaypointDetailsDialog.ts +52 -0
- package/src/headless/hooks/useWaypointList.ts +89 -0
- package/src/headless/hooks/useWaypointRow.ts +227 -0
- package/src/headless/hooks/useWaypointRowActions.ts +166 -0
- package/src/headless/index.ts +287 -0
- package/src/headless/providers/billingGate.tsx +129 -0
- package/src/headless/providers/copilot.tsx +155 -0
- package/src/headless/providers/mountayaStudio.tsx +126 -0
- package/src/headless/providers/navigationBlocker.tsx +91 -0
- package/src/headless/providers/notify.tsx +36 -0
- package/src/headless/providers/organizations.tsx +267 -0
- package/src/headless/providers/plugins.tsx +173 -0
- package/src/headless/providers/studio.tsx +1295 -0
- package/src/headless/providers/studioStrings.tsx +243 -0
- package/src/headless/rules/inputMethod.ts +19 -0
- package/src/hooks/useAgreementLimits.ts +165 -0
- package/src/hooks/useLayerCatalogOptions.ts +106 -0
- package/src/host/components/MountayaStudioHost.tsx +1018 -0
- package/src/host/hooks/useEmbeddedStudio.ts +24 -0
- package/src/host/hooks/useItineraryActivation.ts +126 -0
- package/src/host/hooks/useMemberGrants.ts +51 -0
- package/src/host/hooks/useStudioHostSurfaces.ts +100 -0
- package/src/host/hooks/useStudioPluginBinding.ts +133 -0
- package/src/host/hooks/useStudioSessionHeld.ts +111 -0
- package/src/host/hooks/useStudioToolBus.ts +127 -0
- package/src/host/hooks/useStudioToolContext.ts +175 -0
- package/src/host/providers/hostRegistry.tsx +144 -0
- package/src/host/providers/hostSurface.tsx +47 -0
- package/src/host/providers/hostVideo.tsx +73 -0
- package/src/import/components/DraftEntityList.tsx +298 -0
- package/src/import/components/FileDropInput.tsx +261 -0
- package/src/import/components/FileDropzone.tsx +97 -0
- package/src/import/components/ImportItineraryContent.tsx +133 -0
- package/src/import/components/ImportPreviewLegend.tsx +50 -0
- package/src/import/components/ImportPrimer.tsx +113 -0
- package/src/import/index.ts +32 -0
- package/src/import/providers/ImportRoutingGuideProvider.tsx +319 -0
- package/src/import/rules/routingGuidePictures.ts +20 -0
- package/src/index.ts +633 -0
- package/src/internal/components/Glyph.tsx +34 -0
- package/src/internal/components/MarkerGlyph.tsx +23 -0
- package/src/internal/components/MountayaMark.tsx +142 -0
- package/src/internal/hooks/useTextOverflow.ts +90 -0
- package/src/internal/providers/studioEditorRoot.tsx +42 -0
- package/src/internal/rules/editorRoot.ts +9 -0
- package/src/internal/rules/missingSeam.ts +32 -0
- package/src/itinerary/components/ActivityGuideModal.tsx +345 -0
- package/src/itinerary/components/ActivitySelect.tsx +204 -0
- package/src/itinerary/components/AddWaypointButton.tsx +151 -0
- package/src/itinerary/components/AscentInput.tsx +65 -0
- package/src/itinerary/components/Characteristics.tsx +129 -0
- package/src/itinerary/components/CursorReadout.tsx +66 -0
- package/src/itinerary/components/DistanceInput.tsx +67 -0
- package/src/itinerary/components/DraftProvenanceBanner.tsx +79 -0
- package/src/itinerary/components/DuplicateItineraryModal.tsx +341 -0
- package/src/itinerary/components/EditorSaveFooter.tsx +424 -0
- package/src/itinerary/components/ItineraryActionsMenu.tsx +655 -0
- package/src/itinerary/components/ItineraryForm.tsx +887 -0
- package/src/itinerary/components/ItineraryHeaderIdentity.tsx +121 -0
- package/src/itinerary/components/ItineraryHeaderMeta.tsx +68 -0
- package/src/itinerary/components/ItineraryHeaderTitle.tsx +88 -0
- package/src/itinerary/components/ItineraryIdentityFields.tsx +153 -0
- package/src/itinerary/components/ItineraryProfilePanel.tsx +619 -0
- package/src/itinerary/components/ItineraryProfileSheet.tsx +219 -0
- package/src/itinerary/components/ItinerarySubHeader.tsx +236 -0
- package/src/itinerary/components/PendingProfile.tsx +142 -0
- package/src/itinerary/components/PlaceCard.tsx +35 -0
- package/src/itinerary/components/PlaceMark.tsx +76 -0
- package/src/itinerary/components/ProfileAnalysisBars.tsx +84 -0
- package/src/itinerary/components/ProfileBar.tsx +215 -0
- package/src/itinerary/components/ProfileHeaderControls.tsx +116 -0
- package/src/itinerary/components/ProfileHeaderFigures.tsx +119 -0
- package/src/itinerary/components/ProfilePaceControl.tsx +97 -0
- package/src/itinerary/components/ProfileStat.tsx +76 -0
- package/src/itinerary/components/ProfileStatStrip.tsx +38 -0
- package/src/itinerary/components/RoadAccessModal.tsx +76 -0
- package/src/itinerary/components/RouteTypeControl.tsx +73 -0
- package/src/itinerary/components/SegmentGroupModal.tsx +311 -0
- package/src/itinerary/components/SegmentGroupRangePicker.tsx +228 -0
- package/src/itinerary/components/StagingCreateFooter.tsx +185 -0
- package/src/itinerary/components/StudioItineraryProfile.tsx +620 -0
- package/src/itinerary/components/SuggestForm.tsx +256 -0
- package/src/itinerary/components/SuggestFormActions.tsx +124 -0
- package/src/itinerary/components/SuggestionResultRow.tsx +98 -0
- package/src/itinerary/components/SuggestionResultsList.tsx +85 -0
- package/src/itinerary/components/WaypointAmenityPicker.tsx +105 -0
- package/src/itinerary/components/WaypointDetailFields.tsx +604 -0
- package/src/itinerary/components/WaypointDetailsModal.tsx +134 -0
- package/src/itinerary/components/WaypointDetailsRows.tsx +707 -0
- package/src/itinerary/components/WaypointDetailsView.tsx +389 -0
- package/src/itinerary/components/WaypointIconCircle.tsx +211 -0
- package/src/itinerary/components/WaypointIconPicker.tsx +82 -0
- package/src/itinerary/components/WaypointMarkers.tsx +293 -0
- package/src/itinerary/components/WaypointPreviewCard.tsx +56 -0
- package/src/itinerary/components/WaypointSectionNav.tsx +151 -0
- package/src/itinerary/components/WaypointSwitcher.tsx +143 -0
- package/src/itinerary/components/WaypointWorkbench.tsx +263 -0
- package/src/itinerary/hooks/useDuplicateDraft.ts +205 -0
- package/src/itinerary/hooks/useDuplicateSource.ts +69 -0
- package/src/itinerary/hooks/useFriendlyNameBanks.ts +26 -0
- package/src/itinerary/hooks/useItineraryEditable.ts +89 -0
- package/src/itinerary/hooks/useItineraryPace.ts +103 -0
- package/src/itinerary/hooks/useItinerarySubject.ts +117 -0
- package/src/itinerary/hooks/useOpenItineraryEditable.ts +39 -0
- package/src/itinerary/hooks/useProfileOverlay.tsx +61 -0
- package/src/itinerary/hooks/useProfileSeries.ts +95 -0
- package/src/itinerary/hooks/useProfileVisibility.ts +149 -0
- package/src/itinerary/hooks/useSeedDraftOrganization.ts +85 -0
- package/src/itinerary/hooks/useSegmentGroupSave.ts +143 -0
- package/src/itinerary/hooks/useStartFromSuggestion.ts +63 -0
- package/src/itinerary/hooks/useStudioItinerary.ts +35 -0
- package/src/itinerary/hooks/useSuggestionPin.ts +36 -0
- package/src/itinerary/hooks/useWaypointCardWords.ts +51 -0
- package/src/itinerary/hooks/useWaypointCreateFollowUp.ts +158 -0
- package/src/itinerary/hooks/useWaypointDetailsEditor.ts +280 -0
- package/src/itinerary/hooks/useWaypointSectionEntries.ts +114 -0
- package/src/itinerary/providers/ActivityGuideProvider.tsx +113 -0
- package/src/itinerary/providers/ItineraryViewProvider.tsx +146 -0
- package/src/itinerary/rules/amenityGlyphs.ts +25 -0
- package/src/itinerary/rules/cursorReadoutData.ts +34 -0
- package/src/itinerary/rules/profileCursor.ts +11 -0
- package/src/itinerary/rules/profileModel.ts +98 -0
- package/src/itinerary/rules/shownFocus.ts +11 -0
- package/src/itinerary/rules/waypointGlyphs.ts +42 -0
- package/src/itinerary/stores/profileHover.ts +54 -0
- package/src/lists/components/AddSegmentButton.tsx +240 -0
- package/src/lists/components/EditActions.tsx +153 -0
- package/src/lists/components/EditorListSection.tsx +117 -0
- package/src/lists/components/EditorSegmentRow.tsx +458 -0
- package/src/lists/components/ItineraryAddSegmentButton.tsx +66 -0
- package/src/lists/components/ItinerarySegmentList.tsx +301 -0
- package/src/lists/components/ItineraryWaypointList.tsx +257 -0
- package/src/lists/components/SegmentList.tsx +549 -0
- package/src/lists/components/SegmentSeam.tsx +292 -0
- package/src/lists/components/WaypointList.tsx +232 -0
- package/src/map/components/ContextMenuPopup.tsx +913 -0
- package/src/map/components/MapAnchoredPopup.tsx +284 -0
- package/src/map/components/SegmentViaPopup.tsx +133 -0
- package/src/map/hooks/useAccessRestrictions.ts +25 -0
- package/src/map/hooks/useEmbedConstraints.ts +359 -0
- package/src/map/hooks/useEmbedDisplaySeed.ts +61 -0
- package/src/map/hooks/useEmbedReady.ts +137 -0
- package/src/map/hooks/useHeldTileSources.ts +65 -0
- package/src/map/hooks/useSegmentColor.ts +24 -0
- package/src/map/hooks/useSpecificationLayers.ts +25 -0
- package/src/map/hooks/useStudioConstraints.ts +135 -0
- package/src/map/hooks/useStudioContextMenu.ts +34 -0
- package/src/map/hooks/useStudioContextMenuWaypoint.ts +119 -0
- package/src/map/hooks/useStudioEditCommitReporter.ts +56 -0
- package/src/map/hooks/useStudioEditEngine.ts +270 -0
- package/src/map/hooks/useStudioEnrichment.ts +117 -0
- package/src/map/hooks/useStudioItinerarySelection.ts +484 -0
- package/src/map/hooks/useStudioLayersScope.ts +34 -0
- package/src/map/hooks/useStudioMapBindings.ts +178 -0
- package/src/map/hooks/useStudioMapEditSeams.ts +161 -0
- package/src/map/hooks/useStudioMapSync.ts +127 -0
- package/src/map/hooks/useStudioOverlay.ts +75 -0
- package/src/map/hooks/useStudioOverlayWithdrawal.ts +52 -0
- package/src/map/hooks/useStudioOverlaysEntitled.ts +12 -0
- package/src/map/hooks/useStudioPeerDrafts.ts +126 -0
- package/src/map/hooks/useStudioPoiLayers.ts +110 -0
- package/src/map/hooks/useStudioPreviewSync.ts +205 -0
- package/src/map/hooks/useStudioSegmentEditing.ts +239 -0
- package/src/map/hooks/useStudioSegmentViaPrompt.ts +38 -0
- package/src/map/hooks/useStudioSplitPicking.ts +411 -0
- package/src/map/hooks/useStudioSuggestionPicking.ts +178 -0
- package/src/map/hooks/useStudioTimestamp.ts +226 -0
- package/src/map/hooks/useStudioUrlState.ts +340 -0
- package/src/map/hooks/useStudioWaypointEditing.ts +251 -0
- package/src/map/hooks/useStudioZoneEditing.ts +260 -0
- package/src/map/hooks/useStudioZoneOriginPicking.ts +129 -0
- package/src/map/hooks/useStudioZoneSelection.ts +240 -0
- package/src/map/hooks/useTileLayers.ts +33 -0
- package/src/map/index.ts +67 -0
- package/src/map/rules/editKeyboard.ts +216 -0
- package/src/map/rules/editTooltip.ts +222 -0
- package/src/map/rules/nearerEscape.ts +107 -0
- package/src/map/rules/poiGlyphs.ts +40 -0
- package/src/modals/components/AppModal.tsx +280 -0
- package/src/modals/components/ConfirmModal.tsx +223 -0
- package/src/modals/components/ExportModal.tsx +538 -0
- package/src/modals/components/LocationPermissionModal.tsx +129 -0
- package/src/modals/components/ModalFooter.tsx +187 -0
- package/src/modals/hooks/useConfirmGate.tsx +209 -0
- package/src/modals/hooks/useDiscardGuard.tsx +168 -0
- package/src/panels/components/EditShortcutHint.tsx +115 -0
- package/src/panels/components/FloatingOverlay.tsx +243 -0
- package/src/panels/components/GlyphPickerGrid.tsx +84 -0
- package/src/panels/components/PanelRouter.tsx +133 -0
- package/src/panels/components/PickerCard.tsx +108 -0
- package/src/panels/components/RadioOptionCard.tsx +116 -0
- package/src/panels/components/SidenavContentBody.tsx +56 -0
- package/src/panels/components/SidenavContentFooter.tsx +27 -0
- package/src/panels/components/SidenavContentHeader.tsx +172 -0
- package/src/panels/components/SidenavFormActions.tsx +96 -0
- package/src/panels/components/StudioFormStack.tsx +44 -0
- package/src/panels/components/StudioHeader.tsx +117 -0
- package/src/panels/components/StudioLayersPanel.tsx +909 -0
- package/src/panels/components/StudioPreferencesPanel.tsx +199 -0
- package/src/panels/rules/studioHeader.ts +68 -0
- package/src/plugins/components/PluginBoundary.tsx +62 -0
- package/src/plugins/components/PluginContextMenuActions.tsx +73 -0
- package/src/plugins/components/PluginControls.tsx +101 -0
- package/src/plugins/components/PluginHeldView.tsx +77 -0
- package/src/plugins/components/PluginMenuItems.tsx +63 -0
- package/src/plugins/components/PluginProfileHeader.tsx +71 -0
- package/src/plugins/components/PluginProfilePlot.tsx +134 -0
- package/src/plugins/components/PluginSlotItems.tsx +55 -0
- package/src/primitives/components/ActivityIcon.tsx +106 -0
- package/src/primitives/components/AllowlistField.tsx +508 -0
- package/src/primitives/components/CopyIconButton.tsx +80 -0
- package/src/primitives/components/DateTimeInput.tsx +133 -0
- package/src/primitives/components/DateTimePickerField.tsx +101 -0
- package/src/primitives/components/DescriptiveMenuItem.tsx +80 -0
- package/src/primitives/components/DialogSubject.tsx +102 -0
- package/src/primitives/components/DisabledMenuItem.tsx +45 -0
- package/src/primitives/components/DisabledReason.tsx +34 -0
- package/src/primitives/components/EmptyState.tsx +186 -0
- package/src/primitives/components/ErrorAlert.tsx +35 -0
- package/src/primitives/components/ErrorBoundary.tsx +55 -0
- package/src/primitives/components/FieldLabel.tsx +34 -0
- package/src/primitives/components/FormErrorAlert.tsx +33 -0
- package/src/primitives/components/GroupLabelledBy.tsx +31 -0
- package/src/primitives/components/LanguageSelect.tsx +139 -0
- package/src/primitives/components/ListSkeleton.tsx +64 -0
- package/src/primitives/components/MarqueeText.tsx +61 -0
- package/src/primitives/components/OrganizationScopeItem.tsx +146 -0
- package/src/primitives/components/OrganizationSelect.tsx +149 -0
- package/src/primitives/components/PointField.tsx +75 -0
- package/src/primitives/components/PrivacyControl.tsx +127 -0
- package/src/primitives/components/RenameInput.tsx +159 -0
- package/src/primitives/components/RequiredLabelWithHelp.tsx +76 -0
- package/src/primitives/components/SegmentIcon.tsx +43 -0
- package/src/primitives/components/SegmentIconLabel.tsx +37 -0
- package/src/primitives/components/SpeedInput.tsx +222 -0
- package/src/primitives/components/StudioSectionBoundary.tsx +56 -0
- package/src/primitives/components/StudioSegmentedControl.tsx +23 -0
- package/src/primitives/components/UnitPickerField.tsx +62 -0
- package/src/primitives/components/UnitPickerGrid.tsx +71 -0
- package/src/primitives/components/WarningAlert.tsx +34 -0
- package/src/primitives/hooks/useCompactLayout.ts +30 -0
- package/src/primitives/hooks/useSpeedControlLabel.ts +28 -0
- package/src/primitives/rules/activityBadge.ts +87 -0
- package/src/publication/components/PublicationBadge.tsx +42 -0
- package/src/publication/components/PublicationDot.tsx +31 -0
- package/src/publication/components/PublicationNotice.tsx +115 -0
- package/src/publication/components/PublicationSettledPill.tsx +43 -0
- package/src/publication/components/PublicationStatus.tsx +52 -0
- package/src/publication/components/UnpublishedPanel.tsx +133 -0
- package/src/publication/hooks/usePublicationHint.ts +235 -0
- package/src/publication/hooks/usePublishAct.ts +101 -0
- package/src/publication/hooks/usePublishItinerary.ts +27 -0
- package/src/publication/hooks/usePublishZone.ts +27 -0
- package/src/publication/hooks/usePublishableScope.ts +23 -0
- package/src/publication/hooks/usePublishedItinerary.ts +83 -0
- package/src/rows/components/ReadOnlySegmentRow.tsx +155 -0
- package/src/rows/components/RouteMetricLine.tsx +90 -0
- package/src/rows/components/RowMetadata.tsx +92 -0
- package/src/rows/components/SegmentRow.tsx +381 -0
- package/src/rows/components/SegmentRowActions.tsx +187 -0
- package/src/rows/components/SegmentRowBody.tsx +197 -0
- package/src/rows/components/StudioToggleRow.tsx +71 -0
- package/src/rows/components/SuggestionList.tsx +100 -0
- package/src/rows/components/SuggestionRowLayout.tsx +164 -0
- package/src/rows/components/WaypointRow.tsx +175 -0
- package/src/rows/components/WaypointRowLayout.tsx +278 -0
- package/src/rows/components/lockChrome.tsx +106 -0
- package/src/rules/menuActions.ts +149 -0
- package/src/rules/sizing.ts +127 -0
- package/src/rules/studioConfig.ts +719 -0
- package/src/search/components/CategoryTabs.tsx +136 -0
- package/src/search/components/ResultRow.tsx +242 -0
- package/src/search/components/ResultsList.tsx +182 -0
- package/src/search/components/SearchInput.tsx +100 -0
- package/src/search/components/SearchTab.tsx +614 -0
- package/src/sections/components/RailSwitcher.tsx +179 -0
- package/src/sections/components/SectionCard.tsx +48 -0
- package/src/sections/components/SectionHead.tsx +42 -0
- package/src/sections/components/SectionTabs.tsx +231 -0
- package/src/segments/components/SegmentColorCircle.tsx +118 -0
- package/src/segments/components/SegmentColorPicker.tsx +134 -0
- package/src/segments/components/SegmentModeControl.tsx +118 -0
- package/src/segments/components/SegmentRowMenu.tsx +449 -0
- package/src/segments/components/SegmentRowPopover.tsx +163 -0
- package/src/segments/components/SegmentSelect.tsx +116 -0
- package/src/segments/components/SegmentSpeedControl.tsx +299 -0
- package/src/share/components/ShareLinkManage.tsx +699 -0
- package/src/share/components/ShareModal.tsx +182 -0
- package/src/share/components/ShareSheet.tsx +178 -0
- package/src/share/components/ShareViewModal.tsx +131 -0
- package/src/share/hooks/useCanManageShareLink.ts +51 -0
- package/src/studio/components/MountayaStudio.tsx +1170 -0
- package/src/studio/components/MountayaStudioViewer.tsx +775 -0
- package/src/studio/hooks/useEmbeddedStudioConfig.ts +60 -0
- package/src/studio/hooks/useViewerActivation.ts +47 -0
- package/src/studio/hooks/useViewerCollectionSpecification.ts +58 -0
- package/src/studio/hooks/useViewerEmbedConfig.ts +74 -0
- package/src/studio/hooks/useViewerFraming.ts +211 -0
- package/src/studio/hooks/useViewerMapBindings.ts +109 -0
- package/src/styles.css +3993 -0
- package/src/testing/collections.ts +40 -0
- package/src/testing/hostRegistry.tsx +109 -0
- package/src/testing/index.ts +65 -0
- package/src/testing/itinerary.ts +297 -0
- package/src/testing/mountayaClient.tsx +218 -0
- package/src/testing/viewer.tsx +171 -0
- package/src/theme/components/StudioPortalScope.tsx +130 -0
- package/src/theme/hooks/useResolvedStudioTheme.ts +37 -0
- package/src/theme/rules/density.ts +157 -0
- package/src/theme/rules/mountayaStudioTheme.ts +114 -0
- package/src/theme/rules/passwordManager.ts +20 -0
- package/src/theme/rules/tokenStyle.ts +18 -0
- package/src/theme/rules/tokens.ts +71 -0
- package/src/theme/rules/tone.ts +34 -0
- package/src/theme/rules/zIndex.ts +40 -0
- package/src/video/components/CameraStep.tsx +82 -0
- package/src/video/components/DirectingScrim.tsx +28 -0
- package/src/video/components/DirectorChat.tsx +79 -0
- package/src/video/components/FormatStep.tsx +487 -0
- package/src/video/components/ModeCards.tsx +141 -0
- package/src/video/components/PlanNumberField.tsx +54 -0
- package/src/video/components/PreviewControls.tsx +212 -0
- package/src/video/components/PreviewStage.tsx +319 -0
- package/src/video/components/PreviewSurface.tsx +247 -0
- package/src/video/components/PreviewWatermark.tsx +77 -0
- package/src/video/components/ProfileOverlayCanvas.tsx +195 -0
- package/src/video/components/ProfileStep.tsx +254 -0
- package/src/video/components/RecordProgress.tsx +117 -0
- package/src/video/components/ReviewStep.tsx +244 -0
- package/src/video/components/ShotList.tsx +452 -0
- package/src/video/components/VideoExportWizard.tsx +829 -0
- package/src/video/components/WizardDirectingIndicator.tsx +57 -0
- package/src/video/components/WizardFooter.tsx +112 -0
- package/src/video/hooks/usePreviewPlanRefresh.ts +91 -0
- package/src/video/hooks/useVideoItinerarySubject.ts +18 -0
- package/src/video/hooks/useVideoOrganizationId.ts +30 -0
- package/src/video/hooks/useVideoPreviewSeed.ts +203 -0
- package/src/video/hooks/useVideoProfileSeed.ts +53 -0
- package/src/video/hooks/useVideoPublication.ts +29 -0
- package/src/video/hooks/useVideoRouteReady.ts +52 -0
- package/src/video/hooks/useVideoRouteSync.ts +100 -0
- package/src/video/hooks/useVideoTileTransform.ts +88 -0
- package/src/video/index.ts +24 -0
- package/src/video/providers/DirectorChatProvider.tsx +293 -0
- package/src/video/rules/changeTo.ts +20 -0
- package/src/zone/components/ZoneActionsMenu.tsx +305 -0
- package/src/zone/components/ZoneAvailabilityFields.tsx +98 -0
- package/src/zone/components/ZoneForm.tsx +622 -0
- package/src/zone/components/ZoneInheritedContext.tsx +70 -0
- package/src/zone/components/ZoneLevelSelect.tsx +86 -0
- package/src/zone/components/ZoneMetadataFields.tsx +89 -0
- package/src/zone/components/ZoneMethodSelect.tsx +90 -0
- package/src/zone/components/ZoneModeSelect.tsx +98 -0
- package/src/zone/components/ZoneRangeInput.tsx +129 -0
- package/src/zone/components/ZoneReachabilityFields.tsx +120 -0
- package/src/zone/components/ZoneSubHeader.tsx +188 -0
- package/src/zone/components/ZoneVisibility.tsx +94 -0
- package/src/zone/hooks/useStudioReachabilityStart.ts +79 -0
- package/src/zone/hooks/useStudioZonesBrowsed.ts +32 -0
|
@@ -0,0 +1,2212 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { RadioOptionCard } from './chunk-ZWIVKODQ.js';
|
|
3
|
+
import { ChatTranscript, ChatComposer } from './chunk-VNSLCFO4.js';
|
|
4
|
+
import { useAgentChatTransport, useAgentErrorCopy, CopilotNoAccessNotice, CopilotSetupNotice } from './chunk-UMQQVTEO.js';
|
|
5
|
+
import { WizardLayout } from './chunk-K2ZEMBJ7.js';
|
|
6
|
+
import { SectionHead } from './chunk-3XDKDTE6.js';
|
|
7
|
+
import { SectionNav } from './chunk-JXAFIYLV.js';
|
|
8
|
+
import { UnitPickerGrid, LanguageSelect } from './chunk-6H2F7JKL.js';
|
|
9
|
+
import { UnpublishedPanel } from './chunk-WFUASJHS.js';
|
|
10
|
+
import { PublicationNotice } from './chunk-AHGHAWYR.js';
|
|
11
|
+
import { useItinerarySubjectById } from './chunk-YZ3NJKVV.js';
|
|
12
|
+
import { useStudioItinerary } from './chunk-4T52NAVT.js';
|
|
13
|
+
import { DialogSubject } from './chunk-JLSOLL3C.js';
|
|
14
|
+
import { FullscreenModal, FullscreenHeader } from './chunk-V6EIIZPJ.js';
|
|
15
|
+
import { useStoreSlice, useCopilotAvailability, useCopilotSetupAction } from './chunk-VJRF6ILX.js';
|
|
16
|
+
import { useStudioEntitlement } from './chunk-SZVRMMLS.js';
|
|
17
|
+
import { ErrorAlert } from './chunk-6HMRMON7.js';
|
|
18
|
+
import { Glyph, iconSizes } from './chunk-4VKJF24B.js';
|
|
19
|
+
import { useStudioPreferences } from './chunk-TOM7TV5E.js';
|
|
20
|
+
import { useUiStoreShallow } from './chunk-IQZSIOMM.js';
|
|
21
|
+
import { useShallowSelector } from './chunk-BFQJDFGB.js';
|
|
22
|
+
import { useUiStore, useUiStoreApi } from './chunk-UFE26GNF.js';
|
|
23
|
+
import { useStudioDispatch } from './chunk-676DNRSN.js';
|
|
24
|
+
import { useStudioScopedStrings, StudioStringsScope } from './chunk-MO7XCKLA.js';
|
|
25
|
+
import { useStudioHostRegistry } from './chunk-W7GAP7ST.js';
|
|
26
|
+
import { missingSeam } from './chunk-ZRCEB3KL.js';
|
|
27
|
+
import { useStudioFormatters, useStudioLanguageMark, useStudioToolContext, useStudioActivities, useStudioActivityIconUrl, useStudioDemUrl } from './chunk-46EARJWC.js';
|
|
28
|
+
import { Group, UnstyledButton, Text, Popover, ActionIcon, Stack, Radio, Input, SegmentedControl, Box, Switch, ThemeIcon, Anchor, Button, Menu, Alert, NumberInput, Center, Tabs, Overlay, Paper, Loader, Tooltip, Slider, Progress } from '@mantine/core';
|
|
29
|
+
import { useId as useId$1, useWindowEvent } from '@mantine/hooks';
|
|
30
|
+
import { createContext, memo, useCallback, useMemo, useId, useState, useEffect, useRef, useLayoutEffect, use } from 'react';
|
|
31
|
+
import { cameraModeSchema, cameraShotBaseSchema, cameraPlanSchema, languageSchema, profileDesignSchema, unitLengthSchema, unitPaceSchema, unitSlopeSchema, defaultVideoExportProfile, cameraBearingModeSchema, DEFAULT_SHOT_ZOOM, DEFAULT_SHOT_PITCH_DEG, DEFAULT_HOLD_MS, activityForId, videoRouteSpans, selectDirecting, selectVideoExportPlan, selectVideoExportRoute, selectVideoExportStatus, VIDEO_STEP_ORDER, createVideoDirectorStore, previewRefreshDisposition, PREVIEW_PLAN_REFRESH_DEBOUNCE_MS, resolveBaseTerrain, resolveDemUrl } from '@mountaya/studio';
|
|
32
|
+
import { FORMAT_OPTIONS, FPS_OPTIONS, QUALITY_OPTIONS, RESOLUTION_OPTIONS, ASPECT_OPTIONS, lengthUnitOptions, paceUnitOptions, slopeUnitOptions, publicationStateOf, failureAlertFor } from '@mountaya/studio/strings';
|
|
33
|
+
import { useLatestRef, useMountayaLayersManifest } from '@mountaya/elements-react';
|
|
34
|
+
import { videoPresets, bitrateForOutput, planDurationMs, estimatedVideoSizeMb, suggestVideoLengthMs, routeLengthMeters, itineraryToRouteGeometry, aspectRatio, representativeStillFraction, resolveProfileSamples } from '@mountaya/elements/camera';
|
|
35
|
+
import { segmentsForSelection } from '@mountaya/elements/data';
|
|
36
|
+
import { buildInfoBands, buildElevationPoints } from '@mountaya/elements/profile';
|
|
37
|
+
import { DirectorChatEngine } from '@mountaya/studio/agent';
|
|
38
|
+
import { createVideoDirectorBus } from '@mountaya/studio/handlers';
|
|
39
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
40
|
+
import { MILLISECONDS_PER_SECOND, convertDuration, convertProportion, DEGREES_PER_TURN } from '@mountaya/elements/units';
|
|
41
|
+
import { VideoRunEngine, MAX_TILE_CACHE_SIZE, buildProfileCurve, ensureOverlayFonts, WATERMARK_INSET_PX, WATERMARK_REFERENCE_SHORT_SIDE, WATERMARK_WIDTH_PX, WATERMARK_URL, profileOverlayDesigns } from '@mountaya/elements/video';
|
|
42
|
+
import { ViewerMapView } from '@mountaya/elements-react/editor';
|
|
43
|
+
import { boundsOf as boundsOf$1 } from '@mountaya/elements/geo';
|
|
44
|
+
import { clampMapLanguage } from '@mountaya/elements/style';
|
|
45
|
+
import { createTransformRequest } from '@mountaya/elements';
|
|
46
|
+
import { languageEndonym } from '@mountaya/elements/i18n';
|
|
47
|
+
|
|
48
|
+
// src/video/hooks/useVideoItinerarySubject.ts
|
|
49
|
+
var useVideoItinerarySubject = (itineraryId) => useItinerarySubjectById(itineraryId ?? void 0);
|
|
50
|
+
|
|
51
|
+
// src/video/hooks/useVideoOrganizationId.ts
|
|
52
|
+
var useVideoOrganizationId = () => {
|
|
53
|
+
const itineraryId = useUiStore((state) => state.videoExport?.itineraryId ?? null);
|
|
54
|
+
const { data } = useStudioItinerary(itineraryId ?? void 0);
|
|
55
|
+
return data?.organization_id;
|
|
56
|
+
};
|
|
57
|
+
var useVideoProfileSeed = () => {
|
|
58
|
+
const { dispatch } = useStudioDispatch();
|
|
59
|
+
const preferencesRef = useLatestRef(useStudioPreferences());
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
const preferences = preferencesRef.current;
|
|
62
|
+
const length = unitLengthSchema.catch("metric").parse(preferences?.length);
|
|
63
|
+
const pace = unitPaceSchema.catch("per-time").parse(preferences?.pace);
|
|
64
|
+
const slope = unitSlopeSchema.catch("degrees").parse(preferences?.slope);
|
|
65
|
+
const language = languageSchema.catch("en").parse(preferences?.language);
|
|
66
|
+
void dispatch("studio.video.profile.units.set", { length, pace, slope });
|
|
67
|
+
void dispatch("studio.video.profile.language.set", { language });
|
|
68
|
+
}, [dispatch, preferencesRef]);
|
|
69
|
+
};
|
|
70
|
+
var useVideoPublication = (itineraryId) => {
|
|
71
|
+
const { data, isError } = useStudioItinerary(itineraryId ?? void 0);
|
|
72
|
+
return publicationStateOf(data, isError);
|
|
73
|
+
};
|
|
74
|
+
var useVideoRouteReady = () => {
|
|
75
|
+
const { itineraryId, segmentId } = useUiStoreShallow((state) => ({
|
|
76
|
+
itineraryId: state.videoExport?.itineraryId ?? null,
|
|
77
|
+
segmentId: state.videoExport?.segmentId ?? null
|
|
78
|
+
}));
|
|
79
|
+
const { data, isError } = useStudioItinerary(itineraryId ?? void 0, "published");
|
|
80
|
+
return useMemo(() => {
|
|
81
|
+
if (!data) {
|
|
82
|
+
return isError ? "error" : "loading";
|
|
83
|
+
}
|
|
84
|
+
return itineraryToRouteGeometry(data, segmentId) ? "ready" : "empty";
|
|
85
|
+
}, [data, isError, segmentId]);
|
|
86
|
+
};
|
|
87
|
+
var useVideoRouteSync = () => {
|
|
88
|
+
const { dispatch } = useStudioDispatch();
|
|
89
|
+
const { itineraryId, segmentId } = useUiStoreShallow((state) => ({
|
|
90
|
+
itineraryId: state.videoExport?.itineraryId ?? null,
|
|
91
|
+
segmentId: state.videoExport?.segmentId ?? null
|
|
92
|
+
}));
|
|
93
|
+
const { data } = useStudioItinerary(itineraryId ?? void 0, "published");
|
|
94
|
+
const categories = useStudioActivities();
|
|
95
|
+
const activityIconUrl = useStudioActivityIconUrl();
|
|
96
|
+
const activity = data ? activityForId(categories, data.activity_id ?? "") : null;
|
|
97
|
+
const activityGlyphUrl = (activity ? activityIconUrl(activity.slug) : null) ?? null;
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (!itineraryId || !data) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const route = itineraryToRouteGeometry(data, segmentId);
|
|
103
|
+
if (!route) {
|
|
104
|
+
void dispatch("studio.video.route.set", {
|
|
105
|
+
activityGlyphUrl: null,
|
|
106
|
+
profileSource: null,
|
|
107
|
+
route: null
|
|
108
|
+
});
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const segments = segmentsForSelection(data, segmentId);
|
|
112
|
+
const profileSource = {
|
|
113
|
+
elevationPoints: buildElevationPoints(segments),
|
|
114
|
+
segmentSpans: videoRouteSpans(data, segmentId),
|
|
115
|
+
slopeBands: buildInfoBands(segments, (segment) => segment.slope_info),
|
|
116
|
+
surfaceBands: buildInfoBands(segments, (segment) => segment.surface_info),
|
|
117
|
+
waytypeBands: buildInfoBands(segments, (segment) => segment.way_type_info)
|
|
118
|
+
};
|
|
119
|
+
void dispatch("studio.video.route.set", { activityGlyphUrl, profileSource, route });
|
|
120
|
+
}, [activityGlyphUrl, dispatch, data, itineraryId, segmentId]);
|
|
121
|
+
};
|
|
122
|
+
var SECTIONS = ["confirm", "copilot", "director", "prompt"];
|
|
123
|
+
var DirectorChatContext = createContext(null);
|
|
124
|
+
var useDirectorChat = () => {
|
|
125
|
+
const value = use(DirectorChatContext);
|
|
126
|
+
if (!value) {
|
|
127
|
+
throw missingSeam("useDirectorChat", { component: "DirectorChatProvider" });
|
|
128
|
+
}
|
|
129
|
+
return value;
|
|
130
|
+
};
|
|
131
|
+
var useDirectorChatSurface = () => use(DirectorChatContext);
|
|
132
|
+
var useDirectorStore = (selector) => {
|
|
133
|
+
const { store } = useDirectorChat();
|
|
134
|
+
return useStoreSlice(store, selector);
|
|
135
|
+
};
|
|
136
|
+
var hold = () => {
|
|
137
|
+
};
|
|
138
|
+
var directorPair = (config) => {
|
|
139
|
+
const store = createVideoDirectorStore();
|
|
140
|
+
return { engine: new DirectorChatEngine({ ...config, store }), store };
|
|
141
|
+
};
|
|
142
|
+
var DirectorChatSession = ({
|
|
143
|
+
ctx,
|
|
144
|
+
invalidateAiConfig,
|
|
145
|
+
publish,
|
|
146
|
+
recoveryAddendum
|
|
147
|
+
}) => {
|
|
148
|
+
const strings = useStudioScopedStrings(SECTIONS);
|
|
149
|
+
const [bus] = useState(createVideoDirectorBus);
|
|
150
|
+
const organizationId = useVideoOrganizationId() ?? null;
|
|
151
|
+
const transport = useAgentChatTransport();
|
|
152
|
+
const errorCopy = useAgentErrorCopy();
|
|
153
|
+
const config = {
|
|
154
|
+
bus,
|
|
155
|
+
context: ctx,
|
|
156
|
+
errorCopy,
|
|
157
|
+
invalidateAiConfig,
|
|
158
|
+
organizationId,
|
|
159
|
+
recoveryAddendum,
|
|
160
|
+
strings,
|
|
161
|
+
transport
|
|
162
|
+
};
|
|
163
|
+
const [{ engine, store }, setHeld] = useState(() => directorPair(config));
|
|
164
|
+
const latestConfig = useRef(config);
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
latestConfig.current = config;
|
|
167
|
+
engine.configure(config);
|
|
168
|
+
});
|
|
169
|
+
const setups = useRef(0);
|
|
170
|
+
const ended = useRef(null);
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
if (ended.current === engine) {
|
|
173
|
+
setHeld(directorPair(latestConfig.current));
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
setups.current += 1;
|
|
177
|
+
const setup = setups.current;
|
|
178
|
+
const release = engine.subscribe(hold);
|
|
179
|
+
return () => {
|
|
180
|
+
release();
|
|
181
|
+
queueMicrotask(() => {
|
|
182
|
+
if (setups.current === setup) {
|
|
183
|
+
ended.current = engine;
|
|
184
|
+
engine.dispose();
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
}, [engine]);
|
|
189
|
+
const stop = useCallback(() => engine.stop(), [engine]);
|
|
190
|
+
const submit = useCallback((message) => engine.submit(message), [engine]);
|
|
191
|
+
const directing = useStoreSlice(store, selectDirecting);
|
|
192
|
+
const value = useMemo(
|
|
193
|
+
() => ({ directing, stop, store, submit }),
|
|
194
|
+
[directing, stop, store, submit]
|
|
195
|
+
);
|
|
196
|
+
useLayoutEffect(() => {
|
|
197
|
+
publish(value);
|
|
198
|
+
}, [publish, value]);
|
|
199
|
+
useLayoutEffect(() => () => publish(null), [publish]);
|
|
200
|
+
return null;
|
|
201
|
+
};
|
|
202
|
+
var DirectorChatProvider = ({
|
|
203
|
+
children,
|
|
204
|
+
ctx,
|
|
205
|
+
enabled = true,
|
|
206
|
+
invalidateAiConfig,
|
|
207
|
+
recoveryAddendum
|
|
208
|
+
}) => {
|
|
209
|
+
const [surface, setSurface] = useState(null);
|
|
210
|
+
const stated = useMemo(() => enabled ? surface : null, [enabled, surface]);
|
|
211
|
+
return /* @__PURE__ */ jsxs(DirectorChatContext, { value: stated, children: [
|
|
212
|
+
enabled ? /* @__PURE__ */ jsx(
|
|
213
|
+
DirectorChatSession,
|
|
214
|
+
{
|
|
215
|
+
ctx,
|
|
216
|
+
invalidateAiConfig,
|
|
217
|
+
publish: setSurface,
|
|
218
|
+
recoveryAddendum
|
|
219
|
+
}
|
|
220
|
+
) : null,
|
|
221
|
+
children
|
|
222
|
+
] });
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
// src/video/rules/changeTo.ts
|
|
226
|
+
var changeTo = (options, apply) => (reported) => {
|
|
227
|
+
const value = options.find((option) => String(option) === reported);
|
|
228
|
+
if (value !== void 0) {
|
|
229
|
+
apply(value);
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
var SECTIONS2 = ["video"];
|
|
233
|
+
var videoModeChrome = {
|
|
234
|
+
chase: { glyph: "camera-mode-chase", orgOnly: false },
|
|
235
|
+
cinematic: { glyph: "camera-mode-cinematic", orgOnly: false },
|
|
236
|
+
director: { glyph: "camera-mode-director", orgOnly: true },
|
|
237
|
+
drone: { glyph: "camera-mode-drone", orgOnly: false },
|
|
238
|
+
helicopter: { glyph: "camera-mode-helicopter", orgOnly: false },
|
|
239
|
+
overview: { glyph: "camera-mode-overview", orgOnly: false },
|
|
240
|
+
smart: { glyph: "camera-mode-smart", orgOnly: false }
|
|
241
|
+
};
|
|
242
|
+
var VIDEO_MODES = cameraModeSchema.options.map((mode) => ({ ...videoModeChrome[mode], mode }));
|
|
243
|
+
var ModeCards = ({ disabled, mode }) => {
|
|
244
|
+
const words = useStudioScopedStrings(SECTIONS2);
|
|
245
|
+
const { dispatch } = useStudioDispatch();
|
|
246
|
+
const withOrgModes = useStudioEntitlement("video-organization-modes");
|
|
247
|
+
const onChange = useMemo(
|
|
248
|
+
() => changeTo(cameraModeSchema.options, (next) => {
|
|
249
|
+
void dispatch("studio.video.mode.set", { mode: next });
|
|
250
|
+
}),
|
|
251
|
+
[dispatch]
|
|
252
|
+
);
|
|
253
|
+
const presets = VIDEO_MODES.filter((entry) => !entry.orgOnly);
|
|
254
|
+
const director = withOrgModes ? VIDEO_MODES.find((entry) => entry.orgOnly) : void 0;
|
|
255
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
256
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.video.mode.groupLabel }),
|
|
257
|
+
/* @__PURE__ */ jsxs(Radio.Group, { "aria-label": words.video.mode.groupLabel, onChange, value: mode, children: [
|
|
258
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
259
|
+
presets.map((entry) => /* @__PURE__ */ jsx(
|
|
260
|
+
RadioOptionCard,
|
|
261
|
+
{
|
|
262
|
+
checked: entry.mode === mode,
|
|
263
|
+
description: words.video.mode[entry.mode].description,
|
|
264
|
+
disabled,
|
|
265
|
+
glyph: entry.glyph,
|
|
266
|
+
title: words.video.mode[entry.mode].title,
|
|
267
|
+
value: entry.mode
|
|
268
|
+
},
|
|
269
|
+
entry.mode
|
|
270
|
+
)),
|
|
271
|
+
director ? /* @__PURE__ */ jsx(
|
|
272
|
+
RadioOptionCard,
|
|
273
|
+
{
|
|
274
|
+
checked: director.mode === mode,
|
|
275
|
+
description: words.video.mode[director.mode].description,
|
|
276
|
+
disabled,
|
|
277
|
+
glyph: director.glyph,
|
|
278
|
+
title: words.video.mode[director.mode].title,
|
|
279
|
+
value: director.mode
|
|
280
|
+
}
|
|
281
|
+
) : null
|
|
282
|
+
] }),
|
|
283
|
+
director ? /* @__PURE__ */ jsx(Text, { c: "dimmed", mt: "xs", size: "xs", children: words.video.mode.directorHint }) : null
|
|
284
|
+
] })
|
|
285
|
+
] });
|
|
286
|
+
};
|
|
287
|
+
var PlanNumberField = ({ floor, onSend, value, ...field }) => {
|
|
288
|
+
const [typed, setTyped] = useState();
|
|
289
|
+
const shown = typed !== void 0 && typed.over === value ? typed.text : value;
|
|
290
|
+
return /* @__PURE__ */ jsx(
|
|
291
|
+
NumberInput,
|
|
292
|
+
{
|
|
293
|
+
...field,
|
|
294
|
+
onBlur: () => setTyped(void 0),
|
|
295
|
+
onChange: (next) => {
|
|
296
|
+
setTyped({ over: value, text: next });
|
|
297
|
+
if (typeof next === "number" && Number.isFinite(next) && (floor ?? next) <= next) {
|
|
298
|
+
onSend(next);
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
value: shown
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
};
|
|
305
|
+
var SECTIONS3 = ["video"];
|
|
306
|
+
var zoomDigits = { maximumFractionDigits: 1 };
|
|
307
|
+
var shotFields = cameraShotBaseSchema.shape;
|
|
308
|
+
var boundsOf = (field, toField = (value) => value) => {
|
|
309
|
+
const bound = (value) => value !== null && Number.isFinite(value) ? toField(value) : void 0;
|
|
310
|
+
return { max: bound(field.maxValue), min: bound(field.minValue) };
|
|
311
|
+
};
|
|
312
|
+
var positionBounds = boundsOf(
|
|
313
|
+
shotFields.at,
|
|
314
|
+
(ratio) => convertProportion(ratio, "ratio", "percent")
|
|
315
|
+
);
|
|
316
|
+
var zoomBounds = boundsOf(shotFields.zoom);
|
|
317
|
+
var pitchBounds = boundsOf(shotFields.pitchDeg);
|
|
318
|
+
var holdBounds = boundsOf(
|
|
319
|
+
shotFields.holdMs,
|
|
320
|
+
(milliseconds) => convertDuration(milliseconds, "millisecond", "second")
|
|
321
|
+
);
|
|
322
|
+
var speedBounds = boundsOf(shotFields.speedScale);
|
|
323
|
+
var rowButtonStyle = {
|
|
324
|
+
flex: 1,
|
|
325
|
+
minWidth: 0,
|
|
326
|
+
overflow: "hidden",
|
|
327
|
+
textOverflow: "ellipsis",
|
|
328
|
+
whiteSpace: "nowrap"
|
|
329
|
+
};
|
|
330
|
+
var ShotEditor = ({ onChange, shot }) => {
|
|
331
|
+
const words = useStudioScopedStrings(SECTIONS3);
|
|
332
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", w: 240, children: [
|
|
333
|
+
/* @__PURE__ */ jsx(
|
|
334
|
+
PlanNumberField,
|
|
335
|
+
{
|
|
336
|
+
clampBehavior: "strict",
|
|
337
|
+
label: words.video.shots.at,
|
|
338
|
+
max: positionBounds.max,
|
|
339
|
+
min: positionBounds.min,
|
|
340
|
+
onSend: (value) => onChange({ at: convertProportion(value, "percent", "ratio") }),
|
|
341
|
+
size: "xs",
|
|
342
|
+
step: 1,
|
|
343
|
+
suffix: "%",
|
|
344
|
+
value: Math.round(convertProportion(shot.at, "ratio", "percent"))
|
|
345
|
+
}
|
|
346
|
+
),
|
|
347
|
+
/* @__PURE__ */ jsx(
|
|
348
|
+
PlanNumberField,
|
|
349
|
+
{
|
|
350
|
+
clampBehavior: "strict",
|
|
351
|
+
label: words.video.shots.zoom,
|
|
352
|
+
max: zoomBounds.max,
|
|
353
|
+
min: zoomBounds.min,
|
|
354
|
+
onSend: (value) => onChange({ zoom: value }),
|
|
355
|
+
size: "xs",
|
|
356
|
+
step: 0.5,
|
|
357
|
+
value: shot.zoom
|
|
358
|
+
}
|
|
359
|
+
),
|
|
360
|
+
/* @__PURE__ */ jsx(
|
|
361
|
+
PlanNumberField,
|
|
362
|
+
{
|
|
363
|
+
clampBehavior: "strict",
|
|
364
|
+
label: words.video.shots.pitch,
|
|
365
|
+
max: pitchBounds.max,
|
|
366
|
+
min: pitchBounds.min,
|
|
367
|
+
onSend: (value) => onChange({ pitchDeg: value }),
|
|
368
|
+
size: "xs",
|
|
369
|
+
step: 1,
|
|
370
|
+
suffix: "\xB0",
|
|
371
|
+
value: Math.round(shot.pitchDeg)
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
/* @__PURE__ */ jsxs(Stack, { gap: 0, children: [
|
|
375
|
+
/* @__PURE__ */ jsx(Text, { component: "label", fz: "xs", children: words.video.shots.bearingLabel }),
|
|
376
|
+
/* @__PURE__ */ jsx(
|
|
377
|
+
SegmentedControl,
|
|
378
|
+
{
|
|
379
|
+
data: cameraBearingModeSchema.options.map((mode) => ({
|
|
380
|
+
label: words.video.shots.bearing[mode],
|
|
381
|
+
value: mode
|
|
382
|
+
})),
|
|
383
|
+
onChange: (value) => onChange({ bearingMode: cameraBearingModeSchema.parse(value) }),
|
|
384
|
+
value: shot.bearingMode
|
|
385
|
+
}
|
|
386
|
+
)
|
|
387
|
+
] }),
|
|
388
|
+
shot.bearingMode === "value" ? /* @__PURE__ */ jsx(
|
|
389
|
+
PlanNumberField,
|
|
390
|
+
{
|
|
391
|
+
clampBehavior: "strict",
|
|
392
|
+
label: words.video.shots.bearingDeg,
|
|
393
|
+
max: DEGREES_PER_TURN,
|
|
394
|
+
min: 0,
|
|
395
|
+
onSend: (value) => onChange({ bearingDeg: value }),
|
|
396
|
+
size: "xs",
|
|
397
|
+
step: 5,
|
|
398
|
+
suffix: "\xB0",
|
|
399
|
+
value: Math.round(shot.bearingDeg ?? 0)
|
|
400
|
+
}
|
|
401
|
+
) : null,
|
|
402
|
+
/* @__PURE__ */ jsx(
|
|
403
|
+
PlanNumberField,
|
|
404
|
+
{
|
|
405
|
+
clampBehavior: "strict",
|
|
406
|
+
decimalScale: 1,
|
|
407
|
+
label: words.video.shots.hold,
|
|
408
|
+
max: holdBounds.max,
|
|
409
|
+
min: holdBounds.min,
|
|
410
|
+
onSend: (value) => onChange({ holdMs: value * MILLISECONDS_PER_SECOND }),
|
|
411
|
+
size: "xs",
|
|
412
|
+
step: 0.5,
|
|
413
|
+
suffix: " s",
|
|
414
|
+
value: shot.holdMs / MILLISECONDS_PER_SECOND
|
|
415
|
+
}
|
|
416
|
+
),
|
|
417
|
+
/* @__PURE__ */ jsx(
|
|
418
|
+
PlanNumberField,
|
|
419
|
+
{
|
|
420
|
+
clampBehavior: "none",
|
|
421
|
+
decimalScale: 1,
|
|
422
|
+
floor: speedBounds.min,
|
|
423
|
+
isAllowed: ({ floatValue }) => floatValue === void 0 || speedBounds.max === void 0 || floatValue <= speedBounds.max,
|
|
424
|
+
label: words.video.shots.speed,
|
|
425
|
+
max: speedBounds.max,
|
|
426
|
+
min: speedBounds.min,
|
|
427
|
+
onSend: (value) => onChange({ speedScale: value }),
|
|
428
|
+
size: "xs",
|
|
429
|
+
step: 0.1,
|
|
430
|
+
suffix: "\xD7",
|
|
431
|
+
value: shot.speedScale
|
|
432
|
+
}
|
|
433
|
+
)
|
|
434
|
+
] });
|
|
435
|
+
};
|
|
436
|
+
var ShotRowBase = ({ directing, index, shot, totalMs }) => {
|
|
437
|
+
const words = useStudioScopedStrings(SECTIONS3);
|
|
438
|
+
const { formatClock, formatNumber } = useStudioFormatters();
|
|
439
|
+
const { dispatch } = useStudioDispatch();
|
|
440
|
+
const onSeek = useCallback(() => {
|
|
441
|
+
void dispatch("studio.video.preview.seek", { fraction: shot.at });
|
|
442
|
+
}, [dispatch, shot.at]);
|
|
443
|
+
const onRemove = useCallback(() => {
|
|
444
|
+
void dispatch("studio.video.shot.remove", { id: shot.id });
|
|
445
|
+
}, [dispatch, shot.id]);
|
|
446
|
+
const setField = useCallback(
|
|
447
|
+
(changes) => {
|
|
448
|
+
void dispatch("studio.video.shot.set", { id: shot.id, ...changes });
|
|
449
|
+
},
|
|
450
|
+
[dispatch, shot.id]
|
|
451
|
+
);
|
|
452
|
+
const summary = [
|
|
453
|
+
// Through the seam rather than `toFixed`, for the decimal mark: a zoom of 13.5 reads `z13,5`
|
|
454
|
+
// in French, beside a hold whose seconds the copy bundle already writes that way. The
|
|
455
|
+
// trailing `.0` is dropped by asking for it back rather than by stripping a string: a
|
|
456
|
+
// regex over `13,0` would miss the comma and leave it.
|
|
457
|
+
`z${formatNumber(shot.zoom, zoomDigits)}`,
|
|
458
|
+
`${Math.round(shot.pitchDeg)}\xB0`,
|
|
459
|
+
words.video.shots.bearing[shot.bearingMode],
|
|
460
|
+
shot.holdMs > 0 ? words.video.shots.holdSummary(shot.holdMs / MILLISECONDS_PER_SECOND) : null
|
|
461
|
+
].filter((part) => part !== null).join(" \xB7 ");
|
|
462
|
+
return /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
|
|
463
|
+
/* @__PURE__ */ jsxs(
|
|
464
|
+
UnstyledButton,
|
|
465
|
+
{
|
|
466
|
+
"aria-label": words.video.shots.jumpTo(index + 1),
|
|
467
|
+
disabled: directing,
|
|
468
|
+
fz: "xs",
|
|
469
|
+
onClick: onSeek,
|
|
470
|
+
style: rowButtonStyle,
|
|
471
|
+
children: [
|
|
472
|
+
/* @__PURE__ */ jsx(Text, { component: "span", fw: 600, fz: "xs", children: `${index + 1} \xB7 ${formatClock(shot.at * totalMs)}` }),
|
|
473
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", component: "span", fz: "xs", ml: "xs", children: summary })
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
),
|
|
477
|
+
/* @__PURE__ */ jsxs(Popover, { position: "bottom-end", shadow: "md", trapFocus: true, withinPortal: true, children: [
|
|
478
|
+
/* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsx(
|
|
479
|
+
ActionIcon,
|
|
480
|
+
{
|
|
481
|
+
"aria-label": words.video.shots.editShot(index + 1),
|
|
482
|
+
disabled: directing,
|
|
483
|
+
variant: "default",
|
|
484
|
+
children: /* @__PURE__ */ jsx(Glyph, { name: "action-configure", size: iconSizes.sm })
|
|
485
|
+
}
|
|
486
|
+
) }),
|
|
487
|
+
/* @__PURE__ */ jsx(Popover.Dropdown, { children: /* @__PURE__ */ jsx(ShotEditor, { onChange: setField, shot }) })
|
|
488
|
+
] }),
|
|
489
|
+
/* @__PURE__ */ jsx(
|
|
490
|
+
ActionIcon,
|
|
491
|
+
{
|
|
492
|
+
"aria-label": words.video.shots.remove(index + 1),
|
|
493
|
+
disabled: directing,
|
|
494
|
+
onClick: onRemove,
|
|
495
|
+
variant: "default",
|
|
496
|
+
children: /* @__PURE__ */ jsx(Glyph, { name: "action-delete", size: iconSizes.sm })
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
] });
|
|
500
|
+
};
|
|
501
|
+
var ShotRow = memo(ShotRowBase);
|
|
502
|
+
var ShotList = ({ directing, plan }) => {
|
|
503
|
+
const words = useStudioScopedStrings(SECTIONS3);
|
|
504
|
+
const { dispatch } = useStudioDispatch();
|
|
505
|
+
const uiStore = useUiStoreApi();
|
|
506
|
+
const totalMs = planDurationMs(plan);
|
|
507
|
+
const playheadFraction = useCallback(() => {
|
|
508
|
+
const status = uiStore.getState().videoExport?.status;
|
|
509
|
+
return status && status.kind !== "idle" ? status.fraction : 0;
|
|
510
|
+
}, [uiStore]);
|
|
511
|
+
const onAddShot = useCallback(() => {
|
|
512
|
+
void dispatch("studio.video.shot.add", {
|
|
513
|
+
at: playheadFraction(),
|
|
514
|
+
pitchDeg: DEFAULT_SHOT_PITCH_DEG,
|
|
515
|
+
zoom: DEFAULT_SHOT_ZOOM
|
|
516
|
+
});
|
|
517
|
+
}, [dispatch, playheadFraction]);
|
|
518
|
+
const onAddHold = useCallback(() => {
|
|
519
|
+
void dispatch("studio.video.shot.addHold", {
|
|
520
|
+
at: playheadFraction(),
|
|
521
|
+
holdMs: DEFAULT_HOLD_MS,
|
|
522
|
+
pitchDeg: DEFAULT_SHOT_PITCH_DEG,
|
|
523
|
+
zoom: DEFAULT_SHOT_ZOOM
|
|
524
|
+
});
|
|
525
|
+
}, [dispatch, playheadFraction]);
|
|
526
|
+
const onAddOrbit = useCallback(() => {
|
|
527
|
+
void dispatch("studio.video.orbit", {
|
|
528
|
+
at: playheadFraction(),
|
|
529
|
+
pitchDeg: DEFAULT_SHOT_PITCH_DEG,
|
|
530
|
+
zoom: DEFAULT_SHOT_ZOOM
|
|
531
|
+
});
|
|
532
|
+
}, [dispatch, playheadFraction]);
|
|
533
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", mt: "md", children: [
|
|
534
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.video.shots.title }),
|
|
535
|
+
plan.shots.length === 0 ? /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: words.video.shots.empty }) : /* @__PURE__ */ jsx(Stack, { gap: "xxs", children: plan.shots.map((shot, index) => /* @__PURE__ */ jsx(
|
|
536
|
+
ShotRow,
|
|
537
|
+
{
|
|
538
|
+
directing,
|
|
539
|
+
index,
|
|
540
|
+
shot,
|
|
541
|
+
totalMs
|
|
542
|
+
},
|
|
543
|
+
shot.id
|
|
544
|
+
)) }),
|
|
545
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
546
|
+
/* @__PURE__ */ jsx(
|
|
547
|
+
Button,
|
|
548
|
+
{
|
|
549
|
+
disabled: directing,
|
|
550
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "action-add", size: iconSizes.sm }),
|
|
551
|
+
onClick: onAddShot,
|
|
552
|
+
variant: "default",
|
|
553
|
+
children: words.video.shots.add
|
|
554
|
+
}
|
|
555
|
+
),
|
|
556
|
+
/* @__PURE__ */ jsxs(Menu, { position: "bottom-end", withinPortal: true, children: [
|
|
557
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(
|
|
558
|
+
ActionIcon,
|
|
559
|
+
{
|
|
560
|
+
"aria-label": words.video.shots.more,
|
|
561
|
+
disabled: directing,
|
|
562
|
+
size: "lg",
|
|
563
|
+
variant: "default",
|
|
564
|
+
children: /* @__PURE__ */ jsx(Glyph, { name: "more", size: iconSizes.sm })
|
|
565
|
+
}
|
|
566
|
+
) }),
|
|
567
|
+
/* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
|
|
568
|
+
/* @__PURE__ */ jsx(
|
|
569
|
+
Menu.Item,
|
|
570
|
+
{
|
|
571
|
+
fz: "xs",
|
|
572
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "shot-hold", size: iconSizes.sm }),
|
|
573
|
+
onClick: onAddHold,
|
|
574
|
+
children: words.video.shots.addHold
|
|
575
|
+
}
|
|
576
|
+
),
|
|
577
|
+
/* @__PURE__ */ jsx(
|
|
578
|
+
Menu.Item,
|
|
579
|
+
{
|
|
580
|
+
fz: "xs",
|
|
581
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "shot-orbit", size: iconSizes.sm }),
|
|
582
|
+
onClick: onAddOrbit,
|
|
583
|
+
children: words.video.shots.addOrbit
|
|
584
|
+
}
|
|
585
|
+
)
|
|
586
|
+
] })
|
|
587
|
+
] })
|
|
588
|
+
] })
|
|
589
|
+
] });
|
|
590
|
+
};
|
|
591
|
+
var DIRECTOR_SLOT_REGION_ID = "video-director-slot";
|
|
592
|
+
var CameraStepDirectorSlot = ({ children }) => /* @__PURE__ */ jsx("div", { id: DIRECTOR_SLOT_REGION_ID, children });
|
|
593
|
+
var CameraStep = ({ directing, director, plan, scrim }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
594
|
+
/* @__PURE__ */ jsxs(Box, { pos: "relative", children: [
|
|
595
|
+
/* @__PURE__ */ jsx(ModeCards, { disabled: directing, mode: plan.mode }),
|
|
596
|
+
plan.mode === "director" ? /* @__PURE__ */ jsx(ShotList, { directing, plan }) : null,
|
|
597
|
+
scrim
|
|
598
|
+
] }),
|
|
599
|
+
/* @__PURE__ */ jsx(CameraStepDirectorSlot, { children: director })
|
|
600
|
+
] });
|
|
601
|
+
var DirectingScrim = () => {
|
|
602
|
+
const { directing } = useDirectorChat();
|
|
603
|
+
if (!directing) {
|
|
604
|
+
return null;
|
|
605
|
+
}
|
|
606
|
+
return /* @__PURE__ */ jsx(Overlay, { backgroundOpacity: 0.35, blur: 1 });
|
|
607
|
+
};
|
|
608
|
+
var SECTIONS4 = ["director", "prompt"];
|
|
609
|
+
var DirectorComposer = () => {
|
|
610
|
+
const words = useStudioScopedStrings(SECTIONS4);
|
|
611
|
+
const { directing, stop, submit } = useDirectorChat();
|
|
612
|
+
return /* @__PURE__ */ jsx(
|
|
613
|
+
ChatComposer,
|
|
614
|
+
{
|
|
615
|
+
onSend: submit,
|
|
616
|
+
onStop: stop,
|
|
617
|
+
placeholder: words.director.placeholder,
|
|
618
|
+
running: directing,
|
|
619
|
+
stopLabel: words.director.stop
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
};
|
|
623
|
+
var TRANSCRIPT_MAX_HEIGHT = 240;
|
|
624
|
+
var DirectorChat = () => {
|
|
625
|
+
const words = useStudioScopedStrings(SECTIONS4);
|
|
626
|
+
const { directing } = useDirectorChat();
|
|
627
|
+
const transcript = useDirectorStore(useShallowSelector((store) => store.transcript));
|
|
628
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
629
|
+
/* @__PURE__ */ jsx(
|
|
630
|
+
ChatTranscript,
|
|
631
|
+
{
|
|
632
|
+
emptyHint: words.director.emptyHint,
|
|
633
|
+
entries: transcript,
|
|
634
|
+
maxHeight: TRANSCRIPT_MAX_HEIGHT,
|
|
635
|
+
running: directing
|
|
636
|
+
}
|
|
637
|
+
),
|
|
638
|
+
/* @__PURE__ */ jsx(DirectorComposer, {})
|
|
639
|
+
] });
|
|
640
|
+
};
|
|
641
|
+
var SECTIONS5 = ["video"];
|
|
642
|
+
var GLYPH_BOX_SIZE = 34;
|
|
643
|
+
var FRAME_MAX_DIM = 22;
|
|
644
|
+
var innerFrameBaseStyle = {
|
|
645
|
+
border: "1.5px solid currentColor",
|
|
646
|
+
borderRadius: "var(--mantine-radius-xxs)"
|
|
647
|
+
};
|
|
648
|
+
var frameDimensions = (aspect) => {
|
|
649
|
+
const [w, h] = aspect.split(":").map(Number);
|
|
650
|
+
if (!w || !h) {
|
|
651
|
+
return { height: FRAME_MAX_DIM, width: FRAME_MAX_DIM };
|
|
652
|
+
}
|
|
653
|
+
const scale = FRAME_MAX_DIM / Math.max(w, h);
|
|
654
|
+
return { height: h * scale, width: w * scale };
|
|
655
|
+
};
|
|
656
|
+
var AspectGlyph = ({ aspect, checked }) => {
|
|
657
|
+
const frameStyle = {
|
|
658
|
+
...innerFrameBaseStyle,
|
|
659
|
+
...frameDimensions(aspect)
|
|
660
|
+
};
|
|
661
|
+
return /* @__PURE__ */ jsx(ThemeIcon, { size: GLYPH_BOX_SIZE, variant: checked ? "filled" : "light", children: /* @__PURE__ */ jsx("div", { style: frameStyle }) });
|
|
662
|
+
};
|
|
663
|
+
var lengthBounds = ((field) => {
|
|
664
|
+
const seconds = (value) => value !== null && Number.isFinite(value) ? convertDuration(value, "millisecond", "second") : void 0;
|
|
665
|
+
return { max: seconds(field.maxValue), min: seconds(field.minValue) };
|
|
666
|
+
})(cameraPlanSchema.shape.targetDurationMs.unwrap());
|
|
667
|
+
var LENGTH_STEP_SECONDS = 5;
|
|
668
|
+
var FORMAT_VALUES = FORMAT_OPTIONS.map((option) => option.value);
|
|
669
|
+
var FPS_VALUES = FPS_OPTIONS.map((option) => option.value);
|
|
670
|
+
var QUALITY_VALUES = QUALITY_OPTIONS.map((option) => option.value);
|
|
671
|
+
var PRESET_DESCRIPTORS = [
|
|
672
|
+
{
|
|
673
|
+
glyph: "frame-vertical",
|
|
674
|
+
orgOnly: false,
|
|
675
|
+
preset: "vertical",
|
|
676
|
+
template: videoPresets.vertical
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
glyph: "frame-widescreen",
|
|
680
|
+
orgOnly: false,
|
|
681
|
+
preset: "widescreen",
|
|
682
|
+
template: videoPresets.widescreen
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
glyph: "frame-square",
|
|
686
|
+
orgOnly: false,
|
|
687
|
+
preset: "square",
|
|
688
|
+
template: videoPresets.square
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
glyph: "frame-custom",
|
|
692
|
+
orgOnly: true,
|
|
693
|
+
preset: "custom",
|
|
694
|
+
template: null
|
|
695
|
+
}
|
|
696
|
+
];
|
|
697
|
+
var PRESET_VALUES = PRESET_DESCRIPTORS.map((entry) => entry.preset);
|
|
698
|
+
var suggestedSeconds = (route) => {
|
|
699
|
+
if (!route) {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
return Math.round(suggestVideoLengthMs(routeLengthMeters(route.line)) / MILLISECONDS_PER_SECOND);
|
|
703
|
+
};
|
|
704
|
+
var PlanLengthField = ({ plan, route }) => {
|
|
705
|
+
const words = useStudioScopedStrings(SECTIONS5);
|
|
706
|
+
const { dispatch } = useStudioDispatch();
|
|
707
|
+
const lengthSeconds = Math.round(plan.targetDurationMs / MILLISECONDS_PER_SECOND);
|
|
708
|
+
const suggestion = suggestedSeconds(route);
|
|
709
|
+
const onLengthChange = useCallback(
|
|
710
|
+
(seconds) => {
|
|
711
|
+
void dispatch("studio.video.duration.set", {
|
|
712
|
+
targetDurationMs: seconds * MILLISECONDS_PER_SECOND
|
|
713
|
+
});
|
|
714
|
+
},
|
|
715
|
+
[dispatch]
|
|
716
|
+
);
|
|
717
|
+
const onUseSuggested = useCallback(() => {
|
|
718
|
+
if (suggestion !== null) {
|
|
719
|
+
onLengthChange(suggestion);
|
|
720
|
+
}
|
|
721
|
+
}, [onLengthChange, suggestion]);
|
|
722
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
723
|
+
/* @__PURE__ */ jsx(
|
|
724
|
+
PlanNumberField,
|
|
725
|
+
{
|
|
726
|
+
clampBehavior: "none",
|
|
727
|
+
floor: lengthBounds.min,
|
|
728
|
+
isAllowed: ({ floatValue }) => floatValue === void 0 || lengthBounds.max === void 0 || floatValue <= lengthBounds.max,
|
|
729
|
+
label: words.video.format.length.label,
|
|
730
|
+
max: lengthBounds.max,
|
|
731
|
+
min: lengthBounds.min,
|
|
732
|
+
onSend: onLengthChange,
|
|
733
|
+
startValue: suggestion ?? void 0,
|
|
734
|
+
step: LENGTH_STEP_SECONDS,
|
|
735
|
+
suffix: ` ${words.video.format.length.unit}`,
|
|
736
|
+
value: lengthSeconds
|
|
737
|
+
}
|
|
738
|
+
),
|
|
739
|
+
suggestion !== null && suggestion !== lengthSeconds ? /* @__PURE__ */ jsx(Anchor, { component: "button", onClick: onUseSuggested, size: "xs", type: "button", children: words.video.format.length.suggested(suggestion) }) : null
|
|
740
|
+
] });
|
|
741
|
+
};
|
|
742
|
+
var FormatStep = ({ plan, route }) => {
|
|
743
|
+
const words = useStudioScopedStrings(SECTIONS5);
|
|
744
|
+
const { dispatch } = useStudioDispatch();
|
|
745
|
+
const withOrgModes = useStudioEntitlement("video-organization-modes");
|
|
746
|
+
const output = plan.output;
|
|
747
|
+
const custom = output.preset === "custom";
|
|
748
|
+
const presets = useMemo(
|
|
749
|
+
() => withOrgModes ? PRESET_DESCRIPTORS : PRESET_DESCRIPTORS.filter((entry) => !entry.orgOnly),
|
|
750
|
+
[withOrgModes]
|
|
751
|
+
);
|
|
752
|
+
const derivedBitrate = bitrateForOutput(output.resolution, output.fps, output.quality);
|
|
753
|
+
const applyCustom = useCallback(
|
|
754
|
+
(change) => {
|
|
755
|
+
const next = { ...output, ...change, preset: "custom" };
|
|
756
|
+
void dispatch("studio.video.output.set", {
|
|
757
|
+
...next,
|
|
758
|
+
bitrateMbps: bitrateForOutput(next.resolution, next.fps, next.quality)
|
|
759
|
+
});
|
|
760
|
+
},
|
|
761
|
+
[dispatch, output]
|
|
762
|
+
);
|
|
763
|
+
const onPresetChange = useMemo(
|
|
764
|
+
() => changeTo(PRESET_VALUES, (preset) => {
|
|
765
|
+
if (preset === "custom") {
|
|
766
|
+
applyCustom({});
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
void dispatch("studio.video.preset.set", { preset });
|
|
770
|
+
}),
|
|
771
|
+
[applyCustom, dispatch]
|
|
772
|
+
);
|
|
773
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "lg", children: [
|
|
774
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
775
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.video.format.preset.groupLabel }),
|
|
776
|
+
/* @__PURE__ */ jsx(
|
|
777
|
+
Radio.Group,
|
|
778
|
+
{
|
|
779
|
+
"aria-label": words.video.format.preset.groupLabel,
|
|
780
|
+
onChange: onPresetChange,
|
|
781
|
+
value: output.preset,
|
|
782
|
+
children: /* @__PURE__ */ jsx(Stack, { children: presets.map((entry) => /* @__PURE__ */ jsx(
|
|
783
|
+
RadioOptionCard,
|
|
784
|
+
{
|
|
785
|
+
checked: entry.preset === output.preset,
|
|
786
|
+
description: words.video.format.preset[entry.preset].description,
|
|
787
|
+
glyph: entry.glyph,
|
|
788
|
+
media: entry.template ? /* @__PURE__ */ jsx(
|
|
789
|
+
AspectGlyph,
|
|
790
|
+
{
|
|
791
|
+
aspect: entry.template.aspect,
|
|
792
|
+
checked: entry.preset === output.preset
|
|
793
|
+
}
|
|
794
|
+
) : void 0,
|
|
795
|
+
specs: entry.template ? words.video.format.preset.specs(
|
|
796
|
+
entry.template.resolution,
|
|
797
|
+
entry.template.aspect,
|
|
798
|
+
entry.template.fps,
|
|
799
|
+
entry.template.bitrateMbps
|
|
800
|
+
) : void 0,
|
|
801
|
+
title: words.video.format.preset[entry.preset].title,
|
|
802
|
+
value: entry.preset
|
|
803
|
+
},
|
|
804
|
+
entry.preset
|
|
805
|
+
)) })
|
|
806
|
+
}
|
|
807
|
+
)
|
|
808
|
+
] }),
|
|
809
|
+
custom ? /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
810
|
+
/* @__PURE__ */ jsx(Input.Wrapper, { label: words.video.format.matrix.formatLabel, children: /* @__PURE__ */ jsx(
|
|
811
|
+
SegmentedControl,
|
|
812
|
+
{
|
|
813
|
+
data: FORMAT_OPTIONS.map((option) => ({
|
|
814
|
+
label: words.video.format.matrix[option.labelKey],
|
|
815
|
+
value: option.value
|
|
816
|
+
})),
|
|
817
|
+
onChange: changeTo(FORMAT_VALUES, (format) => applyCustom({ format })),
|
|
818
|
+
value: output.format
|
|
819
|
+
}
|
|
820
|
+
) }),
|
|
821
|
+
/* @__PURE__ */ jsx(Input.Wrapper, { label: words.video.format.matrix.resolutionLabel, children: /* @__PURE__ */ jsx(
|
|
822
|
+
SegmentedControl,
|
|
823
|
+
{
|
|
824
|
+
data: [...RESOLUTION_OPTIONS],
|
|
825
|
+
onChange: changeTo(RESOLUTION_OPTIONS, (resolution) => applyCustom({ resolution })),
|
|
826
|
+
value: output.resolution
|
|
827
|
+
}
|
|
828
|
+
) }),
|
|
829
|
+
/* @__PURE__ */ jsx(Input.Wrapper, { label: words.video.format.matrix.fpsLabel, children: /* @__PURE__ */ jsx(
|
|
830
|
+
SegmentedControl,
|
|
831
|
+
{
|
|
832
|
+
data: FPS_OPTIONS.map((option) => ({
|
|
833
|
+
label: words.video.format.matrix[option.labelKey],
|
|
834
|
+
value: String(option.value)
|
|
835
|
+
})),
|
|
836
|
+
onChange: changeTo(FPS_VALUES, (fps) => applyCustom({ fps })),
|
|
837
|
+
value: String(output.fps)
|
|
838
|
+
}
|
|
839
|
+
) }),
|
|
840
|
+
/* @__PURE__ */ jsx(Input.Wrapper, { label: words.video.format.matrix.qualityLabel, children: /* @__PURE__ */ jsx(
|
|
841
|
+
SegmentedControl,
|
|
842
|
+
{
|
|
843
|
+
data: QUALITY_OPTIONS.map((option) => ({
|
|
844
|
+
label: words.video.format.matrix[option.labelKey],
|
|
845
|
+
value: option.value
|
|
846
|
+
})),
|
|
847
|
+
onChange: changeTo(QUALITY_VALUES, (quality) => applyCustom({ quality })),
|
|
848
|
+
value: output.quality
|
|
849
|
+
}
|
|
850
|
+
) }),
|
|
851
|
+
/* @__PURE__ */ jsx(Input.Wrapper, { label: words.video.format.matrix.aspectLabel, children: /* @__PURE__ */ jsx(
|
|
852
|
+
SegmentedControl,
|
|
853
|
+
{
|
|
854
|
+
data: [...ASPECT_OPTIONS],
|
|
855
|
+
onChange: changeTo(ASPECT_OPTIONS, (aspect) => applyCustom({ aspect })),
|
|
856
|
+
value: output.aspect
|
|
857
|
+
}
|
|
858
|
+
) }),
|
|
859
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
860
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", children: words.video.format.matrix.bitrateLabel }),
|
|
861
|
+
/* @__PURE__ */ jsx(Text, { children: words.video.format.matrix.bitrateValue(derivedBitrate) })
|
|
862
|
+
] })
|
|
863
|
+
] }) : null,
|
|
864
|
+
/* @__PURE__ */ jsx(PlanLengthField, { plan, route })
|
|
865
|
+
] });
|
|
866
|
+
};
|
|
867
|
+
var SECTIONS6 = ["video"];
|
|
868
|
+
var SCRUB_STEPS = 1e3;
|
|
869
|
+
var scrubStyle = { flex: 1 };
|
|
870
|
+
var readoutStyle = {
|
|
871
|
+
fontVariantNumeric: "tabular-nums",
|
|
872
|
+
whiteSpace: "nowrap"
|
|
873
|
+
};
|
|
874
|
+
var progressOf = (status) => status?.kind === "previewing" || status?.kind === "parked" ? status.fraction : 0;
|
|
875
|
+
var PreviewControls = ({ disabled, plan }) => {
|
|
876
|
+
const words = useStudioScopedStrings(SECTIONS6);
|
|
877
|
+
const { formatClock } = useStudioFormatters();
|
|
878
|
+
const { dispatch } = useStudioDispatch();
|
|
879
|
+
const uiStore = useUiStoreApi();
|
|
880
|
+
const status = useUiStore(selectVideoExportStatus);
|
|
881
|
+
const playing = status?.kind === "previewing";
|
|
882
|
+
const fraction = progressOf(status);
|
|
883
|
+
const [loop, setLoop] = useState(false);
|
|
884
|
+
const [dragValue, setDragValue] = useState(null);
|
|
885
|
+
const onPlayPause = useCallback(() => {
|
|
886
|
+
void dispatch(playing ? "studio.video.preview.pause" : "studio.video.preview.play", {});
|
|
887
|
+
}, [dispatch, playing]);
|
|
888
|
+
const onStop = useCallback(() => {
|
|
889
|
+
void dispatch("studio.video.preview.stop", {});
|
|
890
|
+
}, [dispatch]);
|
|
891
|
+
const onScrub = useCallback((value) => {
|
|
892
|
+
setDragValue(value);
|
|
893
|
+
}, []);
|
|
894
|
+
const onScrubCommit = useCallback(
|
|
895
|
+
(value) => {
|
|
896
|
+
void dispatch("studio.video.preview.seek", { fraction: value / SCRUB_STEPS });
|
|
897
|
+
setDragValue(null);
|
|
898
|
+
},
|
|
899
|
+
[dispatch]
|
|
900
|
+
);
|
|
901
|
+
const onToggleLoop = useCallback(() => {
|
|
902
|
+
setLoop((current) => !current);
|
|
903
|
+
}, []);
|
|
904
|
+
const shotMarks = useMemo(
|
|
905
|
+
() => plan.mode === "director" ? plan.shots.map((shot) => ({ value: Math.round(shot.at * SCRUB_STEPS) })) : void 0,
|
|
906
|
+
[plan]
|
|
907
|
+
);
|
|
908
|
+
const totalMs = useMemo(() => planDurationMs(plan), [plan]);
|
|
909
|
+
useEffect(() => {
|
|
910
|
+
if (!loop || disabled) {
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
return uiStore.subscribe((state, previous) => {
|
|
914
|
+
const before = previous.videoExport?.status;
|
|
915
|
+
const after = state.videoExport?.status;
|
|
916
|
+
const flown = before?.kind === "previewing" && before.fraction >= 1;
|
|
917
|
+
if (flown && after?.kind === "idle") {
|
|
918
|
+
void dispatch("studio.video.preview.start", {});
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
}, [dispatch, disabled, loop, uiStore]);
|
|
922
|
+
return /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
|
|
923
|
+
/* @__PURE__ */ jsx(
|
|
924
|
+
ActionIcon,
|
|
925
|
+
{
|
|
926
|
+
"aria-keyshortcuts": "Space",
|
|
927
|
+
"aria-label": playing ? words.video.preview.pause : words.video.preview.play,
|
|
928
|
+
disabled,
|
|
929
|
+
onClick: onPlayPause,
|
|
930
|
+
children: playing ? /* @__PURE__ */ jsx(Glyph, { name: "media-pause", size: iconSizes.sm }) : /* @__PURE__ */ jsx(Glyph, { name: "media-play", size: iconSizes.sm })
|
|
931
|
+
}
|
|
932
|
+
),
|
|
933
|
+
/* @__PURE__ */ jsx(ActionIcon, { "aria-label": words.video.preview.stop, disabled, onClick: onStop, children: /* @__PURE__ */ jsx(Glyph, { name: "media-stop", size: iconSizes.sm }) }),
|
|
934
|
+
/* @__PURE__ */ jsx(
|
|
935
|
+
Slider,
|
|
936
|
+
{
|
|
937
|
+
"aria-label": words.video.preview.scrub,
|
|
938
|
+
disabled,
|
|
939
|
+
label: null,
|
|
940
|
+
marks: shotMarks,
|
|
941
|
+
max: SCRUB_STEPS,
|
|
942
|
+
min: 0,
|
|
943
|
+
onChange: onScrub,
|
|
944
|
+
onChangeEnd: onScrubCommit,
|
|
945
|
+
style: scrubStyle,
|
|
946
|
+
value: dragValue ?? Math.round(fraction * SCRUB_STEPS)
|
|
947
|
+
}
|
|
948
|
+
),
|
|
949
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", className: "mtya-studio-visible-from-xs", size: "xs", style: readoutStyle, children: `${formatClock(fraction * totalMs)} / ${formatClock(totalMs)}` }),
|
|
950
|
+
/* @__PURE__ */ jsx(
|
|
951
|
+
ActionIcon,
|
|
952
|
+
{
|
|
953
|
+
"aria-label": words.video.preview.loop,
|
|
954
|
+
"aria-pressed": loop,
|
|
955
|
+
disabled,
|
|
956
|
+
onClick: onToggleLoop,
|
|
957
|
+
variant: loop ? "filled" : "default",
|
|
958
|
+
children: /* @__PURE__ */ jsx(Glyph, { name: "media-loop", size: iconSizes.sm })
|
|
959
|
+
}
|
|
960
|
+
)
|
|
961
|
+
] });
|
|
962
|
+
};
|
|
963
|
+
var parkPreview = async (dispatch, fraction) => {
|
|
964
|
+
const seek = await dispatch("studio.video.preview.seek", { fraction });
|
|
965
|
+
if (seek.ok && seek.data.parked) {
|
|
966
|
+
await dispatch("studio.video.preview.pause", {});
|
|
967
|
+
}
|
|
968
|
+
};
|
|
969
|
+
var usePreviewPlanRefresh = (client, plan) => {
|
|
970
|
+
const { dispatch } = useStudioDispatch();
|
|
971
|
+
const uiStore = useUiStoreApi();
|
|
972
|
+
const lastPlanRef = useRef(null);
|
|
973
|
+
useEffect(() => {
|
|
974
|
+
if (!client) {
|
|
975
|
+
lastPlanRef.current = plan;
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
if (lastPlanRef.current === null || lastPlanRef.current === plan) {
|
|
979
|
+
lastPlanRef.current = plan;
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
lastPlanRef.current = plan;
|
|
983
|
+
const timer = setTimeout(() => {
|
|
984
|
+
const status = uiStore.getState().videoExport?.status ?? null;
|
|
985
|
+
const disposition = previewRefreshDisposition(status, plan);
|
|
986
|
+
if (disposition.kind === "restart") {
|
|
987
|
+
void dispatch("studio.video.preview.start", {});
|
|
988
|
+
} else if (disposition.kind === "park") {
|
|
989
|
+
void parkPreview(dispatch, disposition.fraction);
|
|
990
|
+
}
|
|
991
|
+
}, PREVIEW_PLAN_REFRESH_DEBOUNCE_MS);
|
|
992
|
+
return () => clearTimeout(timer);
|
|
993
|
+
}, [client, dispatch, plan, uiStore]);
|
|
994
|
+
};
|
|
995
|
+
var itineraryIcons = (segments, waypoints) => {
|
|
996
|
+
const icons = [];
|
|
997
|
+
for (const waypoint of waypoints) {
|
|
998
|
+
if (waypoint.icon && waypoint.color) {
|
|
999
|
+
icons.push({ color: waypoint.color, icon: waypoint.icon });
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
for (const segment of segments) {
|
|
1003
|
+
if (segment.color) {
|
|
1004
|
+
icons.push({ color: segment.color, icon: "flag-start" });
|
|
1005
|
+
icons.push({ color: segment.color, icon: "flag-end" });
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
return icons;
|
|
1009
|
+
};
|
|
1010
|
+
var useVideoPreviewSeed = (client) => {
|
|
1011
|
+
const { manifest: layers } = useMountayaLayersManifest();
|
|
1012
|
+
const demUrl = useStudioDemUrl();
|
|
1013
|
+
const language = useStudioPreferences()?.language;
|
|
1014
|
+
const route = useUiStore(selectVideoExportRoute);
|
|
1015
|
+
const itineraryId = useUiStore((state) => state.videoExport?.itineraryId ?? null);
|
|
1016
|
+
const { terrain, terrainVariant } = useUiStoreShallow((state) => ({
|
|
1017
|
+
terrain: state.terrain,
|
|
1018
|
+
terrainVariant: state.terrainVariant
|
|
1019
|
+
}));
|
|
1020
|
+
const { data: detail } = useStudioItinerary(itineraryId ?? void 0, "published");
|
|
1021
|
+
const baseTerrain = useMemo(
|
|
1022
|
+
() => layers ? resolveBaseTerrain(
|
|
1023
|
+
layers.terrains ?? [],
|
|
1024
|
+
terrain,
|
|
1025
|
+
terrainVariant,
|
|
1026
|
+
resolveDemUrl(layers, demUrl)
|
|
1027
|
+
) : null,
|
|
1028
|
+
[demUrl, layers, terrain, terrainVariant]
|
|
1029
|
+
);
|
|
1030
|
+
const styleUrl = baseTerrain?.styleUrl;
|
|
1031
|
+
const terrainDemUrl = baseTerrain?.demUrl;
|
|
1032
|
+
useEffect(() => {
|
|
1033
|
+
if (!client || styleUrl === void 0) {
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
client.setBaseTerrain(terrainDemUrl ? { demUrl: terrainDemUrl, styleUrl } : { styleUrl });
|
|
1037
|
+
}, [client, styleUrl, terrainDemUrl]);
|
|
1038
|
+
useEffect(() => {
|
|
1039
|
+
if (!client || !layers) {
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
const sources = [
|
|
1043
|
+
...layers.itineraries?.sources ?? [],
|
|
1044
|
+
...layers.zones?.sources ?? []
|
|
1045
|
+
];
|
|
1046
|
+
if (sources.length > 0) {
|
|
1047
|
+
client.addTileSources(sources);
|
|
1048
|
+
}
|
|
1049
|
+
}, [client, layers]);
|
|
1050
|
+
const seeded = layers !== void 0 && layers !== null;
|
|
1051
|
+
useEffect(() => {
|
|
1052
|
+
if (!client || !seeded) {
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
client.setMapLanguage(clampMapLanguage(language));
|
|
1056
|
+
}, [client, language, seeded]);
|
|
1057
|
+
useEffect(() => {
|
|
1058
|
+
if (!client || !seeded || !detail || !itineraryId) {
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
const icons = itineraryIcons(detail.segments ?? [], detail.waypoints ?? []);
|
|
1062
|
+
if (icons.length > 0) {
|
|
1063
|
+
client.prewarmItineraryIcons(icons);
|
|
1064
|
+
}
|
|
1065
|
+
}, [client, detail, itineraryId, seeded, styleUrl, terrainDemUrl]);
|
|
1066
|
+
useEffect(() => {
|
|
1067
|
+
if (!client || !seeded || !detail || !itineraryId) {
|
|
1068
|
+
return;
|
|
1069
|
+
}
|
|
1070
|
+
client.setItineraryEmphasis({ id: itineraryId, mode: "itinerary" });
|
|
1071
|
+
}, [client, detail, itineraryId, seeded]);
|
|
1072
|
+
useEffect(() => {
|
|
1073
|
+
if (!client || !seeded || !route) {
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
const bounds = boundsOf$1([{ coordinates: route.line, type: "LineString" }]);
|
|
1077
|
+
if (bounds) {
|
|
1078
|
+
client.fitBounds(bounds);
|
|
1079
|
+
}
|
|
1080
|
+
}, [client, route, seeded]);
|
|
1081
|
+
};
|
|
1082
|
+
var withPublishedSurface = (url) => `${url}${url.includes("?") ? "&" : "?"}surface=published`;
|
|
1083
|
+
var publishedTileTransform = (client) => {
|
|
1084
|
+
const transport = client.transport;
|
|
1085
|
+
let claim;
|
|
1086
|
+
try {
|
|
1087
|
+
claim = createTransformRequest({
|
|
1088
|
+
...transport.mapCredential,
|
|
1089
|
+
language: transport.requestLanguage ?? "*",
|
|
1090
|
+
origins: [transport.tilesBaseUrl],
|
|
1091
|
+
sessionToken: () => transport.mapCredential.sessionToken
|
|
1092
|
+
});
|
|
1093
|
+
} catch {
|
|
1094
|
+
return void 0;
|
|
1095
|
+
}
|
|
1096
|
+
return (url) => {
|
|
1097
|
+
const request = claim(url);
|
|
1098
|
+
return request.credentials === void 0 ? void 0 : { ...request, url: withPublishedSurface(request.url) };
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
var useVideoTileTransform = (mapClient, transformRequest) => {
|
|
1102
|
+
const stated = transformRequest !== void 0;
|
|
1103
|
+
const derived = useMemo(
|
|
1104
|
+
() => stated ? void 0 : publishedTileTransform(mapClient),
|
|
1105
|
+
[mapClient, stated]
|
|
1106
|
+
);
|
|
1107
|
+
return transformRequest ?? derived;
|
|
1108
|
+
};
|
|
1109
|
+
var previewWatermarkAnchorStyle = {
|
|
1110
|
+
left: `calc(100cqmin * ${WATERMARK_INSET_PX} / ${WATERMARK_REFERENCE_SHORT_SIDE})`,
|
|
1111
|
+
pointerEvents: "none",
|
|
1112
|
+
position: "absolute",
|
|
1113
|
+
top: `calc(100cqmin * ${WATERMARK_INSET_PX} / ${WATERMARK_REFERENCE_SHORT_SIDE})`,
|
|
1114
|
+
zIndex: 2
|
|
1115
|
+
};
|
|
1116
|
+
var previewWatermarkImageStyle = {
|
|
1117
|
+
display: "block",
|
|
1118
|
+
height: "auto",
|
|
1119
|
+
width: `calc(100cqmin * ${WATERMARK_WIDTH_PX} / ${WATERMARK_REFERENCE_SHORT_SIDE})`
|
|
1120
|
+
};
|
|
1121
|
+
var PreviewWatermark = () => {
|
|
1122
|
+
const whiteLabel = useStudioEntitlement("white-label");
|
|
1123
|
+
if (whiteLabel) {
|
|
1124
|
+
return null;
|
|
1125
|
+
}
|
|
1126
|
+
return (
|
|
1127
|
+
// mantine:exempt (see previewWatermarkAnchorStyle): a top-left anchor inset in
|
|
1128
|
+
// container-query units so the mark tracks the frame's short side, above the map canvas.
|
|
1129
|
+
/* @__PURE__ */ jsx(Box, { "aria-hidden": true, style: previewWatermarkAnchorStyle, children: /* @__PURE__ */ jsx("img", { alt: "", "aria-hidden": true, src: WATERMARK_URL, style: previewWatermarkImageStyle }) })
|
|
1130
|
+
);
|
|
1131
|
+
};
|
|
1132
|
+
var overlayStyle = {
|
|
1133
|
+
height: "100%",
|
|
1134
|
+
inset: 0,
|
|
1135
|
+
pointerEvents: "none",
|
|
1136
|
+
position: "absolute",
|
|
1137
|
+
width: "100%"
|
|
1138
|
+
};
|
|
1139
|
+
var fractionOf = (state) => {
|
|
1140
|
+
const status = selectVideoExportStatus(state);
|
|
1141
|
+
return status && status.kind !== "idle" ? status.fraction : 0;
|
|
1142
|
+
};
|
|
1143
|
+
var ProfileOverlayCanvas = () => {
|
|
1144
|
+
const canvasRef = useRef(null);
|
|
1145
|
+
const store = useUiStoreApi();
|
|
1146
|
+
const plan = useUiStore(selectVideoExportPlan);
|
|
1147
|
+
const route = useUiStore(selectVideoExportRoute);
|
|
1148
|
+
const profileSource = useUiStore((state) => state.videoExport?.profileSource ?? null);
|
|
1149
|
+
const design = useUiStore((state) => state.videoExport?.profile?.design ?? "graph");
|
|
1150
|
+
const length = useUiStore((state) => state.videoExport?.profile?.length ?? "metric");
|
|
1151
|
+
const pace = useUiStore((state) => state.videoExport?.profile?.pace ?? "per-time");
|
|
1152
|
+
const slope = useUiStore((state) => state.videoExport?.profile?.slope ?? "degrees");
|
|
1153
|
+
const language = useUiStore((state) => state.videoExport?.profile?.language ?? "en");
|
|
1154
|
+
const samples = useMemo(() => {
|
|
1155
|
+
if (!plan || !route || !profileSource) {
|
|
1156
|
+
return [];
|
|
1157
|
+
}
|
|
1158
|
+
return resolveProfileSamples(plan, route, profileSource);
|
|
1159
|
+
}, [plan, route, profileSource]);
|
|
1160
|
+
const curve = useMemo(() => buildProfileCurve(samples), [samples]);
|
|
1161
|
+
useEffect(() => {
|
|
1162
|
+
const canvas = canvasRef.current;
|
|
1163
|
+
if (!canvas) {
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
const context = canvas.getContext("2d");
|
|
1167
|
+
if (!context) {
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
const draw = () => {
|
|
1171
|
+
const ratio = window.devicePixelRatio || 1;
|
|
1172
|
+
const cssWidth = canvas.clientWidth;
|
|
1173
|
+
const cssHeight = canvas.clientHeight;
|
|
1174
|
+
const pixelWidth = Math.max(1, Math.round(cssWidth * ratio));
|
|
1175
|
+
const pixelHeight = Math.max(1, Math.round(cssHeight * ratio));
|
|
1176
|
+
if (canvas.width !== pixelWidth || canvas.height !== pixelHeight) {
|
|
1177
|
+
canvas.width = pixelWidth;
|
|
1178
|
+
canvas.height = pixelHeight;
|
|
1179
|
+
}
|
|
1180
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
1181
|
+
if (samples.length === 0) {
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
const fraction = fractionOf(store.getState());
|
|
1185
|
+
const lastIndex = samples.length - 1;
|
|
1186
|
+
const index = Math.min(lastIndex, Math.max(0, Math.round(fraction * lastIndex)));
|
|
1187
|
+
const sample = samples[index];
|
|
1188
|
+
if (!sample) {
|
|
1189
|
+
return;
|
|
1190
|
+
}
|
|
1191
|
+
profileOverlayDesigns[design](
|
|
1192
|
+
context,
|
|
1193
|
+
sample,
|
|
1194
|
+
curve,
|
|
1195
|
+
{ height: canvas.height, width: canvas.width },
|
|
1196
|
+
{
|
|
1197
|
+
language,
|
|
1198
|
+
length,
|
|
1199
|
+
pace,
|
|
1200
|
+
slope,
|
|
1201
|
+
// The overlay burns no temperature, so the scale is pinned rather than carried
|
|
1202
|
+
// on the wizard's profile: a setting with nothing to set.
|
|
1203
|
+
temperature: "celsius"
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
};
|
|
1207
|
+
draw();
|
|
1208
|
+
let disposed = false;
|
|
1209
|
+
void ensureOverlayFonts().then(() => {
|
|
1210
|
+
if (!disposed) {
|
|
1211
|
+
draw();
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
const observer = new ResizeObserver(() => draw());
|
|
1215
|
+
observer.observe(canvas);
|
|
1216
|
+
const unsubscribe = store.subscribe((state, previous) => {
|
|
1217
|
+
if (fractionOf(state) !== fractionOf(previous)) {
|
|
1218
|
+
draw();
|
|
1219
|
+
}
|
|
1220
|
+
});
|
|
1221
|
+
return () => {
|
|
1222
|
+
disposed = true;
|
|
1223
|
+
observer.disconnect();
|
|
1224
|
+
unsubscribe();
|
|
1225
|
+
};
|
|
1226
|
+
}, [store, samples, curve, design, length, pace, slope, language]);
|
|
1227
|
+
return /* @__PURE__ */ jsx("canvas", { ref: canvasRef, style: overlayStyle });
|
|
1228
|
+
};
|
|
1229
|
+
var previewFrameStyle = {
|
|
1230
|
+
borderRadius: "var(--mantine-radius-md)",
|
|
1231
|
+
containerType: "size",
|
|
1232
|
+
height: "100%",
|
|
1233
|
+
overflow: "hidden",
|
|
1234
|
+
position: "relative",
|
|
1235
|
+
width: "100%"
|
|
1236
|
+
};
|
|
1237
|
+
var buildVideoRun = (map) => new VideoRunEngine(map.raw, map.events, () => map.loadOrganization());
|
|
1238
|
+
var PreviewMap = ({
|
|
1239
|
+
client,
|
|
1240
|
+
mapClient,
|
|
1241
|
+
onClient,
|
|
1242
|
+
plan,
|
|
1243
|
+
transformRequest
|
|
1244
|
+
}) => {
|
|
1245
|
+
const { dispatch } = useStudioDispatch();
|
|
1246
|
+
const { registerVideoMap, unregisterVideoMap } = useStudioHostRegistry();
|
|
1247
|
+
useVideoPreviewSeed(client);
|
|
1248
|
+
const tileTransform = useVideoTileTransform(mapClient, transformRequest);
|
|
1249
|
+
const planRef = useLatestRef(plan);
|
|
1250
|
+
const onClientReady = useCallback(
|
|
1251
|
+
(next) => {
|
|
1252
|
+
registerVideoMap(next);
|
|
1253
|
+
onClient(next);
|
|
1254
|
+
},
|
|
1255
|
+
[registerVideoMap, onClient]
|
|
1256
|
+
);
|
|
1257
|
+
const onClientDestroy = useCallback(() => {
|
|
1258
|
+
unregisterVideoMap();
|
|
1259
|
+
onClient(null);
|
|
1260
|
+
}, [unregisterVideoMap, onClient]);
|
|
1261
|
+
useEffect(() => {
|
|
1262
|
+
if (!client) {
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
void parkPreview(dispatch, representativeStillFraction(planRef.current));
|
|
1266
|
+
return () => {
|
|
1267
|
+
void dispatch("studio.video.preview.stop", {});
|
|
1268
|
+
};
|
|
1269
|
+
}, [dispatch, client, planRef]);
|
|
1270
|
+
return /* @__PURE__ */ jsx(
|
|
1271
|
+
ViewerMapView,
|
|
1272
|
+
{
|
|
1273
|
+
client: mapClient,
|
|
1274
|
+
interactive: false,
|
|
1275
|
+
maxTileCacheSize: MAX_TILE_CACHE_SIZE,
|
|
1276
|
+
onClientDestroy,
|
|
1277
|
+
onClientReady,
|
|
1278
|
+
preserveDrawingBuffer: true,
|
|
1279
|
+
transformRequest: tileTransform,
|
|
1280
|
+
video: buildVideoRun,
|
|
1281
|
+
withUrlHash: false
|
|
1282
|
+
}
|
|
1283
|
+
);
|
|
1284
|
+
};
|
|
1285
|
+
var PreviewSurface = ({
|
|
1286
|
+
client,
|
|
1287
|
+
mapClient,
|
|
1288
|
+
onClient,
|
|
1289
|
+
plan,
|
|
1290
|
+
transformRequest
|
|
1291
|
+
}) => {
|
|
1292
|
+
usePreviewPlanRefresh(client, plan);
|
|
1293
|
+
const profileEnabled = useUiStore((state) => state.videoExport?.profile?.enabled ?? false);
|
|
1294
|
+
return (
|
|
1295
|
+
// mantine:exempt (see previewFrameStyle): the box the MapLibre canvas mounts
|
|
1296
|
+
// into, sized 100% to fill the stage's aspect-true frame with a clipped, rounded
|
|
1297
|
+
// edge and to anchor the absolutely-positioned profile overlay.
|
|
1298
|
+
//
|
|
1299
|
+
// ph-no-capture keeps the whole frame out of session replay, and it is the map
|
|
1300
|
+
// canvas inside it that matters: the recorder drives that exact surface with a
|
|
1301
|
+
// frozen clock, per-frame repaint-and-idle gating, gl.readPixels, and a retry
|
|
1302
|
+
// loop whose failure test is "did this frame come back black". Sampling the same
|
|
1303
|
+
// canvas concurrently adds GPU-to-CPU sync stalls to a pipeline that reads a
|
|
1304
|
+
// stall as a bad frame, so an export is worth more here than a replay of one.
|
|
1305
|
+
/* @__PURE__ */ jsxs("div", { className: "ph-no-capture", style: previewFrameStyle, children: [
|
|
1306
|
+
/* @__PURE__ */ jsx(
|
|
1307
|
+
PreviewMap,
|
|
1308
|
+
{
|
|
1309
|
+
client,
|
|
1310
|
+
mapClient,
|
|
1311
|
+
onClient,
|
|
1312
|
+
plan,
|
|
1313
|
+
transformRequest
|
|
1314
|
+
}
|
|
1315
|
+
),
|
|
1316
|
+
profileEnabled ? /* @__PURE__ */ jsx(ProfileOverlayCanvas, {}) : null,
|
|
1317
|
+
/* @__PURE__ */ jsx(PreviewWatermark, {})
|
|
1318
|
+
] })
|
|
1319
|
+
);
|
|
1320
|
+
};
|
|
1321
|
+
var SECTIONS7 = ["publish", "video"];
|
|
1322
|
+
var stageBackdropStyle = {
|
|
1323
|
+
display: "flex",
|
|
1324
|
+
flexDirection: "column"
|
|
1325
|
+
};
|
|
1326
|
+
var frameBackdropStyle = {
|
|
1327
|
+
alignItems: "center",
|
|
1328
|
+
display: "flex",
|
|
1329
|
+
flex: 1,
|
|
1330
|
+
justifyContent: "center",
|
|
1331
|
+
minHeight: 0,
|
|
1332
|
+
overflow: "hidden"
|
|
1333
|
+
};
|
|
1334
|
+
var frameBaseStyle = {
|
|
1335
|
+
height: "100%",
|
|
1336
|
+
maxWidth: "100%",
|
|
1337
|
+
width: "auto"
|
|
1338
|
+
};
|
|
1339
|
+
var containedFrameSize = (outerWidth, outerHeight, ratio) => {
|
|
1340
|
+
const measurable = [outerWidth, outerHeight, ratio].every(
|
|
1341
|
+
(value) => Number.isFinite(value) && value > 0
|
|
1342
|
+
);
|
|
1343
|
+
if (!measurable) {
|
|
1344
|
+
return null;
|
|
1345
|
+
}
|
|
1346
|
+
if (outerWidth / outerHeight > ratio) {
|
|
1347
|
+
return { height: outerHeight, width: outerHeight * ratio };
|
|
1348
|
+
}
|
|
1349
|
+
const width = outerWidth;
|
|
1350
|
+
return { height: width / ratio, width };
|
|
1351
|
+
};
|
|
1352
|
+
var routeStateCoverStyle = {
|
|
1353
|
+
alignItems: "center",
|
|
1354
|
+
display: "flex",
|
|
1355
|
+
inset: 0,
|
|
1356
|
+
justifyContent: "center",
|
|
1357
|
+
pointerEvents: "none",
|
|
1358
|
+
position: "absolute"
|
|
1359
|
+
};
|
|
1360
|
+
var UnpublishedStage = ({
|
|
1361
|
+
itineraryId,
|
|
1362
|
+
organizationId
|
|
1363
|
+
}) => (
|
|
1364
|
+
// mantine:exempt (see stageBackdropStyle): the same column box the preview stage
|
|
1365
|
+
// occupies, so the rail beside it keeps its width and the panel centers in the room
|
|
1366
|
+
// the preview would have taken.
|
|
1367
|
+
/* @__PURE__ */ jsx(Box, { className: "mtya-preview-stage", miw: 0, pos: "relative", style: stageBackdropStyle, children: /* @__PURE__ */ jsx(UnpublishedPanel, { itineraryId, organizationId }) })
|
|
1368
|
+
);
|
|
1369
|
+
var PreviewStage = ({
|
|
1370
|
+
client,
|
|
1371
|
+
directing,
|
|
1372
|
+
indicator,
|
|
1373
|
+
mapClient,
|
|
1374
|
+
notice,
|
|
1375
|
+
onClient,
|
|
1376
|
+
plan,
|
|
1377
|
+
recording,
|
|
1378
|
+
routeState = "ready",
|
|
1379
|
+
transformRequest
|
|
1380
|
+
}) => {
|
|
1381
|
+
const words = useStudioScopedStrings(SECTIONS7);
|
|
1382
|
+
const ratio = aspectRatio(plan.output.aspect);
|
|
1383
|
+
const backdropRef = useRef(null);
|
|
1384
|
+
const [frameSize, setFrameSize] = useState(null);
|
|
1385
|
+
useLayoutEffect(() => {
|
|
1386
|
+
const backdrop = backdropRef.current;
|
|
1387
|
+
if (!backdrop) {
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
const measure = () => {
|
|
1391
|
+
const rect = backdrop.getBoundingClientRect();
|
|
1392
|
+
setFrameSize(containedFrameSize(rect.width, rect.height, ratio));
|
|
1393
|
+
};
|
|
1394
|
+
measure();
|
|
1395
|
+
if (typeof ResizeObserver === "undefined") {
|
|
1396
|
+
return;
|
|
1397
|
+
}
|
|
1398
|
+
const observer = new ResizeObserver(measure);
|
|
1399
|
+
observer.observe(backdrop);
|
|
1400
|
+
return () => observer.disconnect();
|
|
1401
|
+
}, [ratio]);
|
|
1402
|
+
const frameStyle = useMemo(
|
|
1403
|
+
() => frameSize ? { height: frameSize.height, width: frameSize.width } : { ...frameBaseStyle, aspectRatio: ratio },
|
|
1404
|
+
[frameSize, ratio]
|
|
1405
|
+
);
|
|
1406
|
+
return (
|
|
1407
|
+
// mantine:exempt (see stageBackdropStyle): the stage is a flex column, and Box takes
|
|
1408
|
+
// no prop for a direction. Its `pos` makes it the ancestor the directing indicator
|
|
1409
|
+
// Overlay fills: the whole stage, the aspect frame's backdrop and the transport bar,
|
|
1410
|
+
// so a single Stop dims the entire preview region.
|
|
1411
|
+
/* @__PURE__ */ jsxs(
|
|
1412
|
+
Box,
|
|
1413
|
+
{
|
|
1414
|
+
bg: "dark.8",
|
|
1415
|
+
className: "mtya-preview-stage",
|
|
1416
|
+
miw: 0,
|
|
1417
|
+
pos: "relative",
|
|
1418
|
+
style: stageBackdropStyle,
|
|
1419
|
+
children: [
|
|
1420
|
+
notice === void 0 ? null : /* @__PURE__ */ jsx(Box, { p: "xs", pb: 0, children: notice }),
|
|
1421
|
+
/* @__PURE__ */ jsxs(Box, { ref: backdropRef, style: frameBackdropStyle, children: [
|
|
1422
|
+
/* @__PURE__ */ jsx(Box, { "data-testid": "preview-frame", style: frameStyle, children: /* @__PURE__ */ jsx(
|
|
1423
|
+
PreviewSurface,
|
|
1424
|
+
{
|
|
1425
|
+
client,
|
|
1426
|
+
mapClient,
|
|
1427
|
+
onClient,
|
|
1428
|
+
plan,
|
|
1429
|
+
transformRequest
|
|
1430
|
+
}
|
|
1431
|
+
) }),
|
|
1432
|
+
routeState === "ready" ? null : /* @__PURE__ */ jsx(Stack, { align: "center", gap: "xs", style: routeStateCoverStyle, children: routeState === "loading" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1433
|
+
/* @__PURE__ */ jsx(Loader, { size: "sm" }),
|
|
1434
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "sm", children: words.video.preview.loading })
|
|
1435
|
+
] }) : (
|
|
1436
|
+
// An empty itinerary and a refused fetch both end the wait, and each
|
|
1437
|
+
// says which one it was: the cover must never be a spinner that cannot
|
|
1438
|
+
// resolve.
|
|
1439
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "sm", children: routeState === "error" ? words.video.preview.error : words.video.preview.empty })
|
|
1440
|
+
) })
|
|
1441
|
+
] }),
|
|
1442
|
+
/* @__PURE__ */ jsx(Box, { bg: "var(--mantine-color-body)", px: "md", py: "xs", children: /* @__PURE__ */ jsx(PreviewControls, { disabled: directing || recording || routeState !== "ready", plan }) }),
|
|
1443
|
+
indicator
|
|
1444
|
+
]
|
|
1445
|
+
}
|
|
1446
|
+
)
|
|
1447
|
+
);
|
|
1448
|
+
};
|
|
1449
|
+
var SECTIONS8 = ["preferences", "video"];
|
|
1450
|
+
var DESIGN_OPTIONS = [
|
|
1451
|
+
{
|
|
1452
|
+
glyph: "profile-graph",
|
|
1453
|
+
value: "graph"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
glyph: "profile-strip",
|
|
1457
|
+
value: "strip"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
glyph: "profile-minimal",
|
|
1461
|
+
value: "minimal"
|
|
1462
|
+
}
|
|
1463
|
+
];
|
|
1464
|
+
var LANGUAGE_OPTIONS = languageSchema.options.map((value) => ({ label: languageEndonym[value], value }));
|
|
1465
|
+
var ProfileStep = () => {
|
|
1466
|
+
const languageMark = useStudioLanguageMark();
|
|
1467
|
+
const words = useStudioScopedStrings(SECTIONS8);
|
|
1468
|
+
const headingId = useId();
|
|
1469
|
+
const units = useStudioScopedStrings(SECTIONS8).preferences.units;
|
|
1470
|
+
const { dispatch } = useStudioDispatch();
|
|
1471
|
+
const enabled = useUiStore((state) => state.videoExport?.profile?.enabled ?? false);
|
|
1472
|
+
const design = useUiStore((state) => state.videoExport?.profile?.design ?? "graph");
|
|
1473
|
+
const length = useUiStore((state) => state.videoExport?.profile?.length ?? "metric");
|
|
1474
|
+
const pace = useUiStore((state) => state.videoExport?.profile?.pace ?? "per-time");
|
|
1475
|
+
const slope = useUiStore((state) => state.videoExport?.profile?.slope ?? "degrees");
|
|
1476
|
+
const language = useUiStore((state) => state.videoExport?.profile?.language ?? "en");
|
|
1477
|
+
const onToggle = useCallback(
|
|
1478
|
+
(next) => {
|
|
1479
|
+
void dispatch("studio.video.profile.toggle", { enabled: next });
|
|
1480
|
+
},
|
|
1481
|
+
[dispatch]
|
|
1482
|
+
);
|
|
1483
|
+
const onDesignChange = useCallback(
|
|
1484
|
+
(value) => {
|
|
1485
|
+
void dispatch("studio.video.profile.design.set", {
|
|
1486
|
+
design: profileDesignSchema.parse(value)
|
|
1487
|
+
});
|
|
1488
|
+
},
|
|
1489
|
+
[dispatch]
|
|
1490
|
+
);
|
|
1491
|
+
const onLengthChange = useCallback(
|
|
1492
|
+
(value) => {
|
|
1493
|
+
void dispatch("studio.video.profile.units.set", {
|
|
1494
|
+
length: unitLengthSchema.parse(value),
|
|
1495
|
+
pace,
|
|
1496
|
+
slope
|
|
1497
|
+
});
|
|
1498
|
+
},
|
|
1499
|
+
[dispatch, pace, slope]
|
|
1500
|
+
);
|
|
1501
|
+
const onPaceChange = useCallback(
|
|
1502
|
+
(value) => {
|
|
1503
|
+
void dispatch("studio.video.profile.units.set", {
|
|
1504
|
+
length,
|
|
1505
|
+
pace: unitPaceSchema.parse(value),
|
|
1506
|
+
slope
|
|
1507
|
+
});
|
|
1508
|
+
},
|
|
1509
|
+
[dispatch, length, slope]
|
|
1510
|
+
);
|
|
1511
|
+
const onSlopeChange = useCallback(
|
|
1512
|
+
(value) => {
|
|
1513
|
+
void dispatch("studio.video.profile.units.set", {
|
|
1514
|
+
length,
|
|
1515
|
+
pace,
|
|
1516
|
+
slope: unitSlopeSchema.parse(value)
|
|
1517
|
+
});
|
|
1518
|
+
},
|
|
1519
|
+
[dispatch, length, pace]
|
|
1520
|
+
);
|
|
1521
|
+
const onLanguageChange = useCallback(
|
|
1522
|
+
(value) => {
|
|
1523
|
+
void dispatch("studio.video.profile.language.set", { language: value });
|
|
1524
|
+
},
|
|
1525
|
+
[dispatch]
|
|
1526
|
+
);
|
|
1527
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "lg", children: [
|
|
1528
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
1529
|
+
/* @__PURE__ */ jsx(
|
|
1530
|
+
Switch,
|
|
1531
|
+
{
|
|
1532
|
+
checked: enabled,
|
|
1533
|
+
label: words.video.profile.enable,
|
|
1534
|
+
onChange: (event) => onToggle(event.currentTarget.checked)
|
|
1535
|
+
}
|
|
1536
|
+
),
|
|
1537
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: words.video.profile.hint })
|
|
1538
|
+
] }),
|
|
1539
|
+
enabled ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1540
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
1541
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.video.profile.designLabel }),
|
|
1542
|
+
/* @__PURE__ */ jsx(
|
|
1543
|
+
Radio.Group,
|
|
1544
|
+
{
|
|
1545
|
+
"aria-label": words.video.profile.designLabel,
|
|
1546
|
+
onChange: onDesignChange,
|
|
1547
|
+
value: design,
|
|
1548
|
+
children: /* @__PURE__ */ jsx(Stack, { gap: "xs", children: DESIGN_OPTIONS.map((option) => /* @__PURE__ */ jsx(
|
|
1549
|
+
RadioOptionCard,
|
|
1550
|
+
{
|
|
1551
|
+
checked: option.value === design,
|
|
1552
|
+
description: words.video.profile.design[option.value].description,
|
|
1553
|
+
glyph: option.glyph,
|
|
1554
|
+
title: words.video.profile.design[option.value].title,
|
|
1555
|
+
value: option.value
|
|
1556
|
+
},
|
|
1557
|
+
option.value
|
|
1558
|
+
)) })
|
|
1559
|
+
}
|
|
1560
|
+
)
|
|
1561
|
+
] }),
|
|
1562
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
1563
|
+
/* @__PURE__ */ jsx(Text, { id: `${headingId}-length`, variant: "section-label", children: words.video.profile.lengthLabel }),
|
|
1564
|
+
/* @__PURE__ */ jsx(
|
|
1565
|
+
UnitPickerGrid,
|
|
1566
|
+
{
|
|
1567
|
+
"aria-labelledby": `${headingId}-length`,
|
|
1568
|
+
kindSlug: "video-length",
|
|
1569
|
+
onChange: onLengthChange,
|
|
1570
|
+
options: lengthUnitOptions(units),
|
|
1571
|
+
value: length
|
|
1572
|
+
}
|
|
1573
|
+
)
|
|
1574
|
+
] }),
|
|
1575
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
1576
|
+
/* @__PURE__ */ jsx(Text, { id: `${headingId}-pace`, variant: "section-label", children: words.video.profile.paceLabel }),
|
|
1577
|
+
/* @__PURE__ */ jsx(
|
|
1578
|
+
UnitPickerGrid,
|
|
1579
|
+
{
|
|
1580
|
+
"aria-labelledby": `${headingId}-pace`,
|
|
1581
|
+
kindSlug: "video-pace",
|
|
1582
|
+
onChange: onPaceChange,
|
|
1583
|
+
options: paceUnitOptions(units, length),
|
|
1584
|
+
value: pace
|
|
1585
|
+
}
|
|
1586
|
+
)
|
|
1587
|
+
] }),
|
|
1588
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
1589
|
+
/* @__PURE__ */ jsx(Text, { id: `${headingId}-slope`, variant: "section-label", children: words.video.profile.slopeLabel }),
|
|
1590
|
+
/* @__PURE__ */ jsx(
|
|
1591
|
+
UnitPickerGrid,
|
|
1592
|
+
{
|
|
1593
|
+
"aria-labelledby": `${headingId}-slope`,
|
|
1594
|
+
kindSlug: "video-slope",
|
|
1595
|
+
onChange: onSlopeChange,
|
|
1596
|
+
options: slopeUnitOptions(units),
|
|
1597
|
+
value: slope
|
|
1598
|
+
}
|
|
1599
|
+
)
|
|
1600
|
+
] }),
|
|
1601
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
1602
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.video.profile.languageLabel }),
|
|
1603
|
+
/* @__PURE__ */ jsx(
|
|
1604
|
+
LanguageSelect,
|
|
1605
|
+
{
|
|
1606
|
+
"aria-label": words.video.profile.languageLabel,
|
|
1607
|
+
onChange: onLanguageChange,
|
|
1608
|
+
options: LANGUAGE_OPTIONS,
|
|
1609
|
+
renderMark: languageMark,
|
|
1610
|
+
value: language
|
|
1611
|
+
}
|
|
1612
|
+
)
|
|
1613
|
+
] })
|
|
1614
|
+
] }) : null
|
|
1615
|
+
] });
|
|
1616
|
+
};
|
|
1617
|
+
var SECTIONS9 = ["video"];
|
|
1618
|
+
var RecordProgressBar = () => {
|
|
1619
|
+
const words = useStudioScopedStrings(SECTIONS9);
|
|
1620
|
+
const recording = useUiStore((state) => {
|
|
1621
|
+
const status = selectVideoExportStatus(state);
|
|
1622
|
+
return status?.kind === "recording" ? status : null;
|
|
1623
|
+
});
|
|
1624
|
+
if (!recording) {
|
|
1625
|
+
return null;
|
|
1626
|
+
}
|
|
1627
|
+
return /* @__PURE__ */ jsxs(Group, { align: "center", flex: 1, gap: "sm", role: "status", wrap: "nowrap", children: [
|
|
1628
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: words.video.record.phase[recording.phase] }),
|
|
1629
|
+
/* @__PURE__ */ jsx(Progress, { flex: 1, value: convertProportion(recording.fraction, "ratio", "percent") })
|
|
1630
|
+
] });
|
|
1631
|
+
};
|
|
1632
|
+
var RecordProgress = ({ outcome }) => {
|
|
1633
|
+
const words = useStudioScopedStrings(SECTIONS9);
|
|
1634
|
+
const { dispatch } = useStudioDispatch();
|
|
1635
|
+
const onDownload = useCallback(() => {
|
|
1636
|
+
void dispatch("studio.video.download", {});
|
|
1637
|
+
}, [dispatch]);
|
|
1638
|
+
if (outcome.kind === "error") {
|
|
1639
|
+
return /* @__PURE__ */ jsx(ErrorAlert, { title: words.video.record.errorTitle, children: outcome.message });
|
|
1640
|
+
}
|
|
1641
|
+
if (outcome.kind === "done") {
|
|
1642
|
+
return /* @__PURE__ */ jsx(
|
|
1643
|
+
Alert,
|
|
1644
|
+
{
|
|
1645
|
+
color: "teal",
|
|
1646
|
+
icon: /* @__PURE__ */ jsx(Glyph, { name: "success", size: iconSizes.md }),
|
|
1647
|
+
title: words.video.record.doneTitle,
|
|
1648
|
+
children: /* @__PURE__ */ jsxs(Stack, { align: "flex-start", gap: "xs", children: [
|
|
1649
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", children: words.video.record.done }),
|
|
1650
|
+
/* @__PURE__ */ jsx(Button, { leftSection: /* @__PURE__ */ jsx(Glyph, { name: "download", size: iconSizes.sm }), onClick: onDownload, children: words.video.record.download })
|
|
1651
|
+
] })
|
|
1652
|
+
}
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
return null;
|
|
1656
|
+
};
|
|
1657
|
+
var SECTIONS10 = ["preferences", "video"];
|
|
1658
|
+
var SummaryRow = ({ label, value }) => /* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
1659
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", children: label }),
|
|
1660
|
+
/* @__PURE__ */ jsx(Text, { children: value })
|
|
1661
|
+
] });
|
|
1662
|
+
var ReviewSection = ({ children, editLabel, onEdit, title }) => {
|
|
1663
|
+
const words = useStudioScopedStrings(SECTIONS10);
|
|
1664
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
1665
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
1666
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: title }),
|
|
1667
|
+
/* @__PURE__ */ jsx(Anchor, { "aria-label": editLabel, component: "button", onClick: onEdit, size: "xs", type: "button", children: words.video.review.edit })
|
|
1668
|
+
] }),
|
|
1669
|
+
children
|
|
1670
|
+
] });
|
|
1671
|
+
};
|
|
1672
|
+
var ReviewStep = ({ outcome, plan }) => {
|
|
1673
|
+
const words = useStudioScopedStrings(SECTIONS10);
|
|
1674
|
+
const { dispatch } = useStudioDispatch();
|
|
1675
|
+
const profile = useUiStore((state) => state.videoExport?.profile ?? defaultVideoExportProfile);
|
|
1676
|
+
const output = plan.output;
|
|
1677
|
+
const editStep = (step) => () => {
|
|
1678
|
+
void dispatch("studio.video.step.set", { step });
|
|
1679
|
+
};
|
|
1680
|
+
const bitrate = output.bitrateMbps ?? bitrateForOutput(output.resolution, output.fps, output.quality);
|
|
1681
|
+
const formatEntry = FORMAT_OPTIONS.find((option) => option.value === output.format);
|
|
1682
|
+
const containerLabel = formatEntry ? words.video.format.matrix[formatEntry.labelKey] : output.format;
|
|
1683
|
+
const qualityEntry = QUALITY_OPTIONS.find((option) => option.value === output.quality);
|
|
1684
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xl", children: [
|
|
1685
|
+
/* @__PURE__ */ jsxs(
|
|
1686
|
+
ReviewSection,
|
|
1687
|
+
{
|
|
1688
|
+
editLabel: words.video.review.editSection(words.video.review.sections.format),
|
|
1689
|
+
onEdit: editStep("format"),
|
|
1690
|
+
title: words.video.review.sections.format,
|
|
1691
|
+
children: [
|
|
1692
|
+
/* @__PURE__ */ jsx(
|
|
1693
|
+
SummaryRow,
|
|
1694
|
+
{
|
|
1695
|
+
label: words.video.review.preset,
|
|
1696
|
+
value: words.video.format.preset[output.preset].title
|
|
1697
|
+
}
|
|
1698
|
+
),
|
|
1699
|
+
/* @__PURE__ */ jsx(
|
|
1700
|
+
SummaryRow,
|
|
1701
|
+
{
|
|
1702
|
+
label: words.video.review.length,
|
|
1703
|
+
value: words.video.format.lengthSeconds(
|
|
1704
|
+
// The real file length: the chosen duration plus every hold the mode
|
|
1705
|
+
// (or the director) dwells on: what the preview and the export last.
|
|
1706
|
+
Math.round(planDurationMs(plan) / MILLISECONDS_PER_SECOND)
|
|
1707
|
+
)
|
|
1708
|
+
}
|
|
1709
|
+
),
|
|
1710
|
+
/* @__PURE__ */ jsx(SummaryRow, { label: words.video.format.matrix.aspectLabel, value: output.aspect }),
|
|
1711
|
+
/* @__PURE__ */ jsx(SummaryRow, { label: words.video.format.matrix.resolutionLabel, value: output.resolution }),
|
|
1712
|
+
/* @__PURE__ */ jsx(
|
|
1713
|
+
SummaryRow,
|
|
1714
|
+
{
|
|
1715
|
+
label: words.video.format.matrix.fpsLabel,
|
|
1716
|
+
value: words.video.review.fpsValue(output.fps)
|
|
1717
|
+
}
|
|
1718
|
+
),
|
|
1719
|
+
/* @__PURE__ */ jsx(SummaryRow, { label: words.video.format.matrix.formatLabel, value: containerLabel }),
|
|
1720
|
+
output.preset === "custom" && qualityEntry ? /* @__PURE__ */ jsx(
|
|
1721
|
+
SummaryRow,
|
|
1722
|
+
{
|
|
1723
|
+
label: words.video.format.matrix.qualityLabel,
|
|
1724
|
+
value: words.video.format.matrix[qualityEntry.labelKey]
|
|
1725
|
+
}
|
|
1726
|
+
) : null,
|
|
1727
|
+
/* @__PURE__ */ jsx(
|
|
1728
|
+
SummaryRow,
|
|
1729
|
+
{
|
|
1730
|
+
label: words.video.format.matrix.bitrateLabel,
|
|
1731
|
+
value: words.video.format.matrix.bitrateValue(bitrate)
|
|
1732
|
+
}
|
|
1733
|
+
),
|
|
1734
|
+
/* @__PURE__ */ jsx(
|
|
1735
|
+
SummaryRow,
|
|
1736
|
+
{
|
|
1737
|
+
label: words.video.review.estimatedSize,
|
|
1738
|
+
value: words.video.review.estimatedSizeValue(
|
|
1739
|
+
Math.round(estimatedVideoSizeMb(bitrate, planDurationMs(plan)))
|
|
1740
|
+
)
|
|
1741
|
+
}
|
|
1742
|
+
)
|
|
1743
|
+
]
|
|
1744
|
+
}
|
|
1745
|
+
),
|
|
1746
|
+
/* @__PURE__ */ jsxs(
|
|
1747
|
+
ReviewSection,
|
|
1748
|
+
{
|
|
1749
|
+
editLabel: words.video.review.editSection(words.video.review.sections.camera),
|
|
1750
|
+
onEdit: editStep("camera"),
|
|
1751
|
+
title: words.video.review.sections.camera,
|
|
1752
|
+
children: [
|
|
1753
|
+
/* @__PURE__ */ jsx(SummaryRow, { label: words.video.review.mode, value: words.video.mode[plan.mode].title }),
|
|
1754
|
+
plan.mode === "director" ? /* @__PURE__ */ jsx(
|
|
1755
|
+
SummaryRow,
|
|
1756
|
+
{
|
|
1757
|
+
label: words.video.review.shotsLabel,
|
|
1758
|
+
value: words.video.review.shots(plan.shots.length)
|
|
1759
|
+
}
|
|
1760
|
+
) : null
|
|
1761
|
+
]
|
|
1762
|
+
}
|
|
1763
|
+
),
|
|
1764
|
+
/* @__PURE__ */ jsxs(
|
|
1765
|
+
ReviewSection,
|
|
1766
|
+
{
|
|
1767
|
+
editLabel: words.video.review.editSection(words.video.review.sections.overlay),
|
|
1768
|
+
onEdit: editStep("profile"),
|
|
1769
|
+
title: words.video.review.sections.overlay,
|
|
1770
|
+
children: [
|
|
1771
|
+
/* @__PURE__ */ jsx(
|
|
1772
|
+
SummaryRow,
|
|
1773
|
+
{
|
|
1774
|
+
label: words.video.review.overlay,
|
|
1775
|
+
value: profile.enabled ? words.video.review.on : words.video.review.off
|
|
1776
|
+
}
|
|
1777
|
+
),
|
|
1778
|
+
profile.enabled ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1779
|
+
/* @__PURE__ */ jsx(
|
|
1780
|
+
SummaryRow,
|
|
1781
|
+
{
|
|
1782
|
+
label: words.video.profile.designLabel,
|
|
1783
|
+
value: words.video.profile.design[profile.design].title
|
|
1784
|
+
}
|
|
1785
|
+
),
|
|
1786
|
+
/* @__PURE__ */ jsx(
|
|
1787
|
+
SummaryRow,
|
|
1788
|
+
{
|
|
1789
|
+
label: words.video.profile.lengthLabel,
|
|
1790
|
+
value: words.preferences.units[profile.length].name
|
|
1791
|
+
}
|
|
1792
|
+
),
|
|
1793
|
+
/* @__PURE__ */ jsx(
|
|
1794
|
+
SummaryRow,
|
|
1795
|
+
{
|
|
1796
|
+
label: words.video.profile.slopeLabel,
|
|
1797
|
+
value: words.preferences.units[profile.slope].name
|
|
1798
|
+
}
|
|
1799
|
+
),
|
|
1800
|
+
/* @__PURE__ */ jsx(
|
|
1801
|
+
SummaryRow,
|
|
1802
|
+
{
|
|
1803
|
+
label: words.video.profile.languageLabel,
|
|
1804
|
+
value: languageEndonym[profile.language]
|
|
1805
|
+
}
|
|
1806
|
+
)
|
|
1807
|
+
] }) : null
|
|
1808
|
+
]
|
|
1809
|
+
}
|
|
1810
|
+
),
|
|
1811
|
+
/* @__PURE__ */ jsx(RecordProgress, { outcome })
|
|
1812
|
+
] });
|
|
1813
|
+
};
|
|
1814
|
+
var SECTIONS11 = ["director"];
|
|
1815
|
+
var WizardDirectingIndicator = () => {
|
|
1816
|
+
const words = useStudioScopedStrings(SECTIONS11);
|
|
1817
|
+
const { directing, stop } = useDirectorChat();
|
|
1818
|
+
const activeTool = useDirectorStore((store) => store.activeTool);
|
|
1819
|
+
if (!directing) {
|
|
1820
|
+
return null;
|
|
1821
|
+
}
|
|
1822
|
+
return (
|
|
1823
|
+
// The Overlay fills its nearest positioned ancestor (the preview stage is a
|
|
1824
|
+
// relative box wrapping the aspect frame + the transport), dimming the whole
|
|
1825
|
+
// preview. The color is left at the black default: the scrim wants neutral
|
|
1826
|
+
// dimming, not a theme hue, and the style guard forbids a hex shortcut.
|
|
1827
|
+
/* @__PURE__ */ jsx(Overlay, { backgroundOpacity: 0.35, blur: 1, center: true, children: /* @__PURE__ */ jsx(Paper, { p: "md", shadow: "md", withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1828
|
+
/* @__PURE__ */ jsx(Text, { fw: 500, children: words.director.directing }),
|
|
1829
|
+
/* @__PURE__ */ jsx(Text, { c: "dimmed", children: activeTool ?? words.director.activity }),
|
|
1830
|
+
/* @__PURE__ */ jsx(Group, { justify: "flex-end", children: /* @__PURE__ */ jsx(
|
|
1831
|
+
Button,
|
|
1832
|
+
{
|
|
1833
|
+
color: "red",
|
|
1834
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "action-stop", size: iconSizes.sm }),
|
|
1835
|
+
onClick: stop,
|
|
1836
|
+
variant: "light",
|
|
1837
|
+
children: words.director.stop
|
|
1838
|
+
}
|
|
1839
|
+
) })
|
|
1840
|
+
] }) }) })
|
|
1841
|
+
);
|
|
1842
|
+
};
|
|
1843
|
+
var SECTIONS12 = ["publish", "video"];
|
|
1844
|
+
var WizardFooter = ({
|
|
1845
|
+
activeIndex,
|
|
1846
|
+
directing,
|
|
1847
|
+
onBack,
|
|
1848
|
+
onNext,
|
|
1849
|
+
onRecord,
|
|
1850
|
+
recordDisabled,
|
|
1851
|
+
recording,
|
|
1852
|
+
stepCount
|
|
1853
|
+
}) => {
|
|
1854
|
+
const words = useStudioScopedStrings(SECTIONS12);
|
|
1855
|
+
const onReview = activeIndex === stepCount - 1;
|
|
1856
|
+
return /* @__PURE__ */ jsx(Box, { className: "mtya-fullscreen-footer", px: "md", py: "sm", children: /* @__PURE__ */ jsxs(Group, { justify: "space-between", wrap: "nowrap", children: [
|
|
1857
|
+
/* @__PURE__ */ jsx(
|
|
1858
|
+
Button,
|
|
1859
|
+
{
|
|
1860
|
+
disabled: activeIndex === 0 || directing || recording,
|
|
1861
|
+
onClick: onBack,
|
|
1862
|
+
variant: "default",
|
|
1863
|
+
children: words.video.footer.back
|
|
1864
|
+
}
|
|
1865
|
+
),
|
|
1866
|
+
onReview ? /* @__PURE__ */ jsx(RecordProgressBar, {}) : null,
|
|
1867
|
+
onReview ? recordDisabled ? /* @__PURE__ */ jsx(Tooltip, { label: words.publish.blockedByUnpublished, position: "top", withinPortal: true, children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Button, { disabled: true, leftSection: /* @__PURE__ */ jsx(Glyph, { name: "video", size: iconSizes.sm }), children: words.video.record.start }) }) }) : /* @__PURE__ */ jsx(
|
|
1868
|
+
Button,
|
|
1869
|
+
{
|
|
1870
|
+
disabled: directing,
|
|
1871
|
+
leftSection: /* @__PURE__ */ jsx(Glyph, { name: "video", size: iconSizes.sm }),
|
|
1872
|
+
loading: recording,
|
|
1873
|
+
onClick: onRecord,
|
|
1874
|
+
children: words.video.record.start
|
|
1875
|
+
}
|
|
1876
|
+
) : /* @__PURE__ */ jsx(Button, { disabled: directing, onClick: onNext, children: words.video.footer.next })
|
|
1877
|
+
] }) });
|
|
1878
|
+
};
|
|
1879
|
+
var SECTIONS13 = [
|
|
1880
|
+
"actions",
|
|
1881
|
+
"confirm",
|
|
1882
|
+
"copilot",
|
|
1883
|
+
"director",
|
|
1884
|
+
"failure",
|
|
1885
|
+
"itineraryActions",
|
|
1886
|
+
"preferences",
|
|
1887
|
+
"prompt",
|
|
1888
|
+
"publish",
|
|
1889
|
+
"video"
|
|
1890
|
+
];
|
|
1891
|
+
var stepGlyphs = {
|
|
1892
|
+
camera: "action-capture-view",
|
|
1893
|
+
format: "frame-widescreen",
|
|
1894
|
+
profile: "profile-graph",
|
|
1895
|
+
review: "check"
|
|
1896
|
+
};
|
|
1897
|
+
var VIDEO_WIZARD_CLASS = "mtya-video-wizard";
|
|
1898
|
+
var SEEK_STEP_FRACTION = 0.05;
|
|
1899
|
+
var INTERACTIVE_SELECTOR = "input, textarea, select, button, a, [contenteditable], [role='slider'], [role='menuitem']";
|
|
1900
|
+
var recordingStepStyle = { opacity: 0.5 };
|
|
1901
|
+
var MemoFormatStep = memo(FormatStep);
|
|
1902
|
+
var MemoCameraStep = memo(CameraStep);
|
|
1903
|
+
var MemoProfileStep = memo(ProfileStep);
|
|
1904
|
+
var MemoReviewStep = memo(ReviewStep);
|
|
1905
|
+
var idleOutcome = { kind: "idle" };
|
|
1906
|
+
var doneOutcome = { kind: "done" };
|
|
1907
|
+
var useRecordOutcome = () => {
|
|
1908
|
+
const words = useStudioScopedStrings(SECTIONS13);
|
|
1909
|
+
const { dispatch } = useStudioDispatch();
|
|
1910
|
+
const [outcome, setOutcome] = useState(idleOutcome);
|
|
1911
|
+
const plan = useUiStore(selectVideoExportPlan);
|
|
1912
|
+
const profile = useUiStore((state) => state.videoExport?.profile ?? null);
|
|
1913
|
+
const seenPlan = useRef(plan);
|
|
1914
|
+
const seenProfile = useRef(profile);
|
|
1915
|
+
useEffect(() => {
|
|
1916
|
+
if (seenPlan.current === plan && seenProfile.current === profile) {
|
|
1917
|
+
return;
|
|
1918
|
+
}
|
|
1919
|
+
seenPlan.current = plan;
|
|
1920
|
+
seenProfile.current = profile;
|
|
1921
|
+
setOutcome(idleOutcome);
|
|
1922
|
+
}, [plan, profile]);
|
|
1923
|
+
const onRecord = useCallback(() => {
|
|
1924
|
+
setOutcome(idleOutcome);
|
|
1925
|
+
void dispatch("studio.video.record", {}).then((result) => {
|
|
1926
|
+
if (result.ok) {
|
|
1927
|
+
setOutcome(doneOutcome);
|
|
1928
|
+
return;
|
|
1929
|
+
}
|
|
1930
|
+
const refusal = result.code === "canceled" ? null : failureAlertFor(result, words.video.record.error, words.failure);
|
|
1931
|
+
setOutcome(refusal === null ? idleOutcome : { kind: "error", message: refusal.message });
|
|
1932
|
+
});
|
|
1933
|
+
}, [dispatch, words]);
|
|
1934
|
+
return { onRecord, outcome };
|
|
1935
|
+
};
|
|
1936
|
+
var useWizardSteps = (step) => {
|
|
1937
|
+
const { dispatch } = useStudioDispatch();
|
|
1938
|
+
const activeIndex = VIDEO_STEP_ORDER.indexOf(step);
|
|
1939
|
+
const goToStep = useCallback(
|
|
1940
|
+
(next) => {
|
|
1941
|
+
void dispatch("studio.video.step.set", { step: next });
|
|
1942
|
+
},
|
|
1943
|
+
[dispatch]
|
|
1944
|
+
);
|
|
1945
|
+
const onBack = useCallback(() => {
|
|
1946
|
+
const previous = VIDEO_STEP_ORDER[activeIndex - 1];
|
|
1947
|
+
if (previous) {
|
|
1948
|
+
goToStep(previous);
|
|
1949
|
+
}
|
|
1950
|
+
}, [activeIndex, goToStep]);
|
|
1951
|
+
const onNext = useCallback(() => {
|
|
1952
|
+
const next = VIDEO_STEP_ORDER[activeIndex + 1];
|
|
1953
|
+
if (next) {
|
|
1954
|
+
goToStep(next);
|
|
1955
|
+
}
|
|
1956
|
+
}, [activeIndex, goToStep]);
|
|
1957
|
+
return { activeIndex, goToStep, onBack, onNext };
|
|
1958
|
+
};
|
|
1959
|
+
var usePreviewShortcuts = (inert) => {
|
|
1960
|
+
const { dispatch } = useStudioDispatch();
|
|
1961
|
+
const uiStore = useUiStoreApi();
|
|
1962
|
+
useWindowEvent("keydown", (event) => {
|
|
1963
|
+
if (inert) {
|
|
1964
|
+
return;
|
|
1965
|
+
}
|
|
1966
|
+
if (event.composedPath().some((node) => node instanceof Element && node.matches(INTERACTIVE_SELECTOR))) {
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1969
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) {
|
|
1970
|
+
return;
|
|
1971
|
+
}
|
|
1972
|
+
if (event.code === "Space") {
|
|
1973
|
+
event.preventDefault();
|
|
1974
|
+
const playing = uiStore.getState().videoExport?.status.kind === "previewing";
|
|
1975
|
+
void dispatch(playing ? "studio.video.preview.pause" : "studio.video.preview.play", {});
|
|
1976
|
+
return;
|
|
1977
|
+
}
|
|
1978
|
+
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
1979
|
+
event.preventDefault();
|
|
1980
|
+
const status = uiStore.getState().videoExport?.status;
|
|
1981
|
+
const fraction = status && status.kind !== "idle" ? status.fraction : 0;
|
|
1982
|
+
const delta = event.key === "ArrowLeft" ? -SEEK_STEP_FRACTION : SEEK_STEP_FRACTION;
|
|
1983
|
+
void dispatch("studio.video.preview.seek", {
|
|
1984
|
+
fraction: Math.min(1, Math.max(0, fraction + delta))
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1988
|
+
};
|
|
1989
|
+
var WizardShell = ({
|
|
1990
|
+
director,
|
|
1991
|
+
directing,
|
|
1992
|
+
indicator,
|
|
1993
|
+
itineraryId,
|
|
1994
|
+
mapClient,
|
|
1995
|
+
scrim,
|
|
1996
|
+
transformRequest
|
|
1997
|
+
}) => {
|
|
1998
|
+
const words = useStudioScopedStrings(SECTIONS13);
|
|
1999
|
+
const { dispatch } = useStudioDispatch();
|
|
2000
|
+
const stepsId = useId$1();
|
|
2001
|
+
const plan = useUiStore(selectVideoExportPlan);
|
|
2002
|
+
const route = useUiStore(selectVideoExportRoute);
|
|
2003
|
+
const step = useUiStore((state) => state.videoExport?.step ?? "format");
|
|
2004
|
+
const recording = useUiStore((state) => selectVideoExportStatus(state)?.kind === "recording");
|
|
2005
|
+
const itinerarySubject = useVideoItinerarySubject(itineraryId);
|
|
2006
|
+
const publication = useVideoPublication(itineraryId);
|
|
2007
|
+
const unpublished = publication === "unpublished";
|
|
2008
|
+
const organizationId = useVideoOrganizationId();
|
|
2009
|
+
const routeReady = useVideoRouteReady();
|
|
2010
|
+
const routeState = publication === "error" ? "error" : routeReady;
|
|
2011
|
+
const flyable = routeState === "ready";
|
|
2012
|
+
const [client, setClient] = useState(null);
|
|
2013
|
+
const { onRecord, outcome } = useRecordOutcome();
|
|
2014
|
+
const { activeIndex, goToStep, onBack, onNext } = useWizardSteps(step);
|
|
2015
|
+
usePreviewShortcuts(Boolean(directing) || recording || !flyable);
|
|
2016
|
+
const close = useCallback(() => {
|
|
2017
|
+
void dispatch("studio.video.close", {});
|
|
2018
|
+
}, [dispatch]);
|
|
2019
|
+
const held = Boolean(directing) || recording;
|
|
2020
|
+
const entries = useMemo(
|
|
2021
|
+
() => VIDEO_STEP_ORDER.map(
|
|
2022
|
+
(id) => ({
|
|
2023
|
+
disabled: held && id !== step,
|
|
2024
|
+
glyph: stepGlyphs[id],
|
|
2025
|
+
id,
|
|
2026
|
+
label: words.video.steps[id].label
|
|
2027
|
+
})
|
|
2028
|
+
),
|
|
2029
|
+
[held, step, words]
|
|
2030
|
+
);
|
|
2031
|
+
if (!plan) {
|
|
2032
|
+
return null;
|
|
2033
|
+
}
|
|
2034
|
+
const stepBody = {
|
|
2035
|
+
camera: /* @__PURE__ */ jsx(MemoCameraStep, { directing, director, plan, scrim }),
|
|
2036
|
+
format: /* @__PURE__ */ jsx(MemoFormatStep, { plan, route }),
|
|
2037
|
+
profile: /* @__PURE__ */ jsx(MemoProfileStep, {}),
|
|
2038
|
+
review: /* @__PURE__ */ jsx(MemoReviewStep, { outcome, plan })
|
|
2039
|
+
};
|
|
2040
|
+
return /* @__PURE__ */ jsx(FullscreenModal, { ariaLabel: words.video.title, onClose: close, children: /* @__PURE__ */ jsx(
|
|
2041
|
+
WizardLayout,
|
|
2042
|
+
{
|
|
2043
|
+
className: VIDEO_WIZARD_CLASS,
|
|
2044
|
+
footer: /* @__PURE__ */ jsx(
|
|
2045
|
+
WizardFooter,
|
|
2046
|
+
{
|
|
2047
|
+
activeIndex,
|
|
2048
|
+
directing,
|
|
2049
|
+
onBack,
|
|
2050
|
+
onNext,
|
|
2051
|
+
onRecord,
|
|
2052
|
+
recordDisabled: unpublished || !flyable,
|
|
2053
|
+
recording,
|
|
2054
|
+
stepCount: VIDEO_STEP_ORDER.length
|
|
2055
|
+
}
|
|
2056
|
+
),
|
|
2057
|
+
header: /* @__PURE__ */ jsx(
|
|
2058
|
+
FullscreenHeader,
|
|
2059
|
+
{
|
|
2060
|
+
closeLabel: words.actions.close,
|
|
2061
|
+
onClose: close,
|
|
2062
|
+
subject: itinerarySubject ? /* @__PURE__ */ jsx(DialogSubject, { ...itinerarySubject }) : void 0,
|
|
2063
|
+
title: words.video.title
|
|
2064
|
+
}
|
|
2065
|
+
),
|
|
2066
|
+
id: stepsId,
|
|
2067
|
+
onChange: goToStep,
|
|
2068
|
+
panel: VIDEO_STEP_ORDER.map((id) => (
|
|
2069
|
+
// Kept mounted, and hidden while another step is open, so a step's own state
|
|
2070
|
+
// survives a look at another.
|
|
2071
|
+
/* @__PURE__ */ jsx(Tabs.Panel, { keepMounted: true, value: id, children: /* @__PURE__ */ jsxs(Stack, { gap: "lg", inert: recording, style: recording ? recordingStepStyle : void 0, children: [
|
|
2072
|
+
/* @__PURE__ */ jsx(
|
|
2073
|
+
SectionHead,
|
|
2074
|
+
{
|
|
2075
|
+
description: words.video.steps[id].description,
|
|
2076
|
+
title: words.video.steps[id].label
|
|
2077
|
+
}
|
|
2078
|
+
),
|
|
2079
|
+
/* @__PURE__ */ jsx(Box, { children: stepBody[id] })
|
|
2080
|
+
] }) }, id)
|
|
2081
|
+
)),
|
|
2082
|
+
rail: /* @__PURE__ */ jsxs(Stack, { gap: "xxs", children: [
|
|
2083
|
+
/* @__PURE__ */ jsx(Text, { className: "mtya-studio-visible-from-md", px: "xxs", variant: "section-label", children: words.video.stepsHeading }),
|
|
2084
|
+
/* @__PURE__ */ jsx(
|
|
2085
|
+
SectionNav,
|
|
2086
|
+
{
|
|
2087
|
+
ariaLabel: words.video.stepsLabel,
|
|
2088
|
+
entries,
|
|
2089
|
+
id: stepsId,
|
|
2090
|
+
value: step
|
|
2091
|
+
}
|
|
2092
|
+
)
|
|
2093
|
+
] }),
|
|
2094
|
+
sections: VIDEO_STEP_ORDER,
|
|
2095
|
+
stageAriaLabel: words.video.preview.label,
|
|
2096
|
+
value: step,
|
|
2097
|
+
children: unpublished ? /* @__PURE__ */ jsx(UnpublishedStage, { itineraryId, organizationId }) : /* @__PURE__ */ jsx(
|
|
2098
|
+
PreviewStage,
|
|
2099
|
+
{
|
|
2100
|
+
client,
|
|
2101
|
+
directing,
|
|
2102
|
+
indicator,
|
|
2103
|
+
mapClient,
|
|
2104
|
+
notice: publication === "dirty" ? /* @__PURE__ */ jsx(
|
|
2105
|
+
PublicationNotice,
|
|
2106
|
+
{
|
|
2107
|
+
itineraryId,
|
|
2108
|
+
organizationId,
|
|
2109
|
+
state: "dirty"
|
|
2110
|
+
}
|
|
2111
|
+
) : void 0,
|
|
2112
|
+
onClient: setClient,
|
|
2113
|
+
plan,
|
|
2114
|
+
recording,
|
|
2115
|
+
routeState,
|
|
2116
|
+
transformRequest
|
|
2117
|
+
}
|
|
2118
|
+
)
|
|
2119
|
+
}
|
|
2120
|
+
) });
|
|
2121
|
+
};
|
|
2122
|
+
var DirectorRegion = ({ children }) => {
|
|
2123
|
+
const words = useStudioScopedStrings(SECTIONS13);
|
|
2124
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", mt: "lg", children: [
|
|
2125
|
+
/* @__PURE__ */ jsx(Text, { variant: "section-label", children: words.director.heading }),
|
|
2126
|
+
children
|
|
2127
|
+
] });
|
|
2128
|
+
};
|
|
2129
|
+
var DirectorSlot = () => {
|
|
2130
|
+
const organizationId = useVideoOrganizationId() ?? void 0;
|
|
2131
|
+
const availability = useCopilotAvailability(organizationId);
|
|
2132
|
+
const setupAction = useCopilotSetupAction(organizationId);
|
|
2133
|
+
if (organizationId === void 0 || availability.loading) {
|
|
2134
|
+
return /* @__PURE__ */ jsx(DirectorRegion, { children: /* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) });
|
|
2135
|
+
}
|
|
2136
|
+
if (!availability.writable) {
|
|
2137
|
+
return /* @__PURE__ */ jsx(DirectorRegion, { children: /* @__PURE__ */ jsx(CopilotNoAccessNotice, {}) });
|
|
2138
|
+
}
|
|
2139
|
+
return /* @__PURE__ */ jsx(DirectorRegion, { children: availability.notConfigured ? /* @__PURE__ */ jsx(CopilotSetupNotice, { action: setupAction }) : /* @__PURE__ */ jsx(DirectorChat, {}) });
|
|
2140
|
+
};
|
|
2141
|
+
var DirectedShell = ({
|
|
2142
|
+
itineraryId,
|
|
2143
|
+
mapClient,
|
|
2144
|
+
transformRequest
|
|
2145
|
+
}) => {
|
|
2146
|
+
const director = useDirectorChatSurface();
|
|
2147
|
+
return /* @__PURE__ */ jsx(
|
|
2148
|
+
WizardShell,
|
|
2149
|
+
{
|
|
2150
|
+
directing: director?.directing,
|
|
2151
|
+
director: director ? /* @__PURE__ */ jsx(DirectorSlot, {}) : void 0,
|
|
2152
|
+
indicator: director ? /* @__PURE__ */ jsx(WizardDirectingIndicator, {}) : void 0,
|
|
2153
|
+
itineraryId,
|
|
2154
|
+
mapClient,
|
|
2155
|
+
scrim: director ? /* @__PURE__ */ jsx(DirectingScrim, {}) : void 0,
|
|
2156
|
+
transformRequest
|
|
2157
|
+
}
|
|
2158
|
+
);
|
|
2159
|
+
};
|
|
2160
|
+
var PersonalItineraryNotice = () => {
|
|
2161
|
+
const words = useStudioScopedStrings(SECTIONS13);
|
|
2162
|
+
const { dispatch } = useStudioDispatch();
|
|
2163
|
+
const close = useCallback(() => {
|
|
2164
|
+
void dispatch("studio.video.close", {});
|
|
2165
|
+
}, [dispatch]);
|
|
2166
|
+
return /* @__PURE__ */ jsxs(FullscreenModal, { ariaLabel: words.video.title, onClose: close, children: [
|
|
2167
|
+
/* @__PURE__ */ jsx(
|
|
2168
|
+
FullscreenHeader,
|
|
2169
|
+
{
|
|
2170
|
+
closeLabel: words.actions.close,
|
|
2171
|
+
onClose: close,
|
|
2172
|
+
title: words.video.title
|
|
2173
|
+
}
|
|
2174
|
+
),
|
|
2175
|
+
/* @__PURE__ */ jsx(Center, { flex: 1, p: "xl", children: /* @__PURE__ */ jsx(Alert, { color: "gray", maw: 420, children: words.itineraryActions.exportAsVideoPersonalHint }) })
|
|
2176
|
+
] });
|
|
2177
|
+
};
|
|
2178
|
+
var VideoExportWizard = ({
|
|
2179
|
+
invalidateAiConfig,
|
|
2180
|
+
itineraryId,
|
|
2181
|
+
mapClient,
|
|
2182
|
+
recoveryAddendum,
|
|
2183
|
+
strings,
|
|
2184
|
+
transformRequest
|
|
2185
|
+
}) => {
|
|
2186
|
+
const ctx = useStudioToolContext();
|
|
2187
|
+
useVideoRouteSync();
|
|
2188
|
+
useVideoProfileSeed();
|
|
2189
|
+
const withOrgModes = useStudioEntitlement("video-organization-modes");
|
|
2190
|
+
const personal = useVideoOrganizationId() === null;
|
|
2191
|
+
return /* @__PURE__ */ jsx(StudioStringsScope, { sections: SECTIONS13, strings, children: /* @__PURE__ */ jsx(
|
|
2192
|
+
DirectorChatProvider,
|
|
2193
|
+
{
|
|
2194
|
+
ctx,
|
|
2195
|
+
enabled: withOrgModes && !personal,
|
|
2196
|
+
invalidateAiConfig,
|
|
2197
|
+
recoveryAddendum,
|
|
2198
|
+
children: personal ? /* @__PURE__ */ jsx(PersonalItineraryNotice, {}) : /* @__PURE__ */ jsx(
|
|
2199
|
+
DirectedShell,
|
|
2200
|
+
{
|
|
2201
|
+
itineraryId,
|
|
2202
|
+
mapClient,
|
|
2203
|
+
transformRequest
|
|
2204
|
+
}
|
|
2205
|
+
)
|
|
2206
|
+
}
|
|
2207
|
+
) });
|
|
2208
|
+
};
|
|
2209
|
+
|
|
2210
|
+
export { VideoExportWizard };
|
|
2211
|
+
//# sourceMappingURL=chunk-T27LICRD.js.map
|
|
2212
|
+
//# sourceMappingURL=chunk-T27LICRD.js.map
|