@mavea/mavea 1.2.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/PRIVACY.md +1 -0
  3. package/README.md +8 -4
  4. package/TERMS.md +1 -1
  5. package/THIRD-PARTY.txt +13 -5
  6. package/bin/mavea.mjs +143 -2
  7. package/dist/.vite/manifest.json +1469 -857
  8. package/dist/assets/AnnotationLayer-Cccb12ps.js +0 -0
  9. package/dist/assets/{AppCommandPalette-CgDUWU08.js → AppCommandPalette-DdOPNZ0e.js} +1 -1
  10. package/dist/assets/AtlasView-B7yObdf8.css +1 -0
  11. package/dist/assets/{AtlasView-B82UfrEX.js → AtlasView-DO_p0TdZ.js} +1 -1
  12. package/dist/assets/BriefingPlayer-DHV4vMga.css +1 -0
  13. package/dist/assets/{CadenceCard-P4teI7Se.js → CadenceCard-DxceyiPA.js} +1 -1
  14. package/dist/assets/{CanvasSkeleton-CRGWlafo.js → CanvasSkeleton-BmGjJHUQ.js} +1 -1
  15. package/dist/assets/CanvasSkeleton-DYASkTjW.css +1 -0
  16. package/dist/assets/CardEditor-CiAfT78z.css +1 -0
  17. package/dist/assets/{CardEditor-DABIhGdQ.js → CardEditor-D4slxmIM.js} +1 -1
  18. package/dist/assets/{CheckLogRail-DO7sbZwC.js → CheckLogRail-BibJTid0.js} +1 -1
  19. package/dist/assets/ConversationVideoStudio-CSO3jHXD.css +1 -0
  20. package/dist/assets/ConversationVideoStudio-DMIPUCcq.js +1 -0
  21. package/dist/assets/CourseLessonReader-D29Kix4f.js +2 -0
  22. package/dist/assets/{CourseRail-DXt3bzjU.js → CourseRail-BQmUsG6v.js} +1 -1
  23. package/dist/assets/CoursesApp-DcDsS_ZS.js +2 -0
  24. package/dist/assets/CrossExamPanel-BafTqkbf.css +1 -0
  25. package/dist/assets/{DashPresent-B6MP1i_4.js → DashPresent-BDWgO9am.js} +1 -1
  26. package/dist/assets/DashboardDetail-BrnAdWfy.js +2 -0
  27. package/dist/assets/DashboardLoopGate-NxMcQ4rD.js +2 -0
  28. package/dist/assets/DashboardLoopRuntime-Dsy9u1wa.js +1 -0
  29. package/dist/assets/{DashboardSettings-CE0B2y2y.js → DashboardSettings-DJon1Q4o.js} +1 -1
  30. package/dist/assets/DashboardsApp-DxyMn3x_.js +2 -0
  31. package/dist/assets/DeepZoomApp-CVwmnRGN.css +1 -0
  32. package/dist/assets/{DeepZoomApp-UEPtylG7.js → DeepZoomApp-nNjqoyYE.js} +1 -1
  33. package/dist/assets/DelegatePanel-D17XvWYd.css +1 -0
  34. package/dist/assets/DelegatePanel-DN_ZL0j7.js +33 -0
  35. package/dist/assets/DemoGallery-DrSlMsnu.js +1 -0
  36. package/dist/assets/{DropSelect-DilESAgA.css → DropSelect-B4lqCEjw.css} +1 -1
  37. package/dist/assets/{DropSelect-QcBm3N4D.js → DropSelect-GwIXHA5o.js} +1 -1
  38. package/dist/assets/{ExportModal-Ya0VBbxa.js → ExportModal-DBUjC71U.js} +1 -1
  39. package/dist/assets/{ExtractionPreview-BFrmqKDo.js → ExtractionPreview-D4M6eXqb.js} +1 -1
  40. package/dist/assets/{FeatureUseNotice-Dc3GNBvy.js → FeatureUseNotice-Bda9jr3W.js} +1 -1
  41. package/dist/assets/{FlagshipCommandPalette-B1yHwI6V.js → FlagshipCommandPalette-DAO849RC.js} +1 -1
  42. package/dist/assets/FlagshipShowcase-g2x-1c70.js +1 -0
  43. package/dist/assets/{FlashcardsApp-DteNeHpz.js → FlashcardsApp-BUKzCr65.js} +1 -1
  44. package/dist/assets/ForecastPanel-Cq_yDhNQ.css +1 -0
  45. package/dist/assets/GalleryApp-ot_A7ZF-.js +1 -0
  46. package/dist/assets/{HonestByDesign-DZltb3Ss.js → HonestByDesign-DgZFEpEx.js} +1 -1
  47. package/dist/assets/{HowItWorks-D-hgfN6a.js → HowItWorks-DPFpdeGE.js} +1 -1
  48. package/dist/assets/{LegalApp-ChzcKiY0.js → LegalApp-C56kWdmK.js} +1 -1
  49. package/dist/assets/{LegalMarkdownDocument-j6UHhPnp.js → LegalMarkdownDocument-BBTHuW_M.js} +1 -1
  50. package/dist/assets/{LegalPageShell-Wcsviye1.js → LegalPageShell-hMA-7JLf.js} +1 -1
  51. package/dist/assets/LeverPanel-HOEwIr8k.css +1 -0
  52. package/dist/assets/{Library-DmdzY2se.js → Library-CVj7R6F4.js} +1 -1
  53. package/dist/assets/LibraryOverlay-BkPYm0Bs.css +1 -0
  54. package/dist/assets/{LibraryOverlay-YHBrdVKo.js → LibraryOverlay-DSUWcUe4.js} +1 -1
  55. package/dist/assets/LiveApp-B62EMybC.js +79 -0
  56. package/dist/assets/LiveApp-CziqEsOb.css +1 -0
  57. package/dist/assets/LiveSettings-BITIaMoT.js +6 -0
  58. package/dist/assets/LiveSettings-Dho0OxlM.css +1 -0
  59. package/dist/assets/{MindMapViewerDrawer-DI_S7fRZ.js → MindMapViewerDrawer-CKdJtHno.js} +1 -1
  60. package/dist/assets/MindShape-B3lg_z4X.js +1 -0
  61. package/dist/assets/MindShape-CozR9W8M.css +1 -0
  62. package/dist/assets/{PinToDashboard-BCiWaSg8.js → PinToDashboard-DpQjBLPa.js} +1 -1
  63. package/dist/assets/{PlanReview-BIERfK1t.js → PlanReview-CrTbmMAd.js} +1 -1
  64. package/dist/assets/PresentationDeck-CfYadu9V.js +1 -0
  65. package/dist/assets/PrismApp-bRKK_3JA.js +2 -0
  66. package/dist/assets/PrismAskController-68gbUO5u.css +1 -0
  67. package/dist/assets/{PrismAskController-Bt0k9hAA.js → PrismAskController-C4MuB8om.js} +1 -1
  68. package/dist/assets/{PrismBriefingPlayer-DLAPs6eZ.js → PrismBriefingPlayer-ChJj6hSS.js} +2 -2
  69. package/dist/assets/PrismOverlay-BwnF4BEn.css +1 -0
  70. package/dist/assets/{PrismOverlay-DJDGPGxo.js → PrismOverlay-Pp6ZKmTc.js} +4 -4
  71. package/dist/assets/{PrismWorkbench-DHLvpguj.js → PrismWorkbench-BCV7r4Oa.js} +1 -1
  72. package/dist/assets/{PrivacyApp-uMjq2z14.js → PrivacyApp-A2Bu6LVd.js} +2 -1
  73. package/dist/assets/{Recap-T9DtFaEk.js → Recap-BOl3SUh0.js} +1 -1
  74. package/dist/assets/Recap-D3NlzM1p.css +1 -0
  75. package/dist/assets/{ReplayCard-F7U3LYAg.js → ReplayCard-B6NYiYzQ.js} +2 -2
  76. package/dist/assets/{ReplayOverlay-BTldvkU7.js → ReplayOverlay-BJKtJ-vc.js} +1 -1
  77. package/dist/assets/{RewindOverlay-CousnxXo.js → RewindOverlay-BO7YgDsW.js} +1 -1
  78. package/dist/assets/RippleApp-BXt7tenS.js +2 -0
  79. package/dist/assets/{RippleAskController-9SxpZnHX.js → RippleAskController-BzdwYcYY.js} +1 -1
  80. package/dist/assets/RippleOverlay-B3hg2KMN.css +1 -0
  81. package/dist/assets/RippleOverlay-BSxubBwj.js +6 -0
  82. package/dist/assets/SeeDontRead-0He5hS2C.js +1 -0
  83. package/dist/assets/ShareModal-I_sxHKLv.css +1 -0
  84. package/dist/assets/ShareModal-xYdZWJxy.js +2 -0
  85. package/dist/assets/{ShipCourse-Up9gRR07.js → ShipCourse-Dg6kCWyH.js} +1 -1
  86. package/dist/assets/{SignatureLoop-Cq790dMw.js → SignatureLoop-QPwB2oNN.js} +1 -1
  87. package/dist/assets/SrsReview-DmBcJCMa.css +1 -0
  88. package/dist/assets/{SrsReview-DhWNYYv7.js → SrsReview-Gr6Y0QTQ.js} +1 -1
  89. package/dist/assets/{SynthesisApp-4ZPLZgmJ.js → SynthesisApp-DrCq6NDa.js} +2 -2
  90. package/dist/assets/{SynthesisOverlay-iesJ0hEt.js → SynthesisOverlay-DCa-2Pz_.js} +1 -1
  91. package/dist/assets/{TermsApp-DL2hFKsv.js → TermsApp-zcPDYfuh.js} +2 -2
  92. package/dist/assets/TopicCanvas-Bw4bMFpe.js +2 -0
  93. package/dist/assets/TopicCanvas-DWTm611H.css +1 -0
  94. package/dist/assets/{TourPrism-kInUOv-M.js → TourPrism-DbinDupp.js} +1 -1
  95. package/dist/assets/{TrackerTile-BryDo0sm.js → TrackerTile-CrT9u1I4.js} +2 -2
  96. package/dist/assets/{TwoSurfaces-Cmj95ofx.js → TwoSurfaces-L0CDuyOZ.js} +1 -1
  97. package/dist/assets/WhyMachineOverlay-Rav-cuMm.css +1 -0
  98. package/dist/assets/WorldOverlay-BcjqG1BR.js +2 -0
  99. package/dist/assets/{WowFeatures-DDICbxl_.js → WowFeatures-CwBk4ZMO.js} +1 -1
  100. package/dist/assets/ZoomDeck-DdLNsrHV.css +1 -0
  101. package/dist/assets/{ZoomDeck-CKOjYS9z.js → ZoomDeck-DlnesweX.js} +1 -1
  102. package/dist/assets/{annotationAuto-CDv6Es44.js → annotationAuto-B2UdfJNj.js} +1 -1
  103. package/dist/assets/{backup-ZrlVatXc.js → backup-685QrAjt.js} +1 -1
  104. package/dist/assets/canvas-C3O7MEA3.js +1 -0
  105. package/dist/assets/capture-DgJLQ_0-.js +2 -0
  106. package/dist/assets/{chapters-Dqm4iLDa.js → chapters-CIvdCeBC.js} +1 -1
  107. package/dist/assets/{confirmAdd-DkmbWaSk.js → confirmAdd-CZ829Mbx.js} +1 -1
  108. package/dist/assets/{dashboardEvents-D-XVj666.js → dashboardEvents-CiayRLrH.js} +1 -1
  109. package/dist/assets/dashboards-Cvs28p3Z.css +1 -0
  110. package/dist/assets/deepen-DAeHHFiI.js +11 -0
  111. package/dist/assets/deepenStore-BWLLzLCY.js +1 -0
  112. package/dist/assets/effort-jJe4iMIq.js +39 -0
  113. package/dist/assets/{explode-BgZIWY9m.js → explode-CPnvJiTg.js} +1 -1
  114. package/dist/assets/{fitText-DQ2omSN0.js → fitText-DHbmSS-q.js} +1 -1
  115. package/dist/assets/{generate-Dl2EJ_SR.js → generate-COfYQFmT.js} +4 -4
  116. package/dist/assets/{generateBeats-DtptFLlG.js → generateBeats-COflu5Zi.js} +1 -1
  117. package/dist/assets/{generateCourse-C9qvaJRo.js → generateCourse-BldPpgdh.js} +1 -1
  118. package/dist/assets/generateLive-DGwnpIip.js +24 -0
  119. package/dist/assets/homeTarget-CwFsJYwb.js +1 -0
  120. package/dist/assets/index-BIUYTk1W.css +1 -0
  121. package/dist/assets/index-LiHcEJt_.js +22 -0
  122. package/dist/assets/kokoro-DXRj0KQX.js +1 -0
  123. package/dist/assets/ledger-BssK9Pv2.js +1 -0
  124. package/dist/assets/{lib-DMAxsZKm.css → lib-DP9Kuxqk.css} +1 -1
  125. package/dist/assets/{liveSchema-B4bQtO88.js → liveSchema-DyfND6P2.js} +2 -2
  126. package/dist/assets/{loader-DCA6Njbf.js → loader-DgMLGfAC.js} +2 -2
  127. package/dist/assets/localBudget-CxLP6bjE.js +1 -0
  128. package/dist/assets/{mastery-CUfDeuqO.js → mastery-DB5qpRAy.js} +1 -1
  129. package/dist/assets/{media-BvwzACIX.js → media-VLRh6CX2.js} +2 -2
  130. package/dist/assets/{model-BFRTN9Eh.js → model-CAewjw45.js} +1 -1
  131. package/dist/assets/{neighborhoods-D7QjURnE.js → neighborhoods-CqECCmo8.js} +1 -1
  132. package/dist/assets/{notes-B6eX5XWk.js → notes-DzIAEESd.js} +1 -1
  133. package/dist/assets/pen-DtEW1xf4.js +24 -0
  134. package/dist/assets/{perfProbe-CE7hsUEo.js → perfProbe-ezVn1mOu.js} +1 -1
  135. package/dist/assets/{pin-BZuh1acO.js → pin-BPGVDgnq.js} +1 -1
  136. package/dist/assets/pin-BXyyKnci.css +1 -0
  137. package/dist/assets/{planTracker-KKAtTBWs.js → planTracker-BwoKEftp.js} +1 -1
  138. package/dist/assets/portal-B9DmFo6J.js +1 -0
  139. package/dist/assets/{prewarm-uKxmzjjd.js → prewarm-BgUqAJbF.js} +1 -1
  140. package/dist/assets/providers-0DthJW_I.js +1 -0
  141. package/dist/assets/quietHours-DyynzDyC.js +1 -0
  142. package/dist/assets/{ready-jtAUOb62.js → ready-yBSGJubb.js} +1 -1
  143. package/dist/assets/{registry-B2QzCuWH.js → registry-7tKTrzeZ.js} +1 -1
  144. package/dist/assets/{registry-BFrgx1tE.js → registry-B53EEn8S.js} +1 -1
  145. package/dist/assets/{registry-CPiwQhAm.js → registry-BDXwUn3i.js} +1 -1
  146. package/dist/assets/{registry-DtV2UjBx.js → registry-BJEvFgoL.js} +1 -1
  147. package/dist/assets/{registry-B0GIHERt.js → registry-BQzvA61G.js} +1 -1
  148. package/dist/assets/{registry-6DGRAB1m.js → registry-BT6ydF33.js} +1 -1
  149. package/dist/assets/{registry-D8O0apUT.js → registry-BdHj_oIs.js} +1 -1
  150. package/dist/assets/{registry-Dru0JcTa.css → registry-BgWzEkxc.css} +1 -1
  151. package/dist/assets/{registry-Vp8VuMV0.js → registry-Bl2qfp5V.js} +1 -1
  152. package/dist/assets/registry-Bl7zAWKt.js +2 -0
  153. package/dist/assets/{registry-Dwbh-GWu.js → registry-BlujNlQJ.js} +1 -1
  154. package/dist/assets/{registry-C28gYnVq.js → registry-CE1T0z9x.js} +1 -1
  155. package/dist/assets/{registry-4mMEt1Xy.css → registry-CEV5h2cu.css} +1 -1
  156. package/dist/assets/{registry-ZOWzhOHk.css → registry-CGB0jkFI.css} +1 -1
  157. package/dist/assets/{registry-BFbfXK-W.js → registry-Cgo4C0ux.js} +1 -1
  158. package/dist/assets/registry-CwRTUk0R.js +1 -0
  159. package/dist/assets/{registry-1wlTAh5b.js → registry-D06LKiUk.js} +1 -1
  160. package/dist/assets/registry-Dbe9TQPw.css +1 -0
  161. package/dist/assets/registry-Diyud3DF.js +1 -0
  162. package/dist/assets/registry-DjvftnY2.css +1 -0
  163. package/dist/assets/{registry-w4R6c89s.js → registry-KRYoVMCh.js} +1 -1
  164. package/dist/assets/registry-QbArAJKB.js +1 -0
  165. package/dist/assets/registry-dmR14XnY.css +1 -0
  166. package/dist/assets/registry-g2sBcIrf.css +1 -0
  167. package/dist/assets/{registry-CcOO8UZr.js → registry-qRfnKTt4.js} +1 -1
  168. package/dist/assets/{relate-UW-sUlJH.js → relate-aQFFr11O.js} +1 -1
  169. package/dist/assets/{replay-B5TkHPri.js → replay-CalqEgdW.js} +1 -1
  170. package/dist/assets/route-CMdTFx0P.js +1 -0
  171. package/dist/assets/{run-Df10YPyB.js → run-CuHaB8wF.js} +1 -1
  172. package/dist/assets/{run-gmqUaxcL.js → run-CwMSPOps.js} +1 -1
  173. package/dist/assets/{run-DlvA3l28.js → run-DCQrxgHA.js} +1 -1
  174. package/dist/assets/select-wEtBn9U6.js +3 -0
  175. package/dist/assets/shapes-BwoDrn09.js +1 -0
  176. package/dist/assets/shard000-Bx6Nmt0m.js +1 -0
  177. package/dist/assets/shard001-CL6O9SLr.js +1 -0
  178. package/dist/assets/shard002-vLQ0Ss-O.js +1 -0
  179. package/dist/assets/shard003-kKZdpzuh.js +1 -0
  180. package/dist/assets/shard004-CdVohAu1.js +1 -0
  181. package/dist/assets/shard005-CMzF_uJB.js +1 -0
  182. package/dist/assets/shard006-DQoDWuoN.js +1 -0
  183. package/dist/assets/shard007-Ck0N0IUk.js +1 -0
  184. package/dist/assets/shard008-Dt395x0Q.js +1 -0
  185. package/dist/assets/shard009-D_z8Lhqh.js +1 -0
  186. package/dist/assets/shard010-CQfR6lnk.js +1 -0
  187. package/dist/assets/shard011-l-w2t2Ie.js +1 -0
  188. package/dist/assets/shard012-BTw_UO1C.js +1 -0
  189. package/dist/assets/shard013-D8ZjKKYb.js +1 -0
  190. package/dist/assets/shard014-Cth_76It.js +1 -0
  191. package/dist/assets/shard015-DdYJVsHx.js +1 -0
  192. package/dist/assets/shard016-BdlBf9uZ.js +1 -0
  193. package/dist/assets/shard017-C3HTxh6t.js +1 -0
  194. package/dist/assets/shard018-Mf4wvqVk.js +1 -0
  195. package/dist/assets/shard019-Dpcy1Arx.js +1 -0
  196. package/dist/assets/shard020-BNvKfQld.js +1 -0
  197. package/dist/assets/shard021-D0kpI_PQ.js +1 -0
  198. package/dist/assets/shard022-Cjms7kAe.js +1 -0
  199. package/dist/assets/shard023-Bdwci7fy.js +1 -0
  200. package/dist/assets/shard024-BBoyPtpP.js +1 -0
  201. package/dist/assets/shard025-lMGpgN_0.js +3 -0
  202. package/dist/assets/shard026-Bp3UVI4_.js +1 -0
  203. package/dist/assets/shard027-C4HTpdeT.js +1 -0
  204. package/dist/assets/shard028-BsFTH3Sf.js +1 -0
  205. package/dist/assets/shard029-B3dEcXPy.js +1 -0
  206. package/dist/assets/shard030-DWwA-fNs.js +5 -0
  207. package/dist/assets/shard031-RhqA_0nH.js +1 -0
  208. package/dist/assets/shard032-BlZdG1Yi.js +1 -0
  209. package/dist/assets/shard033-Dmx2lOjI.js +1 -0
  210. package/dist/assets/shard034-BLOFKJT4.js +1 -0
  211. package/dist/assets/shard035-DMXdH733.js +1 -0
  212. package/dist/assets/shard036-DzOiEn23.js +1 -0
  213. package/dist/assets/shard037-BcHfVaYM.js +1 -0
  214. package/dist/assets/shard038-KozOx-Jh.js +1 -0
  215. package/dist/assets/shard039-apdILQwC.js +1 -0
  216. package/dist/assets/shard040-BrNXGaBi.js +1 -0
  217. package/dist/assets/shard041-D6eq9h1u.js +4 -0
  218. package/dist/assets/shard042-M-L34DbY.js +1 -0
  219. package/dist/assets/shard043-Ct6_C2pN.js +1 -0
  220. package/dist/assets/shard044-Bo0iaVHx.js +1 -0
  221. package/dist/assets/shard045-9ccZ4Y_N.js +1 -0
  222. package/dist/assets/shard046-eXoP478L.js +1 -0
  223. package/dist/assets/shard047-N56r6Lsz.js +1 -0
  224. package/dist/assets/shard048-BeKX7cI8.js +1 -0
  225. package/dist/assets/shard049-hPaNN2sL.js +1 -0
  226. package/dist/assets/shard050-B-YpP0B6.js +1 -0
  227. package/dist/assets/shard051-Bww5_KB2.js +1 -0
  228. package/dist/assets/shard052-DErwF8Df.js +1 -0
  229. package/dist/assets/shard053-C-qGH4jz.js +1 -0
  230. package/dist/assets/shard054-kcSxZrSj.js +1 -0
  231. package/dist/assets/shard055-CsETBTqa.js +1 -0
  232. package/dist/assets/shard056-CdBR4qTC.js +1 -0
  233. package/dist/assets/shard057-yRUG8B9e.js +1 -0
  234. package/dist/assets/shard058-DeDAnECG.js +1 -0
  235. package/dist/assets/shard059-Dh6jbDnW.js +1 -0
  236. package/dist/assets/shard060-B5kpWrhW.js +1 -0
  237. package/dist/assets/shard061-BTnj5LZA.js +1 -0
  238. package/dist/assets/shard062-DC7LTaNc.js +1 -0
  239. package/dist/assets/shard063-C8SIGCfd.js +1 -0
  240. package/dist/assets/shard064-DLyASocW.js +1 -0
  241. package/dist/assets/shard065-Cy_yV4ry.js +1 -0
  242. package/dist/assets/shard066-BmjVQqFX.js +1 -0
  243. package/dist/assets/shard067-uZUJsqtF.js +1 -0
  244. package/dist/assets/shard068-CXVjyJU4.js +1 -0
  245. package/dist/assets/shard069-CyfmjAm-.js +4 -0
  246. package/dist/assets/shard070-CxN3xiuY.js +12 -0
  247. package/dist/assets/shard071-CP1WrYC-.js +1 -0
  248. package/dist/assets/shard072-D6L5Yr05.js +1 -0
  249. package/dist/assets/shard073-DFEzkwg2.js +1 -0
  250. package/dist/assets/shard074-BSv3rvRL.js +1 -0
  251. package/dist/assets/shard075-Bt0OjGVd.js +1 -0
  252. package/dist/assets/shard076-DZHs0uzd.js +1 -0
  253. package/dist/assets/{share-kW3pZ027.js → share--tpc1nLE.js} +1 -1
  254. package/dist/assets/speed-BOytg6bC.js +1 -0
  255. package/dist/assets/store-B2Rpbqgg.js +1 -0
  256. package/dist/assets/store-Ba9vzL4H.js +1 -0
  257. package/dist/assets/store-BwyOArJl.js +1 -0
  258. package/dist/assets/store-ruEsXJjU.js +1 -0
  259. package/dist/assets/streamParse-BX0bAppQ.js +2 -0
  260. package/dist/assets/{templates-DHeyJ32F.css → templates-BIkAr4YH.css} +1 -1
  261. package/dist/assets/{theme-7IrMJ70_.js → theme-D5D55hZi.js} +1 -1
  262. package/dist/assets/{threads-Cu2t3070.js → threads-DNfxMTwx.js} +1 -1
  263. package/dist/assets/{useDashboardLoop-BoVNM-pT.js → useDashboardLoop-ifcuVRo-.js} +3 -3
  264. package/dist/assets/{useDashboards-SRk8LqHe.js → useDashboards-lgQnk2Al.js} +1 -1
  265. package/dist/assets/useFocusTrap-CJmpNZv2.js +1 -0
  266. package/dist/assets/useInView-DsTvv7L_.js +1 -0
  267. package/dist/assets/useInterval-DDgFrel2.js +1 -0
  268. package/dist/assets/{useLiveConfig-Cpy0_E_-.js → useLiveConfig-B4CmBiAK.js} +1 -1
  269. package/dist/assets/useStudy-CySgE3Cx.js +1 -0
  270. package/dist/assets/{walkSync-CT8kmbzY.js → walkSync-DBne70gg.js} +1 -1
  271. package/dist/demo-assets/CREDITS.md +94 -50
  272. package/dist/demo-assets/images/arnel-lighthouse.avif +0 -0
  273. package/dist/demo-assets/images/cliff-fields.avif +0 -0
  274. package/dist/demo-assets/images/crater-panorama.avif +0 -0
  275. package/dist/demo-assets/images/furnas-lake.avif +0 -0
  276. package/dist/demo-assets/images/green-coast-raw.avif +0 -0
  277. package/dist/demo-assets/images/green-coast.avif +0 -0
  278. package/dist/demo-assets/images/island-coast-poster.avif +0 -0
  279. package/dist/demo-assets/images/nordeste-town.avif +0 -0
  280. package/dist/demo-assets/images/sea-cliffs.avif +0 -0
  281. package/dist/demo-assets/images/sete-cidades.avif +0 -0
  282. package/dist/demo-assets/images/tea-terraces.avif +0 -0
  283. package/dist/demo-assets/pdf/cfd-primer.pdf +0 -0
  284. package/dist/demo-assets/video/island-coast.webm +0 -0
  285. package/dist/fonts/fonts.css +18 -0
  286. package/dist/index.html +38 -10
  287. package/dist/legal/PRIVACY.md +1 -0
  288. package/dist/legal/TERMS.md +1 -1
  289. package/dist/legal/THIRD-PARTY.txt +13 -5
  290. package/package.json +3 -2
  291. package/dist/assets/AnnotationLayer-8JABh1Dm.js +0 -0
  292. package/dist/assets/AtlasView-B5fkQhO6.css +0 -1
  293. package/dist/assets/BriefingPlayer-TpFZB77N.css +0 -1
  294. package/dist/assets/CanvasSkeleton-iy6DBvde.css +0 -1
  295. package/dist/assets/CardEditor-BY1bZiV6.css +0 -1
  296. package/dist/assets/ConversationVideoStudio-CIAMxElj.css +0 -1
  297. package/dist/assets/ConversationVideoStudio-tpqQQnOs.js +0 -1
  298. package/dist/assets/CourseLessonReader-PFJn-4tj.js +0 -2
  299. package/dist/assets/CoursesApp-5pnHYJR8.js +0 -2
  300. package/dist/assets/CrossExamPanel-CZ0ShGma.css +0 -1
  301. package/dist/assets/DashboardDetail-DYFghZ4p.js +0 -2
  302. package/dist/assets/DashboardLoopGate-C0blM1w9.js +0 -2
  303. package/dist/assets/DashboardLoopRuntime-C9R-z9-o.js +0 -1
  304. package/dist/assets/DashboardsApp-Dh_jh1dF.js +0 -2
  305. package/dist/assets/DeepZoomApp-fRXCJHHZ.css +0 -1
  306. package/dist/assets/DelegatePanel-Cf85-0qE.css +0 -1
  307. package/dist/assets/DelegatePanel-DKWsRY9I.js +0 -33
  308. package/dist/assets/DemoGallery-CkuqAXje.js +0 -1
  309. package/dist/assets/FlagshipShowcase-BHAlRDAE.js +0 -1
  310. package/dist/assets/ForecastPanel-Da2ZBUrE.css +0 -1
  311. package/dist/assets/GalleryApp-DziLKFJZ.js +0 -1
  312. package/dist/assets/LeverPanel-DhpJY76O.css +0 -1
  313. package/dist/assets/LibraryOverlay-CnKWDMG_.css +0 -1
  314. package/dist/assets/LiveApp-C-OPBybd.css +0 -1
  315. package/dist/assets/LiveApp-D6vkyhZb.js +0 -79
  316. package/dist/assets/LiveSettings-C9cKOrSb.js +0 -6
  317. package/dist/assets/LiveSettings-CmgrMqvK.css +0 -1
  318. package/dist/assets/MindShape-C_Bo9hW9.js +0 -1
  319. package/dist/assets/MindShape-CaPeUo-a.css +0 -1
  320. package/dist/assets/PresentationDeck-BW_7qecK.js +0 -1
  321. package/dist/assets/PrismApp-BY71jJvW.js +0 -2
  322. package/dist/assets/PrismAskController-DBoxQSJR.css +0 -1
  323. package/dist/assets/PrismOverlay-BTfAicBt.css +0 -1
  324. package/dist/assets/Recap-DCiiWNiV.css +0 -1
  325. package/dist/assets/RippleApp-DZw8op-E.js +0 -2
  326. package/dist/assets/RippleOverlay-D7ItTvS-.js +0 -6
  327. package/dist/assets/RippleOverlay-_iiZsQVZ.css +0 -1
  328. package/dist/assets/SeeDontRead-DmmtWAzn.js +0 -1
  329. package/dist/assets/ShareModal-9jSn52Mw.js +0 -2
  330. package/dist/assets/ShareModal-D1QuQEko.css +0 -1
  331. package/dist/assets/SrsReview-B1B2VekR.css +0 -1
  332. package/dist/assets/TopicCanvas-DozfZFto.js +0 -2
  333. package/dist/assets/TopicCanvas-uRuHi99s.css +0 -1
  334. package/dist/assets/WhyMachineOverlay-BZk3PVTl.css +0 -1
  335. package/dist/assets/WorldOverlay-yhxq328s.js +0 -2
  336. package/dist/assets/ZoomDeck-B2SjNwY7.css +0 -1
  337. package/dist/assets/canvas-vqIFVmtP.js +0 -1
  338. package/dist/assets/capture-9OrAc1p2.js +0 -2
  339. package/dist/assets/dashboards-C1u2ks-d.css +0 -1
  340. package/dist/assets/generateLive-B6purd69.js +0 -51
  341. package/dist/assets/homeTarget-CsO8nY7z.js +0 -1
  342. package/dist/assets/index-DrzNHwlO.css +0 -1
  343. package/dist/assets/index-zIa6h_8b.js +0 -22
  344. package/dist/assets/kokoro-B3oG_8sd.js +0 -1
  345. package/dist/assets/layout-CEoNLr-w.js +0 -1
  346. package/dist/assets/pageVisibility-BxUVsw7Z.js +0 -1
  347. package/dist/assets/pen-DNMslo3e.js +0 -24
  348. package/dist/assets/pin-D-4Zjiik.css +0 -1
  349. package/dist/assets/portal-k_BMgWND.js +0 -1
  350. package/dist/assets/providers-BovElgRL.js +0 -1
  351. package/dist/assets/quietHours-DI1ayIIq.js +0 -1
  352. package/dist/assets/registry-BSX3aFUw.js +0 -1
  353. package/dist/assets/registry-Bv1f5UU4.js +0 -2
  354. package/dist/assets/registry-Cse2wF7x.css +0 -1
  355. package/dist/assets/registry-Dye5m3qt.css +0 -1
  356. package/dist/assets/registry-GeSy4i7R.css +0 -1
  357. package/dist/assets/registry-WHd1PwU3.js +0 -1
  358. package/dist/assets/registry-Xl8mAnKq.js +0 -1
  359. package/dist/assets/registry-tkd3UhWn.css +0 -1
  360. package/dist/assets/shapes-Cx5SCKgj.js +0 -39
  361. package/dist/assets/speed-K5_Ebj-8.js +0 -1
  362. package/dist/assets/store-BfHRbVKz.js +0 -1
  363. package/dist/assets/store-CsjDEADX.js +0 -1
  364. package/dist/assets/store-DpObYU1u.js +0 -1
  365. package/dist/assets/store-gohr8YVT.js +0 -1
  366. package/dist/assets/streamParse-B-Gjwa9T.js +0 -2
  367. package/dist/assets/useFocusTrap-DBtkeyRy.js +0 -1
  368. package/dist/assets/useInView-CXTOAEV3.js +0 -1
  369. package/dist/assets/useStudy-5CsF_L-s.js +0 -1
  370. package/dist/demo-assets/images/basalt-cliffs.jpg +0 -0
  371. package/dist/demo-assets/images/capelinhos.jpg +0 -0
  372. package/dist/demo-assets/images/cliff-fields.jpg +0 -0
  373. package/dist/demo-assets/images/crater-panorama.jpg +0 -0
  374. package/dist/demo-assets/images/furnas-lake.jpg +0 -0
  375. package/dist/demo-assets/images/green-coast.jpg +0 -0
  376. package/dist/demo-assets/images/overcast-coast.jpg +0 -0
  377. package/dist/demo-assets/images/patchwork-fields.jpg +0 -0
  378. package/dist/demo-assets/images/ponta-delgada.jpg +0 -0
  379. package/dist/demo-assets/images/sete-cidades.jpg +0 -0
  380. package/dist/demo-assets/images/village-street.jpg +0 -0
  381. package/dist/demo-assets/video/azores-film.webm +0 -0
  382. /package/dist/assets/{BriefingPlayer-C0D_2ILa.js → BriefingPlayer-74mRKyjl.js} +0 -0
  383. /package/dist/assets/{CrossExamPanel-CdIYUu-B.js → CrossExamPanel-BfeGr5iw.js} +0 -0
  384. /package/dist/assets/{ForecastPanel-zPUh2ClQ.js → ForecastPanel-OfW39WGS.js} +0 -0
  385. /package/dist/assets/{LeverPanel-D1SNRGdm.js → LeverPanel-vco5UK2U.js} +0 -0
  386. /package/dist/assets/{WhyMachineOverlay-ks9-rRiL.js → WhyMachineOverlay-D2K7y8SA.js} +0 -0
  387. /package/dist/assets/{lib-B7OE1ZQQ.js → lib-u95BsX_B.js} +0 -0
  388. /package/dist/assets/{registry-7poQfBaM.js → registry-C4Yh05pk.js} +0 -0
  389. /package/dist/assets/{registry-Daypk4uR.js → registry-S3j4OpCH.js} +0 -0
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./compiler-runtime-qQQXpJgv.js";import{t as r}from"./jsx-runtime-DeHZSEgm.js";import{n as i}from"./icons-gLFQTv74.js";import{t as a}from"./richText-BkxJhl9N.js";import{i as o,r as s}from"./format-q0LwBjID.js";import{t as c}from"./scale-Bcgfo6Hp.js";import{t as l}from"./BlockEmpty-B82uCse8.js";import"./lib-B7OE1ZQQ.js";import{n as u,t as d}from"./motion-DxHSlPN6.js";import{t as f}from"./registry-types-D3q_LrlV.js";import{t as p}from"./annotations-CftUUB13.js";var m=t();function h(e){let t=parseFloat(String(e??``).replace(/[^0-9.-]/g,``));return Number.isNaN(t)?0:t}var g=e=>e.trim().toLowerCase(),_={formatCell:(e,t)=>t,cellTone:()=>void 0,cellBar:()=>void 0,rowTone:()=>void 0,dimUnmatched:!1,summaryRows:[],active:!1};function v(e,t,n){if(!e||e.length===0)return _;let r=t[0]?.key??``,i=new Set(t.filter(e=>e.numeric).map(e=>e.key)),a=new Map,c=new Map,l=new Map,u=new Map,d=!1,f=[];for(let p of e)switch(p.op){case`format`:{let e=p.target.kind===`column`?[p.target.key]:t.map(e=>e.key);for(let t of e)a.set(t,e=>{let t=h(e);return p.as===`currency`?s(t,{currency:`USD`}):p.as===`percent`?s(t,{percent:!0}):p.as===`unit`?o(t,p.unit):p.as===`duration`?o(t,p.unit??`min`):e});break}case`status`:c.set(p.target.key,p.rules);break;case`bar`:{let e=p.target.key,t=Math.max(1,...n.map(t=>Math.abs(h(t[e]))));l.set(e,t);break}case`emphasize`:p.target.kind===`row`&&(u.set(g(p.target.match),p.tone??`presence`),p.dimOthers&&(d=!0));break;case`summary`:{let e=(p.columns??t.map(e=>e.key)).filter(e=>i.has(e)||p.columns?.includes(e)),o={};for(let t of e){let e=n.map(e=>h(e[t]));if(e.length===0)continue;let r;switch(p.stat){case`total`:r=e.reduce((e,t)=>e+t,0);break;case`mean`:r=e.reduce((e,t)=>e+t,0)/e.length;break;case`max`:r=Math.max(...e);break;case`min`:r=Math.min(...e);break;case`count`:r=e.length;break;default:r=0}let i=a.get(t);o[t]=i?i(String(r)):s(r,{})}let c=p.label??{total:`Total`,mean:`Average`,max:`Max`,min:`Min`,count:`Count`}[p.stat];r&&o[r]===void 0&&(o[r]=c),f.push({label:c,cells:o});break}}let m=e=>e?p[e]:void 0;return{active:!0,dimUnmatched:d,summaryRows:f,formatCell:(e,t)=>{let n=a.get(e);return n?n(t):t},cellTone:(e,t)=>{let n=c.get(e);if(!n)return;let r=n.find(e=>g(t).includes(g(e.match)));return r?p[r.tone]:void 0},cellBar:(e,t)=>{let n=l.get(e);if(n)return Math.max(0,Math.min(1,Math.abs(h(t))/n))},rowTone:e=>m(u.get(g(e)))}}var y=r(),b=e=>{let t=parseFloat(String(e).replace(/[^0-9.-]/g,``));return Number.isNaN(t)?0:t};function x({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,columns:r,rows:a,sortKey:o,sortDir:s=`desc`,searchable:c=!0,searchPlaceholder:l=`Filter rows…`,footer:u,annotations:d,delay:f}){let p=i[t]||i.table,[h,g]=(0,m.useState)(o||r[0]?.key),[_,x]=(0,m.useState)(s),[S,C]=(0,m.useState)(``),w=e=>r.find(t=>t.key===e),T=r[0]?.key??``,E=(0,m.useMemo)(()=>v(d,r,a),[d,r,a]),D=(0,m.useMemo)(()=>{let e=S.trim().toLowerCase(),t=a;e&&(t=a.filter(t=>Object.values(t).some(t=>String(t).toLowerCase().includes(e))));let n=w(h);return[...t].sort((e,t)=>{let r=e[h]??``,i=t[h]??``,a=n?.numeric?b(r)-b(i):String(r).localeCompare(String(i));return _===`asc`?a:-a})},[a,S,h,_]),O=e=>{e===h?x(e=>e===`asc`?`desc`:`asc`):(g(e),x(w(e)?.numeric?`desc`:`asc`))};return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(f||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`tbl-head`,children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:0},children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),c&&(0,y.jsxs)(`label`,{className:`tbl-search`,children:[(0,y.jsx)(i.eye,{className:`tbl-search-ic`}),(0,y.jsx)(`input`,{value:S,onChange:e=>C(e.target.value),placeholder:l}),S&&(0,y.jsx)(`button`,{className:`tbl-search-x`,onClick:()=>C(``),"aria-label":`clear`,children:(0,y.jsx)(i.x,{})})]})]}),(0,y.jsx)(`div`,{className:`dt-scroll`,children:(0,y.jsxs)(`table`,{className:`dt`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsx)(`tr`,{children:r.map(e=>(0,y.jsx)(`th`,{className:`dt-th ${e.align===`right`?`r`:``} ${h===e.key?`on`:``}`,onClick:()=>O(e.key),children:(0,y.jsxs)(`span`,{className:`dt-th-in`,children:[e.label,(0,y.jsx)(`span`,{className:`dt-sort ${h===e.key?_:``}`,children:h===e.key&&_===`asc`?(0,y.jsx)(i.arrowUp,{}):(0,y.jsx)(i.arrowDown,{})})]})},e.key))})}),(0,y.jsxs)(`tbody`,{children:[D.map((e,t)=>{let n=E.active?E.rowTone(e[T]??``):void 0,i=E.dimUnmatched&&!n;return(0,y.jsx)(`tr`,{className:`dt-row${n?` dt-row-emph`:``}${i?` dt-row-dim`:``}`,style:n?{"--emph":n}:void 0,children:r.map(t=>{let n=e[t.key]??``,r=E.active?E.formatCell(t.key,n):n,i=E.active?E.cellTone(t.key,n):void 0,a=E.active?E.cellBar(t.key,n):void 0;return(0,y.jsxs)(`td`,{className:`dt-td ${t.align===`right`?`r tab-num`:``} ${h===t.key?`on`:``}`,style:{...t.color?{color:t.color}:{},...i?{color:i}:{}},children:[a!==void 0&&(0,y.jsx)(`span`,{className:`dt-bar`,style:{width:`${Math.round(a*100)}%`}}),(0,y.jsx)(`span`,{className:`dt-cell-v`,children:r})]},t.key)})},t)}),D.length===0&&(0,y.jsx)(`tr`,{children:(0,y.jsxs)(`td`,{className:`dt-empty`,colSpan:r.length,children:[`No rows match “`,S,`”.`]})})]}),E.summaryRows.length>0&&D.length>0&&(0,y.jsx)(`tfoot`,{children:E.summaryRows.map((e,t)=>(0,y.jsx)(`tr`,{className:`dt-summary`,children:r.map((t,n)=>(0,y.jsx)(`td`,{className:`dt-td dt-summary-td ${t.align===`right`?`r tab-num`:``}`,children:e.cells[t.key]??(n===0?e.label:``)},t.key))},t))})]})}),(0,y.jsxs)(`div`,{className:`tbl-foot-meta faint`,children:[D.length,` of `,a.length,` rows · sorted by `,w(h)?.label,` `,_===`asc`?`↑`:`↓`]}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:u})]})}function S({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,rowGroup:r,colHeaders:a,measures:o,rows:s,measure:c=0,accent:l=`var(--presence)`,footer:u,delay:d}){let f=i[t]||i.table,[p,h]=(0,m.useState)(Math.max(0,Math.min(c,o.length-1))),[g,_]=(0,m.useState)(null),v=o[p],b=v?.key??``,x=e=>typeof e==`number`&&Number.isFinite(e)?e:null,S=(e,t)=>s[e]?.cells[t]?.values[b],C=s.flatMap(e=>e.cells.map(e=>x(e.values[b]))).filter(e=>e!==null),w=C.length>0,T=Math.max(1,...C),E=e=>`${v?.prefix||``}${e.toLocaleString()}${v?.unit||``}`,D=a.map((e,t)=>s.reduce((e,n)=>e+(x(n.cells[t]?.values[b])??0),0)),O=D.reduce((e,t)=>e+t,0),k=e=>/^(totals?|grand\s*total|sum|all)$/i.test(e.trim()),A=s.length>0&&k(s[s.length-1]?.label??``),j=a.some(e=>k(String(e))),M=a.map((e,t)=>s.some(e=>x(e.cells[t]?.values[b])!==null)),N=w&&!A,P=w&&!j;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`tbl-head`,children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:0},children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),o.length>1&&(0,y.jsx)(`div`,{className:`seg`,role:`tablist`,children:o.map((e,t)=>(0,y.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t===p,className:`seg-btn ${t===p?`on`:``}`,onClick:()=>h(t),children:e.label},`${e.key}-${t}`))})]}),(0,y.jsx)(`div`,{className:`dt-scroll`,children:(0,y.jsxs)(`table`,{className:`pv`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`pv-corner`,children:r}),a.map((e,t)=>(0,y.jsx)(`th`,{className:`pv-colh ${g?.c===t?`on`:``}`,children:e},t)),P&&(0,y.jsx)(`th`,{className:`pv-colh tot`,children:`Total`})]})}),(0,y.jsxs)(`tbody`,{children:[s.map((e,t)=>{let n=e.cells.reduce((e,t)=>e+(x(t.values[b])??0),0);return(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`pv-rowh ${g?.r===t?`on`:``}`,children:e.label}),e.cells.map((e,n)=>{let r=S(t,n),i=x(r),a=i===null?0:i/T*.82+.04,o=g?.r===t&&g?.c===n;return(0,y.jsxs)(`td`,{className:`pv-cell ${o?`hot`:``}`,style:{background:i===null?void 0:`color-mix(in oklab, ${l} ${a*100}%, transparent)`},onMouseEnter:()=>_({r:t,c:n}),onMouseLeave:()=>_(null),children:[(0,y.jsx)(`span`,{className:i===null?`pv-v`:`pv-v tab-num`,children:i===null?String(r??``):E(i)}),o&&i!==null&&O>0&&(0,y.jsxs)(`span`,{className:`pv-tip`,children:[(i/O*100).toFixed(1),`% of total`]})]},n)}),P&&(0,y.jsx)(`td`,{className:`pv-cell tot tab-num`,children:E(n)})]},t)}),N&&(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`pv-rowh tot`,children:`Total`}),D.map((e,t)=>(0,y.jsx)(`td`,{className:`pv-cell tot tab-num`,children:M[t]?E(e):`—`},t)),P&&(0,y.jsx)(`td`,{className:`pv-cell tot grand tab-num`,children:E(O)})]})]})]})}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:u})]})}var C=[`var(--warning)`,`var(--text-secondary)`,`var(--presence-soft)`];function w({r:e,rank:t,value:n,width:r,unit:a,color:o,hot:s,onEnter:c,onLeave:l}){let u=d(n,{duration:900,decimals:0}),f=e.move??0;return(0,y.jsxs)(`div`,{className:`lb-row m-stagger-item m-fade-rise ${s?`hot`:``} ${t<3?`podium`:``}`,style:{"--i":t},onMouseEnter:c,onMouseLeave:l,children:[(0,y.jsxs)(`div`,{className:`lb-rank`,style:t<3?{color:C[t]}:void 0,children:[t<3?(0,y.jsx)(`span`,{className:`lb-medal`,children:`●`}):null,t+1]}),(0,y.jsxs)(`div`,{className:`lb-body`,children:[(0,y.jsxs)(`div`,{className:`lb-top`,children:[(0,y.jsx)(`span`,{className:`lb-name`,children:e.name}),e.sub&&(0,y.jsx)(`span`,{className:`lb-sub faint`,children:e.sub}),(0,y.jsx)(`span`,{className:`lb-spacer`}),(0,y.jsxs)(`span`,{className:`lb-val tab-num`,"data-mark":t===0?`underline`:void 0,children:[u,a]})]}),(0,y.jsx)(`div`,{className:`lb-track`,children:(0,y.jsx)(`div`,{className:`lb-fill`,style:{width:`${r}%`,background:o}})})]}),(0,y.jsxs)(`div`,{className:`lb-move ${f>0?`up`:f<0?`down`:`flat`}`,children:[f>0?(0,y.jsx)(i.arrowUp,{}):f<0?(0,y.jsx)(i.arrowDown,{}):(0,y.jsx)(`span`,{className:`lb-dash`,children:`–`}),f!==0&&(0,y.jsx)(`span`,{className:`tab-num`,children:Math.abs(f)})]})]})}function T({title:e,icon:t=`chart`,iconColor:n=`var(--insight)`,metrics:r,rows:a,metric:o=0,accent:s=`var(--insight)`,footer:c,delay:l}){let u=i[t]||i.chart,[d,f]=(0,m.useState)(Math.max(0,Math.min(o,r.length-1))),[p,h]=(0,m.useState)(null),g=r[d],_=g?.key??``,v=(0,m.useMemo)(()=>[...a].map((e,t)=>({r:e,i:t})).sort((e,t)=>(t.r.values[_]??0)-(e.r.values[_]??0)),[a,_]),b=Math.max(1,...v.map(e=>e.r.values[_]??0));return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(l||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`tbl-head`,children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:0},children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),r.length>1&&(0,y.jsx)(`div`,{className:`seg`,children:r.map((e,t)=>(0,y.jsx)(`button`,{className:`seg-btn ${t===d?`on`:``}`,onClick:()=>f(t),children:e.label},`${e.key}-${t}`))})]}),(0,y.jsx)(`div`,{className:`lb`,children:v.map(({r:e,i:t},n)=>{let r=e.values[_]??0,i=r/b*100;return(0,y.jsx)(w,{r:e,rank:n,value:r,width:i,unit:g?.unit||``,color:n<3?C[n]:s,hot:p===n,onEnter:()=>h(n),onLeave:()=>h(null)},`${e.name}-${t}`)})}),c&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:c})]})}function E(e){return e.join(`.`)}function D(e){if(e==null)return 0;let t=parseFloat(e.replace(/[^0-9.-]/g,``));return Number.isFinite(t)?t:0}function O(e){let t=new Map,n=e=>{let r=e.children?.map(n)??[],i=D(e.value),a=i>0||!r.length?i:r.reduce((e,t)=>e+t.value,0),o=r.reduce((e,t)=>e+(t.pct??0),0),s={value:a,pct:e.pct!=null&&e.pct>0?e.pct:o>0?o:e.pct};return t.set(e,s),s};return e.forEach(n),t}function k({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,valueLabel:r=`Value`,nodes:a,accent:o=`var(--presence)`,footer:s,delay:c}){let l=i[t]||i.layers,[u,d]=(0,m.useState)(()=>{let e=new Set,t=(n,r)=>n.forEach((n,i)=>{let a=[...r,i];n.open&&n.children?.length&&e.add(E(a)),n.children&&t(n.children,a)});return t(a,[]),e}),f=(0,m.useMemo)(()=>O(a),[a]),p=e=>d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),h=(e,t,n)=>e.flatMap((e,r)=>{let a=[...t,r],s=E(a),c=u.has(s),l=!!e.children?.length,d=e.color||o,m=f.get(e),g=m?.pct,_=m?.value??0,v=D(e.value)>0?e.value:_>0?String(_):e.value,b=[(0,y.jsxs)(`div`,{className:`tt-row ${l?`parent`:`leaf`} ${n===0?`top`:``}`,style:{paddingLeft:8+n*18},onClick:l?()=>p(s):void 0,onKeyDown:l?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p(s))}:void 0,role:l?`button`:void 0,tabIndex:l?0:void 0,children:[(0,y.jsx)(`span`,{className:`tt-caret ${l?``:`hidden`} ${c?`open`:``}`,children:(0,y.jsx)(i.chevR,{})}),(0,y.jsx)(`span`,{className:`tt-label`,children:e.label}),e.tag&&(0,y.jsx)(`span`,{className:`tt-tag`,style:{color:d,borderColor:`color-mix(in oklab, ${d} 40%, transparent)`},children:e.tag}),(0,y.jsx)(`span`,{className:`tt-spacer`}),g!=null&&(0,y.jsx)(`span`,{className:`tt-bar`,children:(0,y.jsx)(`span`,{className:`tt-bar-fill`,style:{width:`${Math.round(g*100)}%`,background:d}})}),v!=null&&(0,y.jsx)(`span`,{className:`tt-val tab-num`,children:v})]},s)];return l&&c&&b.push(...h(e.children,a,n+1)),b});return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsxs)(`div`,{className:`tt-header`,children:[(0,y.jsx)(`span`,{className:`tt-h-label`,children:`Item`}),(0,y.jsx)(`span`,{className:`tt-h-val`,children:r})]}),(0,y.jsx)(`div`,{className:`tt`,children:h(a,[],0)}),s&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:s})]})}function A({title:e,icon:t=`clock`,iconColor:n=`var(--presence)`,ticks:r,lanes:a,footer:o,delay:s}){let c=i[t]||i.clock,[l,u]=(0,m.useState)(null);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(s||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsxs)(`div`,{className:`sw`,children:[a.map((e,t)=>(0,y.jsxs)(`div`,{className:`sw-lane`,children:[(0,y.jsxs)(`div`,{className:`sw-actor`,children:[(0,y.jsx)(`span`,{className:`sw-actor-name`,children:e.actor}),e.sub&&(0,y.jsx)(`span`,{className:`sw-actor-sub faint`,children:e.sub})]}),(0,y.jsxs)(`div`,{className:`sw-track`,children:[(0,y.jsx)(`span`,{className:`sw-baseline`}),e.events.map((e,n)=>{let r=e.color||`var(--presence)`,i=l?.l===t&&l?.e===n,a=`${Math.max(0,Math.min(1,e.at))*100}%`;if(e.span&&e.span>0){let o=`${Math.max(.02,Math.min(1-e.at,e.span))*100}%`;return(0,y.jsxs)(`div`,{className:`sw-bar ${i?`hot`:``}`,style:{left:a,width:o,background:`color-mix(in oklab, ${r} 26%, transparent)`,borderColor:r},onMouseEnter:()=>u({l:t,e:n}),onMouseLeave:()=>u(null),children:[(0,y.jsx)(`span`,{className:`sw-bar-label`,style:{color:r},children:e.label}),i&&e.detail&&(0,y.jsx)(`span`,{className:`sw-tip`,children:e.detail})]},n)}return(0,y.jsxs)(`div`,{className:`sw-evt ${i?`hot`:``}`,style:{left:a},onMouseEnter:()=>u({l:t,e:n}),onMouseLeave:()=>u(null),children:[(0,y.jsx)(`span`,{className:`sw-dot`,style:{background:r,boxShadow:`0 0 0 4px color-mix(in oklab, ${r} 22%, transparent)`}}),(0,y.jsx)(`span`,{className:`sw-evt-label`,children:e.label}),i&&e.detail&&(0,y.jsx)(`span`,{className:`sw-tip`,children:e.detail})]},n)})]})]},t)),r&&r.length>0&&(0,y.jsxs)(`div`,{className:`sw-axis`,children:[(0,y.jsx)(`span`,{className:`sw-actor`}),(0,y.jsx)(`div`,{className:`sw-axis-ticks`,children:r.map((e,t)=>(0,y.jsx)(`span`,{className:`sw-tick faint`,children:e},t))})]})]}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:o})]})}function j({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,columns:r,rows:o,notes:s,footer:c,delay:l}){let u=i[t]||i.doc,[d,f]=(0,m.useState)(null),[p,h]=(0,m.useState)(null),g=p??d;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(l||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`dt-scroll`,children:(0,y.jsxs)(`table`,{className:`dt ft`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsx)(`tr`,{children:r.map((e,t)=>(0,y.jsx)(`th`,{className:`dt-th ${t===0?``:`r`}`,children:e},t))})}),(0,y.jsx)(`tbody`,{children:o.map((e,t)=>(0,y.jsx)(`tr`,{className:`dt-row`,children:e.cells.map((e,t)=>(0,y.jsxs)(`td`,{className:`dt-td ${t===0?``:`r tab-num`}`,style:e.color?{color:e.color}:void 0,children:[e.v,e.note!=null&&(0,y.jsx)(`button`,{className:`ft-anchor ${g===e.note?`on`:``} ${d===e.note?`pin`:``}`,onMouseEnter:()=>h(e.note),onMouseLeave:()=>h(null),onClick:()=>f(t=>t===e.note?null:e.note),"aria-label":`footnote ${e.note}`,children:e.note})]},t))},t))})]})}),(0,y.jsx)(`div`,{className:`ft-notes`,children:s.map((e,t)=>{let n=t+1;return(0,y.jsxs)(`div`,{className:`ft-note ${g===n?`on`:``}`,children:[(0,y.jsx)(`span`,{className:`ft-note-i`,children:n}),(0,y.jsx)(`span`,{className:`ft-note-t`,dangerouslySetInnerHTML:a(e)})]},t)})}),c&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:c})]})}var M=n(),N=116,P=34;function F(e){let t=(0,M.c)(48),{row:n,hoverI:r,onHover:i,delay:a}=e,o=(0,m.useRef)(null),s;t[0]===a?s=t[1]:(s={delay:a},t[0]=a,t[1]=s),u(o,s);let c=n.series;if(c.length===0){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(`svg`,{className:`sk-svg`,viewBox:`0 0 ${N} ${P}`,preserveAspectRatio:`none`,"aria-hidden":`true`}),t[2]=e):e=t[2],e}let l=Math.min(...c),d=Math.max(...c)-l||1,f=n.color||(n.deltaDir===`down`?`var(--danger)`:`var(--insight)`),p,h,g,_,v,b;if(t[3]!==l||t[4]!==d||t[5]!==c){let e;t[12]!==l||t[13]!==d||t[14]!==c.length?(e=(e,t)=>[t/(c.length-1||1)*112+2,31-(e-l)/d*28],t[12]=l,t[13]=d,t[14]=c.length,t[15]=e):e=t[15],h=c.map(e),p=h.map(ee).join(` `),g=p,_=h[h.length-1][0].toFixed(1),v=P,b=h[0][0].toFixed(1),t[3]=l,t[4]=d,t[5]=c,t[6]=p,t[7]=h,t[8]=g,t[9]=_,t[10]=v,t[11]=b}else p=t[6],h=t[7],g=t[8],_=t[9],v=t[10],b=t[11];let x=`${g} L${_} ${v} L${b} ${P} Z`,S;if(t[16]!==n.name){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\W/g,t[18]=e):e=t[18],S=n.name.replace(e,``),t[16]=n.name,t[17]=S}else S=t[17];let C=`sg-${S}`,w;t[19]===i?w=t[20]:(w=()=>i(null),t[19]=i,t[20]=w);let T;t[21]!==i||t[22]!==c.length?(T=e=>{let t=e.currentTarget.getBoundingClientRect(),n=(e.clientX-t.left)/t.width;i(Math.max(0,Math.min(c.length-1,Math.round(n*(c.length-1)))))},t[21]=i,t[22]=c.length,t[23]=T):T=t[23];let E,D;t[24]===f?(E=t[25],D=t[26]):(D=(0,y.jsx)(`stop`,{offset:`0%`,stopColor:f,stopOpacity:`0.28`}),E=(0,y.jsx)(`stop`,{offset:`100%`,stopColor:f,stopOpacity:`0`}),t[24]=f,t[25]=E,t[26]=D);let O;t[27]!==C||t[28]!==E||t[29]!==D?(O=(0,y.jsx)(`defs`,{children:(0,y.jsxs)(`linearGradient`,{id:C,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[D,E]})}),t[27]=C,t[28]=E,t[29]=D,t[30]=O):O=t[30];let k=`url(#${C})`,A;t[31]!==x||t[32]!==k?(A=(0,y.jsx)(`path`,{d:x,fill:k,stroke:`none`}),t[31]=x,t[32]=k,t[33]=A):A=t[33];let j;t[34]!==f||t[35]!==p?(j=(0,y.jsx)(`path`,{ref:o,d:p,fill:`none`,stroke:f,strokeWidth:`1.6`,strokeLinejoin:`round`,strokeLinecap:`round`}),t[34]=f,t[35]=p,t[36]=j):j=t[36];let F;t[37]!==f||t[38]!==r||t[39]!==h?(F=r!=null&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`line`,{x1:h[r][0],y1:`0`,x2:h[r][0],y2:P,stroke:`var(--hover-line)`,strokeWidth:`1`}),(0,y.jsx)(`circle`,{cx:h[r][0],cy:h[r][1],r:`2.6`,fill:f,stroke:`var(--surface-elevated)`,strokeWidth:`1.4`})]}),t[37]=f,t[38]=r,t[39]=h,t[40]=F):F=t[40];let I;return t[41]!==O||t[42]!==A||t[43]!==j||t[44]!==F||t[45]!==w||t[46]!==T?(I=(0,y.jsxs)(`svg`,{className:`sk-svg`,viewBox:`0 0 ${N} ${P}`,preserveAspectRatio:`none`,"aria-hidden":`true`,onMouseLeave:w,onMouseMove:T,children:[O,A,j,F]}),t[41]=O,t[42]=A,t[43]=j,t[44]=F,t[45]=w,t[46]=T,t[47]=I):I=t[47],I}function ee(e,t){return`${t?`L`:`M`}${e[0].toFixed(1)} ${e[1].toFixed(1)}`}function I({title:e,icon:t=`chart`,iconColor:n=`var(--insight)`,valueLabel:r=`Current`,trendLabel:a=`Trend`,rows:o,footer:s,delay:c}){let l=i[t]||i.chart,[u,d]=(0,m.useState)(null);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsxs)(`div`,{className:`sk-header`,children:[(0,y.jsx)(`span`,{className:`sk-h-name`,children:`Series`}),(0,y.jsx)(`span`,{className:`sk-h-trend`,children:a}),(0,y.jsx)(`span`,{className:`sk-h-val`,children:r})]}),(0,y.jsx)(`div`,{className:`sk`,children:o.map((e,t)=>{let n=e.deltaDir,r=u?.row===t?u.i:null;return(0,y.jsxs)(`div`,{className:`sk-row`,children:[(0,y.jsx)(`span`,{className:`sk-name`,children:e.name}),(0,y.jsxs)(`div`,{className:`sk-trend`,children:[(0,y.jsx)(F,{row:e,hoverI:r,onHover:e=>d(e==null?null:{row:t,i:e}),delay:Math.min(t*60,480)}),r!=null&&(0,y.jsx)(`span`,{className:`sk-point tab-num`,children:e.series[r].toLocaleString()})]}),(0,y.jsxs)(`span`,{className:`sk-val tab-num`,children:[e.value,e.delta&&(0,y.jsxs)(`span`,{className:`sk-delta ${n===`down`?`down`:n===`flat`?`flat`:`up`}`,children:[n===`down`?(0,y.jsx)(i.arrowDown,{}):n===`flat`?null:(0,y.jsx)(i.arrowUp,{}),e.delta]})]})]},t)})}),s&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:s})]})}var L=100,R=40;function te(e){let t=(0,M.c)(33),{panel:n,gmin:r,gmax:i,kind:a,accent:o}=e,s=n.series,c=i-r||1,l=n.color||o;if(s.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(`svg`,{className:`sm-svg`,viewBox:`0 0 ${L} ${R}`,preserveAspectRatio:`none`,"aria-hidden":`true`}),t[0]=e):e=t[0],e}if(a===`bars`){let e=98/s.length,n;if(t[1]!==e||t[2]!==l||t[3]!==r||t[4]!==c||t[5]!==s){let i;t[7]!==e||t[8]!==l||t[9]!==r||t[10]!==c?(i=(t,n)=>{let i=(t-r)/c*36+2;return(0,y.jsx)(`rect`,{x:n*e+e*.16,y:R-i,width:e*.68,height:i,rx:`1`,fill:l,opacity:.55+.45*((t-r)/c)},n)},t[7]=e,t[8]=l,t[9]=r,t[10]=c,t[11]=i):i=t[11],n=s.map(i),t[1]=e,t[2]=l,t[3]=r,t[4]=c,t[5]=s,t[6]=n}else n=t[6];let i;return t[12]===n?i=t[13]:(i=(0,y.jsx)(`svg`,{className:`sm-svg`,viewBox:`0 0 ${L} ${R}`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:n}),t[12]=n,t[13]=i),i}let u,d;if(t[14]!==r||t[15]!==c||t[16]!==s){let e;t[19]!==r||t[20]!==c||t[21]!==s.length?(e=(e,t)=>[t/(s.length-1||1)*96+2,37-(e-r)/c*34],t[19]=r,t[20]=c,t[21]=s.length,t[22]=e):e=t[22],u=s.map(e),d=u.map(ne).join(` `),t[14]=r,t[15]=c,t[16]=s,t[17]=u,t[18]=d}else u=t[17],d=t[18];let f=d,p;t[23]!==l||t[24]!==f?(p=(0,y.jsx)(`path`,{d:f,fill:`none`,stroke:l,strokeWidth:`1.7`,strokeLinejoin:`round`,strokeLinecap:`round`}),t[23]=l,t[24]=f,t[25]=p):p=t[25];let m=u[u.length-1],h=u[u.length-1],g;t[26]!==l||t[27]!==m[0]||t[28]!==h[1]?(g=(0,y.jsx)(`circle`,{cx:m[0],cy:h[1],r:`2`,fill:l}),t[26]=l,t[27]=m[0],t[28]=h[1],t[29]=g):g=t[29];let _;return t[30]!==p||t[31]!==g?(_=(0,y.jsxs)(`svg`,{className:`sm-svg`,viewBox:`0 0 ${L} ${R}`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:[p,g]}),t[30]=p,t[31]=g,t[32]=_):_=t[32],_}function ne(e,t){return`${t?`L`:`M`}${e[0].toFixed(1)} ${e[1].toFixed(1)}`}function re({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,panels:r,cols:a=3,kind:o=`bars`,footer:s,delay:c}){let l=i[t]||i.layers,[u,d]=(0,m.useState)(null),f=r.flatMap(e=>e.series),p=f.length?Math.min(...f):0,h=f.length?Math.max(...f):1;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`sm-grid`,style:{gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},onMouseLeave:()=>d(null),children:r.map((e,t)=>{let n=u!=null&&u!==t,r=e.deltaDir;return(0,y.jsxs)(`div`,{className:`sm-cell ${u===t?`hot`:``} ${n?`dimd`:``}`,onMouseEnter:()=>d(t),children:[(0,y.jsx)(`div`,{className:`sm-label`,children:e.label}),(0,y.jsx)(te,{panel:e,gmin:p,gmax:h,kind:o,accent:`var(--presence)`}),(0,y.jsxs)(`div`,{className:`sm-foot`,children:[e.stat&&(0,y.jsx)(`span`,{className:`sm-stat tab-num`,children:e.stat}),e.delta&&(0,y.jsxs)(`span`,{className:`sm-delta ${r===`down`?`down`:r===`flat`?`flat`:`up`}`,children:[r===`down`?(0,y.jsx)(i.arrowDown,{}):r===`flat`?null:(0,y.jsx)(i.arrowUp,{}),e.delta]})]})]},t)})}),s&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:s})]})}function ie({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,series:r,rows:a,highlight:o=0,footer:s,delay:c}){let l=i[t]||i.chart,[u,d]=(0,m.useState)(o),[f,p]=(0,m.useState)(null),h=a[0],g=h&&h.values.length>0?h.higherBetter===!1?h.values.indexOf(Math.min(...h.values)):h.values.indexOf(Math.max(...h.values)):-1;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`cb-legend`,children:r.map((e,t)=>(0,y.jsxs)(`button`,{className:`cb-leg ${u===t?`on`:``} ${u!==-1&&u!==t?`off`:``}`,onClick:()=>d(e=>e===t?-1:t),children:[(0,y.jsx)(`span`,{className:`cb-swatch`,style:{background:e.color}}),e.name]},t))}),(0,y.jsx)(`div`,{className:`cb`,children:a.map((e,t)=>{let n=Math.max(1,...e.values),i=e.values.length===0?-1:e.higherBetter===!1?e.values.indexOf(Math.min(...e.values)):e.values.indexOf(Math.max(...e.values));return(0,y.jsxs)(`div`,{className:`cb-row`,children:[(0,y.jsx)(`div`,{className:`cb-row-label`,children:e.label}),(0,y.jsx)(`div`,{className:`cb-bars`,children:r.map((a,o)=>{let s=e.values[o]??0,c=s/n*100,l=u!==-1&&u!==o,d=f?.r===t&&f?.s===o;return(0,y.jsxs)(`div`,{className:`cb-bar-wrap ${l?`dimd`:``} ${d?`hot`:``}`,onMouseEnter:()=>p({r:t,s:o}),onMouseLeave:()=>p(null),children:[(0,y.jsx)(`div`,{className:`cb-track`,children:(0,y.jsx)(`div`,{className:`cb-fill m-stagger-item m-scale-in`,"data-mark":t===0&&o===g?`circle`:void 0,style:{width:`${c}%`,background:a.color,"--i":t*r.length+o,"--scale-from":0}})}),(0,y.jsxs)(`span`,{className:`cb-num tab-num`,children:[s.toLocaleString(),e.unit||``,o===i&&(0,y.jsx)(`span`,{className:`cb-best`,style:{color:a.color},children:`★`})]}),d&&(0,y.jsxs)(`span`,{className:`cb-tip`,children:[a.name,`:`,` `,(0,y.jsxs)(`b`,{className:`tab-num`,children:[s.toLocaleString(),e.unit||``]})]})]},o)})})]},t)})}),s&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:s})]})}var z=5;function ae(e){let t=typeof e==`number`?e:parseFloat(String(e??``));return Number.isFinite(t)?Math.max(0,Math.min(z,Math.round(t))):0}function oe(e){let t=(0,M.c)(5),{score:n}=e,r=`${n} out of ${z}`,i;t[0]===n?i=t[1]:(i=Array.from({length:z},(e,t)=>(0,y.jsx)(`span`,{className:`tbl-cmx-dot`+(t<n?` on`:``)},t)),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,y.jsx)(`span`,{className:`tbl-cmx-rating`,"aria-label":r,children:i}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function se(){let e=(0,M.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsxs)(`svg`,{className:`tbl-cmx-glyph partial`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,y.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,y.jsx)(`path`,{d:`M8 1.75a6.25 6.25 0 0 1 0 12.5z`,fill:`currentColor`})]}),e[0]=t):t=e[0],t}function ce(e){let t=(0,M.c)(9),{cell:n}=e;switch(n.kind??`text`){case`yes`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(i.check,{className:`tbl-cmx-glyph yes`,"aria-label":`yes`}),t[0]=e):e=t[0],e}case`no`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(i.x,{className:`tbl-cmx-glyph no`,"aria-label":`no`}),t[1]=e):e=t[1],e}case`partial`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(se,{}),t[2]=e):e=t[2],e}case`rating`:{let e;t[3]===n.value?e=t[4]:(e=ae(n.value),t[3]=n.value,t[4]=e);let r;return t[5]===e?r=t[6]:(r=(0,y.jsx)(oe,{score:e}),t[5]=e,t[6]=r),r}default:{let e=n.value==null?`—`:String(n.value),r;return t[7]===e?r=t[8]:(r=(0,y.jsx)(`span`,{className:`tbl-cmx-text`,children:e}),t[7]=e,t[8]=r),r}}}function le(e){let t=new Set;for(let n of e)for(let e of n.cells)t.add(e.kind??`text`);return[`yes`,`no`,`partial`,`rating`].filter(e=>t.has(e))}var ue={yes:`yes`,no:`no`,partial:`partial`,rating:`out of ${z}`};function de({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,cols:r,rows:o,caption:s,footer:c,delay:l}){let u=i[t]||i.table,d=`minmax(0, 1.3fr) repeat(${r.length}, minmax(0, 1fr))`,f=le(o);return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),s&&(0,y.jsx)(`div`,{className:`tbl-cmx-cap`,children:s}),(0,y.jsx)(`div`,{className:`tbl-cmx-scroll`,children:(0,y.jsxs)(`div`,{className:`tbl-cmx-grid`,style:{gridTemplateColumns:d},children:[(0,y.jsx)(`div`,{className:`tbl-cmx-corner`}),r.map((e,t)=>(0,y.jsx)(`div`,{className:`tbl-cmx-colh`,children:e},`h${t}`)),o.map((e,t)=>(0,y.jsxs)(m.Fragment,{children:[(0,y.jsx)(`div`,{className:`tbl-cmx-rowh`,children:e.label}),r.map((t,n)=>{let r=e.cells[n],i=e.best===n;return(0,y.jsxs)(`div`,{className:`tbl-cmx-cell`+(i?` best`:``),children:[r?(0,y.jsx)(ce,{cell:r}):(0,y.jsx)(`span`,{className:`tbl-cmx-text`,children:`—`}),r?.note&&(0,y.jsx)(`div`,{className:`tbl-cmx-note`,children:r.note})]},n)})]},t))]})}),f.length>0&&(0,y.jsx)(`div`,{className:`tbl-cmx-legend`,children:f.map(e=>(0,y.jsxs)(`span`,{className:`tbl-cmx-legend-item`,children:[(0,y.jsx)(ce,{cell:{kind:e,value:e===`rating`?z:void 0}}),ue[e]]},e))}),c&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}function fe({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,rowLabels:r,colLabels:a,cells:o,min:s,max:c,accent:l=`var(--presence)`,diagonal:u=!1,unit:d=``,legend:f,footer:p,delay:h}){let g=i[t]||i.table,[_,v]=(0,m.useState)(null),b=o.flat(),x=s??(b.length?Math.min(...b):0),S=(c??(b.length?Math.max(...b):1))-x||1,C=e=>(e-x)/S;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(h||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsxs)(`div`,{className:`mg-wrap`,children:[(0,y.jsxs)(`div`,{className:`mg-grid`,style:{gridTemplateColumns:`minmax(0, auto) repeat(${a.length}, minmax(0, var(--mg-cell)))`},children:[(0,y.jsx)(`span`,{className:`mg-corner`}),a.map((e,t)=>(0,y.jsx)(`span`,{className:`mg-colh ${_?.c===t?`on`:``}`,children:e},t)),r.map((e,t)=>(0,y.jsx)(pe,{ri:t,label:e,vals:o[t]||[],colCount:a.length,norm:C,accent:l,diagonal:u,unit:d,hover:_,setHover:v},t))]}),f&&(0,y.jsxs)(`div`,{className:`mg-legend`,children:[(0,y.jsx)(`span`,{className:`faint`,children:f[0]}),(0,y.jsx)(`span`,{className:`mg-ramp`,style:{background:`linear-gradient(90deg, color-mix(in oklab, ${l} 6%, transparent), ${l})`}}),(0,y.jsx)(`span`,{className:`faint`,children:f[1]})]})]}),p&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:p})]})}function pe(e){let t=(0,M.c)(18),{ri:n,label:r,vals:i,colCount:a,norm:o,accent:s,diagonal:c,unit:l,hover:u,setHover:d}=e,f=`mg-rowh ${u?.r===n?`on`:``}`,p;t[0]!==r||t[1]!==f?(p=(0,y.jsx)(`span`,{className:f,children:r}),t[0]=r,t[1]=f,t[2]=p):p=t[2];let m;t[3]===a?m=t[4]:(m=Array.from({length:a}),t[3]=a,t[4]=m);let h;t[5]!==s||t[6]!==c||t[7]!==u||t[8]!==o||t[9]!==n||t[10]!==d||t[11]!==m||t[12]!==l||t[13]!==i?(h=m.map((e,t)=>{let r=i[t]??0,a=Math.max(0,Math.min(1,o(r))),f=c&&n===t,p=u?.r===n&&u?.c===t,m=u&&(u.r===n||u.c===t);return(0,y.jsxs)(`div`,{className:`mg-cell ${p?`hot`:``} ${m&&!p?`cross`:``} ${f?`diag`:``}`,style:{background:`color-mix(in oklab, ${s} ${(a*.9+.04)*100}%, transparent)`},onMouseEnter:()=>d({r:n,c:t}),onMouseLeave:()=>d(null),children:[(0,y.jsxs)(`span`,{className:`mg-v tab-num`,style:{color:a>.55?`var(--surface-deep)`:`var(--text-secondary)`},children:[r,l]}),p&&(0,y.jsxs)(`span`,{className:`mg-tip tab-num`,children:[r,l]})]},t)}),t[5]=s,t[6]=c,t[7]=u,t[8]=o,t[9]=n,t[10]=d,t[11]=m,t[12]=l,t[13]=i,t[14]=h):h=t[14];let g;return t[15]!==p||t[16]!==h?(g=(0,y.jsxs)(y.Fragment,{children:[p,h]}),t[15]=p,t[16]=h,t[17]=g):g=t[17],g}var B={overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,maxWidth:`100%`};function me({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,caption:r,corner:o,cols:s,rows:c,bracket:l=!1,footer:u,delay:d}){let f=i[t]||i.table,p=!!s&&s.length>0,m=c.some(e=>e.label!==void 0),h=Math.max(s?.length??0,...c.map(e=>e.cells.length)),g=`${m?`minmax(0, auto) `:``}repeat(${h}, minmax(60px, auto))`,_=(()=>{for(let e=0;e<c.length;e++){let t=c[e].cells.findIndex(e=>e.hot);if(t>=0)return`${e}-${t}`}return null})();return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,y.jsx)(`div`,{className:`tbl-mtx-cap`,children:r}),(0,y.jsxs)(`div`,{className:`tbl-mtx-frame`,children:[l&&(0,y.jsx)(`div`,{className:`tbl-mtx-brk l`}),(0,y.jsxs)(`div`,{className:`tbl-mtx-grid`,style:{gridTemplateColumns:g},children:[p&&(0,y.jsxs)(y.Fragment,{children:[m&&(0,y.jsx)(`div`,{className:`tbl-mtx-corner`,style:B,title:o,children:o??``}),s.map((e,t)=>(0,y.jsx)(`div`,{className:`tbl-mtx-colh`,style:B,title:e,children:e},`h${t}`))]}),c.map((e,t)=>(0,y.jsx)(he,{ri:t,hasRowLabels:m,label:e.label,cells:e.cells,salientKey:_},t))]}),l&&(0,y.jsx)(`div`,{className:`tbl-mtx-brk r`})]}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function he(e){let t=(0,M.c)(13),{ri:n,hasRowLabels:r,label:i,cells:a,salientKey:o}=e,s;t[0]!==r||t[1]!==i?(s=r&&(0,y.jsx)(`div`,{className:`tbl-mtx-rowh`,style:B,title:i,children:i??``}),t[0]=r,t[1]=i,t[2]=s):s=t[2];let c;if(t[3]!==a||t[4]!==n||t[5]!==o){let e;t[7]!==n||t[8]!==o?(e=(e,t)=>(0,y.jsx)(`div`,{className:`tbl-mtx-cell`+(e.hot?` hot`:``),"data-mark":`${n}-${t}`===o?`circle`:void 0,style:e.color?{...B,background:e.color}:B,title:typeof e.v==`string`?e.v:void 0,children:e.v},t),t[7]=n,t[8]=o,t[9]=e):e=t[9],c=a.map(e),t[3]=a,t[4]=n,t[5]=o,t[6]=c}else c=t[6];let l;return t[10]!==s||t[11]!==c?(l=(0,y.jsxs)(y.Fragment,{children:[s,c]}),t[10]=s,t[11]=c,t[12]=l):l=t[12],l}function ge({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,rowVar:r,rows:o,colVar:l,cols:u,cells:d,unit:f,currency:p,higherBetter:h=!0,baseCell:g,footer:_,delay:v}){let b=i[t]||i.table,[x,S]=(0,m.useState)(null),C=(0,m.useMemo)(()=>c(d.flat()),[d]),w=e=>{if(!C||C[0]===C[1])return`transparent`;let t=(e-C[0])/(C[1]-C[0]);return h||(t=1-t),`color-mix(in oklab, ${t>=.5?`var(--insight)`:`var(--danger)`} ${(Math.abs(t-.5)*2*26).toFixed(0)}%, transparent)`},T=e=>s(e,{unit:p?void 0:f,currency:p});return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(v||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(b,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`tb-sens`,onMouseLeave:()=>S(null),children:(0,y.jsxs)(`table`,{className:`tb-sens-tbl`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsxs)(`th`,{className:`tb-sens-corner`,children:[(0,y.jsx)(`span`,{className:`tb-sens-rowvar`,children:r}),(0,y.jsx)(`span`,{className:`tb-sens-colvar`,children:l})]}),u.map((e,t)=>(0,y.jsx)(`th`,{className:`tb-sens-colh tab-num`,children:e},t))]})}),(0,y.jsx)(`tbody`,{children:o.map((e,t)=>(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`tb-sens-rowh tab-num`,children:e}),u.map((e,n)=>{let r=d[t]?.[n],i=g&&g[0]===t&&g[1]===n,a=x&&x[0]===t&&x[1]===n;return(0,y.jsx)(`td`,{className:`tb-sens-cell tab-num`+(i?` is-base`:``)+(a?` is-hot`:``),style:{background:r==null?void 0:w(r)},onMouseEnter:()=>S([t,n]),children:r==null?`—`:T(r)},n)})]},t))})]})}),_&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(_)})]})}function _e(e){return e.value<e.low?`low`:e.value>e.high?`high`:`ok`}function ve({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,results:r,caption:o,footer:c,delay:l}){let u=i[t]||i.shield,d=r.findIndex(e=>_e(e)!==`ok`);return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),o&&(0,y.jsx)(`div`,{className:`tb-lab-cap`,children:o}),(0,y.jsx)(`div`,{className:`tb-lab`,children:r.map((e,t)=>{let n=_e(e),r=(e.high-e.low||1)*.4,a=e.low-r,o=e.high+r,c=e=>Math.max(0,Math.min(100,(e-a)/(o-a)*100)),l=e.prior==null?0:Math.sign(e.value-e.prior);return(0,y.jsxs)(`div`,{className:`tb-lab-row flag-`+n,children:[(0,y.jsx)(`div`,{className:`tb-lab-name`,children:e.name}),(0,y.jsxs)(`div`,{className:`tb-lab-val tab-num`,"data-mark":t===d?`underline`:void 0,children:[s(e.value,{unit:e.unit}),l!==0&&(0,y.jsx)(i.arrowUp,{className:`tb-lab-trend`,style:{transform:l<0?`rotate(180deg)`:`none`}})]}),(0,y.jsxs)(`div`,{className:`tb-lab-track`,children:[(0,y.jsx)(`span`,{className:`tb-lab-band`,style:{left:`${c(e.low)}%`,width:`${c(e.high)-c(e.low)}%`}}),(0,y.jsx)(`span`,{className:`tb-lab-mark`,style:{left:`${c(e.value)}%`}})]}),(0,y.jsxs)(`div`,{className:`tb-lab-ref tab-num`,children:[s(e.low),`–`,s(e.high)]}),(0,y.jsx)(`div`,{className:`tb-lab-flag`,children:n===`high`?`High`:n===`low`?`Low`:``})]},t)})}),c&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(c)})]})}function ye({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,recipes:r,ingredients:o,matrix:s,quantities:c,highlight:l,footer:u,delay:d}){let f=i[t]||i.table;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`im-scroll`,children:(0,y.jsxs)(`table`,{className:`im-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`im-th im-th--label`,children:`Ingredient`}),r.map((e,t)=>(0,y.jsx)(`th`,{className:`im-th`,children:e},t))]})}),(0,y.jsx)(`tbody`,{children:o.map((e,t)=>{let n=l&&e.toLowerCase()===l.toLowerCase();return(0,y.jsxs)(`tr`,{className:`im-row${n?` highlighted`:``}`,children:[(0,y.jsx)(`td`,{className:`im-td-label`,children:e}),r.map((e,n)=>{let r=s[t]?.[n]??!1,a=c?.[t]?.[n];return(0,y.jsx)(`td`,{className:`im-td${r?` used`:``}`,children:r?a?(0,y.jsx)(`span`,{className:`im-qty`,children:a}):(0,y.jsx)(i.check,{className:`ic`,style:{width:13,height:13,color:`var(--insight)`}}):(0,y.jsx)(`span`,{className:`im-empty`})},n)})]},t)})})]})}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function be({title:e,verb:t,language:n,tenses:r,note:i,delay:a}){let o=r[0]?.forms.map(e=>e.pronoun)??[];return(0,y.jsxs)(`div`,{className:`card reveal tbl tbl-cj`,style:{"--delay":(a||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`tbl-cj-header`,children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:0},children:[n&&(0,y.jsx)(`span`,{className:`tbl-cj-lang`,children:n}),e]}),(0,y.jsx)(`div`,{className:`tbl-cj-verb`,children:t})]}),(0,y.jsx)(`div`,{className:`tbl-cj-scroll`,children:(0,y.jsxs)(`table`,{className:`tbl-cj-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`tbl-cj-corner`,scope:`col`}),r.map(e=>(0,y.jsx)(`th`,{className:`tbl-cj-tense-head`,scope:`col`,children:e.name},e.name))]})}),(0,y.jsx)(`tbody`,{children:o.map((e,t)=>(0,y.jsxs)(`tr`,{className:`tbl-cj-row`,children:[(0,y.jsx)(`th`,{className:`tbl-cj-pronoun`,scope:`row`,children:e}),r.map(e=>{let n=e.forms[t];return(0,y.jsx)(`td`,{className:`tbl-cj-form${n?.irregular?` tbl-cj-irregular`:``}`,children:n?.form??`—`},e.name)})]},e))})]})}),r.some(e=>e.forms.some(e=>e.irregular))&&(0,y.jsxs)(`div`,{className:`tbl-cj-legend faint`,children:[(0,y.jsx)(`span`,{className:`tbl-cj-legend-swatch`}),` irregular form`]}),i&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},children:i})]})}var V={safe:{color:`var(--insight)`,icon:`check`,label:`Safe`},caution:{color:`var(--warning)`,icon:`alert`,label:`Caution`},avoid:{color:`var(--danger)`,icon:`x`,label:`Avoid`},unknown:{color:`var(--text-faint)`,icon:`eye`,label:`Check a pro`}},xe=[`safe`,`caution`,`avoid`,`unknown`];function Se({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,rows:r,columns:o,cells:s,legend:c=!0,footer:l,delay:u}){let d=i[t]||i.shield,f=r??[],p=o??[],m=(e,t)=>`${e.trim().toLowerCase()}${t.trim().toLowerCase()}`,h=new Map;for(let e of s??[]){if(!e?.row||!e?.col)continue;let t=V[e.level]?e.level:`unknown`;h.set(m(e.row,e.col),{level:t,reason:e.reason})}let g=xe.filter(e=>[...h.values()].some(t=>t.level===e)),_=`minmax(116px, 1.1fr) repeat(${Math.max(p.length,1)}, minmax(132px, 1fr))`;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`clm-scroll`,children:(0,y.jsxs)(`div`,{className:`clm-grid`,style:{gridTemplateColumns:_},role:`grid`,children:[(0,y.jsx)(`div`,{className:`clm-corner`,role:`columnheader`}),p.map((e,t)=>(0,y.jsx)(`div`,{className:`clm-colh`,role:`columnheader`,title:e,children:e},t)),f.map((e,t)=>(0,y.jsxs)(`div`,{className:`clm-row`,role:`row`,children:[(0,y.jsx)(`div`,{className:`clm-rowh`,role:`rowheader`,title:e,children:e}),p.map((t,n)=>{let r=h.get(m(e,t))??{level:`unknown`},a=V[r.level],o=i[a.icon]||i.eye;return(0,y.jsxs)(`div`,{className:`clm-cell clm-${r.level}`,style:{"--clm-c":a.color},role:`gridcell`,children:[(0,y.jsxs)(`span`,{className:`clm-tag`,children:[(0,y.jsx)(o,{className:`ic clm-tag-ic`}),(0,y.jsx)(`span`,{className:`clm-tag-lbl`,children:a.label})]}),(0,y.jsx)(`span`,{className:`clm-reason`,children:r.reason||a.label})]},n)})]},t))]})}),c&&g.length>0&&(0,y.jsx)(`div`,{className:`clm-legend`,children:g.map(e=>{let t=V[e],n=i[t.icon]||i.eye;return(0,y.jsxs)(`span`,{className:`clm-leg-item`,style:{"--clm-c":t.color},children:[(0,y.jsx)(n,{className:`ic clm-leg-ic`}),t.label]},e)})}),l&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function Ce(e,t){let n=s(Math.abs(e),{currency:t,decimals:0});return e<0?`(${n})`:n}function we({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,periods:r,rows:o,currency:s=`USD`,caption:c,footer:l,delay:u}){let d=i[t]||i.chart;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(u||0)+`ms`},children:[e&&(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:c?4:14},children:[(0,y.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),c&&(0,y.jsx)(`div`,{className:`fs-cap`,children:c}),(0,y.jsx)(`div`,{className:`fs-scroll`,children:(0,y.jsxs)(`table`,{className:`fs-tbl`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`fs-h-label`,children:`\xA0`}),r.map((e,t)=>(0,y.jsx)(`th`,{className:`fs-h-period`,children:e},t))]})}),(0,y.jsx)(`tbody`,{children:o.map((e,t)=>{let n=e.kind||`line`,i=Math.max(0,e.indent||0);return(0,y.jsxs)(`tr`,{className:`fs-row fs-${n}`,children:[(0,y.jsx)(`td`,{className:`fs-label`,style:{paddingLeft:2+i*14},children:e.label}),r.map((t,n)=>{let r=e.values[n];return(0,y.jsx)(`td`,{className:`fs-val tab-num ${r!=null&&r<0?`neg`:``}`,children:r==null?`—`:Ce(r,s)},n)})]},t)})})]})}),l&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(l)})]})}function Te({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,cohorts:r,periods:o,unit:c=`%`,caption:l,footer:u,delay:d}){let f=i[t]||i.layers,[p,h]=(0,m.useState)(null),g=Math.max(0,...r.map(e=>e.values.length)),_=o&&o.length?o:Array.from({length:g},(e,t)=>`M${t}`),v=r.flatMap(e=>e.values).filter(e=>e!=null),b=v.length?Math.min(...v):0,x=(v.length?Math.max(...v):1)-b||1,S=e=>(e-b)/x,C=Array.from({length:g},(e,t)=>{let n=r.map(e=>e.values[t]).filter(e=>e!=null);return n.length?n.reduce((e,t)=>e+t,0)/n.length:null}),w=e=>s(e,{decimals:e%1==0?0:1})+c;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(d||0)+`ms`},children:[e&&(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:l?4:14},children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),l&&(0,y.jsx)(`div`,{className:`fs-cap`,children:l}),(0,y.jsx)(`div`,{className:`cg-scroll`,children:(0,y.jsxs)(`table`,{className:`cg-tbl`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`cg-h-cohort`,children:`Cohort`}),_.map((e,t)=>(0,y.jsx)(`th`,{className:`cg-h-period ${p?.c===t?`on`:``}`,children:e},t))]})}),(0,y.jsx)(`tbody`,{children:r.map((e,t)=>(0,y.jsxs)(`tr`,{children:[(0,y.jsxs)(`th`,{className:`cg-cohort`,scope:`row`,children:[(0,y.jsx)(`span`,{className:`cg-cohort-name`,children:e.label}),e.size!=null&&(0,y.jsx)(`span`,{className:`cg-cohort-size`,children:s(e.size,{compact:e.size>=1e4})})]}),Array.from({length:g},(n,r)=>{let i=e.values[r];if(i==null)return(0,y.jsx)(`td`,{className:`cg-cell cg-empty`},r);let a=Math.max(0,Math.min(1,S(i))),o=p?.r===t&&p?.c===r;return(0,y.jsx)(`td`,{className:`cg-cell tab-num ${o?`hot`:``}`,style:{background:`color-mix(in oklab, var(--insight) ${(a*.82+.06)*100}%, transparent)`,color:a>.5?`var(--surface-deep)`:`var(--text-secondary)`},onMouseEnter:()=>h({r:t,c:r}),onMouseLeave:()=>h(null),children:w(i)},r)})]},t))}),(0,y.jsx)(`tfoot`,{children:(0,y.jsxs)(`tr`,{className:`cg-foot`,children:[(0,y.jsx)(`th`,{className:`cg-cohort cg-foot-label`,scope:`row`,children:`Average`}),C.map((e,t)=>(0,y.jsx)(`td`,{className:`cg-cell cg-avg tab-num`,children:e==null?``:w(e)},t))]})})]})}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var Ee=(e,t)=>Math.max(1,Math.min(t,Math.round(e)));function De(e,t,n){let r=e*t/(n*n);return r>=.55?`high`:r>=.28?`med`:`low`}var Oe={low:`var(--insight)`,med:`var(--warning)`,high:`var(--danger)`};function ke({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,risks:r,size:o=5,caption:s,footer:c,delay:l}){let u=i[t]||i.shield,d=o,[f,p]=(0,m.useState)(null),h=r.map(e=>({...e,likelihood:Ee(e.likelihood,d),impact:Ee(e.impact,d)})),g=(e,t)=>h.map((e,t)=>({r:e,idx:t})).filter(({r:n})=>n.likelihood===e&&n.impact===t),_=Array.from({length:d},(e,t)=>d-t),v=Array.from({length:d},(e,t)=>t+1);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:s?4:14},children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),s&&(0,y.jsx)(`div`,{className:`fs-cap`,children:s}),(0,y.jsxs)(`div`,{className:`rm-plot`,children:[(0,y.jsx)(`div`,{className:`rm-ylabel`,children:`Likelihood`}),(0,y.jsxs)(`div`,{className:`rm-grid-wrap`,children:[(0,y.jsx)(`div`,{className:`rm-grid`,style:{gridTemplateColumns:`repeat(${d}, minmax(0, 1fr))`},children:_.map(e=>v.map(t=>{let n=De(e,t,d),r=Oe[n],i=g(e,t);return(0,y.jsx)(`div`,{className:`rm-cell rm-${n}`,style:{background:`color-mix(in oklab, ${r} 16%, transparent)`,borderColor:`color-mix(in oklab, ${r} 30%, transparent)`},children:i.map(({r:e,idx:t})=>(0,y.jsx)(`span`,{className:`rm-chip ${f===t?`hot`:``}`,style:{background:`color-mix(in oklab, ${r} 26%, var(--surface-elevated))`,borderColor:r},onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),children:e.label},t))},`${e}-${t}`)}))}),(0,y.jsx)(`div`,{className:`rm-xlabel`,children:`Impact →`})]})]}),(0,y.jsx)(`ol`,{className:`rm-register`,children:h.map((e,t)=>{let n=Oe[De(e.likelihood,e.impact,d)];return(0,y.jsxs)(`li`,{className:`rm-reg-row ${f===t?`hot`:``}`,onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),children:[(0,y.jsx)(`span`,{className:`rm-reg-dot`,style:{background:n}}),(0,y.jsxs)(`div`,{className:`rm-reg-body`,children:[(0,y.jsxs)(`div`,{className:`rm-reg-top`,children:[(0,y.jsx)(`span`,{className:`rm-reg-label`,children:e.label}),e.owner&&(0,y.jsx)(`span`,{className:`rm-reg-owner`,children:e.owner})]}),e.mitigation&&(0,y.jsx)(`div`,{className:`rm-reg-mit`,children:e.mitigation})]})]},t)})}),c&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var Ae={met:{color:`var(--insight)`,label:`Met`},partial:{color:`var(--warning)`,label:`Partial`},ongoing:{color:`var(--presence)`,label:`Ongoing`}};function je({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,entries:r,caption:o,footer:s,delay:c}){let l=i[t]||i.shield,u=r??[];return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[e&&(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),o&&(0,y.jsx)(`div`,{className:`fs-cap`,children:o}),(0,y.jsx)(`div`,{className:`cp-scroll`,children:(0,y.jsxs)(`div`,{className:`cp-grid`,role:`table`,children:[(0,y.jsxs)(`div`,{className:`cp-head`,role:`row`,children:[(0,y.jsx)(`span`,{className:`cp-colh`,role:`columnheader`,children:`Assessment / Dx`}),(0,y.jsx)(`span`,{className:`cp-colh`,role:`columnheader`,children:`Goal`}),(0,y.jsx)(`span`,{className:`cp-colh`,role:`columnheader`,children:`Interventions`}),(0,y.jsx)(`span`,{className:`cp-colh`,role:`columnheader`,children:`Rationale`})]}),u.map((e,t)=>{let n=Ae[e.status??`ongoing`];return(0,y.jsxs)(`div`,{className:`cp-row`,role:`row`,style:{"--cp-c":n.color},children:[(0,y.jsxs)(`div`,{className:`cp-cell cp-assess`,role:`cell`,children:[(0,y.jsx)(`span`,{className:`cp-assess-text`,children:e.assessment}),e.diagnosis&&(0,y.jsx)(`span`,{className:`cp-dx`,children:e.diagnosis})]}),(0,y.jsxs)(`div`,{className:`cp-cell cp-goal`,role:`cell`,children:[(0,y.jsx)(`span`,{className:`cp-goal-text`,children:e.goal}),(0,y.jsxs)(`span`,{className:`cp-status`,children:[(0,y.jsx)(`span`,{className:`cp-status-dot`}),n.label]})]}),(0,y.jsx)(`div`,{className:`cp-cell`,role:`cell`,children:(0,y.jsx)(`ul`,{className:`cp-intervs`,children:(e.interventions??[]).map((e,t)=>(0,y.jsx)(`li`,{className:`cp-interv`,children:e},t))})}),(0,y.jsx)(`div`,{className:`cp-cell cp-rationale`,role:`cell`,children:e.rationale||(0,y.jsx)(`span`,{className:`cp-dash`,children:`—`})})]},t)})]})}),s&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function Me({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,drug:r,route:o,computed:s,ladder:c,adjustments:l,caption:u,footer:d,delay:f}){let p=i[t]||i.shield,m=c??[],h=e=>m.length>1?38+e/(m.length-1)*62:100;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsxs)(`div`,{className:`dl-head`,children:[(0,y.jsx)(`span`,{className:`dl-drug`,children:r}),o&&(0,y.jsx)(`span`,{className:`dl-route`,children:o}),u&&(0,y.jsx)(`span`,{className:`dl-cap`,children:u})]}),s&&(0,y.jsxs)(`div`,{className:`dl-calc`,children:[(0,y.jsxs)(`div`,{className:`dl-calc-side`,children:[(0,y.jsx)(`span`,{className:`dl-calc-tag`,children:`Input`}),(0,y.jsx)(`span`,{className:`dl-calc-val`,children:s.input})]}),(0,y.jsxs)(`div`,{className:`dl-calc-op`,children:[(0,y.jsx)(i.chevR,{className:`ic`}),(0,y.jsx)(`span`,{className:`dl-calc-formula`,title:s.formula,children:s.formula}),(0,y.jsx)(i.chevR,{className:`ic`})]}),(0,y.jsxs)(`div`,{className:`dl-calc-side dl-calc-out`,children:[(0,y.jsx)(`span`,{className:`dl-calc-tag`,children:`Starting dose`}),(0,y.jsx)(`span`,{className:`dl-calc-val`,children:s.result})]})]}),(0,y.jsx)(`div`,{className:`dl-ladder`,children:m.map((e,t)=>(0,y.jsxs)(`div`,{className:`dl-rung ${e.ceiling?`ceiling`:``}`,style:{"--dl-h":`${h(t)}%`},children:[(0,y.jsx)(`span`,{className:`dl-bar`}),(0,y.jsxs)(`div`,{className:`dl-rung-body`,children:[(0,y.jsxs)(`div`,{className:`dl-rung-top`,children:[(0,y.jsx)(`span`,{className:`dl-step`,children:e.step}),(0,y.jsx)(`span`,{className:`dl-dose`,children:e.dose}),e.ceiling&&(0,y.jsxs)(`span`,{className:`dl-ceiling-tag`,children:[(0,y.jsx)(i.alert,{className:`ic`}),` Max`]})]}),e.note&&(0,y.jsx)(`span`,{className:`dl-note`,children:e.note})]})]},t))}),l&&l.length>0&&(0,y.jsxs)(`div`,{className:`dl-adjust`,children:[(0,y.jsx)(`div`,{className:`dl-adjust-h`,children:`Dose adjustments`}),(0,y.jsx)(`ul`,{className:`dl-adjust-list`,children:l.map((e,t)=>(0,y.jsxs)(`li`,{className:`dl-adjust-row`,children:[(0,y.jsx)(`span`,{className:`dl-adjust-cond`,children:e.condition}),(0,y.jsx)(`span`,{className:`dl-adjust-change`,children:e.change})]},t))})]}),d&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function Ne({title:e,icon:t=`cart`,iconColor:n=`var(--presence)`,columns:r,rows:o,unit:s,highlight:c,guide:l,caption:u,footer:d,delay:f}){let p=i[t]||i.cart,m=e=>e.trim().toLowerCase(),h=c?m(c):null;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[e&&(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),u&&(0,y.jsx)(`div`,{className:`sz-cap`,children:u}),(0,y.jsx)(`div`,{className:`sz-scroll`,children:(0,y.jsxs)(`table`,{className:`sz-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`sz-th sz-th--size`,children:`Size`}),r.map((e,t)=>(0,y.jsx)(`th`,{className:`sz-th`,children:e},t))]})}),(0,y.jsx)(`tbody`,{children:o.map((e,t)=>{let n=h!==null&&m(e.size)===h;return(0,y.jsxs)(`tr`,{className:`sz-row${n?` on`:``}`,children:[(0,y.jsxs)(`th`,{className:`sz-size`,scope:`row`,children:[e.size,n&&(0,y.jsx)(`span`,{className:`sz-pick`,children:`Your size`})]}),r.map((t,n)=>(0,y.jsx)(`td`,{className:`sz-td`,children:e.values[n]??(0,y.jsx)(`span`,{className:`sz-dash`,children:`—`})},n))]},t)})})]})}),(l||s)&&(0,y.jsxs)(`div`,{className:`sz-guide`,children:[(0,y.jsx)(i.sliders,{className:`sz-guide-ic`}),(0,y.jsxs)(`span`,{className:`sz-guide-t`,children:[s&&(0,y.jsxs)(`b`,{className:`sz-guide-unit`,children:[s,`.`]}),` `,l]})]}),d&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function Pe(e){let t=(0,M.c)(4),{value:n}=e;if(n===!0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(`span`,{className:`pt-yes`,children:(0,y.jsx)(i.check,{className:`ic`,"aria-label":`included`})}),t[0]=e):e=t[0],e}if(typeof n==`string`&&n.length>0){let e;return t[1]===n?e=t[2]:(e=(0,y.jsx)(`span`,{className:`pt-text`,children:n}),t[1]=n,t[2]=e),e}let r;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,y.jsx)(`span`,{className:`pt-no`,"aria-label":`not included`,children:`—`}),t[3]=r):r=t[3],r}function Fe({plan:e,i:t}){return(0,y.jsxs)(`div`,{className:`pt-plan m-stagger-item m-scale-in`+(e.highlighted?` hot`:``),style:{"--i":t},children:[e.highlighted&&(0,y.jsx)(`span`,{className:`pt-ribbon`,children:`Most popular`}),(0,y.jsx)(`div`,{className:`pt-name`,children:e.name||`Plan ${t+1}`}),(0,y.jsxs)(`div`,{className:`pt-price-row`,children:[(0,y.jsx)(`span`,{className:`pt-price`,children:e.price}),e.period&&(0,y.jsx)(`span`,{className:`pt-period`,children:e.period})]}),e.tagline&&(0,y.jsx)(`div`,{className:`pt-tagline`,children:e.tagline}),e.ctaLabel&&(0,y.jsx)(`span`,{className:`pt-cta`,children:e.ctaLabel})]})}function Ie({title:e,icon:t=`cart`,iconColor:n=`var(--presence)`,plans:r,features:o,caption:s,footer:c,delay:u}){let d=i[t]||i.cart,f=r?.length??0;if(f===0)return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(l,{message:`No plans to compare`})]});let p=`minmax(128px, 1.1fr) repeat(${f}, minmax(148px, 1fr))`,m=o??[];return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),s&&(0,y.jsx)(`div`,{className:`pt-cap`,children:s}),(0,y.jsx)(`div`,{className:`pt-scroll`,children:(0,y.jsxs)(`div`,{className:`pt-grid`,style:{gridTemplateColumns:p,"--pt-cols":p},role:`grid`,children:[(0,y.jsx)(`div`,{className:`pt-corner`,role:`columnheader`}),r.map((e,t)=>(0,y.jsx)(`div`,{role:`columnheader`,children:(0,y.jsx)(Fe,{plan:e,i:t})},t)),m.map((e,t)=>(0,y.jsxs)(`div`,{className:`pt-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsx)(`div`,{className:`pt-feat`,role:`rowheader`,title:e.label,children:e.label}),r.map((t,n)=>(0,y.jsx)(`div`,{className:`pt-cell`+(t.highlighted?` hot`:``),role:`gridcell`,children:(0,y.jsx)(Pe,{value:e.values?.[n]})},n))]},t))]})}),m.length>0&&(0,y.jsxs)(`div`,{className:`pt-legend`,children:[(0,y.jsxs)(`span`,{className:`pt-leg-item`,children:[(0,y.jsx)(i.check,{className:`ic pt-leg-ic`}),` included`]}),(0,y.jsxs)(`span`,{className:`pt-leg-item`,children:[(0,y.jsx)(`span`,{className:`pt-leg-dash`,children:`—`}),` not included`]})]}),c&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var H={R:{color:`var(--presence)`,label:`Responsible`},A:{color:`var(--warning)`,label:`Accountable`},C:{color:`var(--insight)`,label:`Consulted`},I:{color:`var(--text-muted)`,label:`Informed`}},Le=[`R`,`A`,`C`,`I`];function Re({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,tasks:r,roles:o,cells:s,legend:c=!0,footer:u,delay:d}){let f=i[t]||i.table,p=r??[],m=o??[];if(p.length===0||m.length===0)return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(l,{message:`No tasks or roles to map`})]});let h=(e,t)=>`${e.trim().toLowerCase()} ${t.trim().toLowerCase()}`,g=new Map;for(let e of s??[])!e?.task||!e?.role||!H[e.rating]||g.set(h(e.task,e.role),e.rating);let _=Le.filter(e=>[...g.values()].includes(e)),v=`minmax(120px, 1.2fr) repeat(${m.length}, minmax(88px, 1fr))`;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`raci-scroll`,children:(0,y.jsxs)(`div`,{className:`raci-grid`,style:{gridTemplateColumns:v},role:`grid`,children:[(0,y.jsx)(`div`,{className:`raci-corner`,role:`columnheader`}),m.map((e,t)=>(0,y.jsx)(`div`,{className:`raci-colh`,role:`columnheader`,title:e,children:e},t)),p.map((e,t)=>(0,y.jsxs)(`div`,{className:`raci-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsx)(`div`,{className:`raci-rowh`,role:`rowheader`,title:e,children:e}),m.map((t,n)=>{let r=g.get(h(e,t));if(!r)return(0,y.jsx)(`div`,{className:`raci-cell raci-empty`,role:`gridcell`,children:(0,y.jsx)(`span`,{className:`raci-dash`,children:`–`})},n);let i=H[r];return(0,y.jsx)(`div`,{className:`raci-cell`,style:{"--raci-c":i.color},role:`gridcell`,title:i.label,children:(0,y.jsx)(`span`,{className:`raci-badge`,children:r})},n)})]},t))]})}),c&&_.length>0&&(0,y.jsx)(`div`,{className:`raci-legend`,children:_.map(e=>(0,y.jsxs)(`span`,{className:`raci-leg-item`,style:{"--raci-c":H[e].color},children:[(0,y.jsx)(`span`,{className:`raci-leg-badge`,children:e}),H[e].label]},e))}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var U=e=>typeof e==`string`?e:e==null?``:String(e);function ze({title:e,icon:t=`check`,iconColor:n=`var(--presence)`,criteria:r,levels:o,cells:s,scores:c,maxScore:u,footer:f,delay:p}){let h=i[t]||i.check,g=Array.isArray(r)?r:r?[String(r)]:[],_=Array.isArray(o)?o:o?[String(o)]:[],v=(0,m.useMemo)(()=>{let e=(e,t)=>`${U(e).trim().toLowerCase()} ${U(t).trim().toLowerCase()}`,t=new Map;for(let n of s??[])!n?.criterion||!n?.level||t.set(e(n.criterion,n.level),{descriptor:n.descriptor,achieved:n.achieved});return t},[s]),b=(0,m.useMemo)(()=>Array.isArray(c)?c:[],[c]),x=(0,m.useMemo)(()=>{let e=new Map;for(let t of b)t?.criterion&&e.set(U(t.criterion).trim().toLowerCase(),t.score);return e},[b]),S=b.length>0,C=(0,m.useMemo)(()=>b.reduce((e,t)=>e+(Number.isFinite(t.score)?t.score:0),0),[b]),w=u==null?void 0:u*g.length,T=d(C,{duration:900,decimals:C%1==0?0:1});if(g.length===0||_.length===0)return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(l,{message:`No criteria or levels to score`})]});let E=`minmax(130px, 1.1fr) repeat(${_.length}, minmax(150px, 1fr))${S?` minmax(64px, 0.5fr)`:``}`;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(h,{className:`ic`,style:{color:n}}),` `,e,S&&(0,y.jsxs)(`span`,{className:`rub-total`,children:[T,w==null?``:` / ${w}`,` pts`]})]}),(0,y.jsx)(`div`,{className:`rub-scroll`,children:(0,y.jsxs)(`div`,{className:`rub-grid`,style:{gridTemplateColumns:E},role:`grid`,children:[(0,y.jsx)(`div`,{className:`rub-corner`,role:`columnheader`}),_.map((e,t)=>(0,y.jsx)(`div`,{className:`rub-colh`,role:`columnheader`,title:U(e),children:U(e)},t)),S&&(0,y.jsx)(`div`,{className:`rub-colh rub-score-h`,children:`Score`}),g.map((e,t)=>{let n=U(e).trim().toLowerCase(),r=x.get(n);return(0,y.jsxs)(`div`,{className:`rub-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsx)(`div`,{className:`rub-rowh`,role:`rowheader`,title:U(e),children:U(e)}),_.map((e,t)=>{let r=v.get(`${n} ${U(e).trim().toLowerCase()}`);return(0,y.jsxs)(`div`,{className:`rub-cell`+(r?.achieved?` achieved`:``),role:`gridcell`,children:[r?.achieved&&(0,y.jsx)(i.check,{className:`ic rub-check`}),(0,y.jsx)(`span`,{className:`rub-desc`,children:r?.descriptor||`—`})]},t)}),S&&(0,y.jsx)(`div`,{className:`rub-cell rub-score-cell`,role:`gridcell`,children:r==null?`—`:(0,y.jsxs)(`span`,{className:`tab-num`,children:[r,u==null?``:`/${u}`]})})]},t)})]})}),f&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var W=e=>typeof e==`string`?e:e==null?``:String(e);function Be(e,t,n){let r=n-t||1,i=Math.max(0,Math.min(1,(e-t)/r));return i>=.66?`var(--insight)`:i>=.33?`var(--warning)`:`var(--danger)`}function Ve({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,candidates:r,criteria:o,cells:s,scale:c,footer:u,delay:d}){let f=i[t]||i.chat,p=(0,m.useMemo)(()=>Array.isArray(r)?r:r?[String(r)]:[],[r]),h=(0,m.useMemo)(()=>Array.isArray(o)?o:o?[String(o)]:[],[o]),g=c?.min??1,_=c?.max??5,v=(0,m.useMemo)(()=>{let e=(e,t)=>`${W(e).trim().toLowerCase()} ${W(t).trim().toLowerCase()}`,t=new Map;for(let n of s??[])!n?.candidate||!n?.criterion||!Number.isFinite(n.rating)||t.set(e(n.candidate,n.criterion),{rating:n.rating,note:n.note});return t},[s]),b=(0,m.useMemo)(()=>{let e=new Map;for(let t of p){let n=W(t).trim().toLowerCase(),r=h.map(e=>v.get(`${n} ${W(e).trim().toLowerCase()}`)?.rating).filter(e=>e!=null);r.length>0&&e.set(t,r.reduce((e,t)=>e+t,0)/r.length)}return e},[p,h,v]);if(p.length===0||h.length===0)return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(l,{message:`No candidates or criteria to score`})]});let x=`minmax(128px, 1.1fr) repeat(${h.length}, minmax(130px, 1fr))`;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`isc-scroll`,children:(0,y.jsxs)(`div`,{className:`isc-grid`,style:{gridTemplateColumns:x},role:`grid`,children:[(0,y.jsx)(`div`,{className:`isc-corner`,role:`columnheader`}),h.map((e,t)=>(0,y.jsx)(`div`,{className:`isc-colh`,role:`columnheader`,title:W(e),children:W(e)},t)),p.map((e,t)=>{let n=b.get(e);return(0,y.jsxs)(`div`,{className:`isc-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsxs)(`div`,{className:`isc-rowh`,role:`rowheader`,title:W(e),children:[(0,y.jsx)(`span`,{className:`isc-name`,children:W(e)}),n!=null&&(0,y.jsx)(`span`,{className:`isc-avg`,style:{"--isc-c":Be(n,g,_)},children:n.toFixed(1)})]}),h.map((t,n)=>{let r=v.get(`${W(e).trim().toLowerCase()} ${W(t).trim().toLowerCase()}`);if(!r)return(0,y.jsx)(`div`,{className:`isc-cell isc-empty`,role:`gridcell`,children:(0,y.jsx)(`span`,{className:`isc-dash`,children:`—`})},n);let i=Be(r.rating,g,_);return(0,y.jsxs)(`div`,{className:`isc-cell`,style:{"--isc-c":i},role:`gridcell`,children:[(0,y.jsxs)(`span`,{className:`isc-badge tab-num`,children:[r.rating,(0,y.jsxs)(`span`,{className:`isc-scale`,children:[`/`,_]})]}),r.note&&(0,y.jsx)(`span`,{className:`isc-note`,children:r.note})]},n)})]},t)})]})}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function G(e){return e>=97?`A+`:e>=93?`A`:e>=90?`A-`:e>=87?`B+`:e>=83?`B`:e>=80?`B-`:e>=77?`C+`:e>=73?`C`:e>=70?`C-`:e>=67?`D+`:e>=63?`D`:e>=60?`D-`:`F`}function K(e){let t=e[0];return t===`A`?`var(--insight)`:t===`B`?`var(--presence)`:t===`C`?`var(--warning)`:`var(--danger)`}function He({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,students:r,assignments:o,cells:s,showClassAverage:c=!0,footer:u,delay:f}){let p=i[t]||i.table,h=(0,m.useMemo)(()=>r??[],[r]),g=(0,m.useMemo)(()=>o??[],[o]),_=(0,m.useMemo)(()=>{let e=(e,t)=>`${e.trim().toLowerCase()} ${t.trim().toLowerCase()}`,t=new Map;for(let n of s??[])!n?.student||!n?.assignment||!Number.isFinite(n.score)||t.set(e(n.student,n.assignment),{score:n.score,maxScore:n.maxScore??100});return t},[s]),{avgByStudent:v,classAvg:b}=(0,m.useMemo)(()=>{let e=new Map,t=[];for(let n of h){let r=n.trim().toLowerCase(),i=g.map(e=>_.get(`${r} ${e.trim().toLowerCase()}`)).filter(e=>e!=null).map(e=>e.score/(e.maxScore||1)*100);i.length>0&&(e.set(n,i.reduce((e,t)=>e+t,0)/i.length),t.push(...i))}return{avgByStudent:e,classAvg:t.length>0?t.reduce((e,t)=>e+t,0)/t.length:0}},[h,g,_]),x=d(b,{duration:900,decimals:0});if(h.length===0||g.length===0)return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(l,{message:`No students or assignments to grade`})]});let S=c,C=`minmax(128px, 1.1fr) repeat(${g.length}, minmax(104px, 1fr))${S?` minmax(84px, 0.6fr)`:``}`;return(0,y.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e,c&&(0,y.jsxs)(`span`,{className:`gb-total`,style:{"--gb-c":K(G(b))},children:[`class avg `,x,`%`]})]}),(0,y.jsx)(`div`,{className:`gb-scroll`,children:(0,y.jsxs)(`div`,{className:`gb-grid`,style:{gridTemplateColumns:C},role:`grid`,children:[(0,y.jsx)(`div`,{className:`gb-corner`,role:`columnheader`}),g.map((e,t)=>(0,y.jsx)(`div`,{className:`gb-colh`,role:`columnheader`,title:e,children:e},t)),S&&(0,y.jsx)(`div`,{className:`gb-colh gb-avg-h`,children:`Average`}),h.map((e,t)=>{let n=v.get(e);return(0,y.jsxs)(`div`,{className:`gb-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsx)(`div`,{className:`gb-rowh`,role:`rowheader`,title:e,children:e}),g.map((t,n)=>{let r=_.get(`${e.trim().toLowerCase()} ${t.trim().toLowerCase()}`);if(!r)return(0,y.jsx)(`div`,{className:`gb-cell gb-empty`,role:`gridcell`,children:(0,y.jsx)(`span`,{className:`gb-dash`,children:`—`})},n);let i=G(r.score/(r.maxScore||1)*100);return(0,y.jsxs)(`div`,{className:`gb-cell`,style:{"--gb-c":K(i)},role:`gridcell`,children:[(0,y.jsxs)(`span`,{className:`gb-score tab-num`,children:[r.score,`/`,r.maxScore]}),(0,y.jsx)(`span`,{className:`gb-letter`,children:i})]},n)}),S&&(0,y.jsx)(`div`,{className:`gb-cell gb-avg-cell`,role:`gridcell`,children:n==null?`—`:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`span`,{className:`gb-score tab-num`,children:[n.toFixed(0),`%`]}),(0,y.jsx)(`span`,{className:`gb-letter`,style:{"--gb-c":K(G(n))},children:G(n)})]})})]},t)})]})}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var Ue={int:`var(--presence)`,float:`var(--presence-deep)`,str:`var(--insight-soft)`,bool:`var(--warning)`,category:`var(--insight)`,datetime:`var(--presence-soft)`},We=new Set([`int`,`float`,`str`,`bool`,`category`,`datetime`]);function Ge(e){return typeof e==`string`&&We.has(e)?e:`str`}function Ke(e){let t=typeof e==`number`?e:parseFloat(String(e??``));return Number.isFinite(t)?Math.max(0,Math.min(100,t)):null}function qe(e){return e>=40?`var(--danger)`:e>=15?`var(--warning)`:`var(--insight)`}function Je(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.round(e)):null}function Ye({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,source:r,nRows:o,nCols:c,variables:u,footer:d,delay:f}){let p=i[t]||i.table,m=(Array.isArray(u)?u:[]).filter(e=>typeof e?.name==`string`&&e.name.trim().length>0),h=Je(o),g=Je(c)??(m.length||null),_=[];return r&&_.push(r),h!=null&&_.push(`${s(h,{compact:h>=1e5})} rows`),g!=null&&_.push(`${s(g)} cols`),(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(f||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),_.length>0&&(0,y.jsx)(`div`,{className:`dd-cap`,children:_.join(` · `)}),m.length===0?(0,y.jsx)(l,{message:`No variables documented`}):(0,y.jsx)(`div`,{className:`dd-scroll`,children:(0,y.jsxs)(`div`,{className:`dd-grid`,role:`grid`,children:[(0,y.jsx)(`div`,{className:`dd-colh`,role:`columnheader`,children:`Variable`}),(0,y.jsx)(`div`,{className:`dd-colh`,role:`columnheader`,children:`Type`}),(0,y.jsx)(`div`,{className:`dd-colh`,role:`columnheader`,children:`Unit`}),(0,y.jsx)(`div`,{className:`dd-colh dd-colh-desc`,role:`columnheader`,children:`Description`}),(0,y.jsx)(`div`,{className:`dd-colh dd-colh-miss`,role:`columnheader`,children:`Missing`}),m.map((e,t)=>{let n=Ge(e.dtype),r=Ke(e.missingPct);return(0,y.jsxs)(`div`,{className:`dd-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsx)(`div`,{className:`dd-name`,role:`gridcell`,title:e.name,children:e.name}),(0,y.jsx)(`div`,{role:`gridcell`,children:(0,y.jsx)(`span`,{className:`dd-pill`,style:{"--dd-c":Ue[n]},children:n})}),(0,y.jsx)(`div`,{className:`dd-unit`,role:`gridcell`,children:e.unit||`—`}),(0,y.jsx)(`div`,{className:`dd-desc`,role:`gridcell`,children:e.description||`—`}),(0,y.jsx)(`div`,{className:`dd-miss`,role:`gridcell`,children:r==null?(0,y.jsx)(`span`,{className:`dd-miss-dash`,children:`—`}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`dd-miss-track`,children:(0,y.jsx)(`div`,{className:`dd-miss-fill`,style:{width:`${r}%`,background:qe(r)}})}),(0,y.jsxs)(`span`,{className:`dd-miss-pct tab-num`,children:[r%1==0?r:r.toFixed(1),`%`]})]})})]},`${e.name}-${t}`)})]})}),d&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function Xe(e,t,n){return t===`better`||t===`worse`?t:e==null||e===0?`flat`:e>0===n?`better`:`worse`}function Ze(e){return Number.isFinite(e)?e.toLocaleString(void 0,{maximumFractionDigits:3}):`—`}function Qe(e){return e==null||!Number.isFinite(e)||e===0?`±0`:`${e>0?`+`:`−`}${Math.abs(e).toLocaleString(void 0,{maximumFractionDigits:3})}`}function $e({title:e,icon:t=`sliders`,iconColor:n=`var(--presence)`,baseline:r,baselineValue:o,metric:s,rows:c,higherBetter:u=!0,footer:d,delay:f}){let p=i[t]||i.sliders,m=(Array.isArray(c)?c:[]).filter(e=>e&&typeof e.removed==`string`&&e.removed.trim().length>0&&Number.isFinite(e.value)),h=typeof r==`string`&&r.trim().length>0,g=Number.isFinite(o)?o:null;return!h&&m.length===0?(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(f||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(l,{message:`No ablation results to compare`})]}):(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(f||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),s&&(0,y.jsx)(`div`,{className:`abl-cap`,children:s}),(0,y.jsxs)(`div`,{className:`abl-list`,children:[h&&(0,y.jsxs)(`div`,{className:`abl-row abl-baseline`,children:[(0,y.jsx)(`span`,{className:`abl-name`,children:r}),(0,y.jsx)(`span`,{className:`abl-val tab-num`,children:g==null?`—`:Ze(g)}),(0,y.jsx)(`span`,{className:`abl-delta flat`,children:`baseline`})]}),m.map((e,t)=>{let n=Number.isFinite(e.delta)?e.delta:g==null?null:e.value-g,r=Xe(n,e.deltaDirection,u);return(0,y.jsxs)(`div`,{className:`abl-row m-stagger-item m-fade-rise`,style:{"--i":t+1},children:[(0,y.jsxs)(`span`,{className:`abl-name`,children:[`w/o `,e.removed]}),(0,y.jsx)(`span`,{className:`abl-val tab-num`,children:Ze(e.value)}),(0,y.jsx)(`span`,{className:`abl-delta ${r}`,children:Qe(n)})]},t)})]}),d&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}var et={"nmr-1h":{name:`¹H NMR`,xHeader:`δ (ppm)`,xDecimals:2,showMultInteg:!0,intensityLabel:`Intensity`,assignLabel:`Assignment`,domain:[0,12],descending:!0},"nmr-13c":{name:`¹³C NMR`,xHeader:`δ (ppm)`,xDecimals:1,showMultInteg:!0,intensityLabel:`Intensity`,assignLabel:`Assignment`,domain:[0,220],descending:!0},ir:{name:`IR`,xHeader:`cm⁻¹`,xDecimals:0,showMultInteg:!1,intensityLabel:`Intensity`,assignLabel:`Functional group`,domain:[400,4e3],descending:!0},ms:{name:`MS`,xHeader:`m/z`,xDecimals:0,showMultInteg:!1,intensityLabel:`Rel. abundance`,assignLabel:`Fragment`,domain:[0,100],descending:!1}};function tt(e){return e===`nmr-1h`||e===`nmr-13c`||e===`ir`||e===`ms`?e:`nmr-1h`}function q(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function J(e,t){return Number.isFinite(e)?e.toFixed(t):`—`}function Y(e){return Math.max(0,Math.min(100,e))}function nt({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,technique:r,compound:o,solvent:s,peaks:c,footer:u,delay:d}){let f=i[t]||i.chart,p=et[tt(r)],m=(Array.isArray(c)?c:[]).filter(e=>q(e?.x)!=null),h=[...m].sort((e,t)=>p.descending?t.x-e.x:e.x-t.x),g=m.map(e=>e.x),_=g.length?Math.min(p.domain[0],...g):p.domain[0],v=g.length?Math.max(p.domain[1],...g):p.domain[1],b=v-_||1,x=[p.name,o,s].filter(e=>typeof e==`string`&&e.length>0),S=p.showMultInteg?`minmax(64px, 0.7fr) minmax(56px, 0.55fr) minmax(56px, 0.55fr) minmax(120px, 2fr)`:`minmax(72px, 0.7fr) minmax(110px, 1.1fr) minmax(120px, 2fr)`;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,y.jsx)(`div`,{className:`spt-cap`,children:x.join(` · `)}),h.length===0?(0,y.jsx)(l,{message:`No peaks to show`}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`spt-axis`,role:`img`,"aria-label":`${p.name} axis from ${J(p.descending?v:_,0)} to ${J(p.descending?_:v,0)} ${p.xHeader}`,children:[(0,y.jsx)(`div`,{className:`spt-axis-line`}),h.map((e,t)=>{let n=(e.x-_)/b,r=Y((p.descending?1-n:n)*100);return(0,y.jsx)(`div`,{className:`spt-tick`,style:{left:`${r}%`}},t)}),(0,y.jsx)(`span`,{className:`spt-axis-end spt-axis-lo`,children:J(p.descending?v:_,0)}),(0,y.jsx)(`span`,{className:`spt-axis-end spt-axis-hi`,children:J(p.descending?_:v,0)})]}),(0,y.jsx)(`div`,{className:`spt-scroll`,children:(0,y.jsxs)(`div`,{className:`spt-grid`,style:{gridTemplateColumns:S},role:`grid`,children:[(0,y.jsx)(`div`,{className:`spt-colh`,role:`columnheader`,children:p.xHeader}),p.showMultInteg?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`spt-colh`,role:`columnheader`,children:`Mult.`}),(0,y.jsx)(`div`,{className:`spt-colh`,role:`columnheader`,children:`Integ.`})]}):(0,y.jsx)(`div`,{className:`spt-colh`,role:`columnheader`,children:p.intensityLabel}),(0,y.jsx)(`div`,{className:`spt-colh spt-colh-assign`,role:`columnheader`,children:p.assignLabel}),h.map((e,t)=>{let n=q(e.integration),i=q(e.intensity);return(0,y.jsxs)(`div`,{className:`spt-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsx)(`div`,{className:`spt-x tab-num`,role:`gridcell`,children:J(e.x,p.xDecimals)}),p.showMultInteg?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`spt-mult`,role:`gridcell`,children:e.multiplicity||`—`}),(0,y.jsx)(`div`,{className:`spt-integ tab-num`,role:`gridcell`,children:n==null?`—`:`${n}${tt(r)===`nmr-1h`?`H`:``}`})]}):(0,y.jsx)(`div`,{className:`spt-intensity`,role:`gridcell`,children:i==null?(0,y.jsx)(`span`,{className:`spt-dash`,children:`—`}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`spt-int-track`,children:(0,y.jsx)(`div`,{className:`spt-int-fill`,style:{width:`${Y(i)}%`}})}),(0,y.jsxs)(`span`,{className:`spt-int-pct tab-num`,children:[Math.round(Y(i)),`%`]})]})}),(0,y.jsx)(`div`,{className:`spt-assign`,role:`gridcell`,children:e.assignment||`—`})]},t)})]})})]}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function X(e){let t=typeof e==`number`?e:parseFloat(String(e??``));return Number.isFinite(t)?Math.max(1,Math.min(10,Math.round(t))):1}function rt(e){return e>=7?`var(--danger)`:e>=4?`var(--warning)`:`var(--insight)`}function it(e){return e>=200?`var(--danger)`:e>=80?`var(--warning)`:`var(--insight)`}function at(e){let t=(0,M.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,y.jsx)(`div`,{className:`fma-meta`,children:n}),t[0]=n,t[1]=r),r}function ot({title:e,icon:t=`alert`,iconColor:n=`var(--warning)`,items:r,footer:o,delay:s}){let c=i[t]||i.alert,u=(Array.isArray(r)?r:[]).filter(e=>e&&typeof e.failureMode==`string`&&e.failureMode.trim().length>0).map(e=>{let t=X(e.severity),n=X(e.occurrence),r=X(e.detection);return{item:e,severity:t,occurrence:n,detection:r,rpn:t*n*r}}).sort((e,t)=>t.rpn-e.rpn),d=Math.min(3,u.length);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(s||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),u.length===0?(0,y.jsx)(l,{message:`No failure modes to analyze`}):(0,y.jsx)(`div`,{className:`fma-list`,children:u.flatMap((e,t)=>{let n=Math.max(0,Math.min(100,e.rpn/1e3*100)),r=(0,y.jsxs)(`div`,{className:`fma-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,y.jsxs)(`div`,{className:`fma-top`,children:[(0,y.jsxs)(`div`,{className:`fma-name`,children:[(0,y.jsx)(`span`,{className:`fma-mode`,children:e.item.failureMode}),e.item.owner&&(0,y.jsx)(`span`,{className:`fma-owner`,children:e.item.owner})]}),(0,y.jsxs)(`div`,{className:`fma-sod`,children:[(0,y.jsxs)(`span`,{className:`fma-badge`,style:{"--fma-c":rt(e.severity)},title:`Severity`,children:[`S `,e.severity]}),(0,y.jsxs)(`span`,{className:`fma-badge`,style:{"--fma-c":rt(e.occurrence)},title:`Occurrence`,children:[`O `,e.occurrence]}),(0,y.jsxs)(`span`,{className:`fma-badge`,style:{"--fma-c":rt(e.detection)},title:`Detection`,children:[`D `,e.detection]})]}),(0,y.jsxs)(`div`,{className:`fma-rpn-wrap`,children:[(0,y.jsx)(`span`,{className:`fma-rpn tab-num`,style:{"--fma-rc":it(e.rpn)},children:e.rpn}),(0,y.jsx)(`span`,{className:`fma-rpn-label`,children:`RPN`})]})]}),(e.item.cause||e.item.effect)&&(0,y.jsxs)(at,{children:[e.item.cause&&(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`b`,{children:`Cause`}),` `,e.item.cause]}),e.item.effect&&(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`b`,{children:`Effect`}),` `,e.item.effect]})]}),(0,y.jsx)(`div`,{className:`fma-track`,children:(0,y.jsx)(`div`,{className:`fma-fill`,style:{width:`${n}%`,background:it(e.rpn)}})}),(e.item.currentControl||e.item.action)&&(0,y.jsxs)(at,{children:[e.item.currentControl&&(0,y.jsxs)(`span`,{children:[(0,y.jsx)(`b`,{children:`Control`}),` `,e.item.currentControl]}),e.item.action&&(0,y.jsxs)(`span`,{className:`fma-action`,children:[(0,y.jsx)(`b`,{children:`Action`}),` `,e.item.action]})]})]},t);return t===d-1&&d<u.length?[r,(0,y.jsx)(`div`,{className:`fma-priority-rule`},`rule-${t}`)]:[r]})}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function st(e,t){return s(e,{currency:t,decimals:2})}function ct(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function lt({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,rows:r,currency:o=`USD`,footer:s,delay:c}){let u=i[t]||i.layers,d=(Array.isArray(r)?r:[]).filter(e=>e&&typeof e.label==`string`&&e.label.trim().length>0).map(e=>{let t=Math.max(0,Math.round(e.indent||0)),n=e.kind===`subassembly`||e.kind===`total`?e.kind:`part`,r=ct(e.qty),i=ct(e.unitCost);return{row:e,indent:t,kind:n,qty:r,unitCost:i,extended:n===`part`&&i!=null?(r??1)*i:null}}),f=Array(d.length).fill(0),p=[];for(let e=d.length-1;e>=0;e--){let t=d[e],n=0;for(;p.length>0&&p[p.length-1].indent>t.indent;)n+=p.pop().subtotal;f[e]=n,t.kind===`part`&&t.extended!=null&&(n+=t.extended),p.push({indent:t.indent,subtotal:n})}let m=d.filter(e=>e.kind===`part`&&e.extended!=null).reduce((e,t)=>e+t.extended,0);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),d.length===0?(0,y.jsx)(l,{message:`No parts to list`}):(0,y.jsx)(`div`,{className:`bom-scroll`,children:(0,y.jsxs)(`table`,{className:`bom-tbl`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`bom-h-label`,children:`Item`}),(0,y.jsx)(`th`,{className:`bom-h-part`,children:`Part #`}),(0,y.jsx)(`th`,{className:`bom-h-num`,children:`Qty`}),(0,y.jsx)(`th`,{className:`bom-h-num`,children:`Unit cost`}),(0,y.jsx)(`th`,{className:`bom-h-num`,children:`Ext. cost`})]})}),(0,y.jsx)(`tbody`,{children:d.map((e,t)=>{let n=e.kind===`part`?e.extended:e.kind===`subassembly`?f[t]:m;return(0,y.jsxs)(`tr`,{className:`bom-row bom-${e.kind}`,children:[(0,y.jsx)(`td`,{className:`bom-label`,style:{paddingLeft:2+e.indent*14},children:e.row.label}),(0,y.jsx)(`td`,{className:`bom-part tab-num`,children:e.kind===`part`&&e.row.partNo?e.row.partNo:`—`}),(0,y.jsx)(`td`,{className:`bom-num tab-num`,children:e.kind===`part`&&e.qty!=null?e.qty:`—`}),(0,y.jsx)(`td`,{className:`bom-num tab-num`,children:e.kind===`part`&&e.unitCost!=null?st(e.unitCost,o):`—`}),(0,y.jsx)(`td`,{className:`bom-num bom-ext tab-num`,children:n==null?`—`:st(n,o)})]},t)})})]})}),s&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function ut({title:e,icon:t=`clock`,iconColor:n=`var(--presence)`,approaches:r,footer:o,delay:s}){let c=i[t]||i.clock,u=(Array.isArray(r)?r:[]).filter(e=>e&&typeof e.name==`string`&&e.name.trim().length>0);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(s||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),u.length===0?(0,y.jsx)(l,{message:`No approaches to compare`}):(0,y.jsx)(`div`,{className:`cxs-scroll`,children:(0,y.jsxs)(`div`,{className:`cxs-grid`,role:`grid`,"aria-label":e,children:[(0,y.jsx)(`div`,{className:`cxs-colh`,role:`columnheader`,children:`Approach`}),(0,y.jsx)(`div`,{className:`cxs-colh`,role:`columnheader`,children:`Time`}),(0,y.jsx)(`div`,{className:`cxs-colh`,role:`columnheader`,children:`Space`}),(0,y.jsx)(`div`,{className:`cxs-colh cxs-colh-notes`,role:`columnheader`,children:`Notes`}),u.map((e,t)=>(0,y.jsxs)(`div`,{className:`cxs-row m-stagger-item m-fade-rise`,style:{"--i":t},role:`row`,children:[(0,y.jsx)(`div`,{className:`cxs-name`,role:`gridcell`,title:e.name,children:e.name}),(0,y.jsx)(`div`,{className:`cxs-complexity tab-num`,role:`gridcell`,children:e.timeComplexity||`—`}),(0,y.jsx)(`div`,{className:`cxs-complexity tab-num`,role:`gridcell`,children:e.spaceComplexity||`—`}),(0,y.jsx)(`div`,{className:`cxs-notes`,role:`gridcell`,children:e.notes||`—`})]},`${e.name}-${t}`))]})}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var dt=[-1,-.5,0,.5,1];function Z(e){if(!Number.isFinite(e))return`0.0`;let t=Math.round(e*10)/10;return t===0?`0.0`:`${t>0?`+`:`−`}${Math.abs(t).toFixed(1)}`}function ft(e){return e===0?`transparent`:`color-mix(in oklab, ${e>0?`var(--danger)`:`var(--presence)`} ${(Math.abs(e)*88).toFixed(1)}%, transparent)`}function pt({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,genes:r,samples:o,values:s,scaleLabel:c=`log2 fold-change`,footer:u,delay:d}){let f=i[t]||i.table,[p,h]=(0,m.useState)(null),g=Array.isArray(r)?r:[],_=Array.isArray(o)?o:[],v=g.map((e,t)=>{let n=Array.isArray(s)?s[t]:void 0;return _.map((e,t)=>{let r=Array.isArray(n)?n[t]:void 0;return typeof r==`number`&&Number.isFinite(r)?r:0})}),b=Math.max(1e-9,...v.flat().map(e=>Math.abs(e))),x=e=>Math.max(-1,Math.min(1,e/b));return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),g.length===0||_.length===0?(0,y.jsx)(l,{message:`Needs at least one gene and one sample to plot`}):(0,y.jsxs)(`div`,{className:`eh-wrap`,children:[(0,y.jsxs)(`div`,{className:`eh-grid`,style:{gridTemplateColumns:`minmax(0, auto) repeat(${_.length}, minmax(0, var(--eh-cell)))`},children:[(0,y.jsx)(`span`,{className:`eh-corner`}),_.map((e,t)=>(0,y.jsx)(`span`,{className:`eh-colh ${p?.c===t?`on`:``}`,title:e,children:e},t)),g.map((e,t)=>(0,y.jsx)(mt,{ri:t,label:e,vals:v[t],colCount:_.length,norm:x,hover:p,setHover:h},t))]}),(0,y.jsxs)(`div`,{className:`eh-legend`,children:[(0,y.jsx)(`span`,{className:`faint tab-num`,children:Z(-b)}),dt.map(e=>(0,y.jsx)(`span`,{className:`eh-swatch`,style:{background:ft(e)}},e)),(0,y.jsx)(`span`,{className:`faint tab-num`,children:Z(b)}),(0,y.jsx)(`span`,{className:`eh-scale-label faint`,children:c})]})]}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function mt(e){let t=(0,M.c)(15),{ri:n,label:r,vals:i,colCount:a,norm:o,hover:s,setHover:c}=e,l=`eh-rowh ${s?.r===n?`on`:``}`,u;t[0]!==r||t[1]!==l?(u=(0,y.jsx)(`span`,{className:l,title:r,children:r}),t[0]=r,t[1]=l,t[2]=u):u=t[2];let d;t[3]===a?d=t[4]:(d=Array.from({length:a}),t[3]=a,t[4]=d);let f;t[5]!==s||t[6]!==o||t[7]!==n||t[8]!==c||t[9]!==d||t[10]!==i?(f=d.map((e,t)=>{let r=i[t]??0,a=o(r),l=s?.r===n&&s?.c===t,u=s&&(s.r===n||s.c===t);return(0,y.jsxs)(`div`,{className:`eh-cell ${l?`hot`:``} ${u&&!l?`cross`:``}`,style:{background:ft(a),color:Math.abs(a)>.55?`var(--surface-deep)`:`var(--text-secondary)`},onMouseEnter:()=>c({r:n,c:t}),onMouseLeave:()=>c(null),children:[(0,y.jsx)(`span`,{className:`eh-v tab-num`,children:Z(r)}),l&&(0,y.jsx)(`span`,{className:`eh-tip tab-num`,children:Z(r)})]},t)}),t[5]=s,t[6]=o,t[7]=n,t[8]=c,t[9]=d,t[10]=i,t[11]=f):f=t[11];let p;return t[12]!==u||t[13]!==f?(p=(0,y.jsxs)(y.Fragment,{children:[u,f]}),t[12]=u,t[13]=f,t[14]=p):p=t[14],p}var ht=new Set([`outstanding`,`produced`,`objected`,`privileged`]),gt={outstanding:`var(--warning)`,produced:`var(--insight)`,objected:`var(--danger)`,privileged:`var(--presence)`},_t={outstanding:`Outstanding`,produced:`Produced`,objected:`Objected`,privileged:`Privileged`},vt=[`outstanding`,`produced`,`objected`,`privileged`];function yt(e){return typeof e==`string`&&ht.has(e)?e:`outstanding`}function bt(e,t){let n=Date.parse(e),r=Date.parse(t);return Number.isFinite(n)&&Number.isFinite(r)?n-r:Number.isFinite(n)?-1:Number.isFinite(r)?1:e.localeCompare(t)}function xt({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,requests:r,footer:o,delay:s}){let c=i[t]||i.doc,[u,d]=(0,m.useState)(`all`),[f,p]=(0,m.useState)(`num`),[h,g]=(0,m.useState)(`asc`),_=(Array.isArray(r)?r:[]).filter(e=>typeof e?.description==`string`&&e.description.trim().length>0).map((e,t)=>({req:e,num:typeof e.num==`number`&&Number.isFinite(e.num)?e.num:t+1,party:typeof e.requestingParty==`string`&&e.requestingParty.trim()?e.requestingParty:`Unspecified`,status:yt(e.status)})),v=(0,m.useMemo)(()=>{let e={outstanding:0,produced:0,objected:0,privileged:0};for(let t of _)e[t.status]++;return e},[_]),b=u===`all`?_:_.filter(e=>e.status===u),x=(0,m.useMemo)(()=>{let e=h===`asc`?1:-1;return[...b].sort((t,n)=>{switch(f){case`num`:return(t.num-n.num)*e;case`party`:return t.party.localeCompare(n.party)*e;case`status`:return(vt.indexOf(t.status)-vt.indexOf(n.status))*e;case`due`:return bt(t.req.dueDate||``,n.req.dueDate||``)*e}})},[b,f,h]),S=e=>{e===f?g(e=>e===`asc`?`desc`:`asc`):(p(e),g(`asc`))},C=({label:e,sk:t})=>(0,y.jsx)(`th`,{className:`dtr-th`,children:(0,y.jsxs)(`button`,{type:`button`,className:`dtr-th-btn`,onClick:()=>S(t),children:[e,f===t&&(0,y.jsx)(`span`,{className:`dtr-th-arrow`,children:h===`asc`?`↑`:`↓`})]})});return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(s||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),_.length===0?(0,y.jsx)(l,{message:`No discovery requests logged`}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`dtr-chips`,role:`tablist`,children:[(0,y.jsxs)(`button`,{type:`button`,className:`dtr-chip ${u===`all`?`on`:``}`,onClick:()=>d(`all`),children:[`All `,(0,y.jsx)(`span`,{className:`dtr-count`,children:_.length})]}),vt.map(e=>(0,y.jsxs)(`button`,{type:`button`,className:`dtr-chip ${u===e?`on`:``}`,style:{"--dtr-c":gt[e]},onClick:()=>d(e),children:[_t[e],` `,(0,y.jsx)(`span`,{className:`dtr-count`,children:v[e]})]},e))]}),(0,y.jsx)(`div`,{className:`dtr-scroll`,children:(0,y.jsxs)(`table`,{className:`dtr-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(C,{label:`#`,sk:`num`}),(0,y.jsx)(`th`,{className:`dtr-th dtr-th-desc`,children:`Description`}),(0,y.jsx)(C,{label:`Requesting party`,sk:`party`}),(0,y.jsx)(C,{label:`Status`,sk:`status`}),(0,y.jsx)(`th`,{className:`dtr-th`,children:`Bates`}),(0,y.jsx)(C,{label:`Due`,sk:`due`})]})}),(0,y.jsx)(`tbody`,{children:x.map((e,t)=>(0,y.jsxs)(`tr`,{className:`dtr-row m-stagger-item m-fade-rise`,children:[(0,y.jsx)(`td`,{className:`dtr-num tab-num`,children:e.num}),(0,y.jsx)(`td`,{className:`dtr-desc`,children:e.req.description}),(0,y.jsx)(`td`,{className:`dtr-party`,children:e.party}),(0,y.jsxs)(`td`,{children:[(0,y.jsx)(`span`,{className:`dtr-status`,style:{"--dtr-c":gt[e.status]},children:_t[e.status]}),e.status===`privileged`&&e.req.privilegeBasis&&(0,y.jsx)(`div`,{className:`dtr-priv-note`,children:e.req.privilegeBasis})]}),(0,y.jsx)(`td`,{className:`dtr-bates`,children:e.req.batesRange||`—`}),(0,y.jsx)(`td`,{className:`dtr-due`,children:e.req.dueDate||`—`})]},`${e.num}-${t}`))})]})})]}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var St=new Set([`urgent`,`recommended`,`elective`]),Ct={urgent:`var(--danger)`,recommended:`var(--warning)`,elective:`var(--insight)`};function wt(e){return typeof e==`string`&&St.has(e)?e:`recommended`}function Tt(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Et(e){return e?/complet|done/i.test(e)?`var(--insight)`:/progress|underway|started/i.test(e)?`var(--warning)`:`var(--text-muted)`:`var(--text-muted)`}var Dt=`Unscheduled`;function Ot({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,entries:r,footer:o,delay:c}){let u=i[t]||i.shield,d=(Array.isArray(r)?r:[]).filter(e=>typeof e?.procedure==`string`&&e.procedure.trim().length>0).map(e=>({entry:e,priority:wt(e.priority),cost:Tt(e.cost),visit:typeof e.visit==`string`&&e.visit.trim()?e.visit:Dt})),f=(0,m.useMemo)(()=>{let e=[],t=new Map;for(let n of d)t.has(n.visit)||(t.set(n.visit,[]),e.push(n.visit)),t.get(n.visit).push(n);return e.map(e=>({visit:e,rows:t.get(e),subtotal:t.get(e).reduce((e,t)=>e+(t.cost??0),0)}))},[d]),p=d.reduce((e,t)=>e+(t.cost??0),0),h=0;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),d.length===0?(0,y.jsx)(l,{message:`No treatment entries planned`}):(0,y.jsx)(`div`,{className:`dtp-scroll`,children:(0,y.jsxs)(`table`,{className:`dtp-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`dtp-th`,children:`Tooth`}),(0,y.jsx)(`th`,{className:`dtp-th dtp-th-proc`,children:`Procedure`}),(0,y.jsx)(`th`,{className:`dtp-th`,children:`Priority`}),(0,y.jsx)(`th`,{className:`dtp-th`,children:`Status`}),(0,y.jsx)(`th`,{className:`dtp-th dtp-th-num`,children:`Cost`})]})}),(0,y.jsx)(`tbody`,{children:f.map(e=>(0,y.jsxs)(m.Fragment,{children:[(0,y.jsxs)(`tr`,{className:`dtp-visit-row`,children:[(0,y.jsx)(`td`,{className:`dtp-visit-head`,colSpan:4,children:e.visit}),(0,y.jsx)(`td`,{className:`dtp-visit-subtotal tab-num`,children:s(e.subtotal,{currency:`USD`,decimals:0})})]}),e.rows.map(t=>{let n=h++;return(0,y.jsxs)(`tr`,{className:`dtp-row m-stagger-item m-fade-rise`,style:{"--i":n},children:[(0,y.jsx)(`td`,{className:`dtp-tooth`,children:t.entry.tooth||`—`}),(0,y.jsxs)(`td`,{className:`dtp-proc`,children:[t.entry.procedure,t.entry.surface&&(0,y.jsxs)(`span`,{className:`dtp-surface`,children:[` · `,t.entry.surface]})]}),(0,y.jsx)(`td`,{children:(0,y.jsx)(`span`,{className:`dtp-priority`,style:{"--dtp-c":Ct[t.priority]},children:t.priority})}),(0,y.jsx)(`td`,{children:(0,y.jsx)(`span`,{className:`dtp-status`,style:{"--dtp-c":Et(t.entry.status)},children:t.entry.status||`—`})}),(0,y.jsx)(`td`,{className:`dtp-num tab-num`,children:t.cost==null?`—`:s(t.cost,{currency:`USD`,decimals:0})})]},`${e.visit}-${n}`)})]},e.visit))}),(0,y.jsx)(`tfoot`,{children:(0,y.jsxs)(`tr`,{className:`dtp-total-row`,children:[(0,y.jsx)(`td`,{className:`dtp-total-label`,colSpan:4,children:`Total plan cost`}),(0,y.jsx)(`td`,{className:`dtp-total-val tab-num`,children:s(p,{currency:`USD`,decimals:0})})]})})]})}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var kt=new Set([`yea`,`nay`,`present`,`absent`]),At={yea:`var(--insight)`,nay:`var(--danger)`,present:`var(--warning)`,absent:`var(--text-muted)`},jt={yea:`✓`,nay:`✕`,present:`•`,absent:`–`},Mt={yea:`Yea`,nay:`Nay`,present:`Present`,absent:`Absent`},Nt=[`yea`,`nay`,`present`,`absent`];function Pt(e){return typeof e==`string`&&kt.has(e)?e:`absent`}var Ft=[`var(--presence)`,`var(--presence-deep)`,`var(--insight-soft)`,`var(--warning-soft)`,`var(--presence-soft)`];function It(e){if(!e)return`var(--text-muted)`;let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return Ft[t%Ft.length]}function Lt({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,bill:r,legislators:o,footer:s,delay:c}){let u=i[t]||i.chart,d=(Array.isArray(o)?o:[]).filter(e=>typeof e?.name==`string`&&e.name.trim().length>0).map(e=>({leg:e,name:e.name,party:typeof e.party==`string`?e.party.trim():``,vote:Pt(e.vote)})),f=(0,m.useMemo)(()=>{let e={yea:0,nay:0,present:0,absent:0};for(let t of d)e[t.vote]++;return e},[d]),p=Math.max(1,d.length);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,y.jsx)(`div`,{className:`rc-bill`,children:r}),d.length===0?(0,y.jsx)(l,{message:`No votes recorded`}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`rc-tally`,children:[(0,y.jsx)(`div`,{className:`rc-tally-bar`,children:Nt.filter(e=>f[e]>0).map(e=>(0,y.jsx)(`div`,{className:`rc-tally-seg`,style:{width:`${f[e]/p*100}%`,background:At[e]},title:`${Mt[e]}: ${f[e]}`},e))}),(0,y.jsx)(`div`,{className:`rc-tally-labels`,children:Nt.map(e=>(0,y.jsxs)(`span`,{className:`rc-tally-label`,style:{"--rc-c":At[e]},children:[(0,y.jsx)(`span`,{className:`rc-tally-dot`}),` `,f[e],` `,Mt[e]]},e))})]}),(0,y.jsx)(`div`,{className:`rc-scroll`,children:(0,y.jsxs)(`table`,{className:`rc-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`rc-th`,children:`Legislator`}),(0,y.jsx)(`th`,{className:`rc-th`,children:`Party`}),(0,y.jsx)(`th`,{className:`rc-th rc-th-vote`,children:`Vote`})]})}),(0,y.jsx)(`tbody`,{children:d.map((e,t)=>(0,y.jsxs)(`tr`,{className:`rc-row m-stagger-item m-fade-rise`,style:{"--i":t,"--rc-party":It(e.party)},children:[(0,y.jsx)(`td`,{className:`rc-name`,children:e.name}),(0,y.jsx)(`td`,{className:`rc-party`,children:e.party||`—`}),(0,y.jsx)(`td`,{className:`rc-vote-cell`,children:(0,y.jsxs)(`span`,{className:`rc-vote`,style:{"--rc-c":At[e.vote]},children:[(0,y.jsx)(`span`,{className:`rc-vote-glyph`,children:jt[e.vote]}),Mt[e.vote]]})})]},`${e.name}-${t}`))})]})})]}),s&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var Rt=new Set([`mint`,`good`,`fair`]),zt={mint:`var(--insight)`,good:`var(--presence)`,fair:`var(--warning)`};function Bt(e){return typeof e==`string`&&Rt.has(e)?e:null}function Vt(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Ht({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,items:r,footer:o,delay:c}){let u=i[t]||i.layers,d=(Array.isArray(r)?r:[]).filter(e=>typeof e?.name==`string`&&e.name.trim().length>0),f=d.reduce((e,t)=>e+(Vt(t.value)??0),0),p=d.filter(e=>Vt(e.value)!=null).length;return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),d.length===0?(0,y.jsx)(l,{message:`No items in this collection yet`}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`ctk-summary`,children:[(0,y.jsxs)(`div`,{className:`ctk-summary-stat`,children:[(0,y.jsx)(`span`,{className:`ctk-summary-val tab-num`,children:d.length}),(0,y.jsx)(`span`,{className:`ctk-summary-label`,children:d.length===1?`item`:`items`})]}),p>0&&(0,y.jsxs)(`div`,{className:`ctk-summary-stat`,children:[(0,y.jsx)(`span`,{className:`ctk-summary-val ctk-summary-total tab-num`,children:s(f,{currency:`USD`,decimals:0})}),(0,y.jsx)(`span`,{className:`ctk-summary-label`,children:`estimated value`})]})]}),(0,y.jsx)(`div`,{className:`ctk-grid`,children:d.map((e,t)=>{let n=Bt(e.condition),r=Vt(e.value);return(0,y.jsxs)(`div`,{className:`ctk-card m-stagger-item m-scale-in`,style:{"--i":t},children:[(0,y.jsxs)(`div`,{className:`ctk-card-top`,children:[(0,y.jsx)(`span`,{className:`ctk-name`,title:e.name,children:e.name}),n&&(0,y.jsx)(`span`,{className:`ctk-condition`,style:{"--ctk-c":zt[n]},children:n})]}),e.acquiredDate&&(0,y.jsx)(`div`,{className:`ctk-date`,children:e.acquiredDate}),r!=null&&(0,y.jsx)(`div`,{className:`ctk-value tab-num`,children:s(r,{currency:`USD`,decimals:0})}),e.notes&&(0,y.jsx)(`div`,{className:`ctk-notes`,children:e.notes})]},`${e.name}-${t}`)})})]}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function Q(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Ut(e){let t=s(Math.abs(e),{currency:`USD`,decimals:0});return e<0?`(${t})`:e>0?`+${t}`:t}function Wt({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,subject:r,comps:o,suggestedListPrice:c,footer:u,delay:d}){let f=i[t]||i.chart,p=r&&typeof r==`object`?r:{},m=Q(p.beds),h=Q(p.baths),g=Q(p.sqft),_=Q(p.yearBuilt),v=(Array.isArray(o)?o:[]).filter(e=>typeof e?.address==`string`&&e.address.trim().length>0).map(e=>{let t=Q(e.soldPrice),n=(Array.isArray(e.adjustments)?e.adjustments:[]).filter(e=>typeof e?.label==`string`&&e.label.trim().length>0).map(e=>({adj:e,amount:Q(e.amount)})),r=n.reduce((e,t)=>e+(t.amount??0),0);return{comp:e,soldPrice:t,sqft:Q(e.sqft),distance:Q(e.distance),adjustments:n,adjustedPrice:t==null?null:t+r}}),b=c&&typeof c==`object`?c:{},x=Q(b.low),S=Q(b.high),C=Q(b.point),w=[{label:`Beds`,value:m==null?`—`:String(m)},{label:`Baths`,value:h==null?`—`:String(h)},{label:`Sqft`,value:g==null?`—`:s(g)},{label:`Year built`,value:_==null?`—`:String(_)}];return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(d||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),typeof p.address==`string`&&p.address&&(0,y.jsx)(`div`,{className:`cma-subject-addr`,children:p.address}),(0,y.jsx)(`div`,{className:`cma-summary`,children:w.map(e=>(0,y.jsxs)(`div`,{className:`cma-field`,children:[(0,y.jsx)(`span`,{className:`cma-field-label`,children:e.label}),(0,y.jsx)(`span`,{className:`cma-field-value`,children:e.value})]},e.label))}),v.length===0?(0,y.jsx)(l,{message:`No comparable sales to show`}):(0,y.jsx)(`div`,{className:`cma-scroll`,children:(0,y.jsxs)(`table`,{className:`cma-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`cma-th cma-th-addr`,children:`Comparable`}),(0,y.jsx)(`th`,{className:`cma-th cma-th-num`,children:`Sold price`}),(0,y.jsx)(`th`,{className:`cma-th`,children:`Sold date`}),(0,y.jsx)(`th`,{className:`cma-th cma-th-num`,children:`Sqft`}),(0,y.jsx)(`th`,{className:`cma-th cma-th-num`,children:`Dist.`}),(0,y.jsx)(`th`,{className:`cma-th`,children:`Adjustments`}),(0,y.jsx)(`th`,{className:`cma-th cma-th-num`,children:`Adjusted price`})]})}),(0,y.jsx)(`tbody`,{children:v.map((e,t)=>(0,y.jsxs)(`tr`,{className:`cma-row m-stagger-item m-fade-rise`,children:[(0,y.jsx)(`td`,{className:`cma-addr`,children:e.comp.address}),(0,y.jsx)(`td`,{className:`cma-num tab-num`,children:e.soldPrice==null?`—`:s(e.soldPrice,{currency:`USD`,decimals:0})}),(0,y.jsx)(`td`,{className:`cma-date`,children:e.comp.soldDate||`—`}),(0,y.jsx)(`td`,{className:`cma-num tab-num`,children:e.sqft==null?`—`:s(e.sqft)}),(0,y.jsx)(`td`,{className:`cma-num tab-num`,children:e.distance==null?`—`:`${s(e.distance,{decimals:1})} mi`}),(0,y.jsx)(`td`,{className:`cma-adj`,children:e.adjustments.length===0?(0,y.jsx)(`span`,{className:`cma-adj-none`,children:`—`}):(0,y.jsx)(`ul`,{className:`cma-adj-list`,children:e.adjustments.map((e,t)=>(0,y.jsxs)(`li`,{className:`cma-adj-item`,children:[(0,y.jsx)(`span`,{className:`cma-adj-label`,children:e.adj.label}),e.amount!=null&&e.amount!==0&&(0,y.jsx)(`span`,{className:`cma-adj-amt tab-num ${e.amount<0?`neg`:`pos`}`,children:Ut(e.amount)})]},t))})}),(0,y.jsx)(`td`,{className:`cma-num cma-adjusted tab-num`,children:e.adjustedPrice==null?`—`:s(e.adjustedPrice,{currency:`USD`,decimals:0})})]},`${e.comp.address}-${t}`))})]})}),(0,y.jsxs)(`div`,{className:`cma-banner`,children:[(0,y.jsx)(`span`,{className:`cma-banner-label`,children:`Suggested list price`}),x!=null&&S!=null?(0,y.jsxs)(`span`,{className:`cma-banner-value tab-num`,children:[s(x,{currency:`USD`,decimals:0}),` – `,s(S,{currency:`USD`,decimals:0}),C!=null&&(0,y.jsxs)(`span`,{className:`cma-banner-point`,children:[` `,`· point `,s(C,{currency:`USD`,decimals:0})]})]}):(0,y.jsx)(`span`,{className:`cma-banner-value cma-banner-empty`,children:`Not yet estimated`})]}),u&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}function Gt(e){let t=s(Math.abs(e),{currency:`USD`,decimals:0});return e<0?`(${t})`:t}function Kt(e){return typeof e==`number`&&Number.isFinite(e)?e:0}function qt(e){return e===`subtotal`||e===`total`?e:`line`}var Jt=new Set([`refund`,`owed`]);function Yt(e){return typeof e==`string`&&Jt.has(e)?e:`owed`}function Xt({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,filingStatus:r,taxYear:o,rows:c,refundOrOwed:u,footer:d,delay:f}){let p=i[t]||i.doc,m=(Array.isArray(c)?c:[]).filter(e=>typeof e?.label==`string`&&e.label.trim().length>0),h=u&&typeof u==`object`?u:{},g=Kt(h.amount),_=Yt(h.direction),v=[r,o!=null&&o!==``?`Tax year ${o}`:``].filter(Boolean).join(` · `);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(f||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:v?4:14},children:[(0,y.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),v&&(0,y.jsx)(`div`,{className:`trs-cap`,children:v}),m.length===0?(0,y.jsx)(l,{message:`No return lines to show`}):(0,y.jsx)(`div`,{className:`trs-scroll`,children:(0,y.jsx)(`table`,{className:`trs-tbl`,children:(0,y.jsx)(`tbody`,{children:m.map((e,t)=>{let n=qt(e.kind),r=Math.max(0,e.indent||0),i=Kt(e.amount);return(0,y.jsxs)(`tr`,{className:`trs-row trs-${n}`,children:[(0,y.jsx)(`td`,{className:`trs-label`,style:{paddingLeft:2+r*14},children:e.label}),(0,y.jsx)(`td`,{className:`trs-val tab-num ${i<0?`neg`:``}`,children:Gt(i)})]},t)})})})}),(0,y.jsxs)(`div`,{className:`trs-banner trs-banner-${_}`,children:[(0,y.jsx)(`span`,{className:`trs-banner-label`,children:_===`refund`?`Refund`:`Amount owed`}),(0,y.jsx)(`span`,{className:`trs-banner-val tab-num`,children:s(g,{currency:`USD`,decimals:0})})]}),d&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(d)})]})}function $(e){return typeof e==`number`&&Number.isFinite(e)?s(e,{currency:`USD`,decimals:0}):`—`}function Zt({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,assetDescription:r,cost:o,method:s,usefulLife:c,annualDepreciation:u,rows:d,footer:f,delay:p}){let m=i[t]||i.table,h=(Array.isArray(d)?d:[]).filter(e=>typeof e?.period==`string`&&e.period.trim().length>0),g=h.length-1,_=[{label:`Cost basis`,value:$(o)},{label:`Method`,value:typeof s==`string`&&s?s:`—`},{label:`Useful life`,value:c!=null&&c!==``?String(c):`—`},{label:`Annual depreciation`,value:$(u),highlight:!0}];return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(p||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,style:{marginBottom:r?4:14},children:[(0,y.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,y.jsx)(`div`,{className:`dep-cap`,children:r}),(0,y.jsx)(`div`,{className:`dep-summary`,children:_.map(e=>(0,y.jsxs)(`div`,{className:`dep-field${e.highlight?` highlight`:``}`,children:[(0,y.jsx)(`span`,{className:`dep-field-label`,children:e.label}),(0,y.jsx)(`span`,{className:`dep-field-value`,...e.highlight?{"data-mark":`underline`}:{},children:e.value})]},e.label))}),h.length===0?(0,y.jsx)(l,{message:`No schedule rows to show`}):(0,y.jsx)(`div`,{className:`dep-scroll`,children:(0,y.jsxs)(`table`,{className:`dep-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`dep-th`,children:`Period`}),(0,y.jsx)(`th`,{className:`dep-th dep-th-num`,children:`Beginning basis`}),(0,y.jsx)(`th`,{className:`dep-th dep-th-num`,children:`Depreciation`}),(0,y.jsx)(`th`,{className:`dep-th dep-th-num`,children:`Accumulated`}),(0,y.jsx)(`th`,{className:`dep-th dep-th-num`,children:`Ending basis`})]})}),(0,y.jsx)(`tbody`,{children:h.map((e,t)=>(0,y.jsxs)(`tr`,{className:`dep-row ${t===0||t===g?`edge`:``}`,children:[(0,y.jsx)(`td`,{className:`dep-period`,children:e.period}),(0,y.jsx)(`td`,{className:`dep-num tab-num`,children:$(e.beginningBasis)}),(0,y.jsx)(`td`,{className:`dep-num tab-num`,children:$(e.depreciationExpense)}),(0,y.jsx)(`td`,{className:`dep-num tab-num`,children:$(e.accumulatedDepreciation)}),(0,y.jsx)(`td`,{className:`dep-num dep-ending tab-num`,children:$(e.endingBasis)})]},t))})]})}),f&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}var Qt=new Set([`catering`,`venue`,`photo`,`av`,`decor`,`other`]),$t={catering:`cart`,venue:`layers`,photo:`image`,av:`speaker`,decor:`sparkle`,other:`doc`},en={catering:`Catering`,venue:`Venue`,photo:`Photo/Video`,av:`AV`,decor:`Decor`,other:`Other`};function tn(e){return typeof e==`string`&&Qt.has(e)?e:`other`}var nn=new Set([`inquired`,`booked`,`confirmed`]),rn={inquired:`var(--text-muted)`,booked:`var(--warning)`,confirmed:`var(--insight)`};function an(e){return typeof e==`string`&&nn.has(e)?e:`inquired`}function on(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function sn({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,vendors:r,footer:o,delay:c}){let u=i[t]||i.layers,d=(Array.isArray(r)?r:[]).filter(e=>typeof e?.name==`string`&&e.name.trim().length>0);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),d.length===0?(0,y.jsx)(l,{message:`No vendors tracked yet`}):(0,y.jsx)(`div`,{className:`vnd-list`,children:d.map((e,t)=>{let n=tn(e.category),r=an(e.status),a=i[$t[n]]||i.doc,o=on(e.depositAmount),c=on(e.balanceDue),l=e.depositPaid?o??0:0,u=(o??0)+(c??0),d=u>0?l/u*100:0,f=u>0?100-d:0;return(0,y.jsxs)(`div`,{className:`vnd-row m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,y.jsx)(`div`,{className:`vnd-cat`,title:en[n],children:(0,y.jsx)(a,{className:`ic`})}),(0,y.jsxs)(`div`,{className:`vnd-body`,children:[(0,y.jsxs)(`div`,{className:`vnd-top`,children:[(0,y.jsx)(`span`,{className:`vnd-name`,children:e.name}),(0,y.jsx)(`span`,{className:`vnd-catlabel`,children:en[n]}),(0,y.jsx)(`span`,{className:`vnd-spacer`}),(0,y.jsx)(`span`,{className:`vnd-status`,style:{"--vnd-c":rn[r]},children:r})]}),u>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`div`,{className:`vnd-track`,children:[(0,y.jsx)(`div`,{className:`vnd-fill-paid`,style:{width:`${d}%`}}),(0,y.jsx)(`div`,{className:`vnd-fill-due`,style:{width:`${f}%`}})]}),(0,y.jsxs)(`div`,{className:`vnd-money`,children:[o!=null&&(0,y.jsxs)(`span`,{className:`vnd-deposit`,children:[`Deposit `,s(o,{currency:`USD`,decimals:0}),e.depositPaid?` · paid`:` · unpaid`]}),c!=null&&(0,y.jsxs)(`span`,{className:`vnd-balance`,children:[`Balance `,s(c,{currency:`USD`,decimals:0}),e.dueDate?` due ${e.dueDate}`:``]}),e.contractSigned&&(0,y.jsx)(`span`,{className:`vnd-contract`,children:`Contract signed`})]})]})]})]},`${e.name}-${t}`)})}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var cn=new Set([`pitched`,`negotiating`,`contracted`,`delivered`,`paid`]),ln={pitched:`var(--text-muted)`,negotiating:`var(--warning)`,contracted:`var(--presence)`,delivered:`var(--presence-soft)`,paid:`var(--insight)`};function un(e){return typeof e==`string`&&cn.has(e)?e:`pitched`}function dn(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function fn({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,deals:r,footer:o,delay:c}){let u=i[t]||i.spark,d=(Array.isArray(r)?r:[]).filter(e=>typeof e?.brand==`string`&&e.brand.trim().length>0);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(c||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),d.length===0?(0,y.jsx)(l,{message:`No sponsorship deals tracked yet`}):(0,y.jsx)(`div`,{className:`spn-scroll`,children:(0,y.jsxs)(`table`,{className:`spn-table`,children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`spn-th`,children:`Brand`}),(0,y.jsx)(`th`,{className:`spn-th`,children:`Deliverable`}),(0,y.jsx)(`th`,{className:`spn-th spn-th-num`,children:`Rate`}),(0,y.jsx)(`th`,{className:`spn-th`,children:`Status`}),(0,y.jsx)(`th`,{className:`spn-th`,children:`Date`})]})}),(0,y.jsx)(`tbody`,{children:d.map((e,t)=>{let n=un(e.status),r=dn(e.rate),i=n===`paid`,a=typeof e.currency==`string`&&e.currency.trim()?e.currency:`USD`;return(0,y.jsxs)(`tr`,{className:`spn-row m-stagger-item m-fade-rise ${i?`paid`:`unpaid`}`,style:{"--i":t},children:[(0,y.jsx)(`td`,{className:`spn-brand`,children:e.brand}),(0,y.jsx)(`td`,{className:`spn-deliverable`,children:e.deliverable||`—`}),(0,y.jsx)(`td`,{className:`spn-rate tab-num`,children:r==null?`—`:s(r,{currency:a,decimals:0})}),(0,y.jsx)(`td`,{children:(0,y.jsx)(`span`,{className:`spn-status`,style:{"--spn-c":ln[n]},children:n})}),(0,y.jsx)(`td`,{className:`spn-date`,children:n===`paid`&&e.paidDate?`Paid ${e.paidDate}`:e.dueDate?`Due ${e.dueDate}`:`—`})]},`${e.brand}-${t}`)})})]})}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var pn=new Set([`low`,`medium`,`high`]),mn={low:`var(--insight)`,medium:`var(--warning)`,high:`var(--danger)`};function hn(e){return typeof e==`string`&&pn.has(e)?e:null}function gn({title:e,icon:t=`shield`,iconColor:n=`var(--presence)`,cases:r,footer:o,delay:s}){let c=i[t]||i.shield,u=(Array.isArray(r)?r:[]).filter(e=>typeof e?.clientRef==`string`&&e.clientRef.trim().length>0);return(0,y.jsxs)(`div`,{className:`card reveal tbl`,style:{"--delay":(s||0)+`ms`},children:[(0,y.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,y.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),u.length===0?(0,y.jsx)(l,{message:`No cases on this list`}):(0,y.jsx)(`div`,{className:`csl-list`,children:u.map((e,t)=>{let n=hn(e.riskLevel);return(0,y.jsxs)(`div`,{className:`csl-row m-stagger-item m-fade-rise`,style:{"--i":t,"--csl-c":n?mn[n]:`var(--line-strong)`},children:[(0,y.jsx)(`div`,{className:`csl-risk-bar`}),(0,y.jsxs)(`div`,{className:`csl-body`,children:[(0,y.jsxs)(`div`,{className:`csl-top`,children:[(0,y.jsx)(`span`,{className:`csl-ref`,children:e.clientRef}),(0,y.jsx)(`span`,{className:`csl-status`,children:e.status||`—`}),(0,y.jsx)(`span`,{className:`csl-spacer`}),n?(0,y.jsxs)(`span`,{className:`csl-riskbadge`,children:[n,` risk`]}):(0,y.jsx)(`span`,{className:`csl-riskbadge csl-unscored`,children:`unscored`})]}),(0,y.jsxs)(`div`,{className:`csl-meta`,children:[e.nextContact&&(0,y.jsxs)(`span`,{className:`csl-contact`,children:[`Next contact `,e.nextContact]}),e.note&&(0,y.jsx)(`span`,{className:`csl-note`,children:e.note})]})]})]},`${e.clientRef}-${t}`)})}),o&&(0,y.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}var _n=e({tablesRegistry:()=>vn}),vn={matrix:f(me),datatable:f(x),pivot:f(S),leaderboard:f(T),treetable:f(k),swimlane:f(A),footnotetable:f(j),sparktable:f(I),smallmultiples:f(re),comparebars:f(ie),comparematrix:f(de),matrixgrid:f(fe),sensitivitytable:f(ge),labpanel:f(ve),ingredientmatrix:f(ye),conjugation:f(be),clearancematrix:f(Se),financialstatement:f(we),cohortgrid:f(Te),riskmatrix:f(ke),careplan:f(je),doseladder:f(Me),sizechart:f(Ne),pricingtable:f(Ie),raci:f(Re),rubric:f(ze),interviewscorecard:f(Ve),gradebook:f(He),datadictionary:f(Ye),ablationtable:f($e),spectrumtable:f(nt),fmeatable:f(ot),billofmaterials:f(lt),complexitysummary:f(ut),expressionheatmap:f(pt),discoverytracker:f(xt),dentaltreatmentplan:f(Ot),rollcall:f(Lt),collectiontracker:f(Ht),cma:f(Wt),taxreturnsummary:f(Xt),depreciationschedule:f(Zt),vendortracker:f(sn),sponsorshiptracker:f(fn),caseload:f(gn)};export{vn as n,_n as t};
@@ -1 +0,0 @@
1
- .fs-subject{font-size:var(--fs-md,15px);color:var(--text-primary);margin-bottom:4px;font-weight:700}.fs-tagline{font-size:var(--fs-sm,13px);color:var(--text-secondary);margin-bottom:12px;line-height:1.5}.fs-facts{flex-direction:column;gap:0;display:flex}.fs-row{border-bottom:1px solid var(--grid-line);align-items:baseline;gap:12px;padding:8px 0;display:flex}.fs-row:last-child{border-bottom:none}.fs-label{font-size:var(--fs-xs,12px);color:var(--text-muted);flex-shrink:0;min-width:90px;font-weight:600}.fs-value{font-size:var(--fs-sm,13px);color:var(--text-primary);flex:1;line-height:1.45}.fs-note{font-size:var(--fs-xs,11px);color:var(--text-faint);font-style:italic}.fs-body{font-size:var(--fs-sm,13px);color:var(--text-primary);margin-top:12px;line-height:1.6}.nd-meta{flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px;display:flex}.nd-topic{font-size:var(--fs-sm,13px);color:var(--text-primary);font-weight:600}.nd-asof{font-size:var(--fs-xs,11px);color:var(--text-faint)}.nd-items{flex-direction:column;gap:0;display:flex}.nd-item{border-bottom:1px solid var(--grid-line);padding:10px 0}.nd-item:last-child{border-bottom:none}.nd-headline{font-size:var(--fs-sm,14px);color:var(--text-primary);font-weight:600;line-height:1.4}.nd-item-meta{flex-wrap:wrap;align-items:center;gap:8px;margin-top:3px;display:flex}.nd-source{font-size:var(--fs-xs,11px);color:var(--presence);font-weight:600}.nd-time{font-size:var(--fs-xs,11px);color:var(--text-faint)}.nd-cat{font-size:var(--fs-2xs);border-radius:var(--r-full);background:var(--track);color:var(--text-muted);padding:1px 6px;font-weight:700}.nd-summary{font-size:var(--fs-xs,12px);color:var(--text-secondary);margin-top:5px;line-height:1.5}.dc-word{font-size:var(--fs-lg,24px);color:var(--text-primary);margin-bottom:2px;font-weight:800}.dc-phonetic{font-size:var(--fs-sm,14px);color:var(--text-muted);margin-bottom:10px;font-style:italic}.dc-senses{flex-direction:column;gap:14px;margin-top:10px;display:flex}.dc-pos{font-size:var(--fs-xs,11px);color:var(--presence);text-transform:uppercase;letter-spacing:.07em;margin-bottom:4px;font-weight:700;display:inline-block}.dc-def{font-size:var(--fs-sm,13px);color:var(--text-primary);line-height:1.55}.dc-example{font-size:var(--fs-xs,12px);color:var(--text-secondary);border-left:2px solid var(--line-strong);margin-top:4px;padding-left:10px;font-style:italic}.dc-synonyms{font-size:var(--fs-xs,11px);color:var(--text-muted);margin-top:6px}.dc-etymology{font-size:var(--fs-xs,12px);color:var(--text-secondary);border-top:1px solid var(--line);margin-top:14px;padding-top:10px;font-style:italic;line-height:1.5}.tl-langs{font-size:var(--fs-xs,12px);color:var(--text-muted);align-items:center;gap:8px;margin-bottom:12px;font-weight:600;display:flex}.tl-from{color:var(--text-secondary)}.tl-arrow,.tl-to{color:var(--presence)}.tl-pair{border:1px solid var(--line);border-radius:var(--r-md);grid-template-columns:1fr 1fr;gap:0;display:grid;overflow:hidden}.tl-source{background:var(--surface-glass);padding:12px}.tl-result{border-left:1px solid var(--line);padding:12px}.tl-text{font-size:var(--fs-sm,14px);color:var(--text-primary);line-height:1.6}.tl-breakdowns{flex-direction:column;gap:0;margin-top:12px;display:flex}.tl-bp{border-bottom:1px solid var(--grid-line);font-size:var(--fs-xs,12px);gap:12px;padding:7px 0;display:flex}.tl-bp:last-child{border-bottom:none}.tl-bp-orig{color:var(--text-secondary);flex:1;font-style:italic}.tl-bp-trans{color:var(--text-primary);flex:1;font-weight:500}.tl-bp-note{color:var(--text-faint)}.pr-word{font-size:var(--fs-lg,22px);color:var(--text-primary);font-weight:800}.pr-ipa{font-size:var(--fs-md,16px);color:var(--text-muted);margin-top:4px;font-style:italic}.pr-syllables{font-size:var(--fs-sm,14px);color:var(--presence);letter-spacing:.08em;margin-top:4px;font-weight:600}.pr-tips{flex-direction:column;gap:6px;margin-top:14px;display:flex}.pr-tip{font-size:var(--fs-xs,12px);color:var(--text-secondary);align-items:flex-start;gap:8px;line-height:1.5;display:flex}.pr-tip:before{content:"→";color:var(--presence);flex-shrink:0}.gl-domain{font-size:var(--fs-xs,11px);color:var(--text-muted);background:var(--track);border-radius:var(--r-full);letter-spacing:.04em;margin-bottom:12px;padding:2px 10px;font-weight:600;display:inline-block}.gl-entries{flex-direction:column;gap:0;display:flex}.gl-letter-divider{font-size:var(--fs-xs,11px);color:var(--text-faint);letter-spacing:.1em;padding:8px 0 2px;font-weight:700;line-height:1}.gl-entries>div:first-child .gl-letter-divider{padding-top:0}.gl-entry{border-bottom:1px solid var(--grid-line);padding:9px 0}.gl-entry:last-child{border-bottom:none}.gl-term{font-size:var(--fs-md);color:var(--text-primary);font-weight:700}.gl-def{font-size:var(--fs-sm);color:var(--text-secondary);margin-top:3px;line-height:1.55}.gl-see{font-size:var(--fs-xs,11px);color:var(--text-faint);margin-top:4px}.scf-figure{flex-wrap:wrap;align-items:baseline;gap:6px;margin-bottom:14px;display:flex}.scf-value{font-size:var(--fs-xl,22px);color:var(--text-primary);letter-spacing:-.01em;font-weight:800;line-height:1.05}.scf-unit{font-size:var(--fs-sm,13px);color:var(--text-muted);font-weight:600}.scf-rows{flex-direction:column;gap:0;display:flex}.scf-row{border-bottom:1px solid var(--grid-line);padding:10px 0}.scf-row:last-child{border-bottom:none}.scf-line{flex-wrap:wrap;align-items:baseline;gap:6px;line-height:1.4;display:flex}.scf-count{font-size:var(--fs-sm,14px);color:var(--presence);flex-shrink:0;font-weight:800}.scf-to{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere}.scf-track{border-radius:var(--r-full,999px);background:var(--track);height:5px;margin-top:7px;overflow:hidden}.scf-bar{border-radius:var(--r-full,999px);background:color-mix(in oklab, var(--presence) 78%, transparent);height:100%;transition:width var(--m-fast,.22s) var(--ease-out,ease)}.scf-note{font-size:var(--fs-xs,11px);color:var(--text-faint);margin-top:5px;font-style:italic;line-height:1.5}.hri-rows{flex-direction:column;gap:0;margin:4px 0 0;padding:0;list-style:none;display:flex}.hri-row{border-bottom:1px solid var(--grid-line);align-items:center;gap:12px;min-width:0;padding:9px 0;display:flex}.hri-row:last-child{border-bottom:none}.hri-play{border-radius:var(--r-full,999px);border:1px solid var(--line-strong);background:var(--surface-glass);width:34px;height:34px;color:var(--presence);cursor:pointer;transition:background var(--m-fast,.16s) var(--ease-out,ease), border-color var(--m-fast,.16s) var(--ease-out,ease), transform var(--m-fast,.16s) var(--ease-out,ease);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.hri-play:hover:not(:disabled){background:color-mix(in oklab, var(--presence) 12%, transparent);border-color:var(--presence)}.hri-play:active:not(:disabled){transform:scale(.92)}.hri-play:focus-visible{outline:2px solid var(--presence);outline-offset:2px}.hri-play:disabled{cursor:not-allowed;opacity:.45;color:var(--text-muted)}.hri-play-ic{margin-left:1px}.hri-row[data-playing] .hri-play{background:color-mix(in oklab, var(--presence) 16%, transparent);border-color:var(--presence)}.hri-wave{align-items:flex-end;gap:2px;height:13px;display:inline-flex}.hri-wave>span{transform-origin:bottom;width:3px;height:100%;animation:hri-bounce .7s var(--ease-out,ease) infinite;background:currentColor;border-radius:1px}.hri-wave>span:nth-child(2){animation-delay:.18s}.hri-wave>span:nth-child(3){animation-delay:.36s}@keyframes hri-bounce{0%,to{transform:scaleY(.35)}50%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){.hri-wave>span{animation:none;transform:scaleY(.7)}}.hri-body{flex:1;min-width:0}.hri-label{font-size:var(--fs-sm,14px);color:var(--text-primary);overflow-wrap:anywhere;font-weight:600;line-height:1.35}.hri-sub{font-size:var(--fs-xs,12px);color:var(--text-secondary);overflow-wrap:anywhere;margin-top:2px;line-height:1.4}.hri-kind{font-size:var(--fs-2xs,10px);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);background:var(--track);border-radius:var(--r-full,999px);flex-shrink:0;align-items:center;gap:4px;padding:2px 8px;font-weight:700;display:inline-flex}.hri-kind-ic{color:var(--text-muted)}.ipa-caption{font-size:var(--fs-xs,12px);color:var(--text-secondary);margin-top:10px;line-height:1.5}.ipa-quad{margin-top:6px;max-width:360px;margin-inline:auto}.ipa-axis{letter-spacing:.04em;fill:var(--text-muted);text-transform:uppercase;font-size:4px;font-weight:700}.ipa-vowel{fill:var(--text-secondary);font-size:6px;font-weight:600;font-family:var(--font-mono,ui-monospace, monospace)}.ipa-vowel[data-hot]{fill:var(--presence);font-weight:800}.ipa-vowel-halo{fill:color-mix(in oklab, var(--presence) 16%, transparent);stroke:color-mix(in oklab, var(--presence) 55%, transparent);stroke-width:.6px}.ipa-examples{flex-wrap:wrap;gap:8px;margin:12px 0 0;padding:0;list-style:none;display:flex}.ipa-ex{border:1px solid var(--line);border-radius:var(--r-full,999px);background:var(--surface-elevated);align-items:baseline;gap:6px;min-width:0;padding:4px 10px;display:inline-flex}.ipa-ex[data-hot]{border-color:color-mix(in oklab, var(--presence) 55%, transparent);background:color-mix(in oklab, var(--presence) 9%, transparent)}.ipa-ex-sym{font-family:var(--font-mono,ui-monospace, monospace);font-size:var(--fs-sm,13px);color:var(--presence);flex-shrink:0;font-weight:700}.ipa-ex-word{font-size:var(--fs-xs,12px);color:var(--text-secondary);overflow-wrap:anywhere;min-width:0}.ipa-cgrid-wrap{max-width:100%;margin-top:6px;overflow-x:auto}.ipa-cgrid{border-collapse:collapse;table-layout:fixed;width:100%}.ipa-cgrid th,.ipa-cgrid td{border:1px solid var(--grid-line);text-align:center;vertical-align:middle;padding:5px 2px}.ipa-cgrid-corner{background:0 0;border:none}.ipa-cgrid-place{font-size:var(--fs-2xs,10px);color:var(--text-muted);letter-spacing:.02em;font-weight:700;line-height:1.2}.ipa-cgrid-manner{font-size:var(--fs-2xs,10px);color:var(--text-muted);text-align:left;white-space:nowrap;padding-left:4px;font-weight:700}.ipa-cgrid-cell{background:var(--surface-elevated)}.ipa-cgrid-pair{justify-content:center;gap:5px;display:inline-flex}.ipa-cgrid-sym{font-family:var(--font-mono,ui-monospace, monospace);font-size:var(--fs-sm,13px);color:var(--text-primary);font-weight:600}.ipa-cgrid-sym[data-hot]{color:var(--presence);background:color-mix(in oklab, var(--presence) 14%, transparent);border-radius:var(--r-sm,4px);padding:0 3px;font-weight:800}.ipa-cgrid-empty{color:var(--text-faint)}.ipa-cgrid-na{background:repeating-linear-gradient(-45deg, transparent, transparent 3px, color-mix(in oklab, var(--text-faint) 18%, transparent) 3px, color-mix(in oklab, var(--text-faint) 18%, transparent) 4px);opacity:.5;min-height:16px;display:block}.ss-stage{flex-wrap:wrap;align-items:stretch;gap:16px;margin-top:4px;display:flex}.ss-square{flex:none;width:144px;max-width:100%}.ss-ghost{fill:color-mix(in oklab, var(--text-primary) 12%, transparent);font-size:60px;font-weight:500}.ss-glyph{fill:var(--text-primary);font-size:64px;font-weight:500}.ss-stroke{stroke:var(--presence);stroke-width:4px;stroke-dasharray:220;stroke-dashoffset:220px;animation:ss-draw .55s var(--ease-out,ease) forwards;animation-delay:calc(var(--i,0) * .4s)}@keyframes ss-draw{to{stroke-dashoffset:0}}@media (prefers-reduced-motion:reduce){.ss-stroke{stroke-dashoffset:0;animation:none}}.ss-badge-bg{fill:var(--presence)}.ss-badge-num{fill:var(--surface-elevated);font-size:5px;font-weight:800;font-family:var(--font-mono,ui-monospace, monospace)}.ss-meta{flex-direction:column;flex:1;justify-content:center;gap:8px;min-width:0;display:flex}.ss-glyph-sm{font-size:var(--fs-2xl,30px);color:var(--text-primary);font-weight:600;line-height:1}.ss-romanization,.ss-meaning{flex-direction:column;gap:1px;min-width:0;display:flex}.ss-meta-k{font-size:var(--fs-2xs,10px);letter-spacing:.07em;text-transform:uppercase;color:var(--text-muted);font-weight:700}.ss-meta-v{font-size:var(--fs-sm,14px);color:var(--text-primary);overflow-wrap:anywhere;min-width:0;font-weight:600}.ss-romanization .ss-meta-v{color:var(--presence)}.ss-count{font-size:var(--fs-xs,11px);color:var(--text-faint)}.ss-steps{flex-direction:column;gap:0;margin:14px 0 0;padding:0;list-style:none;display:flex}.ss-step{border-bottom:1px solid var(--grid-line);align-items:flex-start;gap:10px;min-width:0;padding:7px 0;display:flex}.ss-step:last-child{border-bottom:none}.ss-step-num{border-radius:var(--r-full,999px);background:color-mix(in oklab, var(--presence) 14%, transparent);width:20px;height:20px;color:var(--presence);font-size:var(--fs-2xs,11px);font-weight:800;font-family:var(--font-mono,ui-monospace, monospace);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.ss-step-hint{font-size:var(--fs-sm,13px);color:var(--text-secondary);overflow-wrap:anywhere;min-width:0;line-height:1.5}.pw-word{flex-wrap:wrap;align-items:stretch;gap:6px;margin-top:4px;display:flex}.pw-chunk{border:1.5px solid var(--line-strong);border-radius:var(--r-md,8px);background:var(--surface-elevated);min-width:38px;color:var(--text-primary);cursor:pointer;transition:background var(--m-fast,.16s) var(--ease-out,ease), border-color var(--m-fast,.16s) var(--ease-out,ease), transform var(--m-fast,.16s) var(--ease-out,ease);flex-direction:column;flex:none;justify-content:center;align-items:center;gap:2px;padding:8px 12px;display:inline-flex}.pw-chunk:hover:not(:disabled){background:color-mix(in oklab, var(--presence) 10%, transparent);border-color:var(--presence)}.pw-chunk:active:not(:disabled){transform:scale(.94)}.pw-chunk:focus-visible{outline:2px solid var(--presence);outline-offset:2px}.pw-chunk[data-playing]{background:color-mix(in oklab, var(--presence) 16%, transparent);border-color:var(--presence)}.pw-chunk-text{font-size:var(--fs-lg,22px);letter-spacing:.02em;font-weight:800;line-height:1}.pw-chunk-sound{font-family:var(--font-mono,ui-monospace, monospace);font-size:var(--fs-2xs,10px);color:var(--text-muted);font-weight:600;line-height:1}.pw-chunk[data-kind=digraph],.pw-chunk[data-kind=blend]{border-color:color-mix(in oklab, var(--presence) 55%, transparent);background:color-mix(in oklab, var(--presence) 9%, transparent)}.pw-chunk[data-kind=digraph] .pw-chunk-text,.pw-chunk[data-kind=blend] .pw-chunk-text{color:var(--presence)}.pw-chunk[data-kind=silent]{border-style:dashed;border-color:var(--line);cursor:default;background:0 0}.pw-chunk[data-kind=silent] .pw-chunk-text{color:var(--text-faint)}.pw-blend{border:1px solid var(--line-strong);border-radius:var(--r-full,999px);background:var(--surface-glass);max-width:100%;color:var(--presence);cursor:pointer;transition:background var(--m-fast,.16s) var(--ease-out,ease), border-color var(--m-fast,.16s) var(--ease-out,ease), transform var(--m-fast,.16s) var(--ease-out,ease);align-items:center;gap:8px;margin-top:12px;padding:7px 14px;display:inline-flex}.pw-blend:hover{background:color-mix(in oklab, var(--presence) 12%, transparent);border-color:var(--presence)}.pw-blend:active{transform:scale(.97)}.pw-blend:focus-visible{outline:2px solid var(--presence);outline-offset:2px}.pw-blend[data-playing]{background:color-mix(in oklab, var(--presence) 16%, transparent);border-color:var(--presence)}.pw-blend-ic{flex-shrink:0}.pw-blend-word{font-size:var(--fs-md,16px);color:var(--text-primary);overflow-wrap:anywhere;min-width:0;font-weight:700}.pw-wave{flex-shrink:0;align-items:flex-end;gap:2px;height:12px;display:inline-flex}.pw-wave>span{transform-origin:bottom;width:3px;height:100%;animation:pw-bounce .7s var(--ease-out,ease) infinite;background:currentColor;border-radius:1px}.pw-wave>span:nth-child(2){animation-delay:.18s}.pw-wave>span:nth-child(3){animation-delay:.36s}@keyframes pw-bounce{0%,to{transform:scaleY(.35)}50%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){.pw-wave>span{animation:none;transform:scaleY(.7)}}.pw-rhymes{flex-wrap:wrap;align-items:baseline;gap:8px;margin-top:14px;display:flex}.pw-rhymes-k{font-size:var(--fs-2xs,10px);letter-spacing:.07em;text-transform:uppercase;color:var(--text-muted);flex-shrink:0;font-weight:700}.pw-rhyme-list{flex-wrap:wrap;gap:6px;min-width:0;margin:0;padding:0;list-style:none;display:flex}.pw-rhyme{font-size:var(--fs-sm,13px);color:var(--text-secondary);border:1px solid var(--line);border-radius:var(--r-full,999px);background:var(--surface-elevated);overflow-wrap:anywhere;padding:3px 10px;font-weight:600}.sp-banner{isolation:isolate;aspect-ratio:16/7;border-radius:var(--r-md,8px);width:100%;margin-bottom:12px;position:relative;overflow:hidden}.sp-status{max-width:calc(100% - 16px);font-size:var(--fs-2xs,10px);letter-spacing:.05em;text-transform:uppercase;color:var(--text-primary);background:color-mix(in oklab, var(--surface-elevated) 82%, transparent);border:1px solid var(--line);border-radius:var(--r-full,999px);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);text-overflow:ellipsis;white-space:nowrap;padding:3px 10px;font-weight:700;position:absolute;top:8px;right:8px;overflow:hidden}.sp-common{font-size:var(--fs-lg,20px);color:var(--text-primary);font-weight:800;line-height:1.15}.sp-scientific{font-size:var(--fs-sm,13px);color:var(--text-muted);overflow-wrap:anywhere;margin-top:2px;font-style:italic}.sp-caption{font-size:var(--fs-xs,12px);color:var(--text-secondary);margin-top:8px;line-height:1.5}.sp-marks{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:14px;display:grid}.sp-mark{border:1px solid var(--line);border-radius:var(--r-sm,6px);background:var(--surface-elevated);flex-direction:column;gap:2px;min-width:0;padding:8px 10px;display:flex}.sp-mark-label{font-size:var(--fs-2xs,10px);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);font-weight:700}.sp-mark-value{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere;min-width:0;font-weight:600;line-height:1.4}.sp-lookalikes{border-top:1px solid var(--line);margin-top:14px;padding-top:12px}.sp-lookalikes-k{font-size:var(--fs-2xs,10px);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);align-items:center;gap:6px;font-weight:700;display:inline-flex}.sp-lookalikes-ic{color:var(--warning)}.sp-lookalike-list{flex-wrap:wrap;gap:6px;min-width:0;margin:8px 0 0;padding:0;list-style:none;display:flex}.sp-lookalike{font-size:var(--fs-sm,13px);color:var(--text-secondary);border:1px solid var(--line);border-radius:var(--r-full,999px);background:var(--surface-elevated);overflow-wrap:anywhere;padding:3px 10px;font-weight:600}.et-wrap{width:100%}.et-svg{width:100%;display:block;overflow:hidden}.et-box{fill:var(--surface-elevated);stroke-width:1.5px}.et-word-box{fill:var(--surface-elevated);stroke:var(--presence);stroke-width:2px}.et-word{fill:var(--text-primary);font-size:13px;font-weight:700}.et-form{fill:var(--text-primary);font-size:10px;font-weight:600}.et-lang{font-size:9px}.et-col-hdr{fill:var(--text-muted);text-transform:uppercase;letter-spacing:.06em;font-size:9px;font-weight:700}.et-note{font-size:var(--fs-xs,12px);color:var(--text-secondary);overflow-wrap:anywhere;margin:10px 0 0;line-height:1.45}.hc-cas{font-family:var(--font-mono,ui-monospace, monospace);font-size:var(--fs-xs,12px);color:var(--text-muted);margin-bottom:12px}.hc-signal{border-radius:var(--r-md,8px);background:color-mix(in oklab, var(--hc-c) 13%, var(--surface-glass));border:1px solid color-mix(in oklab, var(--hc-c) 34%, transparent);align-items:center;gap:8px;max-width:100%;margin-bottom:16px;padding:7px 16px 7px 12px;display:inline-flex}.hc-signal-icon{color:var(--hc-c);flex-shrink:0;display:inline-flex}.hc-signal-icon svg{width:16px;height:16px}.hc-signal-word{font-size:var(--fs-md,15px);letter-spacing:.05em;text-transform:uppercase;color:var(--hc-c);overflow-wrap:anywhere;font-weight:800}.hc-pictograms{flex-wrap:wrap;gap:12px 14px;margin-bottom:18px;display:flex}.hc-pic{flex-direction:column;flex-shrink:0;align-items:center;gap:4px;width:72px;display:flex}.hc-pic-glyph{flex-shrink:0;width:40px;height:40px}.hc-pic-label{font-size:var(--fs-2xs,10px);color:var(--text-muted);text-align:center;overflow-wrap:anywhere;font-weight:600;line-height:1.2}.hc-section{margin-top:16px}.hc-section-label{font-size:var(--fs-2xs,10px);letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:4px;font-weight:700}.hc-codes{flex-direction:column;gap:0;display:flex}.hc-code-row{border-bottom:1px solid var(--grid-line);align-items:baseline;gap:10px;min-width:0;padding:7px 0;display:flex}.hc-code-row:last-child{border-bottom:none}.hc-code{min-width:42px;font-family:var(--font-mono,ui-monospace, monospace);font-size:var(--fs-xs,11px);color:var(--text-primary);flex-shrink:0;font-weight:700}.hc-code-text{min-width:0;font-size:var(--fs-sm,13px);color:var(--text-secondary);overflow-wrap:anywhere;flex:1;line-height:1.45}.tb-wrap{max-width:100%;margin-top:4px;overflow-x:auto}.tb-table{border-collapse:collapse;width:100%;min-width:max-content}.tb-table th,.tb-table td{text-align:left;border-bottom:1px solid var(--grid-line);vertical-align:top;padding:7px 14px 7px 0}.tb-table th:last-child,.tb-table td:last-child{padding-right:0}.tb-table th{font-size:var(--fs-2xs,10px);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);white-space:nowrap;padding-top:0;font-weight:700}.tb-term-col{font-size:var(--fs-sm,13px);color:var(--text-primary);white-space:nowrap;font-weight:700}.tb-cell{font-size:var(--fs-sm,13px);color:var(--text-primary);min-width:110px}.tb-cell-text{overflow-wrap:anywhere;align-items:baseline;gap:6px;min-width:0;display:inline-flex}.tb-dot{border-radius:var(--r-full,999px);background:var(--tb-c,var(--text-faint));flex-shrink:0;align-self:center;width:7px;height:7px}.tb-dash{color:var(--text-faint)}.tb-flat{flex-direction:column;gap:0;margin:4px 0 0;padding:0;list-style:none;display:flex}.tb-flat-term{font-size:var(--fs-sm,13px);color:var(--text-primary);border-bottom:1px solid var(--grid-line);padding:7px 0;font-weight:600}.tb-flat-term:last-child{border-bottom:none}.tb-empty{font-size:var(--fs-sm,13px);color:var(--text-faint);font-style:italic}.ghs-diamond{fill:color-mix(in oklab, var(--danger) 9%, transparent);stroke:var(--danger);stroke-width:1.6px;stroke-linejoin:round}.ghs-symbol{fill:none;stroke:var(--danger);stroke-width:1.15px;stroke-linecap:round;stroke-linejoin:round}.ghs-symbol-fill{fill:var(--danger);stroke:none}.szc-empty{font-size:var(--fs-sm,13px);color:var(--text-faint);font-style:italic}.szc-scroll{max-width:100%;margin-top:8px;padding-bottom:2px;overflow-x:auto}.szc-row{align-items:flex-start;gap:20px;width:max-content;min-width:100%;display:flex}.szc-item{flex-direction:column;flex:none;align-items:center;min-width:64px;display:flex}.szc-shape-box{height:var(--szc-track-h,160px);border-bottom:2px solid var(--line-strong);background-image:repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px 22px);background-position:bottom;background-repeat:repeat-x;justify-content:center;align-items:flex-end;width:100%;display:flex}.szc-glyph-cut{opacity:.9}.szc-item-label{font-size:var(--fs-sm,13px);color:var(--text-primary);text-align:center;overflow-wrap:anywhere;max-width:120px;margin-top:8px;font-weight:700}.szc-item-value{font-size:var(--fs-xs,11px);color:var(--text-muted);text-align:center;margin-top:2px}.bcv-value{font-size:var(--fs-xl,22px);color:var(--text-primary);letter-spacing:-.01em;overflow-wrap:anywhere;margin-bottom:14px;font-weight:800}.bcv-rows{flex-direction:column;gap:0;display:flex}.bcv-row{border-bottom:1px solid var(--grid-line);padding:9px 0}.bcv-row:last-child{border-bottom:none}.bcv-row-head{align-items:baseline;gap:8px;margin-bottom:5px;display:flex}.bcv-label{font-size:var(--fs-sm,13px);color:var(--text-primary);font-weight:700}.bcv-radix{font-size:var(--fs-2xs,10px);color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;font-weight:600}.bcv-digits{font-family:var(--font-mono,ui-monospace, monospace);font-size:var(--fs-md,16px);flex-wrap:wrap;gap:1px;font-weight:700;display:flex}.bcv-digit{border-radius:var(--r-sm,4px);color:var(--text-primary);padding:2px 3px}.bcv-digit[data-group=a]{background:color-mix(in oklab, var(--presence) 12%, transparent)}.bcv-digit[data-group=b]{background:color-mix(in oklab, var(--presence) 4%, transparent)}.bcv-dash,.bcv-empty{color:var(--text-faint);font-style:italic;font-size:var(--fs-sm,13px)}.hp-head{align-items:center;gap:14px;margin-bottom:4px;display:flex}.hp-medallion{border-radius:var(--r-full,999px);width:52px;height:52px;font-size:var(--fs-md,16px);letter-spacing:.02em;color:var(--presence);background:color-mix(in oklab, var(--presence) 14%, transparent);border:1px solid color-mix(in oklab, var(--presence) 30%, transparent);flex-shrink:0;justify-content:center;align-items:center;font-weight:800;display:flex}.hp-headline{min-width:0}.hp-name{font-size:var(--fs-lg,20px);color:var(--text-primary);overflow-wrap:anywhere;font-weight:800;line-height:1.15}.hp-era{font-size:var(--fs-sm,13px);color:var(--presence);margin-top:1px;font-weight:600}.hp-known{font-size:var(--fs-xs,12px);color:var(--text-secondary);margin-top:2px;line-height:1.4}.hp-dates{border-top:1px solid var(--line);flex-wrap:wrap;gap:20px;margin-top:14px;padding-top:12px;display:flex}.hp-date{flex-direction:column;gap:1px;min-width:0;display:flex}.hp-date-k{font-size:var(--fs-2xs,10px);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);font-weight:700}.hp-date-v{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere;font-weight:600}.hp-beats{gap:10px;margin-top:14px;padding-bottom:2px;display:flex;overflow-x:auto}.hp-beat{border-radius:var(--r-sm,6px);background:var(--surface-elevated);border:1px solid var(--line);flex-direction:column;flex:none;gap:2px;min-width:84px;max-width:140px;padding:8px 10px;display:flex}.hp-beat-year{font-size:var(--fs-xs,11px);color:var(--presence);font-weight:800;font-family:var(--font-mono,ui-monospace, monospace)}.hp-beat-label{font-size:var(--fs-xs,12px);color:var(--text-secondary);overflow-wrap:anywhere;line-height:1.35}.hp-facts{flex-direction:column;gap:0;margin-top:14px;display:flex}.hp-fact-row{border-bottom:1px solid var(--grid-line);align-items:baseline;gap:12px;padding:7px 0;display:flex}.hp-fact-row:last-child{border-bottom:none}.hp-fact-label{font-size:var(--fs-xs,12px);color:var(--text-muted);flex-shrink:0;min-width:84px;font-weight:600}.hp-fact-value{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere;flex:1;line-height:1.45}.hp-legacy{border-top:1px solid var(--line);font-size:var(--fs-sm,13px);color:var(--text-secondary);margin-top:14px;padding-top:12px;line-height:1.6}.otd-date{font-size:var(--fs-sm,13px);color:var(--presence);margin-bottom:12px;font-weight:700}.otd-events{flex-direction:column;gap:0;display:flex}.otd-event{border-bottom:1px solid var(--grid-line);align-items:flex-start;gap:12px;min-width:0;padding:9px 0;display:flex}.otd-event:last-child{border-bottom:none}.otd-year-chip{font-family:var(--font-mono,ui-monospace, monospace);font-size:var(--fs-xs,11px);color:var(--presence);background:color-mix(in oklab, var(--presence) 12%, transparent);border-radius:var(--r-full,999px);text-align:center;flex-shrink:0;min-width:44px;padding:3px 9px;font-weight:800}.otd-event-body{flex:1;min-width:0}.otd-label{font-size:var(--fs-sm,14px);color:var(--text-primary);overflow-wrap:anywhere;font-weight:600;line-height:1.4}.otd-cat{font-size:var(--fs-2xs,10px);letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);background:var(--track);border-radius:var(--r-full,999px);margin-top:3px;padding:1px 8px;font-weight:700;display:inline-block}.otd-empty{font-size:var(--fs-sm,13px);color:var(--text-faint);font-style:italic}.otd-people{border-top:1px solid var(--line);flex-wrap:wrap;gap:24px;margin-top:14px;padding-top:12px;display:flex}.otd-people-col{flex-direction:column;gap:4px;min-width:120px;display:flex}.otd-people-k{font-size:var(--fs-2xs,10px);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);margin-bottom:2px;font-weight:700}.otd-person{font-size:var(--fs-xs,12px);align-items:baseline;gap:8px;display:flex}.otd-person-year{font-family:var(--font-mono,ui-monospace, monospace);color:var(--text-muted);flex-shrink:0}.otd-person-name{color:var(--text-secondary);overflow-wrap:anywhere}.cc-banner{aspect-ratio:16/6;border-radius:var(--r-md,8px);background:linear-gradient(150deg, var(--surface-elevated-2,var(--surface-elevated)), var(--surface-elevated));border:1px solid var(--line);justify-content:center;align-items:center;width:100%;margin-bottom:12px;display:flex;overflow:hidden}.cc-flag{font-size:clamp(36px,8cqi,56px);line-height:1}.cc-name{font-size:var(--fs-lg,20px);color:var(--text-primary);overflow-wrap:anywhere;font-weight:800;line-height:1.15}.cc-marks{grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-top:14px;display:grid}.cc-mark{border:1px solid var(--line);border-radius:var(--r-sm,6px);background:var(--surface-elevated);flex-direction:column;gap:2px;min-width:0;padding:8px 10px;display:flex}.cc-mark-label{font-size:var(--fs-2xs,10px);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);font-weight:700}.cc-mark-value{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere;min-width:0;font-weight:600;line-height:1.4}.cc-langs{flex-wrap:wrap;gap:6px;margin-top:12px;display:flex}.cc-lang-chip{font-size:var(--fs-xs,12px);color:var(--presence);border:1px solid color-mix(in oklab, var(--presence) 30%, transparent);border-radius:var(--r-full,999px);background:color-mix(in oklab, var(--presence) 9%, transparent);overflow-wrap:anywhere;padding:3px 10px;font-weight:600}.cc-facts{flex-direction:column;gap:0;margin-top:14px;display:flex}.cc-fact-row{border-bottom:1px solid var(--grid-line);align-items:baseline;gap:12px;padding:7px 0;display:flex}.cc-fact-row:last-child{border-bottom:none}.cc-fact-label{font-size:var(--fs-xs,12px);color:var(--text-muted);flex-shrink:0;min-width:84px;font-weight:600}.cc-fact-value{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere;flex:1;line-height:1.45}.wg-empty{font-size:var(--fs-sm,13px);color:var(--text-faint);font-style:italic}.wg-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:10px;display:grid}.wg-tile{border:1px solid var(--line);border-radius:var(--r-md,8px);background:var(--surface-elevated);flex-direction:column;gap:3px;min-width:0;padding:12px;display:flex}.wg-flag{margin-bottom:4px;font-size:26px;line-height:1}.wg-name{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere;margin-bottom:3px;font-weight:700}.wg-row{font-size:var(--fs-2xs,10px);justify-content:space-between;gap:6px;min-width:0;line-height:1.4;display:flex}.wg-row-k{color:var(--text-muted);flex-shrink:0}.wg-row-v{color:var(--text-secondary);text-align:right;overflow-wrap:anywhere;min-width:0;font-weight:600}.wc-dates{font-size:var(--fs-sm,13px);color:var(--text-secondary);margin-bottom:12px;font-weight:700}.wc-sides{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;display:grid}.wc-side{border-radius:var(--r-sm,6px);border-left:3px solid var(--wc-c,var(--presence));background:color-mix(in oklab, var(--wc-c,var(--presence)) 7%, var(--surface-elevated));min-width:0;padding:10px 12px}.wc-side-name{font-size:var(--fs-sm,14px);color:var(--wc-c,var(--text-primary));overflow-wrap:anywhere;font-weight:800}.wc-leaders{flex-direction:column;gap:3px;margin:6px 0 0;padding:0;list-style:none;display:flex}.wc-leader{font-size:var(--fs-xs,12px);color:var(--text-secondary);overflow-wrap:anywhere}.wc-battles{border-top:1px solid var(--line);flex-wrap:wrap;gap:8px 16px;margin-top:16px;padding-top:12px;display:flex}.wc-battle{min-width:0;font-size:var(--fs-xs,12px);align-items:baseline;gap:6px;display:inline-flex}.wc-battle-dot{border-radius:var(--r-full,999px);background:var(--text-muted);flex-shrink:0;align-self:center;width:6px;height:6px}.wc-battle-label{color:var(--text-primary);overflow-wrap:anywhere;font-weight:600}.wc-battle-at{color:var(--text-faint);overflow-wrap:anywhere}.wc-stat-row{border-top:1px solid var(--line);align-items:baseline;gap:12px;margin-top:14px;padding-top:12px;display:flex}.wc-stat-k{font-size:var(--fs-xs,12px);color:var(--text-muted);flex-shrink:0;font-weight:600}.wc-stat-v{font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere}.wc-outcome{font-size:var(--fs-sm,13px);color:var(--text-secondary);margin-top:10px;line-height:1.6}.psb-token,.psb-leg{--psb-c:var(--text-muted)}.psb-token[data-pos=noun],.psb-leg[data-pos=noun]{--psb-c:var(--presence)}.psb-token[data-pos=verb],.psb-leg[data-pos=verb]{--psb-c:var(--insight)}.psb-token[data-pos=adjective],.psb-leg[data-pos=adjective]{--psb-c:var(--warning)}.psb-token[data-pos=adverb],.psb-leg[data-pos=adverb]{--psb-c:var(--presence-deep)}.psb-token[data-pos=pronoun],.psb-leg[data-pos=pronoun]{--psb-c:var(--presence-soft)}.psb-token[data-pos=preposition],.psb-leg[data-pos=preposition]{--psb-c:var(--insight-soft)}.psb-token[data-pos=conjunction],.psb-leg[data-pos=conjunction]{--psb-c:var(--warning-soft)}.psb-token[data-pos=determiner],.psb-leg[data-pos=determiner]{--psb-c:var(--text-muted)}.psb-token[data-pos=interjection],.psb-leg[data-pos=interjection]{--psb-c:var(--danger)}.psb-flow{flex-wrap:wrap;align-items:flex-start;gap:8px 5px;min-width:0;margin-top:6px;display:flex}.psb-group{align-items:flex-start;min-width:0;display:inline-flex}.psb-token{border-radius:var(--r-sm,6px) var(--r-sm,6px) 2px 2px;background:color-mix(in oklab, var(--psb-c) 9%, transparent);border-bottom:2px solid color-mix(in oklab, var(--psb-c) 80%, transparent);min-width:0;transition:opacity var(--m-fast,.16s) var(--ease-out,ease);flex-direction:column;align-items:center;gap:2px;padding:3px 7px 4px;display:inline-flex}.psb-word{font-size:var(--fs-md,16px);color:var(--text-primary);overflow-wrap:anywhere;min-width:0;font-weight:600;line-height:1.25}.psb-note-mark{font-size:var(--fs-2xs,10px);color:color-mix(in oklab, var(--psb-c) 72%, var(--text-primary));margin-left:1px;font-weight:800}.psb-abbr{font-size:var(--fs-2xs,10px);letter-spacing:.05em;color:color-mix(in oklab, var(--psb-c) 72%, var(--text-primary));font-weight:700;line-height:1}.psb-punct{font-size:var(--fs-md,16px);color:var(--text-secondary);transition:opacity var(--m-fast,.16s) var(--ease-out,ease);padding-top:3px;font-weight:600;line-height:1.25}.psb-token[data-dim],.psb-punct[data-dim]{opacity:.3}.psb-plain{font-size:var(--fs-md,15px);color:var(--text-primary);overflow-wrap:anywhere;margin:6px 0 0;line-height:1.6}.psb-empty{font-size:var(--fs-sm,13px);color:var(--text-faint);font-style:italic}.psb-translation{font-size:var(--fs-sm,13px);color:var(--text-secondary);overflow-wrap:anywhere;margin-top:10px;font-style:italic;line-height:1.5}.psb-legend{flex-wrap:wrap;gap:6px;margin-top:14px;display:flex}.psb-leg{min-width:0;font-size:var(--fs-xs,12px);color:var(--text-secondary);background:var(--surface-elevated);border:1px solid var(--line);border-radius:var(--r-full,999px);cursor:pointer;transition:background var(--m-fast,.16s) var(--ease-out,ease), border-color var(--m-fast,.16s) var(--ease-out,ease);align-items:center;gap:6px;padding:3px 10px;font-weight:600;display:inline-flex}.psb-leg:hover{border-color:color-mix(in oklab, var(--psb-c) 55%, transparent)}.psb-leg:focus-visible{outline:2px solid var(--presence);outline-offset:2px}.psb-leg[aria-pressed=true]{border-color:color-mix(in oklab, var(--psb-c) 65%, transparent);background:color-mix(in oklab, var(--psb-c) 12%, transparent);color:var(--text-primary)}.psb-leg-dot{border-radius:var(--r-full,999px);background:var(--psb-c);flex-shrink:0;width:8px;height:8px}.psb-leg-n{font-size:var(--fs-2xs,10px);color:var(--text-faint);font-weight:700}.psb-notes{flex-direction:column;gap:4px;margin:12px 0 0;padding:0;list-style:none;display:flex}.psb-note{font-size:var(--fs-xs,12px);color:var(--text-secondary);align-items:baseline;gap:6px;min-width:0;line-height:1.45;display:flex}.psb-note-num{color:var(--text-muted);flex-shrink:0;font-weight:800}.psb-note-text{overflow-wrap:anywhere;min-width:0}.psb-note-word{color:var(--text-primary);font-weight:700}.dcd-terms{grid-template-columns:repeat(var(--dcd-cols,2), minmax(0, 1fr));gap:10px;margin-top:6px;display:grid}@container (width<=520px){.dcd-terms{grid-template-columns:repeat(var(--dcd-cols-narrow,2), minmax(0, 1fr))}}@container (width<=380px){.dcd-terms{grid-template-columns:1fr}}.dcd-term{border-radius:var(--r-sm,6px);border:1px solid color-mix(in oklab, var(--dcd-c,var(--presence)) 24%, transparent);border-top:3px solid var(--dcd-c,var(--presence));background:color-mix(in oklab, var(--dcd-c,var(--presence)) 7%, var(--surface-elevated));min-width:0;padding:10px 12px 11px}.dcd-term-head{flex-wrap:wrap;align-items:baseline;gap:3px 7px;min-width:0;display:flex}.dcd-term-name{min-width:0;font-size:var(--fs-lg,16px);color:color-mix(in oklab, var(--dcd-c,var(--presence)) 78%, var(--text-primary));overflow-wrap:anywhere;font-weight:800;line-height:1.25}.dcd-term-tag{border-radius:var(--r-full,999px);min-width:0;font-size:var(--fs-xs,11px);color:color-mix(in oklab, var(--dcd-c,var(--presence)) 70%, var(--text-primary));background:color-mix(in oklab, var(--dcd-c,var(--presence)) 14%, transparent);overflow-wrap:anywhere;padding:1px 7px;font-weight:700;line-height:1.7}.dcd-gist{font-size:var(--fs-sm,13px);color:var(--text-secondary);overflow-wrap:anywhere;text-wrap:pretty;margin:6px 0 0;line-height:1.5}.dcd-example{border-left:2px solid color-mix(in oklab, var(--dcd-c,var(--presence)) 40%, transparent);font-size:var(--fs-sm,13px);color:var(--text-primary);overflow-wrap:anywhere;text-wrap:pretty;margin:8px 0 0;padding-left:8px;font-style:italic;line-height:1.5}.dcd-example-k{font-style:normal;font-weight:700;font-size:var(--fs-xs,11px);letter-spacing:.04em;text-transform:uppercase;color:var(--text-faint);margin-right:5px}.dcd-rule{border-radius:var(--r-md,10px);border:1px solid color-mix(in oklab, var(--insight) 34%, transparent);border-left:3px solid var(--insight);background:color-mix(in oklab, var(--insight) 11%, var(--surface-elevated));min-width:0;margin-top:14px;padding:11px 14px 13px}.dcd-rule-label{min-width:0;font-size:var(--fs-xs,11px);letter-spacing:.08em;text-transform:uppercase;color:var(--insight);overflow-wrap:anywhere;align-items:center;gap:6px;font-weight:800;display:flex}.dcd-rule-label .ic{flex-shrink:0;width:14px;height:14px}.dcd-rule-text{font-size:var(--fs-xl,19px);color:var(--text-primary);overflow-wrap:anywhere;text-wrap:pretty;margin:5px 0 0;font-weight:700;line-height:1.35}.dcd-mistake{min-width:0;font-size:var(--fs-sm,13px);color:var(--text-secondary);align-items:flex-start;gap:7px;margin:10px 0 0;line-height:1.5;display:flex}.dcd-mistake .ic{width:14px;height:14px;color:var(--warning);flex-shrink:0;margin-top:2px}.dcd-mistake-text{overflow-wrap:anywhere;text-wrap:pretty;min-width:0}.dcd-mistake-k{color:var(--warning);font-weight:700}.dcd-empty{font-size:var(--fs-sm,13px);color:var(--text-faint);font-style:italic}
@@ -1,39 +0,0 @@
1
- import{s as e}from"./spokenText-C88IQJ0M.js";import{d as t,h as n,v as r,y as i}from"./attachments-BW-vki-E.js";import{t as a}from"./providers-BovElgRL.js";import{n as o}from"./speed-K5_Ebj-8.js";import{i as s,n as c,r as l,t as u}from"./cache-CvbSI-pr.js";import{a as d,d as f,i as p,l as m,o as h,r as g,u as _}from"./validate-sGUCmPAs.js";import{n as v}from"./number-zqlPMliA.js";import{a as ee,c as y,i as b,l as x,n as te,o as ne,r as re,s as S}from"./officeDoc-GU6Cssjf.js";import{n as ie,r as ae,t as oe}from"./csv-DAqzYXUs.js";import"./search-ZN7v_P5B.js";var C=null,w=!1,T=!1,E=0,D=new Map;function O(){if(!(C||T)){if(typeof Worker>`u`){T=!0;return}try{C=new Worker(new URL(`/assets/worker-D7eK-Ya8.js`,``+import.meta.url),{type:`module`}),C.onmessage=e=>{let t=e.data;if(t.type===`ready`)w=!0;else if(t.type===`error`)T=!0,k();else if(t.type===`result`){let e=D.get(t.id);D.delete(t.id),e?.kind===`fit`&&e.resolve(t.fits)}else if(t.type===`embedded`){let e=D.get(t.id);D.delete(t.id),e?.kind===`embed`&&e.resolve(t.vec.length?t.vec:null)}},C.onerror=()=>{T=!0,k()},C.postMessage({type:`init`,base:ue,modelId:le})}catch{T=!0}}}function k(){for(let e of D.values())e.resolve(null);D.clear();try{C?.terminate()}catch{}C=null,w=!1}function se(e,t=80){if(O(),!w||!C)return Promise.resolve(null);let n=++E;return new Promise(r=>{let i=setTimeout(()=>{D.delete(n),r(null)},t);D.set(n,{kind:`fit`,resolve:e=>{clearTimeout(i),r(e?new Map(e):null)}}),C.postMessage({type:`fit`,id:n,query:e})})}function ce(e,t=80){if(O(),!w||!C)return Promise.resolve(null);let n=++E;return new Promise(r=>{let i=setTimeout(()=>{D.delete(n),r(null)},t);D.set(n,{kind:`embed`,resolve:e=>{clearTimeout(i),r(e)}}),C.postMessage({type:`embed`,id:n,text:e})})}var le=`minishlab/potion-base-8M`,ue=`/semantic/`,de=/\b(poems?|haikus?|limericks?|sonnets?|ballads?|rhymes?|riddles?|puns?|jokes?|knock[- ]?knock|tongue[- ]?twisters?|lullab(?:y|ies)|raps?)\b/i,fe=/\b(write|compose|make(?:\s+me|\s+up)?|tell(?:\s+me)?\s+(?:a|an)|sing|invent|create|generate|come up with)\b[^.?!]{0,40}\b(story|stories|song|lyrics?|tale|fable|fiction|script|screenplay|verse|jingle)\b/i;function pe(e){let t=e.toLowerCase();return de.test(t)||fe.test(t)}var me=e=>!pe(e),A=`HARD HONESTY RULES:
2
- - A node "value", a series point, or an edge "weight" (a 0..1 share of the outcome it explains) may ONLY be given when you can quote it VERBATIM from SOURCES — put that exact sentence in "quote" and set "tier":"T2" (or "T1" if it came from the user's own attached data). The weights of the edges INTO the outcome should sum to ≤ 1.
3
- - If a cause, link, or figure comes from general knowledge with NO source sentence, set "tier":"T0" and OMIT value/weight/series/quote. Never invent a number, a percentage, or a citation.
4
- - If SOURCES is empty, EVERY node and edge is "T0" with no numbers — a qualitative structure only.
5
- - Every point of a "series" needs its OWN verbatim quote containing that point's digits. A series you cannot quote point-by-point must be omitted entirely, never smoothed or estimated.
6
- - "sign" is 1 (reinforces) or -1 (dampens). "role" is "root" | "mechanism" | "outcome". "depth" grows from roots (0) to the outcome. Edges may only join TOP-LEVEL nodes — "children" are a breakdown of one node, never causal actors.
7
- - Node "id" is a short stable slug of the label (lowercase, hyphens: "cheap-credit"), because a later turn has to be able to name the same node again.
8
- - "date" is WHEN a cause happened, as a plain string: a year ("1986"), an ISO date ("1986-01-28"), or an ISO timestamp. Give one for every node you can place in time, even in an all-T0 world with no numbers anywhere, because it is what lets the reader lay the same causes out on a timeline. Omit it only when you would be guessing at the year. Where a source sentence states the date, make that the node's "quote" — a date the sources back is shown as established, and one only you know is shown as your own.
9
- - "domain" is the sphere a node belongs to, one of: economy | policy | technology | science | environment | society | health | conflict. It is a description, not a claim, so it needs no source — but OMIT it when no single sphere fits, and never stretch one to cover a node.`,j=`Shape: {"title":"the question, verbatim","outcomeId":"<id of the outcome node>","nodes":[{"id":"","label":"","role":"","depth":0,"domain":"","date":"1986-01-28","tier":"T0","value":0,"unit":"","quote":"","detail":"","series":{"tier":"T0","unit":"","points":[{"t":"2008","value":0,"quote":""}]},"children":[{"id":"","label":"","tier":"T0"}]}],"edges":[{"from":"","to":"","verb":"","weight":0,"sign":1,"tier":"T0","quote":"","relation":""}],"provenance":{"illustrative":false}}`,M=`You are Mavéa's causal world-builder. Given a causal question and SOURCES, build the web that explains it: root causes → mechanisms → the outcome, each node carrying whatever the sources actually prove about it. Return ONLY compact JSON, no prose.
10
-
11
- ${A}
12
- ${j}`,N=`You are Mavéa's causal world-builder, EXTENDING a world that already exists. The user asked a follow-up about the SAME web. Return ONLY compact JSON, no prose.
13
-
14
- ECHO THE IDS: every node you re-describe MUST reuse its EXISTING id, verbatim, from the roster you are given — that is the only way your answer lands on the world the user is looking at. Only a genuinely new cause gets a new slug id. Re-state "title" exactly as given.
15
- A DELTA, NOT A WORLD: return ONLY the nodes the follow-up actually touches, and only the edges you are adding — every node you leave out keeps exactly what it already has. Re-listing the unchanged web wastes the reader's money and risks overwriting facts that are already proven.
16
- Answer the follow-up by ENRICHING the nodes it is about (add a "series", a "children" breakdown, a "detail" sentence, a missing edge) — do not rebuild the web from scratch and do not rename anything.
17
-
18
- ${A}
19
- ${j}`,P={type:`object`,properties:{quote:{type:`string`},url:{type:`string`},host:{type:`string`},date:{type:`string`}},required:[`quote`]},F={type:`object`,properties:{tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},unit:{type:`string`},quote:{type:`string`},points:{type:`array`,items:{type:`object`,properties:{t:{type:`string`},value:{type:`number`},quote:{type:`string`}},required:[`t`,`value`]}}},required:[`tier`,`points`]},I={type:`object`,properties:{id:{type:`string`},label:{type:`string`},domain:{type:`string`,enum:[...h]},tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},value:{type:`number`},unit:{type:`string`},quote:{type:`string`}},required:[`id`,`label`]},L={type:`object`,properties:{title:{type:`string`},outcomeId:{type:`string`},nodes:{type:`array`,minItems:2,items:{type:`object`,properties:{id:{type:`string`},label:{type:`string`},role:{type:`string`,enum:[`root`,`mechanism`,`outcome`]},depth:{type:`number`},domain:{type:`string`,enum:[...h]},date:{type:`string`},tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},value:{type:`number`},unit:{type:`string`},quote:{type:`string`},detail:{type:`string`},series:F,children:{type:`array`,items:I}},required:[`id`,`label`,`role`]}},edges:{type:`array`,items:{type:`object`,properties:{from:{type:`string`},to:{type:`string`},verb:{type:`string`},weight:{type:`number`},sign:{type:`number`},tier:{type:`string`,enum:[`T0`,`T1`,`T2`,`T3`]},quote:{type:`string`},relation:{type:`string`},receipts:{type:`array`,items:P},counter:P},required:[`from`,`to`,`sign`]}},provenance:{type:`object`,properties:{illustrative:{type:`boolean`}}}},required:[`title`,`nodes`,`edges`]};function R(e){let t={slow:5,standard:8}[o(e)]??12;return{maxTokens:400+t*300,nodeCap:t}}var z=`(none — use only general knowledge; mark EVERY node and edge "T0" with no numbers and no series)`;function B(e){return e.text.trim()?e.text.trim().slice(0,6e3):z}function he(e,t,n){return`QUESTION: ${e.trim()}
20
-
21
- SOURCES:
22
- ${B(t)}
23
-
24
- Build the causal world (${n} nodes max). Quote SOURCES verbatim for any number, series point or weight; otherwise T0 with no numbers. DATE every cause you can place in time — a year is enough, and this is not a number needing a source. Reply as compact JSON on one line.`}function ge(e){return e.nodes.map(e=>`${e.id} = ${e.label}`).join(`
25
- `)}function _e(e,t,n,r){return`TITLE (re-state verbatim): ${e.title}
26
-
27
- EXISTING NODES — reuse these ids exactly:
28
- ${ge(e)}
29
-
30
- FOLLOW-UP: ${t.trim()}
31
-
32
- SOURCES:
33
- ${B(n)}
34
-
35
- Answer the follow-up on THIS world with a DELTA — only the nodes it changes (${r} nodes max, existing ids echoed), never the whole web again. Quote SOURCES verbatim for any number, series point or weight; otherwise T0 with no numbers. DATE every cause you can place in time — a year is enough, and this is not a number needing a source. Reply as compact JSON on one line.`}async function V(e,t,n,r,i,o){let s;try{s=(await a(n.provider).generate({system:e,history:[],user:t,maxTokens:r,thinkingLevel:`minimal`,format:L,...o?{signal:o}:{}},n)).raw}catch{return null}return o?.aborted?null:g(s,i)}var H=new Map;function ve(e,t,n){return s(`world:${e}\0${t.text}`,n.provider)}function ye(e,t,n,r){let i=ve(e,t,n),a=H.get(i);if(a)return a;let o=be(i,e,t,n,r);for(H.set(i,o);H.size>16;){let e=H.keys().next().value;if(e===void 0||e===i)break;H.delete(e)}return o.then(e=>{e||H.delete(i)},()=>H.delete(i)),o}async function be(e,t,n,r,i){try{let t=await u(e);if(t)return t}catch{}let{maxTokens:a,nodeCap:o}=R(r.model??r.provider),s=await V(M,he(t,n,o),r,a,n,i);if(s)try{await c(e,s)}catch{}return s}var xe=.5;async function Se(e,t,n,r,i){let{maxTokens:a,nodeCap:o}=R(r.model??r.provider),s=await V(N,_e(e,t,n,o),r,a,n,i);return!s||d(e,s)<xe?null:p(e,s)}function Ce(e,t){let n=[],r=/<c\b([^>]*?)(?:\/>|>([\s\S]*?)<\/c>)/g,i;for(;(i=r.exec(e))!==null;){let e=i[1],r=/\br="([A-Z]+\d+)"/.exec(e)?.[1];if(!r)continue;let a=re(r);if(!a)continue;let o=ne(e,i[2]??``,t);o!==``&&n.push({col:a.col,row:a.row,addr:r,text:o})}return n}async function we(e){let t;try{t=await x(S(e))}catch{return null}if(!t)return null;let n=t.get(`xl/sharedStrings.xml`),r=n?ee(y(n)):[],i=[...t.keys()].filter(e=>/^xl\/worksheets\/sheet\d+\.xml$/.test(e)).sort((e,t)=>Number(e.match(/(\d+)\.xml$/)[1])-Number(t.match(/(\d+)\.xml$/)[1]));if(i.length===0)return null;let a=t.get(`xl/workbook.xml`),o=a?/<sheet[^>]*name="([^"]+)"/.exec(y(a))?.[1]??`Sheet1`:`Sheet1`,s=Ce(y(t.get(i[0])),r);if(s.length===0)return null;let c=[...new Set(s.map(e=>e.row))].sort((e,t)=>e-t),l=c[0],u=s.filter(e=>e.row===l).sort((e,t)=>e.col-t.col),d=u.map(e=>e.col),f=u.map((e,t)=>e.text||`col${t+1}`),p=new Map(s.map(e=>[`${e.col}:${e.row}`,e.text])),m=c.filter(e=>e>l),h=m.length,g=m.slice(0,ie),_=[],v=[];for(let e of g)_.push(d.map(t=>p.get(`${t}:${e}`)??``)),v.push(d.map(t=>`${b(t)}${e}`));return{headers:f,rows:_,addrs:v,sheet:o,sourceRowCount:h,truncated:h>_.length}}var U=/^\d{4}-\d{2}-\d{2}([ T]\d{2}:\d{2}(:\d{2})?)?$|^\d{1,2}[/-]\d{1,2}[/-]\d{2,4}$/,W=/^(true|false|yes|no)$/i;function G(e){let t=e.trim();if(!t)return null;let n=v(t);if(!n)return null;let r=n.kind===`pct`?`%`:/^[$€£]/.test(t)?t[0]:void 0;return{value:n.value,...r?{unit:r}:{}}}function Te(e){let t=e.trim();return t?G(t)?`number`:U.test(t)?`date`:W.test(t)?`boolean`:`text`:`empty`}function Ee(e,t,n){let r=n.filter(e=>e.trim()!==``);if(r.length===0)return{key:e,label:t,type:`empty`,values:n.map(()=>null),raw:n,parsedFraction:0};let i=r.slice(0,ae),a={number:0,date:0,boolean:0,text:0,empty:0};for(let e of i)a[Te(e)]+=1;let o=i.length,s=`text`;a.number/o>=.7?s=`number`:a.date/o>=.7?s=`date`:a.boolean/o>=.7&&(s=`boolean`);let c=0,l,u=n.map(e=>{let t=e.trim();if(!t)return null;if(s===`number`){let e=G(t);return e?(c+=1,e.unit&&!l&&(l=e.unit),e.value):null}return s===`boolean`?W.test(t)?(c+=1,/^(true|yes)$/i.test(t)):null:s===`date`?U.test(t)?(c+=1,t):null:(c+=1,t)});return{key:e,label:t,type:s,values:u,raw:n,parsedFraction:r.length?c/r.length:0,...l?{unit:l}:{}}}function De(e,t,n){let r=e.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``)||`col${t+1}`,i=r,a=2;for(;n.has(i);)i=`${r}_${a++}`;return n.add(i),i}function Oe(e){let t=new Set;return e.headers.map((n,r)=>{let i=e.rows.map(e=>e[r]??``),a=Ee(De(n,r,t),n,i);return e.addrs&&(a.addrs=e.rows.map((t,n)=>e.addrs[n]?.[r]??``)),a})}async function ke(e,n){let r,a;if(i(e))a=`xlsx`,r=await we(e.data);else if(t(e)){a=`csv`;try{r=oe(new TextDecoder(`utf-8`).decode(S(e.data)))}catch{r=null}}else return{reason:`Not a CSV or Excel file.`};if(!r||r.headers.length===0)return{reason:`Could not read a table from ${e.name}.`};let o=Oe(r);return{dataset:{id:l(`${e.name}:${e.data.slice(0,2e5)}`),file:e.name,...r.sheet?{sheet:r.sheet}:{},columns:o,rowCount:r.rows.length,sourceRowCount:r.sourceRowCount,truncated:r.truncated,origin:a,parsedAt:n}}}var Ae=200;function je(e){let t=[`${e.file}: ${e.columns.map(e=>e.label).join(`, `)}`],n=Math.min(e.rowCount,Ae);for(let r=0;r<n;r+=1)t.push(e.columns.map(e=>`${e.label} ${e.raw[r]??``}`.trim()).join(` | `));return t.join(`
36
- `)}async function Me(e){let a=[];for(let o of e)try{if(t(o)||i(o)){let{dataset:e}=await ke(o,0);e&&a.push(je(e))}else if(r(o))a.push(new TextDecoder(`utf-8`).decode(S(o.data)));else if(n(o)){let e=await te(o);e&&a.push(e.join(`
37
- `))}}catch{}return a.join(`
38
-
39
- `)}var Ne=8e3,K=new Map;function Pe(e,t){for(K.delete(e),K.set(e,t);K.size>2;){let e=K.keys().next().value;if(e===void 0)break;K.delete(e)}}async function Fe(e){let t=K.get(e);if(!t)return m;let n=await Promise.all(t.attachments.map(async e=>({source:{kind:`file`,title:e.name},text:await Me([e])})));return _([...n,...t.sources.map(f)],Ne)}var Ie=/\b(just (?:tell me|give me|the answer)|in one line|one[- ]liner|in a (?:sentence|word|line)|in a few words|brief(?:ly)?|tl;?dr|short (?:version|answer)|keep it (?:short|brief)|quick (?:answer|version|recap|rundown|summary)|in short|the short version|bottom line|in a nutshell|the gist)\b/,Le=/\b(tell me about|explain|overview|how (?:do|does|to|can|is|are|did|would|should)|why|guide|walk\s?(?:me\s)?through|break\s?down|breakdown|deep\s?dive|everything|compare|comparison|versus|vs\.?|pros and cons|plan|itinerary|roadmap|review|analy[sz]e|dashboard|trends?|history of|all about|summary of)\b/,q=/\b(teach (?:me|us)|help me (?:understand|learn|grasp|wrap my head around)|walk me through|crash course|get (?:me |us )?up to speed|bring me up to speed|from scratch|(?:the )?(?:basics|fundamentals|essentials|core concepts|key concepts) of|study (?:for|guide|plan)|prep(?:are)? (?:me |us )?for (?:my |an? |the |our )?(?:\w+ )?(?:interview|exam|test|quiz|midterm|final|cert\w*)|(?:interview|exam) prep|tutorial|lesson on|learn (?:about |how )?[a-z]+)\b/,Re=[/^[\s\d().,+\-*/^%×÷=]+\??$/,/\bwhat(?:'s| is| are| was)?\s*[\d().,\s+\-*/^%×÷]+\s*\??$/,/\b(calculate|compute|solve)\b/,/\b\d+(?:\.\d+)?\s*%\s*of\s+\d/,/\bconvert\b/,/\bhow many\s+\w+\s+(?:in|are in|per)\b/,/\b\d+\s*[a-z]+\s+(?:in|to)\s+[a-z]+\b/,/\b(define|definition of)\b/,/\bwhat does\s+.+\s+mean\b/,/\bcapital of\b/];function ze(e){let t=e.toLowerCase().trim();if(!t)return`rich`;let n=Ie.test(t);return q.test(t)||Le.test(t)?n?`brief`:`rich`:Re.some(e=>e.test(t))?`lean`:n?`brief`:`rich`}function Be(e){return q.test(e.toLowerCase())}var Ve=/\b(deriv\w*|prove|proof|theorem|integral|derivative|equation|algebra|calculus|optimi[sz]e|trade-?offs?|step[-\s]?by[-\s]?step|reason\w* through|figure out|work out|why (?:does|is|are|do)|analy[sz]e|compare\b.*\bvs\b|root cause|debug|diagnose|strategy|plan\b.*\b(?:budget|trip|itinerary|migration))\b/;function J(e){return Ve.test(e.toLowerCase())}function He(e,t){return e===`lean`?`minimal`:t?`low`:`minimal`}var Y=[`minimal`,`low`,`medium`,`high`];function Ue(e,t){let n=Y.indexOf(e);return Y[Math.min(Y.length-1,Math.max(0,n+t))]}function We(e,t,n=`fast`){let r=J(t);return e===`lean`&&!r?`minimal`:Ue(He(e,r),n===`thorough`?2:+(n===`balanced`))}var Ge=.1,Ke=.3,qe=.75;function Je(e,t,n){return t.creative?qe:e===`lean`||J(n)||t.troubleshoot?Ge:Ke}var X=140,Z=320;function Ye(t,n){let r=n===`lean`||n===`brief`?X:Z;return e(t.trim(),r)}function Q(e){return e===`lean`||e===`brief`?X:Z}var Xe=`OUTPUT ORDER — emit the "narration" field FIRST in the JSON, before "title", "sub", and "blocks", and write it as complete sentences. It is spoken aloud the moment it streams, so it must lead.`;function Ze(e){return e===`lean`||e===`brief`?`SPOKEN LINE ("narration") — keep it to ONE short sentence (≈${Q(e)} characters). Right to the point.`:`SPOKEN LINE ("narration") — at most two or three short sentences (≈${Q(`rich`)} characters), like a person talking. The visuals carry the detail; never narrate the whole canvas.`}var $=[{key:`decision`,test:/\b(should i|should we|worth it|is it worth|which (?:one|should|is better)|do i (?:need|have to)|ought i|better to|or should i)\b/},{key:`comparison`,test:/\b(vs\.?|versus|compare\w*|comparison|pros and cons|trade-?offs?|better than|which is better)\b/},{key:`risk`,test:/\b(risk\w*|danger\w*|downside|what could go wrong|threat\w*|is it safe|safe to|consequenc\w*|backfire|red flags?|pitfalls?)\b/},{key:`planning`,test:/\b(roadmap|schedule|timeline|milestone\w*|strateg\w*|prepare for|get ready|launch|plan (?:to|for|a|my|out)|over the next \d+|in \d+ (?:weeks?|months?|days?))\b/},{key:`troubleshoot`,test:/\b(troubleshoot|debug|not working|isn'?t working|won'?t \w+|broken|\berror\b|\bbug\b|fix\b|stopped working|fail(?:s|ing|ed)?|why (?:is|does|won'?t|isn'?t|can'?t))\b/},{key:`learning`,test:/\b(explain|how does|how do .* work|what is|what are|teach me|help me understand|learn\b|tell me about|why does|the difference between|concept of|crash course|walk me through|for (?:my|an?|the|our) (?:\w+ )?(?:interview|exam|test|midterm|final)|study for)\b/},{key:`creative`,test:/\b(brainstorm|ideas? for|come up with|imagine|invent|design a|creative|name (?:my|a|some|ideas)|suggest (?:some )?\w+ (?:names|ideas))\b/},{key:`whatIf`,test:/\b(what (?:if|happens if|would happen)|if i (?:do|don'?t|take|stay|leave|wait)|either way|both (?:paths|options|ways)|play(?:ed)? out|scenario\w*|down the road|in (?:each|both) cases?|stay or (?:go|leave|take)|futures?\b)\b/},{key:`reflection`,test:/\b(my (?:friend|partner|relationship|boyfriend|girlfriend|marriage|spouse|boss|family|mom|dad|kid)|feel(?:ing)?\b|emotionally|am i (?:wrong|right|overreacting|the problem)|should i feel|drain(?:s|ing|ed)?|toxic|healthy (?:relationship|friendship)|cope\b|burn(?:t|ed)?\s?out|overwhelm\w*|anxious|lonely)\b/},{key:`highStakes`,test:/\b(quit (?:my|the|this) (?:job|career)|get married|getting married|divorce|buy a (?:house|home)|mortgage|life savings|career change|drop out|move (?:abroad|across|countr|to another)|surgery|diagnos\w*|lawsuit|\bsue\b|custody|life-?changing)\b/},{key:`serious`,test:/\b(grief|grieving|death|dying|depress\w*|suicid\w*|self-?harm|abuse|trauma|addiction|crisis|terminal|miscarriage)\b/}],Qe=[{domain:`health`,test:/\b(health\w*|symptom\w*|doctor|medic\w*|diagnos\w*|disease|surgery|mental health|therap\w*|depress\w*|anxiety)\b/},{domain:`legal`,test:/\b(legal|lawyer|attorney|lawsuit|\bsue\b|court|custody|rights\b|contract\b)\b/},{domain:`money`,test:/\b(money|budget|invest\w*|savings|\bdebt\b|loan|mortgage|finance\w*|retire\w*|taxe?s?\b|salary)\b/},{domain:`career`,test:/\b(job\b|career|\bwork\b|boss|promotion|freelanc\w*|resume|interview|fired|laid off|quit)\b/},{domain:`relationship`,test:/\b(relationship|friend\w*|partner|boyfriend|girlfriend|marriage|spouse|dating|breakup|family)\b/},{domain:`travel`,test:/\b(travel|trip|vacation|flight|hotel|itinerary|destination|visit\b)\b/},{domain:`tech`,test:/\b(code|coding|software|\bapp\b|\bapi\b|database|server|deploy|programming|website|algorithm)\b/},{domain:`learning`,test:/\b(study|course|exam|tutorial|homework|\bclass\b|lesson|curriculum)\b/}];function $e(e){if(!e)return``;for(let t=e.length-1;t>=0;t--)if(e[t].role===`user`)return e[t].content;return``}function et(e,t){let n=e.toLowerCase(),r=$e(t).toLowerCase(),i=r?`${n} ${r}`:n,a={decision:!1,comparison:!1,risk:!1,planning:!1,troubleshoot:!1,learning:!1,creative:!1,whatIf:!1,reflection:!1,highStakes:!1,serious:!1};for(let e of $)e.test.test(i)&&(a[e.key]=!0);(a.highStakes||a.reflection)&&(a.serious=!0);for(let e of Qe)if(e.test.test(i)){a.domain=e.domain;break}return a}function tt(e){let t=new Set;return e.decision&&t.add(`decide`),e.comparison&&(t.add(`compare`),t.add(`decide`)),e.risk&&t.add(`decide`),e.planning&&(t.add(`plan`),t.add(`howto`)),e.troubleshoot&&(t.add(`howto`),t.add(`explain`)),e.learning&&(t.add(`explain`),t.add(`reference`)),e.creative&&t.add(`draft`),e.whatIf&&t.add(`decide`),e.reflection&&(t.add(`reflect`),t.add(`comfort`)),[...t]}var nt=[{shape:`composition`,weight:1,test:/\b(budget|allocat\w*|split|breakdown|where\s+(?:\w+\s+)?(?:my\s+|the\s+)?(?:money|time|spend\w*|budget)|(?:money|time|spend\w*)\s+goes?|portion|share|mix|composition|makeup|made up of|percent\w*|proportion|divid\w*)\b/},{shape:`series`,weight:1,test:/\b(trend\w*|over time|growth|history|historical|month\w*|week\w*|dai\w*|quarter\w*|year\w*|forecast|projection|trajectory|since|past \d+)\b/},{shape:`comparison`,weight:1,test:/\b(vs\.?|versus|compare\w*|comparison|better|which (?:one|should|is)|either|or should|pros and cons|trade-?offs?|options?|best|top \d+|worth it|should i (?:buy|get|pick|choose|use)|recommend\w*)\b/},{shape:`ranking`,weight:1,test:/\b(rank\w*|leaderboard|top \d+|best|worst|most|least|highest|lowest|fastest|biggest|smallest|standings)\b/},{shape:`status`,weight:1,test:/\b(progress|on track|readiness|ready|status|health\w*|complete\w*|how (?:far|close)|goal|target|score|rating|grade)\b/},{shape:`sequence`,weight:1,test:/\b(steps?|how (?:do|to)|process|guide|walk\s?through|plan|schedule|roadmap|sequence|order|first.*then|itinerary|timeline)\b/},{shape:`flow`,weight:.8,test:/\b(funnel|pipeline|workflow|conversion|stages?|flow|drop-?off|state\s?machine|feedback\s?loops?|decision\s?tree|control\s?flow)\b/},{shape:`geo`,weight:1,test:/\b(map|where is|near\w*|location|route|directions?|cities|country|countries|region|travel|trip|drive)\b/},{shape:`list`,weight:.8,test:/\b(list|tips?|checklist|things to|ways to|ideas|reasons|items|bullet\w*)\b/},{shape:`distribution`,weight:1,test:/\b(distribution|spread|histogram|range|variance|outliers?|percentile|frequency|how (?:often|spread))\b/},{shape:`relationship`,weight:1,test:/\b(correlat\w*|relationship between|scatter|vs.*axis|impact of|affect\w*|driver\w*)\b/},{shape:`structure`,weight:1,test:/\b(molecul\w*|chemical structure|molecular structure|skeletal (?:formula|structure)|lewis structure|smiles|functional group|benzene)\b/},{shape:`tabular`,weight:.9,test:/\b(table|rows?|columns?|spreadsheet|records|dataset|grid of|matrix)\b/},{shape:`media`,weight:1,test:/\b(image\w*|photos?|gallery|pictures?|visual\w*|video|watch|before and after|screenshot)\b/},{shape:`text`,weight:.8,test:/\b(quote\w*|testimonial\w*|said|opinions?|reviews?|feedback|explain|defin\w*|definition|what is|tell me about|meaning of|translate\w*|vocabulary)\b/},{shape:`code`,weight:1.1,test:/\b(code|coding|programming|software|function|algorithm\w*|recursi\w*|data structures?|linked lists?|binary (?:tree|search)|hash\s?(?:map|table)|big-?o|time complexity|syntax|compil\w*|debug\w*|refactor\w*|regex|sql|snippet|pseudo\s?code|api)\b/},{shape:`scalar`,weight:.7,test:/\b(how (?:many|much)|number of|total|count|metric|stat\w*|kpi|figure)\b/},{shape:`keyvalue`,weight:.7,test:/\b(stats|metrics|numbers|key figures|at a glance|summary of|overview)\b/},{shape:`selection`,weight:.9,test:/\b(choose|pick|select|decide|configure|settings|sign\s?up|form|filter|adjust|set up)\b/},{shape:`hierarchy`,weight:.9,test:/\b(hierarch\w*|tree|nested|org\s?chart|structure of|breakdown of .* into|parent|sub-?categor\w*)\b/}],rt=[{test:/\b(pdf|white\s?paper|the paper|the document|the report|the contract|the article|the spec|the manual|the filing|the brief|full text|read (?:it|the\b))\b/,types:[`pdfreader`,`docview`]},{test:/\b(images?|photos?|pictures?|gallery|pics?|snapshots?)\b/,types:[`gallery`]},{test:/\b(maps?|where is|located|directions?|on a map|near (?:the|downtown|campus)|walking distance|walkable|nearby|neighborhood|what'?s around|close to (?:downtown|the))\b/,types:[`geomap`]},{test:/\b(code|snippet|implementation|source code|pseudo\s?code)\b/,types:[`codeblock`]},{test:/\b(dialogue\w*|a scene\b|conversation between|exchange between|speakers?|write a (?:script|scene|transcript))\b/,types:[`dialogue`]},{test:/\b(defin\w*|etymology\b|what does .{1,30} mean|look up\b|vocabulary\b|word for\b)\b/,types:[`dictionary`]},{test:/\b(variant\w*|alternativ\w*|\d+ (?:version\w*|option\w*|draft\w*)|rewrit\w*|different (?:tone\w*|style\w*|version\w*))\b/,types:[`variants`]},{test:/\b(?:make|say|write|phrase|word|put) (?:it|this|that|the \w{2,14}) (?:more |a bit |a little |much |way )?(?:firm|soft|warm|blunt|gentl|harsh|kind|stern|polit|casual|formal|direct|punchi|short|long|terse|friendl)\w*\b|\b(?:firmer|softer|warmer|blunter|gentler|harsher|sterner|punchier|shorter|longer|friendlier) (?:version|tone|wording|take|draft|phrasing)\b|\bexplain (?:it|this|that) (?:for|to) (?:an? )?(?:exec|executive|engineer|beginner|expert|layperson)\b|\b(?:at|in) (?:different|two|three|several) (?:levels?|tones?|registers?|reading levels?)\b|\bfor (?:different|two|three|several) audiences\b/,types:[`variantswitch`]},{test:/\b(translat\w+|in (?:french|spanish|japanese|german|chinese|portuguese|italian|korean|arabic|russian|hindi|dutch|swedish|polish|turkish|vietnamese|thai|hebrew|greek|latin)|from (?:english|spanish|french|japanese|german|chinese) (?:to|into))\b/,types:[`translation`]},{test:/\b(rank (?:the )?top \d+|top \d+ (?:ranked|ranking)|leaderboard\b|ranked list\b|best \d+ .{1,30} rank\w*)\b/,types:[`bracketbar`]},{test:/\b(?:as|in|into) (?:a |an )?(?:data )?table\b|\b(?:make|build|draw|create|show|give|put|render|format)\b(?:[\w\s]{0,12})?\btable\b|\btabular\b|\bspreadsheet\b/,types:[`datatable`]},{test:/\b(?:draw|make|show|give|create|build)\b(?:[\w\s]{0,12})?\b(?:flow\s?chart|flow\s?diagram|diagram)\b|\bdiagram (?:this|it|of|the)\b|\bflow\s?chart\b|\bas an? [\w\s]{0,20}?diagram\b|\bstate\s?machine\b/,types:[`diagramflow`]},{test:/\b(?:as|make|draw|show|give|build|on)\b(?:[\w\s]{0,12})?\btime\s?line\b|\btime\s?line of\b/,types:[`timeline`]},{test:/\bcheck\s?list\b/,types:[`checklist`]},{test:/\bstep[-\s]?by[-\s]?step\b|\b(?:numbered|ordered) steps\b|\bwalk me through (?:the )?steps\b/,types:[`howtosteps`,`checklist`]},{test:/\bcompare\b|\bcomparison\b|\b\w+ (?:vs\.?|versus) \w+\b|\bdifference between\b|\bside[-\s]?by[-\s]?side\b/,types:[`compare`]},{test:/\bdifferences? between (?:an? |the )?\w+ and (?:an? |the )?\w+\b|\bhow (?:is|are|does|do) (?:an? |the )?\w+ (?:and (?:an? |the )?\w+ )?differ\w*\b|\bconfus\w+ (?:with|between|for)\b|\b(?:commonly|easily|often) confused\b|\bmix\w* (?:them|these two|those two|the two) up\b|\b(?:them|these two|those two|the two) (?:mixed|confused)\b|\btell\b[^.?!]{0,30}\bapart\b|\bwhich (?:one )?is which\b|\bare\b[^.?!]{1,40}\bthe same thing\b|\bwhen (?:to|do i|should i) use\b[^.?!]{1,30}\b(?:vs\.?|versus|instead of)\b/,types:[`distinctioncard`]},{test:/\bquiz\b|\btest me on\b|\bpractice questions\b/,types:[`quiz`]},{test:/\b(?:quiz|test|grill|drill) me\b|\btest my knowledge\b|\b(?:mock|practice|sample) (?:exam|test)\b|\b\d+[-\s]question\b|\b\d+ (?:practice|review|exam|multiple[-\s]choice|short[-\s]answer) questions?\b|\b(?:ask|give|write|make|generate) me \d+ questions\b|\bexam prep\b/,types:[`quizsession`]},{test:/\bflash\s?cards?\b/,types:[`flashcard`]},{test:/\b(?:100\s?%\s?)?stacked\s+(?:bar|column)s?(?:\s+(?:chart|graph))?\b|\bstacked\s+(?:chart|graph)\b|\b100\s?%\s?stacked\b/,types:[`stackedbars`]},{test:/\b(?:write|draft|compose|give me|make me) (?:me )?(?:an? |the )?(?:\w+[- ]){0,2}(?:essays?|articles?|blog posts?|op-?eds?)\b|\b(?:essays?|blog posts?) (?:about|on|arguing)\b|\b(?:cover letter|personal statement|statement of purpose|college essay)\b|\bin prose\b|\blong[-\s]?form\b|\b(?:wedding|best man'?s?|maid of honou?r|retirement|graduation|farewell) (?:toast|speech)\b|\b(?:few|couple(?: of)?|several|\d+) paragraphs\b|\bwrite (?:it|this) out in full\b/,types:[`longread`]},{test:/\bbrainstorm\w*\b|\b(?:ideas|suggestions) (?:for|on|about)\b|\b(?:some|any|other|more|fresh|a few) (?:ideas|suggestions|names)\b|\b(?:give|list|need|want) (?:me |us )?\d+ (?:ideas|suggestions|names)\b|\bgive me ideas\b|\bideas on how\b|\bwhat (?:should|could) (?:i|we) (?:call|name) (?:it|this|my|our|the)\b|\bname (?:ideas|suggestions)\b|\bwhat could (?:i|we) do about\b|\bpossible (?:approaches|angles|directions)\b|\bcome up with (?:some |a few |\d+ )?(?:ideas|names|concepts|angles|titles)\b/,types:[`ideaboard`]},{test:/\bdo(?:'|’)?s and don(?:'|’)?ts\b|\bwhat not to (?:say|do|wear|bring|ask|write|post)\b|\bwhat (?:should|do) i (?:say|do)\b[^.?!]{0,4}\b(?:when|if|at|during)\b|\bwhat (?:should|do) i avoid\b|\b(?:screw|mess|blow|botch) (?:this|it|that) up\b|\betiquette\b|\b(?:common|rookie|beginner|classic|typical) mistakes?\b|\bthings to avoid\b/,types:[`dosdonts`]},{test:/\banalog(?:y|ies) for\b|\bmetaphors? for\b|\b(?:an?|another|any|the) (?:\w+ ){0,2}analog(?:y|ies)\b|\bby analogy\b|\beli ?5\b|\blike i(?:'|’)?m (?:five|5)\b|\bfor a (?:five|5)[-\s]?year[-\s]?old\b|\b(?:explain|describe)\b[^.?!]{0,40}\blike\s+an?\b/,types:[`analogymap`]},{test:/\b(recipe\b|how to (?:make|cook|bake) |step\w*-?by\w*-?step .{0,20}(?:recipe|cook)|(?:dinner|lunch|breakfast|dessert|cookie|pasta|chicken|beef|vegan|gluten.free) recipe\b)\b/,types:[`recipecard`]},{test:/\b(workout plan|training plan|exercise plan|gym (?:program|plan|routine)|fitness (?:plan|program|routine)|sets? and reps?|push.?pull.?legs?|strength (?:program|plan)|build muscle (?:plan|program)|weekly (?:workout|training|gym) (?:plan|program|schedule))\b/,types:[`workoutplan`]},{test:/\b(macro(?:nutrient)?s?\b|(?:calorie|nutrition(?:al)?) (?:breakdown|facts?|info|content)|grams? of (?:protein|carbs?|fat)|protein.*carb\w*.*fat|caloric breakdown)\b/,types:[`macrobreakdown`]},{test:/\b(medication (?:schedule|reminder|timing)|dosing schedule|pill (?:schedule|reminder)|when (?:to|should i|do i) take .{0,30}(?:pill\w*|drug|medication|meds?|tablet\w*|dose\w*)|what time .{0,20}(?:take|dose) .{0,20}(?:pill\w*|medication|meds?)|drug dosage (?:schedule|timing))\b/,types:[`medicationschedule`]},{test:/\b(chord diagram|guitar chord\b|(?:how to (?:play|finger)|fingering for) .{0,20}chord|barre chord|power chord|open chord|chord shape\w*)\b/,types:[`chorddiagram`]},{test:/\b((?:baby|child|toddler|infant) (?:milestone\w*|developmental? milestone\w*)|developmental? milestone\w*|\d+[- ]month[- ]old milestone\w*|\d+[- ]year[- ]old milestone\w*|when (?:should|do) (?:babies|kids|toddlers|infants)\b)\b/,types:[`developmentmilestone`]},{test:/\b(argument map\b|arguments? (?:for and against\b|supporting and opposing)|philosophical argument\b|claim(?:s?) (?:and|with) (?:evidence|support\w*|objection\w*)|debate the (?:claim|motion|topic)\b|case for and against\b)\b/,types:[`argumentmap`]},{test:/\b((?:soccer|football|basketball|baseball|tennis) (?:formation\b|lineup\b|position\w*|play diagram|tactic\w*)|4-3-3\b|4-4-2\b|3-5-2\b|4-2-3-1\b|3-4-3\b|defensive (?:shift\b|formation\b)|starting (?:eleven\b|xi\b|lineup\b))\b/,types:[`sportspitch`]},{test:/\b(floor\s?plan\b|room layout\b|apartment layout\b|(?:house|home|office) (?:layout\b|floor plan)|room arrangement\b|furniture layout\b)\b/,types:[`floorplan`]},{test:/\b(medical (?:history|timeline|chronolog\w*)|clinical (?:history|course|timeline)|patient (?:history|chronolog\w*)|diagnosis timeline\b|treatment (?:history|timeline)|symptom (?:progression|history|chronolog\w*))\b/,types:[`clinicaltimeline`]},{test:/\b(research (?:finding\w*|result\w*|summary|paper summary)|what (?:does|did) (?:the research|studies|the study|the science) (?:say|show|find|reveal)\b|scientific (?:consensus|evidence|finding\w*)|meta-?analysis\b|randomized (?:controlled )?trial\b|clinical (?:evidence|finding\w*|trial\w*))\b/,types:[`researchsummary`]},{test:/\b(hourly itinerary|hour.?by.?hour|itinerary (?:for|of)\b|trip itinerary|travel itinerary|daily itinerary|day.?by.?day (?:plan|schedule|itinerary)|morning (?:to|through) (?:evening|night)|full day (?:plan|schedule|itinerary)|schedule (?:for|of) (?:my |a |the )?(?:trip|day|visit))\b/,types:[`agenda`]}];function it(e){let t=e.toLowerCase(),n=[];for(let e of rt)e.test.test(t)&&n.push(...e.types);return[...new Set(n)]}var at={datatable:`a data table`,diagramflow:`a flow diagram`,timeline:`a timeline`,codeblock:`a code block`,geomap:`a map`,gallery:`an image gallery`,pdfreader:`the document`,docview:`the document`,checklist:`a checklist`,howtosteps:`a step-by-step`,compare:`a side-by-side comparison`,quiz:`a quiz`,flashcard:`flashcards`,dictionary:`a definition`,recipecard:`a recipe`,dialogue:`a scripted dialogue`,variants:`variations`,translation:`a translation`,bracketbar:`a ranking`,stackedbars:`a stacked bar chart`,distinctioncard:`a distinction between the terms`,longread:`a long-form written piece`,ideaboard:`a board of ideas`,dosdonts:`a do's-and-don'ts list`,variantswitch:`the same content at several settings`,quizsession:`a graded quiz run`,analogymap:`an analogy`};function ot(e){return at[e]??`a ${e}`}function st(e){return e.length?`FORMAT REQUEST — the user explicitly asked for their answer in a specific FORM: ${[...new Set(e.map(ot))].join(`, `)}. Make that the LEAD block (position 0 or 1), built fully and completely; the rest of the canvas supports it. Never answer in a different shape than the one they named.`:``}function ct(e){if(!e)return``;for(let t=e.length-1;t>=0;t--)if(e[t].role===`user`)return e[t].content;return``}function lt(e,t){let n=e.toLowerCase(),r=ct(t).toLowerCase(),i={};for(let e of nt){let t=0;e.test.test(n)&&(t+=e.weight),r&&e.test.test(r)&&(t+=e.weight*.4),t>0&&(i[e.shape]=(i[e.shape]??0)+t)}return i}export{ye as _,tt as a,se as b,Q as c,We as d,ze as f,Se as g,Fe as h,et as i,Ze as l,Pe as m,lt as n,Xe as o,Be as p,st as r,Ye as s,it as t,Je as u,me as v,O as x,ce as y};
@@ -1 +0,0 @@
1
- var e=`mavea.live.modelSpeed.v1`;function t(){try{let t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch{return{}}}function n(t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function r(e,r,i){if(!e||i<400||r<200)return;let a=r/4/(i/1e3);if(!Number.isFinite(a)||a<=0)return;let o=t(),s=o[e];o[e]={tps:s?s.tps*.6+a*.4:a,n:(s?.n??0)+1},n(o)}function i(e){let n=t()[e];return!n||n.n<2?`standard`:n.tps<28?`slow`:n.tps>75?`fast`:`standard`}export{i as n,r as t};
@@ -1 +0,0 @@
1
- var e=`mavea-course-v1`,t=e,n=`mavea-course-frames-v1`,r=`mavea-course-checkpoints-v1`,i=60,a=15e4,o=4096,s=.6;function c(e){return typeof e==`string`&&e.trim().length>0}function l(e){return Array.isArray(e)?e.filter(c).map(e=>e.trim()):[]}function u(e){if(!Array.isArray(e))return;let t=e.map(e=>{if(!e||typeof e!=`object`)return null;let t=e;return!c(t.question)||!c(t.answer)?null:{question:t.question.trim(),answer:t.answer.trim()}}).filter(e=>e!==null);return t.length?t:void 0}function d(e){if(!e||typeof e!=`object`)return null;let t=e;if(!c(t.id)||!c(t.title)||!c(t.goal))return null;let n=l(t.objectives);if(!n.length)return null;let r=u(t.checkpoint);return{id:t.id.trim(),title:t.title.trim(),goal:t.goal.trim(),objectives:n,concepts:l(t.concepts),...typeof t.minutes==`number`&&Number.isFinite(t.minutes)&&t.minutes>0?{minutes:Math.round(t.minutes)}:{},...r?{checkpoint:r}:{}}}var f=new Set([`beginner`,`intermediate`,`expert`]);function p(e){if(!e||typeof e!=`object`)return null;let t=e;if(!c(t.id)||!c(t.topic)||!c(t.title))return null;let n=Array.isArray(t.lessons)?t.lessons.map(d).filter(e=>e!==null):[];return n.length<3?null:{id:t.id.trim(),topic:t.topic.trim(),title:t.title.trim(),lessons:n,createdAt:typeof t.createdAt==`number`&&Number.isFinite(t.createdAt)?t.createdAt:0,model:typeof t.model==`string`?t.model:``,...c(t.subtitle)?{subtitle:t.subtitle.trim()}:{},...typeof t.level==`string`&&f.has(t.level)?{level:t.level}:{}}}function m(e){if(!e||typeof e!=`object`)return;let t=e,n=typeof t.total==`number`&&t.total>=0?Math.round(t.total):0;if(!n)return;let r=typeof t.correct==`number`&&t.correct>=0?Math.round(t.correct):0,i=Array.isArray(t.missedFronts)?t.missedFronts.filter(c):[];return{total:n,correct:Math.min(r,n),missedFronts:i,at:typeof t.at==`number`&&Number.isFinite(t.at)?t.at:0}}function h(e){if(!e||typeof e!=`object`)return null;let t=e,n=m(t.checkpoint);return{status:t.status===`done`?`done`:`todo`,...n?{checkpoint:n}:{},lastAt:typeof t.lastAt==`number`&&Number.isFinite(t.lastAt)?t.lastAt:0}}function g(e){return{courseId:e,current:0,lessons:{}}}function _(e,t){if(!t||typeof t!=`object`)return g(e);let n=t,r=typeof n.current==`number`&&n.current>=0?Math.round(n.current):0,i={};if(n.lessons&&typeof n.lessons==`object`)for(let[e,t]of Object.entries(n.lessons)){let n=h(t);n&&(i[e]=n)}return{courseId:e,current:r,lessons:i}}function v(e){let t={courses:[],progress:{}};if(!e||typeof e!=`object`)return t;let n=e,r=Array.isArray(n.courses)?n.courses.map(p).filter(e=>e!==null).slice(0,i):[],a=new Set(r.map(e=>e.id)),o={};if(n.progress&&typeof n.progress==`object`)for(let[e,t]of Object.entries(n.progress))a.has(e)&&(o[e]=_(e,t));return{courses:r,progress:o}}var y=null,b=0;function x(){try{if(typeof localStorage>`u`)return{courses:[],progress:{}};let t=localStorage.getItem(e);return t?v(JSON.parse(t)):{courses:[],progress:{}}}catch{return{courses:[],progress:{}}}}function S(){return y||=x(),y}function C(n){y=n,b+=1;try{typeof localStorage<`u`&&localStorage.setItem(e,JSON.stringify(n))}catch{}try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(t,{detail:n}))}catch{}}function w(){b+=1;try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(t))}catch{}}function T(){return b}function E(e){return typeof window>`u`?()=>{}:(window.addEventListener(t,e),()=>window.removeEventListener(t,e))}var D=null;function O(e){return!!e&&typeof e==`object`&&Array.isArray(e.blocks)}function k(e){return e===`replace`||e===`augment`||e===`refine`}function A(e,t){if(!e||typeof e!=`object`)return null;let n=e;if(![`circle`,`underline`,`point`,`highlight`,`rising`,`falling`,`bracket`,`note`,`connect`].includes(n.kind)||typeof n.at!=`string`||!n.at)return null;let r={kind:n.kind,at:n.at};if(typeof n.to==`string`&&n.to&&(r.to=n.to),typeof n.label==`string`&&n.label&&(r.label=n.label),r.kind===`note`&&!r.label)return null;if((n.color===`key`||n.color===`cool`)&&(r.color=n.color),r.kind===`connect`){let e=typeof n.onIndex==`number`?Math.round(n.onIndex):-1;if(!r.to||e<0||e>=t)return null;r.onIndex=e}return r}function j(e,t){if(!Array.isArray(e))return[];let n=[];for(let r of e){if(!r||typeof r!=`object`)continue;let e=r;if(typeof e.index!=`number`)continue;let i={index:e.index,...typeof e.say==`string`?{say:e.say}:{},...typeof e.saySpoken==`string`?{saySpoken:e.saySpoken}:{}},a=A(e.mark,t);if(a&&(i.mark=a),Array.isArray(e.marks)){let n=e.marks.map(e=>A(e,t)).filter(e=>e!==null);n.length&&(i.marks=n)}n.push(i)}return n}function M(e){if(!e||typeof e!=`object`)return null;let t=e;return!O(t.spec)||t.spec.blocks.length===0||typeof t.question!=`string`?null:{question:t.question,narration:typeof t.narration==`string`?t.narration:``,...typeof t.spoken==`string`?{spoken:t.spoken}:{},mode:k(t.mode)?t.mode:`replace`,...typeof t.topicShift==`boolean`?{topicShift:t.topicShift}:{},tour:j(t.tour,t.spec.blocks.length),spec:t.spec,at:typeof t.at==`number`&&Number.isFinite(t.at)?t.at:0}}function N(e){if(!e||typeof e!=`object`)return null;let t=e;if(!c(t.key)||!c(t.courseId)||!c(t.lessonId))return null;let n=M(t.frame);return n?{key:t.key.trim(),courseId:t.courseId.trim(),lessonId:t.lessonId.trim(),frame:n,at:typeof t.at==`number`&&Number.isFinite(t.at)?t.at:0}:null}function P(e){let t=JSON.stringify(e,(e,t)=>typeof t==`string`&&t.length>o&&t.startsWith(`data:`)?``:t);return JSON.parse(t)}function F(e,t){return`${e}::${t}`}function I(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(n);if(!e)return[];let t=JSON.parse(e);return(Array.isArray(t.entries)?t.entries.map(N).filter(e=>e!==null):[]).slice(-16)}catch{return[]}}function L(){return D||=I(),D}function R(e){D=e;try{typeof localStorage<`u`&&localStorage.setItem(n,JSON.stringify({entries:e}))}catch{}}function z(e){try{let t=L(),n=t.filter(t=>e.has(t.courseId));n.length!==t.length&&R(n)}catch{}}var B=null;function V(e){if(!e||typeof e!=`object`)return null;let t=e;if(!c(t.key)||!c(t.courseId)||!c(t.lessonId))return null;let n=u(t.questions);return n?{key:t.key.trim(),courseId:t.courseId.trim(),lessonId:t.lessonId.trim(),questions:n,at:typeof t.at==`number`&&Number.isFinite(t.at)?t.at:0}:null}function H(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(r);if(!e)return[];let t=JSON.parse(e);return(Array.isArray(t.entries)?t.entries.map(V).filter(e=>e!==null):[]).slice(-200)}catch{return[]}}function U(){return B||=H(),B}function W(e){B=e;try{typeof localStorage<`u`&&localStorage.setItem(r,JSON.stringify({entries:e}))}catch{}}function G(e){try{let t=U(),n=t.filter(t=>e.has(t.courseId));n.length!==t.length&&W(n)}catch{}}function K(){return[...S().courses].sort((e,t)=>t.createdAt-e.createdAt)}function q(e){return S().courses.find(t=>t.id===e)}function J(e){return S().progress[e]??g(e)}function Y(e,t){let n=v({courses:e,progress:t});if(!n.courses.length)return 0;let r=S(),i=new Map(r.courses.map(e=>[e.id,e])),a={...r.progress};for(let e of n.courses){let t=i.get(e.id);(!t||e.createdAt>=t.createdAt)&&(i.set(e.id,e),n.progress[e.id]&&(a[e.id]=n.progress[e.id]))}return C(v({courses:[...i.values()],progress:a})),n.courses.length}function X(e){return e.total>0&&e.correct/e.total>=s}function Z(e,t){try{let n=F(e,t),r=L(),i=r.findIndex(e=>e.key===n);if(i<0)return;let a=r.slice(0,i).concat(r.slice(i+1)),o={...r[i],at:Date.now()};return R([...a,o]),o.frame}catch{return}}function Q(e,t){try{let n=F(e,t),r=U(),i=r.findIndex(e=>e.key===n);if(i<0)return;let a=r.slice(0,i).concat(r.slice(i+1)),o={...r[i],at:Date.now()};return W([...a,o]),o.questions}catch{return}}function $(e,t){try{let n=F(e,t),r=U(),i=r.findIndex(e=>e.key===n);return i<0?void 0:r[i].questions}catch{return}}function ee(e){try{let t=S(),n=[e,...t.courses.filter(t=>t.id!==e.id)].slice(0,i),r=new Set(n.map(e=>e.id)),a={};for(let[e,n]of Object.entries(t.progress))r.has(e)&&(a[e]=n);a[e.id]||(a[e.id]=g(e.id)),C({courses:n,progress:a}),z(r),G(r)}catch{}}function te(e){try{let t=S(),n=t.courses.filter(t=>t.id!==e),r={...t.progress};delete r[e],C({courses:n,progress:r});let i=new Set(n.map(e=>e.id));z(i),G(i)}catch{}}function ne(e,t){try{let n=S(),r=n.progress[e]??g(e),i={...n.progress,[e]:{...r,current:Math.max(0,Math.round(t))}};C({...n,progress:i})}catch{}}function re(e,t,n,r=Date.now()){try{let i=S(),a=i.progress[e]??g(e),o=a.lessons[t]?.status===`done`||X(n)?`done`:`todo`,s={...a.lessons,[t]:{status:o,checkpoint:n,lastAt:r}};C({...i,progress:{...i.progress,[e]:{...a,lessons:s}}})}catch{}}function ie(e,t,n){try{let r=P(n),i=F(e,t),o={key:i,courseId:e,lessonId:t,frame:r,at:Date.now()};if(JSON.stringify(o).length>a)return;R([...L().filter(e=>e.key!==i),o].slice(-16))}catch{}}function ae(e,t,n){try{if(!n.length)return;let r=F(e,t),i={key:r,courseId:e,lessonId:t,questions:n,at:Date.now()};W([...U().filter(e=>e.key!==r),i].slice(-200)),w()}catch{}}export{E as _,Z as a,K as c,X as d,$ as f,ne as g,ee as h,Q as i,J as l,te as m,ae as n,q as o,re as p,ie as r,T as s,t,Y as u};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./friendlyAsk-BBdRZIar.js";import{n,t as r}from"./contentVault-xfUwSJ3i.js";var i={"15min":15,hourly:60,"6h":360,daily:1440,manual:1/0},a={daily:1440,weekly:10080,"on-change":1/0,manual:1/0};function o(e,t){return Number.isFinite(t)?e+t*6e4:2**53-1}function s(e){return e===`manual`?0:Math.round(43200/i[e])}function c(e,t){let n=e.window;if(n){if(t<n.startAt)return n.startAt;if(t>n.endAt)return 2**53-1}return o(t,i[e.data])}var l=`mavea-dash-opens-v1`,u=2592e6;function d(e){return!!e&&typeof e==`object`}function f(e,t){if(!d(e))return{};let n=t-u,r={};for(let[t,i]of Object.entries(e)){if(!t||!Array.isArray(i))continue;let e=i.filter(e=>typeof e==`number`&&Number.isFinite(e)&&e>=n).slice(-30);e.length&&(r[t]=e)}return r}var p;function ee(e){try{if(typeof localStorage>`u`)return{};let t=localStorage.getItem(l);return t?f(JSON.parse(t),e):{}}catch{return{}}}function m(e=Date.now()){return p??=ee(e),p}function h(e){p=e;try{typeof localStorage<`u`&&localStorage.setItem(l,JSON.stringify(e))}catch{}}function te(e,t=Date.now()){if(!e)return;let n=m(t),r=[...n[e]??[],t].filter(e=>e>=t-u).slice(-30);h({...n,[e]:r})}function ne(e,t,n=Date.now()){return(m(n)[e]??[]).filter(e=>e>=t).length}function g(e){let t=m(),n={};for(let[r,i]of Object.entries(t))e.has(r)&&(n[r]=i);h(n)}var re=12,_=new Map,ie=0,v=new Set;function y(){for(let e of v)e()}function ae(e){return v.add(e),()=>v.delete(e)}function oe(e,t=Date.now()){ie+=1;let n={id:`run-${ie}`,dashboardId:e,startedAt:t,steps:[{name:`scheduled`,ok:!0,at:t}]},r=_.get(e)??[];return _.set(e,[n,...r].slice(0,re)),y(),n}function se(e,t,n,r={}){e&&(e.steps.push({name:t,ok:n,at:r.at??Date.now(),...r.count===void 0?{}:{count:r.count},...r.detail?{detail:r.detail}:{}}),y())}function ce(e,t){e&&(e.endedAt=t.at??Date.now(),t.outcome&&(e.outcome=t.outcome),t.failure&&(e.failure=t.failure),t.attempts!==void 0&&(e.attempts=t.attempts),y())}var le=[];function ue(e){return _.get(e)??le}function de(e){e===void 0?_.clear():_.delete(e),y()}var fe=`mavea-dashboards`,b=`observations`,pe=1,me=200;function x(){return typeof indexedDB<`u`}var S=null;function C(){return S||(S=new Promise((e,t)=>{let n=indexedDB.open(fe,pe);n.onupgradeneeded=()=>{let e=n.result;if(!e.objectStoreNames.contains(b)){let t=e.createObjectStore(b,{keyPath:`id`});t.createIndex(`byTarget`,[`dashboardId`,`targetId`,`observedAt`]),t.createIndex(`byDashboard`,`dashboardId`)}},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error??Error(`indexedDB open failed`))}),S.catch(()=>{S=null}),S)}function w(e){return new Promise((t,n)=>{e.oncomplete=()=>t(),e.onerror=()=>n(e.error??Error(`indexedDB transaction failed`)),e.onabort=()=>n(e.error??Error(`indexedDB transaction aborted`))})}async function he(e,t,r,i=Date.now(),a){if(x())try{let o=await n({data:r,...a?.length?{receipts:a}:{}}),s=(await C()).transaction(b,`readwrite`),c=s.objectStore(b),l={id:`${e}:${t}:${i}`,dashboardId:e,targetId:t,observedAt:i,payload:o};c.put(l),await w(s),await ge(e,t)}catch{}}async function ge(e,t){try{let n=(await C()).transaction(b,`readwrite`),r=n.objectStore(b).index(`byTarget`),i=IDBKeyRange.bound([e,t,0],[e,t,1/0]),a=[];await new Promise((e,t)=>{let n=r.openKeyCursor(i,`next`);n.onsuccess=()=>{let t=n.result;if(!t)return e();a.push(t.primaryKey),t.continue()},n.onerror=()=>t(n.error??Error(`cursor failed`))});let o=a.length-me;if(o>0){let e=n.objectStore(b);for(let t of a.slice(0,o))e.delete(t)}await w(n)}catch{}}async function _e(e){if(x())try{let t=(await C()).transaction(b,`readwrite`),n=t.objectStore(b).index(`byDashboard`),r=t.objectStore(b);await new Promise((t,i)=>{let a=n.openKeyCursor(IDBKeyRange.only(e));a.onsuccess=()=>{let e=a.result;if(!e)return t();r.delete(e.primaryKey),e.continue()},a.onerror=()=>i(a.error??Error(`cursor failed`))}),await w(t)}catch{}}function T(e){return e.state?e.state:e.lastRefreshedAt===null?{status:`pending`}:e.lastDataOutcome===`unverified`?{status:`degraded`,lastSuccessAt:e.lastRefreshedAt,failure:{kind:`ungrounded`},lastAttemptAt:e.lastRefreshedAt}:{status:`active`,lastSuccessAt:e.lastRefreshedAt}}function E(e){return{status:`active`,lastSuccessAt:e}}function D(e,t,n){let r=e.status===`active`||e.status===`degraded`?e.lastSuccessAt:void 0;return r===void 0?{status:`pending`,failure:t,lastAttemptAt:n}:{status:`degraded`,lastSuccessAt:r,failure:t,lastAttemptAt:n}}function ve(e){switch(e.kind){case`auth`:return`Your model rejected the key — reconnect it in Live, then check again.`;case`rate-limit`:return`Your model provider is rate-limiting right now. This retries itself shortly.`;case`network`:return`Couldn't reach your model. This retries itself once the connection is back.`;case`no-model`:return`No model is connected yet — connect one in Live and this starts checking.`;case`ungrounded`:return`No live source backed this up — the model may not have searched. Try a stronger model in Settings, or reword what to track.`;case`provider-unavailable`:return`Your model provider is unavailable right now. This retries itself shortly.`}}function ye(e){switch(e){case`no-model`:return{kind:`no-model`};case`unverified`:return{kind:`ungrounded`};case`failed`:return{kind:`network`};default:return null}}var be=e({DASHBOARDS_EVENT:()=>k,DASHBOARDS_QUOTA_EVENT:()=>A,MAX_METRICS:()=>12,MAX_WIDGETS:()=>12,addDashboard:()=>He,addWidget:()=>$e,appendSource:()=>rt,applyRefreshResult:()=>yt,blockToWidget:()=>Ge,clearDashboards:()=>Ye,clearOneShot:()=>_t,createBlankDashboard:()=>We,ensureFirstCheck:()=>pt,foldInto:()=>$,getDashboard:()=>Ve,getDashboards:()=>Be,hasDroppedWrite:()=>Ee,invalidate:()=>J,markAiRefreshed:()=>mt,markDataRefreshed:()=>ut,markDataRetry:()=>ft,markTrackerFailure:()=>dt,markVerdictFailed:()=>lt,mergeDashboards:()=>Ue,newDashboardId:()=>N,removeDashboard:()=>Je,removeWidget:()=>Qe,reorderWidgets:()=>Xe,setCadenceWindow:()=>ht,setOneShot:()=>gt,setVerdict:()=>ct,setWidgetOrder:()=>tt,setWidgetRefreshQuery:()=>et,setWidgetSpan:()=>Ze,updateCadence:()=>qe,updateDashboard:()=>Ke,updateMetricValue:()=>ot,updateTripwireStates:()=>st,whenDashboardsHydrated:()=>K}),O=`mavea-dashboards-v1`,k=O,A=`${O}:quota`,j=24,xe=12,Se=4096,Ce=60,M=null,we=0,Te=!1;function Ee(){return Te}function N(){try{let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID()}catch{}return we+=1,`dash-${we.toString(36)}-${Math.floor(Math.random()*1e9).toString(36)}`}function De(e){let t=JSON.stringify(e,(e,t)=>typeof t==`string`&&t.length>Se&&t.startsWith(`data:`)?``:t);return JSON.parse(t)}function P(e){return!!e&&typeof e==`object`}function F(e,t){return typeof e==`number`&&Number.isFinite(e)?e:t}function I(e,t=``){return typeof e==`string`?e:t}function Oe(e){return e===`5min`?`15min`:I(e,`manual`)}function ke(e){if(!P(e))return null;let t=e.at,n=e.value;return typeof t!=`number`||!Number.isFinite(t)||typeof n!=`number`||!Number.isFinite(n)?null:{at:t,value:n}}var Ae=new Set([`auth`,`rate-limit`,`network`,`no-model`,`ungrounded`,`provider-unavailable`]);function L(e){if(!P(e))return;let t=P(e.failure)&&Ae.has(I(e.failure.kind))?{kind:I(e.failure.kind),...typeof e.failure.retryAt==`number`&&Number.isFinite(e.failure.retryAt)?{retryAt:e.failure.retryAt}:{}}:void 0,n=typeof e.lastAttemptAt==`number`&&Number.isFinite(e.lastAttemptAt)?e.lastAttemptAt:void 0,r=typeof e.lastSuccessAt==`number`&&Number.isFinite(e.lastSuccessAt)?e.lastSuccessAt:void 0;if(e.status===`pending`)return{status:`pending`,...t?{failure:t}:{},...n===void 0?{}:{lastAttemptAt:n}};if(e.status===`active`&&r!==void 0)return{status:`active`,lastSuccessAt:r};if(e.status===`degraded`&&t&&n!==void 0)return{status:`degraded`,failure:t,lastAttemptAt:n,...r===void 0?{}:{lastSuccessAt:r}}}function je(e){if(!P(e))return null;let t=(Array.isArray(e.history)?e.history:[]).map(ke).filter(e=>e!==null).slice(-60);return{...e,history:t.length?t:void 0}}function Me(e){if(!P(e))return;let t=e.startAt,n=e.endAt;if(!(typeof t!=`number`||!Number.isFinite(t))&&!(typeof n!=`number`||!Number.isFinite(n)||n<=t))return{label:I(e.label),startAt:t,endAt:n,origin:e.origin===`search`?`search`:`user`}}function Ne(e){if(!(!P(e)||typeof e.text!=`string`||!e.text))return{text:e.text,at:F(e.at,0)}}function Pe(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!P(n)||typeof n.expected!=`string`||!n.expected)continue;let e=n.result;(e===`hit`||e===`miss`||e===`unclear`)&&t.push({at:F(n.at,0),expected:n.expected,result:e,...typeof n.note==`string`&&n.note?{note:n.note}:{}})}return t.slice(-20)}function R(e,t){if(!e.window||t<=e.window.endAt)return e;let{window:n,...r}=e;return r}var z=new Set([`thesis`,`alignmentgauge`,`standingalerts`,`sourceslineage`]);function Fe(e,t,n){let r=n||t;return r?e.map(e=>{if(e.refreshQuery?.trim()||e.metricId||z.has(e.block.type))return e;let t=e.block.props?.title,n=typeof t==`string`&&t.trim()?`${r} — ${t.trim()}`:r;return{...e,refreshQuery:n}}):e}function Ie(e){if(!P(e))return null;let n=I(e.id);if(!n)return null;let r=P(e.thesis)?e.thesis:null,i=Array.isArray(e.widgets)?e.widgets.filter(e=>P(e)&&P(e.block)):[],a=P(e.cadence)?e.cadence:{},o=P(e.alerts)?e.alerts:{},s=Le(e.lastVerdict),c=I(e.title,`Untitled`),l=t(I(e.question)),u=Me(a.window),d=Ne(e.prediction),f=Pe(e.predictionHistory);return{id:n,title:c,question:l,thesis:{text:I(r?.text),saidAt:F(r?.saidAt,0)},tripwires:Array.isArray(e.tripwires)?e.tripwires:[],metrics:Array.isArray(e.metrics)?e.metrics.map(je).filter(e=>e!==null):[],sources:Array.isArray(e.sources)?e.sources:[],widgets:Fe(i.slice(0,12),c,l),cadence:{data:Oe(a.data),ai:I(a.ai,`manual`),...u?{window:u}:{}},smartTrigger:typeof e.smartTrigger!=`boolean`||e.smartTrigger,alerts:{inApp:o.inApp!==!1,push:o.push===!0},...typeof e.topic==`string`&&e.topic?{topic:e.topic}:{},createdAt:F(e.createdAt,0),updatedAt:F(e.updatedAt,0),...typeof e.lastTouchedByUserAt==`number`&&Number.isFinite(e.lastTouchedByUserAt)?{lastTouchedByUserAt:e.lastTouchedByUserAt}:{},nextDataAt:F(e.nextDataAt,0),nextAiAt:F(e.nextAiAt,2**53-1),...typeof e.oneShotAt==`number`&&Number.isFinite(e.oneShotAt)?{oneShotAt:e.oneShotAt,oneShotLabel:I(e.oneShotLabel)}:{},...d?{prediction:d}:{},...f.length?{predictionHistory:f}:{},lastRefreshedAt:typeof e.lastRefreshedAt==`number`&&Number.isFinite(e.lastRefreshedAt)?e.lastRefreshedAt:null,...e.lastDataOutcome===`updated`||e.lastDataOutcome===`no-change`||e.lastDataOutcome===`unverified`?{lastDataOutcome:e.lastDataOutcome}:{},...L(e.state)?{state:L(e.state)}:{},...s?{lastVerdict:s}:{},...typeof e.lastVerdictAttemptAt==`number`&&Number.isFinite(e.lastVerdictAttemptAt)?{lastVerdictAttemptAt:e.lastVerdictAttemptAt}:{},...typeof e.lastVerdictError==`string`&&e.lastVerdictError?{lastVerdictError:e.lastVerdictError}:{}}}function Le(e){return!P(e)||typeof e.text!=`string`||!e.text?null:{text:e.text,at:F(e.at,0),grounded:e.grounded===!0,...Array.isArray(e.sources)?{sources:e.sources}:{},...typeof e.tripwireId==`string`?{tripwireId:e.tripwireId}:{}}}var B=!1,V=0;function H(e){return Array.isArray(e)?e.map(Ie).filter(e=>e!==null):[]}async function U(e){let t=++V;try{if(typeof localStorage>`u`)return;let r=await n(e);if(t!==V)return;localStorage.setItem(O,r)}catch(e){let t=e;if(t&&(t.name===`QuotaExceededError`||t.name===`NS_ERROR_DOM_QUOTA_REACHED`||t.code===22||t.code===1014)){Te=!0;try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(A))}catch{}}}}function Re(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(O);if(!e)return[];let t=H(JSON.parse(e));return t.length&&U(t),t}catch{return[]}}async function W(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(O);if(!e)return;try{JSON.parse(e);return}catch{}let t=H(await r(e));if(B)return;M=t,B=!0,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(k,{detail:t}))}catch{}}var G=W();function K(){return G}function q(){return M??=Re(),M}function J(){let e=M;M=null,B=!1,G=W();try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(O);if(!e)return;JSON.parse(e)}catch{M=e}}function Y(e){return e.length<=j?e:[...e].sort((e,t)=>(t.lastTouchedByUserAt??t.updatedAt)-(e.lastTouchedByUserAt??e.updatedAt)).slice(0,j)}function X(e){let t=H(e);M=t,B=!0,U(t);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(k,{detail:t}))}catch{}}function Z(e,t,n=Date.now(),r={}){let i=!1,a=q().map(a=>a.id===e?(i=!0,{...t(a),updatedAt:n,...r.userTouch?{lastTouchedByUserAt:n}:{}}):a);i&&X(a)}var Q=null,ze=null;function Be(){let e=q();return(ze!==e||Q===null)&&(Q=[...e].sort((e,t)=>(t.lastTouchedByUserAt??t.createdAt)-(e.lastTouchedByUserAt??e.createdAt)),ze=e),Q}function Ve(e){return q().find(t=>t.id===e)??null}function He(e){X(Y([De({...e,lastTouchedByUserAt:e.lastTouchedByUserAt??e.updatedAt}),...q().filter(t=>t.id!==e.id)]))}function Ue(e){let t=H(e);if(!t.length)return 0;let n=new Map(q().map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);(!t||e.updatedAt>=t.updatedAt)&&n.set(e.id,e)}return X(Y([...n.values()])),t.length}function We(e){let t=e.now??Date.now();return{id:N(),title:e.title||`Untitled dashboard`,question:e.question??``,thesis:{text:``,saidAt:t},tripwires:[],metrics:[],sources:[{kind:`ORIGIN`,conversationId:`pin`,title:e.title||`Pinned cards`,contributed:`Started by pinning a card.`,at:t}],widgets:[],cadence:{data:`manual`,ai:`manual`},smartTrigger:!1,alerts:{inApp:!0,push:!1},...e.topic?{topic:e.topic}:{},createdAt:t,updatedAt:t,nextDataAt:2**53-1,nextAiAt:2**53-1,lastRefreshedAt:null}}function Ge(e,t=`pin`,n){let r=new Set([`chart`,`plot`,`dualaxis`,`bars`,`timeline`,`breakdown`,`table`]);return{id:`w-pin-`+Math.random().toString(36).slice(2,9),block:e,span:r.has(e.type)?2:1,fromSource:t,...n?.trim()?{refreshQuery:n.trim()}:{}}}function Ke(e,t){Z(e,e=>({...e,...t}),void 0,{userTouch:!0})}function qe(e,t,n=Date.now()){Z(e,e=>{let r={...e.cadence,...t};return{...e,cadence:r,...t.data===void 0?{}:{nextDataAt:c(r,n)},...t.ai===void 0?{}:{nextAiAt:o(n,a[r.ai])}}},n,{userTouch:!0})}function Je(e){let t=q().filter(t=>t.id!==e);t.length!==q().length&&(X(t),g(new Set(t.map(e=>e.id))),de(e),_e(e))}function Ye(){q().length!==0&&(X([]),g(new Set))}function Xe(e,t,n){Z(e,e=>{let r=[...e.widgets];if(t<0||t>=r.length||n<0||n>=r.length)return e;let[i]=r.splice(t,1);return r.splice(n,0,i),{...e,widgets:r}},void 0,{userTouch:!0})}function Ze(e,t,n){Z(e,e=>({...e,widgets:e.widgets.map(e=>e.id===t?{...e,span:n}:e)}),void 0,{userTouch:!0})}function Qe(e,t){Z(e,e=>({...e,widgets:e.widgets.filter(e=>e.id!==t)}),void 0,{userTouch:!0})}function $e(e,t,n={}){let r=Array.isArray(t)?t:[t];r.length!==0&&Z(e,e=>{let t=Math.max(0,Math.min(n.at??e.widgets.length,e.widgets.length)),i=[...e.widgets.slice(0,t),...r,...e.widgets.slice(t)],a=i;if(i.length>12){let e=i.filter(e=>!z.has(e.block.type)),t=i.length-12;if(e.length>=t){let n=new Set(e.slice(-t).map(e=>e.id));a=i.filter(e=>!n.has(e.id))}else a=i.slice(0,12)}return{...e,widgets:a,...n.source?{sources:[...e.sources,n.source].slice(-nt)}:{}}},void 0,{userTouch:!0})}function et(e,t,n){let r=n.trim();if(!r||t.length===0)return;let i=new Set(t);Z(e,e=>({...e,widgets:e.widgets.map(e=>i.has(e.id)?{...e,refreshQuery:r}:e)}))}function tt(e,t){Z(e,e=>{let n=new Map(e.widgets.map(e=>[e.id,e])),r=t.map(e=>n.get(e)).filter(e=>!!e),i=new Set(r.map(e=>e.id)),a=e.widgets.filter(e=>!i.has(e.id));return{...e,widgets:[...r,...a]}},void 0,{userTouch:!0})}var nt=24;function rt(e,t){Z(e,e=>({...e,sources:[...e.sources,t].slice(-24)}),void 0,{userTouch:!0})}var it=12;function $(e,t){Z(e,e=>({...e,metrics:[...e.metrics,...t.metrics].slice(0,12),tripwires:[...e.tripwires,...t.tripwires].slice(0,12),widgets:[...e.widgets,...t.widgets].slice(0,12),sources:[...e.sources,t.source].slice(-24)}),void 0,{userTouch:!0})}function at(e,t,n){if(n===null)return e;let r=[...e??[],{at:t,value:n}];return r.length>Ce?r.slice(-60):r}function ot(e,t,n,r,i,a=Date.now()){Z(e,e=>({...e,metrics:e.metrics.map(e=>e.id===t?{...e,lastValue:n,lastRaw:r,origin:i,asOf:a,history:at(e.history,a,n)}:e)}),a,{userTouch:i===`user`})}function st(e,t,n=Date.now()){Z(e,e=>({...e,tripwires:t}),n)}function ct(e,t,n=Date.now()){Z(e,e=>({...e,lastVerdict:t,lastVerdictAttemptAt:n,lastVerdictError:void 0}),n)}function lt(e,t,n){Z(e,e=>({...e,lastVerdictAttemptAt:t,lastVerdictError:n}),t)}function ut(e,t=Date.now(),n=`updated`){Z(e,e=>{let r=R(e.cadence,t);return{...e,cadence:r,nextDataAt:c(r,t),lastRefreshedAt:t,lastDataOutcome:n,state:E(t)}})}function dt(e,t,n=Date.now()){Z(e,e=>({...e,state:D(T(e),t,n)}))}function ft(e,t){Z(e,e=>({...e,nextDataAt:t,...e.oneShotAt!==void 0&&e.oneShotAt<t?{oneShotAt:t}:{}}))}function pt(e,t=Date.now()){Z(e,e=>e.oneShotAt===void 0?{...e,oneShotAt:t,oneShotLabel:`first check`}:e)}function mt(e,t=Date.now()){Z(e,e=>({...e,nextAiAt:o(t,a[e.cadence.ai])}))}function ht(e,t,n=Date.now()){Z(e,e=>{let r=t?{...e.cadence,window:t}:{...e.cadence,window:void 0};return{...e,cadence:r,nextDataAt:c(r,n)}},n,{userTouch:t?.origin===`user`})}function gt(e,t,n,r=Date.now()){Z(e,e=>({...e,oneShotAt:t,oneShotLabel:n}),r,{userTouch:!0})}function _t(e,t=Date.now()){Z(e,e=>({...e,oneShotAt:void 0,oneShotLabel:void 0}),t)}var vt=3e5;function yt(e,t,n=Date.now()){Z(e,e=>{let r=new Map((t.values??[]).map(e=>[e.metricId,e])),i=new Map((t.blocks??[]).map(e=>[e.widgetId,e.block])),a=e.prediction,o=e.predictionHistory;if(t.grade&&a){let e={at:n,expected:a.text,result:t.grade.result,...t.grade.note?{note:t.grade.note}:{}};o=[...o??[],e].slice(-20),a=void 0}t.expects?.trim()&&(a={text:t.expects.trim(),at:n});let s=R(e.cadence,n),l=c(s,n),u=t.outcome===`unverified`&&e.lastDataOutcome!==`unverified`&&l!==2**53-1&&(!s.window||n>=s.window.startAt)?Math.min(l,n+vt):l;return{...e,cadence:s,metrics:e.metrics.map(e=>{let t=r.get(e.id);return t?{...e,lastValue:t.value,lastRaw:t.raw,origin:t.origin,asOf:n,history:at(e.history,n,t.value)}:e}),widgets:e.widgets.map(e=>{let t=i.get(e.id);return t?{...e,block:t}:e}),...t.tripwires?{tripwires:t.tripwires}:{},...t.consumedOneShot?{oneShotAt:void 0,oneShotLabel:void 0}:{},nextDataAt:u,lastRefreshedAt:n,lastDataOutcome:t.outcome,state:t.outcome===`unverified`?D(T(e),{kind:`ungrounded`},n):E(n),prediction:a,predictionHistory:o}},n)}export{be as A,ue as B,Je as C,tt as D,ct as E,K as F,ne as G,se as H,ye as I,i as J,te as K,ve as L,Ke as M,ot as N,et as O,st as P,T as R,N as S,ht as T,oe as U,ce as V,ae as W,c as X,s as Y,o as Z,mt as _,He as a,lt as b,Ge as c,pt as d,$ as f,J as g,Ee as h,xe as i,qe as j,Ze as k,_t as l,Be as m,A as n,$e as o,Ve as p,a as q,it as r,yt as s,k as t,We as u,ft as v,Qe as w,Ue as x,dt as y,he as z};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{r as t}from"./history-D2EH2X6D.js";import{t as n}from"./friendlyAsk-BBdRZIar.js";import{n as r,t as i}from"./contentVault-xfUwSJ3i.js";function a(e){return e.toLowerCase().replace(/['’]/g,``).replace(/[^a-z0-9]+/g,` `).trim()}function o(e,t){let n=t?.failOpen??!1;if(!e||!e.trim())return()=>n;let r=a(e),i=r.split(` `).filter(Boolean);return e=>{let t=a(e);if(!t)return!1;if(r.includes(t))return!0;let n=t.split(` `).filter(Boolean),o=n.length;if(o===0)return!1;let s=Math.ceil(o*.9),c=new Set(n);for(let e=0;e+o<=i.length;e++){let t=0;for(let n=0;n<o;n++)c.has(i[e+n])&&t++;if(t>=s)return!0}return!1}}var s=80,c=120,l=90,u=120,d=120,f=30,p=32,m=/\b(?:trauma(?:ti[sz](?:ed?|ing))?|ptsd|clinical depression|major depression|anxiety disorder|bipolar|narcissistic|borderline personality|attachment disorder|co-?dependent(?:ency)?|dissociat(?:e|ed|ion)|avoidant attachment|anxious attachment|emotional dysregulation|hypervigilance|love-?bombing|codependency|enmeshment|enmeshed|parentif(?:ied|ying)|scapegoat(?:ing)?|golden child)\b/i,h=new Set([`person`,`option`,`want`,`fear`,`constraint`,`tradeoff`,`contradiction`,`open_loop`,`action`,`value`,`question`]),g=new Set([`supports`,`tensions`,`depends_on`,`same_thread`,`blocks`]),_=new Set([`forming`,`stable`,`maybe`]),v=new Set([`said`,`inferred`]);function y(e,t){if(typeof e!=`string`)return null;let n=e.trim();return n?n.length>t?`${n.slice(0,t-1)}…`:n:null}function b(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=y(n.id,32);if(!r)return null;let i=h.has(n.kind)?n.kind:null;if(!i)return null;let a=y(n.label,s);if(!a)return null;let o=y(n.quote,c);if(!o||m.test(a)||m.test(o)||!t(o))return null;let l=_.has(n.status)?n.status:`stable`,u=v.has(n.confidence)?n.confidence:`said`,d=typeof n.weight==`number`?n.weight:1;return{id:r,kind:i,label:a,quote:o,status:l,confidence:u,weight:Math.max(1,Math.min(3,Math.round(d)))}}function x(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=y(n.from,32),i=y(n.to,32);if(!r||!i||t&&(!t.has(r)||!t.has(i))||r===i)return null;let a=g.has(n.kind)?n.kind:null;if(!a)return null;let o=typeof n.label==`string`?y(n.label,f)??void 0:void 0;return{from:r,to:i,kind:a,...o?{label:o}:{}}}function S(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=y(n.id,32);if(!r)return null;let i=y(n.label,p);if(!i||m.test(i))return null;let a=Array.isArray(n.atomIds)?n.atomIds:[],o=new Set,s=[];for(let e of a){let n=y(e,32);n&&t.has(n)&&!o.has(n)&&(o.add(n),s.push(n))}if(s.length===0)return null;let c=typeof n.weight==`number`?n.weight:1;return{id:r,label:i,atomIds:s,weight:Math.max(1,Math.min(3,Math.round(c)))}}function C(e,t){let n=null;if(e&&typeof e==`object`&&!Array.isArray(e))n=e;else if(typeof e==`string`){let t=e.match(/\{[\s\S]*\}/);if(!t)return null;try{n=JSON.parse(t[0])}catch{return null}}if(!n)return null;let r=y(n.center,l);if(!r)return null;let i=typeof n.title==`string`?y(n.title,60)??void 0:void 0,a=o(t,{failOpen:!0}),s=(Array.isArray(n.atoms)?n.atoms:[]).map(e=>b(e,a)).filter(e=>e!==null);if(s.length===0)return null;let c=new Set(s.map(e=>e.id)),f=(Array.isArray(n.links)?n.links:[]).map(e=>x(e,c)).filter(e=>e!==null),p=(Array.isArray(n.clusters)?n.clusters:[]).map(e=>S(e,c)).filter(e=>e!==null),h;if(n.unsaid&&typeof n.unsaid==`object`&&!Array.isArray(n.unsaid)){let e=n.unsaid,t=y(e.label,u),r=y(e.why,d);t&&r&&!m.test(t)&&!m.test(r)&&(h={label:t,why:r,confidence:`maybe`})}return{center:r,...i?{title:i}:{},atoms:s,links:f,...p.length?{clusters:p}:{},...h?{unsaid:h}:{}}}function w(e,t){let n=null;if(e&&typeof e==`object`&&!Array.isArray(e))n=e;else if(typeof e==`string`){let t=e.match(/\{[\s\S]*\}/);if(!t)return null;try{n=JSON.parse(t[0])}catch{return null}}if(!n)return null;let r=o(t,{failOpen:!0}),i=(Array.isArray(n.add)?n.add:[]).map(e=>b(e,r)).filter(e=>e!==null),a=(Array.isArray(n.addLinks)?n.addLinks:[]).map(e=>x(e)).filter(e=>e!==null);return i.length===0&&a.length===0?null:{add:i,addLinks:a}}var T=e({SESSION_STORAGE_KEY:()=>D,SESSION_TTL_MS:()=>O,SESSION_TURNS_CAP:()=>10,clearSession:()=>Z,hasSavedSession:()=>X,loadSession:()=>Y,saveSession:()=>q,whenSessionSettled:()=>J});function E(e){return e===`replace`||e===`augment`||e===`refine`}var D=`mavea-live-session-v1`,O=6048e5,k=6e5,A=4096;function j(e){let t=JSON.stringify(e,(e,t)=>typeof t==`string`&&t.length>A&&t.startsWith(`data:`)?``:t);return JSON.parse(t)}function M(e){return!!e&&typeof e==`object`&&Array.isArray(e.blocks)}function N(e){if(!e||typeof e!=`object`)return null;let t=e;return t.role!==`user`&&t.role!==`assistant`||typeof t.content!=`string`?null:{role:t.role,content:t.role===`user`?n(t.content):t.content}}function P(e,t){if(!e||typeof e!=`object`)return null;let n=e;if(![`circle`,`underline`,`point`,`highlight`,`rising`,`falling`,`bracket`,`note`,`connect`].includes(n.kind)||typeof n.at!=`string`||!n.at)return null;let r={kind:n.kind,at:n.at};if(typeof n.to==`string`&&n.to&&(r.to=n.to),typeof n.label==`string`&&n.label&&(r.label=n.label),r.kind===`note`&&!r.label)return null;if((n.color===`key`||n.color===`cool`)&&(r.color=n.color),r.kind===`connect`){let e=typeof n.onIndex==`number`?Math.round(n.onIndex):-1;if(!r.to||e<0||e>=t)return null;r.onIndex=e}return r}function F(e,t){if(!Array.isArray(e))return[];let n=[];for(let r of e){if(!r||typeof r!=`object`)continue;let e=r;if(typeof e.index!=`number`)continue;let i={index:e.index,...typeof e.say==`string`?{say:e.say}:{},...typeof e.saySpoken==`string`?{saySpoken:e.saySpoken}:{}},a=P(e.mark,t);if(a&&(i.mark=a),Array.isArray(e.marks)){let n=e.marks.map(e=>P(e,t)).filter(e=>e!==null);n.length&&(i.marks=n)}n.push(i)}return n}function I(e){if(!e||typeof e!=`object`)return null;let r=e;if(!M(r.spec)||r.spec.blocks.length===0||typeof r.question!=`string`)return null;let i=r.mind?C(r.mind):null,a={question:n(r.question),...typeof r.id==`string`&&r.id.trim()?{id:r.id}:{},narration:typeof r.narration==`string`?r.narration:``,...typeof r.spoken==`string`?{spoken:r.spoken}:{},mode:E(r.mode)?r.mode:`replace`,...typeof r.topicShift==`boolean`?{topicShift:r.topicShift}:{},tour:F(r.tour,r.spec.blocks.length),spec:r.spec,at:typeof r.at==`number`&&Number.isFinite(r.at)?r.at:0,...i?{mind:i}:{}};return a.id=t(a),a}var L=null,R=!1,z=null,B=0,V=0;function H(e){let t=e;if(!t||typeof t!=`object`||t.v!==1||typeof t.savedAt!=`number`||!Number.isFinite(t.savedAt)||!Array.isArray(t.frames))return null;let n=t.frames.map(I).filter(e=>e!==null).slice(-10);if(!n.length)return null;let r=(Array.isArray(t.history)?t.history:[]).map(N).filter(e=>e!==null);return{v:1,savedAt:t.savedAt,history:r,frames:n}}async function U(e){let t=++V;try{if(typeof localStorage>`u`)return;let n=await r(e);if(t!==V)return;localStorage.setItem(D,n)}catch{}}function W(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(D);if(!e)return null;let t=H(JSON.parse(e));return t&&U(t),t}catch{return null}}var G=null;function K(){return R?Promise.resolve():G||(G=(async()=>{try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(D);if(!e)return;let t,n=!1;try{t=H(JSON.parse(e)),n=t!==null}catch{t=H(await i(e))}if(R)return;L=t,t&&(z=t,n&&U(t))}catch{}finally{R=!0,G=null}})(),G)}K();function q(e,t,n=Date.now()){if(!R){let r=B;K().then(()=>{r===B&&(R=!0,q(e,t,n))});return}try{if(typeof localStorage>`u`)return;if(!t.length){Z();return}let r=z&&n-z.savedAt<=6048e5?z:null,i=r?.frames.length?r.frames[r.frames.length-1]:null,a=!!i&&!t.some(e=>e.at===i.at),o=a?[...r.frames,...t]:t,s=a?[...r.history,...e]:e,c=j(o.slice(-10)).map(I).filter(e=>e!==null),l={v:1,savedAt:n,history:s.slice(-20).map(N).filter(e=>e!==null),frames:c},u=JSON.stringify(l);for(;u.length>k&&c.length>1;)c=c.slice(1),l={...l,frames:c},u=JSON.stringify(l);if(u.length>k)return;L=l,R=!0,U(l)}catch{}}function J(e=1200){return R?Promise.resolve():Promise.race([K(),new Promise(t=>setTimeout(t,e))]).then(()=>void 0)}function Y(e=Date.now()){let t=L??W();return t&&!L&&(L=t,R=!0),t?e-t.savedAt>6048e5?null:t:(K(),null)}function X(){if(L)return!0;try{return typeof localStorage<`u`&&!!localStorage.getItem(`mavea-live-session-v1`)}catch{return!1}}function Z(){L=null,z=null,R=!0,B++,V++;try{typeof localStorage<`u`&&localStorage.removeItem(D)}catch{}}export{q as a,w as c,Y as i,Z as n,T as o,X as r,C as s,D as t};