@ttt-productions/q-core 0.1.28 → 0.1.30

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 (496) hide show
  1. package/dist/constants/admin-views.d.ts.map +1 -1
  2. package/dist/constants/admin-views.js +0 -3
  3. package/dist/constants/admin-views.js.map +1 -1
  4. package/dist/constants/business.d.ts.map +1 -1
  5. package/dist/constants/business.js +0 -52
  6. package/dist/constants/business.js.map +1 -1
  7. package/dist/constants/deployment.d.ts +0 -2
  8. package/dist/constants/deployment.d.ts.map +1 -1
  9. package/dist/constants/deployment.js +0 -2
  10. package/dist/constants/deployment.js.map +1 -1
  11. package/dist/constants/media.d.ts.map +1 -1
  12. package/dist/constants/media.js +4 -30
  13. package/dist/constants/media.js.map +1 -1
  14. package/dist/constants/scheduled-jobs.d.ts +0 -25
  15. package/dist/constants/scheduled-jobs.d.ts.map +1 -1
  16. package/dist/constants/scheduled-jobs.js +0 -26
  17. package/dist/constants/scheduled-jobs.js.map +1 -1
  18. package/dist/constants/sports.d.ts +1 -0
  19. package/dist/constants/sports.d.ts.map +1 -1
  20. package/dist/constants/sports.js +4 -25
  21. package/dist/constants/sports.js.map +1 -1
  22. package/dist/constants/storage-keys.d.ts +0 -38
  23. package/dist/constants/storage-keys.d.ts.map +1 -1
  24. package/dist/constants/storage-keys.js +0 -41
  25. package/dist/constants/storage-keys.js.map +1 -1
  26. package/dist/constants/telemetry.d.ts +0 -3
  27. package/dist/constants/telemetry.d.ts.map +1 -1
  28. package/dist/constants/telemetry.js +2 -11
  29. package/dist/constants/telemetry.js.map +1 -1
  30. package/dist/doc-schemas/admin-notifications.d.ts +1 -2
  31. package/dist/doc-schemas/admin-notifications.d.ts.map +1 -1
  32. package/dist/doc-schemas/admin-notifications.js +0 -41
  33. package/dist/doc-schemas/admin-notifications.js.map +1 -1
  34. package/dist/doc-schemas/aggregate-stats.d.ts.map +1 -1
  35. package/dist/doc-schemas/aggregate-stats.js +0 -35
  36. package/dist/doc-schemas/aggregate-stats.js.map +1 -1
  37. package/dist/doc-schemas/atoms.d.ts +0 -17
  38. package/dist/doc-schemas/atoms.d.ts.map +1 -1
  39. package/dist/doc-schemas/atoms.js +0 -36
  40. package/dist/doc-schemas/atoms.js.map +1 -1
  41. package/dist/doc-schemas/audit-event.d.ts +2 -0
  42. package/dist/doc-schemas/audit-event.d.ts.map +1 -1
  43. package/dist/doc-schemas/audit-event.js +0 -8
  44. package/dist/doc-schemas/audit-event.js.map +1 -1
  45. package/dist/doc-schemas/award-group-grant.d.ts +2 -8
  46. package/dist/doc-schemas/award-group-grant.d.ts.map +1 -1
  47. package/dist/doc-schemas/award-group-grant.js +0 -25
  48. package/dist/doc-schemas/award-group-grant.js.map +1 -1
  49. package/dist/doc-schemas/catalogs.d.ts.map +1 -1
  50. package/dist/doc-schemas/catalogs.js +0 -12
  51. package/dist/doc-schemas/catalogs.js.map +1 -1
  52. package/dist/doc-schemas/firestore-primitives.d.ts.map +1 -1
  53. package/dist/doc-schemas/firestore-primitives.js +0 -5
  54. package/dist/doc-schemas/firestore-primitives.js.map +1 -1
  55. package/dist/doc-schemas/gallery.d.ts.map +1 -1
  56. package/dist/doc-schemas/gallery.js +9 -18
  57. package/dist/doc-schemas/gallery.js.map +1 -1
  58. package/dist/doc-schemas/game-location.d.ts.map +1 -1
  59. package/dist/doc-schemas/game-location.js +2 -11
  60. package/dist/doc-schemas/game-location.js.map +1 -1
  61. package/dist/doc-schemas/game-stat-history.d.ts.map +1 -1
  62. package/dist/doc-schemas/game-stat-history.js +2 -11
  63. package/dist/doc-schemas/game-stat-history.js.map +1 -1
  64. package/dist/doc-schemas/game-stats.d.ts.map +1 -1
  65. package/dist/doc-schemas/game-stats.js +0 -56
  66. package/dist/doc-schemas/game-stats.js.map +1 -1
  67. package/dist/doc-schemas/league-team.d.ts.map +1 -1
  68. package/dist/doc-schemas/league-team.js +6 -29
  69. package/dist/doc-schemas/league-team.js.map +1 -1
  70. package/dist/doc-schemas/membership-roster-sync.d.ts.map +1 -1
  71. package/dist/doc-schemas/membership-roster-sync.js +0 -17
  72. package/dist/doc-schemas/membership-roster-sync.js.map +1 -1
  73. package/dist/doc-schemas/migration-console.d.ts +21 -15
  74. package/dist/doc-schemas/migration-console.d.ts.map +1 -1
  75. package/dist/doc-schemas/migration-console.js +0 -32
  76. package/dist/doc-schemas/migration-console.js.map +1 -1
  77. package/dist/doc-schemas/pending-media.d.ts.map +1 -1
  78. package/dist/doc-schemas/pending-media.js +8 -20
  79. package/dist/doc-schemas/pending-media.js.map +1 -1
  80. package/dist/doc-schemas/picture-retirement.d.ts.map +1 -1
  81. package/dist/doc-schemas/picture-retirement.js +8 -13
  82. package/dist/doc-schemas/picture-retirement.js.map +1 -1
  83. package/dist/doc-schemas/publicUser.d.ts.map +1 -1
  84. package/dist/doc-schemas/publicUser.js +0 -5
  85. package/dist/doc-schemas/publicUser.js.map +1 -1
  86. package/dist/doc-schemas/registration-start.d.ts.map +1 -1
  87. package/dist/doc-schemas/registration-start.js +2 -5
  88. package/dist/doc-schemas/registration-start.js.map +1 -1
  89. package/dist/doc-schemas/registry.d.ts +25 -14
  90. package/dist/doc-schemas/registry.d.ts.map +1 -1
  91. package/dist/doc-schemas/registry.js +0 -10
  92. package/dist/doc-schemas/registry.js.map +1 -1
  93. package/dist/doc-schemas/reserved-display-name.d.ts.map +1 -1
  94. package/dist/doc-schemas/reserved-display-name.js +0 -5
  95. package/dist/doc-schemas/reserved-display-name.js.map +1 -1
  96. package/dist/doc-schemas/sport-game.d.ts.map +1 -1
  97. package/dist/doc-schemas/sport-game.js +1 -29
  98. package/dist/doc-schemas/sport-game.js.map +1 -1
  99. package/dist/doc-schemas/sport-league.d.ts +0 -9
  100. package/dist/doc-schemas/sport-league.d.ts.map +1 -1
  101. package/dist/doc-schemas/sport-league.js +4 -26
  102. package/dist/doc-schemas/sport-league.js.map +1 -1
  103. package/dist/doc-schemas/stats-operation.d.ts +22 -18
  104. package/dist/doc-schemas/stats-operation.d.ts.map +1 -1
  105. package/dist/doc-schemas/stats-operation.js +7 -44
  106. package/dist/doc-schemas/stats-operation.js.map +1 -1
  107. package/dist/doc-schemas/status-reconcile-queue.d.ts +0 -6
  108. package/dist/doc-schemas/status-reconcile-queue.d.ts.map +1 -1
  109. package/dist/doc-schemas/status-reconcile-queue.js +0 -13
  110. package/dist/doc-schemas/status-reconcile-queue.js.map +1 -1
  111. package/dist/doc-schemas/sweep-state.d.ts.map +1 -1
  112. package/dist/doc-schemas/sweep-state.js +4 -20
  113. package/dist/doc-schemas/sweep-state.js.map +1 -1
  114. package/dist/doc-schemas/system.d.ts.map +1 -1
  115. package/dist/doc-schemas/system.js +1 -27
  116. package/dist/doc-schemas/system.js.map +1 -1
  117. package/dist/doc-schemas/team-membership.d.ts.map +1 -1
  118. package/dist/doc-schemas/team-membership.js +0 -10
  119. package/dist/doc-schemas/team-membership.js.map +1 -1
  120. package/dist/doc-schemas/user-profile.d.ts +0 -1
  121. package/dist/doc-schemas/user-profile.d.ts.map +1 -1
  122. package/dist/doc-schemas/user-profile.js +0 -28
  123. package/dist/doc-schemas/user-profile.js.map +1 -1
  124. package/dist/doc-schemas/waiver-template.d.ts.map +1 -1
  125. package/dist/doc-schemas/waiver-template.js +4 -25
  126. package/dist/doc-schemas/waiver-template.js.map +1 -1
  127. package/dist/doc-schemas/waivers-and-hardware.d.ts.map +1 -1
  128. package/dist/doc-schemas/waivers-and-hardware.js +0 -20
  129. package/dist/doc-schemas/waivers-and-hardware.js.map +1 -1
  130. package/dist/domain-events/domain-events.d.ts.map +1 -1
  131. package/dist/domain-events/domain-events.js +0 -67
  132. package/dist/domain-events/domain-events.js.map +1 -1
  133. package/dist/ids/award-grant-ids.d.ts.map +1 -1
  134. package/dist/ids/award-grant-ids.js +0 -7
  135. package/dist/ids/award-grant-ids.js.map +1 -1
  136. package/dist/ids/compound-ids.d.ts.map +1 -1
  137. package/dist/ids/compound-ids.js +0 -7
  138. package/dist/ids/compound-ids.js.map +1 -1
  139. package/dist/ids/minted-ids.d.ts.map +1 -1
  140. package/dist/ids/minted-ids.js +4 -14
  141. package/dist/ids/minted-ids.js.map +1 -1
  142. package/dist/ids/notification-ids.d.ts.map +1 -1
  143. package/dist/ids/notification-ids.js +0 -15
  144. package/dist/ids/notification-ids.js.map +1 -1
  145. package/dist/ids/picture-ids.d.ts +0 -5
  146. package/dist/ids/picture-ids.d.ts.map +1 -1
  147. package/dist/ids/picture-ids.js +0 -11
  148. package/dist/ids/picture-ids.js.map +1 -1
  149. package/dist/ids/stat-event-ids.d.ts +0 -6
  150. package/dist/ids/stat-event-ids.d.ts.map +1 -1
  151. package/dist/ids/stat-event-ids.js +0 -15
  152. package/dist/ids/stat-event-ids.js.map +1 -1
  153. package/dist/ids/stats-operation-ids.d.ts.map +1 -1
  154. package/dist/ids/stats-operation-ids.js +0 -7
  155. package/dist/ids/stats-operation-ids.js.map +1 -1
  156. package/dist/ids/waiver-template-ids.d.ts +0 -1
  157. package/dist/ids/waiver-template-ids.d.ts.map +1 -1
  158. package/dist/ids/waiver-template-ids.js +0 -2
  159. package/dist/ids/waiver-template-ids.js.map +1 -1
  160. package/dist/index.d.ts +2 -0
  161. package/dist/index.d.ts.map +1 -1
  162. package/dist/index.js +2 -2
  163. package/dist/index.js.map +1 -1
  164. package/dist/input-formats/input-formats.d.ts +0 -80
  165. package/dist/input-formats/input-formats.d.ts.map +1 -1
  166. package/dist/input-formats/input-formats.js +0 -86
  167. package/dist/input-formats/input-formats.js.map +1 -1
  168. package/dist/media/file-origins.d.ts +0 -3
  169. package/dist/media/file-origins.d.ts.map +1 -1
  170. package/dist/media/file-origins.js +0 -26
  171. package/dist/media/file-origins.js.map +1 -1
  172. package/dist/media/picture-aspects.d.ts +0 -2
  173. package/dist/media/picture-aspects.d.ts.map +1 -1
  174. package/dist/media/picture-aspects.js +0 -5
  175. package/dist/media/picture-aspects.js.map +1 -1
  176. package/dist/media/picture-url.d.ts +0 -6
  177. package/dist/media/picture-url.d.ts.map +1 -1
  178. package/dist/media/picture-url.js +0 -9
  179. package/dist/media/picture-url.js.map +1 -1
  180. package/dist/media/upload-tray-display.d.ts +0 -3
  181. package/dist/media/upload-tray-display.d.ts.map +1 -1
  182. package/dist/media/upload-tray-display.js +0 -6
  183. package/dist/media/upload-tray-display.js.map +1 -1
  184. package/dist/migration-console/action-ids.d.ts +4 -1
  185. package/dist/migration-console/action-ids.d.ts.map +1 -1
  186. package/dist/migration-console/action-ids.js +8 -45
  187. package/dist/migration-console/action-ids.js.map +1 -1
  188. package/dist/migration-console/console-lock.d.ts +10 -0
  189. package/dist/migration-console/console-lock.d.ts.map +1 -0
  190. package/dist/migration-console/console-lock.js +14 -0
  191. package/dist/migration-console/console-lock.js.map +1 -0
  192. package/dist/migration-console/consumed-source.d.ts +4 -0
  193. package/dist/migration-console/consumed-source.d.ts.map +1 -0
  194. package/dist/migration-console/consumed-source.js +10 -0
  195. package/dist/migration-console/consumed-source.js.map +1 -0
  196. package/dist/migration-console/manifest.d.ts +2 -24
  197. package/dist/migration-console/manifest.d.ts.map +1 -1
  198. package/dist/migration-console/manifest.js +174 -61
  199. package/dist/migration-console/manifest.js.map +1 -1
  200. package/dist/migration-console/run-state.d.ts +2 -14
  201. package/dist/migration-console/run-state.d.ts.map +1 -1
  202. package/dist/migration-console/run-state.js +3 -16
  203. package/dist/migration-console/run-state.js.map +1 -1
  204. package/dist/notifications/admin-notification-config.d.ts +0 -11
  205. package/dist/notifications/admin-notification-config.d.ts.map +1 -1
  206. package/dist/notifications/admin-notification-config.js +2 -13
  207. package/dist/notifications/admin-notification-config.js.map +1 -1
  208. package/dist/notifications/archive-all.d.ts.map +1 -1
  209. package/dist/notifications/archive-all.js +0 -2
  210. package/dist/notifications/archive-all.js.map +1 -1
  211. package/dist/notifications/occurrences.d.ts +0 -3
  212. package/dist/notifications/occurrences.d.ts.map +1 -1
  213. package/dist/notifications/occurrences.js +0 -7
  214. package/dist/notifications/occurrences.js.map +1 -1
  215. package/dist/paths/app-routes.d.ts +0 -12
  216. package/dist/paths/app-routes.d.ts.map +1 -1
  217. package/dist/paths/app-routes.js +0 -18
  218. package/dist/paths/app-routes.js.map +1 -1
  219. package/dist/paths/collection-groups.d.ts.map +1 -1
  220. package/dist/paths/collection-groups.js +0 -5
  221. package/dist/paths/collection-groups.js.map +1 -1
  222. package/dist/paths/collection-refs.d.ts.map +1 -1
  223. package/dist/paths/collection-refs.js +0 -4
  224. package/dist/paths/collection-refs.js.map +1 -1
  225. package/dist/paths/collections.d.ts +0 -5
  226. package/dist/paths/collections.d.ts.map +1 -1
  227. package/dist/paths/collections.js +0 -68
  228. package/dist/paths/collections.js.map +1 -1
  229. package/dist/paths/path-builders.d.ts.map +1 -1
  230. package/dist/paths/path-builders.js +0 -16
  231. package/dist/paths/path-builders.js.map +1 -1
  232. package/dist/paths/picture-owner-paths.d.ts +0 -4
  233. package/dist/paths/picture-owner-paths.d.ts.map +1 -1
  234. package/dist/paths/picture-owner-paths.js +2 -11
  235. package/dist/paths/picture-owner-paths.js.map +1 -1
  236. package/dist/paths/storage-paths.d.ts +0 -18
  237. package/dist/paths/storage-paths.d.ts.map +1 -1
  238. package/dist/paths/storage-paths.js +0 -23
  239. package/dist/paths/storage-paths.js.map +1 -1
  240. package/dist/paths/utils.d.ts +0 -6
  241. package/dist/paths/utils.d.ts.map +1 -1
  242. package/dist/paths/utils.js +0 -9
  243. package/dist/paths/utils.js.map +1 -1
  244. package/dist/schemas/account-settings.d.ts.map +1 -1
  245. package/dist/schemas/account-settings.js +0 -7
  246. package/dist/schemas/account-settings.js.map +1 -1
  247. package/dist/schemas/admin-notifications.d.ts.map +1 -1
  248. package/dist/schemas/admin-notifications.js +0 -17
  249. package/dist/schemas/admin-notifications.js.map +1 -1
  250. package/dist/schemas/admin-stats.d.ts.map +1 -1
  251. package/dist/schemas/admin-stats.js +0 -9
  252. package/dist/schemas/admin-stats.js.map +1 -1
  253. package/dist/schemas/app-config.d.ts.map +1 -1
  254. package/dist/schemas/app-config.js +0 -10
  255. package/dist/schemas/app-config.js.map +1 -1
  256. package/dist/schemas/atoms.d.ts.map +1 -1
  257. package/dist/schemas/atoms.js +0 -10
  258. package/dist/schemas/atoms.js.map +1 -1
  259. package/dist/schemas/awards.d.ts +3 -3
  260. package/dist/schemas/awards.d.ts.map +1 -1
  261. package/dist/schemas/awards.js +0 -29
  262. package/dist/schemas/awards.js.map +1 -1
  263. package/dist/schemas/dead-letters.d.ts +0 -3
  264. package/dist/schemas/dead-letters.d.ts.map +1 -1
  265. package/dist/schemas/dead-letters.js +0 -15
  266. package/dist/schemas/dead-letters.js.map +1 -1
  267. package/dist/schemas/game-locations.d.ts.map +1 -1
  268. package/dist/schemas/game-locations.js +0 -6
  269. package/dist/schemas/game-locations.js.map +1 -1
  270. package/dist/schemas/hardware-loan-contracts.d.ts.map +1 -1
  271. package/dist/schemas/hardware-loan-contracts.js +0 -13
  272. package/dist/schemas/hardware-loan-contracts.js.map +1 -1
  273. package/dist/schemas/index.d.ts.map +1 -1
  274. package/dist/schemas/index.js +0 -2
  275. package/dist/schemas/index.js.map +1 -1
  276. package/dist/schemas/leagues.d.ts.map +1 -1
  277. package/dist/schemas/leagues.js +0 -24
  278. package/dist/schemas/leagues.js.map +1 -1
  279. package/dist/schemas/migration-console.d.ts +58 -15
  280. package/dist/schemas/migration-console.d.ts.map +1 -1
  281. package/dist/schemas/migration-console.js +4 -34
  282. package/dist/schemas/migration-console.js.map +1 -1
  283. package/dist/schemas/pictures.d.ts.map +1 -1
  284. package/dist/schemas/pictures.js +0 -10
  285. package/dist/schemas/pictures.js.map +1 -1
  286. package/dist/schemas/schedules.d.ts.map +1 -1
  287. package/dist/schemas/schedules.js +0 -26
  288. package/dist/schemas/schedules.js.map +1 -1
  289. package/dist/schemas/scoring.d.ts +20 -26
  290. package/dist/schemas/scoring.d.ts.map +1 -1
  291. package/dist/schemas/scoring.js +0 -33
  292. package/dist/schemas/scoring.js.map +1 -1
  293. package/dist/schemas/signed-waivers.d.ts.map +1 -1
  294. package/dist/schemas/signed-waivers.js +0 -22
  295. package/dist/schemas/signed-waivers.js.map +1 -1
  296. package/dist/schemas/stats.d.ts +12 -0
  297. package/dist/schemas/stats.d.ts.map +1 -1
  298. package/dist/schemas/stats.js +21 -61
  299. package/dist/schemas/stats.js.map +1 -1
  300. package/dist/schemas/team-joining.d.ts.map +1 -1
  301. package/dist/schemas/team-joining.js +0 -30
  302. package/dist/schemas/team-joining.js.map +1 -1
  303. package/dist/schemas/teams.d.ts +0 -1
  304. package/dist/schemas/teams.d.ts.map +1 -1
  305. package/dist/schemas/teams.js +0 -83
  306. package/dist/schemas/teams.js.map +1 -1
  307. package/dist/schemas/uploads.d.ts +0 -8
  308. package/dist/schemas/uploads.d.ts.map +1 -1
  309. package/dist/schemas/uploads.js +0 -29
  310. package/dist/schemas/uploads.js.map +1 -1
  311. package/dist/schemas/users.d.ts +0 -1
  312. package/dist/schemas/users.d.ts.map +1 -1
  313. package/dist/schemas/users.js +0 -41
  314. package/dist/schemas/users.js.map +1 -1
  315. package/dist/schemas/waiver-templates.d.ts.map +1 -1
  316. package/dist/schemas/waiver-templates.js +0 -7
  317. package/dist/schemas/waiver-templates.js.map +1 -1
  318. package/dist/sports/basketball-scoring.d.ts +0 -4
  319. package/dist/sports/basketball-scoring.d.ts.map +1 -1
  320. package/dist/sports/basketball-scoring.js +0 -34
  321. package/dist/sports/basketball-scoring.js.map +1 -1
  322. package/dist/sports/basketball.d.ts.map +1 -1
  323. package/dist/sports/basketball.js +0 -5
  324. package/dist/sports/basketball.js.map +1 -1
  325. package/dist/sports/bulk-entry.d.ts +0 -22
  326. package/dist/sports/bulk-entry.d.ts.map +1 -1
  327. package/dist/sports/bulk-entry.js +0 -10
  328. package/dist/sports/bulk-entry.js.map +1 -1
  329. package/dist/sports/column-catalog.d.ts +0 -17
  330. package/dist/sports/column-catalog.d.ts.map +1 -1
  331. package/dist/sports/column-catalog.js +0 -10
  332. package/dist/sports/column-catalog.js.map +1 -1
  333. package/dist/sports/contribution.d.ts +2 -59
  334. package/dist/sports/contribution.d.ts.map +1 -1
  335. package/dist/sports/contribution.js +2 -45
  336. package/dist/sports/contribution.js.map +1 -1
  337. package/dist/sports/curling-scoring.d.ts +0 -1
  338. package/dist/sports/curling-scoring.d.ts.map +1 -1
  339. package/dist/sports/curling-scoring.js +0 -27
  340. package/dist/sports/curling-scoring.js.map +1 -1
  341. package/dist/sports/curling.d.ts.map +1 -1
  342. package/dist/sports/curling.js +0 -4
  343. package/dist/sports/curling.js.map +1 -1
  344. package/dist/sports/finalized-record.d.ts +2 -19
  345. package/dist/sports/finalized-record.d.ts.map +1 -1
  346. package/dist/sports/finalized-record.js +21 -22
  347. package/dist/sports/finalized-record.js.map +1 -1
  348. package/dist/sports/football-scoring.d.ts.map +1 -1
  349. package/dist/sports/football-scoring.js +0 -21
  350. package/dist/sports/football-scoring.js.map +1 -1
  351. package/dist/sports/football.d.ts.map +1 -1
  352. package/dist/sports/football.js +0 -4
  353. package/dist/sports/football.js.map +1 -1
  354. package/dist/sports/index.d.ts.map +1 -1
  355. package/dist/sports/index.js +0 -2
  356. package/dist/sports/index.js.map +1 -1
  357. package/dist/sports/ledger-continuity.d.ts +0 -2
  358. package/dist/sports/ledger-continuity.d.ts.map +1 -1
  359. package/dist/sports/ledger-continuity.js +0 -5
  360. package/dist/sports/ledger-continuity.js.map +1 -1
  361. package/dist/sports/lifetime-summary.d.ts +0 -6
  362. package/dist/sports/lifetime-summary.d.ts.map +1 -1
  363. package/dist/sports/lifetime-summary.js +0 -7
  364. package/dist/sports/lifetime-summary.js.map +1 -1
  365. package/dist/sports/rankings.d.ts +0 -12
  366. package/dist/sports/rankings.d.ts.map +1 -1
  367. package/dist/sports/rankings.js +0 -15
  368. package/dist/sports/rankings.js.map +1 -1
  369. package/dist/sports/registry.d.ts +0 -10
  370. package/dist/sports/registry.d.ts.map +1 -1
  371. package/dist/sports/registry.js +0 -9
  372. package/dist/sports/registry.js.map +1 -1
  373. package/dist/sports/replay.d.ts +0 -11
  374. package/dist/sports/replay.d.ts.map +1 -1
  375. package/dist/sports/replay.js +0 -16
  376. package/dist/sports/replay.js.map +1 -1
  377. package/dist/sports/rollup-check.d.ts +0 -7
  378. package/dist/sports/rollup-check.d.ts.map +1 -1
  379. package/dist/sports/rollup-check.js +0 -14
  380. package/dist/sports/rollup-check.js.map +1 -1
  381. package/dist/sports/score-mirror.d.ts +0 -1
  382. package/dist/sports/score-mirror.d.ts.map +1 -1
  383. package/dist/sports/score-mirror.js +0 -4
  384. package/dist/sports/score-mirror.js.map +1 -1
  385. package/dist/sports/scoring-display.d.ts +0 -30
  386. package/dist/sports/scoring-display.d.ts.map +1 -1
  387. package/dist/sports/scoring-display.js +0 -9
  388. package/dist/sports/scoring-display.js.map +1 -1
  389. package/dist/sports/scoring.d.ts +0 -36
  390. package/dist/sports/scoring.d.ts.map +1 -1
  391. package/dist/sports/scoring.js +0 -10
  392. package/dist/sports/scoring.js.map +1 -1
  393. package/dist/sports/shared-columns.d.ts +0 -1
  394. package/dist/sports/shared-columns.d.ts.map +1 -1
  395. package/dist/sports/shared-columns.js +0 -7
  396. package/dist/sports/shared-columns.js.map +1 -1
  397. package/dist/sports/sport-adapter.d.ts +0 -32
  398. package/dist/sports/sport-adapter.d.ts.map +1 -1
  399. package/dist/sports/sport-adapter.js +0 -7
  400. package/dist/sports/sport-adapter.js.map +1 -1
  401. package/dist/sports/store-driver.d.ts +0 -28
  402. package/dist/sports/store-driver.d.ts.map +1 -1
  403. package/dist/sports/store-driver.js +0 -38
  404. package/dist/sports/store-driver.js.map +1 -1
  405. package/dist/types/audit.d.ts +1 -1
  406. package/dist/types/audit.d.ts.map +1 -1
  407. package/dist/types/audit.js +1 -67
  408. package/dist/types/audit.js.map +1 -1
  409. package/dist/types/claims.d.ts +0 -10
  410. package/dist/types/claims.d.ts.map +1 -1
  411. package/dist/types/claims.js +0 -16
  412. package/dist/types/claims.js.map +1 -1
  413. package/dist/types/notifications.d.ts.map +1 -1
  414. package/dist/types/notifications.js +7 -25
  415. package/dist/types/notifications.js.map +1 -1
  416. package/dist/types/picture-owners.d.ts +0 -1
  417. package/dist/types/picture-owners.d.ts.map +1 -1
  418. package/dist/types/picture-owners.js +0 -6
  419. package/dist/types/picture-owners.js.map +1 -1
  420. package/dist/types/schedules.d.ts.map +1 -1
  421. package/dist/types/schedules.js +0 -9
  422. package/dist/types/schedules.js.map +1 -1
  423. package/dist/types/sports.d.ts.map +1 -1
  424. package/dist/types/sports.js +0 -24
  425. package/dist/types/sports.js.map +1 -1
  426. package/dist/types/stats.d.ts.map +1 -1
  427. package/dist/types/stats.js +0 -65
  428. package/dist/types/stats.js.map +1 -1
  429. package/dist/types/unions.d.ts +0 -2
  430. package/dist/types/unions.d.ts.map +1 -1
  431. package/dist/types/unions.js +3 -91
  432. package/dist/types/unions.js.map +1 -1
  433. package/dist/types/uploads.d.ts.map +1 -1
  434. package/dist/types/uploads.js +0 -7
  435. package/dist/types/uploads.js.map +1 -1
  436. package/dist/upload-variables/on-progress.d.ts.map +1 -1
  437. package/dist/upload-variables/on-progress.js +2 -5
  438. package/dist/upload-variables/on-progress.js.map +1 -1
  439. package/dist/upload-variables/picture-upload-variables.d.ts +0 -1
  440. package/dist/upload-variables/picture-upload-variables.d.ts.map +1 -1
  441. package/dist/upload-variables/picture-upload-variables.js +0 -4
  442. package/dist/upload-variables/picture-upload-variables.js.map +1 -1
  443. package/dist/upload-variables/sign-hardware-contract-variables.d.ts.map +1 -1
  444. package/dist/upload-variables/sign-hardware-contract-variables.js +0 -2
  445. package/dist/upload-variables/sign-hardware-contract-variables.js.map +1 -1
  446. package/dist/upload-variables/sign-waiver-variables.d.ts.map +1 -1
  447. package/dist/upload-variables/sign-waiver-variables.js +0 -4
  448. package/dist/upload-variables/sign-waiver-variables.js.map +1 -1
  449. package/dist/utils/account-status.d.ts.map +1 -1
  450. package/dist/utils/account-status.js +0 -4
  451. package/dist/utils/account-status.js.map +1 -1
  452. package/dist/utils/app-config.d.ts +0 -53
  453. package/dist/utils/app-config.d.ts.map +1 -1
  454. package/dist/utils/app-config.js +0 -62
  455. package/dist/utils/app-config.js.map +1 -1
  456. package/dist/utils/display-name.d.ts +0 -7
  457. package/dist/utils/display-name.d.ts.map +1 -1
  458. package/dist/utils/display-name.js +0 -8
  459. package/dist/utils/display-name.js.map +1 -1
  460. package/dist/utils/index.d.ts +1 -0
  461. package/dist/utils/index.d.ts.map +1 -1
  462. package/dist/utils/index.js +1 -0
  463. package/dist/utils/index.js.map +1 -1
  464. package/dist/utils/league-calendar.d.ts +0 -11
  465. package/dist/utils/league-calendar.d.ts.map +1 -1
  466. package/dist/utils/league-calendar.js +7 -19
  467. package/dist/utils/league-calendar.js.map +1 -1
  468. package/dist/utils/league-join-warning.d.ts +0 -11
  469. package/dist/utils/league-join-warning.d.ts.map +1 -1
  470. package/dist/utils/league-join-warning.js +0 -28
  471. package/dist/utils/league-join-warning.js.map +1 -1
  472. package/dist/utils/league-joining.d.ts +0 -1
  473. package/dist/utils/league-joining.d.ts.map +1 -1
  474. package/dist/utils/league-joining.js +0 -7
  475. package/dist/utils/league-joining.js.map +1 -1
  476. package/dist/utils/league-mode.d.ts +0 -1
  477. package/dist/utils/league-mode.d.ts.map +1 -1
  478. package/dist/utils/league-mode.js +0 -4
  479. package/dist/utils/league-mode.js.map +1 -1
  480. package/dist/utils/schedules.d.ts +0 -15
  481. package/dist/utils/schedules.d.ts.map +1 -1
  482. package/dist/utils/schedules.js +0 -19
  483. package/dist/utils/schedules.js.map +1 -1
  484. package/dist/utils/stats-operation-request.d.ts +20 -0
  485. package/dist/utils/stats-operation-request.d.ts.map +1 -0
  486. package/dist/utils/stats-operation-request.js +10 -0
  487. package/dist/utils/stats-operation-request.js.map +1 -0
  488. package/dist/utils/team-creation.d.ts +0 -2
  489. package/dist/utils/team-creation.d.ts.map +1 -1
  490. package/dist/utils/team-creation.js +0 -6
  491. package/dist/utils/team-creation.js.map +1 -1
  492. package/dist/utils/team-member-actions.d.ts +0 -6
  493. package/dist/utils/team-member-actions.d.ts.map +1 -1
  494. package/dist/utils/team-member-actions.js +0 -12
  495. package/dist/utils/team-member-actions.js.map +1 -1
  496. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"football.js","sourceRoot":"","sources":["../../src/sports/football.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,mDAAmD;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,mBAAmB,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,wBAAwB,CAAC,QAAQ;IAC3C,UAAU,EAAE,6BAA6B;IACzC,YAAY,EAAE,uBAAuB;IACrC,cAAc,EAAE,yBAAyB;IACzC,UAAU,EAAE,KAAK;IACjB,kBAAkB,EAAE,KAAK;IACzB,WAAW,EAAE,kBAAkB,CAAC,QAAQ;IACxC,GAAG,gBAAgB;IACnB,OAAO,EAAE;QACP,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,cAAc;QACvB,eAAe,EAAE,0BAA0B,CAAC,mBAAmB,CAAC;QAChE,WAAW,EAAE,qBAAqB;QAClC,WAAW,EAAE,qBAAqB;QAClC,aAAa,EAAE,qBAAqB;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CAC/B,CAAC","sourcesContent":["// The football adapter: team-scored, with no individual stats — every present roster entry is\n// credited a game played — no finish rule, and no hall of fame. Its scoring, display, and\n// bulk-entry members are in ./football-scoring.ts.\n\nimport { SPORT_LINE_SCHEMAS } from '../doc-schemas/aggregate-stats.js';\nimport {\n FOOTBALL_PLAYER_STAT_KEYS,\n FOOTBALL_STAT_EVENT_TYPE_KEYS,\n FOOTBALL_TEAM_STAT_KEYS,\n SPORT_KEY_BY_LEAGUE_TYPE,\n} from '../types/sports.js';\nimport {\n FOOTBALL_BULK_ENTRY,\n FOOTBALL_EVENT_LABELS,\n FOOTBALL_FIELD_LABELS,\n FOOTBALL_SCOREBOARD,\n FOOTBALL_SCORING,\n FOOTBALL_SCORING_PANEL,\n describeFootballEvent,\n emptyFootballTeamLine,\n} from './football-scoring.js';\nimport { lifetimeSummaryFromColumns } from './lifetime-summary.js';\nimport {\n GAMES_PLAYED_COLUMN,\n TEAM_SEASON_BASE_COLUMN,\n TEAM_SEASON_BASE_COLUMNS,\n} from './shared-columns.js';\nimport type { SportAdapter } from './sport-adapter.js';\n\nconst playerTotalsColumns = [GAMES_PLAYED_COLUMN];\n\nexport const FOOTBALL_ADAPTER: SportAdapter<'Football'> = {\n leagueType: 'Football',\n sportKey: SPORT_KEY_BY_LEAGUE_TYPE.Football,\n eventTypes: FOOTBALL_STAT_EVENT_TYPE_KEYS,\n teamStatKeys: FOOTBALL_TEAM_STAT_KEYS,\n playerStatKeys: FOOTBALL_PLAYER_STAT_KEYS,\n hallOfFame: false,\n historicalBaseline: false,\n lineSchemas: SPORT_LINE_SCHEMAS.Football,\n ...FOOTBALL_SCORING,\n display: {\n label: 'Football',\n iconKey: 'footballBall',\n lifetimeSummary: lifetimeSummaryFromColumns(playerTotalsColumns),\n eventLabels: FOOTBALL_EVENT_LABELS,\n fieldLabels: FOOTBALL_FIELD_LABELS,\n describeEvent: describeFootballEvent,\n scoreboard: FOOTBALL_SCOREBOARD,\n scoringPanel: FOOTBALL_SCORING_PANEL,\n },\n columns: {\n playerTotals: {\n columns: playerTotalsColumns,\n defaultSort: [{ columnId: GAMES_PLAYED_COLUMN.id, direction: 'desc' }],\n defaultLayout: [GAMES_PLAYED_COLUMN.id],\n },\n // No player game line, so the game page renders no player table.\n gamePlayer: { columns: [], defaultSort: [], defaultLayout: [] },\n teamSeason: {\n columns: TEAM_SEASON_BASE_COLUMNS,\n defaultSort: [\n { columnId: TEAM_SEASON_BASE_COLUMN.wins.id, direction: 'desc' },\n { columnId: TEAM_SEASON_BASE_COLUMN.losses.id, direction: 'asc' },\n { columnId: TEAM_SEASON_BASE_COLUMN.pointDifferential.id, direction: 'desc' },\n ],\n defaultLayout: [\n TEAM_SEASON_BASE_COLUMN.wins.id,\n TEAM_SEASON_BASE_COLUMN.losses.id,\n TEAM_SEASON_BASE_COLUMN.ties.id,\n TEAM_SEASON_BASE_COLUMN.pointsFor.id,\n TEAM_SEASON_BASE_COLUMN.pointsAgainst.id,\n ],\n },\n },\n emptyStats: (game) => ({\n teamStats: Object.fromEntries(game.teamIds.map((teamId) => [teamId, emptyFootballTeamLine()])),\n playerStats: {},\n }),\n bulkEntry: FOOTBALL_BULK_ENTRY,\n};\n"]}
1
+ {"version":3,"file":"football.js","sourceRoot":"","sources":["../../src/sports/football.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM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AAE,SAAS,EAAE,MAAM,EAAE;aAC9E;YACD,aAAa,EAAE;gBACb,uBAAuB,CAAC,IAAI,CAAC,EAAE;gBAC/B,uBAAuB,CAAC,MAAM,CAAC,EAAE;gBACjC,uBAAuB,CAAC,IAAI,CAAC,EAAE;gBAC/B,uBAAuB,CAAC,SAAS,CAAC,EAAE;gBACpC,uBAAuB,CAAC,aAAa,CAAC,EAAE;aACzC;SACF;KACF;IACD,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC;QAC9F,WAAW,EAAE,EAAE;KAChB,CAAC;IACF,SAAS,EAAE,mBAAmB;CAC/B,CAAC","sourcesContent":["import { SPORT_LINE_SCHEMAS } from '../doc-schemas/aggregate-stats.js';\nimport {\n FOOTBALL_PLAYER_STAT_KEYS,\n FOOTBALL_STAT_EVENT_TYPE_KEYS,\n FOOTBALL_TEAM_STAT_KEYS,\n SPORT_KEY_BY_LEAGUE_TYPE,\n} from '../types/sports.js';\nimport {\n FOOTBALL_BULK_ENTRY,\n FOOTBALL_EVENT_LABELS,\n FOOTBALL_FIELD_LABELS,\n FOOTBALL_SCOREBOARD,\n FOOTBALL_SCORING,\n FOOTBALL_SCORING_PANEL,\n describeFootballEvent,\n emptyFootballTeamLine,\n} from './football-scoring.js';\nimport { lifetimeSummaryFromColumns } from './lifetime-summary.js';\nimport {\n GAMES_PLAYED_COLUMN,\n TEAM_SEASON_BASE_COLUMN,\n TEAM_SEASON_BASE_COLUMNS,\n} from './shared-columns.js';\nimport type { SportAdapter } from './sport-adapter.js';\n\nconst playerTotalsColumns = [GAMES_PLAYED_COLUMN];\n\nexport const FOOTBALL_ADAPTER: SportAdapter<'Football'> = {\n leagueType: 'Football',\n sportKey: SPORT_KEY_BY_LEAGUE_TYPE.Football,\n eventTypes: FOOTBALL_STAT_EVENT_TYPE_KEYS,\n teamStatKeys: FOOTBALL_TEAM_STAT_KEYS,\n playerStatKeys: FOOTBALL_PLAYER_STAT_KEYS,\n hallOfFame: false,\n historicalBaseline: false,\n lineSchemas: SPORT_LINE_SCHEMAS.Football,\n ...FOOTBALL_SCORING,\n display: {\n label: 'Football',\n iconKey: 'footballBall',\n lifetimeSummary: lifetimeSummaryFromColumns(playerTotalsColumns),\n eventLabels: FOOTBALL_EVENT_LABELS,\n fieldLabels: FOOTBALL_FIELD_LABELS,\n describeEvent: describeFootballEvent,\n scoreboard: FOOTBALL_SCOREBOARD,\n scoringPanel: FOOTBALL_SCORING_PANEL,\n },\n columns: {\n playerTotals: {\n columns: playerTotalsColumns,\n defaultSort: [{ columnId: GAMES_PLAYED_COLUMN.id, direction: 'desc' }],\n defaultLayout: [GAMES_PLAYED_COLUMN.id],\n },\n gamePlayer: { columns: [], defaultSort: [], defaultLayout: [] },\n teamSeason: {\n columns: TEAM_SEASON_BASE_COLUMNS,\n defaultSort: [\n { columnId: TEAM_SEASON_BASE_COLUMN.wins.id, direction: 'desc' },\n { columnId: TEAM_SEASON_BASE_COLUMN.losses.id, direction: 'asc' },\n { columnId: TEAM_SEASON_BASE_COLUMN.pointDifferential.id, direction: 'desc' },\n ],\n defaultLayout: [\n TEAM_SEASON_BASE_COLUMN.wins.id,\n TEAM_SEASON_BASE_COLUMN.losses.id,\n TEAM_SEASON_BASE_COLUMN.ties.id,\n TEAM_SEASON_BASE_COLUMN.pointsFor.id,\n TEAM_SEASON_BASE_COLUMN.pointsAgainst.id,\n ],\n },\n },\n emptyStats: (game) => ({\n teamStats: Object.fromEntries(game.teamIds.map((teamId) => [teamId, emptyFootballTeamLine()])),\n playerStats: {},\n }),\n bulkEntry: FOOTBALL_BULK_ENTRY,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sports/index.ts"],"names":[],"mappings":"AAGA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sports/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,5 +1,3 @@
1
- // The sport adapters. A sport is selected only through the registry (RULE-QS-SPORT-902), so the individual
2
- // adapters are not exported.
3
1
  export * from './column-catalog.js';
4
2
  export * from './sport-adapter.js';
5
3
  export * from './shared-columns.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sports/index.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,6BAA6B;AAE7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAMlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["// The sport adapters. A sport is selected only through the registry (RULE-QS-SPORT-902), so the individual\n// adapters are not exported.\n\nexport * from './column-catalog.js';\nexport * from './sport-adapter.js';\nexport * from './shared-columns.js';\nexport * from './scoring.js';\nexport * from './scoring-display.js';\nexport * from './bulk-entry.js';\nexport * from './replay.js';\nexport * from './ledger-continuity.js';\nexport * from './store-driver.js';\nexport * from './contribution.js';\nexport * from './finalized-record.js';\nexport * from './rankings.js';\nexport * from './rollup-check.js';\nexport type {\n LifetimeSummary,\n LifetimeSummaryAverage,\n LifetimeSummaryTotal,\n} from './lifetime-summary.js';\nexport { basketballFantasyPoints } from './basketball-scoring.js';\nexport {\n SPORT_ADAPTERS,\n SPORT_ADAPTER_LIST,\n UnknownSportError,\n getSportAdapter,\n} from './registry.js';\nexport { gameScoreMirror } from './score-mirror.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sports/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAMlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export * from './column-catalog.js';\nexport * from './sport-adapter.js';\nexport * from './shared-columns.js';\nexport * from './scoring.js';\nexport * from './scoring-display.js';\nexport * from './bulk-entry.js';\nexport * from './replay.js';\nexport * from './ledger-continuity.js';\nexport * from './store-driver.js';\nexport * from './contribution.js';\nexport * from './finalized-record.js';\nexport * from './rankings.js';\nexport * from './rollup-check.js';\nexport type {\n LifetimeSummary,\n LifetimeSummaryAverage,\n LifetimeSummaryTotal,\n} from './lifetime-summary.js';\nexport { basketballFantasyPoints } from './basketball-scoring.js';\nexport {\n SPORT_ADAPTERS,\n SPORT_ADAPTER_LIST,\n UnknownSportError,\n getSportAdapter,\n} from './registry.js';\nexport { gameScoreMirror } from './score-mirror.js';\n"]}
@@ -1,4 +1,3 @@
1
- /** The first place a ledger departs from 1..n: a sequence missing, or one held by two events. */
2
1
  export type LedgerContinuityBreak = {
3
2
  readonly kind: 'gap';
4
3
  readonly missingSequence: number;
@@ -6,7 +5,6 @@ export type LedgerContinuityBreak = {
6
5
  readonly kind: 'duplicate';
7
6
  readonly sequence: number;
8
7
  };
9
- /** `null` when the events hold exactly the sequences 1..n (an empty ledger included); otherwise the first break. */
10
8
  export declare function findLedgerContinuityBreak(events: readonly {
11
9
  readonly sequence: number;
12
10
  }[]): LedgerContinuityBreak | null;
@@ -1 +1 @@
1
- {"version":3,"file":"ledger-continuity.d.ts","sourceRoot":"","sources":["../../src/sports/ledger-continuity.ts"],"names":[],"mappings":"AAKA,iGAAiG;AACjG,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,oHAAoH;AACpH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAAE,GAC/C,qBAAqB,GAAG,IAAI,CAU9B"}
1
+ {"version":3,"file":"ledger-continuity.d.ts","sourceRoot":"","sources":["../../src/sports/ledger-continuity.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAAE,GAC/C,qBAAqB,GAAG,IAAI,CAU9B"}
@@ -1,8 +1,3 @@
1
- // Whether a game's event ledger holds exactly the sequences 1..n. `statEventSequence` is both the
2
- // number of events and the last sequence given, so a gap or a duplicate is out-of-band damage: the
3
- // check reports it, and finalize and the restore refuse it. The event documents are the source of
4
- // truth (RULE-QS-SPORT-911), so nothing renumbers them to close a gap.
5
- /** `null` when the events hold exactly the sequences 1..n (an empty ledger included); otherwise the first break. */
6
1
  export function findLedgerContinuityBreak(events) {
7
2
  const sequences = events.map((event) => event.sequence).sort((left, right) => left - right);
8
3
  for (let index = 0; index < sequences.length; index += 1) {
@@ -1 +1 @@
1
- {"version":3,"file":"ledger-continuity.js","sourceRoot":"","sources":["../../src/sports/ledger-continuity.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,mGAAmG;AACnG,kGAAkG;AAClG,uEAAuE;AAOvE,oHAAoH;AACpH,MAAM,UAAU,yBAAyB,CACvC,MAAgD;IAEhD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;IAC5F,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACzD,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,QAAQ,KAAK,QAAQ;YAAE,SAAS;QACpC,IAAI,KAAK,GAAG,CAAC,IAAI,QAAQ,KAAK,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;QAC3F,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Whether a game's event ledger holds exactly the sequences 1..n. `statEventSequence` is both the\n// number of events and the last sequence given, so a gap or a duplicate is out-of-band damage: the\n// check reports it, and finalize and the restore refuse it. The event documents are the source of\n// truth (RULE-QS-SPORT-911), so nothing renumbers them to close a gap.\n\n/** The first place a ledger departs from 1..n: a sequence missing, or one held by two events. */\nexport type LedgerContinuityBreak =\n | { readonly kind: 'gap'; readonly missingSequence: number }\n | { readonly kind: 'duplicate'; readonly sequence: number };\n\n/** `null` when the events hold exactly the sequences 1..n (an empty ledger included); otherwise the first break. */\nexport function findLedgerContinuityBreak(\n events: readonly { readonly sequence: number }[],\n): LedgerContinuityBreak | null {\n const sequences = events.map((event) => event.sequence).sort((left, right) => left - right);\n for (let index = 0; index < sequences.length; index += 1) {\n const expected = index + 1;\n const sequence = sequences[index];\n if (sequence === expected) continue;\n if (index > 0 && sequence === sequences[index - 1]) return { kind: 'duplicate', sequence };\n return { kind: 'gap', missingSequence: expected };\n }\n return null;\n}\n"]}
1
+ {"version":3,"file":"ledger-continuity.js","sourceRoot":"","sources":["../../src/sports/ledger-continuity.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,yBAAyB,CACvC,MAAgD;IAEhD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;IAC5F,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACzD,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,QAAQ,KAAK,QAAQ;YAAE,SAAS;QACpC,IAAI,KAAK,GAAG,CAAC,IAAI,QAAQ,KAAK,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC;YAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;QAC3F,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["export type LedgerContinuityBreak =\n | { readonly kind: 'gap'; readonly missingSequence: number }\n | { readonly kind: 'duplicate'; readonly sequence: number };\n\nexport function findLedgerContinuityBreak(\n events: readonly { readonly sequence: number }[],\n): LedgerContinuityBreak | null {\n const sequences = events.map((event) => event.sequence).sort((left, right) => left - right);\n for (let index = 0; index < sequences.length; index += 1) {\n const expected = index + 1;\n const sequence = sequences[index];\n if (sequence === expected) continue;\n if (index > 0 && sequence === sequences[index - 1]) return { kind: 'duplicate', sequence };\n return { kind: 'gap', missingSequence: expected };\n }\n return null;\n}\n"]}
@@ -5,7 +5,6 @@ export interface LifetimeSummaryTotal<Line> {
5
5
  readonly shortLabel: string;
6
6
  readonly value: (line: Line) => number;
7
7
  }
8
- /** A per-game average, `null` at zero games played. */
9
8
  export interface LifetimeSummaryAverage<Line> {
10
9
  readonly id: string;
11
10
  readonly label: string;
@@ -14,12 +13,7 @@ export interface LifetimeSummaryAverage<Line> {
14
13
  }
15
14
  export interface LifetimeSummary<Line> {
16
15
  readonly totals: readonly LifetimeSummaryTotal<Line>[];
17
- /** Empty for a sport that counts games played only: its summary has no averages line. */
18
16
  readonly averages: readonly LifetimeSummaryAverage<Line>[];
19
17
  }
20
- /**
21
- * The summary a sport's player-totals columns describe: every column's total, and the per-game
22
- * variant of every column that has one, through `perGameAverage` over the line's games played.
23
- */
24
18
  export declare function lifetimeSummaryFromColumns<Line extends GamesPlayedRow>(columns: readonly StatColumn<Line>[]): LifetimeSummary<Line>;
25
19
  //# sourceMappingURL=lifetime-summary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lifetime-summary.d.ts","sourceRoot":"","sources":["../../src/sports/lifetime-summary.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAiB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAErF,MAAM,WAAW,oBAAoB,CAAC,IAAI;IACxC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;CACxC;AAED,uDAAuD;AACvD,MAAM,WAAW,sBAAsB,CAAC,IAAI;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,eAAe,CAAC,IAAI;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;IACvD,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,EAAE,SAAS,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC;CAC5D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,SAAS,cAAc,EACpE,OAAO,EAAE,SAAS,UAAU,CAAC,IAAI,CAAC,EAAE,GACnC,eAAe,CAAC,IAAI,CAAC,CAsBvB"}
1
+ {"version":3,"file":"lifetime-summary.d.ts","sourceRoot":"","sources":["../../src/sports/lifetime-summary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAiB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAErF,MAAM,WAAW,oBAAoB,CAAC,IAAI;IACxC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB,CAAC,IAAI;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,eAAe,CAAC,IAAI;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;IACvD,QAAQ,CAAC,QAAQ,EAAE,SAAS,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC;CAC5D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,SAAS,cAAc,EACpE,OAAO,EAAE,SAAS,UAAU,CAAC,IAAI,CAAC,EAAE,GACnC,eAAe,CAAC,IAAI,CAAC,CAsBvB"}
@@ -1,11 +1,4 @@
1
- // The profile's lifetime summary for one sport: its totals, and directly beneath them its per-game
2
- // averages. It is not a stats table — no View menu, no hidden figures — but it shows the same
3
- // figures the sport's player-totals table offers, with the same labels, so each is declared once.
4
1
  import { perGameAverage } from './column-catalog.js';
5
- /**
6
- * The summary a sport's player-totals columns describe: every column's total, and the per-game
7
- * variant of every column that has one, through `perGameAverage` over the line's games played.
8
- */
9
2
  export function lifetimeSummaryFromColumns(columns) {
10
3
  const totals = columns.map((column) => ({
11
4
  id: column.id,
@@ -1 +1 @@
1
- {"version":3,"file":"lifetime-summary.js","sourceRoot":"","sources":["../../src/sports/lifetime-summary.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,8FAA8F;AAC9F,kGAAkG;AAElG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAwBrD;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAAoC;IAEpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACtC,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAC,CAAC;IACJ,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAC1C,uFAAuF;QACvF,mEAAmE;QACnE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAoC,CAAC;QAC5D,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC;aAC5E;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["// The profile's lifetime summary for one sport: its totals, and directly beneath them its per-game\n// averages. It is not a stats table — no View menu, no hidden figures — but it shows the same\n// figures the sport's player-totals table offers, with the same labels, so each is declared once.\n\nimport { perGameAverage } from './column-catalog.js';\nimport type { GamesPlayedRow, PerGameColumn, StatColumn } from './column-catalog.js';\n\nexport interface LifetimeSummaryTotal<Line> {\n readonly id: string;\n readonly label: string;\n readonly shortLabel: string;\n readonly value: (line: Line) => number;\n}\n\n/** A per-game average, `null` at zero games played. */\nexport interface LifetimeSummaryAverage<Line> {\n readonly id: string;\n readonly label: string;\n readonly shortLabel: string;\n readonly value: (line: Line) => number | null;\n}\n\nexport interface LifetimeSummary<Line> {\n readonly totals: readonly LifetimeSummaryTotal<Line>[];\n /** Empty for a sport that counts games played only: its summary has no averages line. */\n readonly averages: readonly LifetimeSummaryAverage<Line>[];\n}\n\n/**\n * The summary a sport's player-totals columns describe: every column's total, and the per-game\n * variant of every column that has one, through `perGameAverage` over the line's games played.\n */\nexport function lifetimeSummaryFromColumns<Line extends GamesPlayedRow>(\n columns: readonly StatColumn<Line>[],\n): LifetimeSummary<Line> {\n const totals = columns.map((column) => ({\n id: column.id,\n label: column.label,\n shortLabel: column.shortLabel,\n value: column.value,\n }));\n const averages = columns.flatMap((column) => {\n // Over a generic line the member's conditional type cannot be resolved; `Line` carries\n // `gamesPlayed`, so where the member exists it is a PerGameColumn.\n const perGame = column.perGame as PerGameColumn | undefined;\n if (!perGame) return [];\n return [\n {\n id: perGame.id,\n label: perGame.label,\n shortLabel: perGame.shortLabel,\n value: (line: Line) => perGameAverage(column.value(line), line.gamesPlayed),\n },\n ];\n });\n return { totals, averages };\n}\n"]}
1
+ {"version":3,"file":"lifetime-summary.js","sourceRoot":"","sources":["../../src/sports/lifetime-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAsBrD,MAAM,UAAU,0BAA0B,CACxC,OAAoC;IAEpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACtC,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAC,CAAC;IACJ,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAC1C,uFAAuF;QACvF,mEAAmE;QACnE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAoC,CAAC;QAC5D,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC;aAC5E;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import { perGameAverage } from './column-catalog.js';\nimport type { GamesPlayedRow, PerGameColumn, StatColumn } from './column-catalog.js';\n\nexport interface LifetimeSummaryTotal<Line> {\n readonly id: string;\n readonly label: string;\n readonly shortLabel: string;\n readonly value: (line: Line) => number;\n}\n\nexport interface LifetimeSummaryAverage<Line> {\n readonly id: string;\n readonly label: string;\n readonly shortLabel: string;\n readonly value: (line: Line) => number | null;\n}\n\nexport interface LifetimeSummary<Line> {\n readonly totals: readonly LifetimeSummaryTotal<Line>[];\n readonly averages: readonly LifetimeSummaryAverage<Line>[];\n}\n\nexport function lifetimeSummaryFromColumns<Line extends GamesPlayedRow>(\n columns: readonly StatColumn<Line>[],\n): LifetimeSummary<Line> {\n const totals = columns.map((column) => ({\n id: column.id,\n label: column.label,\n shortLabel: column.shortLabel,\n value: column.value,\n }));\n const averages = columns.flatMap((column) => {\n // Over a generic line the member's conditional type cannot be resolved; `Line` carries\n // `gamesPlayed`, so where the member exists it is a PerGameColumn.\n const perGame = column.perGame as PerGameColumn | undefined;\n if (!perGame) return [];\n return [\n {\n id: perGame.id,\n label: perGame.label,\n shortLabel: perGame.shortLabel,\n value: (line: Line) => perGameAverage(column.value(line), line.gamesPlayed),\n },\n ];\n });\n return { totals, averages };\n}\n"]}
@@ -2,37 +2,25 @@ import type { GameStatus } from '../types/unions.js';
2
2
  import type { FinalizedGame } from './contribution.js';
3
3
  import type { StatLineValues } from './scoring.js';
4
4
  import type { AnySportAdapter } from './sport-adapter.js';
5
- /** One rankings row: a person's games for one team, keyed by the membership the team, league, and person name. */
6
5
  export interface RankingRow {
7
6
  readonly teamId: string;
8
7
  readonly userId: string;
9
8
  readonly line: StatLineValues;
10
9
  }
11
- /** The season rows: every team's stored per-membership rows, one per team a player played for. */
12
10
  export declare function seasonRankingRows(teams: readonly {
13
11
  readonly teamId: string;
14
12
  readonly playerSeasonStats?: Readonly<Record<string, StatLineValues>>;
15
13
  }[]): RankingRow[];
16
- /** A saved schedule week as the rankings' week filter offers it. */
17
14
  export interface PlayedWeek {
18
15
  readonly weekId: string;
19
16
  readonly weekTitle: string;
20
17
  readonly weekStartDate: number;
21
18
  }
22
- /**
23
- * The weeks the filter offers: every saved week holding at least one completed game, in the order
24
- * the weeks start, taken from the game documents the league schedule already loads.
25
- */
26
19
  export declare function playedWeeks(games: readonly {
27
20
  readonly weekId: string;
28
21
  readonly weekTitle: string;
29
22
  readonly weekStartDate: number;
30
23
  readonly status: GameStatus;
31
24
  }[]): PlayedWeek[];
32
- /**
33
- * One week's rows: the summed contributions of the week's completed games, each read from its
34
- * finalized record (`finalizedGameFromRecord`). A player who played both sides of a game that week
35
- * has a row on each team.
36
- */
37
25
  export declare function weekRankingRows(adapter: AnySportAdapter, games: readonly FinalizedGame[]): RankingRow[];
38
26
  //# sourceMappingURL=rankings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rankings.d.ts","sourceRoot":"","sources":["../../src/sports/rankings.ts"],"names":[],"mappings":"AAOA,OA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","sources":["../../src/sports/rankings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS;IACd,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;CACvE,EAAE,GACF,UAAU,EAAE,CAId;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS;IACd,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;CAC7B,EAAE,GACF,UAAU,EAAE,CAcd;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,SAAS,aAAa,EAAE,GAC9B,UAAU,EAAE,CASd"}
@@ -1,19 +1,9 @@
1
- // The league's player rankings: one row per team a player played for, for the whole season or for
2
- // one saved week. The season rows are the teams' stored
3
- // per-membership rows; a week's rows are derived at read, never stored — the contributions of that
4
- // week's completed games summed through the same mapping finalize applies, so a week's rows over
5
- // every week add up to the season's.
6
1
  import { COMPLETED_GAME_STATUS } from '../types/unions.js';
7
2
  import { parseGameRosterPlayerId } from '../ids/compound-ids.js';
8
3
  import { sumGameContributions } from './contribution.js';
9
- /** The season rows: every team's stored per-membership rows, one per team a player played for. */
10
4
  export function seasonRankingRows(teams) {
11
5
  return teams.flatMap(({ teamId, playerSeasonStats }) => Object.entries(playerSeasonStats ?? {}).map(([userId, line]) => ({ teamId, userId, line })));
12
6
  }
13
- /**
14
- * The weeks the filter offers: every saved week holding at least one completed game, in the order
15
- * the weeks start, taken from the game documents the league schedule already loads.
16
- */
17
7
  export function playedWeeks(games) {
18
8
  const weeks = new Map();
19
9
  for (const game of games) {
@@ -27,11 +17,6 @@ export function playedWeeks(games) {
27
17
  }
28
18
  return [...weeks.values()].sort((left, right) => left.weekStartDate - right.weekStartDate || left.weekId.localeCompare(right.weekId));
29
19
  }
30
- /**
31
- * One week's rows: the summed contributions of the week's completed games, each read from its
32
- * finalized record (`finalizedGameFromRecord`). A player who played both sides of a game that week
33
- * has a row on each team.
34
- */
35
20
  export function weekRankingRows(adapter, games) {
36
21
  const summed = sumGameContributions(adapter.deriveLine, games.map((game) => ({ contribution: adapter.contribution(game), sign: 1 })));
37
22
  return Object.entries(summed.membershipRows).flatMap(([entryId, line]) => {
@@ -1 +1 @@
1
- {"version":3,"file":"rankings.js","sourceRoot":"","sources":["../../src/sports/rankings.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,wDAAwD;AACxD,mGAAmG;AACnG,iGAAiG;AACjG,qCAAqC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAYzD,kGAAkG;AA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Y,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAU,EAAE,CAAC,CAAC,CACtF,CAAC;IACF,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;QACvE,MAAM,KAAK,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// The league's player rankings: one row per team a player played for, for the whole season or for\n// one saved week. The season rows are the teams' stored\n// per-membership rows; a week's rows are derived at read, never stored — the contributions of that\n// week's completed games summed through the same mapping finalize applies, so a week's rows over\n// every week add up to the season's.\n\nimport { COMPLETED_GAME_STATUS } from '../types/unions.js';\nimport type { GameStatus } from '../types/unions.js';\nimport { parseGameRosterPlayerId } from '../ids/compound-ids.js';\nimport { sumGameContributions } from './contribution.js';\nimport type { FinalizedGame } from './contribution.js';\nimport type { StatLineValues } from './scoring.js';\nimport type { AnySportAdapter } from './sport-adapter.js';\n\n/** One rankings row: a person's games for one team, keyed by the membership the team, league, and person name. */\nexport interface RankingRow {\n readonly teamId: string;\n readonly userId: string;\n readonly line: StatLineValues;\n}\n\n/** The season rows: every team's stored per-membership rows, one per team a player played for. */\nexport function seasonRankingRows(\n teams: readonly {\n readonly teamId: string;\n readonly playerSeasonStats?: Readonly<Record<string, StatLineValues>>;\n }[],\n): RankingRow[] {\n return teams.flatMap(({ teamId, playerSeasonStats }) =>\n Object.entries(playerSeasonStats ?? {}).map(([userId, line]) => ({ teamId, userId, line })),\n );\n}\n\n/** A saved schedule week as the rankings' week filter offers it. */\nexport interface PlayedWeek {\n readonly weekId: string;\n readonly weekTitle: string;\n readonly weekStartDate: number;\n}\n\n/**\n * The weeks the filter offers: every saved week holding at least one completed game, in the order\n * the weeks start, taken from the game documents the league schedule already loads.\n */\nexport function playedWeeks(\n games: readonly {\n readonly weekId: string;\n readonly weekTitle: string;\n readonly weekStartDate: number;\n readonly status: GameStatus;\n }[],\n): PlayedWeek[] {\n const weeks = new Map<string, PlayedWeek>();\n for (const game of games) {\n if (game.status !== COMPLETED_GAME_STATUS || weeks.has(game.weekId)) continue;\n weeks.set(game.weekId, {\n weekId: game.weekId,\n weekTitle: game.weekTitle,\n weekStartDate: game.weekStartDate,\n });\n }\n return [...weeks.values()].sort(\n (left, right) =>\n left.weekStartDate - right.weekStartDate || left.weekId.localeCompare(right.weekId),\n );\n}\n\n/**\n * One week's rows: the summed contributions of the week's completed games, each read from its\n * finalized record (`finalizedGameFromRecord`). A player who played both sides of a game that week\n * has a row on each team.\n */\nexport function weekRankingRows(\n adapter: AnySportAdapter,\n games: readonly FinalizedGame[],\n): RankingRow[] {\n const summed = sumGameContributions(\n adapter.deriveLine,\n games.map((game) => ({ contribution: adapter.contribution(game), sign: 1 as const })),\n );\n return Object.entries(summed.membershipRows).flatMap(([entryId, line]) => {\n const entry = parseGameRosterPlayerId(entryId);\n return entry === null ? [] : [{ teamId: entry.teamId, userId: entry.userId, line }];\n });\n}\n"]}
1
+ {"version":3,"file":"rankings.js","sourceRoot":"","sources":["../../src/sports/rankings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAWzD,MAAM,UAAU,iBAAiB,CAC/B,KAGG;IAEH,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,EAAE,CACrD,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,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;QACvE,MAAM,KAAK,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { COMPLETED_GAME_STATUS } from '../types/unions.js';\nimport type { GameStatus } from '../types/unions.js';\nimport { parseGameRosterPlayerId } from '../ids/compound-ids.js';\nimport { sumGameContributions } from './contribution.js';\nimport type { FinalizedGame } from './contribution.js';\nimport type { StatLineValues } from './scoring.js';\nimport type { AnySportAdapter } from './sport-adapter.js';\n\nexport interface RankingRow {\n readonly teamId: string;\n readonly userId: string;\n readonly line: StatLineValues;\n}\n\nexport function seasonRankingRows(\n teams: readonly {\n readonly teamId: string;\n readonly playerSeasonStats?: Readonly<Record<string, StatLineValues>>;\n }[],\n): RankingRow[] {\n return teams.flatMap(({ teamId, playerSeasonStats }) =>\n Object.entries(playerSeasonStats ?? {}).map(([userId, line]) => ({ teamId, userId, line })),\n );\n}\n\nexport interface PlayedWeek {\n readonly weekId: string;\n readonly weekTitle: string;\n readonly weekStartDate: number;\n}\n\nexport function playedWeeks(\n games: readonly {\n readonly weekId: string;\n readonly weekTitle: string;\n readonly weekStartDate: number;\n readonly status: GameStatus;\n }[],\n): PlayedWeek[] {\n const weeks = new Map<string, PlayedWeek>();\n for (const game of games) {\n if (game.status !== COMPLETED_GAME_STATUS || weeks.has(game.weekId)) continue;\n weeks.set(game.weekId, {\n weekId: game.weekId,\n weekTitle: game.weekTitle,\n weekStartDate: game.weekStartDate,\n });\n }\n return [...weeks.values()].sort(\n (left, right) =>\n left.weekStartDate - right.weekStartDate || left.weekId.localeCompare(right.weekId),\n );\n}\n\nexport function weekRankingRows(\n adapter: AnySportAdapter,\n games: readonly FinalizedGame[],\n): RankingRow[] {\n const summed = sumGameContributions(\n adapter.deriveLine,\n games.map((game) => ({ contribution: adapter.contribution(game), sign: 1 as const })),\n );\n return Object.entries(summed.membershipRows).flatMap(([entryId, line]) => {\n const entry = parseGameRosterPlayerId(entryId);\n return entry === null ? [] : [{ teamId: entry.teamId, userId: entry.userId, line }];\n });\n}\n"]}
@@ -1,21 +1,11 @@
1
1
  import type { LeagueType } from '../types/sports.js';
2
2
  import type { AnySportAdapter, SportAdapterRegistry } from './sport-adapter.js';
3
3
  export declare const SPORT_ADAPTERS: SportAdapterRegistry;
4
- /** Every adapter, in `LEAGUE_TYPE_KEYS` order: for every surface that lists or picks sports. */
5
4
  export declare const SPORT_ADAPTER_LIST: readonly AnySportAdapter[];
6
- /**
7
- * A `leagueType` with no registered adapter: missing, `null`, a wrong case, or any value outside the
8
- * union. It is a defect, never a designed refusal — every stored league and game carries a valid
9
- * `leagueType` — so it surfaces as an unexpected fault.
10
- */
11
5
  export declare class UnknownSportError extends Error {
12
6
  readonly leagueType: unknown;
13
7
  constructor(leagueType: unknown);
14
8
  }
15
- /**
16
- * The adapter of `leagueType` as read off a document. Throws `UnknownSportError` for any value
17
- * outside the union.
18
- */
19
9
  export declare function getSportAdapter<L extends LeagueType>(leagueType: L): SportAdapterRegistry[L];
20
10
  export declare function getSportAdapter(leagueType: unknown): AnySportAdapter;
21
11
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sports/registry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,eAAO,MAAM,cAAc,EAAE,oBAI5B,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAExD,CAAC;AAEF;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;gBAEjB,UAAU,EAAE,OAAO;CAKhC;AAeD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC9F,wBAAgB,eAAe,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sports/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,eAAO,MAAM,cAAc,EAAE,oBAI5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAExD,CAAC;AAEF,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;gBAEjB,UAAU,EAAE,OAAO;CAKhC;AAeD,wBAAgB,eAAe,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC9F,wBAAgB,eAAe,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAAC"}
@@ -1,6 +1,3 @@
1
- // The sport registry: the only way a sport's adapter is selected, always by `leagueType` (RULE-QS-SPORT-902).
2
- // A `LeagueType` member with no adapter does not compile (RULE-QS-SPORT-905), and a value outside the union
3
- // has no adapter — there is no default sport.
4
1
  import { LEAGUE_TYPE_KEYS } from '../types/sports.js';
5
2
  import { BASKETBALL_ADAPTER } from './basketball.js';
6
3
  import { CURLING_ADAPTER } from './curling.js';
@@ -10,13 +7,7 @@ export const SPORT_ADAPTERS = {
10
7
  Curling: CURLING_ADAPTER,
11
8
  Football: FOOTBALL_ADAPTER,
12
9
  };
13
- /** Every adapter, in `LEAGUE_TYPE_KEYS` order: for every surface that lists or picks sports. */
14
10
  export const SPORT_ADAPTER_LIST = LEAGUE_TYPE_KEYS.map((leagueType) => SPORT_ADAPTERS[leagueType]);
15
- /**
16
- * A `leagueType` with no registered adapter: missing, `null`, a wrong case, or any value outside the
17
- * union. It is a defect, never a designed refusal — every stored league and game carries a valid
18
- * `leagueType` — so it surfaces as an unexpected fault.
19
- */
20
11
  export class UnknownSportError extends Error {
21
12
  leagueType;
22
13
  constructor(leagueType) {
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sports/registry.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,4GAA4G;AAC5G,8CAA8C;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD,UAAU,EAAE,kBAAkB;IAC9B,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,gBAAgB;CAC3B,CAAC;AAEF,gGAAgG;AAChG,MAAM,CAAC,MAAM,kBAAkB,GAA+B,gBAAgB,CAAC,GAAG,CAChF,CAAC,UAAU,EAAE,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,CAC3C,CAAC;AAEF;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,UAAU,CAAU;IAE7B,YAAY,UAAmB;QAC7B,KAAK,CAAC,iDAAiD,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACrF,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,KAAK,CAAC;IACtB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,gBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9F,CAAC;AAQD,MAAM,UAAU,eAAe,CAAC,UAAmB;IACjD,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;QAAE,MAAM,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACvE,OAAO,cAAc,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC","sourcesContent":["// The sport registry: the only way a sport's adapter is selected, always by `leagueType` (RULE-QS-SPORT-902).\n// A `LeagueType` member with no adapter does not compile (RULE-QS-SPORT-905), and a value outside the union\n// has no adapter — there is no default sport.\n\nimport { LEAGUE_TYPE_KEYS } from '../types/sports.js';\nimport type { LeagueType } from '../types/sports.js';\nimport { BASKETBALL_ADAPTER } from './basketball.js';\nimport { CURLING_ADAPTER } from './curling.js';\nimport { FOOTBALL_ADAPTER } from './football.js';\nimport type { AnySportAdapter, SportAdapterRegistry } from './sport-adapter.js';\n\nexport const SPORT_ADAPTERS: SportAdapterRegistry = {\n Basketball: BASKETBALL_ADAPTER,\n Curling: CURLING_ADAPTER,\n Football: FOOTBALL_ADAPTER,\n};\n\n/** Every adapter, in `LEAGUE_TYPE_KEYS` order: for every surface that lists or picks sports. */\nexport const SPORT_ADAPTER_LIST: readonly AnySportAdapter[] = LEAGUE_TYPE_KEYS.map(\n (leagueType) => SPORT_ADAPTERS[leagueType],\n);\n\n/**\n * A `leagueType` with no registered adapter: missing, `null`, a wrong case, or any value outside the\n * union. It is a defect, never a designed refusal — every stored league and game carries a valid\n * `leagueType` — so it surfaces as an unexpected fault.\n */\nexport class UnknownSportError extends Error {\n readonly leagueType: unknown;\n\n constructor(leagueType: unknown) {\n super(`No sport adapter is registered for leagueType ${describeValue(leagueType)}.`);\n this.name = 'UnknownSportError';\n this.leagueType = leagueType;\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (typeof value === 'string') return JSON.stringify(value);\n try {\n return String(value);\n } catch {\n return typeof value;\n }\n}\n\nfunction isLeagueType(value: unknown): value is LeagueType {\n return typeof value === 'string' && (LEAGUE_TYPE_KEYS as readonly string[]).includes(value);\n}\n\n/**\n * The adapter of `leagueType` as read off a document. Throws `UnknownSportError` for any value\n * outside the union.\n */\nexport function getSportAdapter<L extends LeagueType>(leagueType: L): SportAdapterRegistry[L];\nexport function getSportAdapter(leagueType: unknown): AnySportAdapter;\nexport function getSportAdapter(leagueType: unknown): AnySportAdapter {\n if (!isLeagueType(leagueType)) throw new UnknownSportError(leagueType);\n return SPORT_ADAPTERS[leagueType];\n}\n"]}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sports/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD,UAAU,EAAE,kBAAkB;IAC9B,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,gBAAgB;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAA+B,gBAAgB,CAAC,GAAG,CAChF,CAAC,UAAU,EAAE,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,CAC3C,CAAC;AAEF,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,UAAU,CAAU;IAE7B,YAAY,UAAmB;QAC7B,KAAK,CAAC,iDAAiD,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACrF,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,KAAK,CAAC;IACtB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,gBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9F,CAAC;AAID,MAAM,UAAU,eAAe,CAAC,UAAmB;IACjD,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;QAAE,MAAM,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACvE,OAAO,cAAc,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { LEAGUE_TYPE_KEYS } from '../types/sports.js';\nimport type { LeagueType } from '../types/sports.js';\nimport { BASKETBALL_ADAPTER } from './basketball.js';\nimport { CURLING_ADAPTER } from './curling.js';\nimport { FOOTBALL_ADAPTER } from './football.js';\nimport type { AnySportAdapter, SportAdapterRegistry } from './sport-adapter.js';\n\nexport const SPORT_ADAPTERS: SportAdapterRegistry = {\n Basketball: BASKETBALL_ADAPTER,\n Curling: CURLING_ADAPTER,\n Football: FOOTBALL_ADAPTER,\n};\n\nexport const SPORT_ADAPTER_LIST: readonly AnySportAdapter[] = LEAGUE_TYPE_KEYS.map(\n (leagueType) => SPORT_ADAPTERS[leagueType],\n);\n\nexport class UnknownSportError extends Error {\n readonly leagueType: unknown;\n\n constructor(leagueType: unknown) {\n super(`No sport adapter is registered for leagueType ${describeValue(leagueType)}.`);\n this.name = 'UnknownSportError';\n this.leagueType = leagueType;\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (typeof value === 'string') return JSON.stringify(value);\n try {\n return String(value);\n } catch {\n return typeof value;\n }\n}\n\nfunction isLeagueType(value: unknown): value is LeagueType {\n return typeof value === 'string' && (LEAGUE_TYPE_KEYS as readonly string[]).includes(value);\n}\n\nexport function getSportAdapter<L extends LeagueType>(leagueType: L): SportAdapterRegistry[L];\nexport function getSportAdapter(leagueType: unknown): AnySportAdapter;\nexport function getSportAdapter(leagueType: unknown): AnySportAdapter {\n if (!isLeagueType(leagueType)) throw new UnknownSportError(leagueType);\n return SPORT_ADAPTERS[leagueType];\n}\n"]}
@@ -2,22 +2,11 @@ import type { GameStatEvent } from '../doc-schemas/game-stats.js';
2
2
  import type { GameStats } from '../doc-schemas/sport-game.js';
3
3
  import { type StatEventBody } from './scoring.js';
4
4
  import type { AnySportAdapter, GameTeamIds } from './sport-adapter.js';
5
- /** A stored event the replay could not fold — damage in the event store, never a designed answer. */
6
5
  export declare class StatReplayError extends Error {
7
6
  readonly eventId: string;
8
7
  constructor(eventId: string, cause: unknown);
9
8
  }
10
- /**
11
- * `state` with a team line for each of the game's teams, the missing ones from the sport's empty
12
- * stats — so a team's first stat is never refused as a team not in the game. No other line is touched.
13
- */
14
9
  export declare function withGameTeamLines(adapter: AnySportAdapter, state: GameStats, game: GameTeamIds): GameStats;
15
- /**
16
- * `state` with one event folded in: a sport event or a correction applied, or a void's target
17
- * undone. `targetOf` answers from the events already folded; a void whose target is missing, a void,
18
- * or a correction throws.
19
- */
20
10
  export declare function foldStatEvent(adapter: AnySportAdapter, state: GameStats, event: StatEventBody, targetOf: (eventId: string) => StatEventBody | undefined): GameStats;
21
- /** The rollup a game's events replay to: every line, derived fields included, and each team's score. */
22
11
  export declare function replayGameStats(adapter: AnySportAdapter, game: GameTeamIds, events: readonly GameStatEvent[]): GameStats;
23
12
  //# sourceMappingURL=replay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../src/sports/replay.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvE,qGAAqG;AACrG,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAQ5C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,WAAW,GAChB,SAAS,CAOX;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,GACvD,SAAS,CAWX;AAED,wGAAwG;AACxG,wBAAgB,eAAe,CAC7B,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,SAAS,CAYX"}
1
+ {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../src/sports/replay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvE,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAQ5C;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,WAAW,GAChB,SAAS,CAOX;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,GACvD,SAAS,CAWX;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,SAAS,CAYX"}
@@ -1,10 +1,4 @@
1
- // The replay: a game's rollup rebuilt from its event documents, in `sequence` order, from the
2
- // sport's empty stats (RULE-QS-SPORT-911). It is the one fold every path that derives a game's numbers runs —
3
- // the Functions, the client's queue, and the browser's week view — and the store driver folds each
4
- // new event it accepts through the same step, `foldStatEvent`, so the replay and the write can never
5
- // disagree about what an event does.
6
1
  import { isSportStatEventIn, isStatVoid } from './scoring.js';
7
- /** A stored event the replay could not fold — damage in the event store, never a designed answer. */
8
2
  export class StatReplayError extends Error {
9
3
  eventId;
10
4
  constructor(eventId, cause) {
@@ -13,10 +7,6 @@ export class StatReplayError extends Error {
13
7
  this.eventId = eventId;
14
8
  }
15
9
  }
16
- /**
17
- * `state` with a team line for each of the game's teams, the missing ones from the sport's empty
18
- * stats — so a team's first stat is never refused as a team not in the game. No other line is touched.
19
- */
20
10
  export function withGameTeamLines(adapter, state, game) {
21
11
  if (game.teamIds.every((teamId) => state.teamStats[teamId] !== undefined))
22
12
  return state;
@@ -26,11 +16,6 @@ export function withGameTeamLines(adapter, state, game) {
26
16
  playerStats: state.playerStats,
27
17
  };
28
18
  }
29
- /**
30
- * `state` with one event folded in: a sport event or a correction applied, or a void's target
31
- * undone. `targetOf` answers from the events already folded; a void whose target is missing, a void,
32
- * or a correction throws.
33
- */
34
19
  export function foldStatEvent(adapter, state, event, targetOf) {
35
20
  if (isStatVoid(event)) {
36
21
  const target = targetOf(event.targetEventId);
@@ -41,7 +26,6 @@ export function foldStatEvent(adapter, state, event, targetOf) {
41
26
  }
42
27
  return adapter.apply(state, event);
43
28
  }
44
- /** The rollup a game's events replay to: every line, derived fields included, and each team's score. */
45
29
  export function replayGameStats(adapter, game, events) {
46
30
  const folded = new Map();
47
31
  let state = adapter.emptyStats(game);
@@ -1 +1 @@
1
- {"version":3,"file":"replay.js","sourceRoot":"","sources":["../../src/sports/replay.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8GAA8G;AAC9G,mGAAmG;AACnG,qGAAqG;AACrG,qCAAqC;AAIrC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAsB,MAAM,cAAc,CAAC;AAGlF,qGAAqG;AACrG,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,OAAO,CAAS;IAEzB,YAAY,OAAe,EAAE,KAAc;QACzC,KAAK,CACH,cAAc,OAAO,wBAAwB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACrG,EAAE,KAAK,EAAE,CACV,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAAwB,EACxB,KAAgB,EA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AK,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtF,IAAI,CAAC;YACH,KAAK,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACjF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,eAAe,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// The replay: a game's rollup rebuilt from its event documents, in `sequence` order, from the\n// sport's empty stats (RULE-QS-SPORT-911). It is the one fold every path that derives a game's numbers runs —\n// the Functions, the client's queue, and the browser's week view — and the store driver folds each\n// new event it accepts through the same step, `foldStatEvent`, so the replay and the write can never\n// disagree about what an event does.\n\nimport type { GameStatEvent } from '../doc-schemas/game-stats.js';\nimport type { GameStats } from '../doc-schemas/sport-game.js';\nimport { isSportStatEventIn, isStatVoid, type StatEventBody } from './scoring.js';\nimport type { AnySportAdapter, GameTeamIds } from './sport-adapter.js';\n\n/** A stored event the replay could not fold — damage in the event store, never a designed answer. */\nexport class StatReplayError extends Error {\n readonly eventId: string;\n\n constructor(eventId: string, cause: unknown) {\n super(\n `Stat event ${eventId} cannot be replayed: ${cause instanceof Error ? cause.message : String(cause)}`,\n { cause },\n );\n this.name = 'StatReplayError';\n this.eventId = eventId;\n }\n}\n\n/**\n * `state` with a team line for each of the game's teams, the missing ones from the sport's empty\n * stats — so a team's first stat is never refused as a team not in the game. No other line is touched.\n */\nexport function withGameTeamLines(\n adapter: AnySportAdapter,\n state: GameStats,\n game: GameTeamIds,\n): GameStats {\n if (game.teamIds.every((teamId) => state.teamStats[teamId] !== undefined)) return state;\n const empty = adapter.emptyStats(game);\n return {\n teamStats: { ...empty.teamStats, ...state.teamStats },\n playerStats: state.playerStats,\n } as GameStats;\n}\n\n/**\n * `state` with one event folded in: a sport event or a correction applied, or a void's target\n * undone. `targetOf` answers from the events already folded; a void whose target is missing, a void,\n * or a correction throws.\n */\nexport function foldStatEvent(\n adapter: AnySportAdapter,\n state: GameStats,\n event: StatEventBody,\n targetOf: (eventId: string) => StatEventBody | undefined,\n): GameStats {\n if (isStatVoid(event)) {\n const target = targetOf(event.targetEventId);\n if (!isSportStatEventIn(adapter.eventTypes, target)) {\n throw new Error(\n `the void's target ${event.targetEventId} is not a ${adapter.leagueType} event folded before it`,\n );\n }\n return adapter.undo(state, target);\n }\n return adapter.apply(state, event);\n}\n\n/** The rollup a game's events replay to: every line, derived fields included, and each team's score. */\nexport function replayGameStats(\n adapter: AnySportAdapter,\n game: GameTeamIds,\n events: readonly GameStatEvent[],\n): GameStats {\n const folded = new Map<string, GameStatEvent>();\n let state: GameStats = adapter.emptyStats(game);\n for (const event of [...events].sort((left, right) => left.sequence - right.sequence)) {\n try {\n state = foldStatEvent(adapter, state, event, (eventId) => folded.get(eventId));\n } catch (error) {\n throw new StatReplayError(event.eventId, error);\n }\n folded.set(event.eventId, event);\n }\n return state;\n}\n"]}
1
+ {"version":3,"file":"replay.js","sourceRoot":"","sources":["../../src/sports/replay.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAsB,MAAM,cAAc,CAAC;AAGlF,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,OAAO,CAAS;IAEzB,YAAY,OAAe,EAAE,KAAc;QACzC,KAAK,CACH,cAAc,OAAO,wBAAwB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACrG,EAAE,KAAK,EAAE,CACV,CAAC;QACF,IAAI,CAAC,I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,IAAI,CAAC,CAAC;IAChD,KAAK,MAAM,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtF,IAAI,CAAC;YACH,KAAK,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACjF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,eAAe,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { GameStatEvent } from '../doc-schemas/game-stats.js';\nimport type { GameStats } from '../doc-schemas/sport-game.js';\nimport { isSportStatEventIn, isStatVoid, type StatEventBody } from './scoring.js';\nimport type { AnySportAdapter, GameTeamIds } from './sport-adapter.js';\n\nexport class StatReplayError extends Error {\n readonly eventId: string;\n\n constructor(eventId: string, cause: unknown) {\n super(\n `Stat event ${eventId} cannot be replayed: ${cause instanceof Error ? cause.message : String(cause)}`,\n { cause },\n );\n this.name = 'StatReplayError';\n this.eventId = eventId;\n }\n}\n\nexport function withGameTeamLines(\n adapter: AnySportAdapter,\n state: GameStats,\n game: GameTeamIds,\n): GameStats {\n if (game.teamIds.every((teamId) => state.teamStats[teamId] !== undefined)) return state;\n const empty = adapter.emptyStats(game);\n return {\n teamStats: { ...empty.teamStats, ...state.teamStats },\n playerStats: state.playerStats,\n } as GameStats;\n}\n\nexport function foldStatEvent(\n adapter: AnySportAdapter,\n state: GameStats,\n event: StatEventBody,\n targetOf: (eventId: string) => StatEventBody | undefined,\n): GameStats {\n if (isStatVoid(event)) {\n const target = targetOf(event.targetEventId);\n if (!isSportStatEventIn(adapter.eventTypes, target)) {\n throw new Error(\n `the void's target ${event.targetEventId} is not a ${adapter.leagueType} event folded before it`,\n );\n }\n return adapter.undo(state, target);\n }\n return adapter.apply(state, event);\n}\n\nexport function replayGameStats(\n adapter: AnySportAdapter,\n game: GameTeamIds,\n events: readonly GameStatEvent[],\n): GameStats {\n const folded = new Map<string, GameStatEvent>();\n let state: GameStats = adapter.emptyStats(game);\n for (const event of [...events].sort((left, right) => left.sequence - right.sequence)) {\n try {\n state = foldStatEvent(adapter, state, event, (eventId) => folded.get(eventId));\n } catch (error) {\n throw new StatReplayError(event.eventId, error);\n }\n folded.set(event.eventId, event);\n }\n return state;\n}\n"]}
@@ -1,19 +1,12 @@
1
1
  import type { GameStats } from '../doc-schemas/sport-game.js';
2
2
  import type { AnySportAdapter } from './sport-adapter.js';
3
- /** One place a stored rollup or score mirror differs from the replay. */
4
3
  export interface RollupDifference {
5
4
  readonly kind: 'rollupMismatch' | 'scoreMirrorMismatch';
6
- /** The team id of a team line or score, or the roster-entry id of a player line. */
7
5
  readonly key: string;
8
6
  readonly field: string;
9
7
  readonly stored: unknown;
10
8
  readonly replayed: unknown;
11
9
  }
12
- /**
13
- * Every difference between the stored rollup and score mirror and the replay. A player line that
14
- * holds nothing and one that is absent are alike; a team line is compared whole, its round slots
15
- * included, for each of the game's teams.
16
- */
17
10
  export declare function rollupDifferences(adapter: AnySportAdapter, game: {
18
11
  readonly teamIds: readonly string[];
19
12
  readonly stats: GameStats;
@@ -1 +1 @@
1
- {"version":3,"file":"rollup-check.d.ts","sourceRoot":"","sources":["../../src/sports/rollup-check.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,yEAAyE;AACzE,MAAM,WAAW,gBAAgB;I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AQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAClD,EACD,QAAQ,EAAE,SAAS,GAClB,gBAAgB,EAAE,CAyDpB"}
@@ -1,31 +1,17 @@
1
- // Whether a game's stored numbers are what produced them: the rollup's counters and the score mirror
2
- // against a replay — of the event documents for a live game, of the finalized record for a completed
3
- // one. Finalize, reopen, a ghost link, and validation ask this one comparison, so a hand edit to the
4
- // game document is found the same way everywhere and never adopted or discarded silently (RULE-STD-ENG-009).
5
- //
6
- // Counters are compared, never a derived field: a stored FP a weight change left stale is not a
7
- // difference in what was recorded, and the writer re-derives it.
8
1
  import { gameScoreMirror } from './score-mirror.js';
9
2
  import { isAllZeroLine } from './scoring.js';
10
- /** Two stored line values alike: a number, or a list of round slots, slot by slot. */
11
3
  function sameValue(left, right) {
12
4
  if (Array.isArray(left) && Array.isArray(right)) {
13
5
  return (left.length === right.length && left.every((slot, index) => Object.is(slot, right[index])));
14
6
  }
15
7
  return Object.is(left, right);
16
8
  }
17
- /** The fields a line is compared on: every field of a team line, the counters of a player line. */
18
9
  function compared(line, fields) {
19
10
  if (line === undefined)
20
11
  return {};
21
12
  const keys = fields ?? Object.keys(line);
22
13
  return Object.fromEntries(keys.filter((field) => line[field] !== undefined).map((field) => [field, line[field]]));
23
14
  }
24
- /**
25
- * Every difference between the stored rollup and score mirror and the replay. A player line that
26
- * holds nothing and one that is absent are alike; a team line is compared whole, its round slots
27
- * included, for each of the game's teams.
28
- */
29
15
  export function rollupDifferences(adapter, game, replayed) {
30
16
  const differences = [];
31
17
  const storedTeams = game.stats.teamStats;
@@ -1 +1 @@
1
- {"version":3,"file":"rollup-check.js","sourceRoot":"","sources":["../../src/sports/rollup-check.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,qGAAqG;AACrG,qGAAqG;AACrG,6GAA6G;AAC7G,EAAE;AACF,gGAAgG;AAChG,iEAAiE;AAGjE,OAAO,EAAE,eAAe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,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;aACzB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["// Whether a game's stored numbers are what produced them: the rollup's counters and the score mirror\n// against a replay — of the event documents for a live game, of the finalized record for a completed\n// one. Finalize, reopen, a ghost link, and validation ask this one comparison, so a hand edit to the\n// game document is found the same way everywhere and never adopted or discarded silently (RULE-STD-ENG-009).\n//\n// Counters are compared, never a derived field: a stored FP a weight change left stale is not a\n// difference in what was recorded, and the writer re-derives it.\n\nimport type { GameStats } from '../doc-schemas/sport-game.js';\nimport { gameScoreMirror } from './score-mirror.js';\nimport { isAllZeroLine } from './scoring.js';\nimport type { StatLineValues } from './scoring.js';\nimport type { AnySportAdapter } from './sport-adapter.js';\n\n/** One place a stored rollup or score mirror differs from the replay. */\nexport interface RollupDifference {\n readonly kind: 'rollupMismatch' | 'scoreMirrorMismatch';\n /** The team id of a team line or score, or the roster-entry id of a player line. */\n readonly key: string;\n readonly field: string;\n readonly stored: unknown;\n readonly replayed: unknown;\n}\n\n/** Two stored line values alike: a number, or a list of round slots, slot by slot. */\nfunction sameValue(left: unknown, right: unknown): boolean {\n if (Array.isArray(left) && Array.isArray(right)) {\n return (\n left.length === right.length && left.every((slot, index) => Object.is(slot, right[index]))\n );\n }\n return Object.is(left, right);\n}\n\n/** The fields a line is compared on: every field of a team line, the counters of a player line. */\nfunction compared(\n line: StatLineValues | undefined,\n fields: readonly string[] | null,\n): Record<string, unknown> {\n if (line === undefined) return {};\n const keys = fields ?? Object.keys(line);\n return Object.fromEntries(\n keys.filter((field) => line[field] !== undefined).map((field) => [field, line[field]]),\n );\n}\n\n/**\n * Every difference between the stored rollup and score mirror and the replay. A player line that\n * holds nothing and one that is absent are alike; a team line is compared whole, its round slots\n * included, for each of the game's teams.\n */\nexport function rollupDifferences(\n adapter: AnySportAdapter,\n game: {\n readonly teamIds: readonly string[];\n readonly stats: GameStats;\n readonly score: Readonly<Record<string, number>>;\n },\n replayed: GameStats,\n): RollupDifference[] {\n const differences: RollupDifference[] = [];\n const storedTeams = game.stats.teamStats as Readonly<Record<string, StatLineValues>>;\n const replayedTeams = replayed.teamStats as Readonly<Record<string, StatLineValues>>;\n const teamKeys = new Set([...game.teamIds, ...Object.keys(storedTeams)]);\n for (const teamId of teamKeys) {\n const stored = compared(storedTeams[teamId], null);\n const replay = compared(replayedTeams[teamId], null);\n for (const field of new Set([...Object.keys(stored), ...Object.keys(replay)])) {\n if (!sameValue(stored[field], replay[field])) {\n differences.push({\n kind: 'rollupMismatch',\n key: teamId,\n field,\n stored: stored[field],\n replayed: replay[field],\n });\n }\n }\n }\n\n const counters = adapter.playerStatKeys as readonly string[];\n const storedPlayers = game.stats.playerStats as Readonly<Record<string, StatLineValues>>;\n const replayedPlayers = replayed.playerStats as Readonly<Record<string, StatLineValues>>;\n const holding = (lines: Readonly<Record<string, StatLineValues>>) =>\n Object.keys(lines).filter(\n (entryId) => !isAllZeroLine(lines[entryId] as StatLineValues, counters),\n );\n for (const entryId of new Set([...holding(storedPlayers), ...holding(replayedPlayers)])) {\n const stored = compared(storedPlayers[entryId], counters);\n const replay = compared(replayedPlayers[entryId], counters);\n for (const field of counters) {\n const [left, right] = [stored[field] ?? 0, replay[field] ?? 0];\n if (left !== right)\n differences.push({\n kind: 'rollupMismatch',\n key: entryId,\n field,\n stored: left,\n replayed: right,\n });\n }\n }\n\n const mirror = gameScoreMirror(replayed as { teamStats: Record<string, { score: number }> });\n for (const teamId of new Set([...Object.keys(game.score), ...Object.keys(mirror)])) {\n if (game.score[teamId] !== mirror[teamId]) {\n differences.push({\n kind: 'scoreMirrorMismatch',\n key: teamId,\n field: 'score',\n stored: game.score[teamId],\n replayed: mirror[teamId],\n });\n }\n }\n return differences;\n}\n"]}
1
+ {"version":3,"file":"rollup-check.js","sourceRoot":"","sources":["../../src/sports/rollup-check.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MA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AC;QACL,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import type { GameStats } from '../doc-schemas/sport-game.js';\nimport { gameScoreMirror } from './score-mirror.js';\nimport { isAllZeroLine } from './scoring.js';\nimport type { StatLineValues } from './scoring.js';\nimport type { AnySportAdapter } from './sport-adapter.js';\n\nexport interface RollupDifference {\n readonly kind: 'rollupMismatch' | 'scoreMirrorMismatch';\n readonly key: string;\n readonly field: string;\n readonly stored: unknown;\n readonly replayed: unknown;\n}\n\nfunction sameValue(left: unknown, right: unknown): boolean {\n if (Array.isArray(left) && Array.isArray(right)) {\n return (\n left.length === right.length && left.every((slot, index) => Object.is(slot, right[index]))\n );\n }\n return Object.is(left, right);\n}\n\nfunction compared(\n line: StatLineValues | undefined,\n fields: readonly string[] | null,\n): Record<string, unknown> {\n if (line === undefined) return {};\n const keys = fields ?? Object.keys(line);\n return Object.fromEntries(\n keys.filter((field) => line[field] !== undefined).map((field) => [field, line[field]]),\n );\n}\n\nexport function rollupDifferences(\n adapter: AnySportAdapter,\n game: {\n readonly teamIds: readonly string[];\n readonly stats: GameStats;\n readonly score: Readonly<Record<string, number>>;\n },\n replayed: GameStats,\n): RollupDifference[] {\n const differences: RollupDifference[] = [];\n const storedTeams = game.stats.teamStats as Readonly<Record<string, StatLineValues>>;\n const replayedTeams = replayed.teamStats as Readonly<Record<string, StatLineValues>>;\n const teamKeys = new Set([...game.teamIds, ...Object.keys(storedTeams)]);\n for (const teamId of teamKeys) {\n const stored = compared(storedTeams[teamId], null);\n const replay = compared(replayedTeams[teamId], null);\n for (const field of new Set([...Object.keys(stored), ...Object.keys(replay)])) {\n if (!sameValue(stored[field], replay[field])) {\n differences.push({\n kind: 'rollupMismatch',\n key: teamId,\n field,\n stored: stored[field],\n replayed: replay[field],\n });\n }\n }\n }\n\n const counters = adapter.playerStatKeys as readonly string[];\n const storedPlayers = game.stats.playerStats as Readonly<Record<string, StatLineValues>>;\n const replayedPlayers = replayed.playerStats as Readonly<Record<string, StatLineValues>>;\n const holding = (lines: Readonly<Record<string, StatLineValues>>) =>\n Object.keys(lines).filter(\n (entryId) => !isAllZeroLine(lines[entryId] as StatLineValues, counters),\n );\n for (const entryId of new Set([...holding(storedPlayers), ...holding(replayedPlayers)])) {\n const stored = compared(storedPlayers[entryId], counters);\n const replay = compared(replayedPlayers[entryId], counters);\n for (const field of counters) {\n const [left, right] = [stored[field] ?? 0, replay[field] ?? 0];\n if (left !== right)\n differences.push({\n kind: 'rollupMismatch',\n key: entryId,\n field,\n stored: left,\n replayed: right,\n });\n }\n }\n\n const mirror = gameScoreMirror(replayed as { teamStats: Record<string, { score: number }> });\n for (const teamId of new Set([...Object.keys(game.score), ...Object.keys(mirror)])) {\n if (game.score[teamId] !== mirror[teamId]) {\n differences.push({\n kind: 'scoreMirrorMismatch',\n key: teamId,\n field: 'score',\n stored: game.score[teamId],\n replayed: mirror[teamId],\n });\n }\n }\n return differences;\n}\n"]}
@@ -1,4 +1,3 @@
1
- /** Every sport's team line carries its `score`; the mirror is keyed by the same team ids. */
2
1
  export declare function gameScoreMirror(stats: {
3
2
  readonly teamStats: Readonly<Record<string, {
4
3
  readonly score: number;
@@ -1 +1 @@
1
- {"version":3,"file":"score-mirror.d.ts","sourceRoot":"","sources":["../../src/sports/score-mirror.ts"],"names":[],"mappings":"AAIA,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CAC1E,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIzB"}
1
+ {"version":3,"file":"score-mirror.d.ts","sourceRoot":"","sources":["../../src/sports/score-mirror.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CAC1E,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIzB"}
@@ -1,7 +1,3 @@
1
- // A game's `score`: each team's score, mirrored from its `stats.teamStats` line so a schedule or list
2
- // reads the result without the stats. Every writer of a team line writes the mirror from the line it
3
- // wrote, in the same write, through this one derivation (RULE-QS-SPORT-917).
4
- /** Every sport's team line carries its `score`; the mirror is keyed by the same team ids. */
5
1
  export function gameScoreMirror(stats) {
6
2
  return Object.fromEntries(Object.entries(stats.teamStats).map(([teamId, line]) => [teamId, line.score]));
7
3
  }
@@ -1 +1 @@
1
- {"version":3,"file":"score-mirror.js","sourceRoot":"","sources":["../../src/sports/score-mirror.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,qGAAqG;AACrG,6EAA6E;AAE7E,6FAA6F;AAC7F,MAAM,UAAU,eAAe,CAAC,KAE/B;IACC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAC9E,CAAC;AACJ,CAAC","sourcesContent":["// A game's `score`: each team's score, mirrored from its `stats.teamStats` line so a schedule or list\n// reads the result without the stats. Every writer of a team line writes the mirror from the line it\n// wrote, in the same write, through this one derivation (RULE-QS-SPORT-917).\n\n/** Every sport's team line carries its `score`; the mirror is keyed by the same team ids. */\nexport function gameScoreMirror(stats: {\n readonly teamStats: Readonly<Record<string, { readonly score: number }>>;\n}): Record<string, number> {\n return Object.fromEntries(\n Object.entries(stats.teamStats).map(([teamId, line]) => [teamId, line.score]),\n );\n}\n"]}
1
+ {"version":3,"file":"score-mirror.js","sourceRoot":"","sources":["../../src/sports/score-mirror.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,KAE/B;IACC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAC9E,CAAC;AACJ,CAAC","sourcesContent":["export function gameScoreMirror(stats: {\n readonly teamStats: Readonly<Record<string, { readonly score: number }>>;\n}): Record<string, number> {\n return Object.fromEntries(\n Object.entries(stats.teamStats).map(([teamId, line]) => [teamId, line.score]),\n );\n}\n"]}