@volter/game-editor 0.5.130 → 0.5.131

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.
Files changed (296) hide show
  1. package/BUNDLED_NOTICES +22 -22
  2. package/catalog/entries/blender.json +2 -2
  3. package/catalog/entries/music.json +2 -2
  4. package/dist/.vite/manifest.json +2136 -2136
  5. package/dist/assets/{AssetBudgetPanel-qpkXbdeJ.js → AssetBudgetPanel-xh6RYB5z.js} +3 -3
  6. package/dist/assets/{AudioViewer-Diq9-n8F.js → AudioViewer-CGd4BxTl.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-CBDQEyVH.js → CanvasBoardDocument-BuMpc0A-.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-CoROtHru.js → CanvasSceneViewport-DMhu11L6.js} +1 -1
  9. package/dist/assets/{ColorInput-BibS1jDX.js → ColorInput-BRsj_y3k.js} +1 -1
  10. package/dist/assets/{ColorPicker-CjNV-7dt.js → ColorPicker-B6-MNUDk.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-D_yh_bF3.js → EntityModelDocument-BPNraRWs.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-C6oYSwMv.js → EnvironmentAssetDocument-rkElVVnV.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-BRSm8Se1.js → GameplaySessionTimeline-DBtAiEcP.js} +1 -1
  14. package/dist/assets/{ImageViewer-ni_DR2ux.js → ImageViewer-g2H7nQFG.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-D0fjTA2p.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-BFpOv6Ri.js → JsonAssetDocument-DPxzhzE5.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-BBM_u142.js → LiveModuleDocument-dtJEsKe6.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-DEm_pet8.js → LutAssetDocument-BdeqLBmd.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-CcJ0cdJN.js → ModelAssetDocument-DcmhvpMz.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-BI-2A7N2.js → NonThreeAuthoringBootstrap-DpCebDsm.js} +1 -1
  21. package/dist/assets/{Object3DDocumentToolbar-C64rqdsB.js → Object3DDocumentToolbar-3iQkN2n9.js} +1 -1
  22. package/dist/assets/Object3DDocumentViewport-B3uvK8Py.js +2 -0
  23. package/dist/assets/{Object3DPreview-CMaxxYtS.js → Object3DPreview-C7ZP4njx.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-C0dCrrVt.js → OnlineAssetDetail-CwYCSC1S.js} +1 -1
  25. package/dist/assets/{PlayBar-B80scEvv.js → PlayBar-DQt9hxF8.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-C3G0mGSZ.js → QuarksAssetDocument-B14F1jGm.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-abb1zGje.js → ReactCanvasControls-C2kGgPwR.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-Bl6dBNQj.js → RootSelectionOverlay-yz6-YlXy.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-BWHc9ibq.js → ShaderAssetDocument-CM2WthyM.js} +1 -1
  30. package/dist/assets/{ShadowEditor-B4LCKfSG.js → ShadowEditor-CLsIYscR.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-fVl0ydBm.js → SourceAssetViewer-CL378jDP.js} +1 -1
  32. package/dist/assets/{StageHost-B9vzNn1n.js → StageHost-DEb3AXsp.js} +2 -2
  33. package/dist/assets/{StoryPreviewMount-C_hNc2Ij.js → StoryPreviewMount-B0VNXCpC.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-YogDDOIp.js → ThreeBoardDocument-BpDQyPmr.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-D-a3pLt7.js → ThreeIsolationSceneContent-DYnvlzc-.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-D78iOtk5.js → ToolObject3DPreview-CvzAmxiI.js} +1 -1
  37. package/dist/assets/{Toolbar-BjG9vNYp.js → Toolbar-B8ter8wh.js} +1 -1
  38. package/dist/assets/{TransientHint-Cq50MQPL.js → TransientHint-CD8G5JQC.js} +1 -1
  39. package/dist/assets/{VideoViewer-DO_oytGm.js → VideoViewer-BFS_jlDX.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-BHMlqkhF.js → ViewportShadingMenu-Cls3jchz.js} +1 -1
  41. package/dist/assets/{active-ingest-rcBACBHB.js → active-ingest-ZriS4I_t.js} +2 -2
  42. package/dist/assets/{animation-clock-Da3NGt-0.js → animation-clock-Brfm38Ur.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-DxEKEOvF.js → animation-mixers.service-BuvR3YiA.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-fzyLKoSw.js → animation-timeline.utility-BQrDjQaJ.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-zQ4Geyg1.js → asset-budget-asset.menu-CIy2U9ES.js} +1 -1
  46. package/dist/assets/{asset-budget.action-eFkQrPAS.js → asset-budget.action-BfFcG_Pv.js} +1 -1
  47. package/dist/assets/{asset-budget.document-Ccfy3tCs.js → asset-budget.document-Lu6wPf4I.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-jB4_X00E.js → asset-budget.menu-OxhgEttz.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-5ujpmT9M.js → asset-editor-persistence-B9ZLULJL.js} +1 -1
  50. package/dist/assets/{asset-loaders-BsFdZ-U4.js → asset-loaders-CjZyIn2t.js} +1 -1
  51. package/dist/assets/{asset-preview-agZh9kpZ.js → asset-preview-vNs8rQu7.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-DYKj_NMi.js → audio-unlock.service-B31EGjEK.js} +1 -1
  53. package/dist/assets/{audio.utility-DEEsSpaF.js → audio.utility-CXnYeJsI.js} +1 -1
  54. package/dist/assets/autoplay.service-xWlK0aqA.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-aQi2udfG.js → babylon-authoring-adapter-DnkMqiIH.js} +1 -1
  56. package/dist/assets/{binding-resolver-Cri8YpQo.js → binding-resolver-Ox60gB2F.js} +2 -2
  57. package/dist/assets/{blender-node-editor.document-BILuLRoc.js → blender-node-editor.document-Nc1C1NOM.js} +1 -1
  58. package/dist/assets/{blender-properties-tab-jDIlTzUD.js → blender-properties-tab-YjJu6VN1.js} +1 -1
  59. package/dist/assets/blender-runtime-host-D52Z7WD1.js +7 -0
  60. package/dist/assets/{blender-runtime-skin-Ddxh2pae.js → blender-runtime-skin-Dp1EUYXH.js} +33 -33
  61. package/dist/assets/{blender-runtime.document-D2iaxi5d.js → blender-runtime.document-BeVkeGjy.js} +1 -1
  62. package/dist/assets/{blender-screenshot.menu-u9N-Zr7D.js → blender-screenshot.menu-C0-noWRV.js} +1 -1
  63. package/dist/assets/{blender-timeline.document-BbVO_s4M.js → blender-timeline.document-DaFb7ktE.js} +1 -1
  64. package/dist/assets/{blender-uv-editor.document-C8PGmvv1.js → blender-uv-editor.document-CPndwhaM.js} +1 -1
  65. package/dist/assets/{blender-version.status-B3y-afep.js → blender-version.status-CAoqefhE.js} +1 -1
  66. package/dist/assets/blender.command-wi-NF5xl.js +1 -0
  67. package/dist/assets/{board-guides-BUF6uS04.js → board-guides-CKUsHmXR.js} +1 -1
  68. package/dist/assets/{bridge.command-UFUOG3Tw.js → bridge.command-D_NM2Q0z.js} +3 -3
  69. package/dist/assets/{browserAll-Dk8jnjcz.js → browserAll-BHRzZ7xo.js} +1 -1
  70. package/dist/assets/{build-player.document-DsrMMUJY.js → build-player.document-DA8AYORo.js} +1 -1
  71. package/dist/assets/{build-profiles.document-B8CHMTfM.js → build-profiles.document-D5Rr_aiV.js} +1 -1
  72. package/dist/assets/{build-progress.status-BhNf_U67.js → build-progress.status-Dnow0Q18.js} +1 -1
  73. package/dist/assets/{build-session-B8DvP_BQ.js → build-session-BaS8m6z_.js} +1 -1
  74. package/dist/assets/{build.action-DYur0Wge.js → build.action-CQFo7UVP.js} +1 -1
  75. package/dist/assets/{build.command-FuDA5B6W.js → build.command-DoLbJQKk.js} +1 -1
  76. package/dist/assets/{build.header-DVZMW019.js → build.header-C85_8qIX.js} +1 -1
  77. package/dist/assets/{build.menu-CoxrvW_I.js → build.menu-B7R2-w0i.js} +1 -1
  78. package/dist/assets/{build.service-CHKzqCRC.js → build.service-gi06EZaN.js} +1 -1
  79. package/dist/assets/{camera-Cv9S-xWW.js → camera-DIOsZ5V4.js} +1 -1
  80. package/dist/assets/{camera-runtime.inspector-D1DkFeuo.js → camera-runtime.inspector-BjE2fAo3.js} +1 -1
  81. package/dist/assets/{canvas-design-mount-CKKc-YGA.js → canvas-design-mount-DxATml9D.js} +3 -3
  82. package/dist/assets/{canvas-entry-runtime-C2kFpUqh.js → canvas-entry-runtime-F_qiHxZA.js} +2 -2
  83. package/dist/assets/{canvas-preview-frames-BDmAulpd.js → canvas-preview-frames-D3X5XV18.js} +1 -1
  84. package/dist/assets/{canvas-story-capture.service-fMRSHzJi.js → canvas-story-capture.service-DX04l_Qz.js} +2 -2
  85. package/dist/assets/{capability-coverage-BAQeb1sR.js → capability-coverage-D7oFXsIG.js} +1 -1
  86. package/dist/assets/{collaboration-presence-CignJxHj.js → collaboration-presence-CNRCnlr0.js} +1 -1
  87. package/dist/assets/{collider-DxPzwFDz.js → collider-QUcqLUgt.js} +1 -1
  88. package/dist/assets/{component-board.service-DxUhkQVs.js → component-board.service-CGHWEUtH.js} +2 -2
  89. package/dist/assets/{component-board.service-7TS6vRxH.js → component-board.service-Co_RPB76.js} +2 -2
  90. package/dist/assets/{component-board.service-D4U4JVVU.js → component-board.service-Df1ef2HX.js} +2 -2
  91. package/dist/assets/{component-contracts.service-UxbsTME6.js → component-contracts.service-DTW5qurI.js} +1 -1
  92. package/dist/assets/{component-instance-root-CL5qzF6u.js → component-instance-root-mnaUEFAg.js} +1 -1
  93. package/dist/assets/{component-verbs.command-DgnKZO4N.js → component-verbs.command-q9IdgQWj.js} +1 -1
  94. package/dist/assets/{component-verbs.service-D3kg65sr.js → component-verbs.service-Dnes6VyR.js} +1 -1
  95. package/dist/assets/{config-Cn372ZzU.js → config-BN4Lmq46.js} +2 -2
  96. package/dist/assets/{configurations-CTWBhTUf.js → configurations-DY2IiXpV.js} +1 -1
  97. package/dist/assets/{connection.status-wwxZQEAF.js → connection.status-D7I2dgv0.js} +1 -1
  98. package/dist/assets/{constraints.inspector-Di21JmyY.js → constraints.inspector-DAUjo3AH.js} +1 -1
  99. package/dist/assets/{content-bounds-wsarq3YV.js → content-bounds-D4k7pAaW.js} +1 -1
  100. package/dist/assets/{contract-system-adapters-B9apGOMQ.js → contract-system-adapters-BprRTe1B.js} +1 -1
  101. package/dist/assets/{coverage.service-_67ez0oy.js → coverage.service-BpYDL-1r.js} +1 -1
  102. package/dist/assets/{create-runtime-BbrWG3Dj.js → create-runtime-BGvJJko5.js} +1 -1
  103. package/dist/assets/{curve-DrdLYZPA.js → curve-VlX4I35S.js} +1 -1
  104. package/dist/assets/{data-asset-cZrqcPJc.js → data-asset-Dhn0-GTH.js} +1 -1
  105. package/dist/assets/{data-ref-XaI-aDOy.js → data-ref-VzHXG1c6.js} +1 -1
  106. package/dist/assets/{debug-bridge-CMNdajyG.js → debug-bridge-Z2gRt8Zc.js} +1 -1
  107. package/dist/assets/{debug-registry-DpJjXPu6.js → debug-registry-BkyhbW5o.js} +1 -1
  108. package/dist/assets/{deferred-ingest-play-B8zw5TXo.js → deferred-ingest-play-DaWGKxqL.js} +2 -2
  109. package/dist/assets/{design-time-canvas-mount-BWzhB7m2.js → design-time-canvas-mount--OqF2WkK.js} +2 -2
  110. package/dist/assets/{design-time-layers-MmuAEkk7.js → design-time-layers-ClmhMEAZ.js} +1 -1
  111. package/dist/assets/{design-time-mount.service-B6lQd1pk.js → design-time-mount.service-Dfu_ei5E.js} +2 -2
  112. package/dist/assets/{design-time-mount.service-DO5qbjP2.js → design-time-mount.service-HNdgYB2u.js} +2 -2
  113. package/dist/assets/{design-time-react-mount-Cco4ZPxC.js → design-time-react-mount-CE9REYmk.js} +1 -1
  114. package/dist/assets/{document-preview-three-6-rt0s3D.js → document-preview-three-BjLceB54.js} +1 -1
  115. package/dist/assets/{dom-authoring-adapter-DJME07nM.js → dom-authoring-adapter-2DC91mxf.js} +1 -1
  116. package/dist/assets/{draco3d-CxbStChw.js → draco3d-DIIaAJ6n.js} +1 -1
  117. package/dist/assets/{edit-mode-audio.service-Ct7Ldnuk.js → edit-mode-audio.service-2vi4I17L.js} +1 -1
  118. package/dist/assets/{edit-mode-authoring-D-2Ik7C9.js → edit-mode-authoring-BPsFGjzM.js} +1 -1
  119. package/dist/assets/{edit-mode-networking.service-BjDXGMHA.js → edit-mode-networking.service-Xz4iej7J.js} +1 -1
  120. package/dist/assets/{editor-api-DqL1Yaly.js → editor-api-BxHqt4Xt.js} +1 -1
  121. package/dist/assets/{editor-layers-DVuMw5f5.js → editor-layers-DmUg5T3_.js} +1 -1
  122. package/dist/assets/{editor-shell-store-CNt2zW0E.js → editor-shell-store-DPpSNDy1.js} +1 -1
  123. package/dist/assets/{entity-object-B_x2FCUW.js → entity-object-D_Xp6Gb3.js} +1 -1
  124. package/dist/assets/{extend-DM6br_Di.js → extend-hvT5slS9.js} +1 -1
  125. package/dist/assets/{fork-menu-Bl2ZuYie.js → fork-menu-DguGrW0h.js} +1 -1
  126. package/dist/assets/{frame-debugger-store-DYLys9S-.js → frame-debugger-store-DFC83QOT.js} +1 -1
  127. package/dist/assets/{game-contract-seams-B-7gb13c.js → game-contract-seams-gtbmw2C5.js} +1 -1
  128. package/dist/assets/{game-css-scope-transform-CNsIQ45a.js → game-css-scope-transform-D8WuwFPz.js} +1 -1
  129. package/dist/assets/{game-document.service-DQfrwN2I.js → game-document.service-15rgKKaG.js} +1 -1
  130. package/dist/assets/{game-eval.command-BqS_SLDG.js → game-eval.command-yJBOJP3U.js} +1 -1
  131. package/dist/assets/{game-module-access-Dr_jlctk.js → game-module-access-Ce87kvq0.js} +1 -1
  132. package/dist/assets/{game-network-CAMgSePs.js → game-network-JCyWQ_Z7.js} +3 -3
  133. package/dist/assets/{gameplay-export-CkUZ90s2.js → gameplay-export-CRgCGRmp.js} +1 -1
  134. package/dist/assets/{gameplay-replay-D9vOE3M2.js → gameplay-replay-BDCki9XM.js} +1 -1
  135. package/dist/assets/{gameplay.command-BdwYqSMB.js → gameplay.command-DGkj6-7b.js} +1 -1
  136. package/dist/assets/{generation-jobs-CDn7Ao6l.js → generation-jobs-CeDZdMpJ.js} +1 -1
  137. package/dist/assets/{generation.service-C8JvO6Ll.js → generation.service-CcyUj9tv.js} +1 -1
  138. package/dist/assets/{generations-BON32S2-.js → generations-DXSmdpTV.js} +1 -1
  139. package/dist/assets/{generations.status-mal_FOwh.js → generations.status-DnZmkvkf.js} +1 -1
  140. package/dist/assets/{hierarchy-marks-DDtpJ7PB.js → hierarchy-marks-D2716vL4.js} +1 -1
  141. package/dist/assets/{hosted-asset-materialization-DfkPbrUm.js → hosted-asset-materialization-CPAT5jBN.js} +1 -1
  142. package/dist/assets/{index-BXWC4w5R.js → index-BcKb2YwA.js} +2 -2
  143. package/dist/assets/{index-ihc3rASN.js → index-BdTSTs-f.js} +1 -1
  144. package/dist/assets/{index-SbBinYIF.js → index-BwKzWHt8.js} +1 -1
  145. package/dist/assets/{index-Y_P7AYV1.js → index-C67kVNvR.js} +1 -1
  146. package/dist/assets/{index-DK92FabE.js → index-CJaJOM8e.js} +1 -1
  147. package/dist/assets/{index-BszEW86b.js → index-Cl0YIFAW.js} +1 -1
  148. package/dist/assets/{index-DmNeCiAo.js → index-D-G1ZsCu.js} +7 -7
  149. package/dist/assets/{index-DAwnllXr.js → index-DhjCepUi.js} +1 -1
  150. package/dist/assets/{index-DNf8O3O1.js → index-yqhgogAt.js} +1 -1
  151. package/dist/assets/{inference-diagnostics-BCK7lzd-.js → inference-diagnostics-zGUPGK9h.js} +1 -1
  152. package/dist/assets/{ingest-boot-viewport-BSLuPz4r.js → ingest-boot-viewport-DIg0c-U7.js} +1 -1
  153. package/dist/assets/{ingest-siblings-CE2dKDAS.js → ingest-siblings-CGrE4H95.js} +1 -1
  154. package/dist/assets/{ingest-source-persistence-DXXd6X4G.js → ingest-source-persistence-BQO1KGrh.js} +1 -1
  155. package/dist/assets/{ingest.service-QPs7WiGX.js → ingest.service-BnFMUzdM.js} +1 -1
  156. package/dist/assets/{inspect-DA_mHIRo.js → inspect-DH57N9OW.js} +1 -1
  157. package/dist/assets/instances.command-RcLpbQDx.js +1 -0
  158. package/dist/assets/{json-history-resource-CZUrVLZF.js → json-history-resource-CqxeO7Gw.js} +1 -1
  159. package/dist/assets/{layered-pick-D-zS343_.js → layered-pick-DcU2SccC.js} +1 -1
  160. package/dist/assets/{light-BbgMtsRn.js → light-wrMW5sx4.js} +1 -1
  161. package/dist/assets/{live-project-verbs-CUKegag9.js → live-project-verbs-tgkB8w44.js} +1 -1
  162. package/dist/assets/{machine.document-DvN6BWU1.js → machine.document-Bb0luUXi.js} +1 -1
  163. package/dist/assets/{machines.finder-DT0HVk3x.js → machines.finder-DYtkwdqr.js} +1 -1
  164. package/dist/assets/{material-BnXxYmBZ.js → material-BXufoiSx.js} +1 -1
  165. package/dist/assets/{material-factory-D6TA-Ubu.js → material-factory-IKt-e70d.js} +1 -1
  166. package/dist/assets/{mesh-Cutx-5di.js → mesh-DADcxLdw.js} +1 -1
  167. package/dist/assets/{model-asset-sections.service-BRu2seCr.js → model-asset-sections.service-DZSSiLGM.js} +1 -1
  168. package/dist/assets/{model-inspection-BUTTeTpS.js → model-inspection-C2s3OYXl.js} +1 -1
  169. package/dist/assets/{model-thumbnail-BtcSrAMa.js → model-thumbnail-D5o-4B01.js} +1 -1
  170. package/dist/assets/{models.finder-SXNTijTt.js → models.finder-B95VsZ65.js} +1 -1
  171. package/dist/assets/{module-mode-Cnao3XAv.js → module-mode-CxLLk1w7.js} +2 -2
  172. package/dist/assets/{mount-canvas-ingest-root-BSPwlKi0.js → mount-canvas-ingest-root-CcURJlfy.js} +2 -2
  173. package/dist/assets/{mount-dom-ingest-root-Bju1wKWY.js → mount-dom-ingest-root-vFLT2G7J.js} +2 -2
  174. package/dist/assets/{mount-ingest-root-Cfb_hJuM.js → mount-ingest-root-BXXdHb3k.js} +2 -2
  175. package/dist/assets/{mount-manifest-C9v48bKT.js → mount-manifest-CFPSbrdR.js} +1 -1
  176. package/dist/assets/{mount-three-ingest-root-DV2IXb3k.js → mount-three-ingest-root-C7EvPLpq.js} +1 -1
  177. package/dist/assets/{mounted-authoring-xyBh_twE.js → mounted-authoring-JufMUAA7.js} +1 -1
  178. package/dist/assets/{mounted-story-viewport-source-hP2r14tz.js → mounted-story-viewport-source-CuAqEjCt.js} +1 -1
  179. package/dist/assets/{native-debug-module-a57esQxg.js → native-debug-module-D0JJ27BY.js} +1 -1
  180. package/dist/assets/{navigation-XoA70Bj5.js → navigation-D-RA7j4R.js} +1 -1
  181. package/dist/assets/{navmesh.menu-DYnmqbCJ.js → navmesh.menu-XArlggki.js} +1 -1
  182. package/dist/assets/{navmesh.service-BzHkiDfO.js → navmesh.service-CEqTZDij.js} +1 -1
  183. package/dist/assets/network-observer.service-D8qesWFc.js +1 -0
  184. package/dist/assets/{network.utility-DdSrG_G1.js → network.utility-HDe8PnKF.js} +1 -1
  185. package/dist/assets/{object3d-document-session-registry-jcgiK59f.js → object3d-document-session-registry-D704QLST.js} +2 -2
  186. package/dist/assets/{oid-transform--cph2k55.js → oid-transform-DnXrIY9C.js} +1 -1
  187. package/dist/assets/{particles-J5SjiKkG.js → particles-BFZUclym.js} +1 -1
  188. package/dist/assets/{pixi-authoring-adapter-BG8416OJ.js → pixi-authoring-adapter-Ben-hgbd.js} +1 -1
  189. package/dist/assets/{pixi-live-write-target-Ck9xhI_J.js → pixi-live-write-target-tWUq0M3X.js} +1 -1
  190. package/dist/assets/{play.command-C9QrjBqH.js → play.command-D2SoCCf3.js} +2 -2
  191. package/dist/assets/{presentation-CMWW6oC4.js → presentation-CZFcFjRY.js} +1 -1
  192. package/dist/assets/{product-CtuevsUE.js → product-CEzZzRzZ.js} +1 -1
  193. package/dist/assets/{profiler.action-CKL52CX8.js → profiler.action-DYnp-dIl.js} +1 -1
  194. package/dist/assets/{profiler.menu-Bx7sdJpH.js → profiler.menu-CB7AUXAU.js} +1 -1
  195. package/dist/assets/{profiler.utility-B9jMd0tG.js → profiler.utility-CPFc55To.js} +1 -1
  196. package/dist/assets/{project-authoring-session-Pa9mXNuZ.js → project-authoring-session-DrT2qJF0.js} +2 -2
  197. package/dist/assets/{properties-bone-constraints.inspector-b8cTlTwC.js → properties-bone-constraints.inspector-CfRTvy5p.js} +1 -1
  198. package/dist/assets/{properties-bone.inspector-BnLBufG0.js → properties-bone.inspector-54MKrR72.js} +1 -1
  199. package/dist/assets/{properties-collection.inspector-DBNlp_6i.js → properties-collection.inspector-O6LuSXOQ.js} +1 -1
  200. package/dist/assets/{properties-constraints.inspector-NloiUa9x.js → properties-constraints.inspector-DffyXZKu.js} +1 -1
  201. package/dist/assets/{properties-data.inspector-C59o5Llj.js → properties-data.inspector-DXaxMz2Y.js} +1 -1
  202. package/dist/assets/{properties-material.inspector-p8mh6kCW.js → properties-material.inspector-Cho8xdBI.js} +1 -1
  203. package/dist/assets/{properties-modifiers.inspector-fcqS8WO7.js → properties-modifiers.inspector-CpbbR4Om.js} +1 -1
  204. package/dist/assets/{properties-object.inspector-lil6UPt8.js → properties-object.inspector-4h6NxwoN.js} +1 -1
  205. package/dist/assets/{properties-output.inspector-DsF-nKdF.js → properties-output.inspector-DTRZDajI.js} +1 -1
  206. package/dist/assets/{properties-particles.inspector-q2Di84s0.js → properties-particles.inspector-BHMjkBKc.js} +1 -1
  207. package/dist/assets/{properties-physics.inspector-CNclwGwq.js → properties-physics.inspector-ghuF-m6r.js} +1 -1
  208. package/dist/assets/{properties-render.inspector-B9ZUvK6B.js → properties-render.inspector-Dfn5HEKA.js} +1 -1
  209. package/dist/assets/{properties-scene.inspector-cJWNTiko.js → properties-scene.inspector-CwBfzPo2.js} +1 -1
  210. package/dist/assets/{properties-texture.inspector-CWCdZSdQ.js → properties-texture.inspector-BMthDuQl.js} +1 -1
  211. package/dist/assets/{properties-view-layer.inspector-BHD2twq2.js → properties-view-layer.inspector-Chf8fDV5.js} +1 -1
  212. package/dist/assets/{properties-world.inspector-CMlj3XLq.js → properties-world.inspector-CBayv6ge.js} +1 -1
  213. package/dist/assets/{r3f-design-session-BeAS5PQl.js → r3f-design-session-CDJXwu2Y.js} +2 -2
  214. package/dist/assets/{r3f-physics-binding-t3rKYjMV.js → r3f-physics-binding-1iL3sKy9.js} +1 -1
  215. package/dist/assets/{r3f-source-authoring-adapter-sFxW7pRe.js → r3f-source-authoring-adapter-CLuLuxlA.js} +1 -1
  216. package/dist/assets/{react-canvas-navigation-D2r0gF5Q.js → react-canvas-navigation-CcSJcL6p.js} +1 -1
  217. package/dist/assets/{react-inspector.service-C1XIPYH0.js → react-inspector.service-XcygzXLc.js} +1 -1
  218. package/dist/assets/{react-story-board-2WEWRKNQ.js → react-story-board-CDFp2Cct.js} +1 -1
  219. package/dist/assets/{react-three-rapier.esm-B2uhShq_.js → react-three-rapier.esm-CxC2iZi1.js} +1 -1
  220. package/dist/assets/{react-world-authoring-adapter-BLNUCSeK.js → react-world-authoring-adapter-DEywdLYs.js} +1 -1
  221. package/dist/assets/{realm-services-CcfZc_W9.js → realm-services-beTbtAPk.js} +1 -1
  222. package/dist/assets/{reflection-probe-capture.inspector-BEGRAIcz.js → reflection-probe-capture.inspector-CT9GR2Qo.js} +1 -1
  223. package/dist/assets/{registry-C_pAsb1l.js → registry-vCBeP859.js} +1 -1
  224. package/dist/assets/{relative-import-specifier-D1iFwXli.js → relative-import-specifier-Bjlxchbq.js} +1 -1
  225. package/dist/assets/{render-env-CbXpOb9g.js → render-env-DayDp_Zd.js} +1 -1
  226. package/dist/assets/{render-features-DpJX9WCp.js → render-features-DBROmwn2.js} +1 -1
  227. package/dist/assets/{render-settings-DYlzijyk.js → render-settings-B0XqOFGb.js} +1 -1
  228. package/dist/assets/{resolve-three-Bp7EZT4O.js → resolve-three-DnH-tIDh.js} +3 -3
  229. package/dist/assets/{root-seam-contract-Cvxfcfmv.js → root-seam-contract-DLYN34u3.js} +1 -1
  230. package/dist/assets/{run-selection-BDbgDokC.js → run-selection-Dx1BGfLg.js} +1 -1
  231. package/dist/assets/{scene-capture-CGCpkmz_.js → scene-capture-1PoVj5hA.js} +1 -1
  232. package/dist/assets/{scene-document.service-BTOhPREd.js → scene-document.service-65WoShrF.js} +2 -2
  233. package/dist/assets/{scene-framing-B4Ynn1mk.js → scene-framing-4WatuvlF.js} +1 -1
  234. package/dist/assets/{seeded-random-wICYLJg6.js → seeded-random-fLlojV69.js} +1 -1
  235. package/dist/assets/{setup-renderer-BjhvKXG4.js → setup-renderer-so5gtgSO.js} +1 -1
  236. package/dist/assets/{source-object3d-authoring-adapter-CIEoS6Tj.js → source-object3d-authoring-adapter-ChS2o1Xx.js} +1 -1
  237. package/dist/assets/{source-persistence-backend-jB_B_qgt.js → source-persistence-backend-CkyQpGrG.js} +1 -1
  238. package/dist/assets/{stage-keyboard-3K38-Hw6.js → stage-keyboard-CU4X2l3G.js} +1 -1
  239. package/dist/assets/{stage-overlay-set-i7XlbOA8.js → stage-overlay-set-ODG73EVe.js} +1 -1
  240. package/dist/assets/{stage-presence-markers-CJ49-XME.js → stage-presence-markers-C9wbwDQm.js} +1 -1
  241. package/dist/assets/{stage-transform-tools-Bf_p8cJg.js → stage-transform-tools-fEMi3oOg.js} +1 -1
  242. package/dist/assets/{standard-viewport-dressing-8SWhTXK3.js → standard-viewport-dressing-Dk02sQp6.js} +1 -1
  243. package/dist/assets/{state-watch.action-DCsgcteq.js → state-watch.action-BjK2g-lO.js} +1 -1
  244. package/dist/assets/{state-watch.menu-BK7FGgVR.js → state-watch.menu-C_QVBV0s.js} +1 -1
  245. package/dist/assets/{state-watch.utility-B37tKCea.js → state-watch.utility-C7fzB-_q.js} +1 -1
  246. package/dist/assets/{story-capture-OjR2l-KU.js → story-capture-BnEt16UU.js} +1 -1
  247. package/dist/assets/{story-documents-Cwlnx5Xe.js → story-documents-B2G2lPjd.js} +1 -1
  248. package/dist/assets/{story-documents.service-DHuiVSJw.js → story-documents.service-8P8kl4Ql.js} +1 -1
  249. package/dist/assets/{story-documents.service-vNaYun8n.js → story-documents.service-DQFxdJmm.js} +1 -1
  250. package/dist/assets/{story-media-presence-629BeHAI.js → story-media-presence-kmZ-iwzZ.js} +1 -1
  251. package/dist/assets/{story-pixi-preview-B1mcJckV.js → story-pixi-preview-CtR3hhsS.js} +1 -1
  252. package/dist/assets/{story-presentation-Cv7oyJg2.js → story-presentation-BAVcRFqV.js} +1 -1
  253. package/dist/assets/{story-three-preview-CsLEpAYI.js → story-three-preview-D_gLQCac.js} +2 -2
  254. package/dist/assets/{studio-environment-DsQ4K1L8.js → studio-environment-WsKE4UBz.js} +1 -1
  255. package/dist/assets/{surface-state-DUClAKxh.js → surface-state-ByLry0WZ.js} +1 -1
  256. package/dist/assets/{syntactic-prop-specs-Bf8S-Hpl.js → syntactic-prop-specs-CwYOcdaw.js} +1 -1
  257. package/dist/assets/{team-playtest.service-8sDrJf5C.js → team-playtest.service-4LEw3aP4.js} +1 -1
  258. package/dist/assets/{three-Cgvnp1Nn.js → three-7K4VDgM2.js} +1 -1
  259. package/dist/assets/{three-authoring-adapter-DZ8eqcFP.js → three-authoring-adapter-C0tYXQIE.js} +1 -1
  260. package/dist/assets/three-authoring.service-BEtgEHMU.js +2 -0
  261. package/dist/assets/{three-ingest-runtime-CYWRwidS.js → three-ingest-runtime-DxkUEyMI.js} +1 -1
  262. package/dist/assets/{three-integration-DSN-gO72.js → three-integration-D9IUaLET.js} +2 -2
  263. package/dist/assets/three-integration.service-B-qYVbhZ.js +1 -0
  264. package/dist/assets/{three-projection-core-CSr5hmWB.js → three-projection-core-B2MqU5b7.js} +1 -1
  265. package/dist/assets/{three-state-BIe7PFbc.js → three-state-B8zvveUf.js} +1 -1
  266. package/dist/assets/{three-story-capture.service-gGvamise.js → three-story-capture.service-WoTH2p9_.js} +2 -2
  267. package/dist/assets/{three-story-model-CgIBLb2f.js → three-story-model-5YWSi42m.js} +1 -1
  268. package/dist/assets/{three-viewport-presentation-CEu9ox1U.js → three-viewport-presentation-BGKjVpHe.js} +1 -1
  269. package/dist/assets/{transform-mode-request-8EAetSXS.js → transform-mode-request-C58tmPGV.js} +1 -1
  270. package/dist/assets/{transport-strip-anvfvigR.js → transport-strip-B12CdJs_.js} +1 -1
  271. package/dist/assets/transport.header-CAZGRLxQ.js +1 -0
  272. package/dist/assets/{tuples-BOY_uUhw.js → tuples-fjpPndGz.js} +1 -1
  273. package/dist/assets/{ui-board-document-Bgdx8jTV.js → ui-board-document-CJbv1DAz.js} +2 -2
  274. package/dist/assets/{user-data-DvKLhMGu.js → user-data-DsFa4aua.js} +1 -1
  275. package/dist/assets/{utility-view-state-DHpqflFO.js → utility-view-state-DyaFLM90.js} +1 -1
  276. package/dist/assets/{viewport-door-CVX7GCz1.js → viewport-door-BMMTgy0S.js} +1 -1
  277. package/dist/assets/{viewport-root-presentation-m2H6uV6U.js → viewport-root-presentation-D9R2VFTh.js} +1 -1
  278. package/dist/assets/{viewport-surface-status-DKyxV0Lz.js → viewport-surface-status-D-2SRXNb.js} +1 -1
  279. package/dist/assets/{webworkerAll-B7PoBHDQ.js → webworkerAll-B7uFCDja.js} +1 -1
  280. package/dist/assets/{workspace-arrangement-Dinn7b-i.js → workspace-arrangement-CRcz3K9e.js} +1 -1
  281. package/dist/assets/{world-documents-BL7VdFaK.js → world-documents-B4omJ1Jx.js} +1 -1
  282. package/dist/assets/{world-root-stage-binding-DXzosgL9.js → world-root-stage-binding-KrsZeZnq.js} +1 -1
  283. package/dist/assets/{xstate-animation-binding-BAPmVeqO.js → xstate-animation-binding-DvxI3pM9.js} +1 -1
  284. package/dist/assets/{xstate-animation-meta-RUH2Lum3.js → xstate-animation-meta-IEXUsrpt.js} +1 -1
  285. package/dist-node/cli.js +16 -16
  286. package/package.json +16 -16
  287. package/dist/assets/InspectorObjectPreview-5l23L20j.js +0 -1
  288. package/dist/assets/Object3DDocumentViewport-ClruThDB.js +0 -2
  289. package/dist/assets/autoplay.service-CKlnZKMd.js +0 -1
  290. package/dist/assets/blender-runtime-host-C9hWsbh6.js +0 -7
  291. package/dist/assets/blender.command-C-n6jjz6.js +0 -1
  292. package/dist/assets/instances.command-C-vOAn13.js +0 -1
  293. package/dist/assets/network-observer.service-C75jUX8T.js +0 -1
  294. package/dist/assets/three-authoring.service-FA9fRV2t.js +0 -2
  295. package/dist/assets/three-integration.service--eR0_MqR.js +0 -1
  296. package/dist/assets/transport.header-CpOG4bUd.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/document-preview-three-6-rt0s3D.js","assets/content-bounds-wsarq3YV.js","assets/hierarchy-marks-DDtpJ7PB.js","assets/workspace-arrangement-Dinn7b-i.js","assets/index-DmNeCiAo.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/three.core-3arARmh6.js","assets/editor-layers-DVuMw5f5.js","assets/renderer-ownership-BovSEcLv.js","assets/three.module-BLhyNg0e.js","assets/scene-framing-B4Ynn1mk.js","assets/environment-Dg-YaLsA.js","assets/RoomEnvironment-BkknvS_I.js","assets/EXRLoader-CITMBvGd.js","assets/HDRLoader-BTGuGhVo.js","assets/standard-viewport-dressing-8SWhTXK3.js","assets/user-data-DvKLhMGu.js"])))=>i.map(i=>d[i]);
2
- import{hg as O,hh as dt,au as Q,aw as Kt,bi as zt,fV as It,bj as Vt,fW as St,av as tt,hi as Ht,al as g,eM as Zt,dT as Xt,hj as Wt,f5 as Ut,fg as X,dK as Yt,as as Mt,hk as qt,fn as Jt,gF as mt,eO as Qt,b9 as te,at as W,cC as Et,_ as A,hl as ee,hm as ne,Z as oe,hn as Z,ho as re,dv as se}from"./index-DmNeCiAo.js";import{a as m}from"./jsx-runtime-DPjLkJKQ.js";import{a as ie}from"./three-contract-Dkt6PmWY.js";import{a as ae}from"./object3d-document-session-registry-jcgiK59f.js";import{O as ce}from"./Object3DDocumentViewport-ClruThDB.js";import{S as ue}from"./standard-viewport-dressing-8SWhTXK3.js";import{t as le}from"./viewport-surface-status-DKyxV0Lz.js";import{r as w}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{withStoryMountTurn as vt,lastStoryMountPhaseTiming as de}from"./story-three-preview-CsLEpAYI.js";import{m as me}from"./three-story-model-CgIBLb2f.js";import{c as pe}from"./content-bounds-wsarq3YV.js";import{EDITOR_LAYER as he}from"./editor-layers-DVuMw5f5.js";import{setUserData as fe}from"./user-data-CODoGZqA.js";import{bh as R,co as Dt,K as xe,cx as ge,db as ye,cp as be,aI as we,N as Se,a$ as Me,c0 as Ee,b_ as ve,el as De,I as _e,fo as P,ex as Oe,cj as Pe}from"./three.core-3arARmh6.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./environment-Dg-YaLsA.js";import"./three.module-BLhyNg0e.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./user-data-DvKLhMGu.js";import"./workspace-arrangement-Dinn7b-i.js";import"./asset-preview-agZh9kpZ.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-DDtpJ7PB.js";import"./studio-environment-DsQ4K1L8.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./bitmap-label-Ct4k6ehY.js";import"./crash-null-boundary-v3a0uEgw.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./index-DzuOGwVB.js";import"./story-mount-turn-DFRTj5hi.js";import"./object-marks-BnvSuCTt.js";const L={neighbourGapFactor:.45,minGap:.5,districtGapFactor:.6,minDistrictGap:3},$=.7,Te={min:[0,0,0],max:[0,0,0]};function et(t){return[...t.min,...t.max].some(r=>!Number.isFinite(r))?Te:{min:[Math.min(t.min[0],t.max[0]),Math.min(t.min[1],t.max[1]),Math.min(t.min[2],t.max[2])],max:[Math.max(t.min[0],t.max[0]),Math.max(t.min[1],t.max[1]),Math.max(t.min[2],t.max[2])]}}function nt(t){return[t.max[0]-t.min[0],t.max[1]-t.min[1],t.max[2]-t.min[2]]}function pt(t){const e=nt(et(t));return e[0]*e[2]}function ke(t){return-et(t).min[1]}function _t(t){const e=Math.max(t[0],t[2]),r=Math.max(.15,.1*e);return[Math.max(t[0]+2*r,$),Math.max(t[2]+2*r,$)]}function Ot(t){return Math.max(t[0],t[1])}function Be(t){return t.map(e=>({item:e,bounds:et(e.bounds)})).sort((e,r)=>{const n=pt(e.bounds)-pt(r.bounds);return n!==0?n:e.item.id<r.item.id?-1:1})}function Re(t){const e=Math.max($,...t.map(({bounds:r})=>Ot(_t(nt(r)))));return Math.max(10,2.2*e)}function je(t,e,r){const n=Re(t),s=[];let o={slots:[],xEdge:0,depth:0,previousSpan:null};const i=()=>{o.slots.length>0&&s.push({slots:o.slots,xEdge:o.xEdge,depth:o.depth}),o={slots:[],xEdge:0,depth:0,previousSpan:null}};for(const{item:a,bounds:u}of t){const c=nt(u),l=_t(c),d=Ot(l),p=o.previousSpan===null?0:Math.max(r,e*Math.max(o.previousSpan,d));o.slots.length>0&&o.xEdge+p+l[0]>n&&i();const y=o.previousSpan===null?0:p,b=o.xEdge+y+l[0]/2;o.xEdge=b+l[0]/2,o.depth=Math.max(o.depth,l[1]),o.previousSpan=d,o.slots.push({item:a,bounds:u,size:c,footprint:l,centreX:b})}return i(),s}function ht(t,e,r,n,s){const o=je(e,n,s),i=[];let a=r,u=null,c=0;for(const l of o){u!==null&&(a+=Math.max(s,n*Math.max(u,l.depth)));const d=a+l.depth/2;a=d+l.depth/2,u=l.depth,c=Math.max(c,l.xEdge);for(const p of l.slots)i.push({id:p.item.id,groupKey:t,translation:[p.centreX-(p.bounds.min[0]+p.bounds.max[0])/2,ke(p.bounds),d-(p.bounds.min[2]+p.bounds.max[2])/2],anchor:[p.centreX,0,d],size:p.size,footprint:p.footprint})}return{placements:i,xEdge:c,depth:a-r}}function Ce(t){return Math.min(3,Math.max(.6,.08*t))}function Ne(t,e={}){const r=e.neighbourGapFactor??L.neighbourGapFactor,n=e.minGap??L.minGap,s=e.districtGapFactor??L.districtGapFactor,o=e.minDistrictGap??L.minDistrictGap,i=new Map;for(const d of t){const p=i.get(d.groupKey);p?p.push(d):i.set(d.groupKey,[d])}const a=[];let u=0,c=null;for(const d of i.keys()){const p=Be(i.get(d)??[]),y=ht(d,p,0,r,n),b=Ce(Math.max(y.depth,$)),x=y.depth+2*b;c!==null&&(u+=Math.max(o,s*Math.max(c,x)));const h=u;u=h+x,c=x;const{placements:v,xEdge:V}=ht(d,p,h+b,r,n),_={minX:-b,maxX:V+b,minZ:h,maxZ:h+x};a.push({groupKey:d,items:v,extent:_,anchor:[(_.minX+_.maxX)/2,0,_.minZ]})}const l=a.length===0?{minX:0,maxX:0,minZ:0,maxZ:0}:{minX:Math.min(...a.map(d=>d.extent.minX)),maxX:Math.max(...a.map(d=>d.extent.maxX)),minZ:Math.min(...a.map(d=>d.extent.minZ)),maxZ:Math.max(...a.map(d=>d.extent.maxZ))};return{districts:a,extent:l}}const Pt={min:[0,0,0],max:[0,0,0]},Ae=.35,ft=20;function ot(t){return[...t.min,...t.max].every(e=>Number.isFinite(e))}function z(t){return ot(t)?{min:[Math.min(t.min[0],t.max[0]),Math.min(t.min[1],t.max[1]),Math.min(t.min[2],t.max[2])],max:[Math.max(t.min[0],t.max[0]),Math.max(t.min[1],t.max[1]),Math.max(t.min[2],t.max[2])]}:Pt}function Tt(t){const e=z(t);return[e.max[0]-e.min[0],e.max[1]-e.min[1],e.max[2]-e.min[2]]}function K(t){const e=t.map(z).filter(o=>ot(o));if(e.length===0)return Pt;const r=e[0],n=[r.min[0],r.min[1],r.min[2]],s=[r.max[0],r.max[1],r.max[2]];for(let o=1;o<e.length;o++){const i=e[o];n[0]=Math.min(n[0],i.min[0]),n[1]=Math.min(n[1],i.min[1]),n[2]=Math.min(n[2],i.min[2]),s[0]=Math.max(s[0],i.max[0]),s[1]=Math.max(s[1],i.max[1]),s[2]=Math.max(s[2],i.max[2])}return{min:n,max:s}}function U(t,e){const r=z(t);return{min:[r.min[0]+e[0],r.min[1]+e[1],r.min[2]+e[2]],max:[r.max[0]+e[0],r.max[1]+e[1],r.max[2]+e[2]]}}function Le(t){return"min"in t?{bounds:t}:{bounds:t.bounds,...t.overlay===!0?{overlay:!0}:{},...t.enclosure===!0?{enclosure:!0}:{}}}function Ge(t,e={}){if(e.overlay)return"volume";if(e.enclosure)return"environment-scale";const n=[...Tt(t)].sort((a,u)=>u-a),s=n[0]??0,o=n[1]??0;return(n[2]??0)<Ae&&o>=ft&&s>=ft?"unbounded-plane":null}function Fe(t){const e=t.map(Le).map(a=>({bounds:z(a.bounds),overlay:a.overlay===!0,enclosure:a.enclosure===!0})).filter(a=>ot(a.bounds)),r=e.map(a=>a.bounds),n=K(r);if(e.length<2)return{full:n,presence:n,helpers:[]};const s=e.map(a=>Ge(a.bounds,{overlay:a.overlay,enclosure:a.enclosure})),o=e.filter((a,u)=>s[u]===null).map(a=>a.bounds);if(o.length===0)return{full:n,presence:n,helpers:[]};const i=[];for(let a=0;a<e.length;a++){const u=s[a]??null;u!==null&&i.push({kind:u,bounds:e[a].bounds,size:Tt(e[a].bounds)})}return{full:n,presence:K(o),helpers:i}}function $e(t){const e=t.map(u=>({exhibit:u,presence:Fe(u.nodes)})),r=e.map(({exhibit:u,presence:c})=>({id:u.id,groupKey:u.groupKey,bounds:c.presence})),n=Ne(r),s=new Map;for(const u of n.districts)for(const c of u.items)s.set(c.id,c);const o=[],i=[],a=[];for(const{exhibit:u,presence:c}of e){const l=s.get(u.id);l&&(o.push({id:u.id,groupKey:u.groupKey,full:c.full,presence:c.presence,helpers:c.helpers,placement:l}),i.push(U(c.presence,l.translation)),a.push(U(c.full,l.translation)))}return{layout:n,exhibits:o,frame:K(i),fullFrame:K(a)}}const kt="volterBoardStoryId",Bt="volterBoardComponentKey",I="volter:board:no-story";function Ke(t){return{stories:t.length,modules:new Set(t.map(e=>e.modulePath)).size}}const Y="Ungrouped",xt="No story yet",ze=.9;function Ie(t){return t instanceof Error?t.message:String(t)}async function Ve(t,e,r){const n=Date.now();let s=null,o=null;try{s=await r(e),me(s.root)||(s.dispose(),s=null,o="The story mounted no three content.")}catch(a){o=Ie(a)}const i=de();return Ht({id:t.id,ms:Date.now()-n,runtimeMs:i?.runtimeMs??0,loadMs:i?.loadMs??0,fiberMs:i?.fiberMs??0,settleMs:i?.settleMs??0,ok:s!==null}),{identity:t,mounted:s,reason:o}}function Rt(t){t.traverse(e=>{e.layers.enable(he),fe(e,"editorHelper",!0)})}const He={color:3291977,roughness:.92,metalness:.04,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:2},gt=.06,Ze=0,yt=0,Xe=11124182,We=9413565;function Ue(t){const e=t.extent.maxX-t.extent.minX,r=t.extent.maxZ-t.extent.minZ,n=new Dt(new xe(e,gt,r),new ge(He));return n.name=`volter:board-pad:${t.groupKey||Y}`,n.position.set((t.extent.minX+t.extent.maxX)/2,Ze-gt/2,(t.extent.minZ+t.extent.maxZ)/2),n.receiveShadow=!0,Rt(n),n}function Ye(t,e){const r=t/2,n=e/2,s=[[-r,-n],[r,-n],[r,n],[-r,n]],o=[];for(let u=0;u<s.length;u++){const c=s[u],l=s[(u+1)%s.length];o.push(c[0],0,c[1],l[0],0,l[1])}const i=new Se;i.setAttribute("position",new Me(o,3));const a=new Ee(i,new ve({color:Xe,dashSize:.09,gapSize:.06}));return a.computeLineDistances(),a}function qe(t){const e=new R;e.name=`volter:board-ghost:${t.name}`,e.userData[Bt]=t.key;const[r,n]=t.placement.footprint,s=new Dt(new ye(r,n),new be({color:We,transparent:!0,opacity:.1,depthWrite:!1,side:we}));s.rotation.x=-Math.PI/2,s.position.y=yt;const o=Ye(r,n);return o.position.y=yt,e.add(s,o),e.position.set(t.placement.anchor[0],0,t.placement.anchor[2]),e}function Je(t,e,r){if(!r.componentName)return!0;const n=St(t,r.componentName,e);return!n||n.modulePath===e&&n.name===r.name}function Qe(t){return jt(t).length}function jt(t){const e=[],r=new Map,n=tt();for(const s of t)if(s.ok)for(const o of s.stories){const i=Q({modulePath:s.modulePath,regions:n});if(i.medium!=="three"){i.via==="undeclared"&&Kt(s.modulePath,i.reason);continue}if(!Je(t,s.modulePath,o))continue;const a=zt({modulePath:s.modulePath,...o.title===void 0?{}:{title:o.title}}),u=It(a),c=`${u}/${a.leaf}`;r.set(c,(r.get(c)??0)+1),e.push({identity:{id:`${s.modulePath}#${o.name}`,storyName:o.name,modulePath:s.modulePath,groupKey:u,groupLeaf:a.leaf,groupPath:Vt(a)},storyLabel:o.label,Component:o.Component})}return e.map(({identity:s,storyLabel:o,Component:i})=>({identity:{...s,label:(r.get(`${s.groupKey}/${s.groupLeaf}`)??0)>1?`${s.groupLeaf} · ${o}`:s.groupLeaf},Component:i}))}function tn(t,e){const r=new Set,n=[];for(const s of e){if(s.surface!=="three"||s.contentKind==="image")continue;const o=`${s.path}#${s.name}`;r.has(o)||(r.add(o),!St(t,s.name,s.path)&&n.push(s))}return n}function en(t,e,r){const n=new R;return n.name=`volter:board-exhibit:${t.label}`,n.position.set(...e.translation),n.add(r.root),n.userData[kt]=t.id,n}function q(t){return vt(async()=>{t.dispose()})}async function Ct(t,e=[],r){return vt(n=>an(t,e,r,n))}async function nn(t,e,r){const n=[];for(const{identity:s,Component:o}of t){if(e?.aborted)break;n.push(await Ve(s,o,r))}return n}function on(t){return{min:t.min.toArray(),max:t.max.toArray()}}function rn(t){const e=new Map,r=new Map,n=[],s=[];for(const o of t){if(!o.mounted){s.push({id:o.identity.id,modulePath:o.identity.modulePath,storyName:o.identity.storyName,reason:o.reason??"The story produced no Object3D."});continue}const i=pe(o.mounted.root).map(a=>({bounds:on(a.box),overlay:a.overlay,enclosure:a.enclosure}));e.set(o.identity.id,o.mounted),r.set(o.identity.id,o.identity),n.push({id:o.identity.id,groupKey:o.identity.groupKey,nodes:i})}return{mounts:e,identities:r,measures:n,skipped:s}}function sn(t){const e=ze/2;return{id:`${t.path}#${t.name}`,groupKey:I,nodes:[{min:[-e,0,-e],max:[e,0,e]}]}}async function an(t,e,r,n){const s=Date.now(),o=jt(t);O("candidate-collect",Date.now()-s),dt({candidateCount:o.length});const i=Date.now(),a=await nn(o,r,n);O("story-mounts",Date.now()-i);const u=Date.now(),{mounts:c,identities:l,measures:d,skipped:p}=rn(a);O("bounds",Date.now()-u);const y=Date.now(),b=tn(t,e),x=new Map(b.map(f=>[`${f.path}#${f.name}`,f])),h=$e([...d,...b.map(sn)]),v=h.layout,V=new Map(h.exhibits.map(f=>[f.id,f]));O("layout",Date.now()-y);const _=Date.now(),T=new R;T.name="volter:three-board";const k=new R;k.name="volter:board-chrome",Rt(k),T.add(k);const j=[],rt=[],st=[],it=[k];for(const f of v.districts){const M=f.groupKey===I,D=new R;D.name=`volter:board-district:${M?xt:f.groupKey||Y}`,T.add(D),k.add(Ue(f));for(const S of f.items){if(M){const N=x.get(S.id);if(!N)continue;const ut={key:S.id,name:N.name,path:N.path,line:N.line,placement:S},lt=qe(ut);D.add(lt),it.push(lt),st.push(ut);continue}const C=c.get(S.id),H=l.get(S.id),E=V.get(S.id);!C||!H||!E||(D.add(en(H,S,C)),j.push({...H,placement:S,fullSize:[E.full.max[0]-E.full.min[0],E.full.max[1]-E.full.min[1],E.full.max[2]-E.full.min[2]],helpers:E.helpers}))}rt.push({groupKey:f.groupKey,label:M?xt:f.groupKey||Y,placement:f})}const $t=j.flatMap(f=>f.helpers.map(M=>({exhibitId:f.id,exhibitLabel:f.label,kind:M.kind,size:M.size})));let at=!1;const ct={root:T,exhibits:j,districts:rt,ghostSlots:st,skipped:p,frameBounds:h.frame,openingFrameBounds:h.exhibits[0]?U(h.exhibits[0].presence,h.exhibits[0].placement.translation):h.frame,helperVolumes:$t,dispose(){if(!at){at=!0;for(const f of it)f.traverse(M=>{const D=M;D.geometry?.dispose();const S=D.material;if(Array.isArray(S))for(const C of S)C.dispose();else S?.dispose()}),f.removeFromParent();for(const f of c.values())try{f.dispose()}catch(M){console.error("[three-board] a story mount failed to dispose.",M)}c.clear(),T.clear()}}};if(O("assemble",Date.now()-_),dt({exhibitCount:j.length,skippedCount:p.length}),r?.aborted)throw ct.dispose(),new Error("The 3D board build was superseded by a newer one.");return ct}function cn(t){return Nt(t,kt)}function un(t){return Nt(t,Bt)}function Nt(t,e){let r=t;for(;r;){const n=r.userData[e];if(typeof n=="string")return n;r=r.parent}return null}const At="3D";let F=null,Lt=0;const J=new Set;function bt(){Lt++;for(const t of J)t()}function ln(t){return J.add(t),()=>{J.delete(t)}}function dn(){return Lt}function Gt(t){return Number.isFinite(t)?t>=10?`${Math.round(t)} m`:t>=1?`${t.toFixed(1)} m`:`${t.toFixed(2)} m`:"—"}function mn(t,e,r){const n=Ft(e,r);return n?qt(Jt,t,{modulePath:n.modulePath,storyName:n.storyName,title:n.label}):null}function pn(t,e,r){const n=Mn(t,e);if(!n)return null;const s={definitionLocation:()=>({file:n.path,line:n.line})};return r?mt(s,n.key,"definition",r):mt(s,n.key,"definition")}function hn(t){const e=tt(),r=t.filter(o=>o.ok&&Q({modulePath:o.modulePath,regions:e}).medium==="three"),n=w.useRef([]),s=n.current;return(s.length!==r.length||s.some((o,i)=>o!==r[i]))&&(n.current=r),n.current}function fn({documentId:t,active:e,store:r}){const n=w.useSyncExternalStore(Mt,W),s=hn(n),[o,i]=w.useState({status:"idle"});e&&ee(t);const[a,u]=w.useState(e);w.useEffect(()=>{e&&u(!0)},[e]),w.useEffect(()=>{if(!a)return;const p=new AbortController;let y=null;i({status:"building"}),ne(t,{modulesAlreadyLoaded:s.length>0});const b=Date.now();return Et().then(x=>{const h=Date.now()-b;return O("component-index",h,{busyMs:0,waitMs:h}),x.ok||oe.warn(`Component index unavailable, so this board shows no ghost slots: ${x.reason}`,"three-board"),Ct(s,x.ok?x.entries:[],p.signal)}).then(x=>{if(p.signal.aborted){Z(t),q(x);return}y=x,F=x,bt(),re(),i({status:"ready",scene:x})},x=>{if(p.signal.aborted){Z(t);return}i({status:"error",message:x instanceof Error?x.message:String(x)})}),()=>{p.abort(),y?(F===y&&(F=null),q(y),bt()):Z(t)}},[s,a,t]);const c=o.status==="ready"?o.scene:null,l=w.useCallback(()=>{if(!c)throw new Error("The 3D board is still building.");return{root:c.root,dispose(){}}},[c]),d=w.useCallback(p=>{if(mn(r,c,p)!==null)return;const y=pn(c,p);y&&y.then(se)},[c,r]);return m.jsx("div",{style:{position:"relative",flex:1,minHeight:0,pointerEvents:"auto"},children:c?m.jsxs(m.Fragment,{children:[m.jsx(ce,{documentId:t,sourcePath:"Generated from this project’s stories",displayName:At,build:l,active:e,onOpenNode:d,cameraDirection:ue,frameBounds:c.frameBounds,openingFrameBounds:c.openingFrameBounds,dressing:{grid:!0}}),m.jsx(gn,{documentId:t,scene:c,active:e}),m.jsx(xn,{scene:c})]}):m.jsxs("div",{"data-testid":"three-board-status",style:{padding:16,fontSize:12,color:g.content.muted},children:[o.status==="error"&&o.message,o.status==="building"&&le(Qe(s)),o.status==="idle"&&"Open this tab to lay out every story at true scale."]})})}function xn({scene:t}){const[e,r]=w.useState(!1),n=Ke(t.skipped),s=t.districts.filter(o=>o.groupKey!==I).length;return m.jsxs("div",{"data-testid":"three-board-status",style:{position:"absolute",left:8,bottom:8,maxWidth:420,padding:"4px 8px",borderRadius:g.shape.small,background:g.surface.raised,border:`1px solid ${g.boundary.default}`,fontSize:10,color:g.content.muted,pointerEvents:"auto"},children:[t.exhibits.length," exhibit",t.exhibits.length===1?"":"s"," · ",s," ","district",s===1?"":"s",t.helperVolumes.length>0&&m.jsxs(m.Fragment,{children:[" · ",t.helperVolumes.length," helper volume",t.helperVolumes.length===1?"":"s"," at true scale, outside the default frame"]}),t.ghostSlots.length>0&&m.jsxs(m.Fragment,{children:[" · ",t.ghostSlots.length," component",t.ghostSlots.length===1?"":"s"," without stories"]}),t.skipped.length>0&&m.jsxs(m.Fragment,{children:[" · ",m.jsxs("span",{role:"button",tabIndex:0,"aria-expanded":e,onClick:()=>r(o=>!o),onKeyDown:o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),r(i=>!i))},style:{cursor:"pointer",color:g.accent.default},children:[n.stories," ",n.stories===1?"story":"stories"," in ",n.modules," ",n.modules===1?"module":"modules"," not on this board"]})]}),e&&m.jsx("div",{style:{marginTop:4,maxHeight:160,overflow:"auto"},children:t.skipped.map(o=>m.jsxs("div",{style:{padding:"1px 0"},children:[m.jsxs("code",{style:{color:g.content.dim},children:[o.modulePath,"#",o.storyName]})," ","— ",o.reason]},o.id))})]})}function gn({documentId:t,scene:e,active:r}){const n=w.useRef(null),[s,o]=w.useState([]);return w.useEffect(()=>{if(!r)return;let i=0,a=!1;const u=yn(e),c=()=>{if(a)return;i=requestAnimationFrame(c);const l=n.current,d=ae(t);!l||!d||l.clientWidth===0||l.clientHeight===0||o(bn(u,d.camera(),l.clientWidth,l.clientHeight))};return i=requestAnimationFrame(c),()=>{a=!0,cancelAnimationFrame(i)}},[r,t,e]),m.jsx("div",{ref:n,"data-testid":"three-board-labels",style:{position:"absolute",inset:-12,pointerEvents:"none",overflow:"hidden"},children:s.map(i=>m.jsxs("div",{style:{position:"absolute",left:i.x,top:i.y,transform:"translate(-50%, -100%)",whiteSpace:"nowrap",padding:i.district?"2px 7px":"1px 5px",borderRadius:g.shape.small,background:g.surface.raised,border:`1px ${i.ghost?"dashed":"solid"} ${i.district&&!i.ghost?g.accent.default:g.boundary.default}`,color:i.district&&!i.ghost?g.content.primary:g.content.muted,fontSize:i.district?12:10,fontWeight:i.district?600:400,opacity:i.ghost?.9:1},children:[i.text,m.jsx("span",{style:{marginLeft:6,color:g.content.dim,fontWeight:400},children:i.detail})]},i.key))})}const B=new P;function wt(t){return[t.anchor[0],0,t.anchor[2]-t.footprint[1]/2]}function yn(t){return[...t.districts.map(e=>{const r=e.groupKey===I,n=e.placement.items.length;return{key:`district:${e.groupKey}`,text:e.label,detail:r?`${n} component${n===1?"":"s"}`:`${n} exhibit${n===1?"":"s"}`,district:!0,ghost:r,point:e.placement.anchor}}),...t.exhibits.map(e=>({key:`exhibit:${e.id}`,text:e.label,detail:Gt(e.placement.size[1]),district:!1,ghost:!1,point:wt(e.placement)})),...t.ghostSlots.map(e=>({key:`ghost:${e.key}`,text:e.name,detail:"No story yet",district:!1,ghost:!0,point:wt(e.placement)}))]}function bn(t,e,r,n){e.updateMatrixWorld();const s=[];for(const o of t)B.set(o.point[0],o.point[1],o.point[2]).project(e),!(B.z>1)&&s.push({key:o.key,text:o.text,detail:o.detail,district:o.district,ghost:o.ghost,x:(B.x*.5+.5)*r,y:(-B.y*.5+.5)*n,depth:B.z});return Sn(s).sort((o,i)=>i.depth-o.depth)}function wn(t){const e=t.district?12:10,r=(t.text.length+t.detail.length)*e*.62+24,n=e+8;return[t.x-r/2,t.y-n,t.x+r/2,t.y]}function Sn(t){const e=[...t].sort((n,s)=>(s.district?1:0)-(n.district?1:0)||n.depth-s.depth),r=[];for(const n of e){const s=wn(n);r.some(i=>s[0]<i.rect[2]&&s[2]>i.rect[0]&&s[1]<i.rect[3]&&s[3]>i.rect[1])||r.push({label:n,rect:s})}return r.map(n=>n.label)}function Ft(t,e){if(!t)return null;const r=cn(e);return r?t.exhibits.find(n=>n.id===r)??null:null}function Mn(t,e){if(!t)return null;const r=un(e);return r?t.ghostSlots.find(n=>n.key===r)??null:null}function En({adapter:t,nodeId:e}){w.useSyncExternalStore(ln,dn);const n=[...e?[e]:[],...t.selection?.get()??[]].reduce((s,o)=>s??Ft(F,ie(t.hierarchy,o)),null);return m.jsx("div",{"data-testid":"inspector-exhibit",style:{pointerEvents:"auto",padding:8,borderBottom:`1px solid ${g.boundary.default}`},children:n?m.jsxs("div",{style:{display:"grid",gap:3,fontSize:11},children:[m.jsx("div",{style:{color:g.content.primary,fontWeight:600},children:n.label}),m.jsx(G,{label:"Story",value:n.storyName}),m.jsx(G,{label:"Group",value:n.groupPath}),m.jsx(G,{label:"Module",value:n.modulePath}),m.jsx(G,{label:"Size",value:n.placement.size.map(s=>Gt(s)).join(" × ")})]}):m.jsx("div",{style:{fontSize:11,color:g.content.dim},children:"Pick an exhibit to read its story."})})}function G({label:t,value:e}){return m.jsxs("div",{style:{display:"flex",gap:6},children:[m.jsx("span",{style:{width:52,flexShrink:0,color:g.content.muted},children:t}),m.jsx("code",{style:{color:g.content.primary,overflow:"hidden",textOverflow:"ellipsis"},title:e,children:e})]})}const vn=Qt();function Dn(){vn.ensure(t=>{t(Zt({match:()=>Ut()?.descriptor.id===X,id:"exhibit",title:"Exhibit",icon:Wt,order:Xt,Section:En}))})}const _n={revision:()=>JSON.stringify(W().map(t=>t.modulePath)),subscribe:Mt,capture:async t=>{await te();const e=tt(),r=W().filter(o=>o.ok&&Q({modulePath:o.modulePath,regions:e}).medium==="three"),n=await Et(),s=await Ct(r,n.ok?n.entries:[]);try{const{captureAuthoredThreeScenePreview:o}=await A(async()=>{const{captureAuthoredThreeScenePreview:h}=await import("./document-preview-three-6-rt0s3D.js");return{captureAuthoredThreeScenePreview:h}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),{createStandardEnvironment:i}=await A(async()=>{const{createStandardEnvironment:h}=await import("./environment-Dg-YaLsA.js");return{createStandardEnvironment:h}},__vite__mapDeps([19,17,14,20,21,22])),{applyStandardViewportDressing:a}=await A(async()=>{const{applyStandardViewportDressing:h}=await import("./standard-viewport-dressing-8SWhTXK3.js").then(v=>v.d);return{applyStandardViewportDressing:h}},__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19,17,20,21,22,24])),{isEditorOwnedObject:u}=await A(async()=>{const{isEditorOwnedObject:h}=await import("./editor-layers-DVuMw5f5.js");return{isEditorOwnedObject:h}},__vite__mapDeps([15,3,4,5,6,7,8,9,10,11,12,13]));s.root.traverse(h=>{u(h)&&(h.visible=!1)});const c=new De;c.add(s.root);const l=new _e(new P(...s.frameBounds.min),new P(...s.frameBounds.max)),d=l.isEmpty()?new P:l.getCenter(new P),y=(l.isEmpty()?1:Math.max(.01,l.getBoundingSphere(new Oe).radius))/Math.sin(Pe.degToRad(42/2))*1.15,b=d.clone().addScaledVector(new P(1,.75,1).normalize(),y),x={...t,camera:{position:b,target:d,fov:42}};return o(s.root,c,x,h=>{const v=a(c,{environment:i(h),background:!1});return()=>v.dispose()})}finally{await q(s)}}};function ho(t){return Dn(),Yt({id:X,title:At,kind:"content-browser",workspaceRole:"workspace-reference",Content:e=>m.jsx(fn,{...e,store:t}),readOnly:!0,preview:_n,presentation:()=>({kind:"workspace",id:X})},{category:"canvas"})}export{En as BoardExhibitSection,X as THREE_COMPONENTS_DOCUMENT_ID,Dn as ensureThreeBoardContributionsRegistered,ho as installThreeBoardDocument,mn as openExhibitStoryDocument,pn as openGhostComponentSource};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/document-preview-three-BjLceB54.js","assets/content-bounds-D4k7pAaW.js","assets/hierarchy-marks-D2716vL4.js","assets/workspace-arrangement-CRcz3K9e.js","assets/index-D-G1ZsCu.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/three.core-3arARmh6.js","assets/editor-layers-DmUg5T3_.js","assets/renderer-ownership-BovSEcLv.js","assets/three.module-BLhyNg0e.js","assets/scene-framing-4WatuvlF.js","assets/environment-Dg-YaLsA.js","assets/RoomEnvironment-BkknvS_I.js","assets/EXRLoader-CITMBvGd.js","assets/HDRLoader-BTGuGhVo.js","assets/standard-viewport-dressing-Dk02sQp6.js","assets/user-data-DsFa4aua.js"])))=>i.map(i=>d[i]);
2
+ import{hg as O,hh as dt,au as Q,aw as Kt,bi as zt,fV as It,bj as Vt,fW as St,av as tt,hi as Ht,al as g,eM as Zt,dT as Xt,hj as Wt,f5 as Ut,fg as X,dK as Yt,as as Mt,hk as qt,fn as Jt,gF as mt,eO as Qt,b9 as te,at as W,cC as Et,_ as A,hl as ee,hm as ne,Z as oe,hn as Z,ho as re,dv as se}from"./index-D-G1ZsCu.js";import{a as m}from"./jsx-runtime-DPjLkJKQ.js";import{a as ie}from"./three-contract-Dkt6PmWY.js";import{a as ae}from"./object3d-document-session-registry-D704QLST.js";import{O as ce}from"./Object3DDocumentViewport-B3uvK8Py.js";import{S as ue}from"./standard-viewport-dressing-Dk02sQp6.js";import{t as le}from"./viewport-surface-status-D-2SRXNb.js";import{r as w}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{withStoryMountTurn as vt,lastStoryMountPhaseTiming as de}from"./story-three-preview-D_gLQCac.js";import{m as me}from"./three-story-model-5YWSi42m.js";import{c as pe}from"./content-bounds-D4k7pAaW.js";import{EDITOR_LAYER as he}from"./editor-layers-DmUg5T3_.js";import{setUserData as fe}from"./user-data-CODoGZqA.js";import{bh as R,co as Dt,K as xe,cx as ge,db as ye,cp as be,aI as we,N as Se,a$ as Me,c0 as Ee,b_ as ve,el as De,I as _e,fo as P,ex as Oe,cj as Pe}from"./three.core-3arARmh6.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./environment-Dg-YaLsA.js";import"./three.module-BLhyNg0e.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./user-data-DsFa4aua.js";import"./workspace-arrangement-CRcz3K9e.js";import"./asset-preview-vNs8rQu7.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-D2716vL4.js";import"./studio-environment-WsKE4UBz.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./bitmap-label-Ct4k6ehY.js";import"./crash-null-boundary-v3a0uEgw.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./index-DzuOGwVB.js";import"./story-mount-turn-DFRTj5hi.js";import"./object-marks-BnvSuCTt.js";const L={neighbourGapFactor:.45,minGap:.5,districtGapFactor:.6,minDistrictGap:3},$=.7,Te={min:[0,0,0],max:[0,0,0]};function et(t){return[...t.min,...t.max].some(r=>!Number.isFinite(r))?Te:{min:[Math.min(t.min[0],t.max[0]),Math.min(t.min[1],t.max[1]),Math.min(t.min[2],t.max[2])],max:[Math.max(t.min[0],t.max[0]),Math.max(t.min[1],t.max[1]),Math.max(t.min[2],t.max[2])]}}function nt(t){return[t.max[0]-t.min[0],t.max[1]-t.min[1],t.max[2]-t.min[2]]}function pt(t){const e=nt(et(t));return e[0]*e[2]}function ke(t){return-et(t).min[1]}function _t(t){const e=Math.max(t[0],t[2]),r=Math.max(.15,.1*e);return[Math.max(t[0]+2*r,$),Math.max(t[2]+2*r,$)]}function Ot(t){return Math.max(t[0],t[1])}function Be(t){return t.map(e=>({item:e,bounds:et(e.bounds)})).sort((e,r)=>{const n=pt(e.bounds)-pt(r.bounds);return n!==0?n:e.item.id<r.item.id?-1:1})}function Re(t){const e=Math.max($,...t.map(({bounds:r})=>Ot(_t(nt(r)))));return Math.max(10,2.2*e)}function je(t,e,r){const n=Re(t),s=[];let o={slots:[],xEdge:0,depth:0,previousSpan:null};const i=()=>{o.slots.length>0&&s.push({slots:o.slots,xEdge:o.xEdge,depth:o.depth}),o={slots:[],xEdge:0,depth:0,previousSpan:null}};for(const{item:a,bounds:u}of t){const c=nt(u),l=_t(c),d=Ot(l),p=o.previousSpan===null?0:Math.max(r,e*Math.max(o.previousSpan,d));o.slots.length>0&&o.xEdge+p+l[0]>n&&i();const y=o.previousSpan===null?0:p,b=o.xEdge+y+l[0]/2;o.xEdge=b+l[0]/2,o.depth=Math.max(o.depth,l[1]),o.previousSpan=d,o.slots.push({item:a,bounds:u,size:c,footprint:l,centreX:b})}return i(),s}function ht(t,e,r,n,s){const o=je(e,n,s),i=[];let a=r,u=null,c=0;for(const l of o){u!==null&&(a+=Math.max(s,n*Math.max(u,l.depth)));const d=a+l.depth/2;a=d+l.depth/2,u=l.depth,c=Math.max(c,l.xEdge);for(const p of l.slots)i.push({id:p.item.id,groupKey:t,translation:[p.centreX-(p.bounds.min[0]+p.bounds.max[0])/2,ke(p.bounds),d-(p.bounds.min[2]+p.bounds.max[2])/2],anchor:[p.centreX,0,d],size:p.size,footprint:p.footprint})}return{placements:i,xEdge:c,depth:a-r}}function Ce(t){return Math.min(3,Math.max(.6,.08*t))}function Ne(t,e={}){const r=e.neighbourGapFactor??L.neighbourGapFactor,n=e.minGap??L.minGap,s=e.districtGapFactor??L.districtGapFactor,o=e.minDistrictGap??L.minDistrictGap,i=new Map;for(const d of t){const p=i.get(d.groupKey);p?p.push(d):i.set(d.groupKey,[d])}const a=[];let u=0,c=null;for(const d of i.keys()){const p=Be(i.get(d)??[]),y=ht(d,p,0,r,n),b=Ce(Math.max(y.depth,$)),x=y.depth+2*b;c!==null&&(u+=Math.max(o,s*Math.max(c,x)));const h=u;u=h+x,c=x;const{placements:v,xEdge:V}=ht(d,p,h+b,r,n),_={minX:-b,maxX:V+b,minZ:h,maxZ:h+x};a.push({groupKey:d,items:v,extent:_,anchor:[(_.minX+_.maxX)/2,0,_.minZ]})}const l=a.length===0?{minX:0,maxX:0,minZ:0,maxZ:0}:{minX:Math.min(...a.map(d=>d.extent.minX)),maxX:Math.max(...a.map(d=>d.extent.maxX)),minZ:Math.min(...a.map(d=>d.extent.minZ)),maxZ:Math.max(...a.map(d=>d.extent.maxZ))};return{districts:a,extent:l}}const Pt={min:[0,0,0],max:[0,0,0]},Ae=.35,ft=20;function ot(t){return[...t.min,...t.max].every(e=>Number.isFinite(e))}function z(t){return ot(t)?{min:[Math.min(t.min[0],t.max[0]),Math.min(t.min[1],t.max[1]),Math.min(t.min[2],t.max[2])],max:[Math.max(t.min[0],t.max[0]),Math.max(t.min[1],t.max[1]),Math.max(t.min[2],t.max[2])]}:Pt}function Tt(t){const e=z(t);return[e.max[0]-e.min[0],e.max[1]-e.min[1],e.max[2]-e.min[2]]}function K(t){const e=t.map(z).filter(o=>ot(o));if(e.length===0)return Pt;const r=e[0],n=[r.min[0],r.min[1],r.min[2]],s=[r.max[0],r.max[1],r.max[2]];for(let o=1;o<e.length;o++){const i=e[o];n[0]=Math.min(n[0],i.min[0]),n[1]=Math.min(n[1],i.min[1]),n[2]=Math.min(n[2],i.min[2]),s[0]=Math.max(s[0],i.max[0]),s[1]=Math.max(s[1],i.max[1]),s[2]=Math.max(s[2],i.max[2])}return{min:n,max:s}}function U(t,e){const r=z(t);return{min:[r.min[0]+e[0],r.min[1]+e[1],r.min[2]+e[2]],max:[r.max[0]+e[0],r.max[1]+e[1],r.max[2]+e[2]]}}function Le(t){return"min"in t?{bounds:t}:{bounds:t.bounds,...t.overlay===!0?{overlay:!0}:{},...t.enclosure===!0?{enclosure:!0}:{}}}function Ge(t,e={}){if(e.overlay)return"volume";if(e.enclosure)return"environment-scale";const n=[...Tt(t)].sort((a,u)=>u-a),s=n[0]??0,o=n[1]??0;return(n[2]??0)<Ae&&o>=ft&&s>=ft?"unbounded-plane":null}function Fe(t){const e=t.map(Le).map(a=>({bounds:z(a.bounds),overlay:a.overlay===!0,enclosure:a.enclosure===!0})).filter(a=>ot(a.bounds)),r=e.map(a=>a.bounds),n=K(r);if(e.length<2)return{full:n,presence:n,helpers:[]};const s=e.map(a=>Ge(a.bounds,{overlay:a.overlay,enclosure:a.enclosure})),o=e.filter((a,u)=>s[u]===null).map(a=>a.bounds);if(o.length===0)return{full:n,presence:n,helpers:[]};const i=[];for(let a=0;a<e.length;a++){const u=s[a]??null;u!==null&&i.push({kind:u,bounds:e[a].bounds,size:Tt(e[a].bounds)})}return{full:n,presence:K(o),helpers:i}}function $e(t){const e=t.map(u=>({exhibit:u,presence:Fe(u.nodes)})),r=e.map(({exhibit:u,presence:c})=>({id:u.id,groupKey:u.groupKey,bounds:c.presence})),n=Ne(r),s=new Map;for(const u of n.districts)for(const c of u.items)s.set(c.id,c);const o=[],i=[],a=[];for(const{exhibit:u,presence:c}of e){const l=s.get(u.id);l&&(o.push({id:u.id,groupKey:u.groupKey,full:c.full,presence:c.presence,helpers:c.helpers,placement:l}),i.push(U(c.presence,l.translation)),a.push(U(c.full,l.translation)))}return{layout:n,exhibits:o,frame:K(i),fullFrame:K(a)}}const kt="volterBoardStoryId",Bt="volterBoardComponentKey",I="volter:board:no-story";function Ke(t){return{stories:t.length,modules:new Set(t.map(e=>e.modulePath)).size}}const Y="Ungrouped",xt="No story yet",ze=.9;function Ie(t){return t instanceof Error?t.message:String(t)}async function Ve(t,e,r){const n=Date.now();let s=null,o=null;try{s=await r(e),me(s.root)||(s.dispose(),s=null,o="The story mounted no three content.")}catch(a){o=Ie(a)}const i=de();return Ht({id:t.id,ms:Date.now()-n,runtimeMs:i?.runtimeMs??0,loadMs:i?.loadMs??0,fiberMs:i?.fiberMs??0,settleMs:i?.settleMs??0,ok:s!==null}),{identity:t,mounted:s,reason:o}}function Rt(t){t.traverse(e=>{e.layers.enable(he),fe(e,"editorHelper",!0)})}const He={color:3291977,roughness:.92,metalness:.04,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:2},gt=.06,Ze=0,yt=0,Xe=11124182,We=9413565;function Ue(t){const e=t.extent.maxX-t.extent.minX,r=t.extent.maxZ-t.extent.minZ,n=new Dt(new xe(e,gt,r),new ge(He));return n.name=`volter:board-pad:${t.groupKey||Y}`,n.position.set((t.extent.minX+t.extent.maxX)/2,Ze-gt/2,(t.extent.minZ+t.extent.maxZ)/2),n.receiveShadow=!0,Rt(n),n}function Ye(t,e){const r=t/2,n=e/2,s=[[-r,-n],[r,-n],[r,n],[-r,n]],o=[];for(let u=0;u<s.length;u++){const c=s[u],l=s[(u+1)%s.length];o.push(c[0],0,c[1],l[0],0,l[1])}const i=new Se;i.setAttribute("position",new Me(o,3));const a=new Ee(i,new ve({color:Xe,dashSize:.09,gapSize:.06}));return a.computeLineDistances(),a}function qe(t){const e=new R;e.name=`volter:board-ghost:${t.name}`,e.userData[Bt]=t.key;const[r,n]=t.placement.footprint,s=new Dt(new ye(r,n),new be({color:We,transparent:!0,opacity:.1,depthWrite:!1,side:we}));s.rotation.x=-Math.PI/2,s.position.y=yt;const o=Ye(r,n);return o.position.y=yt,e.add(s,o),e.position.set(t.placement.anchor[0],0,t.placement.anchor[2]),e}function Je(t,e,r){if(!r.componentName)return!0;const n=St(t,r.componentName,e);return!n||n.modulePath===e&&n.name===r.name}function Qe(t){return jt(t).length}function jt(t){const e=[],r=new Map,n=tt();for(const s of t)if(s.ok)for(const o of s.stories){const i=Q({modulePath:s.modulePath,regions:n});if(i.medium!=="three"){i.via==="undeclared"&&Kt(s.modulePath,i.reason);continue}if(!Je(t,s.modulePath,o))continue;const a=zt({modulePath:s.modulePath,...o.title===void 0?{}:{title:o.title}}),u=It(a),c=`${u}/${a.leaf}`;r.set(c,(r.get(c)??0)+1),e.push({identity:{id:`${s.modulePath}#${o.name}`,storyName:o.name,modulePath:s.modulePath,groupKey:u,groupLeaf:a.leaf,groupPath:Vt(a)},storyLabel:o.label,Component:o.Component})}return e.map(({identity:s,storyLabel:o,Component:i})=>({identity:{...s,label:(r.get(`${s.groupKey}/${s.groupLeaf}`)??0)>1?`${s.groupLeaf} · ${o}`:s.groupLeaf},Component:i}))}function tn(t,e){const r=new Set,n=[];for(const s of e){if(s.surface!=="three"||s.contentKind==="image")continue;const o=`${s.path}#${s.name}`;r.has(o)||(r.add(o),!St(t,s.name,s.path)&&n.push(s))}return n}function en(t,e,r){const n=new R;return n.name=`volter:board-exhibit:${t.label}`,n.position.set(...e.translation),n.add(r.root),n.userData[kt]=t.id,n}function q(t){return vt(async()=>{t.dispose()})}async function Ct(t,e=[],r){return vt(n=>an(t,e,r,n))}async function nn(t,e,r){const n=[];for(const{identity:s,Component:o}of t){if(e?.aborted)break;n.push(await Ve(s,o,r))}return n}function on(t){return{min:t.min.toArray(),max:t.max.toArray()}}function rn(t){const e=new Map,r=new Map,n=[],s=[];for(const o of t){if(!o.mounted){s.push({id:o.identity.id,modulePath:o.identity.modulePath,storyName:o.identity.storyName,reason:o.reason??"The story produced no Object3D."});continue}const i=pe(o.mounted.root).map(a=>({bounds:on(a.box),overlay:a.overlay,enclosure:a.enclosure}));e.set(o.identity.id,o.mounted),r.set(o.identity.id,o.identity),n.push({id:o.identity.id,groupKey:o.identity.groupKey,nodes:i})}return{mounts:e,identities:r,measures:n,skipped:s}}function sn(t){const e=ze/2;return{id:`${t.path}#${t.name}`,groupKey:I,nodes:[{min:[-e,0,-e],max:[e,0,e]}]}}async function an(t,e,r,n){const s=Date.now(),o=jt(t);O("candidate-collect",Date.now()-s),dt({candidateCount:o.length});const i=Date.now(),a=await nn(o,r,n);O("story-mounts",Date.now()-i);const u=Date.now(),{mounts:c,identities:l,measures:d,skipped:p}=rn(a);O("bounds",Date.now()-u);const y=Date.now(),b=tn(t,e),x=new Map(b.map(f=>[`${f.path}#${f.name}`,f])),h=$e([...d,...b.map(sn)]),v=h.layout,V=new Map(h.exhibits.map(f=>[f.id,f]));O("layout",Date.now()-y);const _=Date.now(),T=new R;T.name="volter:three-board";const k=new R;k.name="volter:board-chrome",Rt(k),T.add(k);const j=[],rt=[],st=[],it=[k];for(const f of v.districts){const M=f.groupKey===I,D=new R;D.name=`volter:board-district:${M?xt:f.groupKey||Y}`,T.add(D),k.add(Ue(f));for(const S of f.items){if(M){const N=x.get(S.id);if(!N)continue;const ut={key:S.id,name:N.name,path:N.path,line:N.line,placement:S},lt=qe(ut);D.add(lt),it.push(lt),st.push(ut);continue}const C=c.get(S.id),H=l.get(S.id),E=V.get(S.id);!C||!H||!E||(D.add(en(H,S,C)),j.push({...H,placement:S,fullSize:[E.full.max[0]-E.full.min[0],E.full.max[1]-E.full.min[1],E.full.max[2]-E.full.min[2]],helpers:E.helpers}))}rt.push({groupKey:f.groupKey,label:M?xt:f.groupKey||Y,placement:f})}const $t=j.flatMap(f=>f.helpers.map(M=>({exhibitId:f.id,exhibitLabel:f.label,kind:M.kind,size:M.size})));let at=!1;const ct={root:T,exhibits:j,districts:rt,ghostSlots:st,skipped:p,frameBounds:h.frame,openingFrameBounds:h.exhibits[0]?U(h.exhibits[0].presence,h.exhibits[0].placement.translation):h.frame,helperVolumes:$t,dispose(){if(!at){at=!0;for(const f of it)f.traverse(M=>{const D=M;D.geometry?.dispose();const S=D.material;if(Array.isArray(S))for(const C of S)C.dispose();else S?.dispose()}),f.removeFromParent();for(const f of c.values())try{f.dispose()}catch(M){console.error("[three-board] a story mount failed to dispose.",M)}c.clear(),T.clear()}}};if(O("assemble",Date.now()-_),dt({exhibitCount:j.length,skippedCount:p.length}),r?.aborted)throw ct.dispose(),new Error("The 3D board build was superseded by a newer one.");return ct}function cn(t){return Nt(t,kt)}function un(t){return Nt(t,Bt)}function Nt(t,e){let r=t;for(;r;){const n=r.userData[e];if(typeof n=="string")return n;r=r.parent}return null}const At="3D";let F=null,Lt=0;const J=new Set;function bt(){Lt++;for(const t of J)t()}function ln(t){return J.add(t),()=>{J.delete(t)}}function dn(){return Lt}function Gt(t){return Number.isFinite(t)?t>=10?`${Math.round(t)} m`:t>=1?`${t.toFixed(1)} m`:`${t.toFixed(2)} m`:"—"}function mn(t,e,r){const n=Ft(e,r);return n?qt(Jt,t,{modulePath:n.modulePath,storyName:n.storyName,title:n.label}):null}function pn(t,e,r){const n=Mn(t,e);if(!n)return null;const s={definitionLocation:()=>({file:n.path,line:n.line})};return r?mt(s,n.key,"definition",r):mt(s,n.key,"definition")}function hn(t){const e=tt(),r=t.filter(o=>o.ok&&Q({modulePath:o.modulePath,regions:e}).medium==="three"),n=w.useRef([]),s=n.current;return(s.length!==r.length||s.some((o,i)=>o!==r[i]))&&(n.current=r),n.current}function fn({documentId:t,active:e,store:r}){const n=w.useSyncExternalStore(Mt,W),s=hn(n),[o,i]=w.useState({status:"idle"});e&&ee(t);const[a,u]=w.useState(e);w.useEffect(()=>{e&&u(!0)},[e]),w.useEffect(()=>{if(!a)return;const p=new AbortController;let y=null;i({status:"building"}),ne(t,{modulesAlreadyLoaded:s.length>0});const b=Date.now();return Et().then(x=>{const h=Date.now()-b;return O("component-index",h,{busyMs:0,waitMs:h}),x.ok||oe.warn(`Component index unavailable, so this board shows no ghost slots: ${x.reason}`,"three-board"),Ct(s,x.ok?x.entries:[],p.signal)}).then(x=>{if(p.signal.aborted){Z(t),q(x);return}y=x,F=x,bt(),re(),i({status:"ready",scene:x})},x=>{if(p.signal.aborted){Z(t);return}i({status:"error",message:x instanceof Error?x.message:String(x)})}),()=>{p.abort(),y?(F===y&&(F=null),q(y),bt()):Z(t)}},[s,a,t]);const c=o.status==="ready"?o.scene:null,l=w.useCallback(()=>{if(!c)throw new Error("The 3D board is still building.");return{root:c.root,dispose(){}}},[c]),d=w.useCallback(p=>{if(mn(r,c,p)!==null)return;const y=pn(c,p);y&&y.then(se)},[c,r]);return m.jsx("div",{style:{position:"relative",flex:1,minHeight:0,pointerEvents:"auto"},children:c?m.jsxs(m.Fragment,{children:[m.jsx(ce,{documentId:t,sourcePath:"Generated from this project’s stories",displayName:At,build:l,active:e,onOpenNode:d,cameraDirection:ue,frameBounds:c.frameBounds,openingFrameBounds:c.openingFrameBounds,dressing:{grid:!0}}),m.jsx(gn,{documentId:t,scene:c,active:e}),m.jsx(xn,{scene:c})]}):m.jsxs("div",{"data-testid":"three-board-status",style:{padding:16,fontSize:12,color:g.content.muted},children:[o.status==="error"&&o.message,o.status==="building"&&le(Qe(s)),o.status==="idle"&&"Open this tab to lay out every story at true scale."]})})}function xn({scene:t}){const[e,r]=w.useState(!1),n=Ke(t.skipped),s=t.districts.filter(o=>o.groupKey!==I).length;return m.jsxs("div",{"data-testid":"three-board-status",style:{position:"absolute",left:8,bottom:8,maxWidth:420,padding:"4px 8px",borderRadius:g.shape.small,background:g.surface.raised,border:`1px solid ${g.boundary.default}`,fontSize:10,color:g.content.muted,pointerEvents:"auto"},children:[t.exhibits.length," exhibit",t.exhibits.length===1?"":"s"," · ",s," ","district",s===1?"":"s",t.helperVolumes.length>0&&m.jsxs(m.Fragment,{children:[" · ",t.helperVolumes.length," helper volume",t.helperVolumes.length===1?"":"s"," at true scale, outside the default frame"]}),t.ghostSlots.length>0&&m.jsxs(m.Fragment,{children:[" · ",t.ghostSlots.length," component",t.ghostSlots.length===1?"":"s"," without stories"]}),t.skipped.length>0&&m.jsxs(m.Fragment,{children:[" · ",m.jsxs("span",{role:"button",tabIndex:0,"aria-expanded":e,onClick:()=>r(o=>!o),onKeyDown:o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),r(i=>!i))},style:{cursor:"pointer",color:g.accent.default},children:[n.stories," ",n.stories===1?"story":"stories"," in ",n.modules," ",n.modules===1?"module":"modules"," not on this board"]})]}),e&&m.jsx("div",{style:{marginTop:4,maxHeight:160,overflow:"auto"},children:t.skipped.map(o=>m.jsxs("div",{style:{padding:"1px 0"},children:[m.jsxs("code",{style:{color:g.content.dim},children:[o.modulePath,"#",o.storyName]})," ","— ",o.reason]},o.id))})]})}function gn({documentId:t,scene:e,active:r}){const n=w.useRef(null),[s,o]=w.useState([]);return w.useEffect(()=>{if(!r)return;let i=0,a=!1;const u=yn(e),c=()=>{if(a)return;i=requestAnimationFrame(c);const l=n.current,d=ae(t);!l||!d||l.clientWidth===0||l.clientHeight===0||o(bn(u,d.camera(),l.clientWidth,l.clientHeight))};return i=requestAnimationFrame(c),()=>{a=!0,cancelAnimationFrame(i)}},[r,t,e]),m.jsx("div",{ref:n,"data-testid":"three-board-labels",style:{position:"absolute",inset:-12,pointerEvents:"none",overflow:"hidden"},children:s.map(i=>m.jsxs("div",{style:{position:"absolute",left:i.x,top:i.y,transform:"translate(-50%, -100%)",whiteSpace:"nowrap",padding:i.district?"2px 7px":"1px 5px",borderRadius:g.shape.small,background:g.surface.raised,border:`1px ${i.ghost?"dashed":"solid"} ${i.district&&!i.ghost?g.accent.default:g.boundary.default}`,color:i.district&&!i.ghost?g.content.primary:g.content.muted,fontSize:i.district?12:10,fontWeight:i.district?600:400,opacity:i.ghost?.9:1},children:[i.text,m.jsx("span",{style:{marginLeft:6,color:g.content.dim,fontWeight:400},children:i.detail})]},i.key))})}const B=new P;function wt(t){return[t.anchor[0],0,t.anchor[2]-t.footprint[1]/2]}function yn(t){return[...t.districts.map(e=>{const r=e.groupKey===I,n=e.placement.items.length;return{key:`district:${e.groupKey}`,text:e.label,detail:r?`${n} component${n===1?"":"s"}`:`${n} exhibit${n===1?"":"s"}`,district:!0,ghost:r,point:e.placement.anchor}}),...t.exhibits.map(e=>({key:`exhibit:${e.id}`,text:e.label,detail:Gt(e.placement.size[1]),district:!1,ghost:!1,point:wt(e.placement)})),...t.ghostSlots.map(e=>({key:`ghost:${e.key}`,text:e.name,detail:"No story yet",district:!1,ghost:!0,point:wt(e.placement)}))]}function bn(t,e,r,n){e.updateMatrixWorld();const s=[];for(const o of t)B.set(o.point[0],o.point[1],o.point[2]).project(e),!(B.z>1)&&s.push({key:o.key,text:o.text,detail:o.detail,district:o.district,ghost:o.ghost,x:(B.x*.5+.5)*r,y:(-B.y*.5+.5)*n,depth:B.z});return Sn(s).sort((o,i)=>i.depth-o.depth)}function wn(t){const e=t.district?12:10,r=(t.text.length+t.detail.length)*e*.62+24,n=e+8;return[t.x-r/2,t.y-n,t.x+r/2,t.y]}function Sn(t){const e=[...t].sort((n,s)=>(s.district?1:0)-(n.district?1:0)||n.depth-s.depth),r=[];for(const n of e){const s=wn(n);r.some(i=>s[0]<i.rect[2]&&s[2]>i.rect[0]&&s[1]<i.rect[3]&&s[3]>i.rect[1])||r.push({label:n,rect:s})}return r.map(n=>n.label)}function Ft(t,e){if(!t)return null;const r=cn(e);return r?t.exhibits.find(n=>n.id===r)??null:null}function Mn(t,e){if(!t)return null;const r=un(e);return r?t.ghostSlots.find(n=>n.key===r)??null:null}function En({adapter:t,nodeId:e}){w.useSyncExternalStore(ln,dn);const n=[...e?[e]:[],...t.selection?.get()??[]].reduce((s,o)=>s??Ft(F,ie(t.hierarchy,o)),null);return m.jsx("div",{"data-testid":"inspector-exhibit",style:{pointerEvents:"auto",padding:8,borderBottom:`1px solid ${g.boundary.default}`},children:n?m.jsxs("div",{style:{display:"grid",gap:3,fontSize:11},children:[m.jsx("div",{style:{color:g.content.primary,fontWeight:600},children:n.label}),m.jsx(G,{label:"Story",value:n.storyName}),m.jsx(G,{label:"Group",value:n.groupPath}),m.jsx(G,{label:"Module",value:n.modulePath}),m.jsx(G,{label:"Size",value:n.placement.size.map(s=>Gt(s)).join(" × ")})]}):m.jsx("div",{style:{fontSize:11,color:g.content.dim},children:"Pick an exhibit to read its story."})})}function G({label:t,value:e}){return m.jsxs("div",{style:{display:"flex",gap:6},children:[m.jsx("span",{style:{width:52,flexShrink:0,color:g.content.muted},children:t}),m.jsx("code",{style:{color:g.content.primary,overflow:"hidden",textOverflow:"ellipsis"},title:e,children:e})]})}const vn=Qt();function Dn(){vn.ensure(t=>{t(Zt({match:()=>Ut()?.descriptor.id===X,id:"exhibit",title:"Exhibit",icon:Wt,order:Xt,Section:En}))})}const _n={revision:()=>JSON.stringify(W().map(t=>t.modulePath)),subscribe:Mt,capture:async t=>{await te();const e=tt(),r=W().filter(o=>o.ok&&Q({modulePath:o.modulePath,regions:e}).medium==="three"),n=await Et(),s=await Ct(r,n.ok?n.entries:[]);try{const{captureAuthoredThreeScenePreview:o}=await A(async()=>{const{captureAuthoredThreeScenePreview:h}=await import("./document-preview-three-BjLceB54.js");return{captureAuthoredThreeScenePreview:h}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),{createStandardEnvironment:i}=await A(async()=>{const{createStandardEnvironment:h}=await import("./environment-Dg-YaLsA.js");return{createStandardEnvironment:h}},__vite__mapDeps([19,17,14,20,21,22])),{applyStandardViewportDressing:a}=await A(async()=>{const{applyStandardViewportDressing:h}=await import("./standard-viewport-dressing-Dk02sQp6.js").then(v=>v.d);return{applyStandardViewportDressing:h}},__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19,17,20,21,22,24])),{isEditorOwnedObject:u}=await A(async()=>{const{isEditorOwnedObject:h}=await import("./editor-layers-DmUg5T3_.js");return{isEditorOwnedObject:h}},__vite__mapDeps([15,3,4,5,6,7,8,9,10,11,12,13]));s.root.traverse(h=>{u(h)&&(h.visible=!1)});const c=new De;c.add(s.root);const l=new _e(new P(...s.frameBounds.min),new P(...s.frameBounds.max)),d=l.isEmpty()?new P:l.getCenter(new P),y=(l.isEmpty()?1:Math.max(.01,l.getBoundingSphere(new Oe).radius))/Math.sin(Pe.degToRad(42/2))*1.15,b=d.clone().addScaledVector(new P(1,.75,1).normalize(),y),x={...t,camera:{position:b,target:d,fov:42}};return o(s.root,c,x,h=>{const v=a(c,{environment:i(h),background:!1});return()=>v.dispose()})}finally{await q(s)}}};function ho(t){return Dn(),Yt({id:X,title:At,kind:"content-browser",workspaceRole:"workspace-reference",Content:e=>m.jsx(fn,{...e,store:t}),readOnly:!0,preview:_n,presentation:()=>({kind:"workspace",id:X})},{category:"canvas"})}export{En as BoardExhibitSection,X as THREE_COMPONENTS_DOCUMENT_ID,Dn as ensureThreeBoardContributionsRegistered,ho as installThreeBoardDocument,mn as openExhibitStoryDocument,pn as openGhostComponentSource};
@@ -1 +1 @@
1
- import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{al as p,fU as g,aC as b}from"./index-DmNeCiAo.js";import{r as m}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{captureAuthoredThreeScenePreview as E}from"./document-preview-three-6-rt0s3D.js";import{m as v}from"./mounted-story-viewport-source-hP2r14tz.js";import{mountStoryObject3D as w,disposeStoryObject3D as x}from"./story-three-preview-CsLEpAYI.js";import{O as C}from"./Object3DDocumentViewport-ClruThDB.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./content-bounds-wsarq3YV.js";import"./hierarchy-marks-DDtpJ7PB.js";import"./workspace-arrangement-Dinn7b-i.js";import"./three.core-3arARmh6.js";import"./editor-layers-DVuMw5f5.js";import"./renderer-ownership-BovSEcLv.js";import"./three.module-BLhyNg0e.js";import"./scene-framing-B4Ynn1mk.js";import"./asset-preview-agZh9kpZ.js";import"./studio-environment-DsQ4K1L8.js";import"./user-data-DvKLhMGu.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./crash-null-boundary-v3a0uEgw.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./index-DzuOGwVB.js";import"./story-mount-turn-DFRTj5hi.js";import"./viewport-surface-status-DKyxV0Lz.js";async function N(e,n,t){const s=(await import(e))[t??"default"];if(typeof s!="function")throw new Error(`${n} does not export ${t===void 0?"a default component":`\`${t}\``}, which is what the adapter's scene table names. The table and the module disagree.`);return s}function at({active:e,documentId:n,state:t}){const[o,c]=m.useState(null),[s,d]=m.useState(null),a=m.useRef(null),[f,j]=m.useState(e);m.useEffect(()=>{e&&j(!0)},[e]);const u=t?.path,h=t?.exportName;return m.useEffect(()=>{if(!f||!u)return;let l=!1;return d(null),c(null),y(u,h).then(r=>w(r,{})).then(r=>{if(l){x(r);return}const S=v(r);a.current=S,c(S)}).catch(r=>{l||d(r instanceof Error?r.message:String(r))}),()=>{l=!0,a.current?.dispose(),a.current=null,c(null)}},[f,u,h]),t?s?i.jsxs("div",{role:"alert","data-testid":"scene-document-error",style:{padding:12,fontSize:12,color:p.semantic.danger,maxWidth:640},children:[i.jsxs("div",{style:{fontWeight:600,marginBottom:4},children:[t.path,t.exportName?` — ${t.exportName}`:""]}),i.jsx("div",{style:{color:p.content.muted,whiteSpace:"pre-wrap"},children:s})]}):o?i.jsx(C,{documentId:n,sourcePath:t.path,build:o.build,displayName:t.label,active:e}):i.jsx("div",{"data-testid":"scene-document-loading",style:{padding:12,fontSize:12,color:p.content.muted,fontStyle:"italic"},children:"mounting…"}):i.jsx("div",{style:{padding:12,fontSize:12,color:p.content.muted},children:"This scene document is no longer declared by the project's adapter."})}async function y(e,n){const t=b();if(!t)throw new Error("No project is open, so its scene modules cannot be loaded.");const o=`${g(t.rootPath,e)}?t=${Date.now()}`;return N(o,e,n)}async function ut(e,n){const t=await y(e.path,e.exportName),o=await w(t,{});try{return E(o.root,o.scene,n)}finally{await x(o)}}export{at as ThreeIsolationSceneContent,ut as captureThreeIsolationScenePreview};
1
+ import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{al as p,fU as g,aC as b}from"./index-D-G1ZsCu.js";import{r as m}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{captureAuthoredThreeScenePreview as E}from"./document-preview-three-BjLceB54.js";import{m as v}from"./mounted-story-viewport-source-CuAqEjCt.js";import{mountStoryObject3D as w,disposeStoryObject3D as x}from"./story-three-preview-D_gLQCac.js";import{O as C}from"./Object3DDocumentViewport-B3uvK8Py.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./content-bounds-D4k7pAaW.js";import"./hierarchy-marks-D2716vL4.js";import"./workspace-arrangement-CRcz3K9e.js";import"./three.core-3arARmh6.js";import"./editor-layers-DmUg5T3_.js";import"./renderer-ownership-BovSEcLv.js";import"./three.module-BLhyNg0e.js";import"./scene-framing-4WatuvlF.js";import"./asset-preview-vNs8rQu7.js";import"./studio-environment-WsKE4UBz.js";import"./user-data-DsFa4aua.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./crash-null-boundary-v3a0uEgw.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./index-DzuOGwVB.js";import"./story-mount-turn-DFRTj5hi.js";import"./viewport-surface-status-D-2SRXNb.js";async function N(e,n,t){const s=(await import(e))[t??"default"];if(typeof s!="function")throw new Error(`${n} does not export ${t===void 0?"a default component":`\`${t}\``}, which is what the adapter's scene table names. The table and the module disagree.`);return s}function at({active:e,documentId:n,state:t}){const[o,c]=m.useState(null),[s,d]=m.useState(null),a=m.useRef(null),[f,j]=m.useState(e);m.useEffect(()=>{e&&j(!0)},[e]);const u=t?.path,h=t?.exportName;return m.useEffect(()=>{if(!f||!u)return;let l=!1;return d(null),c(null),y(u,h).then(r=>w(r,{})).then(r=>{if(l){x(r);return}const S=v(r);a.current=S,c(S)}).catch(r=>{l||d(r instanceof Error?r.message:String(r))}),()=>{l=!0,a.current?.dispose(),a.current=null,c(null)}},[f,u,h]),t?s?i.jsxs("div",{role:"alert","data-testid":"scene-document-error",style:{padding:12,fontSize:12,color:p.semantic.danger,maxWidth:640},children:[i.jsxs("div",{style:{fontWeight:600,marginBottom:4},children:[t.path,t.exportName?` — ${t.exportName}`:""]}),i.jsx("div",{style:{color:p.content.muted,whiteSpace:"pre-wrap"},children:s})]}):o?i.jsx(C,{documentId:n,sourcePath:t.path,build:o.build,displayName:t.label,active:e}):i.jsx("div",{"data-testid":"scene-document-loading",style:{padding:12,fontSize:12,color:p.content.muted,fontStyle:"italic"},children:"mounting…"}):i.jsx("div",{style:{padding:12,fontSize:12,color:p.content.muted},children:"This scene document is no longer declared by the project's adapter."})}async function y(e,n){const t=b();if(!t)throw new Error("No project is open, so its scene modules cannot be loaded.");const o=`${g(t.rootPath,e)}?t=${Date.now()}`;return N(o,e,n)}async function ut(e,n){const t=await y(e.path,e.exportName),o=await w(t,{});try{return E(o.root,o.scene,n)}finally{await x(o)}}export{at as ThreeIsolationSceneContent,ut as captureThreeIsolationScenePreview};
@@ -1 +1 @@
1
- import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{Object3DPreview as d}from"./Object3DPreview-CMaxxYtS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DmNeCiAo.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./OrbitControls-B13MKuwC.js";import"./asset-preview-agZh9kpZ.js";import"./editor-layers-DVuMw5f5.js";import"./workspace-arrangement-Dinn7b-i.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-DDtpJ7PB.js";import"./studio-environment-DsQ4K1L8.js";import"./user-data-DvKLhMGu.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./model-thumbnail-BtcSrAMa.js";function Q({build:r,displayName:m="Object3D preview",height:p=360,background:e,showSkeleton:s=!1,cameraDirection:n,showGrid:c,useDefaultLighting:u,exposure:a,setupPreview:t,active:j=!0}){const i=t!==void 0;return o.jsx("div",{style:{width:"100%",height:p,minHeight:240},children:o.jsx(d,{sourceFactory:r,displayName:m,active:j,showSkeleton:s,background:e,cameraDirection:n,showGrid:c??!i,useDefaultLighting:u??!i,exposure:a,setupPreview:t})})}export{Q as ToolObject3DPreview};
1
+ import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{Object3DPreview as d}from"./Object3DPreview-C7ZP4njx.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D-G1ZsCu.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./OrbitControls-B13MKuwC.js";import"./asset-preview-vNs8rQu7.js";import"./editor-layers-DmUg5T3_.js";import"./workspace-arrangement-CRcz3K9e.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-D2716vL4.js";import"./studio-environment-WsKE4UBz.js";import"./user-data-DsFa4aua.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./model-thumbnail-D5o-4B01.js";function Q({build:r,displayName:m="Object3D preview",height:p=360,background:e,showSkeleton:s=!1,cameraDirection:n,showGrid:c,useDefaultLighting:u,exposure:a,setupPreview:t,active:j=!0}){const i=t!==void 0;return o.jsx("div",{style:{width:"100%",height:p,minHeight:240},children:o.jsx(d,{sourceFactory:r,displayName:m,active:j,showSkeleton:s,background:e,cameraDirection:n,showGrid:c??!i,useDefaultLighting:u??!i,exposure:a,setupPreview:t})})}export{Q as ToolObject3DPreview};
@@ -1 +1 @@
1
- import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{U as N,d7 as O,d8 as k,d9 as P,a8 as h,bw as u,aM as f,a7 as d,da as v,db as R,dc as B,dd as G,a6 as w,bz as z,bP as M,de as A,aL as l,aN as m,df as b,aS as y,dg as C,bv as F,dh as L,by as V,bA as $,bB as U,bD as H,di as K,dj as _,dk as X,dl as Y}from"./index-DmNeCiAo.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{r as T}from"./transform-mode-request-8EAetSXS.js";function D({active:a,onArm:t,faIcon:r,action:s,label:i}){return e.jsx(u,{text:i,hotkey:v(s),children:e.jsx(f,{"aria-label":i,"aria-pressed":a,shape:"segment",size:"comfortable",onClick:t,children:e.jsx(d,{icon:r,size:"md"})})})}function I({store:a,dimensions:t="3d",size:r="comfortable",variant:s="ghost",showValues:i=!1}){const[o,S]=c.useState(!1),j=c.useRef(null);return c.useEffect(()=>{if(!o)return;const n=p=>{j.current&&!j.current.contains(p.target)&&S(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[o]),e.jsxs("div",{ref:j,className:"volter-viewport-popover-anchor",children:[e.jsxs(R,{children:[t==="2d"&&e.jsx(u,{text:"Smart Snap",children:e.jsx(f,{"aria-label":"Toggle smart snap","aria-pressed":a.smartSnap.enabled,variant:s,size:r,onClick:()=>a.setSmartSnap({enabled:!a.smartSnap.enabled}),children:e.jsx(d,{icon:B,size:"md"})})}),e.jsx(u,{text:t==="2d"?"Grid Snap":"Toggle Snap",hotkey:v("viewport.toggleSnap"),children:e.jsx(f,{"aria-label":"Toggle snap","aria-pressed":a.snapEnabled,variant:s,size:r,onClick:()=>a.toggleSnap(),children:e.jsx(d,{icon:G,size:"md"})})}),i?[["translate",h.tool.move,`${a.snapValues.translate}`],["rotate",h.tool.rotate,`${a.snapValues.rotate}°`],["scale",h.tool.scale,`${a.snapValues.scale}`]].map(([n,p,g])=>e.jsx(u,{text:"Snap Settings",children:e.jsxs(w,{"aria-label":`${n} snap step`,"aria-haspopup":"dialog","aria-expanded":o,variant:s,size:r,"data-snap-step":n,onClick:()=>S(!o),children:[e.jsx(d,{icon:p,size:"xs"}),g]})},n)):e.jsx(u,{text:"Snap Settings",children:e.jsx(f,{"aria-label":"Snap settings","aria-haspopup":"dialog","aria-expanded":o,variant:s,size:r,onClick:()=>S(!o),children:e.jsx(d,{icon:z,size:"xs"})})})]}),o&&e.jsx(M,{className:"volter-snap-popover",children:e.jsxs(A,{gap:2,children:[t==="2d"?e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Grid Step (px)"}),e.jsx(m,{type:"number","aria-label":"Grid step",value:a.snap2D.step,step:1,min:1,onChange:n=>a.setSnap2D({step:Number(n.target.value)||8})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Grid Offset (px)"}),e.jsxs(b,{gap:1,children:[e.jsx(m,{type:"number","aria-label":"Grid offset x",value:a.snap2D.offsetX,step:1,onChange:n=>a.setSnap2D({offsetX:Number(n.target.value)||0})}),e.jsx(m,{type:"number","aria-label":"Grid offset y",value:a.snap2D.offsetY,step:1,onChange:n=>a.setSnap2D({offsetY:Number(n.target.value)||0})})]}),e.jsx(l,{variant:"caption",tone:"muted",children:"Primary Line Every (steps)"}),e.jsx(m,{type:"number","aria-label":"Primary line every",value:a.snap2D.primaryEvery,step:1,min:1,onChange:n=>a.setSnap2D({primaryEvery:Number(n.target.value)||8})})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Translate"}),e.jsx(m,{type:"number",value:a.snapValues.translate,step:.25,min:.01,onChange:n=>a.setSnapValues({translate:Number(n.target.value)||1})})]}),t==="2d"?e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Rotation Offset (deg)"}),e.jsx(m,{type:"number","aria-label":"Rotation offset",value:a.snap2D.rotationOffset,step:1,onChange:n=>a.setSnap2D({rotationOffset:Number(n.target.value)||0})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Rotation Step (deg)"}),e.jsx(m,{type:"number","aria-label":"Rotation step",value:a.snap2D.rotationStep,step:1,min:1,onChange:n=>a.setSnap2D({rotationStep:Number(n.target.value)||15})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Scale Step"}),e.jsx(m,{type:"number","aria-label":"Scale step",value:a.snap2D.scaleStep,step:.05,min:.01,onChange:n=>a.setSnap2D({scaleStep:Number(n.target.value)||.1})})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Rotate (deg)"}),e.jsx(m,{type:"number",value:a.snapValues.rotate,step:5,min:1,onChange:n=>a.setSnapValues({rotate:Number(n.target.value)||15})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Scale"}),e.jsx(m,{type:"number",value:a.snapValues.scale,step:.05,min:.01,onChange:n=>a.setSnapValues({scale:Number(n.target.value)||.25})})]}),t==="2d"&&e.jsxs(e.Fragment,{children:[[["Use Rotation Snap",a.rotationSnap,()=>a.setRotationSnap(!a.rotationSnap)],["Use Scale Snap",a.scaleSnap,()=>a.setScaleSnap(!a.scaleSnap)],["Snap Relative",a.snap2D.relative,()=>a.setSnap2D({relative:!a.snap2D.relative})],["Use Pixel Snap",a.snap2D.pixel,()=>a.setSnap2D({pixel:!a.snap2D.pixel})]].map(([n,p,g])=>e.jsxs(b,{gap:2,align:"center",role:"menuitemcheckbox","aria-checked":p,onClick:g,children:[e.jsx(y,{checked:p,readOnly:!0}),e.jsx(l,{children:n})]},n)),e.jsx(l,{variant:"caption",tone:"muted",children:"Smart Snapping"}),[["parent","Snap to Parent"],["others","Snap to Other Nodes"],["sides","Snap to Node Sides"],["center","Snap to Node Center"],["guides","Snap to Guides"]].map(([n,p])=>e.jsxs(b,{gap:2,align:"center",role:"menuitemcheckbox","aria-checked":a.smartSnap[n],onClick:()=>a.setSmartSnap({[n]:!a.smartSnap[n]}),children:[e.jsx(y,{checked:a.smartSnap[n],readOnly:!0}),e.jsx(l,{children:p})]},n))]}),t==="3d"&&e.jsxs(e.Fragment,{children:[e.jsxs(b,{gap:2,align:"center",onClick:()=>a.toggleSnapToSurface(),children:[e.jsx(y,{checked:a.snapToSurface,readOnly:!0}),e.jsx(l,{children:"Snap to Surface"})]}),e.jsxs(l,{variant:"caption",tone:"dim",children:["Hold ",e.jsx(C,{children:"Ctrl"})," while dragging to snap once ·"," ",e.jsx(C,{children:v("viewport.toggleSnap")})," toggles"]}),e.jsxs(l,{variant:"caption",tone:"dim",children:["Hold ",e.jsx(C,{children:v("viewport.vertexSnapHold")})," during translate for vertex snap"]})]})]})})]})}const q={"active-element":"Active Element","median-point":"Median Point","individual-origins":"Individual Origins"};function W({store:a}){const t=["active-element","median-point","individual-origins"],r=`Pivot: ${q[a.pivotMode]}`;return e.jsx(u,{text:r,hotkey:v("viewport.cyclePivot"),children:e.jsx(f,{"aria-label":r,"aria-pressed":a.pivotMode!=="active-element",variant:"secondary",onClick:()=>{const s=t.indexOf(a.pivotMode);a.setPivotMode(t[(s+1)%t.length])},children:e.jsx(d,{icon:K,size:"md"})})})}const J={auto:"Auto",pivot:"Pivot",center:"Center"};function Q({store:a}){const t=["auto","pivot","center"],r=`Anchor: ${J[a.gizmoAnchor]}`;return e.jsx(u,{text:r,children:e.jsx(f,{"aria-label":r,"aria-pressed":a.gizmoAnchor!=="auto",variant:"secondary",onClick:()=>{const s=t.indexOf(a.gizmoAnchor);a.setGizmoAnchor(t[(s+1)%t.length])},children:e.jsx(d,{icon:a.gizmoAnchor==="center"?_:X,size:"md"})})})}function Z({store:a}){const[t,r]=c.useState(!1),s=c.useRef(null);return c.useEffect(()=>{if(!t)return;const i=o=>{s.current?.contains(o.target)||r(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t]),e.jsxs("div",{ref:s,className:"volter-viewport-popover-anchor",children:[e.jsx(u,{text:"Transform options",children:e.jsx(f,{"aria-label":"Transform options","aria-haspopup":"dialog","aria-expanded":t,variant:"secondary",onClick:()=>r(i=>!i),children:e.jsx(d,{icon:Y,size:"md"})})}),t?e.jsx(M,{style:{minWidth:240},children:e.jsxs(A,{gap:3,children:[e.jsxs(w,{size:"compact",variant:"ghost",onClick:()=>{a.snapSelectionToFloor(),r(!1)},children:["Snap Selection to Floor ",e.jsx(C,{children:v("viewport.snapToFloor")})]}),e.jsxs(b,{gap:2,align:"center",onClick:()=>a.togglePreserveChildrenTransform(),style:{cursor:"pointer"},children:[e.jsx(y,{checked:a.preserveChildrenTransform,readOnly:!0}),e.jsx(l,{children:"Preserve Children Transform"})]}),e.jsx(l,{variant:"caption",tone:"dim",children:"Keep source-writable children fixed in world space while their parent moves."})]})}):null]})}function ee({store:a}){const[t,r]=c.useState(!1),s=c.useRef(null),i=a.transformSpace==="world"?"Global":"Local";return e.jsxs("div",{className:"volter-viewport-popover-anchor",children:[e.jsx(u,{text:`Transform orientation: ${i}`,children:e.jsxs(w,{ref:s,type:"button",size:"compact",variant:"secondary","aria-label":`Transform orientation: ${i}`,"aria-haspopup":"menu","aria-expanded":t,onClick:()=>r(o=>!o),className:"volter-transform-orientation-trigger",children:[e.jsx(d,{icon:a.transformSpace==="world"?L:V,size:"sm"}),e.jsx("span",{children:i}),e.jsx(d,{icon:z,size:"xs"})]})}),t&&e.jsx($,{anchorRef:s,align:"start",clamp:!0,"aria-label":"Transform orientation",onDismiss:()=>r(!1),children:["world","local"].map(o=>e.jsxs(U,{role:"menuitemradio","aria-checked":a.transformSpace===o,onSelect:()=>{a.setTransformSpace(o),r(!1)},children:[e.jsx("span",{className:"volter-menu-check",children:a.transformSpace===o&&e.jsx(d,{icon:H,size:"xs"})}),o==="world"?"Global":"Local"]},o))})]})}function ie({store:a}={}){const t=N(),r=a??t;c.useSyncExternalStore(r.subscribe,r.getShellSnapshot??r.getSnapshot),c.useSyncExternalStore(O,k,k);const[s,i]=c.useState(null),o=s?.closest(".volter-stage-bar")!=null;return e.jsxs(F,{compact:!0,label:"Transform controls","data-testid":"transform-header-controls",className:"volter-transform-header-controls",children:[e.jsx("span",{ref:i,hidden:!0}),e.jsx(ee,{store:r}),e.jsxs(R,{children:[e.jsx(W,{store:r}),e.jsx(Q,{store:r})]}),e.jsx(I,{store:r,size:"default",variant:"secondary",showValues:o}),e.jsx(Z,{store:r})]})}const ae=()=>()=>{},E=()=>null;function le({dimensions:a="3d",door:t,store:r,otherToolActive:s=!1,onToolArmed:i,viewTools:o,trailingTools:S}={}){const j=N(),n=r??j;c.useSyncExternalStore(n.subscribe,n.getShellSnapshot??n.getSnapshot),c.useSyncExternalStore(O,k,k);const p=c.useSyncExternalStore(t?.subscribe??ae,t?.armed??E,t?.armed??E),g=[{mode:"translate",faIcon:h.tool.move,action:"transform.translate",label:"Move"},{mode:"rotate",faIcon:h.tool.rotate,action:"transform.rotate",label:"Rotate"},{mode:"scale",faIcon:h.tool.scale,action:"transform.scale",label:"Scale"}];return e.jsxs(P,{label:"Transform tools","data-testid":a==="2d"?"canvas-2d-toolstrip":"threejs-toolstrip",className:"volter-viewport-toolbar volter-viewport-toolbar-left",children:[t?null:e.jsx(D,{faIcon:h.tool.select,action:"transform.select",label:"Select",active:!s&&(n.transformMode==="select"||a==="2d"&&n.transformMode==="combined"),onArm:()=>{i?.(),T(n,"select")}}),g.map(x=>e.jsx(D,{faIcon:x.faIcon,action:x.action,label:x.label,active:!s&&(t?p===x.mode:n.transformMode===x.mode),onArm:()=>{i?.(),t?t.begin(x.mode):T(n,x.mode)}},x.mode)),t||a==="2d"?null:e.jsx(D,{faIcon:h.tool.transform,action:"transform.combined",label:"Transform (all handles)",active:n.transformMode==="combined",onArm:()=>T(n,"combined")}),o,a==="2d"?e.jsx(I,{store:n,dimensions:"2d"}):null,S]})}export{ie as T,le as a};
1
+ import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{U as N,d7 as O,d8 as k,d9 as P,a8 as h,bw as u,aM as f,a7 as d,da as v,db as R,dc as B,dd as G,a6 as w,bz as z,bP as M,de as A,aL as l,aN as m,df as b,aS as y,dg as C,bv as F,dh as L,by as V,bA as $,bB as U,bD as H,di as K,dj as _,dk as X,dl as Y}from"./index-D-G1ZsCu.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{r as T}from"./transform-mode-request-C58tmPGV.js";function D({active:a,onArm:t,faIcon:r,action:s,label:i}){return e.jsx(u,{text:i,hotkey:v(s),children:e.jsx(f,{"aria-label":i,"aria-pressed":a,shape:"segment",size:"comfortable",onClick:t,children:e.jsx(d,{icon:r,size:"md"})})})}function I({store:a,dimensions:t="3d",size:r="comfortable",variant:s="ghost",showValues:i=!1}){const[o,S]=c.useState(!1),j=c.useRef(null);return c.useEffect(()=>{if(!o)return;const n=p=>{j.current&&!j.current.contains(p.target)&&S(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[o]),e.jsxs("div",{ref:j,className:"volter-viewport-popover-anchor",children:[e.jsxs(R,{children:[t==="2d"&&e.jsx(u,{text:"Smart Snap",children:e.jsx(f,{"aria-label":"Toggle smart snap","aria-pressed":a.smartSnap.enabled,variant:s,size:r,onClick:()=>a.setSmartSnap({enabled:!a.smartSnap.enabled}),children:e.jsx(d,{icon:B,size:"md"})})}),e.jsx(u,{text:t==="2d"?"Grid Snap":"Toggle Snap",hotkey:v("viewport.toggleSnap"),children:e.jsx(f,{"aria-label":"Toggle snap","aria-pressed":a.snapEnabled,variant:s,size:r,onClick:()=>a.toggleSnap(),children:e.jsx(d,{icon:G,size:"md"})})}),i?[["translate",h.tool.move,`${a.snapValues.translate}`],["rotate",h.tool.rotate,`${a.snapValues.rotate}°`],["scale",h.tool.scale,`${a.snapValues.scale}`]].map(([n,p,g])=>e.jsx(u,{text:"Snap Settings",children:e.jsxs(w,{"aria-label":`${n} snap step`,"aria-haspopup":"dialog","aria-expanded":o,variant:s,size:r,"data-snap-step":n,onClick:()=>S(!o),children:[e.jsx(d,{icon:p,size:"xs"}),g]})},n)):e.jsx(u,{text:"Snap Settings",children:e.jsx(f,{"aria-label":"Snap settings","aria-haspopup":"dialog","aria-expanded":o,variant:s,size:r,onClick:()=>S(!o),children:e.jsx(d,{icon:z,size:"xs"})})})]}),o&&e.jsx(M,{className:"volter-snap-popover",children:e.jsxs(A,{gap:2,children:[t==="2d"?e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Grid Step (px)"}),e.jsx(m,{type:"number","aria-label":"Grid step",value:a.snap2D.step,step:1,min:1,onChange:n=>a.setSnap2D({step:Number(n.target.value)||8})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Grid Offset (px)"}),e.jsxs(b,{gap:1,children:[e.jsx(m,{type:"number","aria-label":"Grid offset x",value:a.snap2D.offsetX,step:1,onChange:n=>a.setSnap2D({offsetX:Number(n.target.value)||0})}),e.jsx(m,{type:"number","aria-label":"Grid offset y",value:a.snap2D.offsetY,step:1,onChange:n=>a.setSnap2D({offsetY:Number(n.target.value)||0})})]}),e.jsx(l,{variant:"caption",tone:"muted",children:"Primary Line Every (steps)"}),e.jsx(m,{type:"number","aria-label":"Primary line every",value:a.snap2D.primaryEvery,step:1,min:1,onChange:n=>a.setSnap2D({primaryEvery:Number(n.target.value)||8})})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Translate"}),e.jsx(m,{type:"number",value:a.snapValues.translate,step:.25,min:.01,onChange:n=>a.setSnapValues({translate:Number(n.target.value)||1})})]}),t==="2d"?e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Rotation Offset (deg)"}),e.jsx(m,{type:"number","aria-label":"Rotation offset",value:a.snap2D.rotationOffset,step:1,onChange:n=>a.setSnap2D({rotationOffset:Number(n.target.value)||0})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Rotation Step (deg)"}),e.jsx(m,{type:"number","aria-label":"Rotation step",value:a.snap2D.rotationStep,step:1,min:1,onChange:n=>a.setSnap2D({rotationStep:Number(n.target.value)||15})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Scale Step"}),e.jsx(m,{type:"number","aria-label":"Scale step",value:a.snap2D.scaleStep,step:.05,min:.01,onChange:n=>a.setSnap2D({scaleStep:Number(n.target.value)||.1})})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"caption",tone:"muted",children:"Rotate (deg)"}),e.jsx(m,{type:"number",value:a.snapValues.rotate,step:5,min:1,onChange:n=>a.setSnapValues({rotate:Number(n.target.value)||15})}),e.jsx(l,{variant:"caption",tone:"muted",children:"Scale"}),e.jsx(m,{type:"number",value:a.snapValues.scale,step:.05,min:.01,onChange:n=>a.setSnapValues({scale:Number(n.target.value)||.25})})]}),t==="2d"&&e.jsxs(e.Fragment,{children:[[["Use Rotation Snap",a.rotationSnap,()=>a.setRotationSnap(!a.rotationSnap)],["Use Scale Snap",a.scaleSnap,()=>a.setScaleSnap(!a.scaleSnap)],["Snap Relative",a.snap2D.relative,()=>a.setSnap2D({relative:!a.snap2D.relative})],["Use Pixel Snap",a.snap2D.pixel,()=>a.setSnap2D({pixel:!a.snap2D.pixel})]].map(([n,p,g])=>e.jsxs(b,{gap:2,align:"center",role:"menuitemcheckbox","aria-checked":p,onClick:g,children:[e.jsx(y,{checked:p,readOnly:!0}),e.jsx(l,{children:n})]},n)),e.jsx(l,{variant:"caption",tone:"muted",children:"Smart Snapping"}),[["parent","Snap to Parent"],["others","Snap to Other Nodes"],["sides","Snap to Node Sides"],["center","Snap to Node Center"],["guides","Snap to Guides"]].map(([n,p])=>e.jsxs(b,{gap:2,align:"center",role:"menuitemcheckbox","aria-checked":a.smartSnap[n],onClick:()=>a.setSmartSnap({[n]:!a.smartSnap[n]}),children:[e.jsx(y,{checked:a.smartSnap[n],readOnly:!0}),e.jsx(l,{children:p})]},n))]}),t==="3d"&&e.jsxs(e.Fragment,{children:[e.jsxs(b,{gap:2,align:"center",onClick:()=>a.toggleSnapToSurface(),children:[e.jsx(y,{checked:a.snapToSurface,readOnly:!0}),e.jsx(l,{children:"Snap to Surface"})]}),e.jsxs(l,{variant:"caption",tone:"dim",children:["Hold ",e.jsx(C,{children:"Ctrl"})," while dragging to snap once ·"," ",e.jsx(C,{children:v("viewport.toggleSnap")})," toggles"]}),e.jsxs(l,{variant:"caption",tone:"dim",children:["Hold ",e.jsx(C,{children:v("viewport.vertexSnapHold")})," during translate for vertex snap"]})]})]})})]})}const q={"active-element":"Active Element","median-point":"Median Point","individual-origins":"Individual Origins"};function W({store:a}){const t=["active-element","median-point","individual-origins"],r=`Pivot: ${q[a.pivotMode]}`;return e.jsx(u,{text:r,hotkey:v("viewport.cyclePivot"),children:e.jsx(f,{"aria-label":r,"aria-pressed":a.pivotMode!=="active-element",variant:"secondary",onClick:()=>{const s=t.indexOf(a.pivotMode);a.setPivotMode(t[(s+1)%t.length])},children:e.jsx(d,{icon:K,size:"md"})})})}const J={auto:"Auto",pivot:"Pivot",center:"Center"};function Q({store:a}){const t=["auto","pivot","center"],r=`Anchor: ${J[a.gizmoAnchor]}`;return e.jsx(u,{text:r,children:e.jsx(f,{"aria-label":r,"aria-pressed":a.gizmoAnchor!=="auto",variant:"secondary",onClick:()=>{const s=t.indexOf(a.gizmoAnchor);a.setGizmoAnchor(t[(s+1)%t.length])},children:e.jsx(d,{icon:a.gizmoAnchor==="center"?_:X,size:"md"})})})}function Z({store:a}){const[t,r]=c.useState(!1),s=c.useRef(null);return c.useEffect(()=>{if(!t)return;const i=o=>{s.current?.contains(o.target)||r(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t]),e.jsxs("div",{ref:s,className:"volter-viewport-popover-anchor",children:[e.jsx(u,{text:"Transform options",children:e.jsx(f,{"aria-label":"Transform options","aria-haspopup":"dialog","aria-expanded":t,variant:"secondary",onClick:()=>r(i=>!i),children:e.jsx(d,{icon:Y,size:"md"})})}),t?e.jsx(M,{style:{minWidth:240},children:e.jsxs(A,{gap:3,children:[e.jsxs(w,{size:"compact",variant:"ghost",onClick:()=>{a.snapSelectionToFloor(),r(!1)},children:["Snap Selection to Floor ",e.jsx(C,{children:v("viewport.snapToFloor")})]}),e.jsxs(b,{gap:2,align:"center",onClick:()=>a.togglePreserveChildrenTransform(),style:{cursor:"pointer"},children:[e.jsx(y,{checked:a.preserveChildrenTransform,readOnly:!0}),e.jsx(l,{children:"Preserve Children Transform"})]}),e.jsx(l,{variant:"caption",tone:"dim",children:"Keep source-writable children fixed in world space while their parent moves."})]})}):null]})}function ee({store:a}){const[t,r]=c.useState(!1),s=c.useRef(null),i=a.transformSpace==="world"?"Global":"Local";return e.jsxs("div",{className:"volter-viewport-popover-anchor",children:[e.jsx(u,{text:`Transform orientation: ${i}`,children:e.jsxs(w,{ref:s,type:"button",size:"compact",variant:"secondary","aria-label":`Transform orientation: ${i}`,"aria-haspopup":"menu","aria-expanded":t,onClick:()=>r(o=>!o),className:"volter-transform-orientation-trigger",children:[e.jsx(d,{icon:a.transformSpace==="world"?L:V,size:"sm"}),e.jsx("span",{children:i}),e.jsx(d,{icon:z,size:"xs"})]})}),t&&e.jsx($,{anchorRef:s,align:"start",clamp:!0,"aria-label":"Transform orientation",onDismiss:()=>r(!1),children:["world","local"].map(o=>e.jsxs(U,{role:"menuitemradio","aria-checked":a.transformSpace===o,onSelect:()=>{a.setTransformSpace(o),r(!1)},children:[e.jsx("span",{className:"volter-menu-check",children:a.transformSpace===o&&e.jsx(d,{icon:H,size:"xs"})}),o==="world"?"Global":"Local"]},o))})]})}function ie({store:a}={}){const t=N(),r=a??t;c.useSyncExternalStore(r.subscribe,r.getShellSnapshot??r.getSnapshot),c.useSyncExternalStore(O,k,k);const[s,i]=c.useState(null),o=s?.closest(".volter-stage-bar")!=null;return e.jsxs(F,{compact:!0,label:"Transform controls","data-testid":"transform-header-controls",className:"volter-transform-header-controls",children:[e.jsx("span",{ref:i,hidden:!0}),e.jsx(ee,{store:r}),e.jsxs(R,{children:[e.jsx(W,{store:r}),e.jsx(Q,{store:r})]}),e.jsx(I,{store:r,size:"default",variant:"secondary",showValues:o}),e.jsx(Z,{store:r})]})}const ae=()=>()=>{},E=()=>null;function le({dimensions:a="3d",door:t,store:r,otherToolActive:s=!1,onToolArmed:i,viewTools:o,trailingTools:S}={}){const j=N(),n=r??j;c.useSyncExternalStore(n.subscribe,n.getShellSnapshot??n.getSnapshot),c.useSyncExternalStore(O,k,k);const p=c.useSyncExternalStore(t?.subscribe??ae,t?.armed??E,t?.armed??E),g=[{mode:"translate",faIcon:h.tool.move,action:"transform.translate",label:"Move"},{mode:"rotate",faIcon:h.tool.rotate,action:"transform.rotate",label:"Rotate"},{mode:"scale",faIcon:h.tool.scale,action:"transform.scale",label:"Scale"}];return e.jsxs(P,{label:"Transform tools","data-testid":a==="2d"?"canvas-2d-toolstrip":"threejs-toolstrip",className:"volter-viewport-toolbar volter-viewport-toolbar-left",children:[t?null:e.jsx(D,{faIcon:h.tool.select,action:"transform.select",label:"Select",active:!s&&(n.transformMode==="select"||a==="2d"&&n.transformMode==="combined"),onArm:()=>{i?.(),T(n,"select")}}),g.map(x=>e.jsx(D,{faIcon:x.faIcon,action:x.action,label:x.label,active:!s&&(t?p===x.mode:n.transformMode===x.mode),onArm:()=>{i?.(),t?t.begin(x.mode):T(n,x.mode)}},x.mode)),t||a==="2d"?null:e.jsx(D,{faIcon:h.tool.transform,action:"transform.combined",label:"Transform (all handles)",active:n.transformMode==="combined",onArm:()=>T(n,"combined")}),o,a==="2d"?e.jsx(I,{store:n,dimensions:"2d"}):null,S]})}export{ie as T,le as a};
@@ -1 +1 @@
1
- import{a}from"./jsx-runtime-DPjLkJKQ.js";import{r as s}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{dm as i,dn as n,dp as o,al as t,dq as r}from"./index-DmNeCiAo.js";function u(){const e=s.useSyncExternalStore(i,n,n);return e?a.jsx("div",{role:"status","aria-live":"polite","data-testid":"transient-hint",style:{position:"absolute",left:"50%",bottom:r[6],transform:"translateX(-50%)",maxWidth:"min(440px, 80%)",padding:`${r[3]}px ${r[5]}px`,borderRadius:t.shape.medium,border:`1px solid ${t.boundary.strong}`,background:t.surface.overlay,color:t.content.primary,fontSize:"var(--volter-font-base)",lineHeight:1.4,textAlign:"center",pointerEvents:"none",zIndex:o.toast},children:e.message},e.id):null}export{u as T};
1
+ import{a}from"./jsx-runtime-DPjLkJKQ.js";import{r as s}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{dm as i,dn as n,dp as o,al as t,dq as r}from"./index-D-G1ZsCu.js";function u(){const e=s.useSyncExternalStore(i,n,n);return e?a.jsx("div",{role:"status","aria-live":"polite","data-testid":"transient-hint",style:{position:"absolute",left:"50%",bottom:r[6],transform:"translateX(-50%)",maxWidth:"min(440px, 80%)",padding:`${r[3]}px ${r[5]}px`,borderRadius:t.shape.medium,border:`1px solid ${t.boundary.strong}`,background:t.surface.overlay,color:t.content.primary,fontSize:"var(--volter-font-base)",lineHeight:1.4,textAlign:"center",pointerEvents:"none",zIndex:o.toast},children:e.message},e.id):null}export{u as T};
@@ -1 +1 @@
1
- import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{aL as c,aZ as x}from"./index-DmNeCiAo.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function H({assetPath:s}){const[p,a]=r.useState(!1),[d,m]=r.useState(null),i=s;r.useEffect(()=>{a(!1)},[i]);const n=s.split("/").pop()??s,l=r.useCallback(e=>{if(e){if(e.error){a(!0);return}e.videoWidth<=0||m(o=>o&&o.w===e.videoWidth&&o.h===e.videoHeight?o:{w:e.videoWidth,h:e.videoHeight})}},[]);return t.jsxs("div",{"data-testid":"video-asset-document",style:{height:"100%",minHeight:240,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px"},children:[t.jsx(c,{tone:"dim",variant:"label",children:n}),d&&t.jsxs(c,{tone:"muted",variant:"code",children:[d.w," × ",d.h]})]}),t.jsx("div",{className:"volter-asset-transparency-well",style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center",padding:12},children:p?t.jsxs("div",{style:{color:x[2],fontSize:12,textAlign:"center"},children:[n," could not be played from ",i,". The file may be missing, or its codec may not be one this browser decodes."]}):t.jsx("video",{src:i,controls:!0,playsInline:!0,preload:"metadata",ref:l,onError:()=>a(!0),onLoadedMetadata:e=>l(e.currentTarget),style:{maxWidth:"100%",maxHeight:"100%",display:"block"}},i)})]})}export{H as VideoViewer};
1
+ import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{aL as c,aZ as x}from"./index-D-G1ZsCu.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function H({assetPath:s}){const[p,a]=r.useState(!1),[d,m]=r.useState(null),i=s;r.useEffect(()=>{a(!1)},[i]);const n=s.split("/").pop()??s,l=r.useCallback(e=>{if(e){if(e.error){a(!0);return}e.videoWidth<=0||m(o=>o&&o.w===e.videoWidth&&o.h===e.videoHeight?o:{w:e.videoWidth,h:e.videoHeight})}},[]);return t.jsxs("div",{"data-testid":"video-asset-document",style:{height:"100%",minHeight:240,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px"},children:[t.jsx(c,{tone:"dim",variant:"label",children:n}),d&&t.jsxs(c,{tone:"muted",variant:"code",children:[d.w," × ",d.h]})]}),t.jsx("div",{className:"volter-asset-transparency-well",style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center",padding:12},children:p?t.jsxs("div",{style:{color:x[2],fontSize:12,textAlign:"center"},children:[n," could not be played from ",i,". The file may be missing, or its codec may not be one this browser decodes."]}):t.jsx("video",{src:i,controls:!0,playsInline:!0,preload:"metadata",ref:l,onError:()=>a(!0),onLoadedMetadata:e=>l(e.currentTarget),style:{maxWidth:"100%",maxHeight:"100%",display:"block"}},i)})]})}export{H as VideoViewer};
@@ -1 +1 @@
1
- import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{fz as C,bB as b,a7 as c,bD as g,bC as w,a6 as y,bz as j,db as S,bw as f,aM as v,fA as M,fB as z,bA as N,al as V}from"./index-DmNeCiAo.js";import{r as x}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";function T(){return e.jsxs("svg",{viewBox:"0 0 16 16",className:"volter-viewport-overlays-glyph","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{d:"M5.24 4.51 A5.3 5.3 0 1 1 11.89 11.16 A5.85 5.85 0 0 0 5.24 4.51 Z",fill:"currentColor"}),e.jsx("circle",{cx:"6.1",cy:"10.3",r:"4.4",fill:"none",stroke:"currentColor",strokeWidth:"1.1"})]})}function D({label:r="Overlays",choices:p,master:l,glyph:t,word:h}){const[s,o]=x.useState(!1),i=x.useRef(null),m=p.some(n=>n.enabled),d=l?.enabled??m,u=t??e.jsx(c,{icon:d?M:z,size:"md"});x.useEffect(()=>{if(!s)return;const n=k=>{i.current&&!i.current.contains(k.target)&&o(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[s]);const a=s?e.jsxs(C,{className:"volter-helpers-menu",onDismiss:()=>o(!1),children:[l?e.jsxs(e.Fragment,{children:[e.jsxs(b,{role:"menuitemcheckbox","aria-checked":l.enabled,onSelect:l.onToggle,children:[e.jsx("span",{className:"volter-menu-check",children:l.enabled&&e.jsx(c,{icon:g,size:"xs"})}),"Show ",r]}),e.jsx(w,{})]}):null,p.map(n=>e.jsxs(b,{role:"menuitemcheckbox","aria-checked":n.enabled,disabled:n.disabled,onSelect:n.onToggle,children:[e.jsx("span",{className:"volter-menu-check",children:n.enabled&&e.jsx(c,{icon:g,size:"xs"})}),n.label]},n.id))]}):null;return h!==void 0?e.jsxs("div",{ref:i,className:"volter-viewport-popover-anchor",children:[e.jsxs(y,{variant:"ghost",size:"comfortable","aria-label":`Choose ${r.toLowerCase()}`,"aria-expanded":s,onClick:()=>o(!s),children:[h,e.jsx(c,{icon:j,size:"xs"})]}),a]}):e.jsxs("div",{ref:i,className:"volter-viewport-popover-anchor",children:[l?e.jsxs(S,{children:[e.jsx(f,{text:`${r}: ${d?"On":"Off"}`,children:e.jsx(v,{"aria-label":`Toggle ${r.toLowerCase()}`,"aria-pressed":d,size:"comfortable",onClick:l.onToggle,children:u})}),e.jsx(v,{"aria-label":`Choose ${r.toLowerCase()}`,"aria-expanded":s,size:"comfortable",onClick:()=>o(!s),children:e.jsx(c,{icon:j,size:"xs"})})]}):e.jsx(f,{text:`${r}: ${d?"On":"Off"}`,children:e.jsx(v,{"aria-label":`Choose ${r.toLowerCase()}`,"aria-expanded":s,"aria-pressed":d,size:"comfortable",onClick:()=>o(!s),children:u})}),a]})}const O=[{mode:"solid",label:"Material",description:"Authored materials and lighting"},{mode:"clay",label:"Solid",description:"Neutral flat-shaded geometry"},{mode:"unlit",label:"Unlit",description:"Base color without scene lighting"},{mode:"wireframe",label:"Wireframe",description:"Renderable triangle edges"},{mode:"matcap",label:"Matcap",description:"Neutral clay sphere — form without color"},{mode:"normals",label:"Normals",description:"Surface-normal direction colors"},{mode:"overdraw",label:"Overdraw",description:"Additive overlap visualization"}],$={preview:"Material Preview",rendered:"Rendered",uv:"UV","vertex-colors":"Vertex Colors"},I=[{mode:"wireframe",glyph:"wireframe",label:"Wireframe"},{mode:"clay",glyph:"sphere",label:"Solid"},{mode:"solid",glyph:"preview",label:"Material"}];function G(r){return[{mode:"wireframe",glyph:"wireframe",label:"Wireframe"},{mode:"solid",glyph:"sphere",label:"Solid"},...r.has("preview")?[{mode:"preview",glyph:"preview",label:"Material Preview"}]:[],...r.has("rendered")?[{mode:"rendered",glyph:"rendered",label:"Rendered"}]:[]]}function E({glyph:r}){return e.jsxs("svg",{viewBox:"0 0 16 16",className:"volter-viewport-shading-glyph","aria-hidden":"true",focusable:"false",children:[r==="sphere"||r==="rendered"?e.jsx("circle",{cx:"8",cy:"8",r:"7.3",fill:"currentColor"}):e.jsx("circle",{cx:"8",cy:"8",r:"7.3",fill:"none",stroke:"currentColor",strokeWidth:"1.05"}),r==="wireframe"?e.jsxs("g",{stroke:"currentColor",strokeWidth:"1.05",children:[e.jsx("line",{x1:"1.7",y1:"5.4",x2:"14.3",y2:"5.4"}),e.jsx("line",{x1:"1.7",y1:"10.6",x2:"14.3",y2:"10.6"}),e.jsx("line",{x1:"5.4",y1:"1.7",x2:"5.4",y2:"14.3"})]}):null,r==="rendered"?e.jsx("circle",{cx:"5.6",cy:"5.6",r:"2.3",fill:"var(--volter-surface-overlay, #ffffff)",fillOpacity:"0.7"}):null,r==="preview"?e.jsx("path",{d:"M7.73 1.23 L7.73 10.43 L1.22 8.04 A6.78 6.78 0 0 1 7.73 1.23 Z",fill:"currentColor"}):null]})}function A({mode:r,onChange:p,choices:l,disabled:t=!1,segments:h,children:s}){const[o,i]=x.useState(!1),m=x.useRef(null),d=l.find(a=>a.mode===r)??l[0];if(!d)return null;const u=o&&!t?e.jsxs(N,{id:"volter-viewport-shading-menu",anchorRef:m,"aria-label":"Viewport shading modes",onDismiss:()=>i(!1),style:{minWidth:230},children:[l.map(a=>e.jsxs(b,{role:"menuitemradio","aria-checked":a.mode===r,onSelect:()=>{p(a.mode),i(!1)},style:{display:"grid",gridTemplateColumns:"14px 1fr",gap:7},children:[e.jsx("span",{style:{opacity:a.mode===r?1:0},children:e.jsx(c,{icon:g,size:"xs"})}),e.jsxs("span",{children:[e.jsx("span",{style:{display:"block"},children:a.label}),e.jsx("span",{style:{display:"block",color:V.content.dim,fontSize:10},children:a.description})]})]},a.mode)),s?e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsx("div",{className:"volter-viewport-shading-options",children:s})]}):null]}):null;return h?e.jsxs("div",{className:"volter-viewport-popover-anchor",children:[e.jsxs("span",{className:"volter-viewport-shading-segments",role:"group","aria-label":"Viewport shading",children:[h.map(a=>e.jsx(f,{text:`Viewport shading: ${a.label}`,children:e.jsx(v,{size:"compact",shape:"segment",variant:"secondary","aria-pressed":a.mode===r,"aria-label":`Viewport shading: ${a.label}`,disabled:t,onClick:()=>p(a.mode),children:e.jsx(E,{glyph:a.glyph})})},a.mode)),e.jsx(f,{text:"Shading options",children:e.jsx(v,{ref:m,size:"compact",shape:"segment",variant:"secondary","aria-label":"Shading options","aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?"volter-viewport-shading-menu":void 0,disabled:t,onClick:()=>i(a=>!a),children:e.jsx(c,{icon:j,size:"xs"})})})]}),u]}):e.jsxs("div",{style:{position:"relative"},children:[e.jsx(f,{text:`Viewport shading: ${d.label}`,children:e.jsxs(y,{ref:m,type:"button",size:"compact",variant:"secondary","aria-label":`Viewport shading: ${d.label}`,"aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?"volter-viewport-shading-menu":void 0,disabled:t,onClick:()=>i(a=>!a),style:{display:"inline-flex",alignItems:"center",gap:5,minWidth:66},children:[e.jsx("span",{children:d.label}),e.jsx(c,{icon:j,size:"xs"})]})}),u]})}function F({mode:r,onChange:p,disabled:l=!1,words:t}){const h=x.useMemo(()=>{const s=O.map(i=>({...i,label:t?.[i.mode]??i.label}));if(s.some(i=>i.mode===r))return s;const o=t?.[r]??$[r]??r;return[...s,{mode:r,label:o,description:"The mode this view is drawn in"}]},[t,r]);return e.jsx(A,{mode:r,onChange:p,choices:h,disabled:l})}export{A as V,I as a,D as b,T as c,F as d,G as p,O as v};
1
+ import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{fz as C,bB as b,a7 as c,bD as g,bC as w,a6 as y,bz as j,db as S,bw as f,aM as v,fA as M,fB as z,bA as N,al as V}from"./index-D-G1ZsCu.js";import{r as x}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";function T(){return e.jsxs("svg",{viewBox:"0 0 16 16",className:"volter-viewport-overlays-glyph","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{d:"M5.24 4.51 A5.3 5.3 0 1 1 11.89 11.16 A5.85 5.85 0 0 0 5.24 4.51 Z",fill:"currentColor"}),e.jsx("circle",{cx:"6.1",cy:"10.3",r:"4.4",fill:"none",stroke:"currentColor",strokeWidth:"1.1"})]})}function D({label:r="Overlays",choices:p,master:l,glyph:t,word:h}){const[s,o]=x.useState(!1),i=x.useRef(null),m=p.some(n=>n.enabled),d=l?.enabled??m,u=t??e.jsx(c,{icon:d?M:z,size:"md"});x.useEffect(()=>{if(!s)return;const n=k=>{i.current&&!i.current.contains(k.target)&&o(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[s]);const a=s?e.jsxs(C,{className:"volter-helpers-menu",onDismiss:()=>o(!1),children:[l?e.jsxs(e.Fragment,{children:[e.jsxs(b,{role:"menuitemcheckbox","aria-checked":l.enabled,onSelect:l.onToggle,children:[e.jsx("span",{className:"volter-menu-check",children:l.enabled&&e.jsx(c,{icon:g,size:"xs"})}),"Show ",r]}),e.jsx(w,{})]}):null,p.map(n=>e.jsxs(b,{role:"menuitemcheckbox","aria-checked":n.enabled,disabled:n.disabled,onSelect:n.onToggle,children:[e.jsx("span",{className:"volter-menu-check",children:n.enabled&&e.jsx(c,{icon:g,size:"xs"})}),n.label]},n.id))]}):null;return h!==void 0?e.jsxs("div",{ref:i,className:"volter-viewport-popover-anchor",children:[e.jsxs(y,{variant:"ghost",size:"comfortable","aria-label":`Choose ${r.toLowerCase()}`,"aria-expanded":s,onClick:()=>o(!s),children:[h,e.jsx(c,{icon:j,size:"xs"})]}),a]}):e.jsxs("div",{ref:i,className:"volter-viewport-popover-anchor",children:[l?e.jsxs(S,{children:[e.jsx(f,{text:`${r}: ${d?"On":"Off"}`,children:e.jsx(v,{"aria-label":`Toggle ${r.toLowerCase()}`,"aria-pressed":d,size:"comfortable",onClick:l.onToggle,children:u})}),e.jsx(v,{"aria-label":`Choose ${r.toLowerCase()}`,"aria-expanded":s,size:"comfortable",onClick:()=>o(!s),children:e.jsx(c,{icon:j,size:"xs"})})]}):e.jsx(f,{text:`${r}: ${d?"On":"Off"}`,children:e.jsx(v,{"aria-label":`Choose ${r.toLowerCase()}`,"aria-expanded":s,"aria-pressed":d,size:"comfortable",onClick:()=>o(!s),children:u})}),a]})}const O=[{mode:"solid",label:"Material",description:"Authored materials and lighting"},{mode:"clay",label:"Solid",description:"Neutral flat-shaded geometry"},{mode:"unlit",label:"Unlit",description:"Base color without scene lighting"},{mode:"wireframe",label:"Wireframe",description:"Renderable triangle edges"},{mode:"matcap",label:"Matcap",description:"Neutral clay sphere — form without color"},{mode:"normals",label:"Normals",description:"Surface-normal direction colors"},{mode:"overdraw",label:"Overdraw",description:"Additive overlap visualization"}],$={preview:"Material Preview",rendered:"Rendered",uv:"UV","vertex-colors":"Vertex Colors"},I=[{mode:"wireframe",glyph:"wireframe",label:"Wireframe"},{mode:"clay",glyph:"sphere",label:"Solid"},{mode:"solid",glyph:"preview",label:"Material"}];function G(r){return[{mode:"wireframe",glyph:"wireframe",label:"Wireframe"},{mode:"solid",glyph:"sphere",label:"Solid"},...r.has("preview")?[{mode:"preview",glyph:"preview",label:"Material Preview"}]:[],...r.has("rendered")?[{mode:"rendered",glyph:"rendered",label:"Rendered"}]:[]]}function E({glyph:r}){return e.jsxs("svg",{viewBox:"0 0 16 16",className:"volter-viewport-shading-glyph","aria-hidden":"true",focusable:"false",children:[r==="sphere"||r==="rendered"?e.jsx("circle",{cx:"8",cy:"8",r:"7.3",fill:"currentColor"}):e.jsx("circle",{cx:"8",cy:"8",r:"7.3",fill:"none",stroke:"currentColor",strokeWidth:"1.05"}),r==="wireframe"?e.jsxs("g",{stroke:"currentColor",strokeWidth:"1.05",children:[e.jsx("line",{x1:"1.7",y1:"5.4",x2:"14.3",y2:"5.4"}),e.jsx("line",{x1:"1.7",y1:"10.6",x2:"14.3",y2:"10.6"}),e.jsx("line",{x1:"5.4",y1:"1.7",x2:"5.4",y2:"14.3"})]}):null,r==="rendered"?e.jsx("circle",{cx:"5.6",cy:"5.6",r:"2.3",fill:"var(--volter-surface-overlay, #ffffff)",fillOpacity:"0.7"}):null,r==="preview"?e.jsx("path",{d:"M7.73 1.23 L7.73 10.43 L1.22 8.04 A6.78 6.78 0 0 1 7.73 1.23 Z",fill:"currentColor"}):null]})}function A({mode:r,onChange:p,choices:l,disabled:t=!1,segments:h,children:s}){const[o,i]=x.useState(!1),m=x.useRef(null),d=l.find(a=>a.mode===r)??l[0];if(!d)return null;const u=o&&!t?e.jsxs(N,{id:"volter-viewport-shading-menu",anchorRef:m,"aria-label":"Viewport shading modes",onDismiss:()=>i(!1),style:{minWidth:230},children:[l.map(a=>e.jsxs(b,{role:"menuitemradio","aria-checked":a.mode===r,onSelect:()=>{p(a.mode),i(!1)},style:{display:"grid",gridTemplateColumns:"14px 1fr",gap:7},children:[e.jsx("span",{style:{opacity:a.mode===r?1:0},children:e.jsx(c,{icon:g,size:"xs"})}),e.jsxs("span",{children:[e.jsx("span",{style:{display:"block"},children:a.label}),e.jsx("span",{style:{display:"block",color:V.content.dim,fontSize:10},children:a.description})]})]},a.mode)),s?e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsx("div",{className:"volter-viewport-shading-options",children:s})]}):null]}):null;return h?e.jsxs("div",{className:"volter-viewport-popover-anchor",children:[e.jsxs("span",{className:"volter-viewport-shading-segments",role:"group","aria-label":"Viewport shading",children:[h.map(a=>e.jsx(f,{text:`Viewport shading: ${a.label}`,children:e.jsx(v,{size:"compact",shape:"segment",variant:"secondary","aria-pressed":a.mode===r,"aria-label":`Viewport shading: ${a.label}`,disabled:t,onClick:()=>p(a.mode),children:e.jsx(E,{glyph:a.glyph})})},a.mode)),e.jsx(f,{text:"Shading options",children:e.jsx(v,{ref:m,size:"compact",shape:"segment",variant:"secondary","aria-label":"Shading options","aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?"volter-viewport-shading-menu":void 0,disabled:t,onClick:()=>i(a=>!a),children:e.jsx(c,{icon:j,size:"xs"})})})]}),u]}):e.jsxs("div",{style:{position:"relative"},children:[e.jsx(f,{text:`Viewport shading: ${d.label}`,children:e.jsxs(y,{ref:m,type:"button",size:"compact",variant:"secondary","aria-label":`Viewport shading: ${d.label}`,"aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?"volter-viewport-shading-menu":void 0,disabled:t,onClick:()=>i(a=>!a),style:{display:"inline-flex",alignItems:"center",gap:5,minWidth:66},children:[e.jsx("span",{children:d.label}),e.jsx(c,{icon:j,size:"xs"})]})}),u]})}function F({mode:r,onChange:p,disabled:l=!1,words:t}){const h=x.useMemo(()=>{const s=O.map(i=>({...i,label:t?.[i.mode]??i.label}));if(s.some(i=>i.mode===r))return s;const o=t?.[r]??$[r]??r;return[...s,{mode:r,label:o,description:"The mode this view is drawn in"}]},[t,r]);return e.jsx(A,{mode:r,onChange:p,choices:h,disabled:l})}export{A as V,I as a,D as b,T as c,F as d,G as p,O as v};
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/game-css-scope-transform-CNsIQ45a.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-DmNeCiAo.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css"])))=>i.map(i=>d[i]);
2
- import{_ as se,lR as Fe,lS as He,lT as De,Z as P,lU as je,jg as ze,Q as Ne,ab as pe,jM as Be,b$ as W,c0 as O,c1 as q,c3 as We}from"./index-DmNeCiAo.js";import{GAME_SCENES_SHAPE as Oe}from"./game-contract-seams-B-7gb13c.js";import{g as qe,c as Ue,d as Ve,e as Ke,S as Ye}from"./capability-coverage-BAQeb1sR.js";import{i as Qe,b as Je,l as Ze}from"./ingest-source-persistence-DXXd6X4G.js";import{p as Xe}from"./contract-system-adapters-B9apGOMQ.js";const rn="contain: layout; visibility: visible;";function ae(e){return typeof e=="boolean"?e:e?.capture??!1}const ie="volterScopedCss";let le=null;function et(){return le??=Promise.all([se(()=>import("./game-css-scope-transform-CNsIQ45a.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),se(()=>import("./index-DmNeCiAo.js").then(e=>e.u2),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10]))]).then(([{scopeGameCss:e},{GAME_CSS_SCOPE_SELECTOR:t}])=>n=>e({css:n,scopeSelector:t,styleSheetPath:"/"})),le}function tt(e){let t=null;const n=()=>et().then(i=>{t=i}),o=i=>{const g=i.textContent??"";if(g.length===0||i.dataset[ie]===g)return;if(!t){const y=g;i.textContent="",n().then(()=>{i.isConnected&&(i.textContent??"")===""&&(i.textContent=y,o(i))});return}let h;try{h=t(g)}catch{i.textContent="";return}i.dataset[ie]=h,i.textContent=h},a=i=>{if(i instanceof HTMLStyleElement)return i;const g=i.parentElement;return g instanceof HTMLStyleElement?g:null},u=new MutationObserver(i=>{const g=new Set;for(const h of i)if(h.type==="childList")for(const y of h.addedNodes){const w=a(y);if(w)g.add(w);else if(y instanceof Element)for(const d of y.querySelectorAll("style"))g.add(d)}else if(h.type==="characterData"){const y=a(h.target);y&&g.add(y)}for(const h of g)h.isConnected&&o(h)});u.observe(e,{childList:!0,subtree:!0,characterData:!0});for(const i of e.querySelectorAll("style"))o(i);return u}class nt{surfaceElement=null;injectedStyles=null;get surface(){return this.surfaceElement}set surface(t){this.injectedStyles?.disconnect(),this.injectedStyles=null,this.surfaceElement=t,t&&(this.injectedStyles=tt(t))}pageTitle="";executingClassicScript=null;headElement=null;resizeBus=new EventTarget;resizeListeners=new Map;addResizeListener(t,n){let o=this.resizeListeners.get(t);o||(o=new Set,this.resizeListeners.set(t,o)),o.add(ae(n)),this.resizeBus.addEventListener("resize",t,n)}removeResizeListener(t,n){const o=this.resizeListeners.get(t);o&&(o.delete(ae(n)),o.size===0&&this.resizeListeners.delete(t)),this.resizeBus.removeEventListener("resize",t,n)}get gameResizesItself(){return this.resizeListeners.size>0}reset(){this.headElement?.remove(),this.headElement=null,this.pageTitle="",this.executingClassicScript=null,this.surface=null,this.resizeListeners.clear(),this.resizeBus=new EventTarget}dispatchResize(){this.resizeBus.dispatchEvent(new Event("resize"))}viewport(){const t=this.surface;return t?{width:t.clientWidth,height:t.clientHeight}:null}get title(){return this.pageTitle}set title(t){this.pageTitle=String(t)}get currentScript(){return this.executingClassicScript}withCurrentScript(t,n){const o=this.executingClassicScript,a=document.createElement("script");a.src=t,this.executingClassicScript=a;try{return n()}finally{this.executingClassicScript=o}}head(){const t=this.surface;if(!t)return null;if(!this.headElement||this.headElement.parentElement!==t){const n=document.createElement("div");n.dataset.volterGameHead="",n.hidden=!0,t.prepend(n),this.headElement=n}return this.headElement}}function rt(e){const t=`(__volterHost.__volterGameRealm?__volterHost.__volterGameRealm(${JSON.stringify("")}):null)`;return ot.replace("__VOLTER_REALM__",t)}const ot=`const __volterHost=({}).constructor.constructor('return globalThis')(),__volterR=__VOLTER_REALM__,__volterGlobal=((__volterR&&__volterR.globalThis)||__volterHost.__volterGameWindow||__volterHost),globalThis=__volterGlobal,__volterSched=((__volterR&&__volterR.timers)||__volterHost.__volterGameTimers||__volterHost),__volterBind=function(n){var f=__volterSched[n];return typeof f==='function'?f.bind(__volterSched):f;},console=((__volterR&&__volterR.console)||__volterHost.__volterGameConsole||__volterHost.console),window=((__volterR&&__volterR.window)||__volterHost.__volterGameWindow||__volterGlobal.window),document=((__volterR&&__volterR.document)||__volterHost.__volterGameDocument||__volterGlobal.document),__volterWindowBind=function(n){var f=window&&window[n];return typeof f==='function'?f.bind(window):f;},localStorage=(window&&window.localStorage),sessionStorage=(window&&window.sessionStorage),location=(window&&window.location),addEventListener=__volterWindowBind('addEventListener'),removeEventListener=__volterWindowBind('removeEventListener'),dispatchEvent=__volterWindowBind('dispatchEvent'),fetch=function(){var f=__volterHost.__volterProjectFetch;return f?f.apply(null,arguments):__volterHost.fetch.apply(__volterHost,arguments)},setTimeout=__volterBind('setTimeout'),clearTimeout=__volterBind('clearTimeout'),setInterval=__volterBind('setInterval'),clearInterval=__volterBind('clearInterval'),requestAnimationFrame=__volterBind('requestAnimationFrame'),cancelAnimationFrame=__volterBind('cancelAnimationFrame');
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/game-css-scope-transform-D8WuwFPz.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D-G1ZsCu.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css"])))=>i.map(i=>d[i]);
2
+ import{_ as se,lR as Fe,lS as He,lT as De,Z as P,lU as je,jg as ze,Q as Ne,ab as pe,jM as Be,b$ as W,c0 as O,c1 as q,c3 as We}from"./index-D-G1ZsCu.js";import{GAME_SCENES_SHAPE as Oe}from"./game-contract-seams-gtbmw2C5.js";import{g as qe,c as Ue,d as Ve,e as Ke,S as Ye}from"./capability-coverage-D7oFXsIG.js";import{i as Qe,b as Je,l as Ze}from"./ingest-source-persistence-BQO1KGrh.js";import{p as Xe}from"./contract-system-adapters-BprRTe1B.js";const rn="contain: layout; visibility: visible;";function ae(e){return typeof e=="boolean"?e:e?.capture??!1}const ie="volterScopedCss";let le=null;function et(){return le??=Promise.all([se(()=>import("./game-css-scope-transform-D8WuwFPz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),se(()=>import("./index-D-G1ZsCu.js").then(e=>e.u2),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10]))]).then(([{scopeGameCss:e},{GAME_CSS_SCOPE_SELECTOR:t}])=>n=>e({css:n,scopeSelector:t,styleSheetPath:"/"})),le}function tt(e){let t=null;const n=()=>et().then(i=>{t=i}),o=i=>{const g=i.textContent??"";if(g.length===0||i.dataset[ie]===g)return;if(!t){const y=g;i.textContent="",n().then(()=>{i.isConnected&&(i.textContent??"")===""&&(i.textContent=y,o(i))});return}let h;try{h=t(g)}catch{i.textContent="";return}i.dataset[ie]=h,i.textContent=h},a=i=>{if(i instanceof HTMLStyleElement)return i;const g=i.parentElement;return g instanceof HTMLStyleElement?g:null},u=new MutationObserver(i=>{const g=new Set;for(const h of i)if(h.type==="childList")for(const y of h.addedNodes){const w=a(y);if(w)g.add(w);else if(y instanceof Element)for(const d of y.querySelectorAll("style"))g.add(d)}else if(h.type==="characterData"){const y=a(h.target);y&&g.add(y)}for(const h of g)h.isConnected&&o(h)});u.observe(e,{childList:!0,subtree:!0,characterData:!0});for(const i of e.querySelectorAll("style"))o(i);return u}class nt{surfaceElement=null;injectedStyles=null;get surface(){return this.surfaceElement}set surface(t){this.injectedStyles?.disconnect(),this.injectedStyles=null,this.surfaceElement=t,t&&(this.injectedStyles=tt(t))}pageTitle="";executingClassicScript=null;headElement=null;resizeBus=new EventTarget;resizeListeners=new Map;addResizeListener(t,n){let o=this.resizeListeners.get(t);o||(o=new Set,this.resizeListeners.set(t,o)),o.add(ae(n)),this.resizeBus.addEventListener("resize",t,n)}removeResizeListener(t,n){const o=this.resizeListeners.get(t);o&&(o.delete(ae(n)),o.size===0&&this.resizeListeners.delete(t)),this.resizeBus.removeEventListener("resize",t,n)}get gameResizesItself(){return this.resizeListeners.size>0}reset(){this.headElement?.remove(),this.headElement=null,this.pageTitle="",this.executingClassicScript=null,this.surface=null,this.resizeListeners.clear(),this.resizeBus=new EventTarget}dispatchResize(){this.resizeBus.dispatchEvent(new Event("resize"))}viewport(){const t=this.surface;return t?{width:t.clientWidth,height:t.clientHeight}:null}get title(){return this.pageTitle}set title(t){this.pageTitle=String(t)}get currentScript(){return this.executingClassicScript}withCurrentScript(t,n){const o=this.executingClassicScript,a=document.createElement("script");a.src=t,this.executingClassicScript=a;try{return n()}finally{this.executingClassicScript=o}}head(){const t=this.surface;if(!t)return null;if(!this.headElement||this.headElement.parentElement!==t){const n=document.createElement("div");n.dataset.volterGameHead="",n.hidden=!0,t.prepend(n),this.headElement=n}return this.headElement}}function rt(e){const t=`(__volterHost.__volterGameRealm?__volterHost.__volterGameRealm(${JSON.stringify("")}):null)`;return ot.replace("__VOLTER_REALM__",t)}const ot=`const __volterHost=({}).constructor.constructor('return globalThis')(),__volterR=__VOLTER_REALM__,__volterGlobal=((__volterR&&__volterR.globalThis)||__volterHost.__volterGameWindow||__volterHost),globalThis=__volterGlobal,__volterSched=((__volterR&&__volterR.timers)||__volterHost.__volterGameTimers||__volterHost),__volterBind=function(n){var f=__volterSched[n];return typeof f==='function'?f.bind(__volterSched):f;},console=((__volterR&&__volterR.console)||__volterHost.__volterGameConsole||__volterHost.console),window=((__volterR&&__volterR.window)||__volterHost.__volterGameWindow||__volterGlobal.window),document=((__volterR&&__volterR.document)||__volterHost.__volterGameDocument||__volterGlobal.document),__volterWindowBind=function(n){var f=window&&window[n];return typeof f==='function'?f.bind(window):f;},localStorage=(window&&window.localStorage),sessionStorage=(window&&window.sessionStorage),location=(window&&window.location),addEventListener=__volterWindowBind('addEventListener'),removeEventListener=__volterWindowBind('removeEventListener'),dispatchEvent=__volterWindowBind('dispatchEvent'),fetch=function(){var f=__volterHost.__volterProjectFetch;return f?f.apply(null,arguments):__volterHost.fetch.apply(__volterHost,arguments)},setTimeout=__volterBind('setTimeout'),clearTimeout=__volterBind('clearTimeout'),setInterval=__volterBind('setInterval'),clearInterval=__volterBind('clearInterval'),requestAnimationFrame=__volterBind('requestAnimationFrame'),cancelAnimationFrame=__volterBind('cancelAnimationFrame');
3
3
  `,on=rt(),st=new Set(["href","protocol","host","hostname","port","pathname","search"]),at=new Set(["assign","replace","reload"]),it=new Set(["play","project","hub","scene","ingest","create-from","checkout_id"]);function lt(e){return it.has(e)||e.startsWith("volter")}function _e(e){const t=e.startsWith("?")?e.slice(1):e;if(!t)return"";const n=new URLSearchParams;for(const[a,u]of new URLSearchParams(t))lt(a)||n.append(a,u);const o=n.toString();return o.length>0?`?${o}`:""}function ct(e){try{const t=new URL(e);return t.search=_e(t.search),t.href}catch{return e}}function ut(e,t,n){const o=Object.create(null);return new Proxy(o,{get(a,u){if(typeof u=="string"&&at.has(u))return(...g)=>{u==="reload"&&n?.reloadGame?.()||t(`location.${u}(${g.map(h=>String(h)).join(", ")})`)};if(u==="search")return _e(String(Reflect.get(e,"search")??""));if(u==="href")return ct(String(Reflect.get(e,"href")??""));const i=Reflect.get(e,u);return typeof i=="function"?i.bind(e):i},set(a,u,i){return typeof u=="string"&&st.has(u)?(t(`location.${u} = ${String(i)}`),!0):Reflect.set(e,u,i)},has(a,u){return Reflect.has(e,u)}})}function dt(e){return`Ingested game attempted to navigate the editor away (${e}) — refused. A game running in-realm shares the editor's document, so leaving it would take the whole session with it; game code sees a scoped \`location\` facade whose reads pass through and whose navigating writes do not (packages/editor-game/src/host/game-location-guard.ts).`}function ft(e){let t=0,n=0;const o=Object.create(Object.getPrototypeOf(e)),a=w=>(t+=1,e.getItem(String(w))),u=(w,d)=>{n+=1,e.setItem(String(w),String(d))},i=w=>{n+=1,e.removeItem(String(w))},g=()=>{n+=1,e.clear()},h=w=>(t+=1,e.key(Number(w)));return{storage:new Proxy(o,{get(w,d){return d==="length"?(t+=1,e.length):d==="getItem"?a:d==="setItem"?u:d==="removeItem"?i:d==="clear"?g:d==="key"?h:d===Symbol.toStringTag?"Storage":typeof d=="string"?a(d)??void 0:Reflect.get(o,d,o)},set(w,d,p){return typeof d!="string"?Reflect.set(o,d,p,o):(u(d,String(p)),!0)},deleteProperty(w,d){return typeof d!="string"?Reflect.deleteProperty(o,d):(i(d),!0)},defineProperty(w,d,p){return typeof d!="string"||!("value"in p)?!1:(u(d,String(p.value)),!0)},has(w,d){return typeof d!="string"?Reflect.has(o,d):d in o?!0:a(d)!==null},ownKeys(){const w=[];for(let d=0;d<e.length;d+=1){const p=e.key(d);p!==null&&w.push(p)}return w},getOwnPropertyDescriptor(w,d){if(typeof d!="string")return;const p=e.getItem(d);return p===null?void 0:{configurable:!0,enumerable:!0,value:p,writable:!0}}}),stats:()=>({reads:t,writes:n})}}function mt(e){return!e||e.loop!=="gated"&&e.loop!=="self-driven"?null:{verdict:e.loop,evidence:e.evidence}}function gt(e){let t="open",n=0,o=0,a=0,u=0,i=0,g=0,h=0,y=0,w=!1;const d=[],p=new Set,T=new Set,I=new Set,S=new Map,A=()=>(t==="held"?h:e.now())-y,c=m=>{a++,t==="held"&&u++;try{m.run()}catch(_){e.setTimeout(()=>{throw _},0)}},f=()=>{const m=d.splice(0,d.length);S.clear();for(const _ of m)c(_)},s=m=>{d.push(m)},r=m=>()=>{if(t==="held"){s(m);return}c(m)},l=()=>{t!=="held"&&(h=e.now(),t="held")},v=()=>{t==="held"&&(y+=e.now()-h)};return{schedulers:{setTimeout(m,_,...E){if(o++,w)return-1;const R={run:()=>m(...E)};let L=-1;const C=r(R);return L=e.setTimeout(()=>{p.delete(L),C()},_),p.add(L),R.timerId=L,L},clearTimeout(m){e.clearTimeout(m),p.delete(m);const _=d.findIndex(E=>E.timerId===m);_!==-1&&d.splice(_,1)},setInterval(m,_,...E){if(o++,w)return-1;let R=-1;const L=()=>{const C={run:()=>m(...E)};if(t==="held"){const re=S.get(R);if(re){const oe=d.indexOf(re);oe!==-1&&d.splice(oe,1)}S.set(R,C),s(C);return}c(C)};return R=e.setInterval(L,_),T.add(R),R},clearInterval(m){e.clearInterval(m),T.delete(m);const _=S.get(m);if(_){S.delete(m);const E=d.indexOf(_);E!==-1&&d.splice(E,1)}},requestAnimationFrame(m){if(o++,w)return-1;const _={run:()=>m(A())};let E=-1;const R=r(_);return E=e.requestAnimationFrame(()=>{I.delete(E),R()}),I.add(E),_.frameId=E,E},cancelAnimationFrame(m){e.cancelAnimationFrame(m),I.delete(m);const _=d.findIndex(E=>E.frameId===m);_!==-1&&d.splice(_,1)}},hold:l,release(){w||(v(),t="open",f())},step(m=1){if(!w){for(v(),n=m>0?m:1,t="step";n>0&&d.length>0;)n--,f();t="held",h=e.now()}},stats(){return{mode:t,pending:d.length,requests:o,fired:a,firedWhileHeld:u,activeTimeouts:p.size,activeIntervals:T.size,activeAnimationFrames:I.size,input:i,inputBlocked:g}},recordInput(m){i++,m&&g++},dispose(){if(w)return{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0};w=!0;const m={timeouts:p.size,intervals:T.size,animationFrames:I.size,parkedCallbacks:d.length};for(const _ of p)e.clearTimeout(_);for(const _ of T)e.clearInterval(_);for(const _ of I)e.cancelAnimationFrame(_);return p.clear(),T.clear(),I.clear(),d.length=0,S.clear(),n=0,t="held",h=e.now(),m}}}async function sn(e){const t=e.windowMs??1500,n=Math.max(1,Math.min(e.sampleMs??50,t)),o=e.sleep??(T=>new Promise(I=>setTimeout(I,T))),a=e.gate;if(!a)return{loop:"self-driven",reason:"no same-realm loop gate is installed, so nothing here controls this game’s scheduling",evidence:{pendingWhileHeld:0,firedWhileHeld:0,progressBefore:0,progressAfter:0,windowMs:t}};const u=a.stats(),i=e.progress();let g=u,h=i,y=u.pending,w=u.mode==="held";for(let T=0;T<t;T+=n)if(await o(Math.min(n,t-T)),g=a.stats(),h=e.progress(),y=Math.max(y,g.pending),g.mode!=="held"){w=!1;break}const d=g.firedWhileHeld-u.firedWhileHeld,p={pendingWhileHeld:y,firedWhileHeld:d,progressBefore:i,progressAfter:h,windowMs:t};return!w||g.mode!=="held"?{loop:"unmeasured",reason:"the gate was not held for the whole probe window — something else released it, so control was not measured",evidence:p}:d>0?{loop:"self-driven",reason:`${d} gated callback(s) ran while the gate was held — the gate leaked, so it cannot claim control`,evidence:p}:h>i?{loop:"self-driven",reason:`the game kept rendering while its scheduling was withheld (frame ${i} → ${h} in ${t}ms) — something outside this gate drives its loop`,evidence:p}:y===0?{loop:"unmeasured",reason:"nothing was due while the gate was held, so it withheld nothing and the probe learned nothing about this loop — note a hidden or backgrounded tab schedules no frames at all, which is a fact about the TAB, never about the game",evidence:p}:{loop:"gated",reason:`verified: ${y} scheduled callback(s) withheld, none ran, and no frame advanced in ${t}ms of held time`,evidence:p}}let U=null;function ht(){return U}const z=new Set(["keydown","keyup","keypress","mousedown","mouseup","mousemove","click","dblclick","contextmenu","wheel","pointerdown","pointerup","pointermove","pointercancel","touchstart","touchmove","touchend","touchcancel"]);function Se(e){const t=new Set,n=new WeakSet,o=((a,u)=>{const i=vt(a,u),g=yt(a,u);if(e()){for(const y of i)t.add(y);for(const y of g)t.delete(y);return!1}if(n.has(u))return!1;let h=!1;for(const y of g)t.delete(y)&&(h=!0);return h&&n.add(u),!h});return o.outstandingReleases=()=>{const a=[];for(const u of t){const i=u.indexOf(":"),g=u.slice(0,i),h=u.slice(i+1);g==="key"?a.push(new KeyboardEvent("keyup",{code:h,key:wt(h),bubbles:!0})):g==="mouse"?a.push(new MouseEvent("mouseup",{button:Number(h),bubbles:!0})):g==="pointer"&&typeof PointerEvent=="function"&&a.push(new PointerEvent("pointerup",{pointerId:Number(h),bubbles:!0}))}return a},o}function wt(e){const t=/^Key([A-Z])$/.exec(e);if(t)return t[1].toLowerCase();const n=/^Digit(\d)$/.exec(e);return n?n[1]:e==="Space"?" ":e}function be(e){const t=e.changedTouches;return t?Array.from(t,n=>`touch:${n.identifier}`):["touch"]}function vt(e,t){switch(e){case"keydown":return[`key:${t.code}`];case"mousedown":return[`mouse:${t.button}`];case"pointerdown":return[`pointer:${t.pointerId}`];case"touchstart":return be(t);default:return[]}}function yt(e,t){switch(e){case"keyup":return[`key:${t.code}`];case"mouseup":return[`mouse:${t.button}`];case"pointerup":case"pointercancel":return[`pointer:${t.pointerId}`];case"touchend":case"touchcancel":return be(t);default:return[]}}const Ee=new Set(["setTimeout","clearTimeout","setInterval","clearInterval","requestAnimationFrame","cancelAnimationFrame"]);function Re(e,t){return typeof e!="function"||Object.hasOwn(e,"prototype")?e:e.bind(t)}const k="",F=new Map,V=new Map,H=new Map,ce=new WeakMap;function K(e){let t=H.get(e);return t||(t=new nt,H.set(e,t)),t}function an(e,t=k){const n=K(t);return n.surface=e,n}function ln(e=k){H.get(e)?.reset()}function cn(e=k){return K(e)}function un(){const e=[];for(const[t,n]of H)n.surface&&e.push({surface:n.surface,gate:Te(t)});return e}function Te(e){return()=>Fe()&&(V.get(e)??(()=>!0))()}function pt(e,t){const n=Te(e);return()=>t.alive&&n()}const M=[];function _t(){return M[M.length-1]??null}De(_t);function $(e,t){M.push(e);try{return t()}finally{M.pop()}}function St(e,t){return{setTimeout(n,o,...a){return t.setTimeout((...u)=>$(e,()=>n(...u)),o,...a)},clearTimeout:n=>t.clearTimeout(n),setInterval(n,o,...a){return t.setInterval((...u)=>$(e,()=>n(...u)),o,...a)},clearInterval:n=>t.clearInterval(n),requestAnimationFrame(n){return t.requestAnimationFrame(o=>$(e,()=>n(o)))},cancelAnimationFrame:n=>t.cancelAnimationFrame(n)}}function bt(e){const t=new Map;return new Proxy(console,{get(n,o){const a=Reflect.get(n,o,n);if(typeof a!="function")return a;let u=t.get(o);return u||(u=(...i)=>$(e,()=>a.apply(n,i)),t.set(o,u)),u}})}function ue(e){let t=!1,n=null;return()=>{if(t)return n;t=!0;try{n=ft(window[e])}catch{n=null}return n}}let Ie=null;function Et(e){Ie=e}let Pe=null;function Rt(e){const t={alive:!0},n=new Map,o=pt(e,t),a=gt({setTimeout:(S,A)=>window.setTimeout(S,A),clearTimeout:S=>window.clearTimeout(S),setInterval:(S,A)=>window.setInterval(S,A),clearInterval:S=>window.clearInterval(S),requestAnimationFrame:S=>window.requestAnimationFrame(S),cancelAnimationFrame:S=>window.cancelAnimationFrame(S),now:()=>performance.now()}),u=new WeakSet,i=(S,A)=>{u.has(S)||(u.add(S),a.recordInput?.(A))};e===k&&(Pe=a);const g=K(e),h=St(e,a.schedulers),y=ue("localStorage"),w=ue("sessionStorage");let d,p;const T=me(de(window,()=>!0,{page:g,role:"window"}),o,{execute:S=>$(e,S),realmId:e,recordInput:i,role:"window",schedulers:h,self:()=>d,document:()=>p,localStorage:y,sessionStorage:w,isolateExpandos:!0});d=T.proxy;const I=me(de(document,()=>!0,{page:g,role:"document"}),o,{execute:S=>$(e,S),realmId:e,recordInput:i,role:"document",self:()=>d});return p=I.proxy,{moduleUrls:n,live:t,loop:a,document:I,localStorage:y,sessionStorage:w,window:T,public:{recordModuleUrl(S){t.alive&&n.set(new URL(S).pathname,S)},console:bt(e),document:p,globalThis:d,timers:h,window:d}}}function Y(e=k){let t=F.get(e);return t||(t=Rt(e),F.set(e,t)),t.public}function Tt(e){return[...F.get(e)?.moduleUrls.values()??[]]}function dn(e){const t=F.get(e);if(!t)return null;const n={reads:0,writes:0};return{globals:t.window.expandoCount(),mountId:e,loop:t.loop.stats(),listeners:{document:t.document.count(),window:t.window.count()},storage:{local:t.localStorage()?.stats()??n,session:t.sessionStorage()?.stats()??n}}}function It(e=k){V.delete(e),H.get(e)?.reset(),e!==k&&H.delete(e);const n=F.get(e);if(!n)return{mountId:e,listeners:0,timers:{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0}};F.delete(e),n.moduleUrls.clear(),n.live.alive=!1;const o=n.document.dispose()+n.window.dispose(),a=n.loop.dispose?.()??{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0};return e===k&&Ce(),{mountId:e,listeners:o,timers:a}}function fn(e,t=k){V.set(t,e)}function de(e,t,n){const o=new Map,a=Se(t),u=()=>n?.page.surface??null,i=()=>n?.role==="window"&&n.page.surface?n.page:null,g=(c,f,s)=>{const r=i();if(r&&c==="resize"&&f!==null){r.addResizeListener(f,s);return}if((c==="load"||c==="DOMContentLoaded"||c==="pageshow")&&f!==null&&document.readyState==="complete"){window.setTimeout(()=>{const l=new Event(c);typeof f=="function"?f.call(p,l):f.handleEvent(l)},0);return}if(z.has(c)&&f!==null){let l=o.get(c);l||(l=new Map,o.set(c,l));const v=f;let b=l.get(v);b||(b=function(m){if(!a(c,m))return typeof v=="function"?v.call(this,m):v.handleEvent(m)},l.set(v,b)),e.addEventListener(c,b,s);return}e.addEventListener(c,f,s)},h=(c,f,s)=>{const r=i();if(r&&c==="resize"&&f!==null){r.removeResizeListener(f,s);return}if(z.has(c)&&f!==null){const l=o.get(c),v=l?.get(f);if(v){l?.delete(f),e.removeEventListener(c,v,s);return}}e.removeEventListener(c,f,s)},y=new WeakMap,w=c=>{if(typeof c!="string"||!c.startsWith("on"))return null;const f=c.slice(2);return z.has(f)?f:null},d=c=>{console.error(dt(c))};let p;const T=()=>{const c=Reflect.get(e,"location",e);if(!c||!n)return null;const f=ce.get(n.page);if(f?.source===c)return{value:f.view};const s=ut(c,d,{reloadGame:()=>{const r=Ie;return r?(r(),!0):!1}});return ce.set(n.page,{source:c,view:s}),{value:s}},I=c=>{const f=i();if(!f)return null;if(c==="window"||c==="self"||c==="top"||c==="parent")return{value:p};if(c!=="innerWidth"&&c!=="outerWidth"&&c!=="innerHeight"&&c!=="outerHeight")return null;const s=f.viewport();return s?c==="innerWidth"||c==="outerWidth"?{value:s.width}:c==="innerHeight"||c==="outerHeight"?{value:s.height}:null:null},S=c=>{if(!n)return null;if(c==="location")return T();if(n.role==="document"){const f=u();if(f&&(c==="body"||c==="documentElement"))return{value:f};if(f&&c==="head")return{value:n.page.head()};if(f&&c==="title")return{value:n.page.title};if(f&&c==="currentScript")return{value:n.page.currentScript};if(f&&c==="activeElement"){const s=Reflect.get(e,"activeElement",e);return{value:s&&f.contains(s)?s:f}}}return I(c)},A=c=>{if(n?.role!=="document"||typeof c!="string")return;const f=u();if(!f)return;const s=e;if(c==="querySelector")return r=>r.trim().toLowerCase()==="head"?n.page.head():f.matches(r)?f:f.querySelector(r);if(c==="querySelectorAll")return f.querySelectorAll.bind(f);if(c==="getElementById")return r=>{const l=s.getElementById(r);return l&&f.contains(l)?l:null};if(c==="getElementsByClassName")return f.getElementsByClassName.bind(f);if(c==="getElementsByTagName")return r=>{if(r.toLowerCase()!=="head")return f.getElementsByTagName(r);const l=n.page.head();return l?Object.assign([l],{item:v=>v===0?l:null,namedItem:v=>l.id===v?l:null}):[]};if(c==="elementFromPoint"||c==="elementsFromPoint")return(r,l)=>{const v=f.getBoundingClientRect(),m=s[c].bind(s)(r+v.left,l+v.top);return Array.isArray(m)?m.filter(_=>f.contains(_)):m&&f.contains(m)?m:null}};return p=new Proxy(e,{get(c,f){if(f==="addEventListener")return g;if(f==="removeEventListener")return h;const s=S(f);if(s)return s.value;const r=A(f);if(r)return r;if(typeof f=="string"&&Ee.has(f)){const v=U;if(v)return v.schedulers[f]}const l=Reflect.get(c,f,c);return typeof l!="function"?l:y.get(l)??Re(l,c)},set(c,f,s){if(f==="location"&&n)return d(`${n.role}.location = ${String(s)}`),!0;if(n?.role==="document"&&f==="title"&&n.page.surface)return n.page.title=String(s),!0;if(w(f)!==null&&typeof s=="function"){const l=s,v=function(b){if(t())return l.call(this,b)};return y.set(v,l),Reflect.set(c,f,v,c)}if(f==="onload"&&typeof s=="function"&&document.readyState==="complete"){const l=s;return window.setTimeout(()=>l.call(p,new Event("load")),0),!0}return Reflect.set(c,f,s,c)}}),p}function fe(e){return typeof e=="boolean"?e:e?.capture??!1}function me(e,t,n){const o=n.execute??(s=>s()),a=[],u=Se(t);let i=!1,g=!1;const h=s=>{if(g)return;g=!0;const r=n.realmId?`"${n.realmId}"`:"the default realm";console.warn(`volter: a stopped game tried to register ${s} on its ${n.role} after its realm (${r}) was reclaimed; refused. Later refusals in this generation are silent.`)},y=new Map,w=new Map,d=new WeakMap;let p;const T=s=>n.role==="window"&&n.self&&(s===e||typeof window<"u"&&s===window)?n.self():n.document&&(s===n.document()||typeof document<"u"&&s===document)?n.document():s,I=s=>{const r=d.get(s);if(r)return r;const l=new Proxy(s,{get(v,b){if(b==="currentTarget")return p;if(b==="target"||b==="srcElement"){const _=Reflect.get(v,b,v);return _===v.currentTarget?p:T(_)}if(b==="view")return T(Reflect.get(v,b,v));if(b==="composedPath")return()=>v.composedPath().map(T);const m=Reflect.get(v,b,v);return typeof m=="function"?m.bind(v):m}});return d.set(s,l),l},S=s=>{const r=a.indexOf(s);r!==-1&&a.splice(r,1),e.removeEventListener(s.type,s.actual,s.capture),s.abort?.signal.removeEventListener("abort",s.abort.handler)},A=(s,r,l)=>{if(r===null)return;if(i){h(`a "${s}" listener`);return}const v=fe(l),b=l&&typeof l!="boolean"?l.signal:void 0;if(b?.aborted||a.some(R=>R.type===s&&R.original===r&&R.capture===v))return;let m;const _=function(R){if(l&&typeof l!="boolean"&&l.once){const C=a.indexOf(m);C!==-1&&a.splice(C,1),m.abort?.signal.removeEventListener("abort",m.abort.handler)}if(z.has(s)){const C=u(s,R);if(n.recordInput?.(R,C),C)return}const L=I(R);return o(()=>typeof r=="function"?r.call(p,L):r.handleEvent(L))},E=()=>S(m);m={type:s,original:r,actual:_,capture:v,...b?{abort:{signal:b,handler:E}}:{}},a.push(m),e.addEventListener(s,_,l),b?.addEventListener("abort",E,{once:!0}),(s==="load"||s==="DOMContentLoaded"||s==="pageshow")&&document.readyState==="complete"&&window.setTimeout(()=>{!i&&a.includes(m)&&_.call(e,new Event(s))},0)},c=(s,r,l)=>{if(r===null)return;const v=fe(l),b=a.find(m=>m.type===s&&m.original===r&&m.capture===v);b?S(b):e.removeEventListener(s,r,l)},f=s=>typeof s=="string"&&s.startsWith("on")&&s.length>2?s.slice(2):null;return p=new Proxy(e,{get(s,r){if(r==="addEventListener")return A;if(r==="removeEventListener")return c;const l=w.get(r);if(l)return l.original;if(n.self&&(n.role==="window"&&(r==="window"||r==="self"||r==="frames"||r==="top"||r==="parent")||n.role==="document"&&r==="defaultView"))return n.self();if(n.role==="window"&&r==="document"&&n.document)return n.document();if(n.role==="window"&&r==="globalThis"&&n.self)return n.self();if(n.role==="window"&&r==="localStorage"&&n.localStorage)return n.localStorage()?.storage;if(n.role==="window"&&r==="sessionStorage"&&n.sessionStorage)return n.sessionStorage()?.storage;if(typeof r=="string"&&Ee.has(r)&&n.schedulers)return n.schedulers[r];const v=y.get(r);if(v)return v.get?v.get.call(p):v.value;const b=Reflect.get(s,r,s);return typeof b!="function"?b:Re(b,s)},set(s,r,l){if(r==="location")return Reflect.set(s,r,l,s);if(n.role==="window"&&(r==="document"||r==="globalThis"||r==="localStorage"||r==="sessionStorage"))return!0;const v=f(r);if(v){if(i)return h(`an "${String(r)}" handler`),!0;const b=w.get(r);if(b&&(e.removeEventListener(b.type,b.actual),w.delete(r)),typeof l!="function")return!0;const m=l,_=(v==="load"||v==="DOMContentLoaded"||v==="pageshow")&&document.readyState==="complete",E=function(R){if(z.has(v)){const C=u(v,R);if(n.recordInput?.(R,C),C)return}const L=o(()=>m.call(p,I(R)));return L===!1&&R.preventDefault(),L};return w.set(r,{type:v,original:m,actual:E}),e.addEventListener(v,E),_&&window.setTimeout(()=>{!i&&w.get(r)?.actual===E&&E.call(e,new Event(v))},0),!0}return n.isolateExpandos?(y.set(r,{configurable:!0,enumerable:!0,value:l,writable:!0}),!0):Reflect.set(s,r,l,s)},defineProperty(s,r,l){return n.isolateExpandos?Reflect.getOwnPropertyDescriptor(s,r)?.configurable===!1?!1:(y.set(r,{...l,configurable:!0,enumerable:l.enumerable??!0}),!0):Reflect.defineProperty(s,r,l)},deleteProperty(s,r){return y.delete(r)?!0:n.isolateExpandos?Reflect.getOwnPropertyDescriptor(s,r)?.configurable!==!1:Reflect.deleteProperty(s,r)},has(s,r){return y.has(r)||Reflect.has(s,r)},ownKeys(s){const r=new Set(Reflect.ownKeys(s));for(const l of y.keys())typeof l!="number"&&r.add(l);return[...r]},getOwnPropertyDescriptor(s,r){const l=Reflect.getOwnPropertyDescriptor(s,r);return l?.configurable===!1?l:y.get(r)??l}}),{proxy:p,count:()=>a.length+w.size,expandoCount:()=>y.size,dispose(){for(const r of u.outstandingReleases()){for(const l of[...a])l.type===r.type&&l.actual.call(p,r);for(const l of w.values())l.type===r.type&&l.actual.call(p,r)}i=!0;const s=a.length+w.size;for(const r of[...a])S(r);for(const r of w.values())e.removeEventListener(r.type,r.actual);return w.clear(),y.clear(),s}}}let B=!1;function Ce(){if(!B)return;const e=globalThis,t=Y();U=Pe,e.__volterGameTimers=t.timers,e.__volterGameWindow=t.window,e.__volterGameDocument=t.document,e.__volterGameConsole=t.console}function mn(){if(B||typeof window>"u"||typeof document>"u")return;B=!0;const e=globalThis;He(),e.__volterGameModuleUrls=Tt,e.__volterGameRealm=t=>(M.push(t),queueMicrotask(()=>{const n=M.lastIndexOf(t);n>=0&&M.splice(n,1)}),Y(t)),Ce()}function Q(e,t){const n=It(e),o=n.timers.timeouts+n.timers.intervals+n.timers.animationFrames+n.timers.parkedCallbacks;if(n.listeners===0&&o===0)return;const a=[];n.listeners>0&&a.push(`${n.listeners} window/document listener${n.listeners===1?"":"s"}`),o>0&&a.push(`${o} timer/frame callback${o===1?"":"s"}`),P.logStructured("warn",`${t} stopped without releasing ${a.join(" and ")}; the editor reclaimed them.`,"environment",void 0,{instanceId:e,instanceName:t})}function Le(e=typeof window>"u"?null:window){const t=e?.volterGame;return!t||t.contractVersion!==1?null:t}const Pt=Object.entries(Oe).filter(([,e])=>!e.optional).map(([e])=>e);function Ae(e){const t=e?.scenes;if(t==null)return{scenes:null,malformed:null};if(typeof t!="object")return{scenes:null,malformed:`declared as ${typeof t}; expected an object with list(), current() and goTo()`};const n=Pt.filter(o=>typeof t[o]!="function");return n.length>0?{scenes:null,malformed:`declared a scenes surface missing required member(s): ${n.join(", ")}`}:{scenes:t,malformed:null}}function Ct(e){const t=e?.ready;if(t==null)return{ready:null,malformed:null};if(typeof t=="function"){const n=t;return{ready:()=>Promise.resolve(n()),malformed:null}}if(typeof t.then=="function"){const n=t;return{ready:()=>Promise.resolve(n),malformed:null}}return{ready:null,malformed:`declared \`ready\` as ${typeof t}; expected a promise or a function returning one`}}function Lt(e){const t=e?.world;return t==null?{world:null,malformed:null}:typeof t!="object"||t.isScene!==!0?{world:null,malformed:`declared \`world\` as ${typeof t}; expected the game's own THREE.Scene`}:{world:t,malformed:null}}function At(e){const t=e?.presentation;if(t==null)return{canvas:null,malformed:null};const n=t;return typeof n!="object"||n.tagName!=="CANVAS"||typeof n.getContext!="function"?{canvas:null,malformed:`declared \`presentation\` as ${typeof t=="object"?String(n.tagName??"object"):typeof t}; expected the game's own <canvas> element`}:{canvas:t,malformed:null}}const gn=Object.freeze(Object.defineProperty({__proto__:null,readGameContract:Le,readGamePresentation:At,readGameReady:Ct,readGameScenes:Ae,readGameWorld:Lt},Symbol.toStringTag,{value:"Module"}));function kt(e){if(!Array.isArray(e))throw new Error("scenes.list() did not return an array");const t=new Set;for(const n of e){if(typeof n!="object"||n===null||typeof n.id!="string"||n.id.trim().length===0||typeof n.label!="string"||n.label.trim().length===0)throw new Error("scenes.list() returned an invalid { id, label } scene");if(t.has(n.id))throw new Error(`scenes.list() returned duplicate id "${n.id}"`);t.add(n.id)}return e}function xt(e){return typeof e?.goToScene=="function"}function hn(e,t={}){const{scenes:n,malformed:o}=Ae(e);if(o!==null&&P.warn(`Ignored the game contract's \`scenes\` surface: ${o}`,"ingest"),!n)return null;let a=!1;const u=()=>{try{return kt(n.list())}catch(g){return a||(a=!0,P.warn(`Ignored invalid game-contract scenes: ${g instanceof Error?g.message:String(g)}`,"ingest")),[]}},i=g=>{const h=u().map(w=>w.id);return h.includes(g)?(t.onSwitchAccepted?.(g),{ok:!0,settled:(async()=>{try{return await n.goTo(g),{requested:g,current:n.current()}}catch(w){return{requested:g,current:n.current(),error:w instanceof Error?w.message:String(w)}}})()}):{ok:!1,error:`scenes.goTo: "${g}" is not one of this game's scenes (${h.length>0?h.join(", "):"it lists none"}).`,known:h}};return{title:"Scenes",storiesFor:g=>u().map(({id:h,label:y})=>({id:h,label:y})),active:g=>n.current(),goToScene:i,apply:(g,h)=>{if(h===null){P.warn("This game’s scenes cannot be cleared: it is always in one of its own scenes. Pick the scene to switch to instead.","ingest");return}const y=i(h);if(!y.ok){P.warn(`${y.error} — ignoring.`,"ingest");return}y.settled.then(w=>{w.error!==void 0&&P.error(`scenes.goTo("${h}") failed: ${w.error}`,"ingest")})}}}function Gt(){const e=G();if(!e)return null;const n=(()=>{switch(e.kind){case"canvas":return e.session.adapter;case"dom":return e.session.adapter;case"three":return e.session.mount?.authoring}})()?.stories;return xt(n)?n:null}let J=!1;function ge(){return J}function wn(){J=!0}function vn(){J=!1}let D=null,x=null;function yn(e){D=e,e||Z()}function pn(){D=null,Z()}function Z(){const e=x;x=null,e&&(clearTimeout(e.timer),e.settle(null))}function ke(){const e=D?.renderer.domElement;return typeof e=="object"&&e!==null?e:null}function _n(){const e=x;if(!(!e||!D))try{const t=D.renderer;if(typeof t.getRenderTarget=="function"&&t.getRenderTarget()!==null)return;const n=ke();if(!n||n.width===0||n.height===0)return;const o=e.image??n.ownerDocument.createElement("canvas");o.width=n.width,o.height=n.height;const a=o.getContext("2d");if(!a||(a.drawImage(n,0,0),e.image=o,e.delivering))return;e.delivering=!0,setTimeout(()=>{x===e&&(x=null,clearTimeout(e.timer),e.settle(e.image))},0)}catch{}}function Mt(e=2e3){return D?(Z(),new Promise(t=>{const n=setTimeout(()=>{x?.timer===n&&(x=null),t(null)},e);x={settle:t,timer:n,image:null,delivering:!1}})):Promise.resolve(null)}const $t={play:e=>(e.play(),"driven"),resume:e=>(e.resume(),"driven"),stop:(e,t)=>t?.stopEndsRun?"declined":(e.pause(),"driven"),pause:e=>(e.pause(),"driven"),step:e=>e.canStep?(e.step(),"driven"):{ok:!1,error:"this ingested game cannot be stepped — no serve-time loop gate measured control over its frames, so a single-frame step would be a button that lies (see ingest/same-realm-loop-gate.ts)"}};function Ft(e,t,n){if(!je(t))return null;const o=$t[t](e,n);return o==="declined"?null:o!=="driven"?o:{ok:!0,data:{ingest:!0,playing:e.playing}}}function Ht(){return Y().window}function X(){return typeof window>"u"?null:Le(Ht())}let ee=!1;function Dt(){return ee}function N(e){ee=e}function jt(){N(!1);const e=window;delete e.__volterMountCold,delete e.__volterIngestPlayed}function he(e,t,n){const o=(a,u)=>ze({seam:`contract.lifecycle.${t}`,subject:"game",epoch:qe(e),stage:"effect",outcome:a,source:"consumer",detail:u});try{n(),o("pass",`the mounted ingest lifecycle consumed lifecycle.${t}`)}catch(a){throw o("fail",`lifecycle.${t} failed: ${a instanceof Error?a.message:String(a)}`),a}}function Sn(e={}){const t=X(),n=t?.lifecycle,o=()=>{if(t&&n?.start){he(t,"start",()=>n.start?.());return}window.dispatchEvent(new CustomEvent("volter:ingest-play"))},a=typeof n?.pause=="function",u=typeof n?.resume=="function";return t&&a!==u?{start:o,pauseGap:a?"the game contract declares lifecycle.pause without lifecycle.resume":"the game contract declares lifecycle.resume without lifecycle.pause"}:t&&a&&u?{start:o,setPaused:i=>he(t,i?"pause":"resume",()=>{i?n?.pause?.():n?.resume?.()})}:e.setPaused?{start:o,setPaused:e.setPaused,...e.step?{step:e.step}:{},...e.canStep?{canStep:e.canStep}:{}}:{start:o,pauseGap:e.pauseGap??"the game declares no lifecycle.pause/resume pair and its mounted adapter exposes no setPaused capability"}}function bn(){const e=G();return e?e.session.lifecycle.pauseGap??null:null}function we(e){const t=G();if(t)for(const n of t.siblings)try{n.setPaused?.(e)}catch(o){P.error(`Composite sibling setPaused(${e}) failed: ${o}`,"ingest")}}function zt(){return X()}function xe(){const e=G()?.session.lifecycle;if(!e?.setPaused)return null;const t=()=>{e.setPaused?.(!0),we(!0),N(!1)},n=()=>{e.setPaused?.(!1),we(!1),N(!0)};return{get playing(){return ee},play(){Ne();const o=window;if(o.__volterIngestPlayed)return n();o.__volterIngestPlayed=!0,e.start(),n()},pause:t,resume:n,canStep:!!e.step&&(e.canStep?.()??!0),step(){e.canStep?.()!==!1&&(e.step?.(),N(!1))}}}function En(e){const t=xe();return t?(t.pause(),!0):!1}const Nt=Ue(e=>{e.level==="warn"?P.warn(e.message,"ingest"):P.log(e.message,"ingest")});let Bt=0,Ge="";function Rn(e){Ge=`${e}#${++Bt}`}function Tn(e){const t=mt(e.realmLoopVerdict?.()),n=e.realmLoopVerdict?.()?.reason??null;return t!==null||n!==null?{loop:t,reason:n}:e.realmLoopVerdict?{loop:null,reason:null}:{loop:null,reason:Wt}}function In(){return{loop:null,reason:"⏸ calls the host runtime's own play pause on this route, but no probe has measured whether that reaches this game's frames — an unmodified React game that schedules its own timers is not held by the host loop"}}const Wt="this mount installs no loop gate, so no verdict will ever be measured here — nothing in the editor holds this game's frames";function Ot(e,t,n){const o=Xe(t?.systems,n),a=new Map(o.empty.map(i=>[i.slot,i.evidence])),u=new Map(o.malformed.map(i=>[i.slot,i.reason]));return Ye.map(i=>{if(e[i]!=null)return{slot:i,state:"bound",proof:Be({slot:i,adapter:e[i],subject:"game"})};const g=a.get(i);if(g!==void 0)return{slot:i,state:"empty",evidence:g};const h=u.get(i);return h!==void 0?{slot:i,state:"malformed",evidence:h}:{slot:i,state:"unanswered"}})}function qt(){const e=Je();switch(e.state){case"absent":return null;case"loading":return{state:"loading"};case"ready":return{state:"ready",dataFile:e.writer.dataFile};default:return{state:"failed",reason:e.reason}}}function te(){const e=G(),t=e?.coverage;if(!e||!t)return null;const n=Qe(),o=t.loop(),a=zt();return Ve({worldId:e.worldId,reach:t.reach,surface:e.kind,reachMechanism:t.reachMechanism,loop:o.loop,loopReason:o.reason,contract:Ke(a),systemAdapters:Ot(pe(),a,e.kind),ownership:n?{writable:n.writable,reason:n.reason??null,recorder:n.recorder??null}:null,dataWriter:qt(),projectVerbs:[],writeReach:t.writeReach?.()??null})}function Pn(e){const t=G();if(!t)return;t.coverage=e;const n=te();n&&Nt.report(Ge,n)}function Cn(e,t){if(!t)return;const n=`Ingest "${e}" loop: ${t.loop} — ${t.reason}`;t.loop==="gated"?P.log(n,"ingest"):P.warn(n,"adapter")}const Ut=["hierarchy","selection","transforms","inspector","assetSubject","structure","persistence","pickable","rects","boxEdit","text","colorSample","stories","truth","assetDrop"];function Vt(e){return Ut.filter(t=>e[t]!==void 0)}function Ln(e){return{coverage:()=>te(),prepareCoverage:()=>Ze(),authoringProviders:()=>Vt(e),engineSystems:()=>Object.keys(pe())}}function An(e,t){Object.defineProperties(e,{loop:{enumerable:!0,get:()=>t.realmLoopVerdict?.()?.loop??null},loopReason:{enumerable:!0,get:()=>t.realmLoopVerdict?.()?.reason??null}}),e.realmLoopStats=()=>ht()?.stats()??null}function kn(e,t){const n=e,o=typeof n.querySelectorAll=="function"?n.querySelectorAll("*").length:t.nodeCount(),a=Object.keys(e).some(u=>u.startsWith("__reactContainer"));return{elementCount:o,hierarchyNodeCount:t.nodeCount(),reactRootPresent:a}}function xn(e,t){window[e]=t}function ne(e){delete window[e]}function Me(){Et(null);const e=G();if(e){Jt(null),jt();try{X()?.lifecycle?.dispose?.()}catch(t){P.error(`The game's own lifecycle.dispose threw at teardown: ${t}`,"ingest")}for(let t=e.siblings.length-1;t>=0;t--)try{e.siblings[t].dispose()}catch(n){P.error(`Composite sibling dispose failed: ${n}`,"ingest")}switch(e.kind){case"three":Kt(e.session);return;case"canvas":Yt(e.session);return;case"dom":Qt(e.session);return}}}function Kt(e){if(e.mount?.authoring&&e.mount.authoring.dispose?.(),W(null),O(null),q(),e.resizeObserver?.disconnect(),e.inputGateUnsubscribe?.(),e.mount)try{e.store.exitPlayScene()}catch{}e.store.shell.setPlayState("stopped");try{e.mount?.game.dispose()}catch{}Q("","The ingested game"),ne("__volterIngest"),P.log("Ingest root unmounted","ingest")}function Yt(e){e.adapter&&e.adapter.dispose(),W(null),O(null),q(),e.store.shell.setPlayState("stopped");try{e.dispose()}catch{}Q("","The ingested canvas game"),ne("__volterIngest2D"),P.log("canvas ingest root unmounted","ingest")}function Qt(e){e.adapter.dispose(),W(null),O(null),q(),e.store.shell.setPlayState("stopped");try{e.stop()}catch{}Q("","The ingested DOM game"),ne("__volterIngestReact"),P.log("DOM ingest root unmounted","ingest")}function Gn(){G()?.kind==="three"&&Me()}let j=null;function G(){return j}function Jt(e){j=e}function $e(){return j?.kind??null}function ve(){return $e()!==null}function Mn(e){j&&(j.siblings=[...e])}let ye=Promise.resolve();function $n(e){const t=ye.then(e);return ye=t.then(()=>{},()=>{}),t}We({id:"ingest",priority:1,mounted:ve,playing:()=>Dt()||ge(),stop:Me,instanceContainer:()=>null,frameCanvas:ke,snapshotFrame:()=>Mt(),command:e=>{const t=ve()?xe():null;return t?Ft(t,e.type,{stopEndsRun:ge()}):null},scenes:Gt,surface:$e,coverage:te,authoringRefusal:()=>j?.kind==="dom"?"This is an ingested native-React game: its components render directly as a DOM layer under the host React — there is no scene graph or renderer to introspect, and authoring is deliberately off for react ingests (the editor never writes JSX back into an unmodified game). The game is hosted, sized, and disposed; play it in the Game tab.":null});export{Q as $,un as A,an as B,Ct as C,X as D,ln as E,At as F,rn as G,Ht as H,sn as I,pn as J,ht as K,Lt as L,Rn as M,N,Cn as O,Tn as P,An as Q,dn as R,Gt as S,hn as T,Wt as U,yn as V,_n as W,on as X,cn as Y,et as Z,ie as _,G as a,mn as a0,_t as a1,gn as a2,wn as b,Me as c,ge as d,vn as e,bn as f,xe as g,En as h,ve as i,Sn as j,Jt as k,fn as l,In as m,kn as n,Ln as o,xn as p,mt as q,Pn as r,$n as s,te as t,Dt as u,jt as v,Mn as w,$e as x,Gn as y,zt as z};
@@ -1 +1 @@
1
- import{dY as p}from"./index-DmNeCiAo.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u=1e-9,d=1e5;function f(m,e,t){const r=t.end-t.start,i=t.loop&&r>u,o=[];let s=m,a=e,c=!1,l=0;for(;;){const h=t.end-s;if(!i||a<=h+u){const n=Math.min(s+a,t.end);o.push({from:s,to:n,direction:"forward"}),s=n;break}if(o.push({from:s,to:t.end,direction:"forward"}),a-=h,s=t.start,c=!0,l++,l>d){const n=t.start+a%r;o.push({from:s,to:n,direction:"forward"}),s=n;break}}return{pos:s,intervals:o,looped:c}}function g(m,e,t){const r=t.end-t.start,i=t.loop&&r>u,o=[];let s=m,a=e,c=!1,l=0;for(;;){const h=s-t.start;if(!i||a<=h+u){const n=Math.max(s-a,t.start);o.push({from:s,to:n,direction:"reverse"}),s=n;break}if(o.push({from:s,to:t.start,direction:"reverse"}),a-=h,s=t.end,c=!0,l++,l>d){const n=t.end-a%r;o.push({from:s,to:n,direction:"reverse"}),s=n;break}}return{pos:s,intervals:o,looped:c}}function _(m,e){return m<e.start?e.start:m>e.end?e.end:m}class D{_previousTime;_currentTime;_range;_timeScale;_playDirection="forward";_lastCrossingDirection="forward";_playbackState="stopped";_evaluators=[];_registrationCounter=0;constructor(e={}){const t=e.start??0,r=e.end??Math.max(t,1);if(r<t)throw new Error(`[AnimationClock] range end (${r}) must be >= start (${t})`);const i=e.timeScale??1;if(!Number.isFinite(i)||i<0)throw new Error(`[AnimationClock] timeScale must be a finite number >= 0, got ${i}`);this._range={start:t,end:r,loop:e.loop??!1},this._timeScale=i,this._previousTime=t,this._currentTime=t}get time(){return this._currentTime}get previousTime(){return this._previousTime}get direction(){return this._playbackState==="playing"?this._playDirection:"paused"}get playbackState(){return this._playbackState}get timeScale(){return this._timeScale}set timeScale(e){if(!Number.isFinite(e)||e<0)throw new Error(`[AnimationClock] timeScale must be a finite number >= 0, got ${e}`);this._timeScale=e}get range(){return this._range}setRange(e){const t=e.start??this._range.start,r=e.end??this._range.end,i=e.loop??this._range.loop;if(r<t)throw new Error(`[AnimationClock] range end (${r}) must be >= start (${t})`);this._range={start:t,end:r,loop:i};const o=_(this._currentTime,this._range);o!==this._currentTime&&this.seek(o)}play(e){e&&(this._playDirection=e),this._playbackState="playing"}pause(){this._playbackState="paused"}stop(){this._playbackState="stopped"}seek(e){const t=_(e,this._range);if(t===this._currentTime)return this.emit(this._currentTime,this._currentTime,[{from:t,to:t,direction:this._lastCrossingDirection}],!1,this._lastCrossingDirection);const r=t>this._currentTime?"forward":"reverse",i=this._currentTime;return this._previousTime=i,this._currentTime=t,this._lastCrossingDirection=r,this.emit(i,t,[{from:i,to:t,direction:r}],!1,r)}seekFrame(e,t){if(!Number.isFinite(t)||t<=0)throw new Error(`[AnimationClock] seekFrame fps must be a finite number > 0, got ${t}`);return this.seek(this._range.start+e/t)}advance(e){if(this._playbackState!=="playing")return null;if(!Number.isFinite(e))throw new Error(`[AnimationClock] advance(dt) requires a finite dt, got ${e}`);const t=Math.abs(e)*this._timeScale,r=this._currentTime;if(t===0)return this.emit(r,r,[],!1,this._playDirection);const i=this._playDirection==="forward"?f(r,t,this._range):g(r,t,this._range);return this._previousTime=r,this._currentTime=i.pos,this._lastCrossingDirection=this._playDirection,this.emit(r,i.pos,i.intervals,i.looped,this._playDirection)}subscribe(e,t){if(!p.includes(e))throw new Error(`[AnimationClock] unknown phase "${e}". Valid: ${p.join(", ")}`);const r={phase:e,order:this._registrationCounter++,fn:t};return this._evaluators.push(r),{dispose:()=>{const i=this._evaluators.indexOf(r);i!==-1&&this._evaluators.splice(i,1)}}}emit(e,t,r,i,o){const s={previousTime:e,currentTime:t,direction:o,timeScale:this._timeScale,looped:i,intervals:r};if(this._evaluators.length>0){const a=[...this._evaluators].sort((c,l)=>{const h=p.indexOf(c.phase),n=p.indexOf(l.phase);return h!==n?h-n:c.order-l.order});for(const c of a)try{c.fn(s)}catch(l){console.error(`[AnimationClock] evaluator in phase "${c.phase}" threw:`,l)}}return s}}export{D as AnimationClock};
1
+ import{dY as p}from"./index-D-G1ZsCu.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u=1e-9,d=1e5;function f(m,e,t){const r=t.end-t.start,i=t.loop&&r>u,o=[];let s=m,a=e,c=!1,l=0;for(;;){const h=t.end-s;if(!i||a<=h+u){const n=Math.min(s+a,t.end);o.push({from:s,to:n,direction:"forward"}),s=n;break}if(o.push({from:s,to:t.end,direction:"forward"}),a-=h,s=t.start,c=!0,l++,l>d){const n=t.start+a%r;o.push({from:s,to:n,direction:"forward"}),s=n;break}}return{pos:s,intervals:o,looped:c}}function g(m,e,t){const r=t.end-t.start,i=t.loop&&r>u,o=[];let s=m,a=e,c=!1,l=0;for(;;){const h=s-t.start;if(!i||a<=h+u){const n=Math.max(s-a,t.start);o.push({from:s,to:n,direction:"reverse"}),s=n;break}if(o.push({from:s,to:t.start,direction:"reverse"}),a-=h,s=t.end,c=!0,l++,l>d){const n=t.end-a%r;o.push({from:s,to:n,direction:"reverse"}),s=n;break}}return{pos:s,intervals:o,looped:c}}function _(m,e){return m<e.start?e.start:m>e.end?e.end:m}class D{_previousTime;_currentTime;_range;_timeScale;_playDirection="forward";_lastCrossingDirection="forward";_playbackState="stopped";_evaluators=[];_registrationCounter=0;constructor(e={}){const t=e.start??0,r=e.end??Math.max(t,1);if(r<t)throw new Error(`[AnimationClock] range end (${r}) must be >= start (${t})`);const i=e.timeScale??1;if(!Number.isFinite(i)||i<0)throw new Error(`[AnimationClock] timeScale must be a finite number >= 0, got ${i}`);this._range={start:t,end:r,loop:e.loop??!1},this._timeScale=i,this._previousTime=t,this._currentTime=t}get time(){return this._currentTime}get previousTime(){return this._previousTime}get direction(){return this._playbackState==="playing"?this._playDirection:"paused"}get playbackState(){return this._playbackState}get timeScale(){return this._timeScale}set timeScale(e){if(!Number.isFinite(e)||e<0)throw new Error(`[AnimationClock] timeScale must be a finite number >= 0, got ${e}`);this._timeScale=e}get range(){return this._range}setRange(e){const t=e.start??this._range.start,r=e.end??this._range.end,i=e.loop??this._range.loop;if(r<t)throw new Error(`[AnimationClock] range end (${r}) must be >= start (${t})`);this._range={start:t,end:r,loop:i};const o=_(this._currentTime,this._range);o!==this._currentTime&&this.seek(o)}play(e){e&&(this._playDirection=e),this._playbackState="playing"}pause(){this._playbackState="paused"}stop(){this._playbackState="stopped"}seek(e){const t=_(e,this._range);if(t===this._currentTime)return this.emit(this._currentTime,this._currentTime,[{from:t,to:t,direction:this._lastCrossingDirection}],!1,this._lastCrossingDirection);const r=t>this._currentTime?"forward":"reverse",i=this._currentTime;return this._previousTime=i,this._currentTime=t,this._lastCrossingDirection=r,this.emit(i,t,[{from:i,to:t,direction:r}],!1,r)}seekFrame(e,t){if(!Number.isFinite(t)||t<=0)throw new Error(`[AnimationClock] seekFrame fps must be a finite number > 0, got ${t}`);return this.seek(this._range.start+e/t)}advance(e){if(this._playbackState!=="playing")return null;if(!Number.isFinite(e))throw new Error(`[AnimationClock] advance(dt) requires a finite dt, got ${e}`);const t=Math.abs(e)*this._timeScale,r=this._currentTime;if(t===0)return this.emit(r,r,[],!1,this._playDirection);const i=this._playDirection==="forward"?f(r,t,this._range):g(r,t,this._range);return this._previousTime=r,this._currentTime=i.pos,this._lastCrossingDirection=this._playDirection,this.emit(r,i.pos,i.intervals,i.looped,this._playDirection)}subscribe(e,t){if(!p.includes(e))throw new Error(`[AnimationClock] unknown phase "${e}". Valid: ${p.join(", ")}`);const r={phase:e,order:this._registrationCounter++,fn:t};return this._evaluators.push(r),{dispose:()=>{const i=this._evaluators.indexOf(r);i!==-1&&this._evaluators.splice(i,1)}}}emit(e,t,r,i,o){const s={previousTime:e,currentTime:t,direction:o,timeScale:this._timeScale,looped:i,intervals:r};if(this._evaluators.length>0){const a=[...this._evaluators].sort((c,l)=>{const h=p.indexOf(c.phase),n=p.indexOf(l.phase);return h!==n?h-n:c.order-l.order});for(const c of a)try{c.fn(s)}catch(l){console.error(`[AnimationClock] evaluator in phase "${c.phase}" threw:`,l)}}return s}}export{D as AnimationClock};
@@ -1 +1 @@
1
- import{r}from"./index-DmNeCiAo.js";import{l as t}from"./live-mixers-B-bwLZ7c.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u="workspace.service";function v(){return r().session.reportFacet(()=>({liveMixers:t().map(i=>({site:i.key,clips:[...i.clips.keys()],animates:[...i.roots].map(o=>o.name||"(unnamed)")}))}))}export{u as point,v as start};
1
+ import{r}from"./index-D-G1ZsCu.js";import{l as t}from"./live-mixers-B-bwLZ7c.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u="workspace.service";function v(){return r().session.reportFacet(()=>({liveMixers:t().map(i=>({site:i.key,clips:[...i.clips.keys()],animates:[...i.roots].map(o=>o.name||"(unnamed)")}))}))}export{u as point,v as start};
@@ -1 +1 @@
1
- import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{r as c,aL as p}from"./index-DmNeCiAo.js";import{T as m}from"./transport-strip-anvfvigR.js";import{r as a}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const E="workspace.utility",T="Animation";function j(){const{documents:o,transport:n}=c(),e=a.useSyncExternalStore(o.subscribe,o.activeId,o.activeId),t=a.useSyncExternalStore(n.subscribe,a.useCallback(()=>e?n.for(e):null,[e,n])),r=a.useSyncExternalStore(a.useCallback(i=>t?t.subscribe(i):()=>{},[t]),a.useCallback(()=>t?.snapshot()??null,[t]));return!t||!r||r.activeSubject===null?s.jsx(p,{as:"p",variant:"caption","data-testid":"animation-timeline-empty","data-document":e??"","data-transport":t?"yes":"no",style:{padding:"var(--volter-space-2) var(--volter-space-3)"},children:t?"Nothing in the active document plays an animation.":"The active document has no stage to animate."}):s.jsx(m,{transport:t})}export{j as default,E as point,T as title};
1
+ import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{r as c,aL as p}from"./index-D-G1ZsCu.js";import{T as m}from"./transport-strip-B12CdJs_.js";import{r as a}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const E="workspace.utility",T="Animation";function j(){const{documents:o,transport:n}=c(),e=a.useSyncExternalStore(o.subscribe,o.activeId,o.activeId),t=a.useSyncExternalStore(n.subscribe,a.useCallback(()=>e?n.for(e):null,[e,n])),r=a.useSyncExternalStore(a.useCallback(i=>t?t.subscribe(i):()=>{},[t]),a.useCallback(()=>t?.snapshot()??null,[t]));return!t||!r||r.activeSubject===null?s.jsx(p,{as:"p",variant:"caption","data-testid":"animation-timeline-empty","data-document":e??"","data-transport":t?"yes":"no",style:{padding:"var(--volter-space-2) var(--volter-space-3)"},children:t?"Nothing in the active document plays an animation.":"The active document has no stage to animate."}):s.jsx(m,{transport:t})}export{j as default,E as point,T as title};
@@ -1 +1 @@
1
- import{o}from"./AssetBudgetPanel-qpkXbdeJ.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DmNeCiAo.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-BsFdZ-U4.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const D="workspace.menu",I={menu:"asset",items:[{id:"open-budget",label:"Open in Asset Budget",testId:"asset-context-open-budget",execute:({assetPath:t})=>{t!==void 0&&o(t)}}]};export{I as menu,D as point};
1
+ import{o}from"./AssetBudgetPanel-xh6RYB5z.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D-G1ZsCu.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-CjZyIn2t.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const D="workspace.menu",I={menu:"asset",items:[{id:"open-budget",label:"Open in Asset Budget",testId:"asset-context-open-budget",execute:({assetPath:t})=>{t!==void 0&&o(t)}}]};export{I as menu,D as point};
@@ -1 +1 @@
1
- import{o as t}from"./AssetBudgetPanel-qpkXbdeJ.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DmNeCiAo.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-BsFdZ-U4.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const D="workspace.action",O=[{id:"asset-budget",label:"Open Asset Budget",execute:()=>{t()}}];export{O as actions,D as point};
1
+ import{o as t}from"./AssetBudgetPanel-xh6RYB5z.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D-G1ZsCu.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-CjZyIn2t.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const D="workspace.action",O=[{id:"asset-budget",label:"Open Asset Budget",execute:()=>{t()}}];export{O as actions,D as point};
@@ -1 +1 @@
1
- import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{A as o}from"./AssetBudgetPanel-qpkXbdeJ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DmNeCiAo.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-BsFdZ-U4.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const P="workspace.document",R="Asset Budget";function _(r){return t.jsx(o,{})}export{_ as default,P as point,R as title};
1
+ import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{A as o}from"./AssetBudgetPanel-xh6RYB5z.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D-G1ZsCu.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-CjZyIn2t.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const P="workspace.document",R="Asset Budget";function _(r){return t.jsx(o,{})}export{_ as default,P as point,R as title};
@@ -1 +1 @@
1
- import{o as t}from"./AssetBudgetPanel-qpkXbdeJ.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DmNeCiAo.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-BsFdZ-U4.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const D="workspace.menu",I={menu:"window",items:[{id:"asset-budget",label:"Asset Budget",testId:"menu-asset-budget",execute:()=>{t()}}]};export{I as menu,D as point};
1
+ import{o as t}from"./AssetBudgetPanel-xh6RYB5z.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D-G1ZsCu.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./asset-loaders-CjZyIn2t.js";import"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const D="workspace.menu",I={menu:"window",items:[{id:"asset-budget",label:"Asset Budget",testId:"menu-asset-budget",execute:()=>{t()}}]};export{I as menu,D as point};
@@ -1 +1 @@
1
- import{a$ as v,b0 as l,b1 as h,b2 as b,b3 as m,b4 as g}from"./index-DmNeCiAo.js";const p=new WeakMap;function w(e){typeof window>"u"||(window.dispatchEvent(new CustomEvent("editor:assets-changed",{detail:{paths:[u(e)]}})),window.dispatchEvent(new CustomEvent("editor:asset-mutation",{detail:{type:"change",paths:[u(e)]}})))}function k(e,a){const s=u(a);let n=p.get(e);n||(n=new Map,p.set(e,n));const t=n.get(s);if(t)return t;const d=e.registry.registerProject("project-file",`.volter/history/imported-assets/${s}`,s.split("/").pop()),o={revision:0,driver:void 0},r=async()=>{const i=await b(s),c=new TextEncoder().encode(i);return{revision:o.revision,contentType:"application/vnd.volter.asset-history-token",bytes:c,sha256:await m(c)}};return o.driver={descriptor:d,capture:r,preflight:async i=>{const c=await r();return c.sha256===i.sha256?{ok:!0}:{ok:!1,reason:"content-conflict",actualRevision:o.revision,actualSha256:c.sha256}},restore:async i=>{const c=new TextDecoder().decode(e.snapshots.read(i).bytes);await l(s,c),o.revision++,w(s)},estimateBytes:i=>i.byteLength},e.registerDriver(o.driver),n.set(s,o),o}function f(e){return new TextEncoder().encode(e)}async function A(e,a){if(e.length===0)return;const s=h();if(!s)return;const n=e.map(t=>({entry:t,resource:k(s,t.assetPath)}));try{await s.recordAppliedTransaction({label:a,detail:e.map(t=>u(t.assetPath)).join(", "),resources:n.map(({resource:t})=>t.driver.descriptor.key),scope:"project"},n.map(({entry:t,resource:d})=>({resource:d.driver.descriptor.key,beforeBytes:f(t.beforeToken),afterBytes:f(t.afterToken),contentType:"application/vnd.volter.asset-history-token"})))}catch(t){const d=await Promise.allSettled(e.map(r=>l(r.assetPath,r.beforeToken)));for(const r of e)w(r.assetPath);const o=d.find(r=>r.status==="rejected");throw o?.status==="rejected"?new Error(`Project history could not record undo/redo and rollback failed: ${o.reason instanceof Error?o.reason.message:String(o.reason)}`):new Error(`Assets were rolled back because project history could not record undo/redo: ${t instanceof Error?t.message:String(t)}`)}}async function E(e,a=`Import ${e.name}`){const s=await v(e);return s.ok&&s.history&&await A([s.history],a),s}function u(e){const a=e.split(/[?#]/,1)[0].replace(/^\/+/,"");if(!a)throw new Error("Project asset path cannot be empty.");return a}function P(e,a){const s=h(),n=u(e);let t=!1;const d=()=>{t||(t=!0,queueMicrotask(()=>{t=!1,a()}))},o=s?g(s).subscribeAll(i=>{i===n&&d()}):()=>{},r=i=>{const c=i.detail?.paths;(!c||c.some(y=>u(y)===n))&&d()};return typeof window<"u"&&window.addEventListener("editor:assets-changed",r),()=>{o(),typeof window<"u"&&window.removeEventListener("editor:assets-changed",r)}}export{E as d,P as s};
1
+ import{a$ as v,b0 as l,b1 as h,b2 as b,b3 as m,b4 as g}from"./index-D-G1ZsCu.js";const p=new WeakMap;function w(e){typeof window>"u"||(window.dispatchEvent(new CustomEvent("editor:assets-changed",{detail:{paths:[u(e)]}})),window.dispatchEvent(new CustomEvent("editor:asset-mutation",{detail:{type:"change",paths:[u(e)]}})))}function k(e,a){const s=u(a);let n=p.get(e);n||(n=new Map,p.set(e,n));const t=n.get(s);if(t)return t;const d=e.registry.registerProject("project-file",`.volter/history/imported-assets/${s}`,s.split("/").pop()),o={revision:0,driver:void 0},r=async()=>{const i=await b(s),c=new TextEncoder().encode(i);return{revision:o.revision,contentType:"application/vnd.volter.asset-history-token",bytes:c,sha256:await m(c)}};return o.driver={descriptor:d,capture:r,preflight:async i=>{const c=await r();return c.sha256===i.sha256?{ok:!0}:{ok:!1,reason:"content-conflict",actualRevision:o.revision,actualSha256:c.sha256}},restore:async i=>{const c=new TextDecoder().decode(e.snapshots.read(i).bytes);await l(s,c),o.revision++,w(s)},estimateBytes:i=>i.byteLength},e.registerDriver(o.driver),n.set(s,o),o}function f(e){return new TextEncoder().encode(e)}async function A(e,a){if(e.length===0)return;const s=h();if(!s)return;const n=e.map(t=>({entry:t,resource:k(s,t.assetPath)}));try{await s.recordAppliedTransaction({label:a,detail:e.map(t=>u(t.assetPath)).join(", "),resources:n.map(({resource:t})=>t.driver.descriptor.key),scope:"project"},n.map(({entry:t,resource:d})=>({resource:d.driver.descriptor.key,beforeBytes:f(t.beforeToken),afterBytes:f(t.afterToken),contentType:"application/vnd.volter.asset-history-token"})))}catch(t){const d=await Promise.allSettled(e.map(r=>l(r.assetPath,r.beforeToken)));for(const r of e)w(r.assetPath);const o=d.find(r=>r.status==="rejected");throw o?.status==="rejected"?new Error(`Project history could not record undo/redo and rollback failed: ${o.reason instanceof Error?o.reason.message:String(o.reason)}`):new Error(`Assets were rolled back because project history could not record undo/redo: ${t instanceof Error?t.message:String(t)}`)}}async function E(e,a=`Import ${e.name}`){const s=await v(e);return s.ok&&s.history&&await A([s.history],a),s}function u(e){const a=e.split(/[?#]/,1)[0].replace(/^\/+/,"");if(!a)throw new Error("Project asset path cannot be empty.");return a}function P(e,a){const s=h(),n=u(e);let t=!1;const d=()=>{t||(t=!0,queueMicrotask(()=>{t=!1,a()}))},o=s?g(s).subscribeAll(i=>{i===n&&d()}):()=>{},r=i=>{const c=i.detail?.paths;(!c||c.some(y=>u(y)===n))&&d()};return typeof window<"u"&&window.addEventListener("editor:assets-changed",r),()=>{o(),typeof window<"u"&&window.removeEventListener("editor:assets-changed",r)}}export{E as d,P as s};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/spark.module-Byplgb8G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js"])))=>i.map(i=>d[i]);
2
- import{_ as y}from"./index-DmNeCiAo.js";import{clone as g}from"./SkeletonUtils-YH9iLOY_.js";import{AssetParseError as d}from"./asset-parse-error-BHMwBRU3.js";import{setUserData as p}from"./user-data-CODoGZqA.js";import{gltfLoader as _,resolveUrl as x,textureLoader as S}from"./loader-BTUKnX5Q.js";import{co as h,fo as u,K as b}from"./three.core-3arARmh6.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-BLhyNg0e.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const m=new Map,l=new Map,c=new Map;function N(e){const n=m.get(e);if(n)return n;const t=S.load(e);return m.set(e,t),t}function R(e){let n=l.get(e);return n||(n=new Promise((t,a)=>{_.load(e,o=>t({scene:o.scene,animations:o.animations}),void 0,o=>a(o))}),l.set(e,n)),n.then(t=>{const a=g(t.scene);return a.traverse(o=>{o instanceof h&&(o.material=Array.isArray(o.material)?o.material.map(s=>s.clone()):o.material.clone(),p(o,"__sharedGeometry",!0))}),{scene:a,animations:t.animations}})}async function V(e,n){let t=c.get(e);!t&&n&&(t=Promise.resolve(n),c.set(e,t)),t||(t=fetch(x(e)).then(async a=>{if(!a.ok)throw new Error(`Failed to load Gaussian splat: ${e} (${a.status} ${a.statusText})`);return new Uint8Array(await a.arrayBuffer())}),c.set(e,t));try{const[{SplatMesh:a},o]=await Promise.all([y(()=>import("./spark.module-Byplgb8G.js"),__vite__mapDeps([0,1,2,3])),t]),s=new a({fileBytes:o,fileName:e,raycastable:!0});await s.initialized,p(s,"gaussianSplat",{src:e,numSplats:s.numSplats});const r=s.getBoundingBox();if(!r.isEmpty()){const f=r.getSize(new u).multiplyScalar(1.5),w=r.getCenter(new u),i=new h(new b(f.x,f.y,f.z));i.name="__volter_splat_bounds",i.position.copy(w),i.visible=!1,i.raycast=()=>{},p(i,"engineInternal",!0),s.add(i)}return s}catch(a){throw c.delete(e),a}}function K(e,n,t){const a=e.getObjectByName(n);if(!a)throw new d([{code:"custom",path:["mesh","node"],message:`glTF "${t}" has no node named "${n}" (getObjectByName found nothing)`}],t);const o=r=>r.isSkinnedMesh;let s=o(a);if(s||a.traverse(r=>{o(r)&&(s=!0)}),s)throw new d([{code:"custom",path:["mesh","node"],message:`glTF "${t}" node "${n}" is (or contains) a SkinnedMesh — a skinned mesh cannot be lifted out of its armature (atomic-subtree rule). Reference the whole file instead of a \`node\`, or bake/export a non-skinned sub-asset.`}],t);return a}function q(){m.clear(),l.clear(),c.clear()}function H(e){m.delete(e),l.delete(e)}function J(){return{textures:m.size,gltf:l.size,splat:c.size}}export{J as assetCacheSizes,q as clearAssetCaches,H as invalidateCachedAsset,R as loadGLTF,V as loadSplat,N as loadTexture,K as resolveGltfNode};
2
+ import{_ as y}from"./index-D-G1ZsCu.js";import{clone as g}from"./SkeletonUtils-YH9iLOY_.js";import{AssetParseError as d}from"./asset-parse-error-BHMwBRU3.js";import{setUserData as p}from"./user-data-CODoGZqA.js";import{gltfLoader as _,resolveUrl as x,textureLoader as S}from"./loader-BTUKnX5Q.js";import{co as h,fo as u,K as b}from"./three.core-3arARmh6.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-BLhyNg0e.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";const m=new Map,l=new Map,c=new Map;function N(e){const n=m.get(e);if(n)return n;const t=S.load(e);return m.set(e,t),t}function R(e){let n=l.get(e);return n||(n=new Promise((t,a)=>{_.load(e,o=>t({scene:o.scene,animations:o.animations}),void 0,o=>a(o))}),l.set(e,n)),n.then(t=>{const a=g(t.scene);return a.traverse(o=>{o instanceof h&&(o.material=Array.isArray(o.material)?o.material.map(s=>s.clone()):o.material.clone(),p(o,"__sharedGeometry",!0))}),{scene:a,animations:t.animations}})}async function V(e,n){let t=c.get(e);!t&&n&&(t=Promise.resolve(n),c.set(e,t)),t||(t=fetch(x(e)).then(async a=>{if(!a.ok)throw new Error(`Failed to load Gaussian splat: ${e} (${a.status} ${a.statusText})`);return new Uint8Array(await a.arrayBuffer())}),c.set(e,t));try{const[{SplatMesh:a},o]=await Promise.all([y(()=>import("./spark.module-Byplgb8G.js"),__vite__mapDeps([0,1,2,3])),t]),s=new a({fileBytes:o,fileName:e,raycastable:!0});await s.initialized,p(s,"gaussianSplat",{src:e,numSplats:s.numSplats});const r=s.getBoundingBox();if(!r.isEmpty()){const f=r.getSize(new u).multiplyScalar(1.5),w=r.getCenter(new u),i=new h(new b(f.x,f.y,f.z));i.name="__volter_splat_bounds",i.position.copy(w),i.visible=!1,i.raycast=()=>{},p(i,"engineInternal",!0),s.add(i)}return s}catch(a){throw c.delete(e),a}}function K(e,n,t){const a=e.getObjectByName(n);if(!a)throw new d([{code:"custom",path:["mesh","node"],message:`glTF "${t}" has no node named "${n}" (getObjectByName found nothing)`}],t);const o=r=>r.isSkinnedMesh;let s=o(a);if(s||a.traverse(r=>{o(r)&&(s=!0)}),s)throw new d([{code:"custom",path:["mesh","node"],message:`glTF "${t}" node "${n}" is (or contains) a SkinnedMesh — a skinned mesh cannot be lifted out of its armature (atomic-subtree rule). Reference the whole file instead of a \`node\`, or bake/export a non-skinned sub-asset.`}],t);return a}function q(){m.clear(),l.clear(),c.clear()}function H(e){m.delete(e),l.delete(e)}function J(){return{textures:m.size,gltf:l.size,splat:c.size}}export{J as assetCacheSizes,q as clearAssetCaches,H as invalidateCachedAsset,R as loadGLTF,V as loadSplat,N as loadTexture,K as resolveGltfNode};