@automovie/viewer 0.3.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/README.md +8 -87
  2. package/lib/IAutoMovieViewerCompletedFrame.d.ts +19 -11
  3. package/lib/IAutoMovieViewerDisplayMetadata.d.ts +0 -5
  4. package/lib/IAutoMovieViewerHandle.d.ts +3 -25
  5. package/lib/IMountViewerOptions.d.ts +24 -38
  6. package/lib/IViewerCameraStateSnapshot.d.ts +0 -5
  7. package/lib/IViewerFrameTransfer.d.ts +11 -0
  8. package/lib/IViewerFrameTransfer.js +3 -0
  9. package/lib/IViewerFrameTransfer.js.map +1 -0
  10. package/lib/IViewerFrameTransfer.mjs +0 -0
  11. package/lib/applyCaptureCanvasSize.d.ts +9 -10
  12. package/lib/applyCaptureCanvasSize.js +7 -13
  13. package/lib/applyCaptureCanvasSize.js.map +1 -1
  14. package/lib/applyCaptureCanvasSize.mjs +7 -10
  15. package/lib/applyCaptureCanvasSize.mjs.map +1 -1
  16. package/lib/audio/IAutoMovieAudioCue.d.ts +3 -8
  17. package/lib/audio/planAutoMovieAudioPlayback.d.ts +8 -21
  18. package/lib/audio/planAutoMovieAudioPlayback.js +8 -14
  19. package/lib/audio/planAutoMovieAudioPlayback.js.map +1 -1
  20. package/lib/audio/planAutoMovieAudioPlayback.mjs +8 -14
  21. package/lib/audio/planAutoMovieAudioPlayback.mjs.map +1 -1
  22. package/lib/audio/playAutoMovieAudioCues.d.ts +4 -11
  23. package/lib/audio/playAutoMovieAudioCues.js +4 -11
  24. package/lib/audio/playAutoMovieAudioCues.js.map +1 -1
  25. package/lib/audio/playAutoMovieAudioCues.mjs +4 -11
  26. package/lib/audio/playAutoMovieAudioCues.mjs.map +1 -1
  27. package/lib/createViewerCameraState.d.ts +3 -11
  28. package/lib/createViewerCameraState.js +80 -121
  29. package/lib/createViewerCameraState.js.map +1 -1
  30. package/lib/createViewerCameraState.mjs +46 -98
  31. package/lib/createViewerCameraState.mjs.map +1 -1
  32. package/lib/createViewerDisplayClock.d.ts +2 -10
  33. package/lib/createViewerDisplayClock.js +4 -12
  34. package/lib/createViewerDisplayClock.js.map +1 -1
  35. package/lib/createViewerDisplayClock.mjs +3 -11
  36. package/lib/createViewerDisplayClock.mjs.map +1 -1
  37. package/lib/createViewerDisplayPublication.d.ts +7 -15
  38. package/lib/createViewerDisplayPublication.js +7 -15
  39. package/lib/createViewerDisplayPublication.js.map +1 -1
  40. package/lib/createViewerDisplayPublication.mjs +7 -15
  41. package/lib/createViewerDisplayPublication.mjs.map +1 -1
  42. package/lib/createViewerDisplaySave.d.ts +8 -16
  43. package/lib/createViewerDisplaySave.js +8 -16
  44. package/lib/createViewerDisplaySave.js.map +1 -1
  45. package/lib/createViewerDisplaySave.mjs +8 -16
  46. package/lib/createViewerDisplaySave.mjs.map +1 -1
  47. package/lib/createViewerFrameControl.d.ts +8 -10
  48. package/lib/createViewerFrameControl.js +3 -15
  49. package/lib/createViewerFrameControl.js.map +1 -1
  50. package/lib/createViewerFrameControl.mjs +3 -12
  51. package/lib/createViewerFrameControl.mjs.map +1 -1
  52. package/lib/createViewerViewportResize.d.ts +4 -12
  53. package/lib/createViewerViewportResize.js +7 -20
  54. package/lib/createViewerViewportResize.js.map +1 -1
  55. package/lib/createViewerViewportResize.mjs +6 -14
  56. package/lib/createViewerViewportResize.mjs.map +1 -1
  57. package/lib/index.d.ts +1 -0
  58. package/lib/index.js +1 -0
  59. package/lib/index.js.map +1 -1
  60. package/lib/index.mjs +6 -1
  61. package/lib/inspector/AutoMovieInspector.d.ts +33 -13
  62. package/lib/inspector/AutoMovieInspector.js +110 -19
  63. package/lib/inspector/AutoMovieInspector.js.map +1 -1
  64. package/lib/inspector/AutoMovieInspector.mjs +121 -18
  65. package/lib/inspector/AutoMovieInspector.mjs.map +1 -1
  66. package/lib/inspector/AutoMovieInspectorBeauty.d.ts +41 -0
  67. package/lib/inspector/AutoMovieInspectorBeauty.js +56 -0
  68. package/lib/inspector/AutoMovieInspectorBeauty.js.map +1 -0
  69. package/lib/inspector/AutoMovieInspectorBeauty.mjs +55 -0
  70. package/lib/inspector/AutoMovieInspectorBeauty.mjs.map +1 -0
  71. package/lib/inspector/AutoMovieInspectorDiagnosticLog.d.ts +48 -0
  72. package/lib/inspector/AutoMovieInspectorDiagnosticLog.js +186 -0
  73. package/lib/inspector/AutoMovieInspectorDiagnosticLog.js.map +1 -0
  74. package/lib/inspector/AutoMovieInspectorDiagnosticLog.mjs +171 -0
  75. package/lib/inspector/AutoMovieInspectorDiagnosticLog.mjs.map +1 -0
  76. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.d.ts +23 -0
  77. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.js +37 -0
  78. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.js.map +1 -0
  79. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.mjs +85 -0
  80. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.mjs.map +1 -0
  81. package/lib/inspector/AutoMovieInspectorMarksPanel.d.ts +4 -10
  82. package/lib/inspector/AutoMovieInspectorMarksPanel.js +18 -35
  83. package/lib/inspector/AutoMovieInspectorMarksPanel.js.map +1 -1
  84. package/lib/inspector/AutoMovieInspectorMarksPanel.mjs +32 -38
  85. package/lib/inspector/AutoMovieInspectorMarksPanel.mjs.map +1 -1
  86. package/lib/inspector/AutoMovieInspectorPlayhead.d.ts +35 -96
  87. package/lib/inspector/AutoMovieInspectorPlayhead.js +41 -101
  88. package/lib/inspector/AutoMovieInspectorPlayhead.js.map +1 -1
  89. package/lib/inspector/AutoMovieInspectorPlayhead.mjs +44 -98
  90. package/lib/inspector/AutoMovieInspectorPlayhead.mjs.map +1 -1
  91. package/lib/inspector/AutoMovieInspectorRequestPanel.d.ts +9 -10
  92. package/lib/inspector/AutoMovieInspectorRequestPanel.js +18 -12
  93. package/lib/inspector/AutoMovieInspectorRequestPanel.js.map +1 -1
  94. package/lib/inspector/AutoMovieInspectorRequestPanel.mjs +32 -14
  95. package/lib/inspector/AutoMovieInspectorRequestPanel.mjs.map +1 -1
  96. package/lib/inspector/AutoMovieInspectorSelectionPanel.d.ts +0 -8
  97. package/lib/inspector/AutoMovieInspectorSelectionPanel.js +0 -8
  98. package/lib/inspector/AutoMovieInspectorSelectionPanel.js.map +1 -1
  99. package/lib/inspector/AutoMovieInspectorSelectionPanel.mjs +0 -8
  100. package/lib/inspector/AutoMovieInspectorSelectionPanel.mjs.map +1 -1
  101. package/lib/inspector/AutoMovieInspectorShadePanel.d.ts +2 -9
  102. package/lib/inspector/AutoMovieInspectorShadePanel.js +18 -25
  103. package/lib/inspector/AutoMovieInspectorShadePanel.js.map +1 -1
  104. package/lib/inspector/AutoMovieInspectorShadePanel.mjs +18 -27
  105. package/lib/inspector/AutoMovieInspectorShadePanel.mjs.map +1 -1
  106. package/lib/inspector/AutoMovieInspectorTimePanel.d.ts +0 -8
  107. package/lib/inspector/AutoMovieInspectorTimePanel.js +0 -8
  108. package/lib/inspector/AutoMovieInspectorTimePanel.js.map +1 -1
  109. package/lib/inspector/AutoMovieInspectorTimePanel.mjs +0 -8
  110. package/lib/inspector/AutoMovieInspectorTimePanel.mjs.map +1 -1
  111. package/lib/inspector/AutoMovieInspectorTimeReadout.d.ts +0 -8
  112. package/lib/inspector/AutoMovieInspectorTimeReadout.js +4 -10
  113. package/lib/inspector/AutoMovieInspectorTimeReadout.js.map +1 -1
  114. package/lib/inspector/AutoMovieInspectorTimeReadout.mjs +3 -12
  115. package/lib/inspector/AutoMovieInspectorTimeReadout.mjs.map +1 -1
  116. package/lib/inspector/AutoMovieInspectorTransition.d.ts +79 -0
  117. package/lib/inspector/AutoMovieInspectorTransition.js +131 -0
  118. package/lib/inspector/AutoMovieInspectorTransition.js.map +1 -0
  119. package/lib/inspector/AutoMovieInspectorTransition.mjs +119 -0
  120. package/lib/inspector/AutoMovieInspectorTransition.mjs.map +1 -0
  121. package/lib/inspector/AutoMovieInspectorViewPanel.d.ts +0 -8
  122. package/lib/inspector/AutoMovieInspectorViewPanel.js +0 -8
  123. package/lib/inspector/AutoMovieInspectorViewPanel.js.map +1 -1
  124. package/lib/inspector/AutoMovieInspectorViewPanel.mjs +0 -8
  125. package/lib/inspector/AutoMovieInspectorViewPanel.mjs.map +1 -1
  126. package/lib/inspector/IAutoMovieInspectorAction.d.ts +54 -95
  127. package/lib/inspector/IAutoMovieInspectorLive.d.ts +43 -0
  128. package/lib/inspector/IAutoMovieInspectorLive.js +3 -0
  129. package/lib/inspector/IAutoMovieInspectorLive.js.map +1 -0
  130. package/lib/inspector/IAutoMovieInspectorLive.mjs +0 -0
  131. package/lib/inspector/IAutoMovieInspectorPathNode.d.ts +14 -9
  132. package/lib/inspector/IAutoMovieInspectorProps.d.ts +3 -14
  133. package/lib/inspector/IAutoMovieInspectorScene.d.ts +96 -100
  134. package/lib/inspector/IAutoMovieInspectorSceneHost.d.ts +37 -102
  135. package/lib/inspector/IAutoMovieInspectorState.d.ts +6 -7
  136. package/lib/inspector/assertAutoMovieInspectorRaster.d.ts +7 -0
  137. package/lib/inspector/assertAutoMovieInspectorRaster.js +19 -0
  138. package/lib/inspector/assertAutoMovieInspectorRaster.js.map +1 -0
  139. package/lib/inspector/assertAutoMovieInspectorRaster.mjs +17 -0
  140. package/lib/inspector/assertAutoMovieInspectorRaster.mjs.map +1 -0
  141. package/lib/inspector/buildAutoMovieInspectorPathTree.d.ts +9 -10
  142. package/lib/inspector/buildAutoMovieInspectorPathTree.js +9 -10
  143. package/lib/inspector/buildAutoMovieInspectorPathTree.js.map +1 -1
  144. package/lib/inspector/buildAutoMovieInspectorPathTree.mjs +9 -10
  145. package/lib/inspector/buildAutoMovieInspectorPathTree.mjs.map +1 -1
  146. package/lib/inspector/changesAutoMovieObservedScene.d.ts +16 -0
  147. package/lib/inspector/changesAutoMovieObservedScene.js +28 -0
  148. package/lib/inspector/changesAutoMovieObservedScene.js.map +1 -0
  149. package/lib/inspector/changesAutoMovieObservedScene.mjs +21 -0
  150. package/lib/inspector/changesAutoMovieObservedScene.mjs.map +1 -0
  151. package/lib/inspector/createAutoMovieInspectorAddressWriter.d.ts +13 -11
  152. package/lib/inspector/createAutoMovieInspectorAddressWriter.js +13 -11
  153. package/lib/inspector/createAutoMovieInspectorAddressWriter.js.map +1 -1
  154. package/lib/inspector/createAutoMovieInspectorAddressWriter.mjs +13 -11
  155. package/lib/inspector/createAutoMovieInspectorAddressWriter.mjs.map +1 -1
  156. package/lib/inspector/createAutoMovieInspectorCanvasHost.d.ts +7 -10
  157. package/lib/inspector/createAutoMovieInspectorCanvasHost.js +14 -11
  158. package/lib/inspector/createAutoMovieInspectorCanvasHost.js.map +1 -1
  159. package/lib/inspector/createAutoMovieInspectorCanvasHost.mjs +17 -14
  160. package/lib/inspector/createAutoMovieInspectorCanvasHost.mjs.map +1 -1
  161. package/lib/inspector/createAutoMovieInspectorState.d.ts +3 -9
  162. package/lib/inspector/createAutoMovieInspectorState.js +3 -9
  163. package/lib/inspector/createAutoMovieInspectorState.js.map +1 -1
  164. package/lib/inspector/createAutoMovieInspectorState.mjs +3 -9
  165. package/lib/inspector/createAutoMovieInspectorState.mjs.map +1 -1
  166. package/lib/inspector/firstAutoMovieInspectorSecond.d.ts +6 -0
  167. package/lib/inspector/firstAutoMovieInspectorSecond.js +13 -0
  168. package/lib/inspector/firstAutoMovieInspectorSecond.js.map +1 -0
  169. package/lib/inspector/firstAutoMovieInspectorSecond.mjs +11 -0
  170. package/lib/inspector/firstAutoMovieInspectorSecond.mjs.map +1 -0
  171. package/lib/inspector/followAutoMovieInspectorSize.d.ts +11 -0
  172. package/lib/inspector/followAutoMovieInspectorSize.js +26 -0
  173. package/lib/inspector/followAutoMovieInspectorSize.js.map +1 -0
  174. package/lib/inspector/followAutoMovieInspectorSize.mjs +26 -0
  175. package/lib/inspector/followAutoMovieInspectorSize.mjs.map +1 -0
  176. package/lib/inspector/formatAutoMovieInspectorAddress.d.ts +11 -10
  177. package/lib/inspector/formatAutoMovieInspectorAddress.js +15 -11
  178. package/lib/inspector/formatAutoMovieInspectorAddress.js.map +1 -1
  179. package/lib/inspector/formatAutoMovieInspectorAddress.mjs +15 -11
  180. package/lib/inspector/formatAutoMovieInspectorAddress.mjs.map +1 -1
  181. package/lib/inspector/formatAutoMovieInspectorCommand.d.ts +20 -14
  182. package/lib/inspector/formatAutoMovieInspectorCommand.js +33 -14
  183. package/lib/inspector/formatAutoMovieInspectorCommand.js.map +1 -1
  184. package/lib/inspector/formatAutoMovieInspectorCommand.mjs +26 -15
  185. package/lib/inspector/formatAutoMovieInspectorCommand.mjs.map +1 -1
  186. package/lib/inspector/handleAutoMovieInspectorKey.d.ts +24 -15
  187. package/lib/inspector/handleAutoMovieInspectorKey.js +27 -16
  188. package/lib/inspector/handleAutoMovieInspectorKey.js.map +1 -1
  189. package/lib/inspector/handleAutoMovieInspectorKey.mjs +27 -16
  190. package/lib/inspector/handleAutoMovieInspectorKey.mjs.map +1 -1
  191. package/lib/inspector/index.d.ts +5 -0
  192. package/lib/inspector/index.js +5 -0
  193. package/lib/inspector/index.js.map +1 -1
  194. package/lib/inspector/index.mjs +6 -1
  195. package/lib/inspector/inspectAutoMovieInspectorRequest.d.ts +19 -0
  196. package/lib/inspector/inspectAutoMovieInspectorRequest.js +20 -0
  197. package/lib/inspector/inspectAutoMovieInspectorRequest.js.map +1 -0
  198. package/lib/inspector/inspectAutoMovieInspectorRequest.mjs +20 -0
  199. package/lib/inspector/inspectAutoMovieInspectorRequest.mjs.map +1 -0
  200. package/lib/inspector/installAutoMovieInspectorRequest.d.ts +20 -0
  201. package/lib/inspector/installAutoMovieInspectorRequest.js +36 -0
  202. package/lib/inspector/installAutoMovieInspectorRequest.js.map +1 -0
  203. package/lib/inspector/installAutoMovieInspectorRequest.mjs +35 -0
  204. package/lib/inspector/installAutoMovieInspectorRequest.mjs.map +1 -0
  205. package/lib/inspector/locateAutoMovieInspectorFinding.d.ts +19 -0
  206. package/lib/inspector/locateAutoMovieInspectorFinding.js +34 -0
  207. package/lib/inspector/locateAutoMovieInspectorFinding.js.map +1 -0
  208. package/lib/inspector/locateAutoMovieInspectorFinding.mjs +37 -0
  209. package/lib/inspector/locateAutoMovieInspectorFinding.mjs.map +1 -0
  210. package/lib/inspector/messageOfAutoMovieInspectorError.d.ts +2 -0
  211. package/lib/inspector/messageOfAutoMovieInspectorError.js +8 -0
  212. package/lib/inspector/messageOfAutoMovieInspectorError.js.map +1 -0
  213. package/lib/inspector/messageOfAutoMovieInspectorError.mjs +8 -0
  214. package/lib/inspector/messageOfAutoMovieInspectorError.mjs.map +1 -0
  215. package/lib/inspector/mountAutoMovieInspectorPage.d.ts +5 -8
  216. package/lib/inspector/mountAutoMovieInspectorPage.js +3 -9
  217. package/lib/inspector/mountAutoMovieInspectorPage.js.map +1 -1
  218. package/lib/inspector/mountAutoMovieInspectorPage.mjs +4 -9
  219. package/lib/inspector/mountAutoMovieInspectorPage.mjs.map +1 -1
  220. package/lib/inspector/mountAutoMovieInspectorScene.d.ts +55 -12
  221. package/lib/inspector/mountAutoMovieInspectorScene.js +238 -164
  222. package/lib/inspector/mountAutoMovieInspectorScene.js.map +1 -1
  223. package/lib/inspector/mountAutoMovieInspectorScene.mjs +223 -149
  224. package/lib/inspector/mountAutoMovieInspectorScene.mjs.map +1 -1
  225. package/lib/inspector/placeAutoMovieInspectorLabels.d.ts +29 -0
  226. package/lib/inspector/placeAutoMovieInspectorLabels.js +33 -0
  227. package/lib/inspector/placeAutoMovieInspectorLabels.js.map +1 -0
  228. package/lib/inspector/placeAutoMovieInspectorLabels.mjs +32 -0
  229. package/lib/inspector/placeAutoMovieInspectorLabels.mjs.map +1 -0
  230. package/lib/inspector/readAutoMovieInspectorAddress.d.ts +8 -11
  231. package/lib/inspector/readAutoMovieInspectorAddress.js +8 -11
  232. package/lib/inspector/readAutoMovieInspectorAddress.js.map +1 -1
  233. package/lib/inspector/readAutoMovieInspectorAddress.mjs +8 -11
  234. package/lib/inspector/readAutoMovieInspectorAddress.mjs.map +1 -1
  235. package/lib/inspector/readAutoMovieInspectorFacts.d.ts +17 -0
  236. package/lib/inspector/readAutoMovieInspectorFacts.js +34 -0
  237. package/lib/inspector/readAutoMovieInspectorFacts.js.map +1 -0
  238. package/lib/inspector/readAutoMovieInspectorFacts.mjs +28 -0
  239. package/lib/inspector/readAutoMovieInspectorFacts.mjs.map +1 -0
  240. package/lib/inspector/readsAutoMovieInspectorPlacedScene.d.ts +9 -0
  241. package/lib/inspector/readsAutoMovieInspectorPlacedScene.js +14 -0
  242. package/lib/inspector/readsAutoMovieInspectorPlacedScene.js.map +1 -0
  243. package/lib/inspector/readsAutoMovieInspectorPlacedScene.mjs +14 -0
  244. package/lib/inspector/readsAutoMovieInspectorPlacedScene.mjs.map +1 -0
  245. package/lib/inspector/reduceAutoMovieInspectorState.d.ts +10 -10
  246. package/lib/inspector/reduceAutoMovieInspectorState.js +17 -11
  247. package/lib/inspector/reduceAutoMovieInspectorState.js.map +1 -1
  248. package/lib/inspector/reduceAutoMovieInspectorState.mjs +16 -11
  249. package/lib/inspector/reduceAutoMovieInspectorState.mjs.map +1 -1
  250. package/lib/inspector/releaseAutoMovieInspectorSteps.d.ts +6 -0
  251. package/lib/inspector/releaseAutoMovieInspectorSteps.js +23 -0
  252. package/lib/inspector/releaseAutoMovieInspectorSteps.js.map +1 -0
  253. package/lib/inspector/releaseAutoMovieInspectorSteps.mjs +19 -0
  254. package/lib/inspector/releaseAutoMovieInspectorSteps.mjs.map +1 -0
  255. package/lib/inspector/reportAutoMovieInspectorLabels.d.ts +21 -0
  256. package/lib/inspector/reportAutoMovieInspectorLabels.js +27 -0
  257. package/lib/inspector/reportAutoMovieInspectorLabels.js.map +1 -0
  258. package/lib/inspector/reportAutoMovieInspectorLabels.mjs +30 -0
  259. package/lib/inspector/reportAutoMovieInspectorLabels.mjs.map +1 -0
  260. package/lib/inspector/resolveAutoMovieInspectorCamera.d.ts +22 -0
  261. package/lib/inspector/resolveAutoMovieInspectorCamera.js +34 -0
  262. package/lib/inspector/resolveAutoMovieInspectorCamera.js.map +1 -0
  263. package/lib/inspector/resolveAutoMovieInspectorCamera.mjs +34 -0
  264. package/lib/inspector/resolveAutoMovieInspectorCamera.mjs.map +1 -0
  265. package/lib/inspector/showAutoMovieInspectorFinding.d.ts +25 -0
  266. package/lib/inspector/showAutoMovieInspectorFinding.js +26 -0
  267. package/lib/inspector/showAutoMovieInspectorFinding.js.map +1 -0
  268. package/lib/inspector/showAutoMovieInspectorFinding.mjs +26 -0
  269. package/lib/inspector/showAutoMovieInspectorFinding.mjs.map +1 -0
  270. package/lib/inspector/stopAutoMovieInspectorTime.d.ts +11 -0
  271. package/lib/inspector/stopAutoMovieInspectorTime.js +17 -0
  272. package/lib/inspector/stopAutoMovieInspectorTime.js.map +1 -0
  273. package/lib/inspector/stopAutoMovieInspectorTime.mjs +18 -0
  274. package/lib/inspector/stopAutoMovieInspectorTime.mjs.map +1 -0
  275. package/lib/inspector/writeAutoMovieInspectorInspection.d.ts +6 -0
  276. package/lib/inspector/writeAutoMovieInspectorInspection.js +12 -0
  277. package/lib/inspector/writeAutoMovieInspectorInspection.js.map +1 -0
  278. package/lib/inspector/writeAutoMovieInspectorInspection.mjs +12 -0
  279. package/lib/inspector/writeAutoMovieInspectorInspection.mjs.map +1 -0
  280. package/lib/internal.d.ts +7 -0
  281. package/lib/internal.js +25 -0
  282. package/lib/internal.js.map +1 -0
  283. package/lib/internal.mjs +8 -0
  284. package/lib/mountViewer.d.ts +16 -10
  285. package/lib/mountViewer.js +17 -14
  286. package/lib/mountViewer.js.map +1 -1
  287. package/lib/mountViewer.mjs +18 -12
  288. package/lib/mountViewer.mjs.map +1 -1
  289. package/lib/publishViewerCompletedFrame.d.ts +12 -10
  290. package/lib/publishViewerCompletedFrame.js +11 -9
  291. package/lib/publishViewerCompletedFrame.js.map +1 -1
  292. package/lib/publishViewerCompletedFrame.mjs +11 -9
  293. package/lib/publishViewerCompletedFrame.mjs.map +1 -1
  294. package/lib/redrawViewerCompletedFrame.d.ts +2 -10
  295. package/lib/redrawViewerCompletedFrame.js +4 -12
  296. package/lib/redrawViewerCompletedFrame.js.map +1 -1
  297. package/lib/redrawViewerCompletedFrame.mjs +3 -11
  298. package/lib/redrawViewerCompletedFrame.mjs.map +1 -1
  299. package/lib/releaseMountedViewer.d.ts +5 -9
  300. package/lib/releaseMountedViewer.js +5 -9
  301. package/lib/releaseMountedViewer.js.map +1 -1
  302. package/lib/releaseMountedViewer.mjs +5 -9
  303. package/lib/releaseMountedViewer.mjs.map +1 -1
  304. package/lib/transport/AutoMovieViewerTransport.d.ts +13 -122
  305. package/lib/transport/AutoMovieViewerTransport.js +10 -74
  306. package/lib/transport/AutoMovieViewerTransport.js.map +1 -1
  307. package/lib/transport/AutoMovieViewerTransport.mjs +10 -65
  308. package/lib/transport/AutoMovieViewerTransport.mjs.map +1 -1
  309. package/lib/transport/readAutoMovieReviewInterval.d.ts +3 -10
  310. package/lib/transport/readAutoMovieReviewInterval.js +11 -16
  311. package/lib/transport/readAutoMovieReviewInterval.js.map +1 -1
  312. package/lib/transport/readAutoMovieReviewInterval.mjs +8 -14
  313. package/lib/transport/readAutoMovieReviewInterval.mjs.map +1 -1
  314. package/package.json +12 -8
  315. package/src/IAutoMovieViewerCompletedFrame.ts +21 -11
  316. package/src/IAutoMovieViewerDisplayMetadata.ts +0 -5
  317. package/src/IAutoMovieViewerHandle.ts +3 -25
  318. package/src/IMountViewerOptions.ts +24 -38
  319. package/src/IViewerCameraStateSnapshot.ts +0 -5
  320. package/src/IViewerFrameTransfer.ts +13 -0
  321. package/src/applyCaptureCanvasSize.ts +9 -18
  322. package/src/audio/IAutoMovieAudioCue.ts +3 -8
  323. package/src/audio/planAutoMovieAudioPlayback.ts +9 -23
  324. package/src/audio/playAutoMovieAudioCues.ts +4 -11
  325. package/src/createViewerCameraState.ts +119 -175
  326. package/src/createViewerDisplayClock.ts +4 -12
  327. package/src/createViewerDisplayPublication.ts +7 -15
  328. package/src/createViewerDisplaySave.ts +8 -16
  329. package/src/createViewerFrameControl.ts +16 -24
  330. package/src/createViewerViewportResize.ts +7 -23
  331. package/src/index.ts +1 -0
  332. package/src/inspector/AutoMovieInspector.tsx +183 -20
  333. package/src/inspector/AutoMovieInspectorBeauty.ts +89 -0
  334. package/src/inspector/AutoMovieInspectorDiagnosticLog.ts +235 -0
  335. package/src/inspector/AutoMovieInspectorDiagnosticsPanel.tsx +118 -0
  336. package/src/inspector/AutoMovieInspectorMarksPanel.tsx +26 -34
  337. package/src/inspector/AutoMovieInspectorPlayhead.ts +53 -110
  338. package/src/inspector/AutoMovieInspectorRequestPanel.tsx +57 -29
  339. package/src/inspector/AutoMovieInspectorSelectionPanel.tsx +0 -8
  340. package/src/inspector/AutoMovieInspectorShadePanel.tsx +24 -29
  341. package/src/inspector/AutoMovieInspectorTimePanel.tsx +0 -8
  342. package/src/inspector/AutoMovieInspectorTimeReadout.tsx +4 -10
  343. package/src/inspector/AutoMovieInspectorTransition.ts +178 -0
  344. package/src/inspector/AutoMovieInspectorViewPanel.tsx +0 -8
  345. package/src/inspector/IAutoMovieInspectorAction.ts +57 -94
  346. package/src/inspector/IAutoMovieInspectorLive.ts +62 -0
  347. package/src/inspector/IAutoMovieInspectorPathNode.ts +14 -9
  348. package/src/inspector/IAutoMovieInspectorProps.ts +4 -14
  349. package/src/inspector/IAutoMovieInspectorScene.ts +104 -99
  350. package/src/inspector/IAutoMovieInspectorSceneHost.ts +43 -102
  351. package/src/inspector/IAutoMovieInspectorState.ts +6 -7
  352. package/src/inspector/assertAutoMovieInspectorRaster.ts +23 -0
  353. package/src/inspector/buildAutoMovieInspectorPathTree.ts +9 -10
  354. package/src/inspector/changesAutoMovieObservedScene.ts +30 -0
  355. package/src/inspector/createAutoMovieInspectorAddressWriter.ts +13 -11
  356. package/src/inspector/createAutoMovieInspectorCanvasHost.ts +14 -12
  357. package/src/inspector/createAutoMovieInspectorState.ts +3 -9
  358. package/src/inspector/firstAutoMovieInspectorSecond.ts +13 -0
  359. package/src/inspector/followAutoMovieInspectorSize.ts +32 -0
  360. package/src/inspector/formatAutoMovieInspectorAddress.ts +15 -11
  361. package/src/inspector/formatAutoMovieInspectorCommand.ts +44 -15
  362. package/src/inspector/handleAutoMovieInspectorKey.ts +27 -16
  363. package/src/inspector/index.ts +5 -0
  364. package/src/inspector/inspectAutoMovieInspectorRequest.ts +37 -0
  365. package/src/inspector/installAutoMovieInspectorRequest.ts +50 -0
  366. package/src/inspector/locateAutoMovieInspectorFinding.ts +40 -0
  367. package/src/inspector/messageOfAutoMovieInspectorError.ts +4 -0
  368. package/src/inspector/mountAutoMovieInspectorPage.tsx +7 -8
  369. package/src/inspector/mountAutoMovieInspectorScene.ts +290 -232
  370. package/src/inspector/placeAutoMovieInspectorLabels.ts +53 -0
  371. package/src/inspector/readAutoMovieInspectorAddress.ts +8 -11
  372. package/src/inspector/readAutoMovieInspectorFacts.ts +50 -0
  373. package/src/inspector/readsAutoMovieInspectorPlacedScene.ts +16 -0
  374. package/src/inspector/reduceAutoMovieInspectorState.ts +17 -11
  375. package/src/inspector/releaseAutoMovieInspectorSteps.ts +19 -0
  376. package/src/inspector/reportAutoMovieInspectorLabels.ts +45 -0
  377. package/src/inspector/resolveAutoMovieInspectorCamera.ts +50 -0
  378. package/src/inspector/showAutoMovieInspectorFinding.ts +40 -0
  379. package/src/inspector/stopAutoMovieInspectorTime.ts +19 -0
  380. package/src/inspector/writeAutoMovieInspectorInspection.ts +12 -0
  381. package/src/internal.ts +9 -0
  382. package/src/mountViewer.ts +17 -14
  383. package/src/publishViewerCompletedFrame.ts +14 -10
  384. package/src/redrawViewerCompletedFrame.ts +3 -12
  385. package/src/releaseMountedViewer.ts +5 -9
  386. package/src/transport/AutoMovieViewerTransport.ts +17 -144
  387. package/src/transport/readAutoMovieReviewInterval.ts +15 -16
@@ -2,20 +2,26 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AutoMovieInspectorPlayhead = void 0;
4
4
  /**
5
- * The inspector's playhead: the second shown, the subject's duration, whether it plays and how fast, kept outside React.
5
+ * The inspector's playhead: the second shown, the subject's duration, whether
6
+ * it plays and how fast, kept outside React.
6
7
  *
7
- * The render loop advances it and reads it directly every frame. The time readout reads its snapshot through `useSyncExternalStore` with `subscribe` and `getSnapshot`, and the time panel only whether it plays, so a playing frame re-renders the readout alone and a start or stop also the panel's play button. A snapshot is replaced, never changed, so its identity tells a reader whether anything moved. Seconds stay within `[0, durationSeconds]`.
8
+ * The render loop advances it and reads it directly every frame. The time
9
+ * readout reads its snapshot through `useSyncExternalStore` with `subscribe`
10
+ * and `getSnapshot`, and the time panel only whether it plays, so a playing
11
+ * frame re-renders the readout alone and a start or stop also the panel's play
12
+ * button. A snapshot is replaced, never changed, so its identity tells a reader
13
+ * whether anything moved. Seconds stay within `[0, durationSeconds]`.
8
14
  *
9
- * The rate scales how fast the preview plays and is not part of the request: it changes no picture, and the capture grammar's `rate` key, stills per second, is a different quantity.
15
+ * The rate scales how fast the preview plays and is not part of the request: it
16
+ * changes no picture, and the capture grammar's `rate` key, stills per second,
17
+ * is a different quantity.
10
18
  *
11
19
  * ```ts
12
- * const seconds = useSyncExternalStore(playhead.subscribe, playhead.getSnapshot).seconds;
20
+ * const seconds = useSyncExternalStore(
21
+ * playhead.subscribe,
22
+ * playhead.getSnapshot,
23
+ * ).seconds;
13
24
  * ```
14
- *
15
- * @evidence contracts/development/design.md#principled-representation Seconds and duration are subject seconds, the rate is a positive multiplier of wall time and playing is a boolean; the snapshot is one immutable record so the external-store contract's identity comparison is exact.
16
- * @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the inspector, one per mounted component; the scene mount calls `setDuration`, `seek` and `advance`, the time panel `play`, `pause` and `setRate` and subscribes to the playing flag, the readout `seek`, `subscribe` and `getSnapshot`, and the inspector's keys, through `handleAutoMovieInspectorKey`, `play`, `pause`, `seek` and `getSnapshot`.
17
- * @evidence contracts/development/design.md#prohibited-design-shortcuts `subscribe` and `getSnapshot` are bound properties, so React keeps one subscription across renders instead of resubscribing to a new function each time.
18
- * @evidence contracts/development/common.md#meaningful-documentation States who moves and who reads the playhead and what each reader re-renders on, why it lives outside React, the snapshot's identity rule, the range and why the rate is not a request member.
19
25
  */
20
26
  class AutoMovieInspectorPlayhead {
21
27
  snapshot_ = {
@@ -23,52 +29,26 @@ class AutoMovieInspectorPlayhead {
23
29
  durationSeconds: 0,
24
30
  playing: false,
25
31
  rate: 1,
32
+ jump: 0,
26
33
  };
27
34
  listeners_ = new Set();
28
- /**
29
- * Call `listener` after every change, until the returned function is called.
30
- *
31
- * @evidence contracts/development/common.md#meaningful-documentation States when the listener runs and how it is removed.
32
- * @evidence contracts/development/implementation.md#principled-implementation The external-store contract React's `useSyncExternalStore` reads: subscribe returns its own unsubscribe.
33
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One set of listeners.
34
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The same listener given twice is held once, as a set holds it.
35
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant time to add and to remove.
36
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A registration computes nothing.
37
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds the listener until its unsubscribe runs; the set grows by one per live subscription, which React keeps at two per mounted inspector, the time panel's and the readout's.
38
- */
35
+ /** Call `listener` after every change, until the returned function is called. */
39
36
  subscribe = (listener) => {
40
37
  this.listeners_.add(listener);
41
38
  return () => {
42
39
  this.listeners_.delete(listener);
43
40
  };
44
41
  };
45
- /**
46
- * The current snapshot, the same object until something changes.
47
- *
48
- * @evidence contracts/development/common.md#meaningful-documentation States the identity rule.
49
- * @evidence contracts/development/implementation.md#principled-implementation `useSyncExternalStore` requires a cached snapshot, or it renders forever.
50
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Returns the held record.
51
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Never builds a record on read.
52
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant.
53
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Returns what is held.
54
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Allocates nothing.
55
- */
42
+ /** The current snapshot, the same object until something changes. */
56
43
  getSnapshot = () => this.snapshot_;
57
44
  /**
58
- * Set the subject's duration when an instance is ready, keeping the second within it.
59
- *
60
- * It throws for a duration that is not a positive finite number.
45
+ * Set the subject's duration when an instance is ready, keeping the second
46
+ * within it.
61
47
  *
62
- * @evidence contracts/development/common.md#meaningful-documentation States when it is called, the clamp and the refusal.
63
- * @evidence contracts/development/implementation.md#principled-implementation Seconds beyond the subject's end show nothing of it, so the second is clamped to the new range.
64
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, then one change.
65
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A bad duration is refused instead of clamping every second to zero.
66
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
67
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
68
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
48
+ * It throws for a duration that is not positive.
69
49
  */
70
50
  setDuration(durationSeconds) {
71
- if (!(Number.isFinite(durationSeconds) && durationSeconds > 0))
51
+ if (!(durationSeconds > 0))
72
52
  throw new Error(`Inspector duration ${durationSeconds} is not a positive number of seconds`);
73
53
  this.change({
74
54
  durationSeconds,
@@ -76,87 +56,46 @@ class AutoMovieInspectorPlayhead {
76
56
  });
77
57
  }
78
58
  /**
79
- * Start playing; from the end, play starts again at zero.
80
- *
81
- * @evidence contracts/development/common.md#meaningful-documentation States the restart at the end.
82
- * @evidence contracts/development/implementation.md#principled-implementation A playhead at the end has nothing left to play, so play means the whole subject again.
83
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One change.
84
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Playing an unready subject (duration zero) is a no-op rather than a loop at zero.
85
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
86
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
87
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
59
+ * Start playing; from the end, play starts again at zero, which counts as a
60
+ * jump.
88
61
  */
89
62
  play() {
90
63
  const { seconds, durationSeconds } = this.snapshot_;
91
64
  if (durationSeconds === 0)
92
65
  return;
93
- this.change({
94
- playing: true,
95
- seconds: seconds >= durationSeconds ? 0 : seconds,
96
- });
66
+ this.change(seconds >= durationSeconds
67
+ ? { playing: true, seconds: 0, jump: this.snapshot_.jump + 1 }
68
+ : { playing: true });
97
69
  }
98
- /**
99
- * Stop playing where the playhead is.
100
- *
101
- * @evidence contracts/development/common.md#meaningful-documentation States that the second is kept.
102
- * @evidence contracts/development/implementation.md#principled-implementation The paused second is the picture the request then names.
103
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One change.
104
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Pausing a paused playhead changes nothing and notifies no one.
105
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
106
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
107
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
108
- */
70
+ /** Stop playing where the playhead is. */
109
71
  pause() {
110
72
  this.change({ playing: false });
111
73
  }
112
74
  /**
113
- * Show one second, clamped to `[0, durationSeconds]`; playing continues from it. A second that is not finite is refused.
114
- *
115
- * @evidence contracts/development/common.md#meaningful-documentation States the clamp, that playing continues and the refusal.
116
- * @evidence contracts/development/implementation.md#principled-implementation A slider or an address can ask past either end, and the nearest second the subject has is the one drawn.
117
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, clamp, change.
118
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts NaN is refused instead of clamped to an end.
119
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
120
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
121
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
75
+ * Show one second, clamped to `[0, durationSeconds]`; playing continues from
76
+ * it. Moving to another second counts as a jump.
122
77
  */
123
78
  seek(seconds) {
124
- if (!Number.isFinite(seconds))
125
- throw new Error(`Inspector second ${seconds} is not a number`);
126
- this.change({
127
- seconds: Math.min(Math.max(seconds, 0), this.snapshot_.durationSeconds),
128
- });
79
+ const clamped = Math.min(Math.max(seconds, 0), this.snapshot_.durationSeconds);
80
+ if (clamped !== this.snapshot_.seconds)
81
+ this.change({ seconds: clamped, jump: this.snapshot_.jump + 1 });
129
82
  }
130
83
  /**
131
- * Play `rate` subject seconds per wall second. It throws for a rate that is not positive and finite.
132
- *
133
- * @evidence contracts/development/common.md#meaningful-documentation States the unit and the refusal.
134
- * @evidence contracts/development/implementation.md#principled-implementation The rate multiplies the wall time `advance` is given.
135
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, change.
136
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Zero and negative rates are refused; pausing is `pause`.
137
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
138
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
139
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
84
+ * Play `rate` subject seconds per wall second. It throws for a rate that is
85
+ * not positive.
140
86
  */
141
87
  setRate(rate) {
142
- if (!(Number.isFinite(rate) && rate > 0))
88
+ if (!(rate > 0))
143
89
  throw new Error(`Inspector rate ${rate} is not a positive number`);
144
90
  this.change({ rate });
145
91
  }
146
92
  /**
147
- * Move a playing playhead by `wallSeconds` of wall time times the rate, stopping at the end. A paused playhead does not move.
148
- *
149
- * @evidence contracts/development/common.md#meaningful-documentation States the unit, the stop at the end and the paused case.
150
- * @evidence contracts/development/implementation.md#principled-implementation Subject time is wall time scaled by the rate; reaching the end pauses there so the last picture stays.
151
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One change from one sum.
152
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Negative or non-finite wall time, such as a clock step backwards, moves nothing.
153
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener, once per animation frame while playing.
154
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
155
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
93
+ * Move a playing playhead by `wallSeconds` of wall time times the rate,
94
+ * stopping at the end. A paused playhead does not move.
156
95
  */
157
96
  advance(wallSeconds) {
158
97
  const now = this.snapshot_;
159
- if (!now.playing || !(Number.isFinite(wallSeconds) && wallSeconds > 0))
98
+ if (!now.playing || !(wallSeconds > 0))
160
99
  return;
161
100
  const seconds = now.seconds + wallSeconds * now.rate;
162
101
  this.change(seconds >= now.durationSeconds
@@ -172,7 +111,8 @@ class AutoMovieInspectorPlayhead {
172
111
  if (next.seconds === this.snapshot_.seconds &&
173
112
  next.durationSeconds === this.snapshot_.durationSeconds &&
174
113
  next.playing === this.snapshot_.playing &&
175
- next.rate === this.snapshot_.rate)
114
+ next.rate === this.snapshot_.rate &&
115
+ next.jump === this.snapshot_.jump)
176
116
  return;
177
117
  this.snapshot_ = next;
178
118
  for (const listener of [...this.listeners_])
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieInspectorPlayhead.js","sourceRoot":"","sources":["../../src/inspector/AutoMovieInspectorPlayhead.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;GAeG;AACH;IACU,SAAS,GAAyC;QACxD,OAAO,EAAE,CAAC;QACV,eAAe,EAAE,CAAC;QAClB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC;KACR,CAAC;IACe,UAAU,GAAoB,IAAI,GAAG,EAAc,CAAC;IAErE;;;;;;;;;;OAUG;IACa,SAAS,GAAyC,CAChE,QAAoB,EACN,EAAE;QAChB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CA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AAI,CAAC,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI;YAEjC,OAAO;QACT,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;YAAE,QAAQ,EAAE,CAAC;IAC1D,CAAC;CACF"}
1
+ {"version":3,"file":"AutoMovieInspectorPlayhead.js","sourceRoot":"","sources":["../../src/inspector/AutoMovieInspectorPlayhead.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IACU,SAAS,GAAyC;QACxD,OAAO,EAAE,CAAC;QACV,eAAe,EAAE,CAAC;QAClB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;KACR,CAAC;IACe,UAAU,GAAoB,IAAI,GAAG,EAAc,CAAC;IAErE,iFAAiF;IACjE,SAAS,GAAyC,CAChE,QAAoB,EACN,EAAE;QAChB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,GAAS,EAAE;YAChB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC,CAAC;IACJ,CAAC,CAAC;IAEF,qEAAqE;IACrD,WAAW,GACzB,GAAyC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;IAE7D;;;;;OAKG;IACI,WAAW,CAAC,eAAuB;QACxC,IAAI,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,sBAAsB,eAAe,sCAAsC,CAC5E,CAAC;QACJ,IAAI,CAAC,MAAM,CAAC;YACV,eAAe;YACf,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,eAAe,CAAC;SAC3D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,IAAI;QACT,MAAM,EAAE,OAAO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C/C,MAAM,OAAO,GAAW,GAAG,CAAC,OAAO,GAAG,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC;QAC7D,IAAI,CAAC,MAAM,CACT,OAAO,IAAI,GAAG,CAAC,eAAe;YAC5B,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE;YAClD,CAAC,CAAC,EAAE,OAAO,EAAE,CAChB,CAAC;IACJ,CAAC;IAED,4EAA4E;IACpE,MAAM,CAAC,KAAoD;QACjE,MAAM,IAAI,GAAyC;YACjD,GAAG,IAAI,CAAC,SAAS;YACjB,GAAG,KAAK;SACT,CAAC;QACF,IACE,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO;YACvC,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,SAAS,CAAC,eAAe;YACvD,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO;YACvC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI;YACjC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI;YAEjC,OAAO;QACT,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;YAAE,QAAQ,EAAE,CAAC;IAC1D,CAAC;CACF"}
@@ -1,154 +1,100 @@
1
1
  // src/inspector/AutoMovieInspectorPlayhead.ts
2
2
  /**
3
- * The inspector's playhead: the second shown, the subject's duration, whether it plays and how fast, kept outside React.
3
+ * The inspector's playhead: the second shown, the subject's duration, whether
4
+ * it plays and how fast, kept outside React.
4
5
  *
5
- * The render loop advances it and reads it directly every frame. The time readout reads its snapshot through `useSyncExternalStore` with `subscribe` and `getSnapshot`, and the time panel only whether it plays, so a playing frame re-renders the readout alone and a start or stop also the panel's play button. A snapshot is replaced, never changed, so its identity tells a reader whether anything moved. Seconds stay within `[0, durationSeconds]`.
6
+ * The render loop advances it and reads it directly every frame. The time
7
+ * readout reads its snapshot through `useSyncExternalStore` with `subscribe`
8
+ * and `getSnapshot`, and the time panel only whether it plays, so a playing
9
+ * frame re-renders the readout alone and a start or stop also the panel's play
10
+ * button. A snapshot is replaced, never changed, so its identity tells a reader
11
+ * whether anything moved. Seconds stay within `[0, durationSeconds]`.
6
12
  *
7
- * The rate scales how fast the preview plays and is not part of the request: it changes no picture, and the capture grammar's `rate` key, stills per second, is a different quantity.
13
+ * The rate scales how fast the preview plays and is not part of the request: it
14
+ * changes no picture, and the capture grammar's `rate` key, stills per second,
15
+ * is a different quantity.
8
16
  *
9
17
  * ```ts
10
- * const seconds = useSyncExternalStore(playhead.subscribe, playhead.getSnapshot).seconds;
18
+ * const seconds = useSyncExternalStore(
19
+ * playhead.subscribe,
20
+ * playhead.getSnapshot,
21
+ * ).seconds;
11
22
  * ```
12
- *
13
- * @evidence contracts/development/design.md#principled-representation Seconds and duration are subject seconds, the rate is a positive multiplier of wall time and playing is a boolean; the snapshot is one immutable record so the external-store contract's identity comparison is exact.
14
- * @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the inspector, one per mounted component; the scene mount calls `setDuration`, `seek` and `advance`, the time panel `play`, `pause` and `setRate` and subscribes to the playing flag, the readout `seek`, `subscribe` and `getSnapshot`, and the inspector's keys, through `handleAutoMovieInspectorKey`, `play`, `pause`, `seek` and `getSnapshot`.
15
- * @evidence contracts/development/design.md#prohibited-design-shortcuts `subscribe` and `getSnapshot` are bound properties, so React keeps one subscription across renders instead of resubscribing to a new function each time.
16
- * @evidence contracts/development/common.md#meaningful-documentation States who moves and who reads the playhead and what each reader re-renders on, why it lives outside React, the snapshot's identity rule, the range and why the rate is not a request member.
17
23
  */
18
24
  var AutoMovieInspectorPlayhead = class {
19
25
  snapshot_ = {
20
26
  seconds: 0,
21
27
  durationSeconds: 0,
22
28
  playing: false,
23
- rate: 1
29
+ rate: 1,
30
+ jump: 0
24
31
  };
25
32
  listeners_ = /* @__PURE__ */ new Set();
26
- /**
27
- * Call `listener` after every change, until the returned function is called.
28
- *
29
- * @evidence contracts/development/common.md#meaningful-documentation States when the listener runs and how it is removed.
30
- * @evidence contracts/development/implementation.md#principled-implementation The external-store contract React's `useSyncExternalStore` reads: subscribe returns its own unsubscribe.
31
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One set of listeners.
32
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The same listener given twice is held once, as a set holds it.
33
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant time to add and to remove.
34
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A registration computes nothing.
35
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds the listener until its unsubscribe runs; the set grows by one per live subscription, which React keeps at two per mounted inspector, the time panel's and the readout's.
36
- */
33
+ /** Call `listener` after every change, until the returned function is called. */
37
34
  subscribe = (listener) => {
38
35
  this.listeners_.add(listener);
39
36
  return () => {
40
37
  this.listeners_.delete(listener);
41
38
  };
42
39
  };
43
- /**
44
- * The current snapshot, the same object until something changes.
45
- *
46
- * @evidence contracts/development/common.md#meaningful-documentation States the identity rule.
47
- * @evidence contracts/development/implementation.md#principled-implementation `useSyncExternalStore` requires a cached snapshot, or it renders forever.
48
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Returns the held record.
49
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Never builds a record on read.
50
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant.
51
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Returns what is held.
52
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Allocates nothing.
53
- */
40
+ /** The current snapshot, the same object until something changes. */
54
41
  getSnapshot = () => this.snapshot_;
55
42
  /**
56
- * Set the subject's duration when an instance is ready, keeping the second within it.
43
+ * Set the subject's duration when an instance is ready, keeping the second
44
+ * within it.
57
45
  *
58
- * It throws for a duration that is not a positive finite number.
59
- *
60
- * @evidence contracts/development/common.md#meaningful-documentation States when it is called, the clamp and the refusal.
61
- * @evidence contracts/development/implementation.md#principled-implementation Seconds beyond the subject's end show nothing of it, so the second is clamped to the new range.
62
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, then one change.
63
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A bad duration is refused instead of clamping every second to zero.
64
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
65
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
66
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
46
+ * It throws for a duration that is not positive.
67
47
  */
68
48
  setDuration(durationSeconds) {
69
- if (!(Number.isFinite(durationSeconds) && durationSeconds > 0)) throw new Error(`Inspector duration ${durationSeconds} is not a positive number of seconds`);
49
+ if (!(durationSeconds > 0)) throw new Error(`Inspector duration ${durationSeconds} is not a positive number of seconds`);
70
50
  this.change({
71
51
  durationSeconds,
72
52
  seconds: Math.min(this.snapshot_.seconds, durationSeconds)
73
53
  });
74
54
  }
75
55
  /**
76
- * Start playing; from the end, play starts again at zero.
77
- *
78
- * @evidence contracts/development/common.md#meaningful-documentation States the restart at the end.
79
- * @evidence contracts/development/implementation.md#principled-implementation A playhead at the end has nothing left to play, so play means the whole subject again.
80
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One change.
81
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Playing an unready subject (duration zero) is a no-op rather than a loop at zero.
82
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
83
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
84
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
56
+ * Start playing; from the end, play starts again at zero, which counts as a
57
+ * jump.
85
58
  */
86
59
  play() {
87
60
  const { seconds, durationSeconds } = this.snapshot_;
88
61
  if (durationSeconds === 0) return;
89
- this.change({
62
+ this.change(seconds >= durationSeconds ? {
90
63
  playing: true,
91
- seconds: seconds >= durationSeconds ? 0 : seconds
92
- });
64
+ seconds: 0,
65
+ jump: this.snapshot_.jump + 1
66
+ } : { playing: true });
93
67
  }
94
- /**
95
- * Stop playing where the playhead is.
96
- *
97
- * @evidence contracts/development/common.md#meaningful-documentation States that the second is kept.
98
- * @evidence contracts/development/implementation.md#principled-implementation The paused second is the picture the request then names.
99
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One change.
100
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Pausing a paused playhead changes nothing and notifies no one.
101
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
102
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
103
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
104
- */
68
+ /** Stop playing where the playhead is. */
105
69
  pause() {
106
70
  this.change({ playing: false });
107
71
  }
108
72
  /**
109
- * Show one second, clamped to `[0, durationSeconds]`; playing continues from it. A second that is not finite is refused.
110
- *
111
- * @evidence contracts/development/common.md#meaningful-documentation States the clamp, that playing continues and the refusal.
112
- * @evidence contracts/development/implementation.md#principled-implementation A slider or an address can ask past either end, and the nearest second the subject has is the one drawn.
113
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, clamp, change.
114
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts NaN is refused instead of clamped to an end.
115
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
116
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
117
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
73
+ * Show one second, clamped to `[0, durationSeconds]`; playing continues from
74
+ * it. Moving to another second counts as a jump.
118
75
  */
119
76
  seek(seconds) {
120
- if (!Number.isFinite(seconds)) throw new Error(`Inspector second ${seconds} is not a number`);
121
- this.change({ seconds: Math.min(Math.max(seconds, 0), this.snapshot_.durationSeconds) });
77
+ const clamped = Math.min(Math.max(seconds, 0), this.snapshot_.durationSeconds);
78
+ if (clamped !== this.snapshot_.seconds) this.change({
79
+ seconds: clamped,
80
+ jump: this.snapshot_.jump + 1
81
+ });
122
82
  }
123
83
  /**
124
- * Play `rate` subject seconds per wall second. It throws for a rate that is not positive and finite.
125
- *
126
- * @evidence contracts/development/common.md#meaningful-documentation States the unit and the refusal.
127
- * @evidence contracts/development/implementation.md#principled-implementation The rate multiplies the wall time `advance` is given.
128
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, change.
129
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Zero and negative rates are refused; pausing is `pause`.
130
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.
131
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
132
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
84
+ * Play `rate` subject seconds per wall second. It throws for a rate that is
85
+ * not positive.
133
86
  */
134
87
  setRate(rate) {
135
- if (!(Number.isFinite(rate) && rate > 0)) throw new Error(`Inspector rate ${rate} is not a positive number`);
88
+ if (!(rate > 0)) throw new Error(`Inspector rate ${rate} is not a positive number`);
136
89
  this.change({ rate });
137
90
  }
138
91
  /**
139
- * Move a playing playhead by `wallSeconds` of wall time times the rate, stopping at the end. A paused playhead does not move.
140
- *
141
- * @evidence contracts/development/common.md#meaningful-documentation States the unit, the stop at the end and the paused case.
142
- * @evidence contracts/development/implementation.md#principled-implementation Subject time is wall time scaled by the rate; reaching the end pauses there so the last picture stays.
143
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One change from one sum.
144
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Negative or non-finite wall time, such as a clock step backwards, moves nothing.
145
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener, once per animation frame while playing.
146
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.
147
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.
92
+ * Move a playing playhead by `wallSeconds` of wall time times the rate,
93
+ * stopping at the end. A paused playhead does not move.
148
94
  */
149
95
  advance(wallSeconds) {
150
96
  const now = this.snapshot_;
151
- if (!now.playing || !(Number.isFinite(wallSeconds) && wallSeconds > 0)) return;
97
+ if (!now.playing || !(wallSeconds > 0)) return;
152
98
  const seconds = now.seconds + wallSeconds * now.rate;
153
99
  this.change(seconds >= now.durationSeconds ? {
154
100
  seconds: now.durationSeconds,
@@ -161,7 +107,7 @@ var AutoMovieInspectorPlayhead = class {
161
107
  ...this.snapshot_,
162
108
  ...patch
163
109
  };
164
- if (next.seconds === this.snapshot_.seconds && next.durationSeconds === this.snapshot_.durationSeconds && next.playing === this.snapshot_.playing && next.rate === this.snapshot_.rate) return;
110
+ if (next.seconds === this.snapshot_.seconds && next.durationSeconds === this.snapshot_.durationSeconds && next.playing === this.snapshot_.playing && next.rate === this.snapshot_.rate && next.jump === this.snapshot_.jump) return;
165
111
  this.snapshot_ = next;
166
112
  for (const listener of [...this.listeners_]) listener();
167
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieInspectorPlayhead.mjs","names":[],"sources":["../../src/inspector/AutoMovieInspectorPlayhead.ts"],"sourcesContent":["/**\n * The inspector's playhead: the second shown, the subject's duration, whether it plays and how fast, kept outside React.\n *\n * The render loop advances it and reads it directly every frame. The time readout reads its snapshot through `useSyncExternalStore` with `subscribe` and `getSnapshot`, and the time panel only whether it plays, so a playing frame re-renders the readout alone and a start or stop also the panel's play button. A snapshot is replaced, never changed, so its identity tells a reader whether anything moved. Seconds stay within `[0, durationSeconds]`.\n *\n * The rate scales how fast the preview plays and is not part of the request: it changes no picture, and the capture grammar's `rate` key, stills per second, is a different quantity.\n *\n * ```ts\n * const seconds = useSyncExternalStore(playhead.subscribe, playhead.getSnapshot).seconds;\n * ```\n *\n * @evidence contracts/development/design.md#principled-representation Seconds and duration are subject seconds, the rate is a positive multiplier of wall time and playing is a boolean; the snapshot is one immutable record so the external-store contract's identity comparison is exact.\n * @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the inspector, one per mounted component; the scene mount calls `setDuration`, `seek` and `advance`, the time panel `play`, `pause` and `setRate` and subscribes to the playing flag, the readout `seek`, `subscribe` and `getSnapshot`, and the inspector's keys, through `handleAutoMovieInspectorKey`, `play`, `pause`, `seek` and `getSnapshot`.\n * @evidence contracts/development/design.md#prohibited-design-shortcuts `subscribe` and `getSnapshot` are bound properties, so React keeps one subscription across renders instead of resubscribing to a new function each time.\n * @evidence contracts/development/common.md#meaningful-documentation States who moves and who reads the playhead and what each reader re-renders on, why it lives outside React, the snapshot's identity rule, the range and why the rate is not a request member.\n */\nexport class AutoMovieInspectorPlayhead {\n private snapshot_: AutoMovieInspectorPlayhead.ISnapshot = {\n seconds: 0,\n durationSeconds: 0,\n playing: false,\n rate: 1,\n };\n private readonly listeners_: Set<() => void> = new Set<() => void>();\n\n /**\n * Call `listener` after every change, until the returned function is called.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States when the listener runs and how it is removed.\n * @evidence contracts/development/implementation.md#principled-implementation The external-store contract React's `useSyncExternalStore` reads: subscribe returns its own unsubscribe.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One set of listeners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The same listener given twice is held once, as a set holds it.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant time to add and to remove.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A registration computes nothing.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds the listener until its unsubscribe runs; the set grows by one per live subscription, which React keeps at two per mounted inspector, the time panel's and the readout's.\n */\n public readonly subscribe: (listener: () => void) => () => void = (\n listener: () => void,\n ): (() => void) => {\n this.listeners_.add(listener);\n return (): void => {\n this.listeners_.delete(listener);\n };\n };\n\n /**\n * The current snapshot, the same object until something changes.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the identity rule.\n * @evidence contracts/development/implementation.md#principled-implementation `useSyncExternalStore` requires a cached snapshot, or it renders forever.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Returns the held record.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Never builds a record on read.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Returns what is held.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Allocates nothing.\n */\n public readonly getSnapshot: () => AutoMovieInspectorPlayhead.ISnapshot =\n (): AutoMovieInspectorPlayhead.ISnapshot => this.snapshot_;\n\n /**\n * Set the subject's duration when an instance is ready, keeping the second within it.\n *\n * It throws for a duration that is not a positive finite number.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States when it is called, the clamp and the refusal.\n * @evidence contracts/development/implementation.md#principled-implementation Seconds beyond the subject's end show nothing of it, so the second is clamped to the new range.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, then one change.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A bad duration is refused instead of clamping every second to zero.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.\n */\n public setDuration(durationSeconds: number): void {\n if (!(Number.isFinite(durationSeconds) && durationSeconds > 0))\n throw new Error(\n `Inspector duration ${durationSeconds} is not a positive number of seconds`,\n );\n this.change({\n durationSeconds,\n seconds: Math.min(this.snapshot_.seconds, durationSeconds),\n });\n }\n\n /**\n * Start playing; from the end, play starts again at zero.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the restart at the end.\n * @evidence contracts/development/implementation.md#principled-implementation A playhead at the end has nothing left to play, so play means the whole subject again.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One change.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Playing an unready subject (duration zero) is a no-op rather than a loop at zero.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.\n */\n public play(): void {\n const { seconds, durationSeconds }: AutoMovieInspectorPlayhead.ISnapshot =\n this.snapshot_;\n if (durationSeconds === 0) return;\n this.change({\n playing: true,\n seconds: seconds >= durationSeconds ? 0 : seconds,\n });\n }\n\n /**\n * Stop playing where the playhead is.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States that the second is kept.\n * @evidence contracts/development/implementation.md#principled-implementation The paused second is the picture the request then names.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One change.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Pausing a paused playhead changes nothing and notifies no one.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.\n */\n public pause(): void {\n this.change({ playing: false });\n }\n\n /**\n * Show one second, clamped to `[0, durationSeconds]`; playing continues from it. A second that is not finite is refused.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the clamp, that playing continues and the refusal.\n * @evidence contracts/development/implementation.md#principled-implementation A slider or an address can ask past either end, and the nearest second the subject has is the one drawn.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, clamp, change.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts NaN is refused instead of clamped to an end.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.\n */\n public seek(seconds: number): void {\n if (!Number.isFinite(seconds))\n throw new Error(`Inspector second ${seconds} is not a number`);\n this.change({\n seconds: Math.min(Math.max(seconds, 0), this.snapshot_.durationSeconds),\n });\n }\n\n /**\n * Play `rate` subject seconds per wall second. It throws for a rate that is not positive and finite.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the unit and the refusal.\n * @evidence contracts/development/implementation.md#principled-implementation The rate multiplies the wall time `advance` is given.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Check, change.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Zero and negative rates are refused; pausing is `pause`.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.\n */\n public setRate(rate: number): void {\n if (!(Number.isFinite(rate) && rate > 0))\n throw new Error(`Inspector rate ${rate} is not a positive number`);\n this.change({ rate });\n }\n\n /**\n * Move a playing playhead by `wallSeconds` of wall time times the rate, stopping at the end. A paused playhead does not move.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the unit, the stop at the end and the paused case.\n * @evidence contracts/development/implementation.md#principled-implementation Subject time is wall time scaled by the rate; reaching the end pauses there so the last picture stays.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One change from one sum.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Negative or non-finite wall time, such as a clock step backwards, moves nothing.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant plus one call per listener, once per animation frame while playing.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A state change.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Replaces one record.\n */\n public advance(wallSeconds: number): void {\n const now: AutoMovieInspectorPlayhead.ISnapshot = this.snapshot_;\n if (!now.playing || !(Number.isFinite(wallSeconds) && wallSeconds > 0))\n return;\n const seconds: number = now.seconds + wallSeconds * now.rate;\n this.change(\n seconds >= now.durationSeconds\n ? { seconds: now.durationSeconds, playing: false }\n : { seconds },\n );\n }\n\n /** Replace the snapshot when a member differs, then tell every listener. */\n private change(patch: Partial<AutoMovieInspectorPlayhead.ISnapshot>): void {\n const next: AutoMovieInspectorPlayhead.ISnapshot = {\n ...this.snapshot_,\n ...patch,\n };\n if (\n next.seconds === this.snapshot_.seconds &&\n next.durationSeconds === this.snapshot_.durationSeconds &&\n next.playing === this.snapshot_.playing &&\n next.rate === this.snapshot_.rate\n )\n return;\n this.snapshot_ = next;\n for (const listener of [...this.listeners_]) listener();\n }\n}\nexport namespace AutoMovieInspectorPlayhead {\n /**\n * One immutable state of the playhead.\n *\n * @evidence contracts/development/design.md#principled-representation Subject seconds and duration, a wall-time multiplier and a playing flag, with `0 <= seconds <= durationSeconds` kept by the playhead.\n * @evidence contracts/development/design.md#minimal-and-owned-surface The four members the readout shows and the loop reads.\n * @evidence contracts/development/design.md#prohibited-design-shortcuts A duration of zero means no instance is ready yet, not a subject that lasts no time.\n * @evidence contracts/development/common.md#meaningful-documentation States each member's unit and the zero duration.\n */\n export interface ISnapshot {\n /** The second shown, subject seconds. */\n seconds: number;\n\n /** The subject's duration in seconds, zero until an instance is ready. */\n durationSeconds: number;\n\n /** Whether the loop advances the playhead. */\n playing: boolean;\n\n /** Subject seconds played per wall second, positive. */\n rate: number;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,IAAa,6BAAb,MAAwC;CACtC,YAA0D;EACxD,SAAS;EACT,iBAAiB;EACjB,SAAS;EACT,MAAM;CACR;CACA,6BAA+C,IAAI,IAAgB;;;;;;;;;;;;CAanE,aACE,aACiB;EACjB,KAAK,WAAW,IAAI,QAAQ;EAC5B,aAAmB;GACjB,KAAK,WAAW,OAAO,QAAQ;EACjC;CACF;;;;;;;;;;;;CAaA,oBAC8C,KAAK;;;;;;;;;;;;;;CAenD,YAAmB,iBAA+B;EAChD,IAAI,EAAE,OAAO,SAAS,eAAe,KAAK,kBAAkB,IAC1D,MAAM,IAAI,MACR,sBAAsB,gBAAgB,qCACxC;EACF,KAAK,OAAO;GACV;GACA,SAAS,KAAK,IAAI,KAAK,UAAU,SAAS,eAAe;EAC3D,CAAC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"AutoMovieInspectorPlayhead.mjs","names":[],"sources":["../../src/inspector/AutoMovieInspectorPlayhead.ts"],"sourcesContent":["/**\n * The inspector's playhead: the second shown, the subject's duration, whether\n * it plays and how fast, kept outside React.\n *\n * The render loop advances it and reads it directly every frame. The time\n * readout reads its snapshot through `useSyncExternalStore` with `subscribe`\n * and `getSnapshot`, and the time panel only whether it plays, so a playing\n * frame re-renders the readout alone and a start or stop also the panel's play\n * button. A snapshot is replaced, never changed, so its identity tells a reader\n * whether anything moved. Seconds stay within `[0, durationSeconds]`.\n *\n * The rate scales how fast the preview plays and is not part of the request: it\n * changes no picture, and the capture grammar's `rate` key, stills per second,\n * is a different quantity.\n *\n * ```ts\n * const seconds = useSyncExternalStore(\n * playhead.subscribe,\n * playhead.getSnapshot,\n * ).seconds;\n * ```\n */\nexport class AutoMovieInspectorPlayhead {\n private snapshot_: AutoMovieInspectorPlayhead.ISnapshot = {\n seconds: 0,\n durationSeconds: 0,\n playing: false,\n rate: 1,\n jump: 0,\n };\n private readonly listeners_: Set<() => void> = new Set<() => void>();\n\n /** Call `listener` after every change, until the returned function is called. */\n public readonly subscribe: (listener: () => void) => () => void = (\n listener: () => void,\n ): (() => void) => {\n this.listeners_.add(listener);\n return (): void => {\n this.listeners_.delete(listener);\n };\n };\n\n /** The current snapshot, the same object until something changes. */\n public readonly getSnapshot: () => AutoMovieInspectorPlayhead.ISnapshot =\n (): AutoMovieInspectorPlayhead.ISnapshot => this.snapshot_;\n\n /**\n * Set the subject's duration when an instance is ready, keeping the second\n * within it.\n *\n * It throws for a duration that is not positive.\n */\n public setDuration(durationSeconds: number): void {\n if (!(durationSeconds > 0))\n throw new Error(\n `Inspector duration ${durationSeconds} is not a positive number of seconds`,\n );\n this.change({\n durationSeconds,\n seconds: Math.min(this.snapshot_.seconds, durationSeconds),\n });\n }\n\n /**\n * Start playing; from the end, play starts again at zero, which counts as a\n * jump.\n */\n public play(): void {\n const { seconds, durationSeconds }: AutoMovieInspectorPlayhead.ISnapshot =\n this.snapshot_;\n if (durationSeconds === 0) return;\n this.change(\n seconds >= durationSeconds\n ? { playing: true, seconds: 0, jump: this.snapshot_.jump + 1 }\n : { playing: true },\n );\n }\n\n /** Stop playing where the playhead is. */\n public pause(): void {\n this.change({ playing: false });\n }\n\n /**\n * Show one second, clamped to `[0, durationSeconds]`; playing continues from\n * it. Moving to another second counts as a jump.\n */\n public seek(seconds: number): void {\n const clamped: number = Math.min(\n Math.max(seconds, 0),\n this.snapshot_.durationSeconds,\n );\n if (clamped !== this.snapshot_.seconds)\n this.change({ seconds: clamped, jump: this.snapshot_.jump + 1 });\n }\n\n /**\n * Play `rate` subject seconds per wall second. It throws for a rate that is\n * not positive.\n */\n public setRate(rate: number): void {\n if (!(rate > 0))\n throw new Error(`Inspector rate ${rate} is not a positive number`);\n this.change({ rate });\n }\n\n /**\n * Move a playing playhead by `wallSeconds` of wall time times the rate,\n * stopping at the end. A paused playhead does not move.\n */\n public advance(wallSeconds: number): void {\n const now: AutoMovieInspectorPlayhead.ISnapshot = this.snapshot_;\n if (!now.playing || !(wallSeconds > 0)) return;\n const seconds: number = now.seconds + wallSeconds * now.rate;\n this.change(\n seconds >= now.durationSeconds\n ? { seconds: now.durationSeconds, playing: false }\n : { seconds },\n );\n }\n\n /** Replace the snapshot when a member differs, then tell every listener. */\n private change(patch: Partial<AutoMovieInspectorPlayhead.ISnapshot>): void {\n const next: AutoMovieInspectorPlayhead.ISnapshot = {\n ...this.snapshot_,\n ...patch,\n };\n if (\n next.seconds === this.snapshot_.seconds &&\n next.durationSeconds === this.snapshot_.durationSeconds &&\n next.playing === this.snapshot_.playing &&\n next.rate === this.snapshot_.rate &&\n next.jump === this.snapshot_.jump\n )\n return;\n this.snapshot_ = next;\n for (const listener of [...this.listeners_]) listener();\n }\n}\nexport namespace AutoMovieInspectorPlayhead {\n /** One immutable state of the playhead. */\n export interface ISnapshot {\n /** The second shown, subject seconds. */\n seconds: number;\n\n /** The subject's duration in seconds, zero until an instance is ready. */\n durationSeconds: number;\n\n /** Whether the loop advances the playhead. */\n playing: boolean;\n\n /** Subject seconds played per wall second, positive. */\n rate: number;\n\n /**\n * Number of seeks to another second and restarts from the end so far; two\n * snapshots with the same count are joined by playback alone.\n */\n jump: number;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAa,6BAAb,MAAwC;CACtC,YAA0D;EACxD,SAAS;EACT,iBAAiB;EACjB,SAAS;EACT,MAAM;EACN,MAAM;CACR;CACA,6BAA+C,IAAI,IAAgB;;CAGnE,aACE,aACiB;EACjB,KAAK,WAAW,IAAI,QAAQ;EAC5B,aAAmB;GACjB,KAAK,WAAW,OAAO,QAAQ;EACjC;CACF;;CAGA,oBAC8C,KAAK;;;;;;;CAQnD,YAAmB,iBAA+B;EAChD,IAAI,EAAE,kBAAkB,IACtB,MAAM,IAAI,MACR,sBAAsB,gBAAgB,qCACxC;EACF,KAAK,OAAO;GACV;GACA,SAAS,KAAK,IAAI,KAAK,UAAU,SAAS,eAAe;EAC3D,CAAC;CACH;;;;;CAMA,OAAoB;EAClB,MAAM,EAAE,SAAS,oBACf,KAAK;EACP,IAAI,oBAAoB,GAAG;EAC3B,KAAK,OACH,WAAW,kBACP;GAAE,SAAS;GAAM,SAAS;GAAG,MAAM,KAAK,UAAU,OAAO;EAAE,IAC3D,EAAE,SAAS,KAAK,CACtB;CACF;;CAGA,QAAqB;EACnB,KAAK,OAAO,EAAE,SAAS,MAAM,CAAC;CAChC;;;;;CAMA,KAAY,SAAuB;EACjC,MAAM,UAAkB,KAAK,IAC3B,KAAK,IAAI,SAAS,CAAC,GACnB,KAAK,UAAU,eACjB;EACA,IAAI,YAAY,KAAK,UAAU,SAC7B,KAAK,OAAO;GAAE,SAAS;GAAS,MAAM,KAAK,UAAU,OAAO;EAAE,CAAC;CACnE;;;;;CAMA,QAAe,MAAoB;EACjC,IAAI,EAAE,OAAO,IACX,MAAM,IAAI,MAAM,kBAAkB,KAAK,0BAA0B;EACnE,KAAK,OAAO,EAAE,KAAK,CAAC;CACtB;;;;;CAMA,QAAe,aAA2B;EACxC,MAAM,MAA4C,KAAK;EACvD,IAAI,CAAC,IAAI,WAAW,EAAE,cAAc,IAAI;EACxC,MAAM,UAAkB,IAAI,UAAU,cAAc,IAAI;EACxD,KAAK,OACH,WAAW,IAAI,kBACX;GAAE,SAAS,IAAI;GAAiB,SAAS;EAAM,IAC/C,EAAE,QAAQ,CAChB;CACF;;CAGA,OAAe,OAA4D;EACzE,MAAM,OAA6C;GACjD,GAAG,KAAK;GACR,GAAG;EACL;EACA,IACE,KAAK,YAAY,KAAK,UAAU,WAChC,KAAK,oBAAoB,KAAK,UAAU,mBACxC,KAAK,YAAY,KAAK,UAAU,WAChC,KAAK,SAAS,KAAK,UAAU,QAC7B,KAAK,SAAS,KAAK,UAAU,MAE7B;EACF,KAAK,YAAY;EACjB,KAAK,MAAM,YAAY,CAAC,GAAG,KAAK,UAAU,GAAG,SAAS;CACxD;AACF"}
@@ -1,22 +1,21 @@
1
1
  import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
2
2
  import { type JSX } from "react";
3
3
  import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
4
+ import type { IAutoMovieInspectorProps } from "./IAutoMovieInspectorProps.js";
4
5
  /**
5
- * The request as text: the address query, editable, and the `automovie capture` command that repeats the picture, each with a button named for what it copies.
6
+ * Copy or edit the address and, when the host supplies a command, copy its
7
+ * capture command in the selected shell syntax.
6
8
  *
7
- * The query field shows the request's address text; an edit is dispatched as a `text` action when the field is left or Enter is pressed, and a text the grammar refuses keeps the previous request with the refusal shown above. The command is read-only, quoted for a POSIX shell. Copying writes the field's text to the clipboard where the page may, and says so under the fields, in a status region that stays mounted so each note is announced; where the page has no clipboard, as outside a secure context, or is refused it, the note says to select the text and copy it instead.
8
- *
9
- * @evidence contracts/development/common.md#meaningful-documentation States what each field shows, when an edit is dispatched, the refusal, the command's quoting, what copying does and what it says when the clipboard is missing or refused.
10
- * @evidence contracts/development/implementation.md#principled-implementation Both texts are written from the request by the grammar's writers, so the address, the command and the picture name one request; copying goes through the platform's clipboard.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One editable field and one read-only field, each with a copy button.
12
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The typed text is held only until it is dispatched; the request stays the reducer's; a missing or refused clipboard is reported, never swallowed or thrown.
13
- * @evidence contracts/development/implementation.md#efficient-algorithms Two writes of the request per render, linear in its text.
14
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A view with handlers.
15
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds only the text being typed and the last copy's note.
9
+ * The query field dispatches edits on blur or Enter. A refused edit keeps the
10
+ * previous request. The command is read-only and initially uses POSIX syntax.
11
+ * Copying reports success in a live status region, or tells the reader to
12
+ * select the text if clipboard access is unavailable.
16
13
  */
17
14
  export declare function AutoMovieInspectorRequestPanel(props: {
18
15
  /** The request shown. */
19
16
  request: IAutoMovieCapturePlanRequest;
20
17
  /** Where an edited text goes. */
21
18
  dispatch: (action: IAutoMovieInspectorAction) => void;
19
+ /** Executable and fixed arguments from the host for the optional command. */
20
+ captureCommand?: IAutoMovieInspectorProps["captureCommand"];
22
21
  }): JSX.Element;
@@ -6,20 +6,17 @@ const react_1 = require("react");
6
6
  const formatAutoMovieInspectorAddress_js_1 = require("./formatAutoMovieInspectorAddress.js");
7
7
  const formatAutoMovieInspectorCommand_js_1 = require("./formatAutoMovieInspectorCommand.js");
8
8
  /**
9
- * The request as text: the address query, editable, and the `automovie capture` command that repeats the picture, each with a button named for what it copies.
9
+ * Copy or edit the address and, when the host supplies a command, copy its
10
+ * capture command in the selected shell syntax.
10
11
  *
11
- * The query field shows the request's address text; an edit is dispatched as a `text` action when the field is left or Enter is pressed, and a text the grammar refuses keeps the previous request with the refusal shown above. The command is read-only, quoted for a POSIX shell. Copying writes the field's text to the clipboard where the page may, and says so under the fields, in a status region that stays mounted so each note is announced; where the page has no clipboard, as outside a secure context, or is refused it, the note says to select the text and copy it instead.
12
- *
13
- * @evidence contracts/development/common.md#meaningful-documentation States what each field shows, when an edit is dispatched, the refusal, the command's quoting, what copying does and what it says when the clipboard is missing or refused.
14
- * @evidence contracts/development/implementation.md#principled-implementation Both texts are written from the request by the grammar's writers, so the address, the command and the picture name one request; copying goes through the platform's clipboard.
15
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One editable field and one read-only field, each with a copy button.
16
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The typed text is held only until it is dispatched; the request stays the reducer's; a missing or refused clipboard is reported, never swallowed or thrown.
17
- * @evidence contracts/development/implementation.md#efficient-algorithms Two writes of the request per render, linear in its text.
18
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A view with handlers.
19
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds only the text being typed and the last copy's note.
12
+ * The query field dispatches edits on blur or Enter. A refused edit keeps the
13
+ * previous request. The command is read-only and initially uses POSIX syntax.
14
+ * Copying reports success in a live status region, or tells the reader to
15
+ * select the text if clipboard access is unavailable.
20
16
  */
21
17
  function AutoMovieInspectorRequestPanel(props) {
22
18
  const [typed, setTyped] = (0, react_1.useState)(null);
19
+ const [shell, setShell] = (0, react_1.useState)("posix");
23
20
  const [copied, setCopied] = (0, react_1.useState)(null);
24
21
  const commit = () => {
25
22
  if (typed === null)
@@ -45,7 +42,12 @@ function AutoMovieInspectorRequestPanel(props) {
45
42
  }
46
43
  };
47
44
  const address = typed ?? (0, formatAutoMovieInspectorAddress_js_1.formatAutoMovieInspectorAddress)(props.request);
48
- const command = (0, formatAutoMovieInspectorCommand_js_1.formatAutoMovieInspectorCommand)(props.request).text;
45
+ const command = props.captureCommand
46
+ ? (0, formatAutoMovieInspectorCommand_js_1.formatAutoMovieInspectorCommand)(props.request, {
47
+ command: props.captureCommand,
48
+ shell,
49
+ }).text
50
+ : null;
49
51
  const row = {
50
52
  display: "flex",
51
53
  gap: 4,
@@ -54,6 +56,10 @@ function AutoMovieInspectorRequestPanel(props) {
54
56
  return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("label", { style: { display: "block", marginBottom: 6 }, children: ["Address", (0, jsx_runtime_1.jsxs)("span", { style: row, children: [(0, jsx_runtime_1.jsx)("input", { "aria-label": "Request address", style: { flex: "1 1 auto", minWidth: 0, fontFamily: "monospace" }, value: address, onChange: (event) => setTyped(event.target.value), onBlur: commit, onKeyDown: (event) => {
55
57
  if (event.key === "Enter")
56
58
  commit();
57
- } }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => void copy("address", address), children: "Copy address" })] })] }), (0, jsx_runtime_1.jsxs)("label", { style: { display: "block" }, children: ["Capture command", (0, jsx_runtime_1.jsxs)("span", { style: row, children: [(0, jsx_runtime_1.jsx)("input", { "aria-label": "Capture command", readOnly: true, style: { flex: "1 1 auto", minWidth: 0, fontFamily: "monospace" }, value: command }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => void copy("command", command), children: "Copy command" })] })] }), (0, jsx_runtime_1.jsx)("p", { role: "status", style: { margin: "4px 0 0", fontSize: 12 }, children: copied ?? "" })] }));
59
+ } }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => void copy("address", address), children: "Copy address" })] })] }), command !== null && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("label", { style: { display: "block" }, children: ["Shell", " ", (0, jsx_runtime_1.jsxs)("select", { "aria-label": "Command shell", value: shell, onChange: (event) => setShell(event.target.value === "powershell" ? "powershell" : "posix"), children: [(0, jsx_runtime_1.jsx)("option", { value: "posix", children: "POSIX" }), (0, jsx_runtime_1.jsx)("option", { value: "powershell", children: "PowerShell 7.3+" })] })] }), (0, jsx_runtime_1.jsxs)("label", { style: { display: "block" }, children: ["Capture command", (0, jsx_runtime_1.jsxs)("span", { style: row, children: [(0, jsx_runtime_1.jsx)("input", { "aria-label": "Capture command", readOnly: true, style: {
60
+ flex: "1 1 auto",
61
+ minWidth: 0,
62
+ fontFamily: "monospace",
63
+ }, value: command }), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => void copy("command", command), children: "Copy command" })] })] })] })), (0, jsx_runtime_1.jsx)("p", { role: "status", style: { margin: "4px 0 0", fontSize: 12 }, children: copied ?? "" })] }));
58
64
  }
59
65
  //# sourceMappingURL=AutoMovieInspectorRequestPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieInspectorRequestPanel.js","sourceRoot":"","sources":["../../src/inspector/AutoMovieInspectorRequestPanel.tsx"],"names":[],"mappings":";;;;AAEA,iCAOe;AAGf,6FAAuF;AACvF,6FAAuF;AAEvF;;;;;;;;;;;;GAYG;AACH,wCAA+C,KAM9C;IACC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAGrB,IAAA,gBAAQ,EAAgB,IAAI,CAAC,CAAC;IAClC,MAAM,MAAM,GAAe,GAAS,EAAE;QACpC,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO;QAC3B,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;IACF,sEAAsE;IACtE,0DAA0D;IAC1D,MAAM,IAAI,GAAkD,KAAK,EAC/D,IAAY,EACZ,IAAY,EACG,EAAE;QACjB,MAAM,OAAO,GAAW,cAAc,IAAI,eAAe,CAAC;QAC1D,MAAM,SAAS,GACb,SACD,CAAC,SAAS,CAAC;QACZ,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,SAAS,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,SAAS,C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