@pretty-chitty/core 1.2.18 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/components/ActionLogDisplay.d.ts.map +1 -1
- package/dist/components/ActionLogDisplay.js +1 -1
- package/dist/components/ActionLogDisplay.js.map +1 -1
- package/dist/components/BottomBarButton.d.ts +3 -1
- package/dist/components/BottomBarButton.d.ts.map +1 -1
- package/dist/components/BottomBarButton.js +3 -2
- package/dist/components/BottomBarButton.js.map +1 -1
- package/dist/components/ClientTrustMatchViewer.d.ts +14 -1
- package/dist/components/ClientTrustMatchViewer.d.ts.map +1 -1
- package/dist/components/ClientTrustMatchViewer.js +25 -2
- package/dist/components/ClientTrustMatchViewer.js.map +1 -1
- package/dist/components/ContextGalleryDisplay.d.ts.map +1 -1
- package/dist/components/ContextGalleryDisplay.js +1 -1
- package/dist/components/ContextGalleryDisplay.js.map +1 -1
- package/dist/components/DemoWrapper.d.ts +30 -2
- package/dist/components/DemoWrapper.d.ts.map +1 -1
- package/dist/components/DemoWrapper.js +79 -43
- package/dist/components/DemoWrapper.js.map +1 -1
- package/dist/components/FullScreenGalleryDisplay.d.ts.map +1 -1
- package/dist/components/FullScreenGalleryDisplay.js +2 -2
- package/dist/components/FullScreenGalleryDisplay.js.map +1 -1
- package/dist/components/Gallery/BuiltItem.d.ts +6 -2
- package/dist/components/Gallery/BuiltItem.d.ts.map +1 -1
- package/dist/components/Gallery/BuiltItem.js +31 -9
- package/dist/components/Gallery/BuiltItem.js.map +1 -1
- package/dist/components/Gallery/GalleryController.d.ts +18 -0
- package/dist/components/Gallery/GalleryController.d.ts.map +1 -1
- package/dist/components/Gallery/GalleryController.js +70 -1
- package/dist/components/Gallery/GalleryController.js.map +1 -1
- package/dist/components/Gallery/GalleryViewer.d.ts +6 -1
- package/dist/components/Gallery/GalleryViewer.d.ts.map +1 -1
- package/dist/components/Gallery/GalleryViewer.js +48 -10
- package/dist/components/Gallery/GalleryViewer.js.map +1 -1
- package/dist/components/Gallery/LayoutManager.d.ts +6 -0
- package/dist/components/Gallery/LayoutManager.d.ts.map +1 -1
- package/dist/components/Gallery/LayoutManager.js +23 -3
- package/dist/components/Gallery/LayoutManager.js.map +1 -1
- package/dist/components/Gallery/constants.d.ts +2 -0
- package/dist/components/Gallery/constants.d.ts.map +1 -1
- package/dist/components/Gallery/constants.js +2 -0
- package/dist/components/Gallery/constants.js.map +1 -1
- package/dist/components/Gallery/registry.d.ts +34 -0
- package/dist/components/Gallery/registry.d.ts.map +1 -0
- package/dist/components/Gallery/registry.js +17 -0
- package/dist/components/Gallery/registry.js.map +1 -0
- package/dist/components/GameDesigner.d.ts.map +1 -1
- package/dist/components/GameDesigner.js +42 -10
- package/dist/components/GameDesigner.js.map +1 -1
- package/dist/components/InlineGalleryDisplay.d.ts.map +1 -1
- package/dist/components/InlineGalleryDisplay.js +2 -2
- package/dist/components/InlineGalleryDisplay.js.map +1 -1
- package/dist/components/LiveButton.d.ts.map +1 -1
- package/dist/components/LiveButton.js +5 -2
- package/dist/components/LiveButton.js.map +1 -1
- package/dist/components/MatchViewer.d.ts +6 -1
- package/dist/components/MatchViewer.d.ts.map +1 -1
- package/dist/components/MatchViewer.js +9 -3
- package/dist/components/MatchViewer.js.map +1 -1
- package/dist/components/Panel/MultiPanel.d.ts.map +1 -1
- package/dist/components/Panel/MultiPanel.js +18 -0
- package/dist/components/Panel/MultiPanel.js.map +1 -1
- package/dist/components/Panel/PanelContents.d.ts.map +1 -1
- package/dist/components/Panel/PanelContents.js +92 -23
- package/dist/components/Panel/PanelContents.js.map +1 -1
- package/dist/components/Panel/PanelTabStack.d.ts.map +1 -1
- package/dist/components/Panel/PanelTabStack.js +1 -1
- package/dist/components/Panel/PanelTabStack.js.map +1 -1
- package/dist/components/PanelSpark.d.ts.map +1 -1
- package/dist/components/PanelSpark.js +3 -2
- package/dist/components/PanelSpark.js.map +1 -1
- package/dist/components/Playground.d.ts.map +1 -1
- package/dist/components/Playground.js +46 -14
- package/dist/components/Playground.js.map +1 -1
- package/dist/components/PromptControls.d.ts.map +1 -1
- package/dist/components/PromptControls.js +4 -2
- package/dist/components/PromptControls.js.map +1 -1
- package/dist/components/SparkLineChart.d.ts.map +1 -1
- package/dist/components/SparkLineChart.js +22 -26
- package/dist/components/SparkLineChart.js.map +1 -1
- package/dist/components/TimeControlBar.d.ts.map +1 -1
- package/dist/components/TimeControlBar.js +5 -3
- package/dist/components/TimeControlBar.js.map +1 -1
- package/dist/components/TokenizedMarkdown.d.ts +23 -0
- package/dist/components/TokenizedMarkdown.d.ts.map +1 -0
- package/dist/components/TokenizedMarkdown.js +144 -0
- package/dist/components/TokenizedMarkdown.js.map +1 -0
- package/dist/components/TokenizedMessage.d.ts +8 -6
- package/dist/components/TokenizedMessage.d.ts.map +1 -1
- package/dist/components/TokenizedMessage.js +21 -54
- package/dist/components/TokenizedMessage.js.map +1 -1
- package/dist/components/TopBarPlayers.d.ts.map +1 -1
- package/dist/components/TopBarPlayers.js +2 -2
- package/dist/components/TopBarPlayers.js.map +1 -1
- package/dist/components/Tutorial/BrowserNarration.d.ts +55 -0
- package/dist/components/Tutorial/BrowserNarration.d.ts.map +1 -0
- package/dist/components/Tutorial/BrowserNarration.js +240 -0
- package/dist/components/Tutorial/BrowserNarration.js.map +1 -0
- package/dist/components/Tutorial/TutorialBox.d.ts +26 -0
- package/dist/components/Tutorial/TutorialBox.d.ts.map +1 -0
- package/dist/components/Tutorial/TutorialBox.js +239 -0
- package/dist/components/Tutorial/TutorialBox.js.map +1 -0
- package/dist/components/Tutorial/TutorialDevPanel.d.ts +9 -0
- package/dist/components/Tutorial/TutorialDevPanel.d.ts.map +1 -0
- package/dist/components/Tutorial/TutorialDevPanel.js +92 -0
- package/dist/components/Tutorial/TutorialDevPanel.js.map +1 -0
- package/dist/components/Tutorial/TutorialOverlay.d.ts +7 -0
- package/dist/components/Tutorial/TutorialOverlay.d.ts.map +1 -0
- package/dist/components/Tutorial/TutorialOverlay.js +1132 -0
- package/dist/components/Tutorial/TutorialOverlay.js.map +1 -0
- package/dist/components/Tutorial/targetRects.d.ts +67 -0
- package/dist/components/Tutorial/targetRects.d.ts.map +1 -0
- package/dist/components/Tutorial/targetRects.js +241 -0
- package/dist/components/Tutorial/targetRects.js.map +1 -0
- package/dist/game/Chit.d.ts +7 -0
- package/dist/game/Chit.d.ts.map +1 -1
- package/dist/game/Chit.js +22 -7
- package/dist/game/Chit.js.map +1 -1
- package/dist/game/ClientTimeState.d.ts +14 -0
- package/dist/game/ClientTimeState.d.ts.map +1 -1
- package/dist/game/ClientTimeState.js +17 -0
- package/dist/game/ClientTimeState.js.map +1 -1
- package/dist/game/ConnectionTransport.d.ts +3 -0
- package/dist/game/ConnectionTransport.d.ts.map +1 -1
- package/dist/game/ConnectionTransport.js +13 -4
- package/dist/game/ConnectionTransport.js.map +1 -1
- package/dist/game/Game.d.ts +14 -1
- package/dist/game/Game.d.ts.map +1 -1
- package/dist/game/GameTheme.d.ts +3 -0
- package/dist/game/GameTheme.d.ts.map +1 -1
- package/dist/game/GameTheme.js +2 -0
- package/dist/game/GameTheme.js.map +1 -1
- package/dist/game/Match.d.ts +74 -2
- package/dist/game/Match.d.ts.map +1 -1
- package/dist/game/Match.js +155 -4
- package/dist/game/Match.js.map +1 -1
- package/dist/game/MatchStorage.d.ts +8 -1
- package/dist/game/MatchStorage.d.ts.map +1 -1
- package/dist/game/MatchStorage.js +11 -3
- package/dist/game/MatchStorage.js.map +1 -1
- package/dist/game/Pick.d.ts +16 -0
- package/dist/game/Pick.d.ts.map +1 -1
- package/dist/game/Pick.js +32 -1
- package/dist/game/Pick.js.map +1 -1
- package/dist/game/PlayerChit.d.ts +3 -0
- package/dist/game/PlayerChit.d.ts.map +1 -1
- package/dist/game/PlayerChit.js +3 -0
- package/dist/game/PlayerChit.js.map +1 -1
- package/dist/game/PlayerInfo.d.ts +8 -0
- package/dist/game/PlayerInfo.d.ts.map +1 -1
- package/dist/game/PlayerInfo.js +6 -3
- package/dist/game/PlayerInfo.js.map +1 -1
- package/dist/game/PlayerPromptStatusChit.d.ts +8 -0
- package/dist/game/PlayerPromptStatusChit.d.ts.map +1 -1
- package/dist/game/PlayerPromptStatusChit.js +8 -2
- package/dist/game/PlayerPromptStatusChit.js.map +1 -1
- package/dist/game/Prompt.d.ts +15 -0
- package/dist/game/Prompt.d.ts.map +1 -1
- package/dist/game/Prompt.js +16 -0
- package/dist/game/Prompt.js.map +1 -1
- package/dist/game/Turn.d.ts +20 -4
- package/dist/game/Turn.d.ts.map +1 -1
- package/dist/game/Turn.js +191 -67
- package/dist/game/Turn.js.map +1 -1
- package/dist/game/TurnState.d.ts +20 -1
- package/dist/game/TurnState.d.ts.map +1 -1
- package/dist/game/TurnState.js +22 -3
- package/dist/game/TurnState.js.map +1 -1
- package/dist/game/ai/AiClientPrompts.d.ts +177 -0
- package/dist/game/ai/AiClientPrompts.d.ts.map +1 -0
- package/dist/game/ai/AiClientPrompts.js +561 -0
- package/dist/game/ai/AiClientPrompts.js.map +1 -0
- package/dist/game/ai/AiLiveView.d.ts +2 -0
- package/dist/game/ai/AiLiveView.d.ts.map +1 -0
- package/dist/game/ai/AiLiveView.js +48 -0
- package/dist/game/ai/AiLiveView.js.map +1 -0
- package/dist/game/ai/AiPlayerView.d.ts +2 -0
- package/dist/game/ai/AiPlayerView.d.ts.map +1 -0
- package/dist/game/ai/AiPlayerView.js +91 -0
- package/dist/game/ai/AiPlayerView.js.map +1 -0
- package/dist/game/ai/connectAiPlayer.d.ts +43 -0
- package/dist/game/ai/connectAiPlayer.d.ts.map +1 -0
- package/dist/game/ai/connectAiPlayer.js +58 -0
- package/dist/game/ai/connectAiPlayer.js.map +1 -0
- package/dist/game/ai/defineAi.d.ts +119 -0
- package/dist/game/ai/defineAi.d.ts.map +1 -0
- package/dist/game/ai/defineAi.js +122 -0
- package/dist/game/ai/defineAi.js.map +1 -0
- package/dist/game/ai/simulateMatches.d.ts +62 -0
- package/dist/game/ai/simulateMatches.d.ts.map +1 -0
- package/dist/game/ai/simulateMatches.js +108 -0
- package/dist/game/ai/simulateMatches.js.map +1 -0
- package/dist/game/badAiTransport/BadAIClientPrompts.d.ts +3 -0
- package/dist/game/badAiTransport/BadAIClientPrompts.d.ts.map +1 -1
- package/dist/game/badAiTransport/BadAIClientPrompts.js +3 -0
- package/dist/game/badAiTransport/BadAIClientPrompts.js.map +1 -1
- package/dist/game/clientTransport/ClientPrompts.d.ts +20 -1
- package/dist/game/clientTransport/ClientPrompts.d.ts.map +1 -1
- package/dist/game/clientTransport/ClientPrompts.js +30 -1
- package/dist/game/clientTransport/ClientPrompts.js.map +1 -1
- package/dist/game/clientTransport/ClientTime.d.ts +13 -0
- package/dist/game/clientTransport/ClientTime.d.ts.map +1 -1
- package/dist/game/clientTransport/ClientTime.js +51 -11
- package/dist/game/clientTransport/ClientTime.js.map +1 -1
- package/dist/game/tutorial/TutorialController.d.ts +300 -0
- package/dist/game/tutorial/TutorialController.d.ts.map +1 -0
- package/dist/game/tutorial/TutorialController.js +1182 -0
- package/dist/game/tutorial/TutorialController.js.map +1 -0
- package/dist/game/tutorial/TutorialRuntime.d.ts +89 -0
- package/dist/game/tutorial/TutorialRuntime.d.ts.map +1 -0
- package/dist/game/tutorial/TutorialRuntime.js +261 -0
- package/dist/game/tutorial/TutorialRuntime.js.map +1 -0
- package/dist/game/tutorial/TutorialTheme.d.ts +28 -0
- package/dist/game/tutorial/TutorialTheme.d.ts.map +1 -0
- package/dist/game/tutorial/TutorialTheme.js +39 -0
- package/dist/game/tutorial/TutorialTheme.js.map +1 -0
- package/dist/game/tutorial/allowed.d.ts +2 -0
- package/dist/game/tutorial/allowed.d.ts.map +1 -0
- package/dist/game/tutorial/allowed.js +119 -0
- package/dist/game/tutorial/allowed.js.map +1 -0
- package/dist/game/tutorial/checks.d.ts +58 -0
- package/dist/game/tutorial/checks.d.ts.map +1 -0
- package/dist/game/tutorial/checks.js +144 -0
- package/dist/game/tutorial/checks.js.map +1 -0
- package/dist/game/tutorial/createDemoMatch.d.ts +47 -0
- package/dist/game/tutorial/createDemoMatch.d.ts.map +1 -0
- package/dist/game/tutorial/createDemoMatch.js +67 -0
- package/dist/game/tutorial/createDemoMatch.js.map +1 -0
- package/dist/game/tutorial/defineTutorial.d.ts +353 -0
- package/dist/game/tutorial/defineTutorial.d.ts.map +1 -0
- package/dist/game/tutorial/defineTutorial.js +86 -0
- package/dist/game/tutorial/defineTutorial.js.map +1 -0
- package/dist/game/tutorial/runTutorial.d.ts +63 -0
- package/dist/game/tutorial/runTutorial.d.ts.map +1 -0
- package/dist/game/tutorial/runTutorial.js +273 -0
- package/dist/game/tutorial/runTutorial.js.map +1 -0
- package/dist/hooks/usePanelNavigation.d.ts +28 -0
- package/dist/hooks/usePanelNavigation.d.ts.map +1 -0
- package/dist/hooks/usePanelNavigation.js +36 -0
- package/dist/hooks/usePanelNavigation.js.map +1 -0
- package/dist/hooks/useTimeController.d.ts +2 -1
- package/dist/hooks/useTimeController.d.ts.map +1 -1
- package/dist/hooks/useTimeController.js +6 -2
- package/dist/hooks/useTimeController.js.map +1 -1
- package/dist/hooks/useTokenMap.d.ts +2 -4
- package/dist/hooks/useTokenMap.d.ts.map +1 -1
- package/dist/hooks/useTokenMap.js +2 -5
- package/dist/hooks/useTokenMap.js.map +1 -1
- package/dist/hooks/useTutorial.d.ts +48 -0
- package/dist/hooks/useTutorial.d.ts.map +1 -0
- package/dist/hooks/useTutorial.js +16 -0
- package/dist/hooks/useTutorial.js.map +1 -0
- package/dist/index.d.ts +57 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.html +12 -0
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/dist/main.0792d734cde2c688d5f7.hot-update.js +16991 -0
- package/dist/main.0792d734cde2c688d5f7.hot-update.js.map +1 -0
- package/dist/main.0792d734cde2c688d5f7.hot-update.json +1 -0
- package/dist/pretty-chitty.js +204513 -0
- package/dist/pretty-chitty.js.map +1 -0
- package/dist/rendering/CameraWrapperPerspective.d.ts +5 -0
- package/dist/rendering/CameraWrapperPerspective.d.ts.map +1 -1
- package/dist/rendering/CameraWrapperPerspective.js +16 -0
- package/dist/rendering/CameraWrapperPerspective.js.map +1 -1
- package/dist/rendering/ChitGalleryItemInstance.d.ts +1 -0
- package/dist/rendering/ChitGalleryItemInstance.d.ts.map +1 -1
- package/dist/rendering/ChitGalleryItemInstance.js +12 -0
- package/dist/rendering/ChitGalleryItemInstance.js.map +1 -1
- package/dist/rendering/ChitRenderInstance.d.ts +9 -1
- package/dist/rendering/ChitRenderInstance.d.ts.map +1 -1
- package/dist/rendering/ChitRenderInstance.js +28 -0
- package/dist/rendering/ChitRenderInstance.js.map +1 -1
- package/dist/rendering/RootChitRenderInstance.d.ts +2 -0
- package/dist/rendering/RootChitRenderInstance.d.ts.map +1 -1
- package/dist/rendering/RootChitRenderInstance.js +29 -0
- package/dist/rendering/RootChitRenderInstance.js.map +1 -1
- package/dist/utilities/Annotations.d.ts +15 -0
- package/dist/utilities/Annotations.d.ts.map +1 -1
- package/dist/utilities/Annotations.js +31 -7
- package/dist/utilities/Annotations.js.map +1 -1
- package/dist/utilities/CanvasStack/CanvasStack.d.ts +13 -0
- package/dist/utilities/CanvasStack/CanvasStack.d.ts.map +1 -1
- package/dist/utilities/CanvasStack/CanvasStack.js +66 -15
- package/dist/utilities/CanvasStack/CanvasStack.js.map +1 -1
- package/dist/utilities/TokenizedText.d.ts +55 -0
- package/dist/utilities/TokenizedText.d.ts.map +1 -0
- package/dist/utilities/TokenizedText.js +47 -0
- package/dist/utilities/TokenizedText.js.map +1 -0
- package/dist/utilities/zIndex.d.ts +1 -0
- package/dist/utilities/zIndex.d.ts.map +1 -1
- package/dist/utilities/zIndex.js +1 -0
- package/dist/utilities/zIndex.js.map +1 -1
- package/package.json +3 -2
- package/src/library/components/ActionLogDisplay.tsx +1 -0
- package/src/library/components/BottomBarButton.tsx +5 -0
- package/src/library/components/ClientTrustMatchViewer.tsx +32 -2
- package/src/library/components/ContextGalleryDisplay.tsx +2 -0
- package/src/library/components/DemoWrapper.tsx +147 -52
- package/src/library/components/FullScreenGalleryDisplay.tsx +3 -0
- package/src/library/components/Gallery/BuiltItem.ts +34 -9
- package/src/library/components/Gallery/GalleryController.ts +75 -2
- package/src/library/components/Gallery/GalleryViewer.tsx +54 -10
- package/src/library/components/Gallery/LayoutManager.ts +30 -6
- package/src/library/components/Gallery/constants.ts +2 -0
- package/src/library/components/Gallery/registry.ts +44 -0
- package/src/library/components/GameDesigner.tsx +121 -12
- package/src/library/components/InlineGalleryDisplay.tsx +5 -0
- package/src/library/components/LiveButton.tsx +8 -5
- package/src/library/components/MatchViewer.tsx +14 -3
- package/src/library/components/Panel/MultiPanel.tsx +21 -0
- package/src/library/components/Panel/PanelContents.tsx +70 -1
- package/src/library/components/Panel/PanelTabStack.tsx +1 -0
- package/src/library/components/PanelSpark.tsx +9 -4
- package/src/library/components/Playground.tsx +125 -33
- package/src/library/components/PromptControls.tsx +7 -3
- package/src/library/components/SparkLineChart.tsx +23 -27
- package/src/library/components/TimeControlBar.tsx +5 -3
- package/src/library/components/TokenizedMarkdown.tsx +224 -0
- package/src/library/components/TokenizedMessage.tsx +30 -95
- package/src/library/components/TopBarPlayers.tsx +18 -10
- package/src/library/components/Tutorial/BrowserNarration.ts +233 -0
- package/src/library/components/Tutorial/TutorialBox.tsx +506 -0
- package/src/library/components/Tutorial/TutorialDevPanel.tsx +297 -0
- package/src/library/components/Tutorial/TutorialOverlay.tsx +1301 -0
- package/src/library/components/Tutorial/targetRects.ts +273 -0
- package/src/library/game/Chit.ts +23 -7
- package/src/library/game/ClientTimeState.ts +18 -0
- package/src/library/game/ConnectionTransport.ts +12 -3
- package/src/library/game/Game.ts +16 -1
- package/src/library/game/GameTheme.ts +4 -0
- package/src/library/game/Match.ts +174 -5
- package/src/library/game/MatchStorage.ts +14 -4
- package/src/library/game/Pick.ts +36 -1
- package/src/library/game/PlayerChit.ts +4 -1
- package/src/library/game/PlayerInfo.ts +13 -3
- package/src/library/game/PlayerPromptStatusChit.ts +8 -2
- package/src/library/game/Prompt.ts +20 -0
- package/src/library/game/Turn.ts +198 -68
- package/src/library/game/TurnState.ts +34 -3
- package/src/library/game/ai/AI_GUIDE.md +444 -0
- package/src/library/game/ai/AiClientPrompts.ts +730 -0
- package/src/library/game/ai/AiLiveView.ts +63 -0
- package/src/library/game/ai/AiPlayerView.ts +114 -0
- package/src/library/game/ai/ai.test.ts +475 -0
- package/src/library/game/ai/connectAiPlayer.ts +88 -0
- package/src/library/game/ai/defineAi.ts +230 -0
- package/src/library/game/ai/simulateMatches.ts +172 -0
- package/src/library/game/badAiTransport/BadAIClientPrompts.ts +3 -0
- package/src/library/game/clientTransport/ClientPrompts.ts +31 -1
- package/src/library/game/clientTransport/ClientTime.ts +54 -13
- package/src/library/game/serialize.test.ts +275 -0
- package/src/library/game/tutorial/TUTORIAL_GUIDE.md +411 -0
- package/src/library/game/tutorial/TutorialController.test.ts +731 -0
- package/src/library/game/tutorial/TutorialController.ts +1286 -0
- package/src/library/game/tutorial/TutorialRuntime.ts +311 -0
- package/src/library/game/tutorial/TutorialTheme.ts +67 -0
- package/src/library/game/tutorial/allowed.ts +145 -0
- package/src/library/game/tutorial/checks.ts +186 -0
- package/src/library/game/tutorial/createDemoMatch.ts +115 -0
- package/src/library/game/tutorial/defineTutorial.ts +414 -0
- package/src/library/game/tutorial/runTutorial.ts +331 -0
- package/src/library/game/undo.test.ts +282 -0
- package/src/library/hooks/usePanelNavigation.tsx +65 -0
- package/src/library/hooks/useTimeController.tsx +6 -2
- package/src/library/hooks/useTokenMap.ts +2 -6
- package/src/library/hooks/useTutorial.tsx +76 -0
- package/src/library/index.ts +91 -4
- package/src/library/rendering/CameraWrapperPerspective.ts +17 -0
- package/src/library/rendering/ChitGalleryItemInstance.ts +12 -0
- package/src/library/rendering/ChitRenderInstance.ts +34 -0
- package/src/library/rendering/RootChitRenderInstance.ts +30 -1
- package/src/library/utilities/Annotations.ts +35 -7
- package/src/library/utilities/CanvasStack/CanvasStack.ts +74 -29
- package/src/library/utilities/TokenizedText.test.ts +32 -0
- package/src/library/utilities/TokenizedText.ts +103 -0
- package/src/library/utilities/zIndex.ts +1 -0
|
@@ -4,12 +4,9 @@ import Color from "color";
|
|
|
4
4
|
import { ImageSpec } from "../utilities/CanvasStack/CanvasOperations";
|
|
5
5
|
import { UpdatingCanvasImage } from "./UpdatingCanvasImage";
|
|
6
6
|
import { StaticImage } from "../utilities/StaticImage";
|
|
7
|
+
import { TokenDefinition, parseMessageTokens } from "../utilities/TokenizedText";
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
-
image?: string | ImageSpec;
|
|
10
|
-
label?: string;
|
|
11
|
-
color?: string;
|
|
12
|
-
}
|
|
9
|
+
export type { TokenDefinition } from "../utilities/TokenizedText";
|
|
13
10
|
|
|
14
11
|
export interface TokenizedMessageProps {
|
|
15
12
|
message: string;
|
|
@@ -17,22 +14,6 @@ export interface TokenizedMessageProps {
|
|
|
17
14
|
tokenMap?: Record<string, TokenDefinition>;
|
|
18
15
|
}
|
|
19
16
|
|
|
20
|
-
// Token parsing types
|
|
21
|
-
interface ParsedToken {
|
|
22
|
-
type: "token";
|
|
23
|
-
name: string;
|
|
24
|
-
definition?: TokenDefinition;
|
|
25
|
-
key: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface ParsedText {
|
|
29
|
-
type: "text";
|
|
30
|
-
content: string;
|
|
31
|
-
key: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
type ParsedElement = ParsedToken | ParsedText;
|
|
35
|
-
|
|
36
17
|
// Color utility function
|
|
37
18
|
function calculateBackgroundColor(textColor: string): string {
|
|
38
19
|
const color = Color(textColor);
|
|
@@ -42,44 +23,34 @@ function calculateBackgroundColor(textColor: string): string {
|
|
|
42
23
|
: color.lightness(95).hex(); // 95% brightness for dark colors
|
|
43
24
|
}
|
|
44
25
|
|
|
26
|
+
const LINE_HEIGHT = 1.1;
|
|
27
|
+
const DEFAULT_IMAGE_BLEED = 0.1;
|
|
28
|
+
|
|
45
29
|
// Token Image Component
|
|
46
30
|
interface TokenImageProps {
|
|
47
31
|
src: string | ImageSpec;
|
|
48
32
|
alt: string;
|
|
49
33
|
fontSize: number;
|
|
50
|
-
|
|
34
|
+
bleed: number;
|
|
51
35
|
}
|
|
52
36
|
|
|
53
|
-
function TokenImage({ src, alt, fontSize,
|
|
37
|
+
function TokenImage({ src, alt, fontSize, bleed }: TokenImageProps) {
|
|
38
|
+
// grow past the line box, then cancel the extra height with negative margins so lines don't get pushed apart
|
|
39
|
+
const bleedPx = bleed * fontSize;
|
|
40
|
+
const style = {
|
|
41
|
+
height: `${fontSize * LINE_HEIGHT + bleedPx * 2}px`,
|
|
42
|
+
marginTop: `${-bleedPx}px`,
|
|
43
|
+
marginBottom: `${-bleedPx}px`,
|
|
44
|
+
marginLeft: "1px",
|
|
45
|
+
marginRight: "3px",
|
|
46
|
+
position: "relative" as const,
|
|
47
|
+
};
|
|
48
|
+
|
|
54
49
|
if (typeof src !== "string") {
|
|
55
50
|
const updatingCanvas = new StaticImage(src).get();
|
|
56
|
-
return
|
|
57
|
-
<UpdatingCanvasImage
|
|
58
|
-
image={updatingCanvas}
|
|
59
|
-
style={{
|
|
60
|
-
height: `${fontSize - 4}px`,
|
|
61
|
-
marginRight: "4px",
|
|
62
|
-
transform: `scale(1.4)`,
|
|
63
|
-
position: "relative",
|
|
64
|
-
marginLeft: "2px",
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
);
|
|
51
|
+
return <UpdatingCanvasImage image={updatingCanvas} style={style} />;
|
|
68
52
|
} else {
|
|
69
|
-
return
|
|
70
|
-
<Box
|
|
71
|
-
component="img"
|
|
72
|
-
src={src}
|
|
73
|
-
alt={alt}
|
|
74
|
-
sx={{
|
|
75
|
-
height: `${fontSize - 4}px`,
|
|
76
|
-
marginRight: "4px",
|
|
77
|
-
transform: `scale(1.4)`,
|
|
78
|
-
position: "relative",
|
|
79
|
-
marginLeft: "2px",
|
|
80
|
-
}}
|
|
81
|
-
/>
|
|
82
|
-
);
|
|
53
|
+
return <Box component="img" src={src} alt={alt} sx={style} />;
|
|
83
54
|
}
|
|
84
55
|
}
|
|
85
56
|
|
|
@@ -112,7 +83,7 @@ interface TokenProps {
|
|
|
112
83
|
fontSize: number;
|
|
113
84
|
}
|
|
114
85
|
|
|
115
|
-
function Token({ name, definition, fontSize }: TokenProps) {
|
|
86
|
+
export function Token({ name, definition, fontSize }: TokenProps) {
|
|
116
87
|
if (!definition) {
|
|
117
88
|
return <>{`:${name}:`}</>;
|
|
118
89
|
}
|
|
@@ -126,7 +97,8 @@ function Token({ name, definition, fontSize }: TokenProps) {
|
|
|
126
97
|
display: "inline-flex",
|
|
127
98
|
alignItems: "center",
|
|
128
99
|
whiteSpace: "nowrap",
|
|
129
|
-
|
|
100
|
+
// an image has no text baseline, so center image tokens on the text instead
|
|
101
|
+
verticalAlign: definition.image ? "middle" : "baseline",
|
|
130
102
|
backgroundColor,
|
|
131
103
|
padding: backgroundColor ? "1px 2px" : 0,
|
|
132
104
|
margin: backgroundColor ? "-1px 0" : 0,
|
|
@@ -134,55 +106,18 @@ function Token({ name, definition, fontSize }: TokenProps) {
|
|
|
134
106
|
}}
|
|
135
107
|
>
|
|
136
108
|
{definition.image && (
|
|
137
|
-
<TokenImage
|
|
109
|
+
<TokenImage
|
|
110
|
+
src={definition.image}
|
|
111
|
+
alt={name}
|
|
112
|
+
fontSize={fontSize}
|
|
113
|
+
bleed={definition.imageBleed ?? (backgroundColor ? 0 : DEFAULT_IMAGE_BLEED)}
|
|
114
|
+
/>
|
|
138
115
|
)}
|
|
139
116
|
{definition.label && <TokenLabel label={definition.label} color={definition.color} fontSize={fontSize} />}
|
|
140
117
|
</Box>
|
|
141
118
|
);
|
|
142
119
|
}
|
|
143
120
|
|
|
144
|
-
// Parser function
|
|
145
|
-
function parseMessageTokens(message: string, tokenMap: Record<string, TokenDefinition>): ParsedElement[] {
|
|
146
|
-
const elements: ParsedElement[] = [];
|
|
147
|
-
const tokenRegex = /:([a-zA-Z0-9_-]+):/g;
|
|
148
|
-
let lastIndex = 0;
|
|
149
|
-
let match;
|
|
150
|
-
|
|
151
|
-
while ((match = tokenRegex.exec(message)) !== null) {
|
|
152
|
-
const tokenName = match[1];
|
|
153
|
-
|
|
154
|
-
// Add text before the token
|
|
155
|
-
if (match.index > lastIndex) {
|
|
156
|
-
elements.push({
|
|
157
|
-
type: "text",
|
|
158
|
-
content: message.substring(lastIndex, match.index),
|
|
159
|
-
key: `text-${lastIndex}`,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Add the token
|
|
164
|
-
elements.push({
|
|
165
|
-
type: "token",
|
|
166
|
-
name: tokenName,
|
|
167
|
-
definition: tokenMap[tokenName],
|
|
168
|
-
key: `token-${match.index}`,
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
lastIndex = match.index + match[0].length;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Add remaining text after last token
|
|
175
|
-
if (lastIndex < message.length) {
|
|
176
|
-
elements.push({
|
|
177
|
-
type: "text",
|
|
178
|
-
content: message.substring(lastIndex),
|
|
179
|
-
key: `text-${lastIndex}`,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return elements;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
121
|
// Main Component
|
|
187
122
|
export function TokenizedMessage({ message, fontSize, tokenMap = {} }: TokenizedMessageProps) {
|
|
188
123
|
const elements = parseMessageTokens(message, tokenMap);
|
|
@@ -191,7 +126,7 @@ export function TokenizedMessage({ message, fontSize, tokenMap = {} }: Tokenized
|
|
|
191
126
|
<Box
|
|
192
127
|
sx={{
|
|
193
128
|
fontSize: `${fontSize}px`,
|
|
194
|
-
lineHeight: `${fontSize *
|
|
129
|
+
lineHeight: `${fontSize * LINE_HEIGHT}px`,
|
|
195
130
|
}}
|
|
196
131
|
>
|
|
197
132
|
{elements.map((element) =>
|
|
@@ -117,7 +117,12 @@ function PlayerInfoRow({ headers, player }: { player: PlayerChit; headers?: bool
|
|
|
117
117
|
<PlayerInfoCell size={size} key={spark.id} spark={spark} />
|
|
118
118
|
))}
|
|
119
119
|
<TextPlayerInfoCell size={size} width={NAME_WIDTH} text={player.name} />
|
|
120
|
-
|
|
120
|
+
{/* This cell is single-line, ellipsized text, so use the plain-text prompt (player tokens become names). */}
|
|
121
|
+
<TextPlayerInfoCell
|
|
122
|
+
size={size}
|
|
123
|
+
width={PROMPT_WIDTH}
|
|
124
|
+
text={player.promptStatus.latestPromptMessageText ?? player.promptStatus.latestPromptMessage ?? ""}
|
|
125
|
+
/>
|
|
121
126
|
</Stack>
|
|
122
127
|
);
|
|
123
128
|
}
|
|
@@ -133,15 +138,18 @@ export default function TopBarPlayers() {
|
|
|
133
138
|
<TopBarDropdown
|
|
134
139
|
label={
|
|
135
140
|
<Stack direction={"row"} sx={{ pt: 1, pb: 1, maxWidth: "100%" }}>
|
|
136
|
-
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
{/* The avatar cluster is what a tutorial points at with { ui: "players" }, not the whole strip */}
|
|
142
|
+
<Stack direction={"row"} data-tutorial-target="players" sx={{ pl: 1 }}>
|
|
143
|
+
{playerChits.map((player) => (
|
|
144
|
+
<PlayerImage
|
|
145
|
+
sx={{ ml: -1 }}
|
|
146
|
+
borderColor={player.promptStatus.latestPromptMessage ? theme.chitHighlightColor : undefined}
|
|
147
|
+
size={theme.topBarHeight - theme.spacing * 2}
|
|
148
|
+
key={player.id}
|
|
149
|
+
player={player}
|
|
150
|
+
/>
|
|
151
|
+
))}
|
|
152
|
+
</Stack>
|
|
145
153
|
<Typography
|
|
146
154
|
flex={1}
|
|
147
155
|
sx={{
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { NarrationPlayer } from "../../game/tutorial/TutorialController";
|
|
2
|
+
|
|
3
|
+
type Listener<T> = (v: T) => void;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Plays a step's narration in the browser: an audio file through an `<audio>` element, or, when the
|
|
7
|
+
* step's `audio` is `"tts"`, the browser's speech synthesis (sentence boundaries come from the
|
|
8
|
+
* synthesizer, so sentence cues are exact). Mobile browsers need a user gesture before either will
|
|
9
|
+
* play; the tutorial's Start tap provides it.
|
|
10
|
+
*/
|
|
11
|
+
export class BrowserNarration implements NarrationPlayer {
|
|
12
|
+
private audio?: HTMLAudioElement;
|
|
13
|
+
private utterances: SpeechSynthesisUtterance[] = [];
|
|
14
|
+
private timeListeners: Listener<number>[] = [];
|
|
15
|
+
private sentenceListeners: Listener<number>[] = [];
|
|
16
|
+
private endListeners: Listener<void>[] = [];
|
|
17
|
+
private _playing = false;
|
|
18
|
+
private _paused = false;
|
|
19
|
+
private startedAt = 0;
|
|
20
|
+
private pausedAt = 0;
|
|
21
|
+
private ttsTimer: any;
|
|
22
|
+
private _duration: number | undefined;
|
|
23
|
+
private rate = 1;
|
|
24
|
+
private generation = 0;
|
|
25
|
+
/** Recordings loading ahead of their step (see `preload`), by URL, oldest first */
|
|
26
|
+
private preloaded = new Map<string, HTMLAudioElement>();
|
|
27
|
+
|
|
28
|
+
constructor(private resolveUrl: (url: string) => string = (u) => u) {}
|
|
29
|
+
|
|
30
|
+
get playing() {
|
|
31
|
+
return this._playing;
|
|
32
|
+
}
|
|
33
|
+
get paused() {
|
|
34
|
+
return this._paused;
|
|
35
|
+
}
|
|
36
|
+
get duration() {
|
|
37
|
+
return this._duration;
|
|
38
|
+
}
|
|
39
|
+
get time() {
|
|
40
|
+
if (this.audio) return this.audio.currentTime;
|
|
41
|
+
if (!this._playing) return 0;
|
|
42
|
+
return (((this._paused ? this.pausedAt : performance.now()) - this.startedAt) / 1000) * this.rate;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Playback speed. Recorded audio changes speed immediately (pitch preserved). Speech synthesis
|
|
47
|
+
* queues every sentence up front, so a change there applies from the next step.
|
|
48
|
+
*/
|
|
49
|
+
setRate(rate: number) {
|
|
50
|
+
if (!(rate > 0)) return;
|
|
51
|
+
if (!this.audio && this._playing) {
|
|
52
|
+
// keep `time` continuous for the speech clock
|
|
53
|
+
const at = this._paused ? this.pausedAt : performance.now();
|
|
54
|
+
const t = ((at - this.startedAt) / 1000) * this.rate;
|
|
55
|
+
this.startedAt = at - (t * 1000) / rate;
|
|
56
|
+
}
|
|
57
|
+
this.rate = rate;
|
|
58
|
+
if (this.audio) this.audio.playbackRate = rate;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
onTime(cb: Listener<number>) {
|
|
62
|
+
this.timeListeners.push(cb);
|
|
63
|
+
return () => {
|
|
64
|
+
this.timeListeners = this.timeListeners.filter((c) => c !== cb);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
onSentence(cb: Listener<number>) {
|
|
68
|
+
this.sentenceListeners.push(cb);
|
|
69
|
+
return () => {
|
|
70
|
+
this.sentenceListeners = this.sentenceListeners.filter((c) => c !== cb);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
onEnd(cb: () => void) {
|
|
74
|
+
this.endListeners.push(cb);
|
|
75
|
+
return () => {
|
|
76
|
+
this.endListeners = this.endListeners.filter((c) => c !== cb);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Starts downloading a recording before its step, so it starts at once when the step comes. Keeps
|
|
82
|
+
* the last few: Back can return to one just played.
|
|
83
|
+
*/
|
|
84
|
+
preload(audio: string) {
|
|
85
|
+
if (audio === "tts" || typeof Audio === "undefined") return;
|
|
86
|
+
const url = this.resolveUrl(audio);
|
|
87
|
+
if (this.preloaded.has(url)) return;
|
|
88
|
+
const element = new Audio();
|
|
89
|
+
element.preload = "auto";
|
|
90
|
+
element.src = url;
|
|
91
|
+
element.load();
|
|
92
|
+
this.preloaded.set(url, element);
|
|
93
|
+
while (this.preloaded.size > 3) {
|
|
94
|
+
const [oldest] = this.preloaded.keys();
|
|
95
|
+
this.preloaded.delete(oldest);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async play(step: { audio: string; text: string; sentences: string[] }): Promise<void> {
|
|
100
|
+
this.stop();
|
|
101
|
+
const generation = ++this.generation;
|
|
102
|
+
this._playing = true;
|
|
103
|
+
this._paused = false;
|
|
104
|
+
if (step.audio === "tts") {
|
|
105
|
+
return this.speak(step.sentences, generation);
|
|
106
|
+
}
|
|
107
|
+
const url = this.resolveUrl(step.audio);
|
|
108
|
+
// Reuse the element that has been loading it, if any
|
|
109
|
+
const ready = this.preloaded.get(url);
|
|
110
|
+
this.preloaded.delete(url);
|
|
111
|
+
const audio = ready ?? new Audio(url);
|
|
112
|
+
if (ready) audio.currentTime = 0;
|
|
113
|
+
audio.playbackRate = this.rate;
|
|
114
|
+
audio.preservesPitch = true;
|
|
115
|
+
this.audio = audio;
|
|
116
|
+
this._duration = undefined;
|
|
117
|
+
audio.addEventListener("loadedmetadata", () => {
|
|
118
|
+
if (generation === this.generation) this._duration = audio.duration;
|
|
119
|
+
});
|
|
120
|
+
audio.addEventListener("timeupdate", () => {
|
|
121
|
+
if (generation === this.generation) this.timeListeners.forEach((cb) => cb(audio.currentTime));
|
|
122
|
+
});
|
|
123
|
+
audio.addEventListener("ended", () => {
|
|
124
|
+
if (generation !== this.generation) return;
|
|
125
|
+
this._playing = false;
|
|
126
|
+
this.endListeners.forEach((cb) => cb());
|
|
127
|
+
});
|
|
128
|
+
try {
|
|
129
|
+
await audio.play();
|
|
130
|
+
} catch (e) {
|
|
131
|
+
this._playing = false;
|
|
132
|
+
throw e;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private speak(sentences: string[], generation: number): Promise<void> {
|
|
137
|
+
const synth = typeof window !== "undefined" ? window.speechSynthesis : undefined;
|
|
138
|
+
if (!synth || sentences.length === 0) {
|
|
139
|
+
this._playing = false;
|
|
140
|
+
return Promise.reject(new Error("speech synthesis unavailable"));
|
|
141
|
+
}
|
|
142
|
+
synth.cancel();
|
|
143
|
+
this.startedAt = performance.now();
|
|
144
|
+
const text = (s: string) => s.replace(/[*_`#>[\]()!]/g, "").replace(/:[a-zA-Z0-9_-]+:/g, "");
|
|
145
|
+
// Rough estimate so proportional cues have something to work with: ~2.6 words/second
|
|
146
|
+
const words = sentences.join(" ").split(/\s+/).length;
|
|
147
|
+
this._duration = Math.max(1, words / 2.6);
|
|
148
|
+
let started: () => void = () => {};
|
|
149
|
+
let failed: (e: Error) => void = () => {};
|
|
150
|
+
const startedPromise = new Promise<void>((resolve, reject) => {
|
|
151
|
+
started = resolve;
|
|
152
|
+
failed = reject;
|
|
153
|
+
});
|
|
154
|
+
// Some browsers (and headless ones) accept the utterance and never speak: fall back after a moment
|
|
155
|
+
const watchdog = setTimeout(() => {
|
|
156
|
+
if (generation === this.generation && this._playing) {
|
|
157
|
+
this.stop();
|
|
158
|
+
failed(new Error("speech synthesis did not start"));
|
|
159
|
+
}
|
|
160
|
+
}, 2500);
|
|
161
|
+
this.utterances = sentences.map((s, i) => {
|
|
162
|
+
const u = new SpeechSynthesisUtterance(text(s));
|
|
163
|
+
u.rate = this.rate;
|
|
164
|
+
u.onstart = () => {
|
|
165
|
+
if (generation !== this.generation) return;
|
|
166
|
+
if (i === 0) {
|
|
167
|
+
clearTimeout(watchdog);
|
|
168
|
+
started();
|
|
169
|
+
}
|
|
170
|
+
this.sentenceListeners.forEach((cb) => cb(i));
|
|
171
|
+
};
|
|
172
|
+
u.onerror = () => {
|
|
173
|
+
if (generation !== this.generation) return;
|
|
174
|
+
clearTimeout(watchdog);
|
|
175
|
+
this.stop();
|
|
176
|
+
failed(new Error("speech synthesis error"));
|
|
177
|
+
};
|
|
178
|
+
u.onend = () => {
|
|
179
|
+
if (generation !== this.generation) return;
|
|
180
|
+
if (i === sentences.length - 1) {
|
|
181
|
+
this._playing = false;
|
|
182
|
+
clearInterval(this.ttsTimer);
|
|
183
|
+
this.endListeners.forEach((cb) => cb());
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
return u;
|
|
187
|
+
});
|
|
188
|
+
this.utterances.forEach((u) => synth.speak(u));
|
|
189
|
+
clearInterval(this.ttsTimer);
|
|
190
|
+
this.ttsTimer = setInterval(() => {
|
|
191
|
+
if (generation === this.generation && this._playing && !this._paused) {
|
|
192
|
+
this.timeListeners.forEach((cb) => cb(this.time));
|
|
193
|
+
}
|
|
194
|
+
}, 100);
|
|
195
|
+
return startedPromise;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
pause() {
|
|
199
|
+
if (!this._playing || this._paused) return;
|
|
200
|
+
this._paused = true;
|
|
201
|
+
if (this.audio) this.audio.pause();
|
|
202
|
+
else {
|
|
203
|
+
this.pausedAt = performance.now();
|
|
204
|
+
window.speechSynthesis?.pause();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
resume() {
|
|
209
|
+
if (!this._playing || !this._paused) return;
|
|
210
|
+
this._paused = false;
|
|
211
|
+
if (this.audio) void this.audio.play().catch(() => {});
|
|
212
|
+
else {
|
|
213
|
+
this.startedAt += performance.now() - this.pausedAt;
|
|
214
|
+
window.speechSynthesis?.resume();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
stop() {
|
|
219
|
+
this.generation++;
|
|
220
|
+
this._playing = false;
|
|
221
|
+
this._paused = false;
|
|
222
|
+
clearInterval(this.ttsTimer);
|
|
223
|
+
if (this.audio) {
|
|
224
|
+
this.audio.pause();
|
|
225
|
+
this.audio.src = "";
|
|
226
|
+
this.audio = undefined;
|
|
227
|
+
}
|
|
228
|
+
if (this.utterances.length && typeof window !== "undefined") {
|
|
229
|
+
window.speechSynthesis?.cancel();
|
|
230
|
+
this.utterances = [];
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|