@almadar/std 16.173.0 → 16.175.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 (220) hide show
  1. package/behaviors/lolo/infra/atoms/std-cross-reference.lolo +2 -4
  2. package/behaviors/lolo/ui/core/atoms/std-board.lolo +5 -9
  3. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +8 -1
  4. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +2 -2
  5. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +3 -7
  6. package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +1 -1
  7. package/behaviors/lolo/ui/core/atoms/std-image-upload-multi.lolo +1 -1
  8. package/behaviors/lolo/ui/core/atoms/std-list.lolo +3 -3
  9. package/behaviors/lolo/ui/core/atoms/std-modal.lolo +2 -2
  10. package/behaviors/lolo/ui/core/atoms/std-multi-party-flow.lolo +2 -4
  11. package/behaviors/lolo/ui/core/atoms/std-rating-review.lolo +5 -13
  12. package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +3 -7
  13. package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +1 -1
  14. package/behaviors/lolo/ui/core/atoms/std-signature-capture.lolo +2 -2
  15. package/behaviors/lolo/ui/core/atoms/std-step-flow.lolo +2 -4
  16. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +1 -1
  17. package/behaviors/lolo/ui/core/atoms/std-thread.lolo +2 -2
  18. package/behaviors/lolo/ui/core/atoms/std-vote.lolo +2 -2
  19. package/behaviors/lolo/ui/core/atoms/std-wizard.lolo +3 -7
  20. package/behaviors/lolo/ui/core/atoms/ui-atlas-image.lolo +1 -1
  21. package/behaviors/lolo/ui/core/atoms/ui-atlas-panel.lolo +1 -1
  22. package/behaviors/lolo/ui/core/atoms/ui-center.lolo +1 -1
  23. package/behaviors/lolo/ui/core/atoms/ui-hstack.lolo +1 -1
  24. package/behaviors/lolo/ui/core/atoms/ui-icon.lolo +1 -1
  25. package/behaviors/lolo/ui/core/atoms/ui-stack.lolo +1 -1
  26. package/behaviors/lolo/ui/core/atoms/ui-typography.lolo +1 -1
  27. package/behaviors/lolo/ui/core/atoms/ui-vstack.lolo +1 -1
  28. package/behaviors/lolo/ui/core/molecules/ui-content-renderer.lolo +1 -1
  29. package/behaviors/lolo/ui/core/molecules/ui-form-layout.lolo +1 -1
  30. package/behaviors/lolo/ui/core/molecules/ui-grid.lolo +1 -1
  31. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +4 -9
  32. package/behaviors/lolo/ui/core/organisms/ui-chat-bar.lolo +1 -1
  33. package/behaviors/lolo/ui/core/organisms/ui-dashboard-grid.lolo +1 -1
  34. package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +1 -1
  35. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +1 -1
  36. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +1 -1
  37. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +1 -1
  38. package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +9 -3
  39. package/behaviors/lolo/ui/core/organisms/ui-form.lolo +9 -3
  40. package/behaviors/lolo/ui/core/organisms/ui-master-detail.lolo +1 -1
  41. package/behaviors/lolo/ui/core/organisms/ui-media-gallery.lolo +1 -1
  42. package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +7 -1
  43. package/behaviors/lolo/ui/core/organisms/ui-stat-card.lolo +1 -1
  44. package/behaviors/lolo/ui/core/organisms/ui-subagent-trace-panel.lolo +1 -1
  45. package/behaviors/lolo/ui/game/atoms/ui-action-tile.lolo +1 -1
  46. package/behaviors/lolo/ui/game/atoms/ui-draw-shape-layer.lolo +41 -9
  47. package/behaviors/lolo/ui/game/atoms/ui-draw-shape.lolo +40 -8
  48. package/behaviors/lolo/ui/game/atoms/ui-draw-sprite-layer.lolo +13 -3
  49. package/behaviors/lolo/ui/game/atoms/ui-draw-sprite.lolo +12 -2
  50. package/behaviors/lolo/ui/game/atoms/ui-draw-text-layer.lolo +3 -3
  51. package/behaviors/lolo/ui/game/atoms/ui-draw-text.lolo +2 -2
  52. package/behaviors/lolo/ui/game/organisms/std-tactics-board-3d.lolo +32 -2
  53. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +133 -23
  54. package/behaviors/lolo/ui/learning/atoms/std-learn-compare.lolo +397 -0
  55. package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +537 -0
  56. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +428 -0
  57. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +520 -0
  58. package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +419 -0
  59. package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +591 -0
  60. package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +425 -0
  61. package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +398 -0
  62. package/behaviors/lolo/ui/learning/atoms/std-learn-measure.lolo +325 -0
  63. package/behaviors/lolo/ui/learning/atoms/std-learn-perturb.lolo +494 -0
  64. package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +408 -0
  65. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +805 -0
  66. package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +307 -0
  67. package/behaviors/lolo/ui/learning/atoms/std-learn-sim-3d.lolo +318 -0
  68. package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +336 -0
  69. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +409 -0
  70. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +186 -0
  71. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +522 -0
  72. package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +192 -0
  73. package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +111 -2
  74. package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +193 -5
  75. package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +173 -5
  76. package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +48 -1
  77. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +141 -1
  78. package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +242 -5
  79. package/behaviors/lolo/ui/marketing/organisms/ui-book-viewer.lolo +1 -1
  80. package/behaviors/lolo/ui/marketing/organisms/ui-case-study-organism.lolo +1 -1
  81. package/behaviors/lolo/ui/marketing/organisms/ui-feature-grid-organism.lolo +1 -1
  82. package/behaviors/lolo/ui/marketing/organisms/ui-hero-organism.lolo +1 -1
  83. package/behaviors/lolo/ui/marketing/organisms/ui-pricing-organism.lolo +1 -1
  84. package/behaviors/lolo/ui/marketing/organisms/ui-showcase-organism.lolo +1 -1
  85. package/behaviors/lolo/ui/marketing/organisms/ui-stats-organism.lolo +1 -1
  86. package/behaviors/lolo/ui/marketing/organisms/ui-step-flow-organism.lolo +1 -1
  87. package/behaviors/lolo/ui/marketing/organisms/ui-team-organism.lolo +1 -1
  88. package/behaviors/registry/agent/atoms/std-agent-session.orb +22 -1
  89. package/behaviors/registry/agent/atoms/std-agent-tool-call.orb +38 -2
  90. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +38 -2
  91. package/behaviors/registry/agent/organisms/std-agent-rabit.orb +23 -1
  92. package/behaviors/registry/infra/atoms/std-approval-gate.orb +8 -16
  93. package/behaviors/registry/infra/atoms/std-cache-aside.orb +31 -62
  94. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +16 -32
  95. package/behaviors/registry/infra/atoms/std-cross-reference.orb +32 -4
  96. package/behaviors/registry/infra/atoms/std-data-erasure.orb +8 -16
  97. package/behaviors/registry/infra/atoms/std-mod-queue.orb +8 -16
  98. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +14 -28
  99. package/behaviors/registry/infra/atoms/std-row-access-control.orb +30 -2
  100. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +1 -2
  101. package/behaviors/registry/ui/core/atoms/std-board.orb +19 -5
  102. package/behaviors/registry/ui/core/atoms/std-browse.orb +29 -7
  103. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +1 -2
  104. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +3 -5
  105. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +3 -6
  106. package/behaviors/registry/ui/core/atoms/std-event-log.orb +17 -3
  107. package/behaviors/registry/ui/core/atoms/std-export.orb +2 -4
  108. package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -1
  109. package/behaviors/registry/ui/core/atoms/std-gallery.orb +9 -18
  110. package/behaviors/registry/ui/core/atoms/std-graphs.orb +15 -1
  111. package/behaviors/registry/ui/core/atoms/std-import.orb +2 -4
  112. package/behaviors/registry/ui/core/atoms/std-list.orb +4 -6
  113. package/behaviors/registry/ui/core/atoms/std-modal.orb +2 -2
  114. package/behaviors/registry/ui/core/atoms/std-multi-party-flow.orb +16 -2
  115. package/behaviors/registry/ui/core/atoms/std-pagination.orb +15 -1
  116. package/behaviors/registry/ui/core/atoms/std-rating-review.orb +19 -5
  117. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +17 -3
  118. package/behaviors/registry/ui/core/atoms/std-rich-editor.orb +15 -1
  119. package/behaviors/registry/ui/core/atoms/std-scatter.orb +15 -1
  120. package/behaviors/registry/ui/core/atoms/std-signature-capture.orb +2 -2
  121. package/behaviors/registry/ui/core/atoms/std-stats.orb +15 -1
  122. package/behaviors/registry/ui/core/atoms/std-step-flow.orb +16 -2
  123. package/behaviors/registry/ui/core/atoms/std-thread.orb +2 -2
  124. package/behaviors/registry/ui/core/atoms/std-vote.orb +2 -2
  125. package/behaviors/registry/ui/core/atoms/std-wizard.orb +17 -3
  126. package/behaviors/registry/ui/core/atoms/ui-atlas-image.orb +4 -1
  127. package/behaviors/registry/ui/core/atoms/ui-atlas-panel.orb +4 -1
  128. package/behaviors/registry/ui/core/atoms/ui-center.orb +4 -1
  129. package/behaviors/registry/ui/core/atoms/ui-hstack.orb +4 -1
  130. package/behaviors/registry/ui/core/atoms/ui-icon.orb +4 -1
  131. package/behaviors/registry/ui/core/atoms/ui-stack.orb +4 -1
  132. package/behaviors/registry/ui/core/atoms/ui-typography.orb +4 -1
  133. package/behaviors/registry/ui/core/atoms/ui-vstack.orb +4 -1
  134. package/behaviors/registry/ui/core/molecules/ui-accordion.orb +3 -3
  135. package/behaviors/registry/ui/core/molecules/ui-content-renderer.orb +4 -1
  136. package/behaviors/registry/ui/core/molecules/ui-form-layout.orb +4 -1
  137. package/behaviors/registry/ui/core/molecules/ui-grid.orb +4 -1
  138. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +4 -39
  139. package/behaviors/registry/ui/core/molecules/ui-tabs.orb +2 -2
  140. package/behaviors/registry/ui/core/molecules/ui-wizard-container.orb +1 -1
  141. package/behaviors/registry/ui/core/organisms/ui-chat-bar.orb +4 -1
  142. package/behaviors/registry/ui/core/organisms/ui-dashboard-grid.orb +5 -2
  143. package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +5 -2
  144. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +4 -1
  145. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +4 -1
  146. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +4 -1
  147. package/behaviors/registry/ui/core/organisms/ui-form-section.orb +34 -2
  148. package/behaviors/registry/ui/core/organisms/ui-form.orb +34 -2
  149. package/behaviors/registry/ui/core/organisms/ui-master-detail.orb +4 -1
  150. package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +4 -1
  151. package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +24 -2
  152. package/behaviors/registry/ui/core/organisms/ui-stat-card.orb +4 -1
  153. package/behaviors/registry/ui/core/organisms/ui-subagent-trace-panel.orb +4 -1
  154. package/behaviors/registry/ui/core/organisms/ui-tabbed-container.orb +1 -1
  155. package/behaviors/registry/ui/core/organisms/ui-ui-slot-renderer.orb +1 -1
  156. package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +35 -1
  157. package/behaviors/registry/ui/game/atoms/ui-action-tile.orb +4 -1
  158. package/behaviors/registry/ui/game/atoms/ui-draw-shape-layer.orb +183 -13
  159. package/behaviors/registry/ui/game/atoms/ui-draw-shape.orb +104 -9
  160. package/behaviors/registry/ui/game/atoms/ui-draw-sprite-layer.orb +56 -2
  161. package/behaviors/registry/ui/game/atoms/ui-draw-sprite.orb +36 -4
  162. package/behaviors/registry/ui/game/atoms/ui-draw-text-layer.orb +21 -2
  163. package/behaviors/registry/ui/game/atoms/ui-draw-text.orb +19 -4
  164. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +173 -2
  165. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1288 -197
  166. package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +2814 -0
  167. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +3183 -0
  168. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +2512 -0
  169. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +3678 -0
  170. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +2394 -0
  171. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +3951 -0
  172. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +3458 -0
  173. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +2646 -0
  174. package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +1979 -0
  175. package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +2994 -0
  176. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +2682 -0
  177. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +6539 -0
  178. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +1842 -0
  179. package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +1648 -0
  180. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +2307 -0
  181. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +3118 -0
  182. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +986 -0
  183. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +3333 -0
  184. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +716 -0
  185. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +679 -5
  186. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +962 -18
  187. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +919 -30
  188. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +372 -1
  189. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +936 -16
  190. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +1328 -43
  191. package/behaviors/registry/ui/marketing/atoms/std-marketing-article.orb +1 -2
  192. package/behaviors/registry/ui/marketing/atoms/std-marketing-footer.orb +1 -2
  193. package/behaviors/registry/ui/marketing/atoms/std-marketing-split.orb +1 -2
  194. package/behaviors/registry/ui/marketing/atoms/std-marketing-stats.orb +1 -2
  195. package/behaviors/registry/ui/marketing/atoms/std-marketing-steps.orb +1 -2
  196. package/behaviors/registry/ui/marketing/atoms/std-marketing-team.orb +1 -2
  197. package/behaviors/registry/ui/marketing/organisms/ui-book-viewer.orb +4 -1
  198. package/behaviors/registry/ui/marketing/organisms/ui-case-study-organism.orb +4 -1
  199. package/behaviors/registry/ui/marketing/organisms/ui-feature-grid-organism.orb +4 -1
  200. package/behaviors/registry/ui/marketing/organisms/ui-hero-organism.orb +4 -1
  201. package/behaviors/registry/ui/marketing/organisms/ui-pricing-organism.orb +4 -1
  202. package/behaviors/registry/ui/marketing/organisms/ui-showcase-organism.orb +4 -1
  203. package/behaviors/registry/ui/marketing/organisms/ui-stats-organism.orb +4 -1
  204. package/behaviors/registry/ui/marketing/organisms/ui-step-flow-organism.orb +4 -1
  205. package/behaviors/registry/ui/marketing/organisms/ui-team-organism.orb +4 -1
  206. package/dist/behaviors/exports-reader.js +3704 -2189
  207. package/dist/behaviors/functions/index.d.ts +2638 -254
  208. package/dist/behaviors/functions/index.js +3648 -2190
  209. package/dist/behaviors/index.d.ts +1 -1
  210. package/dist/behaviors/index.js +3705 -2190
  211. package/dist/behaviors/query.js +3704 -2189
  212. package/dist/behaviors-embeddings.hash.json +3 -3
  213. package/dist/behaviors-embeddings.json +289 -213
  214. package/dist/behaviors-registry.json +7900 -587
  215. package/dist/index.d.ts +1 -1
  216. package/dist/index.js +3705 -2190
  217. package/dist/knob-embeddings.hash.json +3 -3
  218. package/dist/knob-embeddings.json +1 -1
  219. package/dist/registry/factory-signatures.json +1 -1
  220. package/package.json +2 -2
@@ -0,0 +1,2682 @@
1
+ {
2
+ "description": "Generic predict-then-reveal instrument — each config-declared scenario states a setup and a question, the learner commits to one of the predicted outcomes, and only then does the outcome play out: a timed reveal draws the scenario's declared value frames one by one as a growing curve with per-frame captions, ending in a verdict against the committed prediction and the scenario's explanation, with a running score across scenarios. All vocabulary is config-declared, so the same mechanism serves any commit-before-you-see teaching beat: what happens to the population, which way does the price move, does the reaction speed up, where does the phase go next. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M07581DDCZ4MRG2K2AJF4BS3": {
6
+ "bakedName": "PredictScene",
7
+ "curName": "PredictScene",
8
+ "id": "ent_01M07581DDCZ4MRG2K2AJF4BS3",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M07581DDEAH9VG9CYTH1VJE7": {
14
+ "bakedName": "INIT",
15
+ "curName": "INIT",
16
+ "id": "evt_01M07581DDEAH9VG9CYTH1VJE7",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
20
+ "renames": []
21
+ },
22
+ "evt_01M07581DK0R8SSN52WKWDRM7M": {
23
+ "bakedName": "PREDICT",
24
+ "curName": "PREDICT",
25
+ "id": "evt_01M07581DK0R8SSN52WKWDRM7M",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
29
+ "renames": []
30
+ },
31
+ "evt_01M07581DK3BMS4NQMBX9GPF6P": {
32
+ "bakedName": "PREDICTION_COMMITTED",
33
+ "curName": "PREDICTION_COMMITTED",
34
+ "id": "evt_01M07581DK3BMS4NQMBX9GPF6P",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
38
+ "renames": []
39
+ },
40
+ "evt_01M07581DK3DHDF4K5T5R30B5M": {
41
+ "bakedName": "RETRY",
42
+ "curName": "RETRY",
43
+ "id": "evt_01M07581DK3DHDF4K5T5R30B5M",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
47
+ "renames": []
48
+ },
49
+ "evt_01M07581DK61J8ARTARPY4MNHW": {
50
+ "bakedName": "MODE_SELECTED",
51
+ "curName": "MODE_SELECTED",
52
+ "id": "evt_01M07581DK61J8ARTARPY4MNHW",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
56
+ "renames": []
57
+ },
58
+ "evt_01M07581DK8Z46NF7E08ERAV8D": {
59
+ "bakedName": "SCENARIO_ADVANCED",
60
+ "curName": "SCENARIO_ADVANCED",
61
+ "id": "evt_01M07581DK8Z46NF7E08ERAV8D",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
65
+ "renames": []
66
+ },
67
+ "evt_01M07581DKAWQ3CMSKKE9EDM3W": {
68
+ "bakedName": "NEXT",
69
+ "curName": "NEXT",
70
+ "id": "evt_01M07581DKAWQ3CMSKKE9EDM3W",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
74
+ "renames": []
75
+ },
76
+ "evt_01M07581DKW5A39N3R3EK7KKVC": {
77
+ "bakedName": "ROUND_RESTARTED",
78
+ "curName": "ROUND_RESTARTED",
79
+ "id": "evt_01M07581DKW5A39N3R3EK7KKVC",
80
+ "kind": "event",
81
+ "owner": "workspace",
82
+ "parent": "trt_01M07581DD9V8TRJYWFKW9AG1R",
83
+ "renames": []
84
+ },
85
+ "orb_01M07581DDJA8E66K21HQZ2YNH": {
86
+ "bakedName": "PredictOrbital",
87
+ "curName": "PredictOrbital",
88
+ "id": "orb_01M07581DDJA8E66K21HQZ2YNH",
89
+ "kind": "orbital",
90
+ "owner": "workspace",
91
+ "renames": []
92
+ },
93
+ "pag_01M07581DN2RDTD7YAVTR50E5V": {
94
+ "bakedName": "PredictPage",
95
+ "curName": "PredictPage",
96
+ "id": "pag_01M07581DN2RDTD7YAVTR50E5V",
97
+ "kind": "page",
98
+ "owner": "workspace",
99
+ "renames": []
100
+ },
101
+ "trt_01M07581DD9V8TRJYWFKW9AG1R": {
102
+ "bakedName": "PredictSim",
103
+ "curName": "PredictSim",
104
+ "id": "trt_01M07581DD9V8TRJYWFKW9AG1R",
105
+ "kind": "trait",
106
+ "owner": "workspace",
107
+ "renames": []
108
+ }
109
+ },
110
+ "schemaVersion": 1
111
+ },
112
+ "name": "std-learn-predict",
113
+ "orbitals": [
114
+ {
115
+ "entity": {
116
+ "fields": [
117
+ {
118
+ "name": "id",
119
+ "required": true,
120
+ "type": "string"
121
+ },
122
+ {
123
+ "default": false,
124
+ "name": "active",
125
+ "type": "boolean"
126
+ },
127
+ {
128
+ "name": "title",
129
+ "type": "string"
130
+ },
131
+ {
132
+ "default": 0.0,
133
+ "name": "scenarioIndex",
134
+ "type": "number"
135
+ },
136
+ {
137
+ "default": 0.0,
138
+ "name": "totalScenarios",
139
+ "type": "number"
140
+ },
141
+ {
142
+ "name": "phase",
143
+ "type": "string"
144
+ },
145
+ {
146
+ "default": 0.0,
147
+ "name": "chosenIndex",
148
+ "type": "number"
149
+ },
150
+ {
151
+ "items": {
152
+ "properties": {
153
+ "caption": {
154
+ "name": "caption",
155
+ "required": true,
156
+ "type": "string"
157
+ },
158
+ "value": {
159
+ "name": "value",
160
+ "required": true,
161
+ "type": "number"
162
+ }
163
+ },
164
+ "type": "object"
165
+ },
166
+ "name": "frames",
167
+ "type": "array"
168
+ },
169
+ {
170
+ "default": 0.0,
171
+ "name": "frameIndex",
172
+ "type": "number"
173
+ },
174
+ {
175
+ "name": "frameCaption",
176
+ "type": "string"
177
+ },
178
+ {
179
+ "default": 0.0,
180
+ "name": "frameValue",
181
+ "type": "number"
182
+ },
183
+ {
184
+ "items": {
185
+ "properties": {
186
+ "x": {
187
+ "name": "x",
188
+ "required": true,
189
+ "type": "number"
190
+ },
191
+ "y": {
192
+ "name": "y",
193
+ "required": true,
194
+ "type": "number"
195
+ }
196
+ },
197
+ "type": "object"
198
+ },
199
+ "name": "revealSamples",
200
+ "type": "array"
201
+ },
202
+ {
203
+ "items": {
204
+ "properties": {
205
+ "color": {
206
+ "name": "color",
207
+ "required": false,
208
+ "type": "string"
209
+ },
210
+ "label": {
211
+ "name": "label",
212
+ "required": false,
213
+ "type": "string"
214
+ },
215
+ "samples": {
216
+ "items": {
217
+ "properties": {
218
+ "x": {
219
+ "name": "x",
220
+ "required": true,
221
+ "type": "number"
222
+ },
223
+ "y": {
224
+ "name": "y",
225
+ "required": true,
226
+ "type": "number"
227
+ }
228
+ },
229
+ "type": "object"
230
+ },
231
+ "name": "samples",
232
+ "required": true,
233
+ "type": "array"
234
+ }
235
+ },
236
+ "type": "object"
237
+ },
238
+ "name": "revealCurves",
239
+ "type": "array"
240
+ },
241
+ {
242
+ "default": 0.0,
243
+ "name": "score",
244
+ "type": "number"
245
+ },
246
+ {
247
+ "default": false,
248
+ "name": "done",
249
+ "type": "boolean"
250
+ },
251
+ {
252
+ "name": "setupText",
253
+ "type": "string"
254
+ },
255
+ {
256
+ "name": "question",
257
+ "type": "string"
258
+ },
259
+ {
260
+ "items": {
261
+ "type": "string"
262
+ },
263
+ "name": "options",
264
+ "type": "array"
265
+ },
266
+ {
267
+ "default": 0.0,
268
+ "name": "correctIndex",
269
+ "type": "number"
270
+ },
271
+ {
272
+ "name": "explanation",
273
+ "type": "string"
274
+ },
275
+ {
276
+ "name": "feedback",
277
+ "type": "string"
278
+ },
279
+ {
280
+ "items": {
281
+ "type": "node"
282
+ },
283
+ "name": "view",
284
+ "type": "array"
285
+ }
286
+ ],
287
+ "id": "ent_01M07581DDCZ4MRG2K2AJF4BS3",
288
+ "name": "PredictScene",
289
+ "persistence": "runtime"
290
+ },
291
+ "id": "orb_01M07581DDJA8E66K21HQZ2YNH",
292
+ "name": "PredictOrbital",
293
+ "pages": [
294
+ {
295
+ "id": "pag_01M07581DN2RDTD7YAVTR50E5V",
296
+ "name": "PredictPage",
297
+ "path": "/learn-predict",
298
+ "traits": [
299
+ {
300
+ "ref": "PredictSim",
301
+ "refId": "trt_01M07581DD9V8TRJYWFKW9AG1R"
302
+ }
303
+ ]
304
+ }
305
+ ],
306
+ "traits": [
307
+ {
308
+ "category": "interaction",
309
+ "config": {
310
+ "gridStep": {
311
+ "default": 25.0,
312
+ "label": "Grid Step",
313
+ "tier": "presentation",
314
+ "type": "number"
315
+ },
316
+ "height": {
317
+ "default": 320.0,
318
+ "label": "Height",
319
+ "tier": "presentation",
320
+ "type": "number"
321
+ },
322
+ "matchMode": {
323
+ "default": "",
324
+ "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.",
325
+ "label": "Match Mode",
326
+ "tier": "presentation",
327
+ "type": "string"
328
+ },
329
+ "nextLabel": {
330
+ "default": "Next",
331
+ "label": "Next Label",
332
+ "tier": "presentation",
333
+ "type": "string"
334
+ },
335
+ "retryLabel": {
336
+ "default": "Try Again",
337
+ "label": "Retry Label",
338
+ "tier": "presentation",
339
+ "type": "string"
340
+ },
341
+ "revealColor": {
342
+ "default": "#3b82f6",
343
+ "label": "Reveal Color",
344
+ "tier": "presentation",
345
+ "type": "string"
346
+ },
347
+ "revealLabel": {
348
+ "default": "Outcome",
349
+ "label": "Reveal Label",
350
+ "tier": "presentation",
351
+ "type": "string"
352
+ },
353
+ "scenarios": {
354
+ "default": [
355
+ {
356
+ "correctIndex": 1.0,
357
+ "explanation": "With no limiting factor yet, growth compounds each season.",
358
+ "frames": [
359
+ {
360
+ "caption": "Season 1: 40 rabbits",
361
+ "value": 40.0
362
+ },
363
+ {
364
+ "caption": "Season 2: 52 rabbits",
365
+ "value": 52.0
366
+ },
367
+ {
368
+ "caption": "Season 3: 68 rabbits",
369
+ "value": 68.0
370
+ },
371
+ {
372
+ "caption": "Season 4: 88 rabbits",
373
+ "value": 88.0
374
+ },
375
+ {
376
+ "caption": "Season 5: 114 rabbits",
377
+ "value": 114.0
378
+ },
379
+ {
380
+ "caption": "Season 6: 148 rabbits — still accelerating",
381
+ "value": 148.0
382
+ }
383
+ ],
384
+ "options": [
385
+ "It levels off",
386
+ "It keeps accelerating",
387
+ "It collapses"
388
+ ],
389
+ "question": "What happens to the population over the next six seasons?",
390
+ "setup": "A small island hosts 40 rabbits with unlimited grass and no predators."
391
+ },
392
+ {
393
+ "correctIndex": 1.0,
394
+ "explanation": "Predation and food limits impose a carrying capacity.",
395
+ "frames": [
396
+ {
397
+ "caption": "Season 1: 148 rabbits",
398
+ "value": 148.0
399
+ },
400
+ {
401
+ "caption": "Season 2: 160 rabbits",
402
+ "value": 160.0
403
+ },
404
+ {
405
+ "caption": "Season 3: 166 rabbits",
406
+ "value": 166.0
407
+ },
408
+ {
409
+ "caption": "Season 4: 169 rabbits",
410
+ "value": 169.0
411
+ },
412
+ {
413
+ "caption": "Season 5: 170 rabbits — the curve flattens",
414
+ "value": 170.0
415
+ }
416
+ ],
417
+ "options": [
418
+ "It keeps accelerating",
419
+ "It levels off near a ceiling",
420
+ "It grows linearly"
421
+ ],
422
+ "question": "What happens to the rabbit population now?",
423
+ "setup": "The same island now has foxes, and grass is running short."
424
+ }
425
+ ],
426
+ "description": "The scenario roster; each carries a setup, the question, the offered predictions with the correct index, an explanation, and the reveal frames (caption + value) that play out after the learner commits. Realizations declare their own subject's scenarios here.",
427
+ "items": {
428
+ "properties": {
429
+ "correctIndex": {
430
+ "name": "correctIndex",
431
+ "required": true,
432
+ "type": "number"
433
+ },
434
+ "explanation": {
435
+ "name": "explanation",
436
+ "required": false,
437
+ "type": "string"
438
+ },
439
+ "frames": {
440
+ "items": {
441
+ "properties": {
442
+ "caption": {
443
+ "name": "caption",
444
+ "required": true,
445
+ "type": "string"
446
+ },
447
+ "value": {
448
+ "name": "value",
449
+ "required": true,
450
+ "type": "number"
451
+ }
452
+ },
453
+ "type": "object"
454
+ },
455
+ "name": "frames",
456
+ "required": true,
457
+ "type": "array"
458
+ },
459
+ "options": {
460
+ "items": {
461
+ "type": "string"
462
+ },
463
+ "name": "options",
464
+ "required": true,
465
+ "type": "array"
466
+ },
467
+ "question": {
468
+ "name": "question",
469
+ "required": true,
470
+ "type": "string"
471
+ },
472
+ "setup": {
473
+ "name": "setup",
474
+ "required": true,
475
+ "type": "string"
476
+ }
477
+ },
478
+ "type": "object"
479
+ },
480
+ "label": "Scenarios",
481
+ "tier": "domain",
482
+ "type": "[PredictScenario]"
483
+ },
484
+ "title": {
485
+ "default": "Predict, Then Watch",
486
+ "description": "Title shown above the instrument.",
487
+ "label": "Title",
488
+ "tier": "presentation",
489
+ "type": "string"
490
+ },
491
+ "valueMax": {
492
+ "default": 200.0,
493
+ "description": "Upper bound of the reveal chart's y axis.",
494
+ "label": "Value Max",
495
+ "tier": "presentation",
496
+ "type": "number"
497
+ },
498
+ "valueMin": {
499
+ "default": 0.0,
500
+ "description": "Lower bound of the reveal chart's y axis.",
501
+ "label": "Value Min",
502
+ "tier": "presentation",
503
+ "type": "number"
504
+ },
505
+ "width": {
506
+ "default": 600.0,
507
+ "label": "Width",
508
+ "tier": "presentation",
509
+ "type": "number"
510
+ }
511
+ },
512
+ "emits": [
513
+ {
514
+ "description": "The learner locked in a prediction and the reveal started — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.",
515
+ "event": "PREDICTION_COMMITTED",
516
+ "eventId": "evt_01M07581DK3BMS4NQMBX9GPF6P",
517
+ "payloadSchema": [
518
+ {
519
+ "name": "scenarioIndex",
520
+ "type": "number"
521
+ },
522
+ {
523
+ "name": "chosenIndex",
524
+ "type": "number"
525
+ }
526
+ ],
527
+ "scope": "external",
528
+ "synonyms": "predict then reveal, commit prediction, hypothesis first, what happens next",
529
+ "tier": "domain"
530
+ },
531
+ {
532
+ "description": "The learner moved to the next scenario (or completed the round) with the running score.",
533
+ "event": "SCENARIO_ADVANCED",
534
+ "eventId": "evt_01M07581DK8Z46NF7E08ERAV8D",
535
+ "payloadSchema": [
536
+ {
537
+ "name": "scenarioIndex",
538
+ "type": "number"
539
+ },
540
+ {
541
+ "name": "done",
542
+ "type": "boolean"
543
+ },
544
+ {
545
+ "name": "score",
546
+ "type": "number"
547
+ }
548
+ ],
549
+ "scope": "external",
550
+ "tier": "domain"
551
+ },
552
+ {
553
+ "description": "The learner restarted the round from scratch.",
554
+ "event": "ROUND_RESTARTED",
555
+ "eventId": "evt_01M07581DKW5A39N3R3EK7KKVC",
556
+ "payloadSchema": [
557
+ {
558
+ "name": "totalScenarios",
559
+ "type": "number"
560
+ }
561
+ ],
562
+ "scope": "external",
563
+ "tier": "domain"
564
+ }
565
+ ],
566
+ "entityContract": {
567
+ "provides": [
568
+ "active",
569
+ "chosenIndex",
570
+ "correctIndex",
571
+ "done",
572
+ "explanation",
573
+ "feedback",
574
+ "frameCaption",
575
+ "frameIndex",
576
+ "frameValue",
577
+ "frames",
578
+ "options",
579
+ "phase",
580
+ "question",
581
+ "revealCurves",
582
+ "revealSamples",
583
+ "scenarioIndex",
584
+ "score",
585
+ "setupText",
586
+ "title",
587
+ "totalScenarios",
588
+ "view"
589
+ ],
590
+ "requires": []
591
+ },
592
+ "entityRebindable": true,
593
+ "entityRefIds": {
594
+ "PredictScene": "ent_01M07581DDCZ4MRG2K2AJF4BS3"
595
+ },
596
+ "id": "trt_01M07581DD9V8TRJYWFKW9AG1R",
597
+ "linkedEntity": "PredictScene",
598
+ "linkedEntityId": "ent_01M07581DDCZ4MRG2K2AJF4BS3",
599
+ "name": "PredictSim",
600
+ "scope": "instance",
601
+ "stateMachine": {
602
+ "events": [
603
+ {
604
+ "id": "evt_01M07581DDEAH9VG9CYTH1VJE7",
605
+ "key": "INIT",
606
+ "name": "Initialize"
607
+ },
608
+ {
609
+ "description": "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.",
610
+ "id": "evt_01M07581DK61J8ARTARPY4MNHW",
611
+ "key": "MODE_SELECTED",
612
+ "name": "Mode Selected",
613
+ "payloadSchema": [
614
+ {
615
+ "name": "mode",
616
+ "type": "string"
617
+ }
618
+ ],
619
+ "tier": "domain"
620
+ },
621
+ {
622
+ "description": "Learner committed to one of the predicted outcomes before seeing the reveal — index is the chosen option; the reveal then plays out.",
623
+ "id": "evt_01M07581DK0R8SSN52WKWDRM7M",
624
+ "key": "PREDICT",
625
+ "name": "Predict",
626
+ "payloadSchema": [
627
+ {
628
+ "name": "index",
629
+ "type": "number"
630
+ }
631
+ ],
632
+ "tier": "domain"
633
+ },
634
+ {
635
+ "description": "Learner advanced to the next scenario after the reveal was judged; past the last scenario this completes the round.",
636
+ "id": "evt_01M07581DKAWQ3CMSKKE9EDM3W",
637
+ "key": "NEXT",
638
+ "name": "Next",
639
+ "tier": "domain"
640
+ },
641
+ {
642
+ "description": "Learner restarted the round from the first scenario with a cleared score.",
643
+ "id": "evt_01M07581DK3DHDF4K5T5R30B5M",
644
+ "key": "RETRY",
645
+ "name": "Retry",
646
+ "tier": "domain"
647
+ },
648
+ {
649
+ "description": "The learner locked in a prediction and the reveal started — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.",
650
+ "id": "evt_01M07581DK3BMS4NQMBX9GPF6P",
651
+ "key": "PREDICTION_COMMITTED",
652
+ "name": "Prediction Committed",
653
+ "payloadSchema": [
654
+ {
655
+ "name": "scenarioIndex",
656
+ "type": "number"
657
+ },
658
+ {
659
+ "name": "chosenIndex",
660
+ "type": "number"
661
+ }
662
+ ],
663
+ "synonyms": "predict then reveal, commit prediction, hypothesis first, what happens next",
664
+ "tier": "domain"
665
+ },
666
+ {
667
+ "description": "The learner moved to the next scenario (or completed the round) with the running score.",
668
+ "id": "evt_01M07581DK8Z46NF7E08ERAV8D",
669
+ "key": "SCENARIO_ADVANCED",
670
+ "name": "Scenario Advanced",
671
+ "payloadSchema": [
672
+ {
673
+ "name": "scenarioIndex",
674
+ "type": "number"
675
+ },
676
+ {
677
+ "name": "done",
678
+ "type": "boolean"
679
+ },
680
+ {
681
+ "name": "score",
682
+ "type": "number"
683
+ }
684
+ ],
685
+ "tier": "domain"
686
+ },
687
+ {
688
+ "description": "The learner restarted the round from scratch.",
689
+ "id": "evt_01M07581DKW5A39N3R3EK7KKVC",
690
+ "key": "ROUND_RESTARTED",
691
+ "name": "Round Restarted",
692
+ "payloadSchema": [
693
+ {
694
+ "name": "totalScenarios",
695
+ "type": "number"
696
+ }
697
+ ],
698
+ "tier": "domain"
699
+ }
700
+ ],
701
+ "states": [
702
+ {
703
+ "isInitial": true,
704
+ "name": "idle"
705
+ }
706
+ ],
707
+ "transitions": [
708
+ {
709
+ "effects": [
710
+ [
711
+ "let",
712
+ [
713
+ [
714
+ "first",
715
+ [
716
+ "array/nth",
717
+ "@config.scenarios",
718
+ 0.0
719
+ ]
720
+ ]
721
+ ],
722
+ [
723
+ "do",
724
+ [
725
+ "set",
726
+ "@entity.active",
727
+ true
728
+ ],
729
+ [
730
+ "set",
731
+ "@entity.title",
732
+ "@config.title"
733
+ ],
734
+ [
735
+ "set",
736
+ "@entity.scenarioIndex",
737
+ 0.0
738
+ ],
739
+ [
740
+ "set",
741
+ "@entity.totalScenarios",
742
+ [
743
+ "array/len",
744
+ "@config.scenarios"
745
+ ]
746
+ ],
747
+ [
748
+ "set",
749
+ "@entity.phase",
750
+ "commit"
751
+ ],
752
+ [
753
+ "set",
754
+ "@entity.chosenIndex",
755
+ 0.0
756
+ ],
757
+ [
758
+ "set",
759
+ "@entity.frames",
760
+ [
761
+ "object/get",
762
+ "@first",
763
+ "frames"
764
+ ]
765
+ ],
766
+ [
767
+ "set",
768
+ "@entity.frameIndex",
769
+ 0.0
770
+ ],
771
+ [
772
+ "set",
773
+ "@entity.frameCaption",
774
+ ""
775
+ ],
776
+ [
777
+ "set",
778
+ "@entity.frameValue",
779
+ 0.0
780
+ ],
781
+ [
782
+ "set",
783
+ "@entity.revealSamples",
784
+ []
785
+ ],
786
+ [
787
+ "set",
788
+ "@entity.revealCurves",
789
+ []
790
+ ],
791
+ [
792
+ "set",
793
+ "@entity.score",
794
+ 0.0
795
+ ],
796
+ [
797
+ "set",
798
+ "@entity.done",
799
+ false
800
+ ],
801
+ [
802
+ "set",
803
+ "@entity.setupText",
804
+ [
805
+ "object/get",
806
+ "@first",
807
+ "setup"
808
+ ]
809
+ ],
810
+ [
811
+ "set",
812
+ "@entity.question",
813
+ [
814
+ "object/get",
815
+ "@first",
816
+ "question"
817
+ ]
818
+ ],
819
+ [
820
+ "set",
821
+ "@entity.options",
822
+ [
823
+ "object/get",
824
+ "@first",
825
+ "options"
826
+ ]
827
+ ],
828
+ [
829
+ "set",
830
+ "@entity.correctIndex",
831
+ [
832
+ "object/get",
833
+ "@first",
834
+ "correctIndex"
835
+ ]
836
+ ],
837
+ [
838
+ "set",
839
+ "@entity.explanation",
840
+ [
841
+ "object/get",
842
+ "@first",
843
+ "explanation",
844
+ ""
845
+ ]
846
+ ],
847
+ [
848
+ "set",
849
+ "@entity.feedback",
850
+ ""
851
+ ],
852
+ [
853
+ "set",
854
+ "@entity.view",
855
+ [
856
+ {
857
+ "children": [
858
+ {
859
+ "content": "@entity.setupText",
860
+ "type": "typography",
861
+ "variant": "body"
862
+ },
863
+ {
864
+ "content": "@entity.question",
865
+ "type": "typography",
866
+ "variant": "h4"
867
+ }
868
+ ],
869
+ "padding": "md",
870
+ "type": "card",
871
+ "variant": "bordered"
872
+ }
873
+ ]
874
+ ]
875
+ ]
876
+ ],
877
+ [
878
+ "render-ui",
879
+ "main",
880
+ {
881
+ "children": [
882
+ {
883
+ "children": [
884
+ {
885
+ "content": "@entity.title",
886
+ "type": "typography",
887
+ "variant": "h4"
888
+ },
889
+ {
890
+ "label": [
891
+ "str/concat",
892
+ "Scenario ",
893
+ [
894
+ "str/concat",
895
+ "",
896
+ [
897
+ "+",
898
+ "@entity.scenarioIndex",
899
+ 1.0
900
+ ]
901
+ ],
902
+ " of ",
903
+ [
904
+ "str/concat",
905
+ "",
906
+ "@entity.totalScenarios"
907
+ ]
908
+ ],
909
+ "max": "@entity.totalScenarios",
910
+ "showPercentage": false,
911
+ "type": "progress-bar",
912
+ "value": [
913
+ "+",
914
+ "@entity.scenarioIndex",
915
+ 1.0
916
+ ]
917
+ },
918
+ {
919
+ "children": "@entity.view",
920
+ "direction": "vertical",
921
+ "gap": "md",
922
+ "type": "stack"
923
+ },
924
+ {
925
+ "children": [
926
+ "array/map",
927
+ [
928
+ "array/range",
929
+ 0.0,
930
+ [
931
+ "array/len",
932
+ "@entity.options"
933
+ ]
934
+ ],
935
+ [
936
+ "fn",
937
+ [
938
+ "i"
939
+ ],
940
+ {
941
+ "action": "PREDICT",
942
+ "actionPayload": {
943
+ "index": "@i"
944
+ },
945
+ "disabled": [
946
+ "if",
947
+ [
948
+ "==",
949
+ "@entity.phase",
950
+ "commit"
951
+ ],
952
+ false,
953
+ true
954
+ ],
955
+ "label": [
956
+ "array/nth",
957
+ "@entity.options",
958
+ "@i"
959
+ ],
960
+ "size": "sm",
961
+ "type": "button",
962
+ "variant": [
963
+ "if",
964
+ [
965
+ "and",
966
+ [
967
+ "!=",
968
+ "@entity.phase",
969
+ "commit"
970
+ ],
971
+ [
972
+ "==",
973
+ "@entity.chosenIndex",
974
+ "@i"
975
+ ]
976
+ ],
977
+ "primary",
978
+ "secondary"
979
+ ]
980
+ }
981
+ ]
982
+ ],
983
+ "direction": "horizontal",
984
+ "gap": "xs",
985
+ "type": "stack"
986
+ },
987
+ {
988
+ "animate": false,
989
+ "curves": "@entity.revealCurves",
990
+ "gridStep": "@config.gridStep",
991
+ "height": "@config.height",
992
+ "interactive": false,
993
+ "points": [],
994
+ "shapes": [],
995
+ "showAxes": true,
996
+ "showGrid": true,
997
+ "title": "",
998
+ "type": "math-canvas",
999
+ "vectors": [],
1000
+ "width": "@config.width",
1001
+ "xMax": [
1002
+ "math/max",
1003
+ 1.0,
1004
+ [
1005
+ "-",
1006
+ [
1007
+ "array/len",
1008
+ "@entity.frames"
1009
+ ],
1010
+ 1.0
1011
+ ]
1012
+ ],
1013
+ "xMin": 0.0,
1014
+ "yMax": "@config.valueMax",
1015
+ "yMin": "@config.valueMin"
1016
+ },
1017
+ {
1018
+ "content": "@entity.frameCaption",
1019
+ "type": "typography",
1020
+ "variant": "body"
1021
+ },
1022
+ {
1023
+ "content": "@entity.feedback",
1024
+ "type": "typography",
1025
+ "variant": "caption"
1026
+ },
1027
+ {
1028
+ "children": [
1029
+ {
1030
+ "action": "NEXT",
1031
+ "disabled": [
1032
+ "if",
1033
+ [
1034
+ "and",
1035
+ [
1036
+ "==",
1037
+ "@entity.phase",
1038
+ "judged"
1039
+ ],
1040
+ [
1041
+ "==",
1042
+ "@entity.done",
1043
+ false
1044
+ ]
1045
+ ],
1046
+ false,
1047
+ true
1048
+ ],
1049
+ "label": "@config.nextLabel",
1050
+ "type": "button",
1051
+ "variant": "primary"
1052
+ },
1053
+ {
1054
+ "action": "RETRY",
1055
+ "disabled": [
1056
+ "if",
1057
+ "@entity.done",
1058
+ false,
1059
+ true
1060
+ ],
1061
+ "label": "@config.retryLabel",
1062
+ "type": "button",
1063
+ "variant": "ghost"
1064
+ }
1065
+ ],
1066
+ "direction": "horizontal",
1067
+ "gap": "sm",
1068
+ "type": "stack"
1069
+ },
1070
+ {
1071
+ "label": "Correct predictions",
1072
+ "max": "@entity.totalScenarios",
1073
+ "type": "stat-display",
1074
+ "value": "@entity.score"
1075
+ }
1076
+ ],
1077
+ "direction": "vertical",
1078
+ "gap": "md",
1079
+ "type": "stack"
1080
+ }
1081
+ ],
1082
+ "padding": "md",
1083
+ "type": "box"
1084
+ }
1085
+ ]
1086
+ ],
1087
+ "event": "INIT",
1088
+ "eventId": "evt_01M07581DDEAH9VG9CYTH1VJE7",
1089
+ "from": "idle",
1090
+ "guard": [
1091
+ "==",
1092
+ "@config.matchMode",
1093
+ ""
1094
+ ],
1095
+ "to": "idle"
1096
+ },
1097
+ {
1098
+ "effects": [
1099
+ [
1100
+ "let",
1101
+ [
1102
+ [
1103
+ "first",
1104
+ [
1105
+ "array/nth",
1106
+ "@config.scenarios",
1107
+ 0.0
1108
+ ]
1109
+ ]
1110
+ ],
1111
+ [
1112
+ "do",
1113
+ [
1114
+ "set",
1115
+ "@entity.active",
1116
+ true
1117
+ ],
1118
+ [
1119
+ "set",
1120
+ "@entity.title",
1121
+ "@config.title"
1122
+ ],
1123
+ [
1124
+ "set",
1125
+ "@entity.scenarioIndex",
1126
+ 0.0
1127
+ ],
1128
+ [
1129
+ "set",
1130
+ "@entity.totalScenarios",
1131
+ [
1132
+ "array/len",
1133
+ "@config.scenarios"
1134
+ ]
1135
+ ],
1136
+ [
1137
+ "set",
1138
+ "@entity.phase",
1139
+ "commit"
1140
+ ],
1141
+ [
1142
+ "set",
1143
+ "@entity.chosenIndex",
1144
+ 0.0
1145
+ ],
1146
+ [
1147
+ "set",
1148
+ "@entity.frames",
1149
+ [
1150
+ "object/get",
1151
+ "@first",
1152
+ "frames"
1153
+ ]
1154
+ ],
1155
+ [
1156
+ "set",
1157
+ "@entity.frameIndex",
1158
+ 0.0
1159
+ ],
1160
+ [
1161
+ "set",
1162
+ "@entity.frameCaption",
1163
+ ""
1164
+ ],
1165
+ [
1166
+ "set",
1167
+ "@entity.frameValue",
1168
+ 0.0
1169
+ ],
1170
+ [
1171
+ "set",
1172
+ "@entity.revealSamples",
1173
+ []
1174
+ ],
1175
+ [
1176
+ "set",
1177
+ "@entity.revealCurves",
1178
+ []
1179
+ ],
1180
+ [
1181
+ "set",
1182
+ "@entity.score",
1183
+ 0.0
1184
+ ],
1185
+ [
1186
+ "set",
1187
+ "@entity.done",
1188
+ false
1189
+ ],
1190
+ [
1191
+ "set",
1192
+ "@entity.setupText",
1193
+ [
1194
+ "object/get",
1195
+ "@first",
1196
+ "setup"
1197
+ ]
1198
+ ],
1199
+ [
1200
+ "set",
1201
+ "@entity.question",
1202
+ [
1203
+ "object/get",
1204
+ "@first",
1205
+ "question"
1206
+ ]
1207
+ ],
1208
+ [
1209
+ "set",
1210
+ "@entity.options",
1211
+ [
1212
+ "object/get",
1213
+ "@first",
1214
+ "options"
1215
+ ]
1216
+ ],
1217
+ [
1218
+ "set",
1219
+ "@entity.correctIndex",
1220
+ [
1221
+ "object/get",
1222
+ "@first",
1223
+ "correctIndex"
1224
+ ]
1225
+ ],
1226
+ [
1227
+ "set",
1228
+ "@entity.explanation",
1229
+ [
1230
+ "object/get",
1231
+ "@first",
1232
+ "explanation",
1233
+ ""
1234
+ ]
1235
+ ],
1236
+ [
1237
+ "set",
1238
+ "@entity.feedback",
1239
+ ""
1240
+ ],
1241
+ [
1242
+ "set",
1243
+ "@entity.view",
1244
+ [
1245
+ {
1246
+ "children": [
1247
+ {
1248
+ "content": "@entity.setupText",
1249
+ "type": "typography",
1250
+ "variant": "body"
1251
+ },
1252
+ {
1253
+ "content": "@entity.question",
1254
+ "type": "typography",
1255
+ "variant": "h4"
1256
+ }
1257
+ ],
1258
+ "padding": "md",
1259
+ "type": "card",
1260
+ "variant": "bordered"
1261
+ }
1262
+ ]
1263
+ ]
1264
+ ]
1265
+ ],
1266
+ [
1267
+ "render-ui",
1268
+ "main",
1269
+ {
1270
+ "children": [
1271
+ {
1272
+ "children": [
1273
+ {
1274
+ "content": "@entity.title",
1275
+ "type": "typography",
1276
+ "variant": "h4"
1277
+ },
1278
+ {
1279
+ "label": [
1280
+ "str/concat",
1281
+ "Scenario ",
1282
+ [
1283
+ "str/concat",
1284
+ "",
1285
+ [
1286
+ "+",
1287
+ "@entity.scenarioIndex",
1288
+ 1.0
1289
+ ]
1290
+ ],
1291
+ " of ",
1292
+ [
1293
+ "str/concat",
1294
+ "",
1295
+ "@entity.totalScenarios"
1296
+ ]
1297
+ ],
1298
+ "max": "@entity.totalScenarios",
1299
+ "showPercentage": false,
1300
+ "type": "progress-bar",
1301
+ "value": [
1302
+ "+",
1303
+ "@entity.scenarioIndex",
1304
+ 1.0
1305
+ ]
1306
+ },
1307
+ {
1308
+ "children": "@entity.view",
1309
+ "direction": "vertical",
1310
+ "gap": "md",
1311
+ "type": "stack"
1312
+ },
1313
+ {
1314
+ "children": [
1315
+ "array/map",
1316
+ [
1317
+ "array/range",
1318
+ 0.0,
1319
+ [
1320
+ "array/len",
1321
+ "@entity.options"
1322
+ ]
1323
+ ],
1324
+ [
1325
+ "fn",
1326
+ [
1327
+ "i"
1328
+ ],
1329
+ {
1330
+ "action": "PREDICT",
1331
+ "actionPayload": {
1332
+ "index": "@i"
1333
+ },
1334
+ "disabled": [
1335
+ "if",
1336
+ [
1337
+ "==",
1338
+ "@entity.phase",
1339
+ "commit"
1340
+ ],
1341
+ false,
1342
+ true
1343
+ ],
1344
+ "label": [
1345
+ "array/nth",
1346
+ "@entity.options",
1347
+ "@i"
1348
+ ],
1349
+ "size": "sm",
1350
+ "type": "button",
1351
+ "variant": [
1352
+ "if",
1353
+ [
1354
+ "and",
1355
+ [
1356
+ "!=",
1357
+ "@entity.phase",
1358
+ "commit"
1359
+ ],
1360
+ [
1361
+ "==",
1362
+ "@entity.chosenIndex",
1363
+ "@i"
1364
+ ]
1365
+ ],
1366
+ "primary",
1367
+ "secondary"
1368
+ ]
1369
+ }
1370
+ ]
1371
+ ],
1372
+ "direction": "horizontal",
1373
+ "gap": "xs",
1374
+ "type": "stack"
1375
+ },
1376
+ {
1377
+ "animate": false,
1378
+ "curves": "@entity.revealCurves",
1379
+ "gridStep": "@config.gridStep",
1380
+ "height": "@config.height",
1381
+ "interactive": false,
1382
+ "points": [],
1383
+ "shapes": [],
1384
+ "showAxes": true,
1385
+ "showGrid": true,
1386
+ "title": "",
1387
+ "type": "math-canvas",
1388
+ "vectors": [],
1389
+ "width": "@config.width",
1390
+ "xMax": [
1391
+ "math/max",
1392
+ 1.0,
1393
+ [
1394
+ "-",
1395
+ [
1396
+ "array/len",
1397
+ "@entity.frames"
1398
+ ],
1399
+ 1.0
1400
+ ]
1401
+ ],
1402
+ "xMin": 0.0,
1403
+ "yMax": "@config.valueMax",
1404
+ "yMin": "@config.valueMin"
1405
+ },
1406
+ {
1407
+ "content": "@entity.frameCaption",
1408
+ "type": "typography",
1409
+ "variant": "body"
1410
+ },
1411
+ {
1412
+ "content": "@entity.feedback",
1413
+ "type": "typography",
1414
+ "variant": "caption"
1415
+ },
1416
+ {
1417
+ "children": [
1418
+ {
1419
+ "action": "NEXT",
1420
+ "disabled": [
1421
+ "if",
1422
+ [
1423
+ "and",
1424
+ [
1425
+ "==",
1426
+ "@entity.phase",
1427
+ "judged"
1428
+ ],
1429
+ [
1430
+ "==",
1431
+ "@entity.done",
1432
+ false
1433
+ ]
1434
+ ],
1435
+ false,
1436
+ true
1437
+ ],
1438
+ "label": "@config.nextLabel",
1439
+ "type": "button",
1440
+ "variant": "primary"
1441
+ },
1442
+ {
1443
+ "action": "RETRY",
1444
+ "disabled": [
1445
+ "if",
1446
+ "@entity.done",
1447
+ false,
1448
+ true
1449
+ ],
1450
+ "label": "@config.retryLabel",
1451
+ "type": "button",
1452
+ "variant": "ghost"
1453
+ }
1454
+ ],
1455
+ "direction": "horizontal",
1456
+ "gap": "sm",
1457
+ "type": "stack"
1458
+ },
1459
+ {
1460
+ "label": "Correct predictions",
1461
+ "max": "@entity.totalScenarios",
1462
+ "type": "stat-display",
1463
+ "value": "@entity.score"
1464
+ }
1465
+ ],
1466
+ "direction": "vertical",
1467
+ "gap": "md",
1468
+ "type": "stack"
1469
+ }
1470
+ ],
1471
+ "padding": "md",
1472
+ "type": "box"
1473
+ }
1474
+ ]
1475
+ ],
1476
+ "event": "MODE_SELECTED",
1477
+ "eventId": "evt_01M07581DK61J8ARTARPY4MNHW",
1478
+ "from": "idle",
1479
+ "guard": [
1480
+ "==",
1481
+ "@payload.mode",
1482
+ "@config.matchMode"
1483
+ ],
1484
+ "to": "idle"
1485
+ },
1486
+ {
1487
+ "effects": [
1488
+ [
1489
+ "let",
1490
+ [
1491
+ [
1492
+ "frame0",
1493
+ [
1494
+ "array/nth",
1495
+ "@entity.frames",
1496
+ 0.0
1497
+ ]
1498
+ ]
1499
+ ],
1500
+ [
1501
+ "do",
1502
+ [
1503
+ "set",
1504
+ "@entity.chosenIndex",
1505
+ "@payload.index"
1506
+ ],
1507
+ [
1508
+ "set",
1509
+ "@entity.phase",
1510
+ "reveal"
1511
+ ],
1512
+ [
1513
+ "set",
1514
+ "@entity.frameIndex",
1515
+ 0.0
1516
+ ],
1517
+ [
1518
+ "set",
1519
+ "@entity.frameCaption",
1520
+ [
1521
+ "object/get",
1522
+ "@frame0",
1523
+ "caption"
1524
+ ]
1525
+ ],
1526
+ [
1527
+ "set",
1528
+ "@entity.frameValue",
1529
+ [
1530
+ "object/get",
1531
+ "@frame0",
1532
+ "value"
1533
+ ]
1534
+ ],
1535
+ [
1536
+ "set",
1537
+ "@entity.revealSamples",
1538
+ [
1539
+ {
1540
+ "x": 0.0,
1541
+ "y": [
1542
+ "object/get",
1543
+ "@frame0",
1544
+ "value"
1545
+ ]
1546
+ }
1547
+ ]
1548
+ ],
1549
+ [
1550
+ "set",
1551
+ "@entity.revealCurves",
1552
+ [
1553
+ {
1554
+ "color": "@config.revealColor",
1555
+ "label": "@config.revealLabel",
1556
+ "samples": "@entity.revealSamples"
1557
+ }
1558
+ ]
1559
+ ],
1560
+ [
1561
+ "set",
1562
+ "@entity.feedback",
1563
+ [
1564
+ "str/concat",
1565
+ "Prediction locked: ",
1566
+ [
1567
+ "array/nth",
1568
+ "@entity.options",
1569
+ "@payload.index"
1570
+ ],
1571
+ " — watch what happens."
1572
+ ]
1573
+ ]
1574
+ ]
1575
+ ],
1576
+ [
1577
+ "emit",
1578
+ "PREDICTION_COMMITTED",
1579
+ {
1580
+ "chosenIndex": "@entity.chosenIndex",
1581
+ "scenarioIndex": "@entity.scenarioIndex"
1582
+ }
1583
+ ]
1584
+ ],
1585
+ "event": "PREDICT",
1586
+ "eventId": "evt_01M07581DK0R8SSN52WKWDRM7M",
1587
+ "from": "idle",
1588
+ "guard": [
1589
+ "and",
1590
+ [
1591
+ "==",
1592
+ "@entity.active",
1593
+ true
1594
+ ],
1595
+ [
1596
+ "and",
1597
+ [
1598
+ "==",
1599
+ "@entity.phase",
1600
+ "commit"
1601
+ ],
1602
+ [
1603
+ "==",
1604
+ "@entity.done",
1605
+ false
1606
+ ]
1607
+ ]
1608
+ ],
1609
+ "to": "idle"
1610
+ },
1611
+ {
1612
+ "effects": [
1613
+ [
1614
+ "let",
1615
+ [
1616
+ [
1617
+ "nextIndex",
1618
+ [
1619
+ "+",
1620
+ "@entity.scenarioIndex",
1621
+ 1.0
1622
+ ]
1623
+ ],
1624
+ [
1625
+ "finished",
1626
+ [
1627
+ ">=",
1628
+ "@nextIndex",
1629
+ [
1630
+ "array/len",
1631
+ "@config.scenarios"
1632
+ ]
1633
+ ]
1634
+ ],
1635
+ [
1636
+ "next",
1637
+ [
1638
+ "array/nth",
1639
+ "@config.scenarios",
1640
+ [
1641
+ "math/min",
1642
+ "@nextIndex",
1643
+ [
1644
+ "-",
1645
+ [
1646
+ "array/len",
1647
+ "@config.scenarios"
1648
+ ],
1649
+ 1.0
1650
+ ]
1651
+ ]
1652
+ ]
1653
+ ]
1654
+ ],
1655
+ [
1656
+ "do",
1657
+ [
1658
+ "set",
1659
+ "@entity.scenarioIndex",
1660
+ [
1661
+ "if",
1662
+ "@finished",
1663
+ "@entity.scenarioIndex",
1664
+ "@nextIndex"
1665
+ ]
1666
+ ],
1667
+ [
1668
+ "set",
1669
+ "@entity.done",
1670
+ [
1671
+ "if",
1672
+ "@finished",
1673
+ true,
1674
+ false
1675
+ ]
1676
+ ],
1677
+ [
1678
+ "set",
1679
+ "@entity.phase",
1680
+ [
1681
+ "if",
1682
+ "@finished",
1683
+ "judged",
1684
+ "commit"
1685
+ ]
1686
+ ],
1687
+ [
1688
+ "set",
1689
+ "@entity.chosenIndex",
1690
+ 0.0
1691
+ ],
1692
+ [
1693
+ "set",
1694
+ "@entity.frames",
1695
+ [
1696
+ "if",
1697
+ "@finished",
1698
+ "@entity.frames",
1699
+ [
1700
+ "object/get",
1701
+ "@next",
1702
+ "frames"
1703
+ ]
1704
+ ]
1705
+ ],
1706
+ [
1707
+ "set",
1708
+ "@entity.frameIndex",
1709
+ 0.0
1710
+ ],
1711
+ [
1712
+ "set",
1713
+ "@entity.frameCaption",
1714
+ ""
1715
+ ],
1716
+ [
1717
+ "set",
1718
+ "@entity.frameValue",
1719
+ 0.0
1720
+ ],
1721
+ [
1722
+ "set",
1723
+ "@entity.revealSamples",
1724
+ []
1725
+ ],
1726
+ [
1727
+ "set",
1728
+ "@entity.revealCurves",
1729
+ []
1730
+ ],
1731
+ [
1732
+ "set",
1733
+ "@entity.setupText",
1734
+ [
1735
+ "if",
1736
+ "@finished",
1737
+ "@entity.setupText",
1738
+ [
1739
+ "object/get",
1740
+ "@next",
1741
+ "setup"
1742
+ ]
1743
+ ]
1744
+ ],
1745
+ [
1746
+ "set",
1747
+ "@entity.question",
1748
+ [
1749
+ "if",
1750
+ "@finished",
1751
+ "@entity.question",
1752
+ [
1753
+ "object/get",
1754
+ "@next",
1755
+ "question"
1756
+ ]
1757
+ ]
1758
+ ],
1759
+ [
1760
+ "set",
1761
+ "@entity.options",
1762
+ [
1763
+ "if",
1764
+ "@finished",
1765
+ [],
1766
+ [
1767
+ "object/get",
1768
+ "@next",
1769
+ "options"
1770
+ ]
1771
+ ]
1772
+ ],
1773
+ [
1774
+ "set",
1775
+ "@entity.correctIndex",
1776
+ [
1777
+ "if",
1778
+ "@finished",
1779
+ "@entity.correctIndex",
1780
+ [
1781
+ "object/get",
1782
+ "@next",
1783
+ "correctIndex"
1784
+ ]
1785
+ ]
1786
+ ],
1787
+ [
1788
+ "set",
1789
+ "@entity.explanation",
1790
+ [
1791
+ "if",
1792
+ "@finished",
1793
+ "@entity.explanation",
1794
+ [
1795
+ "object/get",
1796
+ "@next",
1797
+ "explanation",
1798
+ ""
1799
+ ]
1800
+ ]
1801
+ ],
1802
+ [
1803
+ "set",
1804
+ "@entity.feedback",
1805
+ [
1806
+ "if",
1807
+ "@finished",
1808
+ [
1809
+ "str/concat",
1810
+ "Round complete — ",
1811
+ [
1812
+ "str/concat",
1813
+ "",
1814
+ "@entity.score"
1815
+ ],
1816
+ " of ",
1817
+ [
1818
+ "str/concat",
1819
+ "",
1820
+ "@entity.totalScenarios"
1821
+ ],
1822
+ " predictions correct."
1823
+ ],
1824
+ ""
1825
+ ]
1826
+ ],
1827
+ [
1828
+ "set",
1829
+ "@entity.view",
1830
+ [
1831
+ "if",
1832
+ "@finished",
1833
+ [
1834
+ {
1835
+ "content": "Round Complete",
1836
+ "type": "typography",
1837
+ "variant": "h4"
1838
+ },
1839
+ {
1840
+ "label": "Correct predictions",
1841
+ "max": "@entity.totalScenarios",
1842
+ "type": "stat-display",
1843
+ "value": "@entity.score"
1844
+ }
1845
+ ],
1846
+ [
1847
+ {
1848
+ "children": [
1849
+ {
1850
+ "content": "@entity.setupText",
1851
+ "type": "typography",
1852
+ "variant": "body"
1853
+ },
1854
+ {
1855
+ "content": "@entity.question",
1856
+ "type": "typography",
1857
+ "variant": "h4"
1858
+ }
1859
+ ],
1860
+ "padding": "md",
1861
+ "type": "card",
1862
+ "variant": "bordered"
1863
+ }
1864
+ ]
1865
+ ]
1866
+ ]
1867
+ ]
1868
+ ],
1869
+ [
1870
+ "render-ui",
1871
+ "main",
1872
+ {
1873
+ "children": [
1874
+ {
1875
+ "children": [
1876
+ {
1877
+ "content": "@entity.title",
1878
+ "type": "typography",
1879
+ "variant": "h4"
1880
+ },
1881
+ {
1882
+ "label": [
1883
+ "str/concat",
1884
+ "Scenario ",
1885
+ [
1886
+ "str/concat",
1887
+ "",
1888
+ [
1889
+ "+",
1890
+ "@entity.scenarioIndex",
1891
+ 1.0
1892
+ ]
1893
+ ],
1894
+ " of ",
1895
+ [
1896
+ "str/concat",
1897
+ "",
1898
+ "@entity.totalScenarios"
1899
+ ]
1900
+ ],
1901
+ "max": "@entity.totalScenarios",
1902
+ "showPercentage": false,
1903
+ "type": "progress-bar",
1904
+ "value": [
1905
+ "+",
1906
+ "@entity.scenarioIndex",
1907
+ 1.0
1908
+ ]
1909
+ },
1910
+ {
1911
+ "children": "@entity.view",
1912
+ "direction": "vertical",
1913
+ "gap": "md",
1914
+ "type": "stack"
1915
+ },
1916
+ {
1917
+ "children": [
1918
+ "array/map",
1919
+ [
1920
+ "array/range",
1921
+ 0.0,
1922
+ [
1923
+ "array/len",
1924
+ "@entity.options"
1925
+ ]
1926
+ ],
1927
+ [
1928
+ "fn",
1929
+ [
1930
+ "i"
1931
+ ],
1932
+ {
1933
+ "action": "PREDICT",
1934
+ "actionPayload": {
1935
+ "index": "@i"
1936
+ },
1937
+ "disabled": [
1938
+ "if",
1939
+ [
1940
+ "==",
1941
+ "@entity.phase",
1942
+ "commit"
1943
+ ],
1944
+ false,
1945
+ true
1946
+ ],
1947
+ "label": [
1948
+ "array/nth",
1949
+ "@entity.options",
1950
+ "@i"
1951
+ ],
1952
+ "size": "sm",
1953
+ "type": "button",
1954
+ "variant": [
1955
+ "if",
1956
+ [
1957
+ "and",
1958
+ [
1959
+ "!=",
1960
+ "@entity.phase",
1961
+ "commit"
1962
+ ],
1963
+ [
1964
+ "==",
1965
+ "@entity.chosenIndex",
1966
+ "@i"
1967
+ ]
1968
+ ],
1969
+ "primary",
1970
+ "secondary"
1971
+ ]
1972
+ }
1973
+ ]
1974
+ ],
1975
+ "direction": "horizontal",
1976
+ "gap": "xs",
1977
+ "type": "stack"
1978
+ },
1979
+ {
1980
+ "animate": false,
1981
+ "curves": "@entity.revealCurves",
1982
+ "gridStep": "@config.gridStep",
1983
+ "height": "@config.height",
1984
+ "interactive": false,
1985
+ "points": [],
1986
+ "shapes": [],
1987
+ "showAxes": true,
1988
+ "showGrid": true,
1989
+ "title": "",
1990
+ "type": "math-canvas",
1991
+ "vectors": [],
1992
+ "width": "@config.width",
1993
+ "xMax": [
1994
+ "math/max",
1995
+ 1.0,
1996
+ [
1997
+ "-",
1998
+ [
1999
+ "array/len",
2000
+ "@entity.frames"
2001
+ ],
2002
+ 1.0
2003
+ ]
2004
+ ],
2005
+ "xMin": 0.0,
2006
+ "yMax": "@config.valueMax",
2007
+ "yMin": "@config.valueMin"
2008
+ },
2009
+ {
2010
+ "content": "@entity.frameCaption",
2011
+ "type": "typography",
2012
+ "variant": "body"
2013
+ },
2014
+ {
2015
+ "content": "@entity.feedback",
2016
+ "type": "typography",
2017
+ "variant": "caption"
2018
+ },
2019
+ {
2020
+ "children": [
2021
+ {
2022
+ "action": "NEXT",
2023
+ "disabled": [
2024
+ "if",
2025
+ [
2026
+ "and",
2027
+ [
2028
+ "==",
2029
+ "@entity.phase",
2030
+ "judged"
2031
+ ],
2032
+ [
2033
+ "==",
2034
+ "@entity.done",
2035
+ false
2036
+ ]
2037
+ ],
2038
+ false,
2039
+ true
2040
+ ],
2041
+ "label": "@config.nextLabel",
2042
+ "type": "button",
2043
+ "variant": "primary"
2044
+ },
2045
+ {
2046
+ "action": "RETRY",
2047
+ "disabled": [
2048
+ "if",
2049
+ "@entity.done",
2050
+ false,
2051
+ true
2052
+ ],
2053
+ "label": "@config.retryLabel",
2054
+ "type": "button",
2055
+ "variant": "ghost"
2056
+ }
2057
+ ],
2058
+ "direction": "horizontal",
2059
+ "gap": "sm",
2060
+ "type": "stack"
2061
+ },
2062
+ {
2063
+ "label": "Correct predictions",
2064
+ "max": "@entity.totalScenarios",
2065
+ "type": "stat-display",
2066
+ "value": "@entity.score"
2067
+ }
2068
+ ],
2069
+ "direction": "vertical",
2070
+ "gap": "md",
2071
+ "type": "stack"
2072
+ }
2073
+ ],
2074
+ "padding": "md",
2075
+ "type": "box"
2076
+ }
2077
+ ],
2078
+ [
2079
+ "emit",
2080
+ "SCENARIO_ADVANCED",
2081
+ {
2082
+ "done": "@entity.done",
2083
+ "scenarioIndex": "@entity.scenarioIndex",
2084
+ "score": "@entity.score"
2085
+ }
2086
+ ]
2087
+ ],
2088
+ "event": "NEXT",
2089
+ "eventId": "evt_01M07581DKAWQ3CMSKKE9EDM3W",
2090
+ "from": "idle",
2091
+ "guard": [
2092
+ "and",
2093
+ [
2094
+ "==",
2095
+ "@entity.active",
2096
+ true
2097
+ ],
2098
+ [
2099
+ "and",
2100
+ [
2101
+ "==",
2102
+ "@entity.phase",
2103
+ "judged"
2104
+ ],
2105
+ [
2106
+ "==",
2107
+ "@entity.done",
2108
+ false
2109
+ ]
2110
+ ]
2111
+ ],
2112
+ "to": "idle"
2113
+ },
2114
+ {
2115
+ "effects": [
2116
+ [
2117
+ "let",
2118
+ [
2119
+ [
2120
+ "first",
2121
+ [
2122
+ "array/nth",
2123
+ "@config.scenarios",
2124
+ 0.0
2125
+ ]
2126
+ ]
2127
+ ],
2128
+ [
2129
+ "do",
2130
+ [
2131
+ "set",
2132
+ "@entity.scenarioIndex",
2133
+ 0.0
2134
+ ],
2135
+ [
2136
+ "set",
2137
+ "@entity.phase",
2138
+ "commit"
2139
+ ],
2140
+ [
2141
+ "set",
2142
+ "@entity.chosenIndex",
2143
+ 0.0
2144
+ ],
2145
+ [
2146
+ "set",
2147
+ "@entity.frames",
2148
+ [
2149
+ "object/get",
2150
+ "@first",
2151
+ "frames"
2152
+ ]
2153
+ ],
2154
+ [
2155
+ "set",
2156
+ "@entity.frameIndex",
2157
+ 0.0
2158
+ ],
2159
+ [
2160
+ "set",
2161
+ "@entity.frameCaption",
2162
+ ""
2163
+ ],
2164
+ [
2165
+ "set",
2166
+ "@entity.frameValue",
2167
+ 0.0
2168
+ ],
2169
+ [
2170
+ "set",
2171
+ "@entity.revealSamples",
2172
+ []
2173
+ ],
2174
+ [
2175
+ "set",
2176
+ "@entity.revealCurves",
2177
+ []
2178
+ ],
2179
+ [
2180
+ "set",
2181
+ "@entity.score",
2182
+ 0.0
2183
+ ],
2184
+ [
2185
+ "set",
2186
+ "@entity.done",
2187
+ false
2188
+ ],
2189
+ [
2190
+ "set",
2191
+ "@entity.setupText",
2192
+ [
2193
+ "object/get",
2194
+ "@first",
2195
+ "setup"
2196
+ ]
2197
+ ],
2198
+ [
2199
+ "set",
2200
+ "@entity.question",
2201
+ [
2202
+ "object/get",
2203
+ "@first",
2204
+ "question"
2205
+ ]
2206
+ ],
2207
+ [
2208
+ "set",
2209
+ "@entity.options",
2210
+ [
2211
+ "object/get",
2212
+ "@first",
2213
+ "options"
2214
+ ]
2215
+ ],
2216
+ [
2217
+ "set",
2218
+ "@entity.correctIndex",
2219
+ [
2220
+ "object/get",
2221
+ "@first",
2222
+ "correctIndex"
2223
+ ]
2224
+ ],
2225
+ [
2226
+ "set",
2227
+ "@entity.explanation",
2228
+ [
2229
+ "object/get",
2230
+ "@first",
2231
+ "explanation",
2232
+ ""
2233
+ ]
2234
+ ],
2235
+ [
2236
+ "set",
2237
+ "@entity.feedback",
2238
+ ""
2239
+ ],
2240
+ [
2241
+ "set",
2242
+ "@entity.view",
2243
+ [
2244
+ {
2245
+ "children": [
2246
+ {
2247
+ "content": "@entity.setupText",
2248
+ "type": "typography",
2249
+ "variant": "body"
2250
+ },
2251
+ {
2252
+ "content": "@entity.question",
2253
+ "type": "typography",
2254
+ "variant": "h4"
2255
+ }
2256
+ ],
2257
+ "padding": "md",
2258
+ "type": "card",
2259
+ "variant": "bordered"
2260
+ }
2261
+ ]
2262
+ ]
2263
+ ]
2264
+ ],
2265
+ [
2266
+ "render-ui",
2267
+ "main",
2268
+ {
2269
+ "children": [
2270
+ {
2271
+ "children": [
2272
+ {
2273
+ "content": "@entity.title",
2274
+ "type": "typography",
2275
+ "variant": "h4"
2276
+ },
2277
+ {
2278
+ "label": [
2279
+ "str/concat",
2280
+ "Scenario ",
2281
+ [
2282
+ "str/concat",
2283
+ "",
2284
+ [
2285
+ "+",
2286
+ "@entity.scenarioIndex",
2287
+ 1.0
2288
+ ]
2289
+ ],
2290
+ " of ",
2291
+ [
2292
+ "str/concat",
2293
+ "",
2294
+ "@entity.totalScenarios"
2295
+ ]
2296
+ ],
2297
+ "max": "@entity.totalScenarios",
2298
+ "showPercentage": false,
2299
+ "type": "progress-bar",
2300
+ "value": [
2301
+ "+",
2302
+ "@entity.scenarioIndex",
2303
+ 1.0
2304
+ ]
2305
+ },
2306
+ {
2307
+ "children": "@entity.view",
2308
+ "direction": "vertical",
2309
+ "gap": "md",
2310
+ "type": "stack"
2311
+ },
2312
+ {
2313
+ "children": [
2314
+ "array/map",
2315
+ [
2316
+ "array/range",
2317
+ 0.0,
2318
+ [
2319
+ "array/len",
2320
+ "@entity.options"
2321
+ ]
2322
+ ],
2323
+ [
2324
+ "fn",
2325
+ [
2326
+ "i"
2327
+ ],
2328
+ {
2329
+ "action": "PREDICT",
2330
+ "actionPayload": {
2331
+ "index": "@i"
2332
+ },
2333
+ "disabled": [
2334
+ "if",
2335
+ [
2336
+ "==",
2337
+ "@entity.phase",
2338
+ "commit"
2339
+ ],
2340
+ false,
2341
+ true
2342
+ ],
2343
+ "label": [
2344
+ "array/nth",
2345
+ "@entity.options",
2346
+ "@i"
2347
+ ],
2348
+ "size": "sm",
2349
+ "type": "button",
2350
+ "variant": [
2351
+ "if",
2352
+ [
2353
+ "and",
2354
+ [
2355
+ "!=",
2356
+ "@entity.phase",
2357
+ "commit"
2358
+ ],
2359
+ [
2360
+ "==",
2361
+ "@entity.chosenIndex",
2362
+ "@i"
2363
+ ]
2364
+ ],
2365
+ "primary",
2366
+ "secondary"
2367
+ ]
2368
+ }
2369
+ ]
2370
+ ],
2371
+ "direction": "horizontal",
2372
+ "gap": "xs",
2373
+ "type": "stack"
2374
+ },
2375
+ {
2376
+ "animate": false,
2377
+ "curves": "@entity.revealCurves",
2378
+ "gridStep": "@config.gridStep",
2379
+ "height": "@config.height",
2380
+ "interactive": false,
2381
+ "points": [],
2382
+ "shapes": [],
2383
+ "showAxes": true,
2384
+ "showGrid": true,
2385
+ "title": "",
2386
+ "type": "math-canvas",
2387
+ "vectors": [],
2388
+ "width": "@config.width",
2389
+ "xMax": [
2390
+ "math/max",
2391
+ 1.0,
2392
+ [
2393
+ "-",
2394
+ [
2395
+ "array/len",
2396
+ "@entity.frames"
2397
+ ],
2398
+ 1.0
2399
+ ]
2400
+ ],
2401
+ "xMin": 0.0,
2402
+ "yMax": "@config.valueMax",
2403
+ "yMin": "@config.valueMin"
2404
+ },
2405
+ {
2406
+ "content": "@entity.frameCaption",
2407
+ "type": "typography",
2408
+ "variant": "body"
2409
+ },
2410
+ {
2411
+ "content": "@entity.feedback",
2412
+ "type": "typography",
2413
+ "variant": "caption"
2414
+ },
2415
+ {
2416
+ "children": [
2417
+ {
2418
+ "action": "NEXT",
2419
+ "disabled": [
2420
+ "if",
2421
+ [
2422
+ "and",
2423
+ [
2424
+ "==",
2425
+ "@entity.phase",
2426
+ "judged"
2427
+ ],
2428
+ [
2429
+ "==",
2430
+ "@entity.done",
2431
+ false
2432
+ ]
2433
+ ],
2434
+ false,
2435
+ true
2436
+ ],
2437
+ "label": "@config.nextLabel",
2438
+ "type": "button",
2439
+ "variant": "primary"
2440
+ },
2441
+ {
2442
+ "action": "RETRY",
2443
+ "disabled": [
2444
+ "if",
2445
+ "@entity.done",
2446
+ false,
2447
+ true
2448
+ ],
2449
+ "label": "@config.retryLabel",
2450
+ "type": "button",
2451
+ "variant": "ghost"
2452
+ }
2453
+ ],
2454
+ "direction": "horizontal",
2455
+ "gap": "sm",
2456
+ "type": "stack"
2457
+ },
2458
+ {
2459
+ "label": "Correct predictions",
2460
+ "max": "@entity.totalScenarios",
2461
+ "type": "stat-display",
2462
+ "value": "@entity.score"
2463
+ }
2464
+ ],
2465
+ "direction": "vertical",
2466
+ "gap": "md",
2467
+ "type": "stack"
2468
+ }
2469
+ ],
2470
+ "padding": "md",
2471
+ "type": "box"
2472
+ }
2473
+ ],
2474
+ [
2475
+ "emit",
2476
+ "ROUND_RESTARTED",
2477
+ {
2478
+ "totalScenarios": "@entity.totalScenarios"
2479
+ }
2480
+ ]
2481
+ ],
2482
+ "event": "RETRY",
2483
+ "eventId": "evt_01M07581DK3DHDF4K5T5R30B5M",
2484
+ "from": "idle",
2485
+ "guard": [
2486
+ "and",
2487
+ [
2488
+ "==",
2489
+ "@entity.active",
2490
+ true
2491
+ ],
2492
+ [
2493
+ "==",
2494
+ "@entity.done",
2495
+ true
2496
+ ]
2497
+ ],
2498
+ "to": "idle"
2499
+ }
2500
+ ]
2501
+ },
2502
+ "ticks": [
2503
+ {
2504
+ "effects": [
2505
+ [
2506
+ "set",
2507
+ "@entity.frameIndex",
2508
+ [
2509
+ "math/min",
2510
+ [
2511
+ "+",
2512
+ "@entity.frameIndex",
2513
+ 1.0
2514
+ ],
2515
+ [
2516
+ "-",
2517
+ [
2518
+ "array/len",
2519
+ "@entity.frames"
2520
+ ],
2521
+ 1.0
2522
+ ]
2523
+ ]
2524
+ ],
2525
+ [
2526
+ "set",
2527
+ "@entity.frameCaption",
2528
+ [
2529
+ "object/get",
2530
+ [
2531
+ "array/nth",
2532
+ "@entity.frames",
2533
+ "@entity.frameIndex"
2534
+ ],
2535
+ "caption"
2536
+ ]
2537
+ ],
2538
+ [
2539
+ "set",
2540
+ "@entity.frameValue",
2541
+ [
2542
+ "object/get",
2543
+ [
2544
+ "array/nth",
2545
+ "@entity.frames",
2546
+ "@entity.frameIndex"
2547
+ ],
2548
+ "value"
2549
+ ]
2550
+ ],
2551
+ [
2552
+ "set",
2553
+ "@entity.revealSamples",
2554
+ [
2555
+ "array/append",
2556
+ "@entity.revealSamples",
2557
+ {
2558
+ "x": "@entity.frameIndex",
2559
+ "y": "@entity.frameValue"
2560
+ }
2561
+ ]
2562
+ ],
2563
+ [
2564
+ "set",
2565
+ "@entity.revealCurves",
2566
+ [
2567
+ {
2568
+ "color": "@config.revealColor",
2569
+ "label": "@config.revealLabel",
2570
+ "samples": "@entity.revealSamples"
2571
+ }
2572
+ ]
2573
+ ],
2574
+ [
2575
+ "set",
2576
+ "@entity.phase",
2577
+ [
2578
+ "if",
2579
+ [
2580
+ ">=",
2581
+ "@entity.frameIndex",
2582
+ [
2583
+ "-",
2584
+ [
2585
+ "array/len",
2586
+ "@entity.frames"
2587
+ ],
2588
+ 1.0
2589
+ ]
2590
+ ],
2591
+ "judged",
2592
+ "@entity.phase"
2593
+ ]
2594
+ ],
2595
+ [
2596
+ "set",
2597
+ "@entity.score",
2598
+ [
2599
+ "if",
2600
+ [
2601
+ "and",
2602
+ [
2603
+ "==",
2604
+ "@entity.phase",
2605
+ "judged"
2606
+ ],
2607
+ [
2608
+ "==",
2609
+ "@entity.chosenIndex",
2610
+ "@entity.correctIndex"
2611
+ ]
2612
+ ],
2613
+ [
2614
+ "+",
2615
+ "@entity.score",
2616
+ 1.0
2617
+ ],
2618
+ "@entity.score"
2619
+ ]
2620
+ ],
2621
+ [
2622
+ "set",
2623
+ "@entity.feedback",
2624
+ [
2625
+ "if",
2626
+ [
2627
+ "==",
2628
+ "@entity.phase",
2629
+ "judged"
2630
+ ],
2631
+ [
2632
+ "if",
2633
+ [
2634
+ "==",
2635
+ "@entity.chosenIndex",
2636
+ "@entity.correctIndex"
2637
+ ],
2638
+ [
2639
+ "str/concat",
2640
+ "Your prediction was right. ",
2641
+ "@entity.explanation"
2642
+ ],
2643
+ [
2644
+ "str/concat",
2645
+ "Not this time — the outcome was: ",
2646
+ [
2647
+ "array/nth",
2648
+ "@entity.options",
2649
+ "@entity.correctIndex"
2650
+ ],
2651
+ ". ",
2652
+ "@entity.explanation"
2653
+ ]
2654
+ ],
2655
+ "@entity.feedback"
2656
+ ]
2657
+ ]
2658
+ ],
2659
+ "guard": [
2660
+ "and",
2661
+ [
2662
+ "==",
2663
+ "@entity.active",
2664
+ true
2665
+ ],
2666
+ [
2667
+ "==",
2668
+ "@entity.phase",
2669
+ "reveal"
2670
+ ]
2671
+ ],
2672
+ "interval": 600.0,
2673
+ "name": "revealTick"
2674
+ }
2675
+ ]
2676
+ }
2677
+ ]
2678
+ }
2679
+ ],
2680
+ "schemaVersion": 1,
2681
+ "version": "1.0.0"
2682
+ }