cuju-render 0.1.0__py3-none-any.whl

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 (382) hide show
  1. cuju/render/__init__.py +759 -0
  2. cuju/render/__main__.py +1065 -0
  3. cuju/render/_export/__init__.py +3 -0
  4. cuju/render/_export/feed.py +542 -0
  5. cuju/render/_export/sizes.py +157 -0
  6. cuju/render/_export/video.py +1618 -0
  7. cuju/render/_export/video_jobs.py +408 -0
  8. cuju/render/_format/__init__.py +3 -0
  9. cuju/render/_format/annotations.py +235 -0
  10. cuju/render/_format/codec.py +307 -0
  11. cuju/render/_format/keep.py +121 -0
  12. cuju/render/_format/recording.py +860 -0
  13. cuju/render/_format/writer.py +54 -0
  14. cuju/render/_guide/__init__.py +3 -0
  15. cuju/render/_guide/doctor.py +523 -0
  16. cuju/render/_guide/help.py +62 -0
  17. cuju/render/_guide/tutorial.py +254 -0
  18. cuju/render/_http/__init__.py +3 -0
  19. cuju/render/_http/commands.py +57 -0
  20. cuju/render/_http/headers.py +103 -0
  21. cuju/render/_http/launch.py +500 -0
  22. cuju/render/_http/launchers.py +408 -0
  23. cuju/render/_http/pwa.py +128 -0
  24. cuju/render/_http/server.py +2105 -0
  25. cuju/render/_http/window.py +360 -0
  26. cuju/render/_moments/__init__.py +3 -0
  27. cuju/render/_moments/captions.py +284 -0
  28. cuju/render/_moments/events.py +1123 -0
  29. cuju/render/_moments/search.py +694 -0
  30. cuju/render/_packages/__init__.py +3 -0
  31. cuju/render/_packages/glsl.py +746 -0
  32. cuju/render/_packages/loudness.py +334 -0
  33. cuju/render/_packages/pack.py +1959 -0
  34. cuju/render/_packages/presentation.py +1376 -0
  35. cuju/render/_packages/vocabulary.py +609 -0
  36. cuju/render/_playing/__init__.py +3 -0
  37. cuju/render/_playing/achievements.py +463 -0
  38. cuju/render/_playing/bench.py +609 -0
  39. cuju/render/_playing/challenges.py +1813 -0
  40. cuju/render/_playing/demo.py +323 -0
  41. cuju/render/_playing/draw.py +211 -0
  42. cuju/render/_playing/errors.py +20 -0
  43. cuju/render/_playing/game.py +645 -0
  44. cuju/render/_playing/limits.py +339 -0
  45. cuju/render/_playing/play.py +926 -0
  46. cuju/render/_playing/policy_worker.py +250 -0
  47. cuju/render/_playing/strict.py +810 -0
  48. cuju/render/_registry/__init__.py +3 -0
  49. cuju/render/_registry/clips.py +394 -0
  50. cuju/render/_registry/joints.py +108 -0
  51. cuju/render/_registry/teams.py +2058 -0
  52. cuju/render/_store/__init__.py +3 -0
  53. cuju/render/_store/home.py +70 -0
  54. cuju/render/_store/library.py +604 -0
  55. cuju/render/_store/samples.py +163 -0
  56. cuju/render/_text/__init__.py +3 -0
  57. cuju/render/_text/languages.py +637 -0
  58. cuju/render/_text/messages.py +1396 -0
  59. cuju/render/_tournaments/__init__.py +3 -0
  60. cuju/render/_tournaments/results.py +547 -0
  61. cuju/render/_tournaments/tournament.py +2742 -0
  62. cuju/render/_tournaments/tournament_cli.py +587 -0
  63. cuju/render/_tournaments/tournament_runner.py +1975 -0
  64. cuju/render/_version.py +6 -0
  65. cuju/render/_watch/__init__.py +3 -0
  66. cuju/render/_watch/grid.py +265 -0
  67. cuju/render/_watch/live.py +664 -0
  68. cuju/render/_watch/notebook.py +79 -0
  69. cuju/render/_watch/show.py +171 -0
  70. cuju/render/samples/sample-11v11.cjr +0 -0
  71. cuju/render/samples/sample-5v5.cjr +0 -0
  72. cuju/render/samples/teams/starter/main.py +33 -0
  73. cuju/render/scenarios/benchmark_full_game_11_vs_11_easy.py +46 -0
  74. cuju/render/scenarios/benchmark_full_game_11_vs_11_hard.py +46 -0
  75. cuju/render/scenarios/benchmark_full_game_11_vs_11_medium.py +46 -0
  76. cuju/render/scenarios/benchmark_full_game_5_vs_5_easy.py +34 -0
  77. cuju/render/scenarios/benchmark_full_game_5_vs_5_hard.py +34 -0
  78. cuju/render/scenarios/benchmark_full_game_5_vs_5_medium.py +34 -0
  79. cuju/render/web/assets/adboard_polygon.webp +0 -0
  80. cuju/render/web/assets/adboard_your_ad_here.webp +0 -0
  81. cuju/render/web/assets/animations/kaykit-rig-medium-combatmelee.glb +0 -0
  82. cuju/render/web/assets/animations/kaykit-rig-medium-general.glb +0 -0
  83. cuju/render/web/assets/animations/kaykit-rig-medium-movementadvanced.glb +0 -0
  84. cuju/render/web/assets/animations/kaykit-rig-medium-movementbasic.glb +0 -0
  85. cuju/render/web/assets/animations/kaykit-rig-medium-simulation.glb +0 -0
  86. cuju/render/web/assets/animations/kaykit-rig-medium-special.glb +0 -0
  87. cuju/render/web/assets/ball.glb +0 -0
  88. cuju/render/web/assets/challenges/3_vs_1_with_keeper.mp4 +0 -0
  89. cuju/render/web/assets/challenges/3_vs_1_with_keeper.webp +0 -0
  90. cuju/render/web/assets/challenges/corner.mp4 +0 -0
  91. cuju/render/web/assets/challenges/corner.webp +0 -0
  92. cuju/render/web/assets/challenges/counterattack_easy.mp4 +0 -0
  93. cuju/render/web/assets/challenges/counterattack_easy.webp +0 -0
  94. cuju/render/web/assets/challenges/counterattack_hard.mp4 +0 -0
  95. cuju/render/web/assets/challenges/counterattack_hard.webp +0 -0
  96. cuju/render/web/assets/challenges/empty_goal.mp4 +0 -0
  97. cuju/render/web/assets/challenges/empty_goal.webp +0 -0
  98. cuju/render/web/assets/challenges/empty_goal_close.mp4 +0 -0
  99. cuju/render/web/assets/challenges/empty_goal_close.webp +0 -0
  100. cuju/render/web/assets/challenges/manifest.json +375 -0
  101. cuju/render/web/assets/challenges/one_on_one.mp4 +0 -0
  102. cuju/render/web/assets/challenges/one_on_one.webp +0 -0
  103. cuju/render/web/assets/challenges/one_on_one_hard.mp4 +0 -0
  104. cuju/render/web/assets/challenges/one_on_one_hard.webp +0 -0
  105. cuju/render/web/assets/challenges/pass_and_shoot_with_keeper.mp4 +0 -0
  106. cuju/render/web/assets/challenges/pass_and_shoot_with_keeper.webp +0 -0
  107. cuju/render/web/assets/challenges/run_pass_and_shoot_with_keeper.mp4 +0 -0
  108. cuju/render/web/assets/challenges/run_pass_and_shoot_with_keeper.webp +0 -0
  109. cuju/render/web/assets/challenges/run_to_score.mp4 +0 -0
  110. cuju/render/web/assets/challenges/run_to_score.webp +0 -0
  111. cuju/render/web/assets/challenges/run_to_score_with_keeper.mp4 +0 -0
  112. cuju/render/web/assets/challenges/run_to_score_with_keeper.webp +0 -0
  113. cuju/render/web/assets/challenges/single_goal_versus_lazy.mp4 +0 -0
  114. cuju/render/web/assets/challenges/single_goal_versus_lazy.webp +0 -0
  115. cuju/render/web/assets/crowd.webp +0 -0
  116. cuju/render/web/assets/crowd_normal.webp +0 -0
  117. cuju/render/web/assets/cuju-logo-384.png +0 -0
  118. cuju/render/web/assets/cuju-logo.png +0 -0
  119. cuju/render/web/assets/cuju-logo.svg +46 -0
  120. cuju/render/web/assets/cuju-mark-light.svg +33 -0
  121. cuju/render/web/assets/cuju-mark.svg +33 -0
  122. cuju/render/web/assets/goal.glb +0 -0
  123. cuju/render/web/assets/grass.webp +0 -0
  124. cuju/render/web/assets/hair_black.png +0 -0
  125. cuju/render/web/assets/hair_blonde.png +0 -0
  126. cuju/render/web/assets/hair_brown.png +0 -0
  127. cuju/render/web/assets/hair_darkblonde.png +0 -0
  128. cuju/render/web/assets/hair_long01.glb +0 -0
  129. cuju/render/web/assets/hair_long02.glb +0 -0
  130. cuju/render/web/assets/hair_medium01.glb +0 -0
  131. cuju/render/web/assets/hair_red.png +0 -0
  132. cuju/render/web/assets/hair_short01.glb +0 -0
  133. cuju/render/web/assets/hair_short02.glb +0 -0
  134. cuju/render/web/assets/icons/cuju-192.png +0 -0
  135. cuju/render/web/assets/icons/cuju-512.png +0 -0
  136. cuju/render/web/assets/icons/cuju-maskable-512.png +0 -0
  137. cuju/render/web/assets/kit_goalkeeper.webp +0 -0
  138. cuju/render/web/assets/kit_mask.png +0 -0
  139. cuju/render/web/assets/kit_normal.webp +0 -0
  140. cuju/render/web/assets/manifest.json +601 -0
  141. cuju/render/web/assets/models/kaykit-barbarian.glb +0 -0
  142. cuju/render/web/assets/models/kaykit-barbarian.json +23 -0
  143. cuju/render/web/assets/models/kaykit-knight.glb +0 -0
  144. cuju/render/web/assets/models/kaykit-knight.json +23 -0
  145. cuju/render/web/assets/models/kaykit-mage.glb +0 -0
  146. cuju/render/web/assets/models/kaykit-mage.json +23 -0
  147. cuju/render/web/assets/models/kaykit-mannequin-medium.glb +0 -0
  148. cuju/render/web/assets/models/kaykit-mannequin-medium.json +23 -0
  149. cuju/render/web/assets/models/kaykit-ranger.glb +0 -0
  150. cuju/render/web/assets/models/kaykit-ranger.json +23 -0
  151. cuju/render/web/assets/models/kaykit-rogue-hooded.glb +0 -0
  152. cuju/render/web/assets/models/kaykit-rogue-hooded.json +23 -0
  153. cuju/render/web/assets/models/kaykit-rogue.glb +0 -0
  154. cuju/render/web/assets/models/kaykit-rogue.json +23 -0
  155. cuju/render/web/assets/models/kaykit-skeleton-mage.glb +0 -0
  156. cuju/render/web/assets/models/kaykit-skeleton-mage.json +23 -0
  157. cuju/render/web/assets/models/kaykit-skeleton-minion.glb +0 -0
  158. cuju/render/web/assets/models/kaykit-skeleton-minion.json +23 -0
  159. cuju/render/web/assets/models/kaykit-skeleton-rogue.glb +0 -0
  160. cuju/render/web/assets/models/kaykit-skeleton-rogue.json +23 -0
  161. cuju/render/web/assets/models/kaykit-skeleton-warrior.glb +0 -0
  162. cuju/render/web/assets/models/kaykit-skeleton-warrior.json +23 -0
  163. cuju/render/web/assets/pitch.webp +0 -0
  164. cuju/render/web/assets/pitch_normal.webp +0 -0
  165. cuju/render/web/assets/player.glb +0 -0
  166. cuju/render/web/assets/shoe.webp +0 -0
  167. cuju/render/web/assets/shoe_sole.png +0 -0
  168. cuju/render/web/assets/skin_01.png +0 -0
  169. cuju/render/web/assets/skin_02.png +0 -0
  170. cuju/render/web/assets/skin_03.png +0 -0
  171. cuju/render/web/assets/skin_04.png +0 -0
  172. cuju/render/web/assets/sounds/applause.ogg +0 -0
  173. cuju/render/web/assets/sounds/beach-wave-1.ogg +0 -0
  174. cuju/render/web/assets/sounds/beach-wave-2.ogg +0 -0
  175. cuju/render/web/assets/sounds/beach-wave-3.ogg +0 -0
  176. cuju/render/web/assets/sounds/beach-wave-4.ogg +0 -0
  177. cuju/render/web/assets/sounds/city-horn.ogg +0 -0
  178. cuju/render/web/assets/sounds/city-loop.ogg +0 -0
  179. cuju/render/web/assets/sounds/city-siren.ogg +0 -0
  180. cuju/render/web/assets/sounds/crowd-cheer.ogg +0 -0
  181. cuju/render/web/assets/sounds/crowd-loop.ogg +0 -0
  182. cuju/render/web/assets/sounds/crowd-ooh.ogg +0 -0
  183. cuju/render/web/assets/sounds/gulls.ogg +0 -0
  184. cuju/render/web/assets/sounds/neon-sting.ogg +0 -0
  185. cuju/render/web/assets/sounds/rain-loop.ogg +0 -0
  186. cuju/render/web/assets/sounds/sounds.json +46 -0
  187. cuju/render/web/assets/sounds/space-beep.ogg +0 -0
  188. cuju/render/web/assets/sounds/space-hum.ogg +0 -0
  189. cuju/render/web/assets/sounds/space-radio.ogg +0 -0
  190. cuju/render/web/assets/sounds/whistle-long.ogg +0 -0
  191. cuju/render/web/assets/sounds/whistle-short.ogg +0 -0
  192. cuju/render/web/assets/sounds/wind-loop.ogg +0 -0
  193. cuju/render/web/easy.css +357 -0
  194. cuju/render/web/export.html +23 -0
  195. cuju/render/web/feed.css +262 -0
  196. cuju/render/web/feed.html +28 -0
  197. cuju/render/web/flat.css +120 -0
  198. cuju/render/web/home.css +837 -0
  199. cuju/render/web/index.html +373 -0
  200. cuju/render/web/js/boot.js +50 -0
  201. cuju/render/web/js/broadcast/audio.js +2141 -0
  202. cuju/render/web/js/broadcast/celebrate.js +1238 -0
  203. cuju/render/web/js/broadcast/decisions.js +609 -0
  204. cuju/render/web/js/broadcast/hud.js +352 -0
  205. cuju/render/web/js/broadcast/show.js +3614 -0
  206. cuju/render/web/js/broadcast/transition.js +2231 -0
  207. cuju/render/web/js/broadcast/voices.js +153 -0
  208. cuju/render/web/js/capture.js +101 -0
  209. cuju/render/web/js/core/accessibility.js +90 -0
  210. cuju/render/web/js/core/api.js +429 -0
  211. cuju/render/web/js/core/comfort.js +135 -0
  212. cuju/render/web/js/core/i18n.js +705 -0
  213. cuju/render/web/js/core/icons.js +167 -0
  214. cuju/render/web/js/core/input-settings.js +156 -0
  215. cuju/render/web/js/core/keys.js +277 -0
  216. cuju/render/web/js/core/language-ui.js +125 -0
  217. cuju/render/web/js/core/menu.js +853 -0
  218. cuju/render/web/js/core/names.js +113 -0
  219. cuju/render/web/js/core/page-structure.js +110 -0
  220. cuju/render/web/js/core/scenarios.js +109 -0
  221. cuju/render/web/js/core/spoilers.js +236 -0
  222. cuju/render/web/js/core/typeahead.js +38 -0
  223. cuju/render/web/js/export/dom-picture.js +330 -0
  224. cuju/render/web/js/export/export-host.js +97 -0
  225. cuju/render/web/js/export/feed-dialog.js +191 -0
  226. cuju/render/web/js/export/feed-params.js +266 -0
  227. cuju/render/web/js/export/feed.js +363 -0
  228. cuju/render/web/js/export/mp4-mux.js +295 -0
  229. cuju/render/web/js/export/photo-core.js +313 -0
  230. cuju/render/web/js/export/photo.js +1314 -0
  231. cuju/render/web/js/export/safe-frame.js +59 -0
  232. cuju/render/web/js/export/size-fields.js +103 -0
  233. cuju/render/web/js/export/sizes.js +178 -0
  234. cuju/render/web/js/export/video-boot.js +55 -0
  235. cuju/render/web/js/export/video-browser.js +325 -0
  236. cuju/render/web/js/export/video-export.js +417 -0
  237. cuju/render/web/js/export/video-plan.js +207 -0
  238. cuju/render/web/js/export/video-range.js +185 -0
  239. cuju/render/web/js/export/webm-mux.js +198 -0
  240. cuju/render/web/js/feed-boot.js +151 -0
  241. cuju/render/web/js/feed-frame.js +101 -0
  242. cuju/render/web/js/help/doctor.js +488 -0
  243. cuju/render/web/js/help/firstrun.js +379 -0
  244. cuju/render/web/js/help/help-center.js +438 -0
  245. cuju/render/web/js/help/install-offer.js +164 -0
  246. cuju/render/web/js/help/install-state.js +104 -0
  247. cuju/render/web/js/help/lessons-core.js +207 -0
  248. cuju/render/web/js/help/lessons.js +463 -0
  249. cuju/render/web/js/help/palette.js +584 -0
  250. cuju/render/web/js/help/pwa.js +257 -0
  251. cuju/render/web/js/help/tour-core.js +241 -0
  252. cuju/render/web/js/help/tour.js +461 -0
  253. cuju/render/web/js/main.js +2513 -0
  254. cuju/render/web/js/pages/draw.js +188 -0
  255. cuju/render/web/js/pages/fieldpage.js +530 -0
  256. cuju/render/web/js/pages/home.js +521 -0
  257. cuju/render/web/js/pages/matches.js +779 -0
  258. cuju/render/web/js/pages/moments-ui.js +359 -0
  259. cuju/render/web/js/pages/queue-filters.js +63 -0
  260. cuju/render/web/js/pages/recording-groups.js +80 -0
  261. cuju/render/web/js/pages/recordings.js +1069 -0
  262. cuju/render/web/js/play/bench.js +347 -0
  263. cuju/render/web/js/play/challenges.js +1302 -0
  264. cuju/render/web/js/play/medals.js +127 -0
  265. cuju/render/web/js/play/play.js +1953 -0
  266. cuju/render/web/js/play/teasers.js +196 -0
  267. cuju/render/web/js/play/touch.js +350 -0
  268. cuju/render/web/js/play/tournament-layout.js +487 -0
  269. cuju/render/web/js/play/tournament-results.js +441 -0
  270. cuju/render/web/js/play/tournament-strict.js +560 -0
  271. cuju/render/web/js/play/tournament.js +2585 -0
  272. cuju/render/web/js/players/animate.js +972 -0
  273. cuju/render/web/js/players/clips.js +224 -0
  274. cuju/render/web/js/players/kaykit.js +162 -0
  275. cuju/render/web/js/players/kits.js +676 -0
  276. cuju/render/web/js/players/number-patch.js +82 -0
  277. cuju/render/web/js/players/players.js +2694 -0
  278. cuju/render/web/js/players/recolor.js +893 -0
  279. cuju/render/web/js/players/retarget.js +325 -0
  280. cuju/render/web/js/players/rig-numbers.js +174 -0
  281. cuju/render/web/js/presentation/animator.js +231 -0
  282. cuju/render/web/js/presentation/assign.js +85 -0
  283. cuju/render/web/js/presentation/behaviors.js +440 -0
  284. cuju/render/web/js/presentation/budget.js +209 -0
  285. cuju/render/web/js/presentation/catalog.js +1674 -0
  286. cuju/render/web/js/presentation/clocks.js +72 -0
  287. cuju/render/web/js/presentation/commands.js +301 -0
  288. cuju/render/web/js/presentation/contract.js +240 -0
  289. cuju/render/web/js/presentation/effects.js +904 -0
  290. cuju/render/web/js/presentation/flash.js +605 -0
  291. cuju/render/web/js/presentation/freeze-worklet.js +22 -0
  292. cuju/render/web/js/presentation/glsl.js +464 -0
  293. cuju/render/web/js/presentation/host.js +323 -0
  294. cuju/render/web/js/presentation/index.js +2066 -0
  295. cuju/render/web/js/presentation/loudness-worklet.js +235 -0
  296. cuju/render/web/js/presentation/loudness.js +740 -0
  297. cuju/render/web/js/presentation/moments.js +536 -0
  298. cuju/render/web/js/presentation/post.js +327 -0
  299. cuju/render/web/js/presentation/preview.js +180 -0
  300. cuju/render/web/js/presentation/protocol.js +174 -0
  301. cuju/render/web/js/presentation/reach.js +158 -0
  302. cuju/render/web/js/presentation/rigging.js +130 -0
  303. cuju/render/web/js/presentation/sandbox.js +157 -0
  304. cuju/render/web/js/presentation/shaders.js +235 -0
  305. cuju/render/web/js/presentation/stage.js +402 -0
  306. cuju/render/web/js/presentation/teamaudio.js +722 -0
  307. cuju/render/web/js/presentation/tracks.js +197 -0
  308. cuju/render/web/js/presentation/values.js +81 -0
  309. cuju/render/web/js/recording/annotation-data.js +203 -0
  310. cuju/render/web/js/recording/captions.js +491 -0
  311. cuju/render/web/js/recording/codec.js +185 -0
  312. cuju/render/web/js/recording/decode-worker.js +70 -0
  313. cuju/render/web/js/recording/decode.js +94 -0
  314. cuju/render/web/js/recording/episodes.js +46 -0
  315. cuju/render/web/js/recording/format.js +461 -0
  316. cuju/render/web/js/recording/live.js +348 -0
  317. cuju/render/web/js/recording/moments-query.js +59 -0
  318. cuju/render/web/js/recording/moments.js +149 -0
  319. cuju/render/web/js/recording/pose.js +86 -0
  320. cuju/render/web/js/recording/timeline.js +275 -0
  321. cuju/render/web/js/teams/art.js +50 -0
  322. cuju/render/web/js/teams/clip-editor.js +293 -0
  323. cuju/render/web/js/teams/editor.js +1979 -0
  324. cuju/render/web/js/teams/library.js +344 -0
  325. cuju/render/web/js/teams/painter.js +633 -0
  326. cuju/render/web/js/teams/surprise-ui.js +195 -0
  327. cuju/render/web/js/teams/surprise.js +497 -0
  328. cuju/render/web/js/teams/team-check.js +127 -0
  329. cuju/render/web/js/watch/annotations.js +270 -0
  330. cuju/render/web/js/watch/flat.js +366 -0
  331. cuju/render/web/js/watch/grid.js +436 -0
  332. cuju/render/web/js/watch/pitch2d.js +289 -0
  333. cuju/render/web/js/watch/player-tools.js +192 -0
  334. cuju/render/web/js/watch/presets.js +201 -0
  335. cuju/render/web/js/world/arenas.js +997 -0
  336. cuju/render/web/js/world/ball.js +204 -0
  337. cuju/render/web/js/world/cameras.js +982 -0
  338. cuju/render/web/js/world/crowd.js +376 -0
  339. cuju/render/web/js/world/field.js +227 -0
  340. cuju/render/web/js/world/framing.js +145 -0
  341. cuju/render/web/js/world/occlusion.js +48 -0
  342. cuju/render/web/js/world/pitch.js +703 -0
  343. cuju/render/web/js/world/scene.js +395 -0
  344. cuju/render/web/js/world/sky.js +325 -0
  345. cuju/render/web/js/world/stadium.js +1262 -0
  346. cuju/render/web/js/world/vendor-sky.js +367 -0
  347. cuju/render/web/js/world/weather.js +264 -0
  348. cuju/render/web/languages/en.json +4750 -0
  349. cuju/render/web/lessons.json +137 -0
  350. cuju/render/web/manifest.webmanifest +23 -0
  351. cuju/render/web/style.css +8399 -0
  352. cuju/render/web/sw.js +235 -0
  353. cuju/render/web/vendor/fabric/LICENSE +16 -0
  354. cuju/render/web/vendor/fabric/fabric.min.mjs +1 -0
  355. cuju/render/web/vendor/lucide/LICENSE +43 -0
  356. cuju/render/web/vendor/lucide/icons.js +141 -0
  357. cuju/render/web/vendor/three/LICENSE +21 -0
  358. cuju/render/web/vendor/three/build/three.core.js +60586 -0
  359. cuju/render/web/vendor/three/build/three.module.js +19719 -0
  360. cuju/render/web/vendor/three/examples/jsm/loaders/GLTFLoader.js +4925 -0
  361. cuju/render/web/vendor/three/examples/jsm/postprocessing/EffectComposer.js +365 -0
  362. cuju/render/web/vendor/three/examples/jsm/postprocessing/MaskPass.js +195 -0
  363. cuju/render/web/vendor/three/examples/jsm/postprocessing/OutputPass.js +148 -0
  364. cuju/render/web/vendor/three/examples/jsm/postprocessing/Pass.js +191 -0
  365. cuju/render/web/vendor/three/examples/jsm/postprocessing/RenderPass.js +193 -0
  366. cuju/render/web/vendor/three/examples/jsm/postprocessing/ShaderPass.js +135 -0
  367. cuju/render/web/vendor/three/examples/jsm/postprocessing/UnrealBloomPass.js +541 -0
  368. cuju/render/web/vendor/three/examples/jsm/shaders/CopyShader.js +52 -0
  369. cuju/render/web/vendor/three/examples/jsm/shaders/LuminosityHighPassShader.js +68 -0
  370. cuju/render/web/vendor/three/examples/jsm/shaders/OutputShader.js +103 -0
  371. cuju/render/web/vendor/three/examples/jsm/utils/BufferGeometryUtils.js +1501 -0
  372. cuju/render/web/vendor/three/examples/jsm/utils/SkeletonUtils.js +496 -0
  373. cuju_render-0.1.0.dist-info/METADATA +116 -0
  374. cuju_render-0.1.0.dist-info/RECORD +382 -0
  375. cuju_render-0.1.0.dist-info/WHEEL +4 -0
  376. cuju_render-0.1.0.dist-info/licenses/LICENSE +202 -0
  377. cuju_render-0.1.0.dist-info/licenses/LICENSES/CC-BY-4.0.txt +396 -0
  378. cuju_render-0.1.0.dist-info/licenses/LICENSES/CC0-1.0.txt +127 -0
  379. cuju_render-0.1.0.dist-info/licenses/LICENSES/ISC.txt +16 -0
  380. cuju_render-0.1.0.dist-info/licenses/LICENSES/MIT.txt +24 -0
  381. cuju_render-0.1.0.dist-info/licenses/LICENSES/Unlicense.txt +13 -0
  382. cuju_render-0.1.0.dist-info/licenses/NOTICE +35 -0
@@ -0,0 +1,441 @@
1
+ // Copyright 2026 The cuju Authors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // The words and numbers of strict rules, the pre-flight check and a tournament's results, kept
5
+ // apart from the page so that Node tests read them. The limits of strict rules mirror
6
+ // STRICT_DEFAULTS and STRICT_RANGES of the server's rules, and the keys of entrants mirror
7
+ // `entrant_key`, which tests/web/tournament_results.mjs holds equal to the Python source. The
8
+ // ratings read as a table with a bar for each interval on one scale, and the matrix of mean goal
9
+ // difference as a heat table whose cells each take a tone, up for the row and down for the
10
+ // column, and a level from 0 to 4 of how far the mean goes.
11
+
12
+ import { formatNumber, labelText, serverText, t } from '../core/i18n.js';
13
+
14
+ // The limits of strict rules with their defaults, the threads of a team's process, the seconds
15
+ // to load, of the first call, of each later call and of a reset, the milliseconds of the mean
16
+ // call, the megabytes of a team's folder and of its process's memory, and the seconds that all
17
+ // of a team's calls of a match may take together, as the server's rules give them.
18
+ export const STRICT_DEFAULTS = {
19
+ threads: 1, load_seconds: 30, first_call_seconds: 10, call_seconds: 1, reset_seconds: 5, mean_call_ms: 20, folder_mb: 100,
20
+ memory_mb: 2048, match_seconds: 120,
21
+ };
22
+ export const STRICT_RANGES = {
23
+ threads: [1, 64], load_seconds: [1, 600], first_call_seconds: [0.1, 600], call_seconds: [0.01, 60],
24
+ reset_seconds: [0.1, 600], mean_call_ms: [0.1, 10000], folder_mb: [1, 10000], memory_mb: [64, 65536],
25
+ match_seconds: [1, 36000],
26
+ };
27
+ // The switches of strict rules with their defaults, as STRICT_FLAGS of the server's rules gives
28
+ // them. A frozen team plays from a read only copy of its folder and forfeits once its files
29
+ // change, a team sees the GPU only with `gpu`, and with `deterministic` the pre-flight refuses a
30
+ // team whose answers differ when the same steps play again, which is otherwise a warning.
31
+ export const STRICT_FLAGS = { frozen: true, gpu: false, deterministic: false };
32
+ export const STRICT_FLAG_KEYS = Object.keys(STRICT_FLAGS);
33
+ export const STRICT_KEYS = Object.keys(STRICT_DEFAULTS);
34
+ // The step of each limit's box, and the unit it reads in.
35
+ export const STRICT_STEPS = {
36
+ threads: 1, load_seconds: 1, first_call_seconds: 0.1, call_seconds: 0.01, reset_seconds: 0.1, mean_call_ms: 0.1, folder_mb: 1,
37
+ memory_mb: 1, match_seconds: 1,
38
+ };
39
+ export const STRICT_UNITS = {
40
+ threads: 'threads', load_seconds: 's', first_call_seconds: 's', call_seconds: 's', reset_seconds: 's', mean_call_ms: 'ms', folder_mb: 'MB',
41
+ memory_mb: 'MB', match_seconds: 's',
42
+ };
43
+
44
+ // The key of the random entrant, as RANDOM_KEY of the server's rules gives it.
45
+ export const RANDOM_KEY = 'random:uniform';
46
+
47
+ // The legs that a stage's meetings play at most, those it starts with and those added later, as
48
+ // MAX_LEGS and MAX_ADDED_LEGS of the server's rules give them.
49
+ export const MAX_LEGS = 10;
50
+ export const MAX_ADDED_LEGS = 90;
51
+ // The formats whose last stage takes more legs later.
52
+ export const LEG_FORMATS = ['league', 'groups'];
53
+
54
+ // The files of a tournament's results, in the order the server lists them.
55
+ export const RESULT_FILES = [
56
+ 'standings.csv', 'ratings.csv', 'ratings_method.json', 'pairwise_gd.csv', 'pairwise_counts.csv', 'matches.jsonl',
57
+ 'entrants.json', 'excluded.json',
58
+ ];
59
+
60
+ // The rating of an entrant of the mean strength.
61
+ export const CENTRE = 1000;
62
+
63
+ // The limits of strict rules in full, or null for a tournament without them, as `check_strict`
64
+ // of the server's rules resolves `null`, `false`, `true` or an object of some limits.
65
+ export function strictLimits(value) {
66
+ if (value === null || value === undefined || value === false) {
67
+ return null;
68
+ }
69
+ const given = value === true || typeof value !== 'object' ? {} : value;
70
+ const limits = { ...STRICT_DEFAULTS, ...STRICT_FLAGS };
71
+ for (const key of STRICT_KEYS) {
72
+ if (given[key] !== undefined && given[key] !== null && given[key] !== '') {
73
+ limits[key] = Number(given[key]);
74
+ }
75
+ }
76
+ for (const key of STRICT_FLAG_KEYS) {
77
+ if (typeof given[key] === 'boolean') {
78
+ limits[key] = given[key];
79
+ }
80
+ }
81
+ return limits;
82
+ }
83
+
84
+ // The limits that lie outside their ranges, by key, which the server would refuse.
85
+ export function strictProblems(limits) {
86
+ if (!limits) {
87
+ return [];
88
+ }
89
+ return STRICT_KEYS.filter((key) => {
90
+ const value = limits[key];
91
+ const [lowest, highest] = STRICT_RANGES[key];
92
+ return !Number.isFinite(value) || value < lowest || value > highest || (key === 'threads' && !Number.isInteger(value));
93
+ });
94
+ }
95
+
96
+ // A number of a limit in the numbers of the language, with as many decimals as it needs.
97
+ export function limitNumber(value) {
98
+ return formatNumber(Number(value), { maximumFractionDigits: 2 });
99
+ }
100
+
101
+ // One limit of strict rules in words, such as each later call within 1 s.
102
+ export function limitText(key, value) {
103
+ const number = limitNumber(value);
104
+ return key === 'threads' ? t('tournament.strict.limit.threads', { count: Number(value), value: number }) : t(`tournament.strict.limit.${key}`, { value: number });
105
+ }
106
+
107
+ // Every limit of strict rules in words, in the order of the rules.
108
+ export function limitsText(limits) {
109
+ if (!limits) {
110
+ return '';
111
+ }
112
+ const flags = STRICT_FLAG_KEYS.map((key) => t(`tournament.strict.flag.${key}.${(limits[key] ?? STRICT_FLAGS[key]) ? 'on' : 'off'}`));
113
+ return [...STRICT_KEYS.map((key) => limitText(key, limits[key])), ...flags].join(', ');
114
+ }
115
+
116
+ // The key of an entrant as given, as `entrant_key` of the server's rules gives it, the team of a
117
+ // team, the built-in AI at its ability, RANDOM_KEY for the random entrant, a person by name.
118
+ export function entrantKey(raw) {
119
+ const kind = (raw && raw.kind) || 'team';
120
+ if (kind === 'team') {
121
+ return String(raw.team);
122
+ }
123
+ if (kind === 'builtin') {
124
+ const ability = raw.ability;
125
+ const number = typeof ability === 'number' && Number.isFinite(ability);
126
+ return `builtin:${number ? ability.toFixed(2) : 'scenario'}`;
127
+ }
128
+ if (kind === 'random') {
129
+ return RANDOM_KEY;
130
+ }
131
+ return typeof raw.name === 'string' ? `person:${raw.name.trim().split(/\s+/).filter(Boolean).join(' ')}` : null;
132
+ }
133
+
134
+ // The entrants with each of `include` whose key none of them holds, as `with_included` of the
135
+ // server's rules adds them.
136
+ export function withIncluded(entrants, include) {
137
+ const keys = new Set(entrants.map(entrantKey));
138
+ const added = [];
139
+ for (const raw of include || []) {
140
+ const key = entrantKey(raw);
141
+ if (!keys.has(key)) {
142
+ keys.add(key);
143
+ added.push({ ...raw });
144
+ }
145
+ }
146
+ return [...entrants, ...added];
147
+ }
148
+
149
+ // The entrants that a tournament adds, without the one of the same key as a removed entrant, so
150
+ // the server does not add it back.
151
+ export function withoutIncluded(include, removed) {
152
+ const key = entrantKey(removed);
153
+ return (include || []).filter((raw) => entrantKey(raw) !== key);
154
+ }
155
+
156
+ // The legs that the last stage of a tournament may still take, or 0 when it takes none, a stage
157
+ // other than a league or groups, or a canceled tournament.
158
+ export function legsRoom(cup) {
159
+ const stages = cup && cup.config && cup.config.stages;
160
+ const last = stages && stages[stages.length - 1];
161
+ if (!last || !LEG_FORMATS.includes(last.format) || cup.state === 'cancelled') {
162
+ return 0;
163
+ }
164
+ return Math.max(0, MAX_LEGS + MAX_ADDED_LEGS - (last.legs || 1) - (last.added_legs || 0));
165
+ }
166
+
167
+ // The ratings, best first, the higher rating first and the lower index on a tie.
168
+ export function orderedRatings(ratings) {
169
+ return [...(ratings || [])].sort((a, b) => b.rating - a.rating || a.entrant - b.entrant);
170
+ }
171
+
172
+ // The scale of the interval bars, from a little below the lowest end to a little above the
173
+ // highest, at least 100 points wide, rounded out to tens.
174
+ export function ratingScale(ratings) {
175
+ const rows = ratings || [];
176
+ if (!rows.length) {
177
+ return { low: CENTRE - 50, high: CENTRE + 50 };
178
+ }
179
+ let low = Math.min(...rows.map((row) => row.low));
180
+ let high = Math.max(...rows.map((row) => row.high));
181
+ if (high - low < 100) {
182
+ const middle = (high + low) / 2;
183
+ low = middle - 50;
184
+ high = middle + 50;
185
+ }
186
+ const pad = (high - low) * 0.05;
187
+ return { low: Math.floor((low - pad) / 10) * 10, high: Math.ceil((high + pad) / 10) * 10 };
188
+ }
189
+
190
+ // Where the bar of a rating's interval sits on the scale, in percent of the width, its left end,
191
+ // its width, the mark of the rating itself and the line of the centre, null off the scale.
192
+ export function intervalBar(row, scale) {
193
+ const span = scale.high - scale.low || 1;
194
+ const at = (value) => Math.max(0, Math.min(100, ((value - scale.low) / span) * 100));
195
+ const left = at(row.low);
196
+ const round = (value) => Math.round(value * 100) / 100;
197
+ return {
198
+ left: round(left),
199
+ width: round(Math.max(0, at(row.high) - left)),
200
+ mark: round(at(row.rating)),
201
+ centre: CENTRE >= scale.low && CENTRE <= scale.high ? round(at(CENTRE)) : null,
202
+ };
203
+ }
204
+
205
+ // A rating in whole points, in the numbers of the language.
206
+ export function ratingText(value) {
207
+ return formatNumber(Math.round(Number(value)));
208
+ }
209
+
210
+ // The words of a rating's interval bar, for a screen reader.
211
+ export function intervalWords(row) {
212
+ return t('tournament.results.interval', { rating: ratingText(row.rating), low: ratingText(row.low), high: ratingText(row.high) });
213
+ }
214
+
215
+ // The order of the entrants in the matrix, those rated best first, then any left unrated.
216
+ export function matrixOrder(ratings, count) {
217
+ const order = orderedRatings(ratings).map((row) => row.entrant).filter((index) => index >= 0 && index < count);
218
+ for (let index = 0; index < count; index++) {
219
+ if (!order.includes(index)) {
220
+ order.push(index);
221
+ }
222
+ }
223
+ return order;
224
+ }
225
+
226
+ // The largest mean goal difference of the matrix, at least 1, which the darkest tone stands for.
227
+ export function matrixExtent(matrix) {
228
+ let most = 0;
229
+ for (const row of (matrix && matrix.mean) || []) {
230
+ for (const value of row) {
231
+ if (typeof value === 'number' && Number.isFinite(value)) {
232
+ most = Math.max(most, Math.abs(value));
233
+ }
234
+ }
235
+ }
236
+ return Math.max(1, most);
237
+ }
238
+
239
+ // The tone and level of a cell, `self` on the diagonal, `none` for a pair that has not met,
240
+ // `even` for a mean that rounds to 0, else `up` where the row scores more and `down` where the
241
+ // column does, at a level from 1 to 4 of the mean over the extent.
242
+ export function heatLevel(mean, extent, self = false) {
243
+ if (self) {
244
+ return { tone: 'self', level: 0 };
245
+ }
246
+ if (typeof mean !== 'number' || !Number.isFinite(mean)) {
247
+ return { tone: 'none', level: 0 };
248
+ }
249
+ if (Math.round(mean * 10) === 0) {
250
+ return { tone: 'even', level: 0 };
251
+ }
252
+ const share = Math.min(1, Math.abs(mean) / (extent || 1));
253
+ return { tone: mean > 0 ? 'up' : 'down', level: Math.max(1, Math.ceil(share * 4)) };
254
+ }
255
+
256
+ // A mean goal difference with its sign and one decimal, a plus sign above 0 and a minus sign
257
+ // below it.
258
+ export function signedMean(mean) {
259
+ const rounded = Math.round(mean * 10) / 10;
260
+ return formatNumber(rounded === 0 ? 0 : rounded, { minimumFractionDigits: 1, maximumFractionDigits: 1, signDisplay: 'exceptZero' });
261
+ }
262
+
263
+ // The accessible name of a cell, such as Rex against Bot, mean goal difference plus 1.2 over 10
264
+ // matches.
265
+ export function cellName(rowName, columnName, cell) {
266
+ const names = { row: rowName, column: columnName };
267
+ if (cell.self) {
268
+ return t('tournament.results.cell.self', names);
269
+ }
270
+ if (typeof cell.mean !== 'number' || !cell.matches) {
271
+ return t('tournament.results.cell.none', names);
272
+ }
273
+ const tone = heatLevel(cell.mean, 1).tone;
274
+ const mean = formatNumber(Math.abs(Math.round(cell.mean * 10) / 10), { minimumFractionDigits: 1, maximumFractionDigits: 1 });
275
+ return t(`tournament.results.cell.${tone}`, { ...names, mean, count: cell.matches });
276
+ }
277
+
278
+ // The rows of the matrix in the order given, each with its entrant and its cells, each cell with
279
+ // its row, column, mean, matches, whether it is the diagonal, its tone and level.
280
+ export function matrixCells(matrix, order) {
281
+ const extent = matrixExtent(matrix);
282
+ return order.map((row) => ({
283
+ entrant: row,
284
+ cells: order.map((column) => {
285
+ const self = row === column;
286
+ const mean = self ? null : (matrix.mean[row] || [])[column] ?? null;
287
+ const matches = self ? 0 : (matrix.matches[row] || [])[column] || 0;
288
+ return { row, column, mean, matches, self, ...heatLevel(mean, extent, self) };
289
+ }),
290
+ }));
291
+ }
292
+
293
+ // A time in milliseconds in words, such as 4.2 ms, with a decimal below 100, or null.
294
+ export function msText(value) {
295
+ if (typeof value !== 'number' || !Number.isFinite(value)) {
296
+ return null;
297
+ }
298
+ return t('tournament.timing.ms', { value: formatNumber(value, { maximumFractionDigits: value < 100 ? 1 : 0 }) });
299
+ }
300
+
301
+ // A time in seconds in words, such as 1.25 s, or null.
302
+ export function secondsText(value) {
303
+ if (typeof value !== 'number' || !Number.isFinite(value)) {
304
+ return null;
305
+ }
306
+ return t('tournament.timing.seconds', { value: formatNumber(value, { maximumFractionDigits: value < 10 ? 2 : 1 }) });
307
+ }
308
+
309
+ // The timings of a team's check or a side's match in words, those it has, in order.
310
+ export function timingParts(timings) {
311
+ if (!timings || typeof timings !== 'object') {
312
+ return [];
313
+ }
314
+ const parts = [];
315
+ const add = (id, text) => {
316
+ if (text) {
317
+ parts.push(t(id, { time: text }));
318
+ }
319
+ };
320
+ add('tournament.timing.load', secondsText(timings.load_seconds));
321
+ add('tournament.timing.reset', secondsText(timings.reset_seconds));
322
+ if (typeof timings.calls === 'number' && timings.calls > 0) {
323
+ parts.push(t('tournament.timing.calls', { count: timings.calls, value: formatNumber(timings.calls) }));
324
+ }
325
+ add('tournament.timing.first', msText(timings.first_ms));
326
+ // The mean that the limit holds leaves out the first call, which loads what a policy needs.
327
+ if (typeof timings.mean_after_first_ms === 'number') {
328
+ add('tournament.timing.meanAfter', msText(timings.mean_after_first_ms));
329
+ } else {
330
+ add('tournament.timing.mean', msText(timings.mean_ms));
331
+ }
332
+ add('tournament.timing.max', msText(timings.max_ms));
333
+ if (typeof timings.memory_mb === 'number' && Number.isFinite(timings.memory_mb)) {
334
+ parts.push(t('tournament.timing.memory', { value: formatNumber(timings.memory_mb, { maximumFractionDigits: timings.memory_mb < 10 ? 1 : 0 }) }));
335
+ }
336
+ return parts;
337
+ }
338
+
339
+ // The timings in one line.
340
+ export function timingsText(timings) {
341
+ return timingParts(timings).join(', ');
342
+ }
343
+
344
+ // The reason that a rule gives, translated where the server names its message.
345
+ export function ruleReason(rule) {
346
+ return rule ? serverText(rule, 'reason') : '';
347
+ }
348
+
349
+ // A match that a side forfeited by breaking a rule, in words, with the score at that moment.
350
+ export function ruleText(rule) {
351
+ const at = Array.isArray(rule.at) ? rule.at : [0, 0];
352
+ return t('tournament.rule.forfeit', { left: at[0], right: at[1], reason: ruleReason(rule) });
353
+ }
354
+
355
+ // How the matches of a fixture were forfeited, a rule broken with its reason and the score at
356
+ // that moment, or an award by hand, or null when every match was played out.
357
+ export function forfeitWords(matches) {
358
+ const ruled = (matches || []).filter((m) => m && m.result && m.result.rule);
359
+ if (ruled.length) {
360
+ return ruled.map((m) => ruleText(m.result.rule)).join(', ');
361
+ }
362
+ return (matches || []).some((m) => m && m.result && m.result.forfeit) ? t('tournament.fixture.awarded') : null;
363
+ }
364
+
365
+ // The state of a tournament's pre-flight check in words, or null for one without it.
366
+ export function preflightText(state, excluded = 0) {
367
+ if (!state) {
368
+ return null;
369
+ }
370
+ if (state === 'done') {
371
+ return excluded ? t('tournament.preflight.state.excluded', { count: excluded }) : t('tournament.preflight.state.done');
372
+ }
373
+ return t(state === 'running' ? 'tournament.preflight.state.running' : 'tournament.preflight.state.waiting');
374
+ }
375
+
376
+ // The address of a file of a tournament's results.
377
+ export function fileAddress(id, name) {
378
+ return `/api/tournaments/${encodeURIComponent(id)}/files/${encodeURIComponent(name)}`;
379
+ }
380
+
381
+ // What the analysis of a tournament follows, so the page asks for it again once it changes.
382
+ export function analysisStamp(cup) {
383
+ return cup ? `${cup.id}|${cup.played}|${cup.scheduled}|${cup.excluded_count ?? (cup.excluded || []).length}` : '';
384
+ }
385
+
386
+ // The sides of a team's check in order, the left and the right, each with whether it passed, the
387
+ // rule it broke and its timings. A side that the check left unplayed, the right after the left
388
+ // failed, comes as null, and a check without sides, as a tournament keeps it, has none.
389
+ export function checkSides(report) {
390
+ const sides = report && report.sides;
391
+ if (!sides || typeof sides !== 'object') {
392
+ return [];
393
+ }
394
+ return ['left', 'right'].map((side) => (sides[side] ? { side, ...sides[side] } : { side, skipped: true }));
395
+ }
396
+
397
+ // A side of a team's check in words, passed or failed with its reason, then its timings.
398
+ export function sideText(side) {
399
+ const name = t(`tournament.check.side.${side.side}`);
400
+ if (side.skipped) {
401
+ return t('tournament.check.skipped', { side: name });
402
+ }
403
+ const state = side.ok ? t('tournament.check.passed', { side: name }) : t('tournament.check.failed', { side: name, reason: ruleReason(side.rule) });
404
+ const timings = timingsText(side.timings);
405
+ return timings ? `${state}, ${timings}` : state;
406
+ }
407
+
408
+ // The warnings of a team's check in the language of the page, each a label of the server.
409
+ export function warningTexts(report) {
410
+ return ((report && report.warnings) || []).map((warning) => labelText(warning)).filter(Boolean);
411
+ }
412
+
413
+ // The size of a team's folder in words, or null.
414
+ export function folderText(report) {
415
+ const size = report && report.folder_mb;
416
+ return typeof size === 'number' && Number.isFinite(size)
417
+ ? t('tournament.check.folder', { value: formatNumber(size, { maximumFractionDigits: size < 1 ? 2 : size < 10 ? 1 : 0 }) }) : null;
418
+ }
419
+
420
+ // How many matches the ratings rest on and how many of them ended early, in words.
421
+ export function playedText(found) {
422
+ const played = (found && found.played) || 0;
423
+ const early = (found && found.cut_short) || 0;
424
+ const parts = [t('tournament.results.played', { count: played })];
425
+ if (played) {
426
+ parts.push(early ? t('tournament.results.cutShort', { count: early }) : t('tournament.results.fullTime'));
427
+ }
428
+ return parts.join(' ');
429
+ }
430
+
431
+ // How the ratings are made, the virtual draws of the prior and the resamples of the bootstrap.
432
+ export function methodText(found) {
433
+ const method = (found && found.method) || {};
434
+ const prior = method.prior || {};
435
+ const bootstrap = method.bootstrap || {};
436
+ return t('tournament.results.method', {
437
+ count: prior.virtual_draws ?? 1,
438
+ resamples: formatNumber(bootstrap.resamples ?? (found && found.resamples) ?? 0),
439
+ seed: bootstrap.tournament_seed ?? '',
440
+ });
441
+ }