semiotic 3.8.0 → 3.8.2

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 (331) hide show
  1. package/CLAUDE.md +14 -9
  2. package/README.md +56 -55
  3. package/ai/behaviorContracts.cjs +9 -0
  4. package/ai/dist/mcp-server.js +240 -30
  5. package/ai/schema.json +616 -42
  6. package/ai/surface-manifest.json +3 -2
  7. package/ai/system-prompt.md +7 -3
  8. package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
  9. package/dist/chunk-OrdinalBrushOverlay-PXHQYDB2.module.min.js +2 -0
  10. package/dist/chunk-XYBrushOverlay-ECZJJLAJ.module.min.js +1 -0
  11. package/dist/chunk-XYBrushOverlay-EP2SV3UI.module.min.js +2 -0
  12. package/dist/chunk-chunk-255KDHW5.module.min.js +1 -0
  13. package/dist/chunk-chunk-27HVVXS6.module.min.js +1 -0
  14. package/dist/chunk-chunk-2CXCXRB4.module.min.js +1 -0
  15. package/dist/chunk-chunk-2JGJ5GUG.module.min.js +2 -0
  16. package/dist/chunk-chunk-2UN3ANRN.module.min.js +2 -0
  17. package/dist/chunk-chunk-2VUEY5TH.module.min.js +1 -0
  18. package/dist/chunk-chunk-2WVCH4PL.module.min.js +1 -0
  19. package/dist/chunk-chunk-5UKL5W76.module.min.js +2 -0
  20. package/dist/chunk-chunk-5WEFWNUW.module.min.js +2 -0
  21. package/dist/chunk-chunk-6F6GEAQU.module.min.js +1 -0
  22. package/dist/chunk-chunk-7LHMKRKE.module.min.js +2 -0
  23. package/dist/chunk-chunk-BHYTYMY2.module.min.js +2 -0
  24. package/dist/chunk-chunk-C6EJ4IOD.module.min.js +2 -0
  25. package/dist/chunk-chunk-CA3YDW6F.module.min.js +1 -0
  26. package/dist/chunk-chunk-CP3EN6KZ.module.min.js +1 -0
  27. package/dist/chunk-chunk-CYIML3AV.module.min.js +2 -0
  28. package/dist/chunk-chunk-DNY43POY.module.min.js +1 -0
  29. package/dist/chunk-chunk-DSNGDNJY.module.min.js +1 -0
  30. package/dist/chunk-chunk-E7MIQX7D.module.min.js +2 -0
  31. package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
  32. package/dist/chunk-chunk-ES4DCG3L.module.min.js +1 -0
  33. package/dist/chunk-chunk-FAKO3RGQ.module.min.js +2 -0
  34. package/dist/chunk-chunk-FYY2ACNJ.module.min.js +2 -0
  35. package/dist/chunk-chunk-G7WFWHAD.module.min.js +2 -0
  36. package/dist/chunk-chunk-GMQ5AYTD.module.min.js +1 -0
  37. package/dist/chunk-chunk-H4PPRW6N.module.min.js +1 -0
  38. package/dist/chunk-chunk-IFYPMWKY.module.min.js +1 -0
  39. package/dist/chunk-chunk-J3ELI22J.module.min.js +1 -0
  40. package/dist/chunk-chunk-J3QOW4OE.module.min.js +0 -0
  41. package/dist/chunk-chunk-J3XWETBJ.module.min.js +2 -0
  42. package/dist/chunk-chunk-JCG72SGW.module.min.js +2 -0
  43. package/dist/{semiotic-ai-chunk-OG7BQUUW.module.min.js → chunk-chunk-JJ2OOIET.module.min.js} +0 -1
  44. package/dist/chunk-chunk-KTWEBFMX.module.min.js +2 -0
  45. package/dist/chunk-chunk-L6D3I3V7.module.min.js +2 -0
  46. package/dist/chunk-chunk-M337NY6L.module.min.js +1 -0
  47. package/dist/chunk-chunk-NO4MCQVD.module.min.js +1 -0
  48. package/dist/chunk-chunk-ODUZEEBH.module.min.js +2 -0
  49. package/dist/chunk-chunk-P6UBCMSQ.module.min.js +2 -0
  50. package/dist/chunk-chunk-Q2YADC2V.module.min.js +2 -0
  51. package/dist/chunk-chunk-QRIBHZYW.module.min.js +1 -0
  52. package/dist/chunk-chunk-QSQVBIJA.module.min.js +1 -0
  53. package/dist/chunk-chunk-RCF52Z42.module.min.js +2 -0
  54. package/dist/chunk-chunk-RH5TSQPH.module.min.js +1 -0
  55. package/dist/chunk-chunk-ROP4HI7H.module.min.js +2 -0
  56. package/dist/chunk-chunk-RZH7VZYS.module.min.js +2 -0
  57. package/dist/chunk-chunk-SIRIJ3DY.module.min.js +1 -0
  58. package/dist/chunk-chunk-STZFFTAN.module.min.js +2 -0
  59. package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
  60. package/dist/chunk-chunk-T27ZEV6A.module.min.js +1 -0
  61. package/dist/chunk-chunk-U3AGQ5EF.module.min.js +2 -0
  62. package/dist/chunk-chunk-U66USBWU.module.min.js +1 -0
  63. package/dist/chunk-chunk-VVCA3DB7.module.min.js +1 -0
  64. package/dist/chunk-chunk-W3DB2MN4.module.min.js +2 -0
  65. package/dist/chunk-chunk-WCX6U47H.module.min.js +2 -0
  66. package/dist/chunk-chunk-WDIN4LRC.module.min.js +1 -0
  67. package/dist/chunk-chunk-XEVJDUTH.module.min.js +1 -0
  68. package/dist/chunk-chunk-XOYX77KF.module.min.js +2 -0
  69. package/dist/chunk-chunk-YCQYG6J5.module.min.js +2 -0
  70. package/dist/chunk-chunk-YHNZCPOZ.module.min.js +2 -0
  71. package/dist/chunk-chunk-YWZB3KPI.module.min.js +2 -0
  72. package/dist/chunk-chunk-Z5KXAVQD.module.min.js +2 -0
  73. package/dist/chunk-chunk-ZCNBUZPL.module.min.js +2 -0
  74. package/dist/chunk-chunk-ZLKRTF5N.module.min.js +2 -0
  75. package/dist/chunk-chunk-ZTNVDWAK.module.min.js +2 -0
  76. package/dist/chunk-statisticalOverlays-6MVAK5RW.module.min.js +2 -0
  77. package/dist/components/AccessibleNavTree.d.ts +7 -1
  78. package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -0
  79. package/dist/components/ai/useNavigationSync.d.ts +17 -2
  80. package/dist/components/chartContainerMobile.d.ts +9 -0
  81. package/dist/components/charts/geo/ChoroplethMap.d.ts +19 -2
  82. package/dist/components/charts/geo/DistanceCartogram.d.ts +14 -2
  83. package/dist/components/charts/geo/FlowMap.d.ts +10 -6
  84. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +14 -2
  85. package/dist/components/charts/index.d.ts +6 -0
  86. package/dist/components/charts/network/ChordDiagram.d.ts +9 -1
  87. package/dist/components/charts/network/ForceDirectedGraph.d.ts +11 -0
  88. package/dist/components/charts/network/SankeyDiagram.d.ts +9 -1
  89. package/dist/components/charts/ordinal/BarChart.d.ts +21 -0
  90. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +11 -0
  91. package/dist/components/charts/ordinal/StackedBarChart.d.ts +11 -0
  92. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +7 -0
  93. package/dist/components/charts/physics/EventDropChart.d.ts +7 -0
  94. package/dist/components/charts/physics/GaltonBoardChart.d.ts +8 -0
  95. package/dist/components/charts/physics/PhysicalFlowChart.d.ts +7 -0
  96. package/dist/components/charts/physics/PhysicsCustomChart.d.ts +4 -25
  97. package/dist/components/charts/physics/PhysicsPileChart.d.ts +7 -0
  98. package/dist/components/charts/physics/physicsChartShared.d.ts +17 -1
  99. package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -0
  100. package/dist/components/charts/shared/AnnotationLabel.d.ts +88 -0
  101. package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
  102. package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
  103. package/dist/components/charts/shared/annotationRules.d.ts +2 -1
  104. package/dist/components/charts/shared/auditAccessibilityText.d.ts +13 -0
  105. package/dist/components/charts/shared/chartSelectionUtils.d.ts +4 -0
  106. package/dist/components/charts/shared/chartSpecCore.d.ts +3 -3
  107. package/dist/components/charts/shared/datumTypes.d.ts +2 -0
  108. package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +2 -0
  109. package/dist/components/charts/shared/formatUtils.d.ts +3 -3
  110. package/dist/components/charts/shared/hatchFill.d.ts +87 -0
  111. package/dist/components/charts/shared/hooks.d.ts +7 -6
  112. package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
  113. package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
  114. package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
  115. package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
  116. package/dist/components/charts/shared/sparseArray.d.ts +1 -1
  117. package/dist/components/charts/shared/streamPropsHelpers.d.ts +6 -4
  118. package/dist/components/charts/shared/styleRules.d.ts +205 -0
  119. package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
  120. package/dist/components/charts/shared/types.d.ts +9 -6
  121. package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
  122. package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
  123. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  124. package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
  125. package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
  126. package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
  127. package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +24 -1
  128. package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
  129. package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
  130. package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
  131. package/dist/components/charts/shared/validateChartData.d.ts +7 -5
  132. package/dist/components/charts/shared/validationMap.d.ts +11 -2
  133. package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
  134. package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
  135. package/dist/components/charts/value/targetPresentation.d.ts +22 -0
  136. package/dist/components/charts/value/types.d.ts +5 -6
  137. package/dist/components/charts/xy/AreaChart.d.ts +8 -0
  138. package/dist/components/charts/xy/BubbleChart.d.ts +9 -0
  139. package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
  140. package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
  141. package/dist/components/charts/xy/Heatmap.d.ts +2 -2
  142. package/dist/components/charts/xy/LineChart.d.ts +11 -0
  143. package/dist/components/charts/xy/QuadrantChart.d.ts +7 -0
  144. package/dist/components/charts/xy/Scatterplot.d.ts +10 -0
  145. package/dist/components/charts/xy/StackedAreaChart.d.ts +7 -0
  146. package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
  147. package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
  148. package/dist/components/controls/SentenceFilter.d.ts +97 -0
  149. package/dist/components/data/fromVegaLite.d.ts +19 -9
  150. package/dist/components/rough/createRoughRenderMode.d.ts +46 -0
  151. package/dist/components/semiotic-ai.d.ts +3 -1
  152. package/dist/components/semiotic-controls.d.ts +2 -0
  153. package/dist/components/semiotic-geo.d.ts +4 -0
  154. package/dist/components/semiotic-network.d.ts +4 -0
  155. package/dist/components/semiotic-ordinal.d.ts +6 -0
  156. package/dist/components/semiotic-physics.d.ts +4 -0
  157. package/dist/components/semiotic-rough.d.ts +4 -0
  158. package/dist/components/semiotic-utils-core.d.ts +4 -0
  159. package/dist/components/semiotic-xy.d.ts +4 -0
  160. package/dist/components/semiotic.d.ts +9 -1
  161. package/dist/components/server/optionalImageTypes.d.ts +37 -0
  162. package/dist/components/server/serverChartConfigShared.d.ts +9 -5
  163. package/dist/components/server/serverChartConfigs.d.ts +4 -4
  164. package/dist/components/server/staticAnnotations.d.ts +6 -3
  165. package/dist/components/server/staticLegend.d.ts +1 -1
  166. package/dist/components/server/staticNetwork.d.ts +4 -4
  167. package/dist/components/server/staticSVGChrome.d.ts +5 -4
  168. package/dist/components/store/ObservationStore.d.ts +21 -1
  169. package/dist/components/stream/AccessibleDataTable.d.ts +4 -10
  170. package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
  171. package/dist/components/stream/CanvasHitTester.d.ts +4 -4
  172. package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
  173. package/dist/components/stream/FrameRuntime.d.ts +57 -0
  174. package/dist/components/stream/GeoParticlePool.d.ts +1 -1
  175. package/dist/components/stream/GeoPipelineStore.d.ts +43 -12
  176. package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
  177. package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
  178. package/dist/components/stream/NetworkPipelineStore.d.ts +24 -21
  179. package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
  180. package/dist/components/stream/NetworkSVGOverlay.d.ts +6 -0
  181. package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -2
  182. package/dist/components/stream/OrdinalBrushOverlayLazy.d.ts +9 -0
  183. package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
  184. package/dist/components/stream/OrdinalPipelineStore.d.ts +13 -13
  185. package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
  186. package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
  187. package/dist/components/stream/ParticlePool.d.ts +1 -1
  188. package/dist/components/stream/PipelineStore.d.ts +12 -16
  189. package/dist/components/stream/SVGOverlay.d.ts +6 -0
  190. package/dist/components/stream/SceneGraph.d.ts +3 -3
  191. package/dist/components/stream/XYBrushOverlayLazy.d.ts +17 -0
  192. package/dist/components/stream/accessorUtils.d.ts +2 -2
  193. package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
  194. package/dist/components/stream/frameGraphics.d.ts +4 -0
  195. package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -0
  196. package/dist/components/stream/geoPipelineHelpers.d.ts +3 -3
  197. package/dist/components/stream/geoPipelineUpdateResults.d.ts +34 -0
  198. package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
  199. package/dist/components/stream/geoTypes.d.ts +48 -15
  200. package/dist/components/stream/hitTestUtils.d.ts +2 -2
  201. package/dist/components/stream/hoverUtils.d.ts +4 -2
  202. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +1 -0
  203. package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
  204. package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
  205. package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
  206. package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
  207. package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
  208. package/dist/components/stream/networkFrameObservations.d.ts +15 -0
  209. package/dist/components/stream/networkFramePaint.d.ts +11 -2
  210. package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
  211. package/dist/components/stream/networkPipelineConfig.d.ts +2 -2
  212. package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
  213. package/dist/components/stream/networkTypes.d.ts +37 -56
  214. package/dist/components/stream/ordinalCanvasRenderers.d.ts +2 -2
  215. package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +20 -1
  216. package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -2
  217. package/dist/components/stream/ordinalTypes.d.ts +30 -3
  218. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +2 -0
  219. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +6 -0
  220. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +21 -6
  221. package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
  222. package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -0
  223. package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +19 -1
  224. package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +3 -1
  225. package/dist/components/stream/pipelineConfig.d.ts +4 -2
  226. package/dist/components/stream/pipelineDecay.d.ts +2 -2
  227. package/dist/components/stream/pipelinePulse.d.ts +2 -2
  228. package/dist/components/stream/pipelineStoreUpdateResults.d.ts +23 -2
  229. package/dist/components/stream/pipelineTransitions.d.ts +1 -1
  230. package/dist/components/stream/pipelineUpdateContract.d.ts +7 -0
  231. package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
  232. package/dist/components/stream/renderBackend.d.ts +27 -0
  233. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
  234. package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
  235. package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
  236. package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
  237. package/dist/components/stream/sceneRevisionDiagnostics.d.ts +31 -4
  238. package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
  239. package/dist/components/stream/streamThemeTypes.d.ts +14 -0
  240. package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
  241. package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
  242. package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
  243. package/dist/components/stream/titleLayout.d.ts +31 -0
  244. package/dist/components/stream/types.d.ts +30 -65
  245. package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
  246. package/dist/components/stream/useFrame.d.ts +23 -0
  247. package/dist/components/stream/useLegendCategoryEmission.d.ts +3 -3
  248. package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
  249. package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
  250. package/dist/components/stream/xyFrameAxisTypes.d.ts +50 -0
  251. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -5
  252. package/dist/controls.min.js +1 -1
  253. package/dist/controls.module.min.js +1 -1
  254. package/dist/forceLayoutWorker.js +1 -1
  255. package/dist/geo.min.js +1 -1
  256. package/dist/geo.module.min.js +1 -1
  257. package/dist/network.min.js +1 -1
  258. package/dist/network.module.min.js +1 -1
  259. package/dist/ordinal.min.js +1 -1
  260. package/dist/ordinal.module.min.js +1 -1
  261. package/dist/physics-matter.min.js +1 -1
  262. package/dist/physics-matter.module.min.js +1 -1
  263. package/dist/physics-rapier.min.js +1 -1
  264. package/dist/physics-rapier.module.min.js +1 -1
  265. package/dist/physics.min.js +1 -1
  266. package/dist/physics.module.min.js +1 -1
  267. package/dist/physicsWorker.js +1 -1
  268. package/dist/realtime.min.js +1 -1
  269. package/dist/realtime.module.min.js +1 -1
  270. package/dist/rough.min.js +1 -0
  271. package/dist/rough.module.min.js +1 -0
  272. package/dist/semiotic-ai-core.min.js +1 -1
  273. package/dist/semiotic-ai-core.module.min.js +1 -1
  274. package/dist/semiotic-ai.d.ts +3 -1
  275. package/dist/semiotic-ai.min.js +1 -1
  276. package/dist/semiotic-ai.module.min.js +1 -1
  277. package/dist/semiotic-controls.d.ts +2 -0
  278. package/dist/semiotic-data.min.js +1 -1
  279. package/dist/semiotic-data.module.min.js +1 -1
  280. package/dist/semiotic-experimental.min.js +1 -1
  281. package/dist/semiotic-experimental.module.min.js +1 -1
  282. package/dist/semiotic-geo.d.ts +4 -0
  283. package/dist/semiotic-network.d.ts +4 -0
  284. package/dist/semiotic-ordinal.d.ts +6 -0
  285. package/dist/semiotic-physics.d.ts +4 -0
  286. package/dist/semiotic-realtime-core.min.js +1 -1
  287. package/dist/semiotic-realtime-core.module.min.js +1 -1
  288. package/dist/semiotic-realtime-react.min.js +1 -1
  289. package/dist/semiotic-realtime-react.module.min.js +1 -1
  290. package/dist/semiotic-recipes-core.min.js +1 -1
  291. package/dist/semiotic-recipes-core.module.min.js +1 -1
  292. package/dist/semiotic-recipes-react.min.js +1 -1
  293. package/dist/semiotic-recipes-react.module.min.js +1 -1
  294. package/dist/semiotic-recipes.min.js +1 -1
  295. package/dist/semiotic-recipes.module.min.js +1 -1
  296. package/dist/semiotic-rough.d.ts +4 -0
  297. package/dist/semiotic-server-edge.min.js +1 -1
  298. package/dist/semiotic-server-edge.module.min.js +1 -1
  299. package/dist/semiotic-server-node.min.js +1 -1
  300. package/dist/semiotic-server-node.module.min.js +1 -1
  301. package/dist/semiotic-themes-core.min.js +1 -1
  302. package/dist/semiotic-themes-core.module.min.js +1 -1
  303. package/dist/semiotic-themes-react.min.js +1 -1
  304. package/dist/semiotic-themes-react.module.min.js +1 -1
  305. package/dist/semiotic-themes.min.js +1 -1
  306. package/dist/semiotic-themes.module.min.js +1 -1
  307. package/dist/semiotic-utils-core.d.ts +4 -0
  308. package/dist/semiotic-utils-core.min.js +1 -1
  309. package/dist/semiotic-utils-core.module.min.js +1 -1
  310. package/dist/semiotic-utils-react.min.js +1 -1
  311. package/dist/semiotic-utils-react.module.min.js +1 -1
  312. package/dist/semiotic-utils.min.js +1 -1
  313. package/dist/semiotic-utils.module.min.js +1 -1
  314. package/dist/semiotic-value.min.js +1 -1
  315. package/dist/semiotic-value.module.min.js +1 -1
  316. package/dist/semiotic-xy.d.ts +4 -0
  317. package/dist/semiotic.d.ts +9 -1
  318. package/dist/semiotic.min.js +1 -1
  319. package/dist/semiotic.module.min.js +1 -1
  320. package/dist/server.min.js +1 -1
  321. package/dist/server.module.min.js +1 -1
  322. package/dist/test-utils/capturedFrameProps.d.ts +67 -0
  323. package/dist/test-utils/frameMock.d.ts +12 -9
  324. package/dist/xy.min.js +1 -1
  325. package/dist/xy.module.min.js +1 -1
  326. package/package.json +29 -10
  327. package/dist/semiotic-ai-statisticalOverlays-CY4WKR4A.module.min.js +0 -2
  328. package/dist/semiotic-chunk-3FSVZ46U.module.min.js +0 -2
  329. package/dist/semiotic-statisticalOverlays-UOMSFKVJ.module.min.js +0 -2
  330. package/dist/xy-chunk-IWD6IB6V.module.min.js +0 -2
  331. package/dist/xy-statisticalOverlays-7RWG6LJT.module.min.js +0 -2
@@ -1 +1 @@
1
- "use strict";var e,t=Object.create,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,n=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of o(t))s.call(e,c)||c===i||r(e,c,{get:()=>t[c],enumerable:!(n=a(t,c))||n.enumerable});return e},c=(e,a,o)=>(o=null!=e?t(i(e)):{},n(!a&&e&&e.__esModule?o:r(o,"default",{value:e,enumerable:!0}),e)),l={};((e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})})(l,{CARBON_ALERT:()=>k,CARBON_CATEGORICAL_14:()=>A,COLOR_BLIND_SAFE_CATEGORICAL:()=>m,DARK_THEME:()=>y,HIGH_CONTRAST_THEME:()=>g,IncrementalExtent:()=>pa,LIGHT_THEME:()=>f,MultiPointTooltip:()=>ba,RingBuffer:()=>ua,THEME_PRESETS:()=>C,ThemeProvider:()=>Ba,accessibilityCaveats:()=>Ze,adaptiveTimeTicks:()=>T,auditAccessibility:()=>Qe,auditMobileVisualization:()=>bt,auditObservedScene:()=>ea,buildNavigationTree:()=>pr,buildReaderGrounding:()=>$r,communicativeActForIntent:()=>Jt,computeArcBoundingBox:()=>Sa,configToJSX:()=>Ir,copyConfig:()=>Or,countNodes:()=>mr,createHatchPattern:()=>O,darkenColor:()=>z,describeChart:()=>cr,deserializeSelections:()=>_r,diagnoseConfig:()=>De,exportChart:()=>Dr,flattenVisible:()=>hr,formatAccessibilityAudit:()=>rt,formatMobileVisualizationAudit:()=>xt,fromConfig:()=>zr,fromURL:()=>Nr,fromVegaLite:()=>ca,getHitRadius:()=>Pr,lightenColor:()=>B,mobileVisualizationCaveats:()=>St,normalizeTooltip:()=>va,resolveCommunicativeAct:()=>Qt,resolveResponsiveRules:()=>it,resolveThemePreset:()=>$,responsiveRuleMatches:()=>ot,serializeSelections:()=>Er,smartTickFormat:()=>P,sweepToAngles:()=>wa,themeToCSS:()=>x,themeToTokens:()=>S,toConfig:()=>Tr,toURL:()=>Br,unwrapDatum:()=>Q,useHighContrast:()=>Ra,useReducedMotion:()=>Pa,useTheme:()=>Na,validateProps:()=>J,valueToAngle:()=>xa}),module.exports=(e=l,n(r({},"__esModule",{value:!0}),e));var d=require("react"),u=require("react/jsx-runtime");function p(e,t){const r=new Set;let a={...e(function(e){const t=e(a);if(function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}(t)){a={...a,...t};for(const e of r)e()}}),...t??{}};return{getState:()=>a,subscribe:function(e){return r.add(e),()=>{r.delete(e)}}}}function h(e){if(!e.accessibility)return e;let t=e;if(e.accessibility.colorBlindSafe&&(t={...t,colors:{...t.colors,categorical:m}}),e.accessibility.highContrast){const e="dark"===t.mode;t={...t,colors:{...t.colors,text:e?"#ffffff":"#000000",textSecondary:e?"#cccccc":"#333333",grid:e?"#666666":"#999999",border:e?"#888888":"#000000"}}}return t}var m=["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9","#D55E00","#F0E442","#000000"],f={mode:"light",colors:{primary:"#00a2ce",secondary:"#6c757d",categorical:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],sequential:"blues",diverging:"RdBu",background:"transparent",surface:"#ffffff",text:"#333",textSecondary:"#666",grid:"#e0e0e0",border:"#ccc",selection:"#00a2ce",selectionOpacity:.15,success:"#2ca02c",danger:"#d62728",warning:"#f0ad4e",error:"#b4181b",info:"#00a2ce"},typography:{fontFamily:"sans-serif",titleSize:16,labelSize:12,tickSize:12}},y={mode:"dark",colors:{primary:"#4fc3f7",secondary:"#90a4ae",categorical:["#4fc3f7","#ffb74d","#81c784","#ef5350","#ba68c8","#a1887f","#f06292","#90a4ae","#dce775","#4dd0e1"],sequential:"blues",diverging:"RdBu",background:"#1a1a2e",surface:"#252540",text:"#e0e0e0",textSecondary:"#aaa",grid:"#333",border:"#555",selection:"#4fc3f7",selectionOpacity:.15,success:"#81c784",danger:"#ef5350",warning:"#ffb74d",error:"#d84848",info:"#4fc3f7"},typography:{fontFamily:"sans-serif",titleSize:16,labelSize:12,tickSize:12}},g={mode:"light",colors:{primary:"#0000cc",secondary:"#333333",categorical:m,sequential:"blues",diverging:"RdBu",background:"#ffffff",surface:"#ffffff",text:"#000000",textSecondary:"#333333",grid:"#999999",border:"#000000",focus:"#0000cc",selection:"#0000cc",selectionOpacity:.1,success:"#006400",danger:"#cc0000",warning:"#b15a00",error:"#8b0000",info:"#0000cc"},typography:{fontFamily:"system-ui, sans-serif",titleSize:18,labelSize:14,tickSize:12},tooltip:{background:"#000000",text:"#ffffff",borderRadius:"4px",fontSize:"14px",shadow:"0 2px 8px rgba(0, 0, 0, 0.3)"},borderRadius:"4px"};function b(e,t){if("light"===t)return f;if("dark"===t)return y;if("high-contrast"===t)return g;if("string"==typeof t)return void 0!==console&&console.warn(`[ThemeStore] Unknown theme preset "${t}". Keeping current theme.`),e;if(t.mode&&"auto"!==t.mode){const e="dark"===t.mode?y:f;return h({...e,...t,colors:{...e.colors,...t.colors||{}},typography:{...e.typography,...t.typography||{}}})}return h({...e,...t,colors:{...e.colors,...t.colors||{}},typography:{...e.typography,...t.typography||{}}})}var[v,w]=function(e){let t=null;const r=()=>(t||(t=(0,d.createContext)(null)),t),a=p(e);return[function({children:t,initialState:a}){const o=(0,d.useRef)(a),i=(0,d.useMemo)(()=>p(e,o.current),[]),s=r();return(0,u.jsx)(s.Provider,{value:i,children:t})},(e,t)=>{const o=r(),i=(0,d.useContext)(o)??a,s=(0,d.useRef)(e);s.current=e;const n=(0,d.useRef)({hasValue:!1,value:void 0}),c=(0,d.useCallback)(()=>{const e=s.current(i.getState()),r=n.current;return r.hasValue&&t&&t(r.value,e)?r.value:(n.current={hasValue:!0,value:e},e)},[i,t]),l=(0,d.useCallback)(()=>s.current(i.getState()),[i]);return(0,d.useSyncExternalStore)(i.subscribe,c,l)}]}(e=>({theme:f,setTheme(t){e(e=>({theme:b(e.theme,t)}))}}));function x(e,t=":root"){const r=[];return r.push(` --semiotic-bg: ${e.colors.background};`),r.push(` --semiotic-text: ${e.colors.text};`),r.push(` --semiotic-text-secondary: ${e.colors.textSecondary};`),r.push(` --semiotic-grid: ${e.colors.grid};`),r.push(` --semiotic-border: ${e.colors.border};`),r.push(` --semiotic-primary: ${e.colors.primary};`),r.push(` --semiotic-font-family: ${e.typography.fontFamily};`),e.colors.focus&&r.push(` --semiotic-focus: ${e.colors.focus};`),e.colors.selection&&r.push(` --semiotic-selection-color: ${e.colors.selection};`),null!=e.colors.selectionOpacity&&r.push(` --semiotic-selection-opacity: ${e.colors.selectionOpacity};`),e.colors.diverging&&r.push(` --semiotic-diverging: ${e.colors.diverging};`),e.tooltip?.background&&r.push(` --semiotic-tooltip-bg: ${e.tooltip.background};`),e.tooltip?.text&&r.push(` --semiotic-tooltip-text: ${e.tooltip.text};`),e.tooltip?.borderRadius&&r.push(` --semiotic-tooltip-radius: ${e.tooltip.borderRadius};`),e.tooltip?.fontSize&&r.push(` --semiotic-tooltip-font-size: ${e.tooltip.fontSize};`),e.tooltip?.shadow&&r.push(` --semiotic-tooltip-shadow: ${e.tooltip.shadow};`),e.borderRadius&&r.push(` --semiotic-border-radius: ${e.borderRadius};`),e.colors.annotation&&r.push(` --semiotic-annotation-color: ${e.colors.annotation};`),null!=e.typography.legendSize&&r.push(` --semiotic-legend-font-size: ${e.typography.legendSize}px;`),null!=e.typography.titleFontSize&&r.push(` --semiotic-title-font-size: ${e.typography.titleFontSize}px;`),null!=e.typography.tickFontFamily&&r.push(` --semiotic-tick-font-family: ${e.typography.tickFontFamily};`),null!=e.typography.tickSize&&r.push(` --semiotic-tick-font-size: ${e.typography.tickSize}px;`),null!=e.typography.labelSize&&r.push(` --semiotic-axis-label-font-size: ${e.typography.labelSize}px;`),r.push(` --semiotic-secondary: ${e.colors.secondary||e.colors.primary};`),r.push(` --semiotic-surface: ${e.colors.surface||e.colors.background};`),e.colors.success&&r.push(` --semiotic-success: ${e.colors.success};`),e.colors.danger&&r.push(` --semiotic-danger: ${e.colors.danger};`),e.colors.warning&&r.push(` --semiotic-warning: ${e.colors.warning};`),e.colors.error&&r.push(` --semiotic-error: ${e.colors.error};`),e.colors.info&&r.push(` --semiotic-info: ${e.colors.info};`),`${t} {\n${r.join("\n")}\n}`}function S(e){return{semiotic:{bg:{$value:e.colors.background,$type:"color"},text:{$value:e.colors.text,$type:"color"},"text-secondary":{$value:e.colors.textSecondary,$type:"color"},grid:{$value:e.colors.grid,$type:"color"},border:{$value:e.colors.border,$type:"color"},primary:{$value:e.colors.primary,$type:"color"},focus:{$value:e.colors.focus||e.colors.primary,$type:"color"},"font-family":{$value:e.typography.fontFamily,$type:"fontFamily"},"border-radius":{$value:e.borderRadius||"8px",$type:"dimension"},tooltip:{bg:{$value:e.tooltip?.background||e.colors.background,$type:"color"},text:{$value:e.tooltip?.text||e.colors.text,$type:"color"},radius:{$value:e.tooltip?.borderRadius||"6px",$type:"dimension"},"font-size":{$value:e.tooltip?.fontSize||"14px",$type:"dimension"},shadow:{$value:e.tooltip?.shadow||"0 2px 8px rgba(0,0,0,0.15)",$type:"shadow"}},selection:{color:{$value:e.colors.selection||e.colors.primary,$type:"color"},opacity:{$value:e.colors.selectionOpacity??.2,$type:"number"}},categorical:{$value:e.colors.categorical,$type:"color",$description:"Categorical color palette"},sequential:{$value:e.colors.sequential,$type:"string",$description:"d3-scale-chromatic sequential scheme name"},...e.colors.diverging?{diverging:{$value:e.colors.diverging,$type:"string",$description:"d3-scale-chromatic diverging scheme name"}}:{},...e.colors.annotation?{"annotation-color":{$value:e.colors.annotation,$type:"color"}}:{},...null!=e.typography.legendSize?{"legend-font-size":{$value:e.typography.legendSize+"px",$type:"dimension"}}:{},...null!=e.typography.titleFontSize?{"title-font-size":{$value:e.typography.titleFontSize+"px",$type:"dimension"}}:{},...null!=e.typography.tickFontFamily?{"tick-font-family":{$value:e.typography.tickFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.tickSize?{"tick-font-size":{$value:e.typography.tickSize+"px",$type:"dimension"}}:{},...null!=e.typography.labelSize?{"axis-label-font-size":{$value:e.typography.labelSize+"px",$type:"dimension"}}:{},secondary:{$value:e.colors.secondary||e.colors.primary,$type:"color"},surface:{$value:e.colors.surface||e.colors.background,$type:"color"},...e.colors.success?{success:{$value:e.colors.success,$type:"color"}}:{},...e.colors.danger?{danger:{$value:e.colors.danger,$type:"color"}}:{},...e.colors.warning?{warning:{$value:e.colors.warning,$type:"color"}}:{},...e.colors.error?{error:{$value:e.colors.error,$type:"color"}}:{},...e.colors.info?{info:{$value:e.colors.info,$type:"color"}}:{}}}}var A=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"],k={danger:"#da1e28",warning:"#f1c21b",success:"#24a148",info:"#0043ce"},C={light:f,dark:y,"high-contrast":g,pastels:{mode:"light",colors:{primary:"#c9a0dc",secondary:"#b8a8c8",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#fdf6f0",surface:"#fff5ee",text:"#4a3728",textSecondary:"#7a644a",grid:"#e8d5c4",border:"#e8d5c4",focus:"#8a5fae",annotation:"#8a5fae",success:"#9ad4a3",danger:"#e8869a",warning:"#f0c888",error:"#c86070",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#fff5ee",text:"#4a3728",borderRadius:"8px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"10px"},"pastels-dark":{mode:"dark",colors:{primary:"#c9a0dc",secondary:"#a899c0",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#1a1525",surface:"#251e35",text:"#e8ddf0",textSecondary:"#a899c0",grid:"#3d3455",border:"#3d3455",focus:"#c9a0dc",annotation:"#c9a0dc",success:"#88d4ab",danger:"#f0a0c0",warning:"#f0c888",error:"#e87690",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#251e35",text:"#e8ddf0",borderRadius:"8px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"10px"},"bi-tool":{mode:"light",colors:{primary:"#2563eb",secondary:"#6b7280",categorical:["#2563eb","#0d9488","#ea580c","#6b7280"],sequential:"blues",background:"#f5f6f8",surface:"#ffffff",text:"#2c3e50",textSecondary:"#64717f",grid:"#d8dce3",border:"#d8dce3",focus:"#2563eb",annotation:"#2563eb",success:"#10b981",danger:"#ef4444",warning:"#f59e0b",error:"#dc2626",info:"#2563eb"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2c3e50",borderRadius:"6px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"8px"},"bi-tool-dark":{mode:"dark",colors:{primary:"#3b82f6",secondary:"#9ca3af",categorical:["#3b82f6","#14b8a6","#f97316","#9ca3af"],sequential:"blues",background:"#111827",surface:"#1f2937",text:"#f3f4f6",textSecondary:"#9ca3af",grid:"#374151",border:"#374151",focus:"#3b82f6",annotation:"#3b82f6",success:"#34d399",danger:"#f87171",warning:"#fbbf24",error:"#ef4444",info:"#60a5fa"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f2937",text:"#f3f4f6",borderRadius:"6px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"8px"},italian:{mode:"light",colors:{primary:"#cc0000",secondary:"#666666",categorical:["#cc0000","#333333","#c8a415","#4682b4"],sequential:"reds",background:"#fafafa",surface:"#ffffff",text:"#1a1a1a",textSecondary:"#666666",grid:"#e0e0e0",border:"#e0e0e0",focus:"#cc0000",annotation:"#cc0000",success:"#556b2f",danger:"#cc0000",warning:"#c8a415",error:"#8b0000",info:"#4682b4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#1a1a1a",borderRadius:"2px",shadow:"0 2px 4px rgba(0, 0, 0, 0.15)"},borderRadius:"2px"},"italian-dark":{mode:"dark",colors:{primary:"#ff3333",secondary:"#aaaaaa",categorical:["#ff3333","#aaaaaa","#d4a843","#6aa4d4"],sequential:"reds",background:"#0a0a0a",surface:"#1a1a1a",text:"#f5f5f5",textSecondary:"#aaaaaa",grid:"#333333",border:"#333333",focus:"#ff3333",annotation:"#ff3333",success:"#7a8b5a",danger:"#ff3333",warning:"#d4a843",error:"#cc0000",info:"#6aa4d4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1a1a1a",text:"#f5f5f5",borderRadius:"2px",shadow:"0 2px 8px rgba(0, 0, 0, 0.5)"},borderRadius:"2px"},tufte:{mode:"light",colors:{primary:"#8b0000",secondary:"#555555",categorical:["#8b4513","#556b2f","#4a5568","#800020"],sequential:"oranges",background:"#fffff8",surface:"#fffff8",text:"#111111",textSecondary:"#555555",grid:"#e0ddd0",border:"#e0ddd0",focus:"#8b0000",annotation:"#8b0000",success:"#556b2f",danger:"#8b0000",warning:"#b88700",error:"#6b0000",info:"#4a5568"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#fffff8",text:"#111111",borderRadius:"2px",shadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},borderRadius:"0px"},"tufte-dark":{mode:"dark",colors:{primary:"#c05050",secondary:"#a09880",categorical:["#c08050","#7a8b5a","#8090a0","#a05060"],sequential:"oranges",background:"#1c1b18",surface:"#262520",text:"#e8e4d8",textSecondary:"#a09880",grid:"#3d3c35",border:"#3d3c35",focus:"#c05050",annotation:"#d06a6a",success:"#7a8b5a",danger:"#c05050",warning:"#c8a060",error:"#a04040",info:"#8090a0"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262520",text:"#e8e4d8",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.4)"},borderRadius:"0px"},journalist:{mode:"light",colors:{primary:"#e45050",secondary:"#666666",categorical:["#3a86c8","#e45050","#d4a843","#888888"],sequential:"blues",background:"#ffffff",surface:"#f8f8f8",text:"#222222",textSecondary:"#666666",grid:"#d4d4d4",border:"#d4d4d4",focus:"#e45050",annotation:"#c63b3b",success:"#2d7a3d",danger:"#c8303a",warning:"#d4a843",error:"#a02028",info:"#3a86c8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:18,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#f8f8f8",text:"#222222",borderRadius:"4px",shadow:"0 2px 6px rgba(0, 0, 0, 0.12)"},borderRadius:"4px"},"journalist-dark":{mode:"dark",colors:{primary:"#ff6b6b",secondary:"#a0a0a0",categorical:["#5a9fd8","#ff6b6b","#e0c060","#aaaaaa"],sequential:"blues",background:"#141414",surface:"#1e1e1e",text:"#ededed",textSecondary:"#a0a0a0",grid:"#383838",border:"#383838",focus:"#ff6b6b",annotation:"#ff6b6b",success:"#6fba78",danger:"#ff6b6b",warning:"#e0c060",error:"#d04040",info:"#5a9fd8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1e1e1e",text:"#ededed",borderRadius:"4px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"4px"},playful:{mode:"light",colors:{primary:"#8b5cf6",secondary:"#7c5a9e",categorical:["#8b5cf6","#ec4899","#06b6d4","#84cc16"],sequential:"viridis",background:"#fdf8ff",surface:"#ffffff",text:"#2d1b4e",textSecondary:"#7c5a9e",grid:"#e8d0f8",border:"#e8d0f8",focus:"#8b5cf6",annotation:"#7a47e8",success:"#10d870",danger:"#ff4b6e",warning:"#ffaa33",error:"#e11d48",info:"#06b6d4"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2d1b4e",borderRadius:"12px",shadow:"0 4px 12px rgba(139, 92, 246, 0.15)"},borderRadius:"12px"},"playful-dark":{mode:"dark",colors:{primary:"#a78bfa",secondary:"#b8a0d8",categorical:["#a78bfa","#f472b6","#22d3ee","#a3e635"],sequential:"viridis",background:"#150a28",surface:"#1f1138",text:"#f0e8ff",textSecondary:"#b8a0d8",grid:"#3a2560",border:"#3a2560",focus:"#a78bfa",annotation:"#a78bfa",success:"#4ade80",danger:"#fb7185",warning:"#fbbf24",error:"#f43f5e",info:"#22d3ee"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f1138",text:"#f0e8ff",borderRadius:"12px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"12px"},carbon:{mode:"light",colors:{primary:"#0f62fe",secondary:"#525252",categorical:["#6929c4","#1192e8","#005d5d","#9f1853"],sequential:"blues",diverging:"RdBu",background:"#ffffff",surface:"#ffffff",text:"#161616",textSecondary:"#525252",grid:"#e0e0e0",border:"#e0e0e0",focus:"#0f62fe",annotation:"#0f62fe",success:"#24a148",danger:"#da1e28",warning:"#f1c21b",error:"#a2191f",info:"#0043ce"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#161616",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.2)"},borderRadius:"0px"},"carbon-dark":{mode:"dark",colors:{primary:"#4589ff",secondary:"#a8a8a8",categorical:["#a56eff","#33b1ff","#08bdba","#ff7eb6"],sequential:"blues",diverging:"RdBu",background:"#161616",surface:"#262626",text:"#f4f4f4",textSecondary:"#a8a8a8",grid:"#393939",border:"#393939",focus:"#4589ff",annotation:"#4589ff",success:"#42be65",danger:"#fa4d56",warning:"#f1c21b",error:"#da1e28",info:"#4589ff"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262626",text:"#f4f4f4",borderRadius:"2px",shadow:"0 4px 12px rgba(0, 0, 0, 0.5)"},borderRadius:"0px"}};function $(e){return C[e]}function P(e){if(null==e)return"";if("number"!=typeof e)return e+"";if(!isFinite(e))return e+"";if(0===e)return"0";const t=parseFloat(e.toPrecision(12)),r=Math.abs(t);return 1e9>r?1e6>r?1e4>r?Number.isInteger(t)?t+"":parseFloat(t.toPrecision(6))+"":parseFloat((t/1e3).toPrecision(3))+"K":parseFloat((t/1e6).toPrecision(3))+"M":parseFloat((t/1e9).toPrecision(3))+"B"}c(require("react"));var R=6e4,M=60*R,L=24*M;function F(e){return 10>e?"0"+e:e+""}var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(e){let t,r=e;return(a,o,i)=>{const s=a instanceof Date?a:new Date(a);e||!i||2>i.length||i===t||(t=i,r=function(e){if(2>e.length)return"days";const t=[];for(let r=1;e.length>r;r++)t.push(e[r]-e[r-1]);t.sort((e,t)=>e-t);const r=t[Math.floor(t.length/2)];return 2*R>r?"seconds":2*M>r?"minutes":2*L>r?"hours":60*L>r?"days":400*L>r?"months":"years"}(i));const n=r||"days";return null!=o&&0!==o&&i&&0!==i.length?function(e,t,r){const a=e.getUTCFullYear()!==t.getUTCFullYear(),o=a||e.getUTCMonth()!==t.getUTCMonth(),i=o||e.getUTCDate()!==t.getUTCDate(),s=i||e.getUTCHours()!==t.getUTCHours(),n=s||e.getUTCMinutes()!==t.getUTCMinutes(),c=j[e.getUTCMonth()],l=e.getUTCDate(),d=e.getUTCFullYear(),u=F(e.getUTCHours()),p=F(e.getUTCMinutes()),h=F(e.getUTCSeconds());switch(r){case"seconds":return a?`${c} ${l}, ${d} ${u}:${p}:${h}`:i?`${c} ${l} ${u}:${p}:${h}`:s?`${u}:${p}:${h}`:n?`${p}:${h}`:":"+h;case"minutes":return a?`${c} ${l}, ${d} ${u}:${p}`:i?`${c} ${l} ${u}:${p}`:s?`${u}:${p}`:":"+p;case"hours":return a?`${c} ${l}, ${d} ${u}:00`:o?`${c} ${l} ${u}:${p}`:i?`${c} ${l} ${u}:00`:u+":00";case"days":return a?`${c} ${l}, ${d}`:o?`${c} ${l}`:""+l;case"months":return a?`${c} ${d}`:""+c;case"years":return""+d}}(s,new Date(i[o-1]),n):function(e,t){const r=j[e.getUTCMonth()],a=e.getUTCDate(),o=e.getUTCFullYear(),i=F(e.getUTCHours()),s=F(e.getUTCMinutes()),n=F(e.getUTCSeconds());switch(t){case"seconds":return`${r} ${a}, ${o} ${i}:${s}:${n}`;case"minutes":case"hours":return`${r} ${a}, ${o} ${i}:${s}`;case"days":return`${r} ${a}, ${o}`;case"months":return`${r} ${o}`;case"years":return""+o}}(s,n)}}function z(e,t=.5){const r=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!r)return e;const a=Math.round(parseInt(r[1],16)*(1-t)),o=Math.round(parseInt(r[2],16)*(1-t)),i=Math.round(parseInt(r[3],16)*(1-t));return`#${a.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}`}function B(e,t=.5){const r=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!r)return e;const a=Math.round(parseInt(r[1],16)+(255-parseInt(r[1],16))*t),o=Math.round(parseInt(r[2],16)+(255-parseInt(r[2],16))*t),i=Math.round(parseInt(r[3],16)+(255-parseInt(r[3],16))*t);return`#${a.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}`}var N=null;function O(e={},t){const{background:r="transparent",stroke:a="#000",lineWidth:o=1.5,spacing:i=6,angle:s=45}=e,n=Math.max(8,Math.ceil(2*i));let c;try{c=function(e){return"undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(e,e):(N||(N=document.createElement("canvas")),N.width=e,N.height=e,N)}(n)}catch{return null}const l=c.getContext("2d");if(!l)return null;r&&"transparent"!==r?(l.fillStyle=r,l.fillRect(0,0,n,n)):l.clearRect(0,0,n,n),l.strokeStyle=a,l.lineWidth=o,l.lineCap="square";const d=s*Math.PI/180;if(45===s||-45===s){const e=s>0?1:-1;for(let t=-n;2*n>=t;t+=i)l.beginPath(),l.moveTo(t,0),l.lineTo(t+e*n,n),l.stroke()}else{l.save(),l.translate(n/2,n/2),l.rotate(d);const e=2*n;for(let t=-e;e>=t;t+=i)l.beginPath(),l.moveTo(-e,t),l.lineTo(e,t),l.stroke();l.restore()}return(t||l).createPattern(c,"repeat")}function I(e,t){const r=e.length,a=t.length,o=Array(a+1);for(let e=0;a>=e;e++)o[e]=e;for(let i=1;r>=i;i++){let r=o[0];o[0]=i;for(let s=1;a>=s;s++){const a=o[s];o[s]=e[i-1]===t[s-1]?r:1+Math.min(r,o[s],o[s-1]),r=a}}return o[a]}function E(e,t,r=3){let a,o=r+1;for(const r of t){const t=I(e.toLowerCase(),r.toLowerCase());o>t&&(o=t,a=r)}return o>r?void 0:a}function _(e){return e.length>3?[e[0],e[Math.floor(e.length/2)],e[e.length-1]]:e}function D(e,t){if(0===t.length)return null;const r=e.toLowerCase();return t.find(e=>e.toLowerCase().includes(r)||r.includes(e.toLowerCase()))||(E(e,t,3)??null)}var H={common:{width:{type:"number",default:600},height:{type:"number",default:400},margin:{type:"object",description:'Object margin. A side value of "auto" or null leaves that side available for auto-reservation.'},className:{type:"string"},title:{type:"string"},enableHover:{type:"boolean",default:!0},showLegend:{type:"boolean"},showGrid:{type:"boolean",default:!1},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"],default:"category10"},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"],default:!1,description:"Opt-in annotation placement pass. Chooses dx/dy for note-like annotations without manual offsets and avoids note/mark/edge overlaps where possible."},responsiveRules:{type:"array",description:"Semantic responsive transforms applied before chart-mode defaults."},mobileSemantics:{type:"object",description:"Phone/mobile contract consumed by audits, recipes, adapters, and agents."},mobileInteraction:{type:["boolean","object"],description:"Touch-first interaction policy for phone-sized chart slots."},axisExtent:{type:"string",enum:["nice","exact"],default:"nice",description:'Tick endpoint mode. "nice" rounds endpoints to readable values; "exact" pins the first and last tick to the actual data min and max with equidistant intermediates. Affects XY x/y axes and ordinal value axis only.'},frameProps:{type:"object",omitFromSchema:!0},onClick:{type:"function",omitFromSchema:!0}},xyAxis:{xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function",omitFromSchema:!0},yFormat:{type:"function",omitFromSchema:!0},xScaleType:{type:"string",enum:["linear","log","time"],description:'x scale type. "time" builds a scaleTime (required for landmark ticks on timestamps).'},yScaleType:{type:"string",enum:["linear","log","time"],description:"y scale type."}},ordinalAxis:{categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function",omitFromSchema:!0}},realtime:{size:{type:"array",description:"[width, height] in pixels"},width:{type:"number",description:"Alias for size[0]"},height:{type:"number",description:"Alias for size[1]"},margin:{type:"object"},className:{type:"string"},timeAccessor:{type:["string","function"],description:"Key for time/x values"},valueAccessor:{type:["string","function"],description:"Key for y values"},windowSize:{type:"number",description:"Number of data points visible"},windowMode:{type:"string",enum:["sliding","stepping"]},arrowOfTime:{type:"string",enum:["left","right"]},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"],description:"Tooltip content function or config"},tooltipContent:{type:"function",omitFromSchema:!0},onHover:{type:"function",omitFromSchema:!0},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"],description:"Opt-in annotation placement pass for note-like annotations without manual offsets."},responsiveRules:{type:"array",description:"Semantic responsive transforms applied before chart-mode defaults."},mobileSemantics:{type:"object",description:"Phone/mobile contract consumed by audits, recipes, adapters, and agents."},mobileInteraction:{type:["boolean","object"],description:"Touch-first interaction policy for phone-sized chart slots."},svgAnnotationRules:{type:"function",omitFromSchema:!0},tickFormatTime:{type:"function",omitFromSchema:!0},tickFormatValue:{type:"function",omitFromSchema:!0},decay:{type:"object",description:"Decay config: { type, halfLife, minOpacity }"},pulse:{type:"object",description:"Pulse config: { duration, color, glowRadius }"},staleness:{type:"object",description:"Staleness config: { threshold, dimOpacity, showBadge }"}},physics:{data:{type:"array",description:"Array of source records. Each record becomes one or more simulated bodies."},size:{type:"array",description:"[width, height] in pixels"},width:{type:"number",description:"Alias for size[0]"},height:{type:"number",description:"Alias for size[1]"},className:{type:"string"},title:{type:"string"},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},colorBy:{type:["string","function"],description:"Categorical field or accessor used to color simulated bodies."},seed:{type:"number",default:1,description:"Deterministic simulation seed."},ballRadius:{type:"number",description:"Radius of each simulated circular body in pixels."},hoverRadius:{type:"number",description:"Pixel hit radius for body hover tooltips."},paused:{type:"boolean",description:"Pause the simulation at mount or on prop update."},tooltip:{type:["boolean","function","object"],description:"Tooltip content function/config, true for the default body tooltip, or false to disable hover tooltips."},frameProps:{type:"object",omitFromSchema:!0}}},q=["vertical","horizontal"],U=["horizontal","vertical"],G=["right","left","top","bottom"],W=["linear","monotoneX","monotoneY","step","stepAfter","stepBefore","basis","cardinal","catmullRom"];function V(e){const t={type:e.type};return e.enum&&(t.enum=[...e.enum]),t}function K(e){const t={};for(const[r,a]of Object.entries(function(e){const t={};for(const r of e.propBags)Object.assign(t,H[r]);return Object.assign(t,e.ownProps),t}(e)))t[r]=V(a);return{required:[...e.required],dataShape:e.dataShape,dataAccessors:[...e.dataAccessors],props:t}}var Y=Object.fromEntries(Object.entries({BarChart:{name:"BarChart",category:"ordinal",description:"Vertical or horizontal bars for categorical comparisons.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category",description:"Key for category labels"},valueAccessor:{type:["string","function"],default:"value",description:"Key for bar values"},orientation:{type:"string",enum:q,default:"vertical"},sort:{type:["boolean","string","function"],default:!1,description:"Sort bars: false, true, 'asc', 'desc', or comparator function"},barPadding:{type:"number",default:40},roundedTop:{type:"number",omitFromSchema:!0},valueExtent:{type:"array",omitFromSchema:!0},regression:{type:["boolean","string","object"],description:"Overlay a regression line through the bar tops. Accepts true (linear), a method ('linear' | 'polynomial' | 'loess'), or a full RegressionConfig. Pixels resolve through the band scale."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["regression-overlay"]}},StackedBarChart:{name:"StackedBarChart",category:"ordinal",description:"Stacked bars for part-to-whole comparisons across categories. Requires stackBy to define the stacking dimension.",required:["data","stackBy"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},stackBy:{type:["string","function"],description:"Key to define the stacking dimension (required)"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},orientation:{type:"string",enum:q,default:"vertical"},normalize:{type:"boolean",default:!1,description:"Normalize stacks to 100%"},sort:{type:["boolean","string","function"],omitFromSchema:!0},barPadding:{type:"number",default:40},roundedTop:{type:"number",omitFromSchema:!0},showLegend:{type:"boolean",default:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["stack"]}},GroupedBarChart:{name:"GroupedBarChart",category:"ordinal",description:"Side-by-side bars for comparing sub-categories within categories. Requires groupBy to define grouping.",required:["data","groupBy"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},groupBy:{type:["string","function"],description:"Key to define the grouping dimension (required)"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},orientation:{type:"string",enum:q,default:"vertical"},sort:{type:["boolean","string","function"],omitFromSchema:!0},barPadding:{type:"number",default:60},roundedTop:{type:"number",omitFromSchema:!0},showLegend:{type:"boolean",default:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},SwarmPlot:{name:"SwarmPlot",category:"ordinal",description:"Beeswarm/jittered dot plot showing individual data points within categories. Good for distributions.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},orientation:{type:"string",enum:q,default:"vertical"},sizeBy:{type:["string","function"],description:"Key for variable point sizing"},sizeRange:{type:"array",default:[3,8]},symbolBy:{type:["string","function"],description:"Categorical field → glyph shape; each point renders as a d3-shape glyph instead of a circle."},symbolMap:{type:"object",description:"Explicit {category → shape} map for symbolBy; unmapped categories auto-assign."},pointRadius:{type:"number",default:4},pointOpacity:{type:"number",default:.7},categoryPadding:{type:"number",default:20},brush:{type:"boolean",omitFromSchema:!0},onBrush:{type:"function",omitFromSchema:!0},linkedBrush:{type:["string","object"],omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},BoxPlot:{name:"BoxPlot",category:"ordinal",description:"Box-and-whisker plots showing statistical distribution (median, quartiles, outliers) per category.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},orientation:{type:"string",enum:q,default:"vertical"},showOutliers:{type:"boolean",default:!0,description:"Show outlier points"},outlierRadius:{type:"number",default:3},categoryPadding:{type:"number",default:20}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["statistical"]}},Histogram:{name:"Histogram",category:"ordinal",description:"Binned frequency distribution chart. Shows how data values are distributed across bins within categories.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},bins:{type:"number",default:25,description:"Number of bins for the histogram"},relative:{type:"boolean",default:!1,description:"Normalize counts per category to show relative frequency"},categoryPadding:{type:"number",default:20},brush:{type:"boolean",omitFromSchema:!0},onBrush:{type:"function",omitFromSchema:!0},linkedBrush:{type:["string","object"],omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},ViolinPlot:{name:"ViolinPlot",category:"ordinal",description:"Violin plots showing the full distribution shape (kernel density) per category. Combines density estimation with optional IQR lines.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},orientation:{type:"string",enum:q,default:"vertical"},bins:{type:"number",default:25,description:"Number of bins for density estimation"},curve:{type:"string",default:"catmullRom",description:"Interpolation curve for the violin shape"},showIQR:{type:"boolean",default:!0,description:"Show interquartile range lines"},categoryPadding:{type:"number",default:20},brush:{type:"boolean",omitFromSchema:!0},onBrush:{type:"function",omitFromSchema:!0},linkedBrush:{type:["string","object"],omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["statistical"]}},RidgelinePlot:{name:"RidgelinePlot",category:"ordinal",description:"Overlapping density distributions for comparing distributions across categories. Each category gets a density curve that can overlap with adjacent rows.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],description:"Key for category grouping"},valueAccessor:{type:["string","function"],description:"Key for numeric values to build distributions from"},bins:{type:"number",description:"Number of bins for density estimation"},amplitude:{type:"number",default:1.5,description:"Unitless multiplier of row height (>1 creates overlap)"},categoryPadding:{type:"number",omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},DotPlot:{name:"DotPlot",category:"ordinal",description:"Cleveland-style dot plot for comparing values across categories. Sorted by default.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},orientation:{type:"string",enum:q,default:"horizontal"},sort:{type:["boolean","string","function"],default:!0,description:"Sort dots: true, false, 'asc', 'desc'"},dotRadius:{type:"number",default:5},categoryPadding:{type:"number",default:10},showGrid:{type:"boolean",default:!0},regression:{type:["boolean","string","object"],description:"Overlay a regression line through the dots. Same shape as Scatterplot's regression prop."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["regression-overlay"]}},PieChart:{name:"PieChart",category:"ordinal",description:"Proportional slices in a circle for part-to-whole relationships.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},startAngle:{type:"number",default:0,description:"Starting angle in radians"},cornerRadius:{type:"number",omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},DonutChart:{name:"DonutChart",category:"ordinal",description:"Pie chart with a hole in the center. Supports center content like summary statistics.",required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["common"],ownProps:{data:{type:"array",description:"Array of data objects"},categoryAccessor:{type:["string","function"],default:"category"},valueAccessor:{type:["string","function"],default:"value"},innerRadius:{type:"number",default:60,description:"Inner radius of the donut hole in pixels"},centerContent:{type:["object","string","number"],description:"React node to render in the center of the donut (accepts string key or JSX)"},startAngle:{type:"number",default:0},cornerRadius:{type:"number",omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},GaugeChart:{name:"GaugeChart",category:"ordinal",description:"Single-value gauge with threshold zones, needle indicator, and configurable sweep angle. Built on StreamOrdinalFrame radial projection.",required:["value"],dataShape:"none",dataAccessors:[],propBags:["common"],ownProps:{value:{type:"number",description:"Current gauge value"},min:{type:"number",default:0},max:{type:"number",default:100},thresholds:{type:"array",description:"Array of { value, color, label? } defining threshold zones. Last value should equal max."},gradientFill:{type:"object",description:"Arc-length gradient for the gauge band. Color stops are sampled along the sweep from start to end."},arcWidth:{type:"number",default:.3,description:"Arc thickness as fraction of radius (0-1)"},cornerRadius:{type:"number",description:"Pixel radius for rounded segment ends. Same semantics as DonutChart's cornerRadius. Omit for sharp corners."},sweep:{type:"number",default:240,description:"Arc sweep angle in degrees (gap centered at bottom)"},fillZones:{type:"boolean",default:!0,description:"When true, the arc fills up to the current value; when false, the full arc is shown."},showNeedle:{type:"boolean",default:!0},needleColor:{type:"string"},color:{type:"string",description:"Fallback fill color used when no thresholds are defined"},valueFormat:{type:"function"},centerContent:{type:["object","string","number","function"],omitFromSchema:!0},showScaleLabels:{type:"boolean",default:!0},backgroundColor:{type:"string",omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!1,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!1,supportsSSR:!0,colorModel:"threshold",layoutMode:"synthetic",specialFeatures:["threshold-zones","value-only","controlled-prop-streaming"]}},FunnelChart:{name:"FunnelChart",category:"ordinal",description:"Funnel visualization with two orientations. Horizontal (default): steps top-to-bottom with centered bars and trapezoid connectors; multi-category mirrors around center axis. Vertical: steps on x-axis as vertical bars with hatched dropoff stacking (solid = retained, hatched = dropoff from previous step); multi-category renders grouped bars.",required:["data"],dataShape:"array",dataAccessors:["stepAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects with step and value fields"},stepAccessor:{type:["string","function"],default:"step",description:"Key for funnel step/stage name"},valueAccessor:{type:["string","function"],default:"value",description:"Key for numeric value per step"},categoryAccessor:{type:["string","function"],description:"Key to split each step into mirrored categories (optional)"},orientation:{type:"string",enum:U,default:"horizontal",description:"Horizontal (default): centered bars top-to-bottom with trapezoid connectors. Vertical: vertical bars with hatched dropoff stacking — solid = retained, hatched = dropoff from previous step. Multi-category renders grouped bars in vertical mode."},connectorOpacity:{type:"number",default:.3,description:"Opacity of trapezoid connectors between steps (0-1). Horizontal orientation only."},showCategoryTicks:{type:"boolean",default:!1,description:"Show category tick labels on ordinal axis"},responsiveWidth:{type:"boolean"},legendPosition:{type:"string",enum:G}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},SwimlaneChart:{name:"SwimlaneChart",category:"ordinal",description:"Categorical lanes with sequentially stacked items colored by subcategory. Unlike StackedBarChart, the same subcategory can appear multiple times in the same lane — items stack left-to-right (horizontal) or bottom-to-top (vertical) in data order. Supports brush for value-axis selection and push API for streaming.",required:["subcategoryAccessor"],dataShape:"array",dataAccessors:["categoryAccessor","subcategoryAccessor","valueAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of data objects. Omit for push API mode."},categoryAccessor:{type:["string","function"],default:"category",description:"Key for lane categories (swim lanes)"},subcategoryAccessor:{type:["string","function"],description:"Key for item subcategory (color grouping within lanes). Required. Duplicate subcategories in the same lane stack sequentially."},valueAccessor:{type:["string","function"],default:"value",description:"Key for item size/duration along the value axis"},orientation:{type:"string",enum:U,default:"horizontal",description:"Horizontal renders lanes as rows; vertical as columns."},barPadding:{type:"number",default:40,description:"Padding between lanes in pixels"},roundedTop:{type:"number",description:"Rounded corner radius (px) applied to the outermost ends of each lane — left+right for horizontal, top+bottom for vertical. Middle segments stay square; single-segment lanes round all four corners."},brush:{type:"boolean",description:"Enable value-axis brush selection"},onBrush:{type:"function",description:"Callback with { r: [min, max] } or null when brush clears"},linkedBrush:{type:["string","object"],description:"LinkedCharts brush integration name"},showCategoryTicks:{type:"boolean",description:"Show lane labels on the category axis"},responsiveWidth:{type:"boolean"},legendPosition:{type:"string",enum:G}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["brush"]}},LikertChart:{name:"LikertChart",category:"ordinal",description:"Visualize Likert scale survey responses. Horizontal (default): diverging bar chart centered at 0% — negative levels extend left, positive right, neutral (if odd count) split 50/50 across centerline. Vertical: stacked 100% bar chart. Supports raw integer scores (1-based, aggregated automatically) or pre-aggregated (question, level, count) data. The levels array defines polarity: first half = negative, second half = positive, center = neutral (if odd). Works with any scale size (3-point to 7-point+). Supports push API for streaming — accumulates raw data and re-aggregates on each push.",required:[],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor","levelAccessor","countAccessor"],propBags:["common","ordinalAxis"],ownProps:{data:{type:"array",description:"Array of raw response or pre-aggregated data objects"},levels:{type:"array",default:["Very Low","Low","Neutral","High","Very High"],description:"Ordered response labels, most negative to most positive. Defaults to a 5-point Very Low to Very High scale. Odd count = center is neutral."},categoryAccessor:{type:["string","function"],default:"question",description:"Question/item field (ordinal axis)"},valueAccessor:{type:["string","function"],default:"score",description:"Integer score field for raw response mode (1-based: score 1 → levels[0])"},levelAccessor:{type:["string","function"],description:"Level name field for pre-aggregated mode. Each value must match an entry in levels."},countAccessor:{type:["string","function"],default:"count",description:"Count/frequency field for pre-aggregated mode"},orientation:{type:"string",enum:q,default:"horizontal"},barPadding:{type:"number",default:20}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},LineChart:{name:"LineChart",category:"xy",description:"Line traces with curve interpolation, area fill, and point markers. Use for time series, trends, and continuous data.",required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},xAccessor:{type:["string","function"],default:"x",description:"Key or accessor function for x-axis values"},yAccessor:{type:["string","function"],default:"y",description:"Key or accessor function for y-axis values"},lineBy:{type:["string","function"],description:"Key to group data into separate lines"},lineDataAccessor:{type:"string",default:"coordinates",description:"Key for the coordinates array within each line object"},curve:{type:"string",enum:W,default:"linear",description:"Curve interpolation method"},lineWidth:{type:"number",default:2,description:"Stroke width of the line"},showPoints:{type:"boolean",default:!1,description:"Show data point markers on the line"},pointRadius:{type:"number",default:3,description:"Radius of point markers when showPoints is true"},fillArea:{type:"boolean",default:!1,description:"Fill the area under the line"},areaOpacity:{type:"number",default:.3,description:"Opacity of the filled area (0-1)"},forecast:{type:"object",description:"Forecast overlay config — tagged training/observed/forecast region with optional envelope. See ForecastConfig."},anomaly:{type:"object",description:"Anomaly overlay config — ±σ band + anomaly dot annotations. See AnomalyConfig."},band:{type:["object","array"],description:"Asymmetric min/max envelope drawn under the line. `{ y0Accessor, y1Accessor, style?, perSeries?, interactive? }` or an array of those for percentile fans. Distinct from `forecast`/`anomaly` (computed) — band is pure data passthrough. Hovered datum is enriched with `band: { y0, y1 }` and `bands: [...]`."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["forecast","anomaly","band","series-features","gap-handling","direct-labels","endpoint-labels"]}},AreaChart:{name:"AreaChart",category:"xy",description:"Filled area chart with optional stroke line. Use for showing volume or magnitude over time.",required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},xAccessor:{type:["string","function"],default:"x",description:"Key for x-axis values"},yAccessor:{type:["string","function"],default:"y",description:"Key for y-axis values"},areaBy:{type:["string","function"],description:"Key to group data into separate areas"},lineDataAccessor:{type:"string",default:"coordinates",description:"Key for the coordinates array within each area object"},curve:{type:"string",enum:W,default:"monotoneX"},gradientFill:{type:["boolean","object"],description:"Renderer-space area gradient. true uses default opacity; object supports opacity or colorStops."},semanticGradient:{type:"array",description:"User-facing gradient stops: [{ at: 0-100, color, opacity? }], where 0 is baseline and 100 is line/top. Takes precedence over gradientFill."},areaOpacity:{type:"number",default:.7,description:"Area fill opacity (0-1)"},showLine:{type:"boolean",default:!0,description:"Show stroke line on top of area"},lineWidth:{type:"number",default:2},forecast:{type:"object",description:"Forecast overlay config — tagged training/observed/forecast region with optional envelope. See ForecastConfig."},anomaly:{type:"object",description:"Anomaly overlay config — ±σ band + anomaly dot annotations. See AnomalyConfig."},band:{type:["object","array"],description:"Asymmetric min/max envelope drawn under the area. See LineChart.band — same shape, same enrichment."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["forecast","anomaly","band","series-features"]}},DifferenceChart:{name:"DifferenceChart",category:"xy",description:"Two-series difference chart: fills the area between series A and series B with a color that switches at each crossover — A's color where A > B, B's color where B > A. Crossovers are linearly interpolated so segments meet at zero-width vertices. Both series can be drawn as overlay lines on top of the fill. Classic uses: temperature anomaly (actual vs. normal), forecast accuracy (actual vs. predicted), budget variance.",required:[],dataShape:"array",dataAccessors:["xAccessor","seriesAAccessor","seriesBAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of `{x, a, b}` objects. Omit for push API mode."},xAccessor:{type:["string","function"],default:"x",description:"Key for x values"},seriesAAccessor:{type:["string","function"],default:"a",description:"Key for series A values"},seriesBAccessor:{type:["string","function"],default:"b",description:"Key for series B values"},seriesALabel:{type:"string",default:"A",description:"Display label for series A in legend + tooltip"},seriesBLabel:{type:"string",default:"B",description:"Display label for series B"},seriesAColor:{type:"string",description:"Fill color when series A is higher. Defaults to var(--semiotic-danger)."},seriesBColor:{type:"string",description:"Fill color when series B is higher. Defaults to var(--semiotic-info)."},showLines:{type:"boolean",default:!0,description:"Draw the two series as overlay lines on top of the fill"},lineWidth:{type:"number",default:1.5},showPoints:{type:"boolean",default:!1,description:"Show points at each data vertex on the overlay lines"},pointRadius:{type:"number",default:3},curve:{type:"string",enum:W,default:"linear"},areaOpacity:{type:"number",default:.6,description:"Difference fill opacity (0-1)"},gradientFill:{type:["boolean","object"],description:"Tip→base gradient across each segment; same shape as AreaChart.gradientFill"},xExtent:{type:"array",description:"Fixed x domain `[min, max]`. Either bound may be `undefined`."},yExtent:{type:"array",description:"Fixed y domain `[min, max]`. Either bound may be `undefined`."},pointIdAccessor:{type:["string","function"],description:"Stable ID for push-mode remove()/update()"},windowSize:{type:"number",description:"Max raw rows in the push buffer; older rows evict FIFO. Recommended for long-running streams."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["crossover-segmentation"]}},StackedAreaChart:{name:"StackedAreaChart",category:"xy",description:"Stacked area chart with optional normalization to 100%. Use for part-to-whole trends over time.",required:["data","areaBy"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},xAccessor:{type:["string","function"],default:"x"},yAccessor:{type:["string","function"],default:"y"},areaBy:{type:["string","function"],description:"Key to group data into stacked areas"},lineDataAccessor:{type:"string",default:"coordinates"},curve:{type:"string",enum:W,default:"monotoneX"},areaOpacity:{type:"number",default:.7},showLine:{type:"boolean",default:!0},lineWidth:{type:"number",default:2},normalize:{type:"boolean",default:!1,description:"Normalize stacks to 100%"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["stack","streamgraph"]}},Scatterplot:{name:"Scatterplot",category:"xy",description:"Individual data points plotted by x/y position with optional size and color encoding.",required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},xAccessor:{type:["string","function"],default:"x"},yAccessor:{type:["string","function"],default:"y"},sizeBy:{type:["string","function"],description:"Key for variable point sizing"},sizeRange:{type:"array",default:[3,15],description:"Min and max radius for sizeBy scaling"},symbolBy:{type:["string","function"],description:"Categorical field → glyph shape; each mark renders as a d3-shape glyph (circle/square/triangle/diamond/star/cross/wye/chevron) instead of a circle."},symbolMap:{type:"object",description:"Explicit {category → shape} map for symbolBy; unmapped categories auto-assign."},pointRadius:{type:"number",default:5,description:"Fixed point radius"},pointOpacity:{type:"number",default:.8},regression:{type:["boolean","string","object"],description:"Overlay a regression line. true = linear, 'linear' | 'polynomial' | 'loess' = method, or full RegressionConfig object. Sugar over the trend annotation."},forecast:{type:"object",description:"Forecast overlay config — tagged future points + optional envelope. See ForecastConfig."},anomaly:{type:"object",description:"Anomaly overlay config — ±σ band + anomaly dot annotations. See AnomalyConfig."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["regression-overlay","forecast","anomaly","series-features"]}},BubbleChart:{name:"BubbleChart",category:"xy",description:"Scatterplot with required size dimension for three-variable comparison. Bubble area encodes a numeric value.",required:["data","sizeBy"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},sizeBy:{type:["string","function"],description:"Key for bubble size (required)"},xAccessor:{type:["string","function"],default:"x"},yAccessor:{type:["string","function"],default:"y"},sizeRange:{type:"array",default:[5,40]},bubbleOpacity:{type:"number",default:.6},bubbleStrokeWidth:{type:"number",default:1},bubbleStrokeColor:{type:"string",default:"white"},regression:{type:["boolean","string","object"],description:"Overlay a regression line on the bubbles. Same shape as Scatterplot's regression prop."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["size-encoding","streaming-domain","regression-overlay"]}},Heatmap:{name:"Heatmap",category:"xy",description:"Grid/matrix visualization with color-encoded cell values. Use for correlation matrices, time-frequency analysis.",required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor","valueAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects with x, y, and value"},xAccessor:{type:["string","function"],default:"x"},yAccessor:{type:["string","function"],default:"y"},valueAccessor:{type:["string","function"],default:"value",description:"Key for the cell value"},colorScheme:{type:"string",enum:["blues","reds","greens","viridis","custom"]},customColorScale:{type:["object","function"],omitFromSchema:!0},showValues:{type:"boolean",default:!1,description:"Display numeric values in cells"},valueFormat:{type:"function"},cellBorderColor:{type:"string",default:"#fff"},cellBorderWidth:{type:"number",default:1},legendPosition:{type:"string",enum:G,default:"right",description:"Position of the gradient legend"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"sequential",layoutMode:"plugin",specialFeatures:[]}},QuadrantChart:{name:"QuadrantChart",category:"xy",description:"Scatterplot divided into four labeled, colored quadrants by center lines. Use for BCG matrices, priority matrices, and any 2x2 strategic framework.",required:[],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},xAccessor:{type:["string","function"],default:"x"},yAccessor:{type:["string","function"],default:"y"},xCenter:{type:"number",description:"X-coordinate of the vertical center line. Defaults to midpoint of x domain."},yCenter:{type:"number",description:"Y-coordinate of the horizontal center line. Defaults to midpoint of y domain."},quadrants:{type:"object",default:{topLeft:{label:"Low / High",color:"#E9C46A",opacity:.08},topRight:{label:"High / High",color:"#2A9D8F",opacity:.08},bottomLeft:{label:"Low / Low",color:"#E76F51",opacity:.08},bottomRight:{label:"High / Low",color:"#86BBD8",opacity:.08}},description:"Optional configuration overrides for the four quadrants: { topRight, topLeft, bottomRight, bottomLeft }, each with partial { label, color, opacity }. Omitted quadrants and fields use built-in defaults."},centerlineStyle:{type:"object",omitFromSchema:!0},showQuadrantLabels:{type:"boolean",default:!0},quadrantLabelSize:{type:"number",default:12},sizeBy:{type:["string","function"],description:"Key for variable point sizing"},sizeRange:{type:"array",default:[3,15]},pointRadius:{type:"number",default:5},pointOpacity:{type:"number",default:.8}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["quadrants"]}},MultiAxisLineChart:{name:"MultiAxisLineChart",category:"xy",description:"Dual Y-axis line chart for comparing two series with different scales on the same x axis. Data is unitized (normalized to [0,1]) internally; left axis shows series[0] values and right axis shows series[1] values in original units. Falls back to standard multi-line if not exactly 2 series.",required:["series"],dataShape:"array",dataAccessors:["xAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects shared by both series"},xAccessor:{type:["string","function"],default:"x",description:"Key for x values"},series:{type:"array",description:"Exactly 2 series configs for dual-axis mode. Each: { yAccessor, label?, color?, format?, extent? }"},colorScheme:{type:["string","array"]},curve:{type:"string",default:"monotoneX"},lineWidth:{type:"number",default:2}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["dual-axis","hoc-ssr-only"]}},CandlestickChart:{name:"CandlestickChart",category:"xy",description:"OHLC candlestick bars, or a range chart when open/close are omitted. Honors mode (primary/context/sparkline). Range variant degrades cleanly: endpoint dots + wick, sized against canvas height so sparkline rows don't render marble-sized dots.",required:["highAccessor","lowAccessor"],dataShape:"array",dataAccessors:["xAccessor","highAccessor","lowAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array"},xAccessor:{type:["string","function"],default:"x"},highAccessor:{type:["string","function"],default:"high",description:"Required. Upper bound (candlestick high or range top)."},lowAccessor:{type:["string","function"],default:"low",description:"Required. Lower bound (candlestick low or range bottom)."},openAccessor:{type:["string","function"],description:"Optional. Pair with closeAccessor for OHLC; omit both to render a range chart."},closeAccessor:{type:["string","function"],description:"Optional. See openAccessor."},candlestickStyle:{type:"object",description:"Style overrides."},mode:{type:"string",enum:["primary","context","sparkline"]}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["ohlc"]}},ConnectedScatterplot:{name:"ConnectedScatterplot",category:"xy",description:"Scatterplot where points are connected in order, showing trajectories through 2D space. Viridis-colored start→end, white halo under lines.",required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common","xyAxis"],ownProps:{data:{type:"array",description:"Array of data objects"},xAccessor:{type:["string","function"],default:"x",description:"Key for x-axis values"},yAccessor:{type:["string","function"],default:"y",description:"Key for y-axis values"},orderAccessor:{type:["string","function"],description:"Key for point ordering (number or Date field)"},orderLabel:{type:"string",description:"Label for the ordering metric in tooltips"},pointRadius:{type:"number",default:4,description:"Point radius"},pointIdAccessor:{type:["string","function"],description:"Accessor for unique point IDs, used by point-anchored annotations"},regression:{type:["boolean","string","object"],description:"Overlay a regression line under the connected path. Same shape as Scatterplot's regression prop."},forecast:{type:"object",description:"Forecast overlay config — same shape as LineChart's forecast prop."},anomaly:{type:"object",description:"Anomaly overlay config — ±σ band + anomaly dot annotations."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["regression-overlay","forecast","anomaly","series-features"]}},ScatterplotMatrix:{name:"ScatterplotMatrix",category:"xy",description:"Multi-panel scatterplot grid with crossfilter brushing. Requires data array with numeric fields.",required:["data","fields"],dataShape:"array",dataAccessors:[],propBags:["common"],ownProps:{data:{type:"array"},fields:{type:"array"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!1,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["matrix","brush","composite-delegates-interaction","hoc-ssr-only"]}},MinimapChart:{name:"MinimapChart",category:"xy",description:"Overview + detail chart with linked zoom. Wraps an XY chart with a minimap navigation pane.",required:["data"],dataShape:"array",dataAccessors:[],propBags:["common"],ownProps:{data:{type:"array"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!1,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["brush","overview-detail","composite-delegates-interaction","hoc-ssr-only"]}},ForceDirectedGraph:{name:"ForceDirectedGraph",category:"network",description:"Physics-based node-link diagram. Use for relationships, social networks, knowledge graphs.",required:["nodes","edges"],dataShape:"network",dataAccessors:["nodeIDAccessor","sourceAccessor","targetAccessor"],propBags:["common"],ownProps:{nodes:{type:"array",description:"Array of node objects"},edges:{type:"array",description:"Array of edge objects with source and target"},nodeIDAccessor:{type:["string","function"],default:"id",description:"Key for node unique identifier"},sourceAccessor:{type:["string","function"],default:"source",description:"Key for edge source node ID"},targetAccessor:{type:["string","function"],default:"target",description:"Key for edge target node ID"},nodeLabel:{type:["string","function"],description:"Key or accessor for node labels"},nodeSize:{type:["number","string","function"],default:8,description:"Fixed node radius or key for variable sizing"},nodeSizeRange:{type:"array",default:[5,20]},edgeWidth:{type:["number","string","function"],default:1,description:"Fixed edge width or key for variable width"},edgeColor:{type:"string",default:"#999"},edgeOpacity:{type:"number",default:.6},iterations:{type:"number",default:300,description:"Force simulation iterations"},forceStrength:{type:"number",default:.1},layoutExecution:{type:"string",enum:["auto","worker","sync"],default:"auto",description:"Force layout execution: auto, worker, or sync"},showLabels:{type:"boolean",default:!1}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["force-simulation"]}},SankeyDiagram:{name:"SankeyDiagram",category:"network",description:"Flow diagram showing weighted connections between nodes. Use for flows, budgets, process mapping.",required:["edges"],dataShape:"network",dataAccessors:["sourceAccessor","targetAccessor"],propBags:["common"],ownProps:{edges:{type:"array",description:"Array of edge objects with source, target, and value"},nodes:{type:"array",description:"Optional array of node objects (auto-derived from edges if omitted)"},sourceAccessor:{type:["string","function"],default:"source"},targetAccessor:{type:["string","function"],default:"target"},valueAccessor:{type:["string","function"],default:"value",description:"Key for edge flow value"},nodeIdAccessor:{type:["string","function"],default:"id"},edgeColorBy:{type:["string","function"],enum:["source","target","gradient"],default:"source",description:"How to color edges"},orientation:{type:"string",enum:q,default:"horizontal"},nodeAlign:{type:"string",enum:["justify","left","right","center"],default:"justify"},nodePaddingRatio:{type:"number",default:.05},nodeWidth:{type:"number",default:15},nodeLabel:{type:["string","function"],description:"Key for node labels"},showLabels:{type:"boolean",default:!0},edgeOpacity:{type:"number",default:.5},edgeSort:{type:"function",omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},ProcessSankey:{name:"ProcessSankey",category:"network",description:"Temporal sankey with a real time x-axis. Edges carry startTime/endTime; nodes can declare an explicit xExtent lifetime. Use for timestamped flow events (PR commits, campaign-finance contributions, supply-chain shipments).",required:["domain"],dataShape:"network",dataAccessors:["sourceAccessor","targetAccessor"],propBags:["common"],ownProps:{edges:{type:"array",description:"Array of timed edge records with source, target, value, startTime, endTime. Omit for push-mode."},nodes:{type:"array",description:"Optional array of node objects. Nodes may carry an `xExtent: [start, end]` to bound the lane explicitly."},domain:{type:"array",description:"[tStart, tEnd] of the chart's x-axis (required)."},axisTicks:{type:"array",description:"Optional [{ date, label }] tick array for the time axis."},sourceAccessor:{type:["string","function"],default:"source"},targetAccessor:{type:["string","function"],default:"target"},valueAccessor:{type:["string","function"],default:"value"},nodeIdAccessor:{type:["string","function"],default:"id"},startTimeAccessor:{type:["string","function"],default:"startTime"},endTimeAccessor:{type:["string","function"],default:"endTime"},xExtentAccessor:{type:["string","function"],default:"xExtent"},edgeIdAccessor:{type:["string","function"],default:"id"},legendPosition:{type:"string",enum:["right","left","top","bottom"],default:"right"},pairing:{type:"string",enum:["value","temporal"],default:"temporal",description:"Edge-side pairing strategy at transit nodes."},packing:{type:"string",enum:["off","reuse"],default:"reuse",description:"Lane reuse — pack lifetime-disjoint nodes into the same row."},laneOrder:{type:"string",enum:["insertion","crossing-min","inside-out","crossing-min+inside-out"],default:"crossing-min"},ribbonLane:{type:"string",enum:["source","target","both"],default:"both"},lifetimeMode:{type:"string",enum:["full","half"],default:"half"},showLaneRails:{type:"boolean",default:!1},showQualityReadout:{type:"boolean",default:!1},edgeOpacity:{type:"number",default:.35},timeFormat:{type:"function",omitFromSchema:!0},valueFormat:{type:"function",omitFromSchema:!0},showParticles:{type:"boolean",default:!1},particleStyle:{type:"object",description:"ParticleStyle config — same shape as SankeyDiagram. Defaults from DEFAULT_PARTICLE_STYLE (radius 3, opacity 0.7, spawnRate 0.1, maxPerEdge 50)."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"custom",specialFeatures:["temporal","particles","lane-reuse"]}},ChordDiagram:{name:"ChordDiagram",category:"network",description:"Circular diagram showing inter-relationships and flow volumes between groups.",required:["edges"],dataShape:"network",dataAccessors:["sourceAccessor","targetAccessor"],propBags:["common"],ownProps:{edges:{type:"array",description:"Array of edge objects with source, target, and value"},nodes:{type:"array",description:"Optional array of node objects"},sourceAccessor:{type:["string","function"],default:"source"},targetAccessor:{type:["string","function"],default:"target"},valueAccessor:{type:["string","function"],default:"value"},nodeIdAccessor:{type:["string","function"],default:"id"},edgeColorBy:{type:["string","function"],enum:["source","target"],default:"source"},padAngle:{type:"number",default:.01},groupWidth:{type:"number",default:20},sortGroups:{type:"function",omitFromSchema:!0},nodeLabel:{type:["string","function"]},showLabels:{type:"boolean",default:!0},edgeOpacity:{type:"number",default:.5}},capabilities:{renderModes:["hybrid"],supportsLegend:!1,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:[]}},TreeDiagram:{name:"TreeDiagram",category:"network",description:"Hierarchical tree layout. Supports tree, cluster, partition, and radial orientations. Data is a single root node with children.",required:["data"],dataShape:"object",dataAccessors:[],propBags:["common"],ownProps:{data:{type:"object",description:"Root node object with nested children"},layout:{type:"string",enum:["tree","cluster","partition","treemap","circlepack"],default:"tree"},orientation:{type:"string",enum:["vertical","horizontal","radial"],default:"vertical"},childrenAccessor:{type:["string","function"],default:"children",description:"Key for the children array in each node"},valueAccessor:{type:["string","function"],default:"value"},nodeIdAccessor:{type:["string","function"],default:"name"},colorByDepth:{type:"boolean",default:!1,description:"Color nodes by their depth in the hierarchy"},edgeStyle:{type:"string",enum:["line","curve"],default:"curve"},nodeLabel:{type:["string","function"]},showLabels:{type:"boolean",default:!0},nodeSize:{type:"number",default:5}},capabilities:{renderModes:["hybrid"],supportsLegend:!1,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!1,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["hierarchy"]}},Treemap:{name:"Treemap",category:"network",description:"Space-filling rectangular hierarchy visualization. Data is a single root node with nested children.",required:["data"],dataShape:"object",dataAccessors:[],propBags:["common"],ownProps:{data:{type:"object",description:"Root node object with nested children"},childrenAccessor:{type:["string","function"],default:"children"},valueAccessor:{type:["string","function"],default:"value"},nodeIdAccessor:{type:["string","function"],default:"name"},colorByDepth:{type:"boolean",default:!1},showLabels:{type:"boolean",default:!0},nodeLabel:{type:["string","function"]},nodeStyle:{type:"function",omitFromSchema:!0,description:"Per-node style overlay merged on top of Treemap's built-in color encoding"}},capabilities:{renderModes:["hybrid"],supportsLegend:!1,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!1,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["hierarchy"]}},CirclePack:{name:"CirclePack",category:"network",description:"Nested circles representing hierarchical data. Data is a single root node with nested children.",required:["data"],dataShape:"object",dataAccessors:[],propBags:["common"],ownProps:{data:{type:"object",description:"Root node object with nested children"},childrenAccessor:{type:["string","function"],default:"children"},valueAccessor:{type:["string","function"],default:"value"},nodeIdAccessor:{type:["string","function"],default:"name"},colorByDepth:{type:"boolean",default:!1},showLabels:{type:"boolean",default:!0},nodeLabel:{type:["string","function"]},circleOpacity:{type:"number",default:.7}},capabilities:{renderModes:["hybrid"],supportsLegend:!1,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!1,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["hierarchy"]}},OrbitDiagram:{name:"OrbitDiagram",category:"network",description:"Animated orbital diagram showing hierarchical data as nodes orbiting a center. Supports flat, solar, atomic, and custom ring arrangements.",required:["data"],dataShape:"object",dataAccessors:[],propBags:["common"],ownProps:{data:{type:"object",description:"Hierarchical root object with children: { name: 'root', children: [...] }"},childrenAccessor:{type:["string","function"],default:"children",description:"Key to access children from each datum"},nodeIdAccessor:{type:["string","function"],default:"name",description:"Key to identify each node"},colorByDepth:{type:"boolean",default:!1,description:"Color by hierarchy depth"},orbitMode:{type:["string","array"],default:"flat",description:"Ring arrangement: 'flat', 'solar', 'atomic', or number[]"},orbitSize:{type:["number","function"],default:2.95,description:"Ring size divisor per depth"},speed:{type:"number",default:.25,description:"Orbit speed in degrees per frame"},eccentricity:{type:["number","function"],default:1,description:"Vertical squash for elliptical orbits (1 = circle)"},showRings:{type:"boolean",default:!0,description:"Show orbital ring paths"},nodeRadius:{type:["number","function"],default:6,description:"Node radius"},showLabels:{type:"boolean",default:!1,description:"Show node labels"},animated:{type:"boolean",default:!0,description:"Enable animation"},revolution:{type:"function",omitFromSchema:!0},foregroundGraphics:{type:"object",omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!1,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!1,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["hierarchy","animated","hoc-ssr-only"]}},ChoroplethMap:{name:"ChoroplethMap",category:"geo",description:"Geographic choropleth map with colored regions based on data values.",required:["areas"],dataShape:"array",dataAccessors:["valueAccessor"],propBags:["common"],ownProps:{areas:{type:["array","string"],description:"GeoJSON features or reference geography name"},valueAccessor:{type:["string","function"]},colorScheme:{type:["string","array"]},projection:{type:"string",default:"equalEarth"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!1,supportsSSR:!0,colorModel:"sequential",layoutMode:"plugin",specialFeatures:["controlled-prop-streaming"]}},ProportionalSymbolMap:{name:"ProportionalSymbolMap",category:"geo",description:"Geographic map with sized symbols at point locations.",required:["points"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],propBags:["common"],ownProps:{points:{type:"array"},xAccessor:{type:["string","function"],default:"lon"},yAccessor:{type:["string","function"],default:"lat"},sizeBy:{type:["string","function"]},areas:{type:["array","string"]}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"sequential",layoutMode:"plugin",specialFeatures:[]}},FlowMap:{name:"FlowMap",category:"geo",description:"Geographic flow map showing movement between locations with animated particles.",required:["flows"],dataShape:"array",dataAccessors:[],propBags:["common"],ownProps:{flows:{type:"array"},nodes:{type:"array"},valueAccessor:{type:["string","function"]},lineIdAccessor:{type:["string","function"]}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["particles"]}},DistanceCartogram:{name:"DistanceCartogram",category:"geo",description:"Cartogram distorting geographic positions based on travel time or cost from a center point.",required:["points"],dataShape:"array",dataAccessors:[],propBags:["common"],ownProps:{points:{type:"array"},center:{type:"array"},costAccessor:{type:["string","function"]}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["distortion","hoc-ssr-only"]}},RealtimeLineChart:{name:"RealtimeLineChart",category:"realtime",description:"Streaming line chart rendered on canvas. Uses ref-based push API for high-frequency data.",required:[],dataShape:"realtime",dataAccessors:[],propBags:["realtime"],ownProps:{stroke:{type:"string"},strokeWidth:{type:"number"},strokeDasharray:{type:"string"},transition:{type:"object",description:"Transition config: { duration, easing }"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["live-stream"]}},RealtimeHistogram:{name:"RealtimeHistogram",category:"realtime",description:"Streaming bar chart with binned aggregation. Uses ref-based push API.",required:["binSize"],dataShape:"realtime",dataAccessors:[],propBags:["realtime"],ownProps:{binSize:{type:"number",description:"Time bin size in milliseconds (required)"},direction:{type:"string",enum:["up","down"],default:"up",description:'Bar growth direction. Use "down" for mirrored histograms; explicit valueExtent is reversed.'},categoryAccessor:{type:["string","function"],description:"Key for category grouping"},colors:{type:"object",description:"Map of category to color string"},fill:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},gap:{type:"number"},brush:{type:["boolean","string","object"],description:'Enable brush selection. true defaults to { dimension: "x", snap: "bin" }. String: "x". Object: { dimension, snap: "continuous"|"bin", snapDuring }.'},onBrush:{type:"function",description:"Callback when brush extent changes: (extent | null) => void"},linkedBrush:{type:["string","object"],description:"Cross-chart brush coordination via LinkedCharts. String: selection name. Object: { name, xField, yField }."},transition:{type:"object",description:"Transition config: { duration, easing }"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["live-stream","brush"]}},TemporalHistogram:{name:"TemporalHistogram",category:"realtime",description:"Static-data temporal histogram with binned aggregation. Use when data is a bounded array rather than a push stream.",required:["data","binSize"],dataShape:"array",dataAccessors:["timeAccessor","valueAccessor","categoryAccessor"],propBags:[],ownProps:{data:{type:"array",description:"Array of temporal observations"},binSize:{type:"number",description:"Time bin size in milliseconds (required)"},size:{type:"array",description:"[width, height] in pixels"},width:{type:"number",description:"Alias for size[0]"},height:{type:"number",description:"Alias for size[1]"},margin:{type:"object",description:'Object margin. A side value of "auto" or null leaves that side available for auto-reservation.'},className:{type:"string"},timeAccessor:{type:["string","function"],description:"Key for time/x values"},valueAccessor:{type:["string","function"],description:"Key for y values"},direction:{type:"string",enum:["up","down"],default:"up",description:'Bar growth direction. Use "down" for mirrored histograms; explicit valueExtent is reversed.'},categoryAccessor:{type:["string","function"],description:"Key for category grouping"},colors:{type:"object",description:"Map of category to color string"},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"],description:"Tooltip content function or config"},tooltipContent:{type:"function",omitFromSchema:!0},onHover:{type:"function",omitFromSchema:!0},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"],description:"Opt-in annotation placement pass for note-like annotations without manual offsets."},responsiveRules:{type:"array",description:"Semantic responsive transforms applied before chart-mode defaults."},mobileSemantics:{type:"object",description:"Phone/mobile contract consumed by audits, recipes, adapters, and agents."},mobileInteraction:{type:["boolean","object"],description:"Touch-first interaction policy for phone-sized chart slots."},svgAnnotationRules:{type:"function",omitFromSchema:!0},tickFormatTime:{type:"function",omitFromSchema:!0},tickFormatValue:{type:"function",omitFromSchema:!0},fill:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},gap:{type:"number"},linkedHover:{type:["boolean","string","object"]},linkedBrush:{type:["string","object"],description:"Cross-chart brush coordination via LinkedCharts. String: selection name. Object: { name, xField, yField }."},brush:{type:["boolean","string","object"],description:'Enable brush selection. true defaults to { dimension: "x", snap: "bin" }. String: "x". Object: { dimension, snap: "continuous"|"bin", snapDuring }.'},onBrush:{type:"function",description:"Callback when brush extent changes: (extent | null) => void",omitFromSchema:!0}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!1,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["brush"]}},RealtimeSwarmChart:{name:"RealtimeSwarmChart",category:"realtime",description:"Streaming swarm/scatter chart showing individual data points over time.",required:[],dataShape:"realtime",dataAccessors:[],propBags:["realtime"],ownProps:{categoryAccessor:{type:["string","function"]},colors:{type:"object"},radius:{type:"number"},fill:{type:"string"},opacity:{type:"number"},stroke:{type:"string"},strokeWidth:{type:"number"},pointStyle:{type:"function",description:"Per-datum style callback. Overrides fill, stroke, strokeWidth, opacity, and radius via r.",omitFromSchema:!0},yScaleType:{type:"string",enum:["linear","log","symlog"],description:"Value-axis scale. symlog preserves zero and negative values while compressing large magnitudes."},transition:{type:"object",description:"Transition config: { duration, easing }"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["live-stream"]}},RealtimeWaterfallChart:{name:"RealtimeWaterfallChart",category:"realtime",description:"Streaming waterfall chart with positive/negative bars and connectors.",required:[],dataShape:"realtime",dataAccessors:[],propBags:["realtime"],ownProps:{positiveColor:{type:"string"},negativeColor:{type:"string"},connectorStroke:{type:"string"},connectorWidth:{type:"number"},gap:{type:"number"},stroke:{type:"string"},strokeWidth:{type:"number"},transition:{type:"object",description:"Transition config: { duration, easing }"}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!1,colorModel:"categorical",layoutMode:"plugin",specialFeatures:["live-stream"]}},RealtimeHeatmap:{name:"RealtimeHeatmap",category:"realtime",description:"Streaming 2D heatmap with binned time and value aggregation.",required:[],dataShape:"realtime",dataAccessors:[],propBags:["realtime"],ownProps:{heatmapXBins:{type:"number"},heatmapYBins:{type:"number"},aggregation:{type:"string",enum:["count","sum","mean"]}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!0,supportsLinkedHover:!0,supportsPush:!0,supportsSSR:!1,colorModel:"sequential",layoutMode:"plugin",specialFeatures:["live-stream"]}},GaltonBoardChart:{name:"GaltonBoardChart",category:"physics",description:"Physics-backed Galton board / Plinko-style dot distribution. Values enter deterministic bins and settle into a readable histogram-like projection; mechanical mode can generate a seeded no-data demonstration.",required:[],dataShape:"array",dataAccessors:["valueAccessor"],propBags:["physics"],ownProps:{valueAccessor:{type:["string","function"],default:"value",description:"Numeric field used to assign bodies to Galton bins."},valueExtent:{type:"array",description:"Stable numeric [min, max] domain for binning and reference-line placement."},bins:{type:"number",default:21,description:"Number of landing bins / histogram columns."},mode:{type:"string",enum:["sample","mechanical"],default:"sample",description:"sample uses data values; mechanical emits a deterministic demonstration when no data is supplied."},pegRows:{type:"number",description:"Number of Bernoulli branch rows used by mechanical mode."},mechanicalCount:{type:"number",description:"Number of generated bodies in mechanical mode."},branchProbability:{type:"number",default:.5,description:"Probability that each mechanical sample branches right at a peg."},referenceLines:{type:["object","array"],description:"One or more value markers drawn over the board: { value, label, color, strokeWidth, strokeDasharray, labelPosition }."},showProjection:{type:"boolean",description:"Whether companion docs or wrappers should show the settled projection."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"synthetic",specialFeatures:["physics-simulation","settled-projection","deterministic-seed"]}},EventDropChart:{name:"EventDropChart",category:"physics",description:"Physics-backed event-time drop chart for arrival replay, window barriers, and late/watermark handling.",required:["data"],dataShape:"array",dataAccessors:["timeAccessor","arrivalAccessor"],propBags:["physics"],ownProps:{timeAccessor:{type:["string","function"],default:"time",description:"Event-time field used to assign drops to windows."},arrivalAccessor:{type:["string","function"],default:"arrivalTime",description:"Arrival-time field used to pace event ingestion."},windows:{type:"object",description:"Windowing config, currently { size, gapPolicy? }."},watermark:{type:["object","function"],description:"Watermark config: { delay }, { value }, or a function of latest event time."},timeExtent:{type:"array",description:"Optional stable event-time extent [min, max] for the window layout."},timeScale:{type:"number",default:1,description:"Playback speed for event-arrival pacing; higher is faster (1 = real event-time)."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"synthetic",specialFeatures:["physics-simulation","event-time","watermark","arrival-pacing","settled-projection"]}},PhysicsPileChart:{name:"PhysicsPileChart",category:"physics",description:"Physics-backed unit pile chart. Numeric values are unitized into repeated bodies that settle into category piles.",required:[],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],propBags:["physics"],ownProps:{categoryAccessor:{type:["string","function"],default:"category",description:"Categorical field that chooses the pile / bin."},valueAccessor:{type:["string","function"],default:"value",description:"Numeric field converted into repeated unit bodies."},mode:{type:"string",enum:["sample","mechanical"],default:"sample",description:"sample uses data values; mechanical emits a deterministic no-data unit pile for design sketches."},mechanicalCount:{type:"number",description:"Number of generated unit bodies in mechanical mode."},mechanicalCategories:{type:"array",description:"Category labels generated by mechanical mode."},unitValue:{type:"number",default:1,description:"Value represented by one simulated body."},showProjection:{type:"boolean",default:!0,description:"Draw an exact settled-projection overlay behind the moving units so category totals remain readable."},sediment:{type:"boolean",description:"Reserved for future sediment/aggregation mode."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"synthetic",specialFeatures:["physics-simulation","unitized","settled-projection"]}},CollisionSwarmChart:{name:"CollisionSwarmChart",category:"physics",description:"Physics-backed swarm / dot-strip chart. Quantitative records spring toward an x-position while collisions separate overlapping dots into a readable distribution.",required:[],dataShape:"array",dataAccessors:["xAccessor","groupAccessor","radiusAccessor"],propBags:["physics"],ownProps:{xAccessor:{type:["string","function"],default:"x",description:"Quantitative field that anchors each body along the x-axis."},groupAccessor:{type:["string","function"],description:"Optional categorical field that creates separate swarm lanes."},radiusAccessor:{type:["string","function"],description:"Optional numeric field used as per-body radius in pixels."},pointRadius:{type:"number",default:5,description:"Fallback radius for each simulated body."},xExtent:{type:"array",description:"Optional [min, max] domain for the quantitative axis."},collisionIterations:{type:"number",default:6,description:"Collision solver iterations per fixed physics step."},settle:{type:"boolean",description:"Start bodies near their target positions for a calmer first paint or reduced-motion demo."},showProjection:{type:"boolean",default:!0,description:"Draw x-axis and group-lane guides behind the moving bodies."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"synthetic",specialFeatures:["physics-simulation","collision-layout","settled-projection"]}},GauntletChart:{name:"GauntletChart",category:"physics",description:"Physics-backed compound-plan gauntlet. A project core carries tethered positive/negative property bodies through timed gate events; settled projection is viability and outcome, not trajectories.",required:["negativeProperties"],dataShape:"array",dataAccessors:["idAccessor","positiveAccessor","negativeAccessor","metricsAccessor","startTimeAccessor"],propBags:["physics"],ownProps:{positiveProperties:{type:"array",default:[],description:"Optional lift/value property definitions attached to each project core. Omit or pass an empty array for negative-only compound bodies."},negativeProperties:{type:"array",description:"Drag/cost property definitions attached to each project core."},gates:{type:"array",description:"Named process gates along the route, with optional shared FIFO capacity."},events:{type:["array","function"],description:"Timed gate effects that add/pop properties and set outcomes."},startTimeAccessor:{type:["string","function"],description:"Optional per-project simulation second used as the local event-timeline origin."},onCapacityChange:{type:"function",description:"Receives visit-aware queue work, wait, overflow, throughput, utilization, and pressure snapshots."},crashDetection:{type:"boolean",default:!0,description:"Treat the crash line as a live failure trigger."},showChrome:{type:"boolean",default:!0,description:"Draw route, socket, and graveyard chrome."},showProjection:{type:"boolean",default:!0,description:"Draw settled viability/outcome strip."},showTethers:{type:"boolean",default:!0,description:"Draw tethers between cores and property bodies."},coreForceMode:{type:"string",enum:["route","net"],default:"route",description:"Core-body vertical force model: authored route guidance or net lift/drag drift."},terminalBehavior:{type:"string",enum:["outcome","hold-last"],default:"outcome"}},capabilities:{renderModes:["hybrid"],supportsLegend:!1,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"synthetic",specialFeatures:["physics-simulation","process-gauntlet","settled-projection"]}},ProcessFlowChart:{name:"ProcessFlowChart",category:"physics",description:"Physics-backed multi-body process flow. Work items move through ordered stages with optional capacity, pressure, portals, absorb sinks, and feature groups that complete only when every member is absorbed.",required:["stages"],dataShape:"array",dataAccessors:["idAccessor","stageAccessor","groupBy","workAccessor","radiusAccessor"],propBags:["physics"],ownProps:{stages:{type:"array",description:"Ordered process stages: { id, label?, force?, damping?, capacity?, pressure?, portal?, absorb? }."},stageAccessor:{type:["string","function"],default:"stage",description:"Field or accessor for each work item's current stage id."},idAccessor:{type:["string","function"],description:"Stable work-item id."},groupBy:{type:["string","function"],description:"Optional feature/group key. Groups complete when all members reach an absorb stage."},groupLabelAccessor:{type:["string","function"],description:"Display label for group anchors."},workAccessor:{type:["string","function"],description:"Work-units field stamped for capacity metadata."},radiusAccessor:{type:["string","function"],description:"Optional per-body radius in pixels."},ballRadius:{type:"number",default:6,description:"Fallback body radius."},groupCompletion:{type:"string",enum:["allAbsorbed","none"],default:"allAbsorbed when groupBy is set",description:"How feature groups report completion."},groupAnchorAlong:{type:"number",description:"0–1 position along the lane for group anchors."},showProjection:{type:"boolean",default:!0,description:"Draw settled stage-count bars."},showChrome:{type:"boolean",default:!0,description:"Draw stage labels, capacity notes, and group anchors."},settle:{type:"boolean",description:"Start bodies at stage targets for a calmer first paint."},seed:{type:"number",default:1,description:"Deterministic seed for placement jitter."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"synthetic",specialFeatures:["physics-simulation","process-flow","capacitated-stages","group-completion","settled-projection"]}},PhysicalFlowChart:{name:"PhysicalFlowChart",category:"physics",description:"Experimental physics-backed flow chart. Packets move along authored node coordinates or link paths while a static throughput layer keeps the route quantities readable.",required:[],dataShape:"network",dataAccessors:["nodeIdAccessor","nodeXAccessor","nodeYAccessor","sourceAccessor","targetAccessor","throughputAccessor","pathAccessor"],propBags:["common"],ownProps:{size:{type:"array",description:"[width, height] in pixels"},nodes:{type:"array",description:"Route nodes with explicit x/y geometry. x/y may be normalized 0-1 coordinates or chart pixels."},links:{type:"array",description:"Flow links with source, target, throughput, and optional path geometry."},edges:{type:"array",description:"Alias for links, for network-shaped inputs."},data:{type:"array",description:"Alias for links when using chart-generator style data props."},nodeIdAccessor:{type:["string","function"],default:"id",description:"Key for node unique identifier."},nodeXAccessor:{type:["string","function"],default:"x",description:"Node x-coordinate. Use 0-1 normalized values by default."},nodeYAccessor:{type:["string","function"],default:"y",description:"Node y-coordinate. Use 0-1 normalized values by default."},sourceAccessor:{type:["string","function"],default:"source",description:"Link source node id."},targetAccessor:{type:["string","function"],default:"target",description:"Link target node id."},throughputAccessor:{type:["string","function"],default:"value",description:"Numeric throughput field that controls pipe width and packet count."},pathAccessor:{type:["string","function"],default:"path",description:"Optional link path as [{x,y}, ...] or [[x,y], ...]."},coordinateMode:{type:"string",enum:["auto","normalized","pixels"],default:"auto",description:"How node and path coordinates are mapped into the plot area."},particleRate:{type:"number",default:.16,description:"Packets generated per throughput unit before maxParticles downsampling."},maxParticles:{type:"number",default:180,description:"Maximum live packets generated for the initial flow scene."},particleRadius:{type:"number",default:4,description:"Packet body radius in pixels."},flowSpeed:{type:"number",default:90,description:"Initial packet velocity along each authored route."},pathConstraint:{type:"string",enum:["path","none"],default:"path",description:"Whether live packets are steered along authored route paths."},reducedMotion:{type:"boolean",default:!1,description:"Start packets on their route positions and pause the simulation."},showStaticFlow:{type:"boolean",default:!0,description:"Draw the route/pipe throughput layer behind animated packets."},showNodeLabels:{type:"boolean",default:!0},showSensors:{type:"boolean",default:!1,description:"Draw destination/node proximity sensors used for observation events."},paused:{type:"boolean",default:!1,description:"Pause the physics simulation."},seed:{type:"number",default:1,description:"Deterministic seed for packet jitter and initial flow."}},capabilities:{renderModes:["hybrid"],supportsLegend:!0,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!0,colorModel:"categorical",layoutMode:"synthetic",specialFeatures:["physics-simulation","path-constrained-flow","static-flow","proximity-sensors","settled-projection"]}},BigNumber:{name:"BigNumber",category:"value",description:"Focal-value display: one number, optionally with comparison / target / threshold zones (mapped to semantic theme roles) / four layout modes (tile / presentation / inline / thumbnail). Ships with NO chart-family dependency — embed your own Semiotic chart via two slots: `trendSlot` for wide / rectangular charts (LineChart, AreaChart) under the value, and `chartSlot` for square charts (DonutChart, PieChart, Scatterplot, Treemap) beside the value. The slot context exposes the resolved threshold colour + sentiment + push buffer so embedded charts can theme-link. Forward-looking POC for a future SingleValueFrame.",required:[],dataShape:"none",dataAccessors:[],propBags:[],ownProps:{width:{type:["number","string"],default:280,description:"Reserved width in pixels (or any CSS length). Mode-keyed defaults: 280 (tile) / 540 (presentation) / unset (inline / thumbnail)."},height:{type:["number","string"],default:184,description:"Reserved height in pixels (or any CSS length). Mode-keyed defaults: 184 (tile) / 320 (presentation) / unset (inline / thumbnail)."},className:{type:"string",description:"Composed with the BEM root class on the outer container."},value:{type:"number",description:"The focal number this card exists to display"},label:{type:"string",description:"Top-line descriptor rendered above the value"},caption:{type:"string",description:"Secondary descriptor, smaller, below the label"},format:{type:["string","function"],enum:["number","currency","percent","compact","duration"],default:"number",description:"Number-format shortcut or custom (value) => string"},locale:{type:"string",default:"en-US",description:"BCP-47 locale for Intl.NumberFormat"},currency:{type:"string",default:"USD",description:'ISO 4217 code for format: "currency"'},precision:{type:"number",description:"maximumFractionDigits passed to Intl.NumberFormat"},prefix:{type:"string",description:"Prepend to formatted value"},suffix:{type:"string",description:"Append to formatted value"},unit:{type:"string",description:'Unit label rendered after the value as small text (e.g. "USD", "req/s")'},comparison:{type:"object",description:"Comparison value: { value, label?, format?, direction? }. Drives the delta when explicit delta is not set."},target:{type:"object",description:'Target value: { value, label?, format?, direction? }. Renders "X% of target" next to the comparison row.'},delta:{type:"number",description:"Explicit delta override; bypasses comparison-derived subtraction"},deltaFormat:{type:["string","function"],enum:["number","currency","percent","compact","duration"],description:"Format the delta; defaults to format"},showDeltaPercent:{type:"boolean",default:!0,description:"Render percent change next to absolute delta when a comparison is present"},direction:{type:"string",enum:["higher-is-better","lower-is-better","neutral"],default:"higher-is-better",description:"Default direction used to infer sentiment from the sign of the delta"},sentiment:{type:"string",enum:["auto","positive","negative","neutral"],default:"auto",description:'Force sentiment; "auto" infers from direction + delta sign'},thresholds:{type:"array",description:"Threshold zones: [{ at, level, color?, label? }] ordered ascending by `at`. Resolved by highest `at` ≤ value. `level` maps to a semantic CSS variable (--semiotic-{success|warning|danger|info})."},chartSlot:{type:["string","number","array","object","function"],omitFromSchema:!0,description:"Square chart to render beside the value — e.g. a DonutChart / PieChart / Scatterplot / Treemap. ReactNode or (ctx) => ReactNode; the function form receives the resolved level / color / sentiment / pushBuffer."},chartSize:{type:"number",description:"Pixel size reserved for chartSlot (rendered as a square). Mode-keyed defaults: 44 (tile) / 80 (presentation) — sparkline scale; pass a larger value for a hero anchor."},windowSize:{type:"number",default:60,description:"Cap on the trend buffer when fed via push API"},mode:{type:"string",enum:["tile","presentation","inline","thumbnail"],default:"tile",description:"Layout mode — chrome envelope around the value"},align:{type:"string",enum:["start","center","end"],description:"Horizontal alignment within the card"},padding:{type:["number","object"],description:"Inner padding: number for uniform, or { top, right, bottom, left }"},emphasis:{type:"string",enum:["primary","secondary"],description:'Visual emphasis hint; "primary" spans two ChartGrid columns'},color:{type:"string",description:"Override the value text colour. CSS variables work."},background:{type:"string",description:"Card background. CSS variables work."},borderColor:{type:"string"},borderRadius:{type:["number","string"]},animate:{type:["boolean","object"],description:'Tween between value changes. true = 300ms ease-out + intro. Object: { duration?, easing?: "linear"|"ease-out", intro? }'},stalenessThreshold:{type:"number",description:"Mark stale (dimmed) when no push occurs for this many ms"},staleLabel:{type:"string",default:"stale"},headerSlot:{type:["string","number","array","object","function"],omitFromSchema:!0,description:"Replace the entire header (label + caption) slot"},valueSlot:{type:["string","number","array","object","function"],omitFromSchema:!0,description:"Replace the focal value slot"},deltaSlot:{type:["string","number","array","object","function"],omitFromSchema:!0,description:"Replace the delta / comparison / target row"},trendSlot:{type:["string","number","array","object","function"],omitFromSchema:!0,description:'Wide / rectangular chart embedded beneath the value — e.g. a LineChart / AreaChart in mode="sparkline". ReactNode or (ctx) => ReactNode; the function form receives the resolved level / color / sentiment / pushBuffer.'},footerSlot:{type:["string","number","array","object","function"],omitFromSchema:!0,description:"Free-form footer below the trend"},onClick:{type:"function",omitFromSchema:!0},onObservation:{type:"function",omitFromSchema:!0}},capabilities:{renderModes:["svg"],supportsLegend:!1,supportsSelection:!1,supportsLinkedHover:!1,supportsPush:!0,supportsSSR:!1,colorModel:"threshold",layoutMode:"synthetic",specialFeatures:["threshold-zones","value-only","comparison","target","staleness","intl-format","chart-slot","trend-slot","hoc-ssr-only"]}}}).map(([e,t])=>[e,K(t)]));function X(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}function J(e,t){const r=[];null!=t&&"object"==typeof t||(t={});const a=Y[e];if(!a)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(Y).join(", ")}`]};for(const o of a.required)null==t[o]&&r.push(`"${o}" is required for ${e}.`);"array"!==a.dataShape||!Object.prototype.hasOwnProperty.call(a.props,"data")||a.required.includes("data")||function(e,t){return"mechanical"===t.mode&&("GaltonBoardChart"===e||"PhysicsPileChart"===e)}(e,t)||null!=t.data||r.push(`"data" is required for ${e}.`);for(const[e,o]of Object.entries(t)){if(null==o)continue;const t=a.props[e];if(t){if(!X(o,t.type)){const a=Array.isArray(t.type)?t.type.join(" | "):t.type;r.push(`"${e}" should be ${a}, got ${Array.isArray(o)?"array":typeof o}.`);continue}t.enum&&"string"==typeof o&&!t.enum.includes(o)&&r.push(`"${e}" value "${o}" is not valid. Expected one of: ${t.enum.join(", ")}.`)}}const o=Object.keys(a.props),i=new Set(o);for(const a of Object.keys(t))if(void 0!==t[a]&&!i.has(a)){const t=E(a,o),i=t?`Unknown prop "${a}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${a}" for ${e}. Valid props: ${o.join(", ")}.`;r.push(i)}if("array"===a.dataShape){const o=t.data,i={};for(const e of a.dataAccessors){const r=t[e];"string"==typeof r&&(i[e]=r)}const s=function({componentName:e,data:t,accessors:r,requiredProps:a}){if(a)for(const[t,r]of Object.entries(a))if(null==r)return`${e}: ${t} is required. Provide a field name or function.`;if(null==t)return null;if(!Array.isArray(t)&&"object"==typeof t)return e+": data should be an array, but received an object. If this is hierarchical data, use TreeDiagram, Treemap, or CirclePack instead.";if(!Array.isArray(t)||0===t.length)return e+": No data provided. Pass a non-empty array to the data prop.";if(r){const a=_(t).find(e=>e&&"object"==typeof e);if(a){const t=Object.keys(a);for(const[o,i]of Object.entries(r))if(i&&"string"==typeof i&&!(i in a)){const r=D(i,t),a=r?` Try ${o}="${r}".`:"";return`${e}: ${o} "${i}" not found in data. Available fields: ${t.join(", ")}.${a}`}}}return null}({componentName:e,data:o,accessors:Object.keys(i).length>0?i:void 0});s&&r.push(s)}else if("object"===a.dataShape){const a=function({componentName:e,data:t,dataLabel:r="data"}){return null==t?`${e}: No ${r} provided. Pass a hierarchical object with children: { name: "root", children: [...] }.`:Array.isArray(t)?`${e}: ${r} should be a single root object, not an array. Expected: { name: "root", children: [...] }. If you have flat data, use LineChart, BarChart, or Scatterplot instead.`:null}({componentName:e,data:t.data});a&&r.push(a)}else if("network"===a.dataShape){const o=function({componentName:e,nodes:t,edges:r,nodesRequired:a=!1,edgesRequired:o=!0,accessors:i}){if(null==t&&null==r)return null;if(o&&(!r||!Array.isArray(r)||0===r.length))return e+': No edges provided. Pass a non-empty array: edges={[{ source: "A", target: "B", value: 10 }, ...]}.';if(a&&(!t||!Array.isArray(t)||0===t.length))return e+': No nodes provided. Pass a non-empty array: nodes={[{ id: "A" }, { id: "B" }, ...]}.';if(i&&t&&t.length>0){const r=_(t).find(e=>e&&"object"==typeof e);if(r){const t=Object.keys(r);for(const[a,o]of Object.entries(i))if(o&&"string"==typeof o&&!(o in r)){const r=D(o,t),i=r?` Try ${a}="${r}".`:"";return`${e}: ${a} "${o}" not found in node data. Available fields: ${t.join(", ")}.${i}`}}}return null}({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:a.required.includes("nodes"),edgesRequired:a.required.includes("edges")});o&&r.push(o)}return{valid:0===r.length,errors:r}}function Q(e){return null==e?null:e.data??e.datum??e}require("d3-interpolate");var Z=80,ee=100;function te(e,t={}){const r=[],a=e.tokenSemantics,o=e.countStrategy,i=t.maxRecommendedTokens??("fixed-denominator"!==o||function(e){const t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}(e.denominator)>ee?Z:ee);return a||r.push({code:"TOKEN_SEMANTICS_UNCLEAR",severity:"warning",message:"Every tokenized encoding should state what one token represents."}),o||r.push({code:"MISSING_COUNT_STRATEGY",severity:"warning",message:"Every tokenized encoding should state how token counts are produced."}),"icon"!==e.tokenType&&"glyph"!==e.tokenType||"icon-only"!==e.labelPolicy&&"token-only"!==e.labelPolicy||r.push({code:"ICON_ONLY_LABELS",severity:"warning",message:"Icons should supplement text labels, not replace them."}),null!=t.visibleTokens&&t.visibleTokens>i&&r.push({code:"TOO_MANY_VISIBLE_TOKENS",severity:"warning",message:`This encoding renders ${t.visibleTokens} visible tokens. Consider unitizing, sampling, or a hybrid bar/token view.`}),"decorative"!==a||"icon"!==e.tokenType&&"glyph"!==e.tokenType||r.push({code:"DECORATIVE_PICTOGRAPHS",severity:"warning",message:"Decorative pictographs can harm recall and speed when they do not clarify the data."}),"unitized-measure"===a&&o&&"unitized"!==o&&r.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Unitized measures should use the unitized count strategy so each token has a stable value."}),"risk-case"===a&&o&&"fixed-denominator"!==o&&r.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Risk cases are usually clearest as a fixed-denominator natural frequency."}),"possible-outcome"!==a&&"posterior-sample"!==a&&"hypothetical-case"!==a||!o||"quantile"===o||"sample"===o||"posterior-sample"===o||"random-sample"===o||r.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Outcome/sample tokens should come from quantiles or samples, not from a unitized magnitude."}),"unitized-measure"===a&&"unitized"===o&&null==e.unitValue&&null==e.unit&&r.push({code:"MISSING_UNIT_VALUE",severity:"warning",message:"Unitized measures should set unitValue so each token has a declared value."}),"unitized-measure"!==a||"unitized"!==o||e.unitMeaning||r.push({code:"MISSING_UNIT_MEANING",severity:"info",message:"Add unitMeaning so readers know what one full token represents."}),r}function re(e){let t=e.replace(/^#/,"");/^[a-f\d]{3}$/i.test(t)&&(t=t.split("").map(e=>e+e).join(""));const r=t.match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!r)return null;const[a,o,i]=[parseInt(r[1],16)/255,parseInt(r[2],16)/255,parseInt(r[3],16)/255],s=e=>e>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92;return.2126*s(a)+.7152*s(o)+.0722*s(i)}function ae(e,t){const r=re(e),a=re(t);return null===r||null===a?null:(Math.max(r,a)+.05)/(Math.min(r,a)+.05)}var oe=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),ie=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),se=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),ne=new Set(["LineChart","AreaChart","StackedAreaChart"]),ce=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),le=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),de=new Set(["PieChart","DonutChart"]),ue={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},pe=new Set(Object.keys(ue)),he={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},me=new Set(["BigNumber"]),fe=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),ye=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]),ge=new Set(["OrbitDiagram",...ye]),be=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart"]),ve=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]),we=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),xe=new Set(["MultiAxisLineChart"]),Se=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),Ae={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"},ke=new Set(["label","callout","callout-circle","callout-rect","text","widget"]),Ce=new Set(["label","callout","callout-circle","callout-rect"]);function $e(e){return"string"==typeof e?.type?e.type:""}function Pe(e){return!!e&&"object"==typeof e&&ke.has($e(e))}function Re(e){return Ce.has($e(e))&&!function(e){return Array.isArray(e?.disable)&&e.disable.includes("connector")}(e)}var Me=2e4,Le=120,Fe=250;var je=["xExtent","yExtent","rExtent"],Te=8;function ze(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:null}function Be(e,t,r){if("function"==typeof t)return t(e);const a="string"==typeof t?t:r;return e?.[a]}var Ne=new Set(["category10","tableau10","set3","blues","reds","greens","oranges","purples","greys","viridis","plasma","inferno","magma","cividis","turbo"]),Oe=["xAccessor","yAccessor","timeAccessor","valueAccessor","categoryAccessor","colorBy","sizeBy","lineBy","areaBy","stackBy","groupBy","orderAccessor","y0Accessor","sourceAccessor","targetAccessor","nodeIDAccessor","childrenAccessor","costAccessor"];function Ie(e){return"object"==typeof e&&null!==e&&("tokenType"in e||"tokenSemantics"in e||"countStrategy"in e||"unitValue"in e||"unit"in e)}function Ee(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:void 0}function _e(e,t){const r=Ee(e.visibleTokens);if(null!=r)return r;const a=Ee(t.denominator);if("fixed-denominator"===t.countStrategy&&null!=a)return a;const o=Ee(t.tokenCount),i=Ee(t.maxTokens);return null!=o&&null!=i?Math.min(o,i):o??a??i}function De(e,t){const r=[],a=J(e,function(e){const t={...e};return delete t.tokenEncoding,delete t.visibleTokens,Ie(t.encoding)&&delete t.encoding,t}(t));for(const e of a.errors)r.push({severity:"error",code:"VALIDATION",message:e,fix:""});return Y[e]?(function(e,t,r){const a=Y[e];if(a){if("array"===a.dataShape){const e=t.data;e&&Array.isArray(e)&&0===e.length&&r.push({severity:"error",code:"EMPTY_DATA",message:"data is an empty array — chart will render blank.",fix:"Provide at least one data point: data={[{ x: 1, y: 2 }]}."})}"network"===a.dataShape&&t.edges&&Array.isArray(t.edges)&&0===t.edges.length&&r.push({severity:"error",code:"EMPTY_EDGES",message:"edges is an empty array — network chart will render blank.",fix:'Provide at least one edge: edges={[{ source: "A", target: "B" }]}.'})}}(e,t,r),function(e,t,r){const a=t.width,o=t.height;if(void 0===a||"number"==typeof a&&a>0||r.push({severity:"error",code:"BAD_WIDTH",message:`width=${JSON.stringify(a)} — chart needs a positive number.`,fix:"Set width={600} or use responsiveWidth={true}."}),void 0===o||"number"==typeof o&&o>0||r.push({severity:"error",code:"BAD_HEIGHT",message:`height=${JSON.stringify(o)} — chart needs a positive number.`,fix:"Set height={400} or use responsiveHeight={true}."}),t.size&&Array.isArray(t.size)){const[e,a]=t.size;(null!=e&&0>=e||null!=a&&0>=a)&&r.push({severity:"error",code:"BAD_SIZE",message:`size=[${e}, ${a}] — both dimensions must be positive.`,fix:"Set size={[600, 400]}."})}}(0,t,r),function(e,t,r){const a=Y[e];if(!a||"array"!==a.dataShape)return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const i=o[0];if(!i||"object"!=typeof i)return;const s=Object.keys(i);for(const e of a.dataAccessors){const a=t[e];"string"==typeof a&&(a in i||r.push({severity:"error",code:"ACCESSOR_MISSING",message:`${e}="${a}" not found in data. Available fields: ${s.join(", ")}.`,fix:`Change ${e} to one of: ${s.map(e=>`"${e}"`).join(", ")}.`}))}}(e,t,r),function(e,t,r){oe.has(e)&&Array.isArray(t.data)&&r.push({severity:"error",code:"HIERARCHY_FLAT_ARRAY",message:e+" expects hierarchical data but received a flat array.",fix:'Pass a root object: data={{ name: "root", children: [...] }}. For flat data, use BarChart or LineChart.'})}(e,t,r),function(e,t,r){ie.has(e)&&(t.edges||t.data||r.push({severity:"error",code:"NETWORK_NO_EDGES",message:e+" requires an edges prop.",fix:'Provide edges={[{ source: "A", target: "B", value: 10 }]}.'}))}(e,t,r),function(e,t,r){const a=Y[e];if(!a||"array"!==a.dataShape)return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const i=o[0];if(!i||"object"!=typeof i)return;const s=t.xAccessor;"string"==typeof s&&i[s]instanceof Date&&!t.xFormat&&r.push({severity:"warning",code:"DATE_NO_FORMAT",message:`xAccessor "${s}" contains Date objects but no xFormat is provided. Axis ticks may display "[object Object]".`,fix:"Add xFormat={d => d.toLocaleDateString()} or use timestamps (d.getTime()) instead of Date objects."})}(e,t,r),function(e,t,r){t.linkedHover&&!t.selection&&r.push({severity:"warning",code:"LINKED_HOVER_NO_SELECTION",message:"linkedHover is set but selection is not — this chart emits hover events but won't highlight from others.",fix:`Add selection={{ name: "${"object"==typeof t.linkedHover&&t.linkedHover.name||"hl"}" }} to receive cross-highlights.`})}(0,t,r),function(e,t,r){if(!se.has(e))return;const a=t.rExtent||t.yExtent||t.valueExtent;a&&Array.isArray(a)&&a.length>=1&&null!=a[0]&&0!==a[0]&&r.push({severity:"warning",code:"NON_ZERO_BASELINE",message:`${e} has a non-zero baseline (${a[0]}). Bar and area charts should start at zero to avoid exaggerating differences.`,fix:`Remove the custom extent minimum or set it to 0: rExtent={[0, ${a[1]??"auto"}]}. For trend-focused charts, use LineChart instead.`})}(e,t,r),function(e,t,r){if(!ne.has(e))return;if(t.gapStrategy)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=t.yAccessor||"y";"string"==typeof o&&a.some(e=>{const t=e[o];return null==t||Number.isNaN(t)})&&r.push({severity:"warning",code:"DATA_GAPS",message:`Data contains null/undefined/NaN values in "${o}". Default behavior breaks the line at gaps.`,fix:'Set gapStrategy="break" (default), "interpolate", or "zero" to control gap handling.'})}(e,t,r),function(e,t,r){const a=t.width??600,o=t.height??400,i=t.margin;if(!i||"object"!=typeof i)return;const s=(i.left||0)+(i.right||0),n=(i.top||0)+(i.bottom||0);a>s||r.push({severity:"error",code:"MARGIN_OVERFLOW_H",message:`Horizontal margins (${s}px) >= width (${a}px) — no drawing area left.`,fix:"Reduce margin.left/right or increase width."}),o>n||r.push({severity:"error",code:"MARGIN_OVERFLOW_V",message:`Vertical margins (${n}px) >= height (${o}px) — no drawing area left.`,fix:"Reduce margin.top/bottom or increase height."})}(0,t,r),function(e,t,r){const a=Y[e];if(!a||"array"!==a.dataShape)return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const i=[];t.xAccessor&&"string"==typeof t.xAccessor&&i.push({prop:"xAccessor",name:t.xAccessor}),t.yAccessor&&"string"==typeof t.yAccessor&&i.push({prop:"yAccessor",name:t.yAccessor}),t.valueAccessor&&"string"==typeof t.valueAccessor&&i.push({prop:"valueAccessor",name:t.valueAccessor});const s=Math.min(o.length,5);for(const e of i){let t=!0;for(let r=0;s>r;r++){const a=o[r]?.[e.name];if("number"==typeof a&&Number.isFinite(a)){t=!1;break}}t&&r.push({severity:"error",code:"DEGENERATE_EXTENT",message:`${e.prop}="${e.name}" produces NaN or non-finite values for all sampled data points — chart extents will be invalid.`,fix:`Ensure data[].${e.name} contains finite numbers, or use a function accessor to transform values.`})}}(e,t,r),function(e,t,r){if(!ce.has(e))return;const a=t.barPadding;"number"==typeof a&&10>a&&r.push({severity:"warning",code:"BAR_PADDING_INVISIBLE",message:`barPadding=${a} is very small — bars may appear to have no spacing between them.`,fix:"Increase barPadding to at least 10 for visible gaps, e.g. barPadding={12}."})}(e,t,r),function(e,t,r){if("bottom"!==t.legendPosition)return;const a=t.margin;if(!a||"object"!=typeof a)return;const o=a.bottom;"number"==typeof o&&70>o&&r.push({severity:"warning",code:"BOTTOM_MARGIN_WITH_LEGEND",message:`legendPosition="bottom" with margin.bottom=${o}px — legend may overlap axis labels.`,fix:"Increase margin.bottom to at least 70, e.g. margin={{ ...margin, bottom: 80 }}."})}(0,t,r),function(e,t,r){if(!t.showLegend)return;if("right"!==(t.legendPosition??"right"))return;const a=t.margin;if(!a||"object"!=typeof a)return;const o=a.right;"number"==typeof o&&100>o&&r.push({severity:"warning",code:"LEGEND_MARGIN_TIGHT",message:`showLegend is true with legendPosition="right" but margin.right=${o}px — legend may be clipped or overlap the chart.`,fix:"Increase margin.right to at least 100, e.g. margin={{ ...margin, right: 120 }}."})}(0,t,r),function(e,t,r){if("Heatmap"!==e)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=a[0];if(o&&"object"==typeof o)for(const e of["xAccessor","yAccessor"]){const a=t[e];if("string"!=typeof a)continue;const i=o[a];"string"==typeof i&&r.push({severity:"warning",code:"HEATMAP_STRING_ACCESSOR",message:`${e}="${a}" resolves to string values (e.g. "${i}"). Heatmap will use categorical axis handling which may produce unexpected cell layout.`,fix:"If you intend categorical axes this is fine. Otherwise, convert values to numbers before passing data."})}}(e,t,r),function(e,t,r){const a=t.colorScheme;if(!a||!Array.isArray(a))return;const o="string"==typeof t.background?t.background:"#ffffff";if(!o.startsWith("#"))return;const i=[];for(const e of a){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ae(e,o);null!==t&&3>t&&i.push(`${e} (${t.toFixed(1)}:1)`)}i.length>0&&r.push({severity:"warning",code:"LOW_COLOR_CONTRAST",message:`${i.length} color(s) in colorScheme have < 3:1 contrast against background "${o}": ${i.join(", ")}. Data marks may be hard to see.`,fix:'Use darker colors on light backgrounds or lighter colors on dark backgrounds. Import COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for an accessible preset.'})}(0,t,r),function(e,t,r){const a=t.colorScheme;if(!a||!Array.isArray(a)||2>a.length)return;const o=a.filter(e=>"string"==typeof e&&e.startsWith("#"));if(2>o.length)return;const i=[];for(let e=0;o.length-1>e;e++){const t=ae(o[e],o[e+1]);null!==t&&1.5>t&&i.push(`${o[e]} / ${o[e+1]} (${t.toFixed(1)}:1)`)}i.length>0&&r.push({severity:"warning",code:"LOW_ADJACENT_CONTRAST",message:`${i.length} adjacent color pair(s) in colorScheme have very similar luminance: ${i.join("; ")}. Categories may be hard to distinguish.`,fix:'Alternate light and dark colors in the scheme, or use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for a pre-tested palette.'})}(0,t,r),function(e,t,r){const a=t.colorScheme;if("string"!=typeof a)return;const o=Y[e];o?.props?.colorScheme?.enum||Ne.has(a)||r.push({severity:"warning",code:"UNKNOWN_COLOR_SCHEME",message:`colorScheme "${a}" is not a recognized named scheme — the chart will fall back to the default palette.`,fix:`Use a known scheme name (${[...Ne].join(", ")}) or pass an explicit color array, e.g. colorScheme={["#1f77b4", "#ff7f0e"]}.`})}(e,t,r),function(e,t,r){const a="string"==typeof t.title&&t.title.trim().length>0,o="string"==typeof t.description&&t.description.trim().length>0,i="string"==typeof t.summary&&t.summary.trim().length>0;a||o||i||r.push({severity:"warning",code:"MISSING_DESCRIPTION",message:"No title, description, or summary provided. Screen readers will fall back to a generic chart-type label.",fix:'Add a title="..." prop for a brief label, or description="..." for a detailed aria-label, or summary="..." for a screen-reader-only note describing the chart\'s purpose.'})}(0,t,r),function(e,t,r){const a=[];for(const e of Oe)"function"==typeof t[e]&&a.push(e);a.length>0&&r.push({severity:"warning",code:"FUNCTION_ACCESSOR",message:`Function accessor${a.length>1?"s":""} detected: ${a.join(", ")}. If defined inline (e.g. \`xAccessor={d => d.value}\`), every parent re-render creates a new reference; closures over changing values can force unnecessary scene rebuilds on resize/rotation.`,fix:'Use string accessors when possible (e.g. xAccessor="value"), or memoize with useCallback / define outside the component.'})}(0,t,r),function(e,t,r){const a=t.hoverRadius;"number"==typeof a&&a>0&&24>a&&!1!==t.enableHover&&(!1!==t.hoverAnnotation||t.tooltip||t.customHoverBehavior||t.customClickBehavior||t.onClick)&&r.push({severity:"warning",code:"TOUCH_TARGET_SMALL",message:`hoverRadius=${a}px is below the ~24px radius needed for reliable 48px touch targets on mobile screens.`,fix:"Use hoverRadius={24} or larger for touch-heavy views. Semiotic floors touch pointer hit testing to 24px, but explicit desktop-only radii should be documented."})}(0,t,r),function(e,t,r){!0===t.responsiveWidth&&!0===t.responsiveHeight&&r.push({severity:"warning",code:"RESPONSIVE_BOTH_AXES",message:"responsiveWidth and responsiveHeight are both true. On mobile this can create resize feedback loops when the parent height depends on chart content.",fix:"Prefer responsiveWidth={true} with a fixed parent height or size={[width, fixedHeight]}; use a ResizeObserver outside the chart if the height must follow aspect ratio."})}(0,t,r),function(e,t,r){if(!0!==t.showParticles)return;const a=t.particleStyle&&"object"==typeof t.particleStyle?t.particleStyle:{},o="number"==typeof a.maxPerLine?a.maxPerLine:void 0,i="number"==typeof a.spawnRate?a.spawnRate:void 0;("number"==typeof o&&o>20||"number"==typeof i&&i>.08)&&r.push({severity:"warning",code:"GEO_PARTICLE_MOBILE_COST",message:"Animated geo particles run a continuous canvas loop that can drain battery and trigger thermal throttling on mobile GPUs.",fix:"Set particleStyle={{ maxPerLine: 12, spawnRate: 0.06 }} for mobile-heavy views, or disable showParticles when reduced-motion or low-power modes are active."})}(0,t,r),function(e,t,r){const a=[];Ie(t.tokenEncoding)&&a.push({source:"tokenEncoding",encoding:t.tokenEncoding}),Ie(t.encoding)&&a.push({source:"encoding",encoding:t.encoding});for(const{source:e,encoding:o}of a){const a=_e(t,o);for(const t of te(o,{visibleTokens:a}))r.push({severity:"warning",code:"TOKEN_"+t.code,message:t.message,fix:"MISSING_UNIT_VALUE"===t.code?`Set ${e}.unitValue to the value represented by one full token.`:"MISSING_UNIT_MEANING"===t.code?`Set ${e}.unitMeaning so readers know what one full token represents.`:"MISSING_COUNT_STRATEGY"===t.code?`Set ${e}.countStrategy to actual, unitized, fixed-denominator, quantile, sample, posterior-sample, or random-sample.`:"TOKEN_SEMANTICS_UNCLEAR"===t.code?`Set ${e}.tokenSemantics to observed-unit, unitized-measure, risk-case, possible-outcome, posterior-sample, hypothetical-case, topic-anchor, or decorative.`:`Adjust ${e} so its semantics, strategy, labels, and visible token count match the task.`})}}(0,t,r),function(e,t,r){const a=Array.isArray(t.annotations)?t.annotations:null;if(a)for(const e of a){if(!e||"object"!=typeof e)continue;const t=$e(e);if(!Pe(e)||"widget"===t)continue;const a=Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0),o="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:t,i=Re(e);!i&&a>Le?r.push({severity:"warning",code:"ANNOTATION_FAR_NO_CONNECTOR",message:`Annotation "${o}" sits ~${Math.round(a)}px from its anchor with no connector — a reader can't tell what it refers to.`,fix:'Add a connector (connector: { end: "arrow" }, the label/callout default) or place the note adjacent to its target (smaller dx/dy).'}):i&&a>Fe&&r.push({severity:"warning",code:"ANNOTATION_LONG_CONNECTOR",message:`Annotation "${o}" uses a very long connector (~${Math.round(a)}px); prefer placing the note adjacent to its target when space allows.`,fix:"Reduce dx/dy so the note sits near its target, or keep the long connector only if proximity is genuinely infeasible."})}}(0,t,r),function(e,t,r){const a=Array.isArray(t.annotations)?t.annotations:null;if(!a)return;const o=a.filter(Pe).length;if(0===o)return;const i="number"==typeof t.width?t.width:600,s="number"==typeof t.height?t.height:400,n=function(e,t,r={}){return"number"==typeof r.maxAnnotations&&Number.isFinite(r.maxAnnotations)?Math.max(0,Math.floor(r.maxAnnotations)):e>0&&t>0?Math.max(1,Math.round(e*t/(r.areaPerAnnotation&&r.areaPerAnnotation>0?r.areaPerAnnotation:Me))):1/0}(i,s);Number.isFinite(n)&&o>n&&r.push({severity:"warning",code:"ANNOTATION_DENSITY",message:`${o} note annotations on a ${i}×${s} chart exceed the ~${n} notes the plot area carries comfortably — the chart may read as cluttered.`,fix:'Mark the essential notes emphasis: "primary" and let density management shed the rest (autoPlaceAnnotations: { density: true }), enable progressive disclosure to reveal secondary notes on hover, or give the chart more room.'})}(0,t,r),function(e,t,r){for(const e of je){const a=t[e];if(!Array.isArray(a)||2>a.length)continue;const[o,i]=a;"number"==typeof o&&"number"==typeof i&&o>i&&r.push({severity:"warning",code:"INVERTED_AXIS",message:`${e}=[${o}, ${i}] is descending — the axis renders inverted, so "up" reads as less. Inverted axes are a classic misleading-design pattern unless the inversion is the point.`,fix:`Order the extent ascending (${e}={[${i}, ${o}]}). If the inversion is deliberate (e.g. rank #1 at top), say so in the title or an annotation so readers aren't misled.`})}}(0,t,r),function(e,t,r){if("MultiAxisLineChart"!==e)return;const a=t.series;if(!Array.isArray(a)||2!==a.length)return;const o=a.filter(e=>!e||"object"!=typeof e||"string"!=typeof e.label||0===e.label.trim().length);o.length>0&&r.push({severity:"warning",code:"DUAL_AXIS_UNLABELED",message:`Dual-axis chart with ${o.length} unlabeled series. Two y-scales invite false equivalence between the lines; without per-series labels a reader can't tell which scale is whose.`,fix:'Give every series a label: series={[{ yAccessor: "a", label: "Revenue ($)" }, { yAccessor: "b", label: "Users" }]} — and consider whether two separate charts read more honestly.'})}(e,t,r),function(e,t,r){if(!ne.has(e))return;const a=t.xExtent;if(!Array.isArray(a)||2>a.length)return;const[o,i]=a;if("number"!=typeof o||"number"!=typeof i||o>=i)return;const s=t.data;if(!s||!Array.isArray(s)||4>s.length)return;const n=t.xAccessor??"x";if("string"!=typeof n)return;let c=1/0,l=-1/0;for(const e of s){const t=e?.[n];"number"==typeof t&&Number.isFinite(t)&&(c>t&&(c=t),t>l&&(l=t))}if(!Number.isFinite(c)||!Number.isFinite(l)||c>=l)return;const d=l-c,u=Math.max(0,Math.min(i,l)-Math.max(o,c))/d;.7>u&&r.push({severity:"warning",code:"CHERRY_PICKED_WINDOW",message:`xExtent=[${o}, ${i}] shows only ~${Math.round(100*u)}% of the data's x range [${c}, ${l}] — a trend cropped to a favorable window is a classic misleading-design pattern.`,fix:'Widen xExtent to cover the data, filter the data itself so the chart shows what it has, or annotate the visible window ("Q4 only") so the cropping is explicit.'})}(e,t,r),function(e,t,r){const a=ue[e],o=he[e];if(!a&&!o)return;if(o&&!t.normalize)return;const i=a??o,s=t[i],n="string"==typeof s?s:"yAccessor"===i?"y":"value",c=t.data;if(!c||!Array.isArray(c)||0===c.length)return;const l=c.filter(e=>{const t=e?.[n];return"number"==typeof t&&0>t});l.length>0&&r.push({severity:a?"error":"warning",code:"PART_TO_WHOLE_NEGATIVE",message:`${l.length} negative value(s) in "${n}" — a part-to-whole encoding cannot represent negative parts${a?"; slice angles/areas for negatives are meaningless":"; normalized shares distort when parts are negative"}.`,fix:a?"Filter or transform negative values first, or switch to a BarChart/WaterfallChart, which encode signed values honestly.":"Drop normalize for signed data, or use a diverging BarChart so negative contributions read as negative."})}(e,t,r),function(e,t,r){le.has(e)&&"basis"===t.curve&&r.push({severity:"warning",code:"NON_PASSING_CURVE",message:'curve="basis" draws a B-spline that does NOT pass through your data points — rendered values differ from actual values everywhere except the endpoints.',fix:'Use curve="monotoneX" or curve="catmullRom" (both interpolate through every point), or keep "basis" only for deliberately schematic, clearly-labeled smoothing.'})}(e,t,r),function(e,t,r){if("LineChart"!==e&&"AreaChart"!==e)return;if("sparkline"===t.mode)return;if(t.responsiveWidth||t.responsiveHeight)return;const a="number"==typeof t.width?t.width:600,o="number"==typeof t.height?t.height:400;if(0>=a||0>=o)return;const i=a/o;if(i>8||.25>i){const e=i>8?"flattens":"exaggerates";r.push({severity:"warning",code:"EXTREME_ASPECT_RATIO",message:`${a}×${o} (${i.toFixed(1)}:1) is an extreme aspect ratio that ${e} the slopes a reader perceives — aspect-ratio distortion is a documented misleading-design pattern.`,fix:i>8?'Use a more balanced aspect (e.g. width/height between 1 and 3), or set mode="sparkline" if this is genuinely a sparkline strip.':"Use a more balanced aspect (e.g. width/height between 1 and 3); very tall trend charts overstate every change."})}}(e,t,r),function(e,t,r){if(!de.has(e))return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=t.categoryAccessor,i="string"==typeof o?o:"category",s=new Set;for(const e of a){const t=e?.[i];null!=t&&s.add(t)}s.size>Te&&r.push({severity:"warning",code:"PIE_TOO_MANY_SLICES",message:`${s.size} slices — angle judgments degrade rapidly past ~${Te} categories (Cleveland & McGill), and thin slices become unreadable and unlabelable.`,fix:`Use a BarChart or DotPlot for ${s.size} categories, or group the long tail into an "Other" slice before charting.`})}(e,t,r),function(e,t,r){if(ve.has(e)){if("GaltonBoardChart"===e){const e=t.bins;"number"==typeof e&&2>e&&r.push({severity:"error",code:"PHYSICS_BAD_BINS",message:`bins=${e} leaves no meaningful settled projection for a Galton board.`,fix:"Use at least two bins; 8-24 bins is a practical range for physics distributions."});const a=ze(t.branchProbability);null!=t.branchProbability&&(null==a||0>a||a>1)&&r.push({severity:"error",code:"PHYSICS_BAD_BRANCH_PROBABILITY",message:`branchProbability=${t.branchProbability+""} must be between 0 and 1.`,fix:"Use branchProbability={0.5} for a balanced Galton board, or bias it within the [0, 1] range."});const o=ze(t.mechanicalCount);null==t.mechanicalCount||null!=o&&o>0||r.push({severity:"error",code:"PHYSICS_BAD_MECHANICAL_COUNT",message:`mechanicalCount=${t.mechanicalCount+""} cannot generate a mechanical Galton board.`,fix:"Use a positive mechanicalCount, for example 96."})}if("EventDropChart"===e){const e=t.windows,a=e&&"object"==typeof e?ze(e.size):null;null==a||a>0||r.push({severity:"error",code:"PHYSICS_BAD_WINDOW_SIZE",message:`windows.size=${a} cannot form event-time barriers.`,fix:"Set windows={{ size: positiveNumber }} so each event can settle into a real time window."}),"number"!=typeof t.timeScale||t.timeScale>0||r.push({severity:"error",code:"PHYSICS_BAD_TIME_SCALE",message:`timeScale=${t.timeScale} prevents arrival replay from advancing.`,fix:"Use a positive timeScale, or omit it for the default pace."});const o=Array.isArray(t.data)?t.data:[];if(o.length>0){const e=t.timeAccessor||"time",a=t.arrivalAccessor||"arrivalTime";o.some(t=>{const r=ze(Be(t,e,"time")),o=ze(Be(t,a,"arrivalTime"));return null!=r&&null!=o&&r!==o})||r.push({severity:"warning",code:"PHYSICS_EVENTDROP_NO_ARRIVAL_SPREAD",message:"EventDropChart data does not show distinct arrival times, so the physics replay collapses to event order.",fix:"Provide an arrivalAccessor field with event-arrival times when demonstrating lateness, watermarks, or out-of-order streams."})}}if("PhysicsPileChart"===e){const e=ze(t.mechanicalCount);null==t.mechanicalCount||null!=e&&e>0||r.push({severity:"error",code:"PHYSICS_BAD_MECHANICAL_COUNT",message:`mechanicalCount=${t.mechanicalCount+""} cannot generate a mechanical pile chart.`,fix:"Use a positive mechanicalCount, for example 80."}),"mechanical"===t.mode&&Array.isArray(t.mechanicalCategories)&&0===t.mechanicalCategories.length&&r.push({severity:"error",code:"PHYSICS_EMPTY_MECHANICAL_CATEGORIES",message:"mechanicalCategories=[] leaves no containers for the generated unit pile.",fix:"Provide at least one category label, or omit mechanicalCategories for the default set."});const a=ze(t.unitValue??1)??1;if(0>=a)return void r.push({severity:"error",code:"PHYSICS_BAD_UNIT_VALUE",message:`unitValue=${t.unitValue} cannot unitize values into physical bodies.`,fix:"Set unitValue to a positive number represented by one body."});const o=t.valueAccessor||"value",i=(Array.isArray(t.data)?t.data:[]).reduce((e,t)=>{const r=ze(Be(t,o,"value"))??0;return e+Math.max(0,Math.round(r/a))},0);i>1500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`PhysicsPileChart would create about ${i} live bodies; motion may dominate the chart and stress the frame budget.`,fix:"Increase unitValue, cap visible units, or aggregate before rendering so the settled projection remains readable."})}if("CollisionSwarmChart"===e){if((ze(t.pointRadius??5)??5)>0||r.push({severity:"error",code:"PHYSICS_BAD_POINT_RADIUS",message:`pointRadius=${t.pointRadius} cannot produce collision bodies.`,fix:"Use a positive pointRadius, for example 5."}),(ze(t.collisionIterations??6)??6)>0||r.push({severity:"error",code:"PHYSICS_BAD_COLLISION_ITERATIONS",message:`collisionIterations=${t.collisionIterations} disables collision relaxation.`,fix:"Use at least one collision iteration; 4-8 is a practical range for swarms."}),null!=t.xExtent){const e=Array.isArray(t.xExtent)?t.xExtent:[],a=ze(e[0]),o=ze(e[1]);(2>e.length||null==a||null==o)&&r.push({severity:"error",code:"PHYSICS_BAD_X_EXTENT",message:"xExtent must be a numeric [min, max] pair for CollisionSwarmChart.",fix:"Pass xExtent={[min, max]} or omit it so the chart infers the domain from data."})}const e=Array.isArray(t.data)?t.data:[];e.length>1200&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`CollisionSwarmChart would create ${e.length} live bodies; collision relaxation may dominate the frame budget.`,fix:"Sample, aggregate, reduce point radius, or move to a static SwarmPlot when every row does not need a physical body."});const a=t.groupAccessor;if(e.length>0&&a){const t=new Set;for(const r of e){const e=Be(r,a,"group");null!=e&&t.add(e)}t.size>12&&r.push({severity:"warning",code:"PHYSICS_TOO_MANY_SWARM_LANES",message:`CollisionSwarmChart has ${t.size} group lanes, which leaves little vertical room for collision separation.`,fix:"Facet or filter groups, or use an ordinary SwarmPlot/BoxPlot for dense grouped comparison."})}}if("GaltonBoardChart"!==e&&"PhysicsPileChart"!==e&&"CollisionSwarmChart"!==e&&"ProcessFlowChart"!==e&&"EventDropChart"!==e||(null!=t.massBy||null!=t.massAccessor||t.frameProps&&"object"==typeof t.frameProps&&null!=t.frameProps.bodyMassBy)&&r.push({severity:"warning",code:"PHYSICS_DATA_IN_DYNAMICS",message:e+" appears to map a data field to mass/dynamics. Mass is not a readable quantitative channel.",fix:"Encode quantities in spawn position, bin, size, color, or glyph — keep mass/friction/restitution as process texture. Use showProjection for the truth layer."}),"PhysicsPileChart"!==e&&"GaltonBoardChart"!==e&&"CollisionSwarmChart"!==e&&"ProcessFlowChart"!==e||!1!==t.showProjection||r.push({severity:"warning",code:"PHYSICS_NO_PROJECTION",message:e+" has showProjection={false}. Without a settled projection, motion is easy to over-read as data.",fix:"Keep showProjection enabled (default) so the chart collapses to a legible static reading, or document why the process alone is the claim."}),"ProcessFlowChart"===e){const e=Array.isArray(t.stages)?t.stages:[];if(0===e.length)r.push({severity:"error",code:"PROCESS_FLOW_MISSING_STAGES",message:"ProcessFlowChart requires a non-empty stages array.",fix:'Provide stages={[{ id: "coding", force: 12 }, { id: "merged", absorb: true }]}.'});else{e.some(e=>!e||null==e.id||""===(e.id+"").trim())&&r.push({severity:"error",code:"PROCESS_FLOW_BAD_STAGE",message:"Every ProcessFlowChart stage needs a stable id.",fix:'Use stages like { id: "review", label: "Review", capacity: { unitsPerSecond: 4 } }.'});const a=e.filter(e=>e?.absorb).length;t.groupBy&&0===a&&r.push({severity:"warning",code:"PROCESS_FLOW_GROUP_NO_ABSORB",message:"groupBy is set but no stage has absorb: true, so all-members completion cannot resolve.",fix:'Mark a terminal stage with absorb: true (e.g. merged), or set groupCompletion="none".'})}}if("GauntletChart"===e&&(Array.isArray(t.negativeProperties)||r.push({severity:"warning",code:"GAUNTLET_MISSING_NEGATIVE_PROPERTIES",message:"GauntletChart usually needs negativeProperties for drag/cost bodies (empty array is ok if intentional).",fix:'Provide negativeProperties={[{ id: "cost", label: "Cost", load: 1 }]} or explicitly pass [].'})),"PhysicsPileChart"===e||"GaltonBoardChart"===e||"CollisionSwarmChart"===e||"ProcessFlowChart"===e||"EventDropChart"===e){const a=Array.isArray(t.data)?t.data:[],o=ze(t.mechanicalCount)??0,i=a.length>0?a.length*("PhysicsPileChart"===e?Math.max(1,(ze(t.unitValue),1)):1):o;i>2500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`${e} may spawn ~${Math.round(i)} live bodies, which can overwhelm the simulation loop.`,fix:"Lower mechanicalCount / unitize with a larger unitValue, enable sediment/windowSize, or sample the data before spawn."})}}}(e,t,r),{ok:r.every(e=>"warning"===e.severity),diagnoses:r}):{ok:0===r.length,diagnoses:r}}function He(e,t=new Set){if(null===e)return!0;const r=typeof e;if("string"===r||"boolean"===r)return!0;if("number"===r)return Number.isFinite(e);if("object"!==r)return!1;if(t.has(e))return!1;t.add(e);const a=Array.isArray(e)?e.every(e=>He(e,t)):Object.entries(e).every(([,e])=>He(e,t));return t.delete(e),a}var qe=Symbol.for("semiotic.chartRecipeRegistry");function Ue(e){return function(){const e=globalThis;return e[qe]||(e[qe]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[qe]}().recipes.get(e)}function Ge(e){return"string"==typeof e?Ue(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}var We=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]),Ve="Chartability (POUR-CAF) — https://chartability.github.io/POUR-CAF/. Not a pass/fail cert; pair with manual screen-reader testing (NVDA+Firefox, JAWS+Chrome, VoiceOver+Safari).";function Ke(e){return"string"==typeof e&&e.trim().length>0}function Ye(e){return"primary"===e?.emphasis||"secondary"===e?.emphasis||null!=function(e){const t=e?.provenance?.confidence;return"number"==typeof t&&Number.isFinite(t)?t:null}(e)}function Xe(e){const t=e.toLowerCase().replace(/[^a-z]/g,"");if(!t)return 0;if(3>=t.length)return 1;const r=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"").replace(/^y/,"").match(/[aeiouy]{1,2}/g);return r?r.length:1}function Je(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function Qe(e,t,r={}){const a=[],o=Ue(e),i=ye.has(e),s=!!Y[e]||!!o||i,n=!0===r.inChartContainer,c=!0===r.describe,l=!0===r.navigable,d=me.has(e),u=oe.has(e),p=!1!==t.accessibleTable&&!d,h=Ke(t.title),m=Ke(t.description),f=Ke(t.summary),y=h||m||f,g=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(t),b=function(e){const t=Je(e),r=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===r.pause||"function"==typeof r.pause}(t),v=i,w=function(e){const t=Je(e);return!0===e.settledProjection||!0===t.settledProjection}(t)||be.has(e)&&p,x=function(e){const t=Je(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(t)||v,S=Array.isArray(t.annotations)?t.annotations.filter(e=>!!e&&"object"==typeof e):[],A=s?"pass":"manual",k=s?"":` (unrecognized component "${e}" — verify manually that the built-in applies)`;if(a.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},r=e.colorScheme,a="string"==typeof e.background?e.background:null;if(a&&!a.startsWith("#"))return{...t,status:"manual",message:`Background "${a}" isn't a hex literal (theme/CSS variable) — contrast can't be verified statically.`,fix:'Pass a hex `background` (e.g. "#ffffff"/"#000000"), or verify contrast manually once the theme resolves.'};const o=a??"#ffffff";if(!Array.isArray(r))return{...t,status:"manual",message:"Mark colors come from the theme/CSS variables — contrast can't be verified statically.",fix:"Confirm geometries/large text have ≥ 3:1 and regular text ≥ 4.5:1 contrast against the background."};const i=[];let s=0;for(const e of r){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ae(e,o);null!=t&&(s++,3>t&&i.push(`${e} (${t.toFixed(1)}:1)`))}return 0===s?{...t,status:"manual",message:"colorScheme has no parseable hex colors to check.",fix:"Verify contrast manually for non-hex colors."}:i.length>0?{...t,status:"fail",message:`${i.length} color(s) fall below 3:1 contrast vs ${o}: ${i.join(", ")}.`,fix:"Darken (light background) or lighten (dark background) those colors, or use COLOR_BLIND_SAFE_CATEGORICAL."}:{...t,status:"pass",message:`All ${s} checked colorScheme color(s) meet ≥ 3:1 contrast vs ${o}.`}}(t)),a.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...d?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:p?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:m&&f?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}}),a.push({id:"perceivable.small-text",principle:"perceivable",heuristic:"Small text size",critical:!0,status:"pass",message:"Semiotic's default tick and axis-label fonts are 12px, meeting Chartability's 9pt/12px floor.",fix:"If a theme or override lowers --semiotic-tick-font-size below 12px, raise it back for low-vision audiences."}),a.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=t.pulse||ge.has(e)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),null!=t.colorBy){a.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...!0===t.directLabel||!0===t.showLabels?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:"Categories are encoded by color (colorBy) with no redundant channel — Semiotic does not yet ship texture/pattern fills.",fix:"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy), keep categories ≤ ~7, and use a CVD-safe palette."}});const e=Array.isArray(t.colorScheme)?t.colorScheme:null,r=e?e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase()):[],o=r.length>0&&r.every(e=>We.has(e));a.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...o?{status:"pass",message:"colorScheme uses Semiotic's Wong colorblind-safe palette."}:{status:"manual",message:"Color encodes meaning; statically we can't confirm the palette is colorblind-safe.",fix:'Use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic", or test your scheme with Viz Palette / Chroma.'}}),a.push({id:"flexible.textures-adjustable",principle:"flexible",heuristic:"Contrast and textures cannot be adjusted",critical:!1,status:"warn",message:"There's no per-category texture/pattern channel to toggle as an alternative to color.",fix:"Until texture fills land, ensure the encoding survives color removal: direct labels + a CVD-safe palette. Contrast itself is themeable via CSS variables."})}{const e=S.filter(Pe);if(e.length>0){const r=t.autoPlaceAnnotations,o="object"==typeof r&&null!==r&&!0===r.redundantCues,i=e.filter(e=>{if("string"!=typeof e.color)return!1;const t=$e(e),r=o&&"text"===t;return!(Re(e)||r)});a.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===i.length?{status:"pass",message:"No annotation relies on color alone to indicate its target — wherever color is used, a connector, enclosure, or reference-line cue is present too."}:{status:"warn",message:`${i.length} of ${e.length} annotation(s) carry a color but no connector, enclosure, or reference-line cue, so a color-blind or non-visual reader can't tie them to their target (the correspondence problem).`,fix:"Add a connector (the label/callout default), place the note adjacent to its target, enclose the target, or enable autoPlaceAnnotations: { redundantCues: true } to give colored text notes a leader line — don't rely on color matching alone."}})}}a.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...s?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${e}".`,fix:"Verify Tab + arrow-key operation."}});{const e=[];null==t.brush&&null==t.onBrush||e.push("brushing"),!0===t.zoomable&&e.push("zoom/pan"),"isolate"!==t.legendInteraction&&"highlight"!==t.legendInteraction||e.push("legend filtering"),e.length>0&&a.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{const r=Ae[e];if(r&&g){const e=t[r];"number"==typeof e&&e>0&&24>2*e&&a.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${r}=${e} gives a ~${2*e}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}a.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:A,message:`The chart takes a single tab stop and navigates data with arrow keys${k} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),a.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...g?f||m?{status:"manual",message:"Chart is interactive and has descriptive text. Confirm that text explains how to interact (keyboard + pointer).",fix:'State the interaction model in summary, e.g. "Use arrow keys to move between points."'}:{status:"warn",message:"Chart is interactive but nothing explains how to use it.",fix:"Describe the interaction in a summary or nearby text (keyboard navigation, what hover/click reveals)."}:{status:"not-applicable",message:"No interactive behavior detected."}}),a.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:A,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${k}.`}),a.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:A,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${k}.`,fix:s?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),a.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...y?{status:"pass",message:`Provided: ${[h&&"title",m&&"description",f&&"summary"].filter(Boolean).join(", ")}.`}:n?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),a.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...m||f?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:c?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:h?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{const e=[t.description,t.summary].filter(Ke).join(". "),r=e?function(e){const t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),r=e.trim().split(/\s+/).filter(Boolean);if(0===r.length||0===t.length)return null;let a=0;for(const e of r)a+=Xe(e);return r.length/t.length*.39+a/r.length*11.8-15.59}(e):null;a.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==r?{status:"not-applicable",message:"No description/summary text to grade."}:r>9?{status:"warn",message:`Description/summary reads at ~grade ${r.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(r))} (≤ 9).`}})}if(fe.has(e)){const e=Ke(t.xLabel),r=Ke(t.yLabel);a.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&r?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!r&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(xe.has(e)&&a.push({id:"understandable.information-complexity",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,status:"warn",message:"Dual-axis chart: two y-scales are hard to read accurately and notoriously easy to misinterpret (the crossover point is arbitrary).",fix:"Confirm the second axis is necessary; consider two aligned charts (small multiples) or indexing both series to a common baseline. Label each axis and its series unambiguously."}),S.length>1){const e=S.filter(Ye).length;a.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===S.length?{status:"pass",message:`All ${S.length} annotation(s) declare hierarchy through emphasis or provenance confidence, so the renderer can resolve reading order and visual priority.`}:0===e?{status:"warn",message:S.length+" annotations are present with no emphasis or provenance confidence; readers may not know which note is primary.",fix:'Mark the main annotation with emphasis="primary", set supporting notes to emphasis="secondary", or provide provenance.confidence so Semiotic can infer order.'}:{status:"warn",message:`${S.length-e} of ${S.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=t.forecast||null!=t.anomaly||null!=t.band||null!=t.regression)&&a.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=t.animate&&!1!==t.animate&&a.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:A,message:`Transitions animate with object constancy and data changes are mirrored to the live region${k}.`,fix:s?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),a.push({id:"robust.conforms-to-standards",principle:"robust",heuristic:"Does not conform to standards",critical:!1,status:"manual",message:"WCAG 2.1 / Section 508 conformance can't be settled from config alone.",fix:"Run an automated checker (axe) on the rendered output and test with real assistive tech."}),a.push({id:"robust.semantically-valid",principle:"robust",heuristic:"Semantically invalid",critical:!1,status:"manual",message:"Whether interactive elements expose correct roles/names is a render-time, screen-reader question.",fix:"Verify with a screen reader that buttons read as buttons, the chart as an image/group, etc."}),a.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:A,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${k}.`,fix:s?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),a.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...d?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:p?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}}),d||a.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...n?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),a.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:s?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${s?"":k}.`,fix:s?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),a.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...l?{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:u?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:A,message:`Keyboard navigation steps through points and switches series/groups${k}.`,fix:s?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const r=Array.isArray(t.data)?t.data:null,o=Array.isArray(t.nodes)?t.nodes:null,i={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let s;s=pe.has(e)&&r&&r.length>7?{...i,status:"warn",message:r.length+" slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.",fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:o&&o.length>200?{...i,status:"warn",message:o.length+" nodes. A network this size is hard to navigate non-visually node by node.",fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:r&&r.length>5e3?{...i,status:"warn",message:r.length+" data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.",fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:r?{...i,status:"pass",message:r.length+" data points — a reasonable density for non-visual consumption."}:o?{...i,status:"pass",message:o.length+" nodes — a reasonable density for non-visual consumption."}:{...i,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},a.push(s)}{const e=Array.isArray(t.data)?t.data:null,r=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof t[e]||"string"==typeof t[e]);let o=!1;if(e&&!r)for(const t of e.slice(0,50))if(t&&"object"==typeof t){for(const e of Object.values(t))if("number"==typeof e&&Number.isFinite(e)&&Math.abs(e)>=1e5){o=!0;break}if(o)break}o&&a.push({id:"assistive.human-readable-numbers",principle:"assistive",heuristic:"Data in text is not human-readable",critical:!1,status:"warn",message:'Data includes large numbers (≥ 100,000) and no value/tick formatter — screen readers will read every digit (e.g. "six hundred fifty thousand…").',fix:'Pass valueFormat / yFormat (e.g. a compact formatter so 6,500,000 reads as "6.5M"); the formatter flows to ticks, tooltips, and the data table.'})}a.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...c?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:f?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),a.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...d?{status:"not-applicable",message:"Single value — nothing to skip."}:p?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}}),a.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:A,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${k}.`,fix:s?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),a.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...ge.has(e)||we.has(e)?b?{status:"pass",message:e+" animates continuously and declares an in-chart pause/stop control."}:{status:"warn",message:e+" animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.",fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:A,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${k}.`}}),i&&(a.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...b?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),a.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...w?{status:"pass",message:"A settled-projection table is declared, so non-visual readers get aggregate chart semantics instead of trajectories."}:{status:"warn",message:"Physics chart does not declare a settled projection for its accessible table.",fix:"Provide aggregate rows from the settled projection and set physics.settledProjection=true."}}),a.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...x?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{const r=!0===t.responsiveWidth||!0===t.responsiveHeight,o=Se.has(e)&&!0===t.zoomable;a.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...r?{status:"pass",message:`Chart reflows to its container (${[!0===t.responsiveWidth&&"responsiveWidth",!0===t.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:o?{status:"pass",message:"Geo chart is zoomable/pannable."}:{status:"manual",message:"Fixed width/height — verify the chart survives browser zoom and reflow without clipping or loss of function.",fix:"Use responsiveWidth/responsiveHeight so the chart reflows to its container."}})}if(o){const e=o.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));e&&a.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:o.name+" declares a color encoding without a redundant cue.",fix:"Add shape, label, position, texture, or a textual category summary to the recipe encoding."}),"required"!==o.accessibility.description||Ke(t.description)||a.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:o.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),o.accessibility.fallbackTable&&!1===t.accessibleTable&&a.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:o.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const C=a.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),$={criticalsPassed:C.filter(e=>"pass"===e.status).length,criticalsEvaluated:C.length,fails:a.filter(e=>"fail"===e.status).length,warnings:a.filter(e=>"warn"===e.status).length,manual:a.filter(e=>"manual"===e.status).length,passes:a.filter(e=>"pass"===e.status).length};return{component:e,ok:!C.some(e=>"fail"===e.status),summary:$,findings:a,reference:Ve}}function Ze(e,{onlyCritical:t=!1}={}){const r=[];for(const a of e.findings)"fail"!==a.status&&"warn"!==a.status||t&&!a.critical||r.push(a.message);return r}var et={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},tt=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function rt(e){const t=[],r=e.summary,a=e.ok?`${r.criticalsPassed}/${r.criticalsEvaluated} critical heuristics pass`:`${r.fails} blocking failure(s) — ${r.criticalsPassed}/${r.criticalsEvaluated} critical heuristics pass`;t.push(`${e.ok?"✓":"✗"} ${e.component}: accessibility audit (Chartability POUR-CAF)`),t.push(` ${a} · ${r.warnings} warning(s) · ${r.manual} to verify manually`);for(const r of tt){const a=e.findings.filter(e=>e.principle===r&&"not-applicable"!==e.status);if(0!==a.length){t.push(""),t.push(" "+r.toUpperCase());for(const e of a)t.push(` ${et[e.status]} ${e.id}${e.critical?" [critical]":""}: ${e.message}`),!e.fix||"fail"!==e.status&&"warn"!==e.status&&"manual"!==e.status||t.push(" → "+e.fix)}}return t.push(""),t.push(" Ref: "+e.reference),t.join("\n")}function at(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function ot(e,t){const{when:r}=e,a=t.width,o=t.height,i=function(e){if("number"==typeof e.height&&e.height>0)return e.width/e.height}(t),s=function(e){if("number"==typeof e.height&&e.height>0)return e.height>e.width?"portrait":"landscape"}(t);return!("number"==typeof r.minWidth&&r.minWidth>a||"number"==typeof r.maxWidth&&a>r.maxWidth||"number"==typeof r.minHeight&&("number"!=typeof o||r.minHeight>o)||"number"==typeof r.maxHeight&&("number"!=typeof o||o>r.maxHeight)||"number"==typeof r.minAspectRatio&&("number"!=typeof i||r.minAspectRatio>i)||"number"==typeof r.maxAspectRatio&&("number"!=typeof i||i>r.maxAspectRatio)||r.orientation&&s!==r.orientation)}function it(e,t,r=e.responsiveRules){if(!Array.isArray(r)||0===r.length)return{props:e,matches:[]};const a=r.map((e,t)=>({rule:e,index:t})).filter(e=>ot(e.rule,t)).sort((e,t)=>("number"==typeof e.rule.priority?e.rule.priority:e.index)-("number"==typeof t.rule.priority?t.rule.priority:t.index));return{props:a.reduce((e,t)=>function(e,t){const r={...e,...t};for(const a of["margin","frameProps","mobileSemantics","style"])at(e[a])&&at(t[a])&&(r[a]={...e[a],...t[a]});return"string"==typeof e.className&&"string"==typeof t.className&&(r.className=`${e.className} ${t.className}`),r}(e,t.rule.transform),e),matches:a}}var st="Mobile visualization audit: informed by MobileVisFixer, mobile exploratory interaction research, small-multiple mobile studies, responsive visualization grammars, constraint-based breakpoints, and WCAG 2.2 input modalities.",nt=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart","RealtimeLineChart","RealtimeHeatmap"]),ct=new Set(["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","DotPlot","RidgelinePlot","FunnelChart","LikertChart","SwimlaneChart"]),lt={Scatterplot:["pointRadius","hoverRadius"],BubbleChart:["pointRadius","hoverRadius"],ConnectedScatterplot:["pointRadius","hoverRadius"],QuadrantChart:["pointRadius","hoverRadius"],SwarmPlot:["pointRadius","hoverRadius"],DotPlot:["dotRadius","hoverRadius"]};function dt(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function ut(e){return"string"==typeof e&&e.trim().length>0}function pt(e){const t=dt(e.capability)?e.capability:null,r=dt(e.recipe)?e.recipe:null,a=[e.mobileSemantics,e.mobileVisualization,e.mobile,t?.mobile,r?.mobile];for(const e of a)if(dt(e))return e;return null}function ht(e){return Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1]&&Number.isFinite(e[0])&&Number.isFinite(e[1])?[e[0],e[1]]:null}function mt(e){return ht(e.size)||ht(dt(e.frameProps)?e.frameProps.size:void 0)||("number"==typeof e.width&&"number"==typeof e.height?[e.width,e.height]:null)}function ft(e,t){e.push({...t,status:"pass"})}function yt(e,t){e.push({...t,status:"warn"})}function gt(e,t){e.push({...t,status:"manual"})}function bt(e,t={},r={}){const a=r.viewportWidth??390,o=r.targetSize??44,i=mt(t),s=it(t,{width:a,height:i?.[1]}),n=[],c=mt(t=s.props),l=pt(t),d=function(e,t){return e.includes("CustomChart")||e.includes("Custom")||null!=t.recipeId||null!=t.mobileSemantics}(e,t),u=function(e){const t=pt(e);return!0===e.responsive||!0===e.mobile||!0===t?.responsive||!0===t?.supportsResponsiveLayout||Array.isArray(t?.breakpoints)||"number"==typeof t?.minViewportWidth||"responsive"===t?.strategy||"small-multiples"===t?.strategy||"summary-cards"===t?.strategy||null!=e.mobileLayout||null!=e.responsiveRules||"mobile-readable"===e.density}(t),p=!0===r.inChartContainer,h=ut(t.title)||ut(t.summary)||ut(t.description)||!0===l?.summary||ut(l?.summary);if(s.matches.length>0&&ft(n,{id:"layout.responsive-rule-applied",category:"layout",impact:"medium",message:`${s.matches.length} responsive rule(s) applied for the ${a}px mobile audit.`}),c){const[t,r]=c;t>a&&!u?yt(n,{id:"layout.fixed-desktop-size",category:"layout",impact:"high",message:`Chart size is ${t}px wide against a ${a}px mobile viewport with no responsive/mobile transform hint.`,fix:"Use responsive sizing, responsiveRules/mobileLayout, or an explicit mobile variant that preserves the task instead of clipping the desktop chart."}):ft(n,{id:"layout.fixed-desktop-size",category:"layout",impact:"high",message:"No fixed desktop-width overflow risk is visible from the config."}),"number"==typeof l?.minViewportWidth&&l.minViewportWidth>a&&yt(n,{id:"layout.mobile-min-width",category:"layout",impact:"high",message:`The declared mobile contract supports ${l.minViewportWidth}px minimum, wider than the audited ${a}px viewport.`,fix:"Add a narrower breakpoint, summary-card fallback, or explicit horizontal-scroll affordance with a non-visual equivalent."});const o=t/Math.max(1,r);430>=a&&o>2.4&&"BigNumber"!==e&&yt(n,{id:"layout.wide-aspect-ratio",category:"layout",impact:"medium",message:`Chart aspect ratio is ${o.toFixed(1)}:1, which tends to compress phone charts vertically.`,fix:"Prefer stacked sections, small multiples, cards plus a sparkline, or a taller mobile-specific chart ratio."}),160>r&&"BigNumber"!==e&&yt(n,{id:"layout.too-short-for-reading",category:"layout",impact:"medium",message:`Chart height is ${r}px; most phone charts need enough vertical room for marks plus readable labels.`,fix:"Reserve more vertical space, remove nonessential axes, or switch to a card/sparkline pattern with external labels."})}else gt(n,{id:"layout.unknown-size",category:"layout",impact:"medium",message:"No explicit size is available to audit. This may be responsive, but static mobile overflow cannot be checked.",fix:"Audit rendered widths at 320, 360, 390, and 430px, or pass size/responsiveRules metadata into the config."});const m=function(e){const t=[e.data,e.points,e.lines,e.nodes,e.edges,e.areas,dt(e.frameProps)?e.frameProps.data:void 0];let r=0;for(const e of t)Array.isArray(e)&&(r+=e.length);return r}(t);m>0&&(m>("number"==typeof l?.maxMarks?l.maxMarks:nt.has(e)?1.25*a:ct.has(e)?Math.max(8,Math.floor(a/34)):a)?yt(n,{id:"density.mark-budget",category:"density",impact:nt.has(e)?"medium":"high",message:`${m} data item(s) exceed the rough mobile density budget for ${e} at ${a}px.`,fix:"Aggregate, filter, facet into small multiples, switch to a summary-card plus detail view, or use progressive disclosure."}):ft(n,{id:"density.mark-budget",category:"density",impact:"medium",message:m+" data item(s) are within the rough mobile density budget for this component."}));const f=function(e){const t=[e.tickValues,e.xTickValues,e.yTickValues,e.rTickValues,e.oTickValues];let r=0;for(const e of t)Array.isArray(e)&&(r+=e.length);return r>0?r:null}(t),y=!1!==t.showAxes&&!1!==t.axis;if(y&&null!=f){const e=Math.max(3,Math.floor(a/58));f>e&&yt(n,{id:"density.explicit-tick-count",category:"density",impact:"medium",message:`${f} explicit tick(s) exceed a phone-friendly budget of about ${e} at ${a}px.`,fix:"Use adaptive ticks, fewer tickValues, direct labels, or move exact values into a tap-accessible detail panel."})}else y&&(nt.has(e)||ct.has(e))&&gt(n,{id:"density.axis-label-collision",category:"density",impact:"medium",message:"Axes are enabled, but label collision depends on rendered tick text and cannot be checked statically.",fix:"Verify tick labels at phone widths or provide explicit mobile tick density."});!function(e){const t=dt(e.frameProps)?e.frameProps:{};return(!0===e.enableHover||null!=e.tooltipContent||null!=e.tooltip||null!=t.tooltipContent||!0===t.enableHover)&&!function(e){const t=pt(e),r=dt(e.mobileInteraction)?e.mobileInteraction:null;return null!=e.controls||null!=e.mobileControls||!0===e.alternativeControls||null!=e.selection||null!=e.onClick||null!=e.onSelect||!0===e.mobileInteraction||!0===r?.tapToSelect||!0===r?.tapToLockTooltip||Array.isArray(t?.interaction?.alternatives)&&t.interaction.alternatives.length>0||"tap"===t?.interaction?.primary||"button"===t?.interaction?.primary||ut(t?.interaction?.hoverFallback)}(e)}(t)?ft(n,{id:"interaction.hover-only-detail",category:"interaction",impact:"high",message:"No hover-only detail path is visible from the config."}):yt(n,{id:"interaction.hover-only-detail",category:"interaction",impact:"high",message:"The chart exposes tooltip/hover detail without an obvious tap, selection, or control alternative.",fix:"Enable tap-to-select, a persistent details panel, visible segment buttons, or another non-hover path for the same information."});const g=function(e,t){const r=lt[e];if(!r)return null;let a=r.includes("hoverRadius")?30:null;for(const e of r){const r=t[e];"number"==typeof r&&Number.isFinite(r)&&r>0&&(a=null==a?r:Math.max(a,r))}return null==a?null:2*a}(e,t),b=dt(t.mobileInteraction)?t.mobileInteraction:null,v=g??("number"==typeof b?.targetSize?b.targetSize:!0===t.mobileInteraction?44:"number"==typeof l?.minimumHitTarget?l.minimumHitTarget:"number"==typeof l?.interaction?.targetSize?l.interaction.targetSize:null);null!=v&&(24>v?yt(n,{id:"interaction.target-size-minimum",category:"interaction",impact:"high",message:`Small interactive marks expose an estimated ${v}px pointer target, below WCAG's 24px minimum.`,fix:"Increase mark radius/hoverRadius, add tap snapping to nearest datum, or provide larger external controls."}):o>v?yt(n,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${v}px, above 24px but below the ${o}px comfortable phone target.`,fix:"Use hoverRadius/tapRadius near 44px while keeping the visible mark small if needed."}):ft(n,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${v}px, meeting the configured ${o}px target.`}));const w=[];null==t.brush&&null==t.onBrush||w.push("brush"),!0===t.zoomable&&w.push("pan/zoom"),"isolate"!==t.legendInteraction&&"highlight"!==t.legendInteraction||w.push("legend filtering"),w.length>0&&!function(e,t){const r=pt(e),a=dt(e.mobileInteraction)?e.mobileInteraction:null,o=a?.standardControls;return!!(null!=e.controls||null!=e.mobileControls||!0===e.alternativeControls||Array.isArray(r?.interaction?.alternatives)&&r.interaction.alternatives.length>0)||!0===o||"all"===o||t.every(e=>"brush"===e?Array.isArray(o)?o.includes("brush"):"brush"===o:"pan/zoom"===e?Array.isArray(o)?o.includes("zoom"):"zoom"===o:"legend filtering"===e&&(Array.isArray(o)?o.includes("legend"):"legend"===o))}(t,w)&&yt(n,{id:"interaction.complex-gesture-alternative",category:"interaction",impact:"high",message:`Mobile-hostile complex interaction detected: ${w.join(", ")} without standard control alternatives.`,fix:"Pair gestures with buttons, range inputs, chips, or a details panel that works with touch and keyboard."}),!1===t.showLegend||!1===t.legend||!0!==t.showLegend&&!0!==t.legend&&null==t.colorBy&&null==t.groupBy&&null==t.lineBy&&null==t.areaBy&&null==t.stackBy||!0===t.directLabel||!0===t.showLabels||"direct"===t.labelStrategy||"direct-end"===t.labelStrategy||"direct"===l?.labels?.strategy||"inline"===l?.labels?.strategy||"external"===l?.labels?.strategy||a>430||yt(n,{id:"semantics.legend-over-direct-labels",category:"semantics",impact:"medium",message:"The chart appears to rely on a legend instead of direct labels at phone width.",fix:"Prefer direct end labels, inline labels, or a compact chip selector so readers do not bounce between plot and legend."});const x=Array.isArray(t.annotations)?t.annotations.filter(e=>dt(e)):[];if(x.length>("number"==typeof l?.maxAnnotations?l.maxAnnotations:3)&&430>=a&&yt(n,{id:"annotation.mobile-density",category:"annotation",impact:"medium",message:x.length+" annotation(s) compete for phone plot space.",fix:"Assign annotation priority, collapse secondary notes into a callout list, or provide shorter mobileText."}),x.length>0){const e=x.filter(e=>!ut(e.mobileText)&&!ut(e.shortText)&&!ut(e.label));e.length>0&&gt(n,{id:"annotation.mobile-copy",category:"annotation",impact:"low",message:e.length+" annotation(s) lack explicit short/mobile copy.",fix:"Add mobileText or shortText for notes that need to survive narrow layouts."})}u||"BigNumber"===e||gt(n,{id:"layout.no-responsive-transform",category:"layout",impact:"low",message:"No explicit responsive transformation hint is present.",fix:"Declare responsiveRules/mobileLayout or a density/label strategy so the mobile version is a designed transformation, not an accidental resize."}),d&&(l?(ft(n,{id:"semantics.custom-mobile-contract",category:"semantics",impact:"medium",message:"Custom chart/recipe provides a mobileSemantics/mobile contract, so the audit can inspect its authored phone behavior."}),!1===l.custom?.dataBearingSceneNodes?yt(n,{id:"semantics.custom-data-bearing-scene",category:"semantics",impact:"medium",message:"Custom mobile contract says emitted scene nodes are not data-bearing.",fix:"Preserve datum references, semantic roles, or accessible-table fields so intelligence, navigation, and tap details can recover the chart's meaning."}):!0!==l.custom?.dataBearingSceneNodes&&gt(n,{id:"semantics.custom-data-bearing-scene",category:"semantics",impact:"low",message:"Custom chart mobile contract does not state whether scene nodes are data-bearing.",fix:"Set mobile.custom.dataBearingSceneNodes and mobile.custom.navigationGranularity for custom layouts and interoperability adapters."})):gt(n,{id:"semantics.custom-mobile-contract",category:"semantics",impact:"medium",message:"Custom chart layout is opaque to static mobile analysis because no mobileSemantics/mobile contract is present.",fix:"Declare mobileSemantics with strategy, breakpoints, mark budgets, touch target size, interaction alternatives, and custom scene semantics."})),h||p||yt(n,{id:"semantics.no-mobile-summary",category:"semantics",impact:"medium",message:"No title, summary, description, or ChartContainer context is visible from the config.",fix:"Add title/summary text or wrap in ChartContainer so the small-screen reader gets the task before the chart."});const S=n.filter(e=>"warn"===e.status),A={highRisk:S.filter(e=>"high"===e.impact).length,warnings:S.length,manual:n.filter(e=>"manual"===e.status).length,passes:n.filter(e=>"pass"===e.status).length};return{component:e,viewportWidth:a,ok:0===A.highRisk,summary:A,findings:n,reference:st}}var vt={pass:"PASS",warn:"WARN",manual:"MANUAL","not-applicable":"N/A"},wt=["layout","density","interaction","annotation","semantics"];function xt(e){const t=[],r=e.summary,a=e.ok?`no high-risk mobile blockers at ${e.viewportWidth}px`:`${r.highRisk} high-risk mobile issue(s) at ${e.viewportWidth}px`;t.push(`${e.ok?"PASS":"WARN"} ${e.component}: mobile visualization audit`),t.push(` ${a} - ${r.warnings} warning(s) - ${r.manual} manual check(s)`);for(const r of wt){const a=e.findings.filter(e=>e.category===r&&"not-applicable"!==e.status);if(0!==a.length){t.push(""),t.push(" "+r.toUpperCase());for(const e of a)t.push(` ${vt[e.status]} [${e.impact}] ${e.id}: ${e.message}`),!e.fix||"warn"!==e.status&&"manual"!==e.status||t.push(" -> "+e.fix)}}return t.push(""),t.push(" Ref: "+e.reference),t.join("\n")}function St(){return["Static audit only: rendered label collision, CSS-resolved type size, and actual touch behavior still require viewport testing.","Use multiple widths, usually 320, 360, 390, 430, and 768 CSS pixels.","A mobile pass means no high-risk static warnings, not that the chart is perceptually or ergonomically optimal."]}function At(e,t){if("function"==typeof e)return t=>+e(t);const r=e||t;return e=>+e[r]}function kt(e,t){if("function"==typeof e)return e;const r=e||t;return e=>e[r]}var Ct=new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),$t=new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),Pt=new Set(["PieChart","DonutChart","FunnelChart"]),Rt=new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]);function Mt(e,t){return $t.has(e)||Pt.has(e)||"SwimlaneChart"===e||"GaugeChart"===e?{measure:t.valueAccessor,measureFallback:"value",dimension:t.categoryAccessor??t.stepAccessor,dimensionFallback:"category"}:{measure:t.yAccessor??t.valueAccessor,measureFallback:"y",dimension:t.xAccessor,dimensionFallback:"x"}}function Lt(e){for(const t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){const r=e[t];if("string"==typeof r&&r)return r}}function Ft(e,t){return null==e?"—":e instanceof Date?e.toISOString().slice(0,10):"number"==typeof e?t(e):e+""}function jt(e,t={}){const r=!0===t.showRetractedAnnotations,a=!0===t.showSupersededAnnotations,o=new Set;for(const t of e){const e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&o.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!r)return!1;const t=e?.provenance?.stableId;return!(t&&o.has(t)&&!a)})}function Tt(e){return"string"==typeof e?e:e.id??e.name}function zt(e){return e.layoutConfig&&"object"==typeof e.layoutConfig?e.layoutConfig:{}}function Bt(e){return Array.isArray(e.data)?e.data:Array.isArray(e.nodes)?e.nodes:Array.isArray(e.points)?e.points:Array.isArray(e.areas)?e.areas:[]}function Nt(e,t,r){return r??Ge(t.recipe)??Ge(t.recipeId)??Ue(e)}function Ot(e,t,r=[]){const a=e.accessor?t[e.accessor]:void 0;if("string"==typeof a&&a)return a;if(e.field)return e.field;const o=r.find(e=>e&&"object"==typeof e);if(!o)return;const i=Object.entries(o).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?i.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>e in o):i.find(([,e])=>"string"==typeof e)?.[0]}function It(e,t){return e.dataRoles.find(e=>e.role===t)}function Et(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function _t(e,t,r,a,o,i={}){const s={...i};if(t)for(const[e,r]of Object.entries(t))s[e]=r;for(const e of r.dataRoles){const r=Ot(e,a,o),i=t&&r?t[r]:r;void 0!==i&&(s[e.role]=i)}return e.replace(/\{([^}]+)\}/g,(e,t)=>{const r=s[t];return null==r?`{${t}}`:r+""})}var Dt={LineChart:"line chart",AreaChart:"area chart",StackedAreaChart:"stacked area chart",DifferenceChart:"difference chart",Scatterplot:"scatter plot",BubbleChart:"bubble chart",ConnectedScatterplot:"connected scatter plot",QuadrantChart:"quadrant chart",MultiAxisLineChart:"dual-axis line chart",CandlestickChart:"candlestick chart",Heatmap:"heatmap",MinimapChart:"line chart",BarChart:"bar chart",StackedBarChart:"stacked bar chart",GroupedBarChart:"grouped bar chart",DotPlot:"dot plot",Histogram:"histogram",BoxPlot:"box plot",ViolinPlot:"violin plot",RidgelinePlot:"ridgeline plot",SwarmPlot:"swarm plot",PieChart:"pie chart",DonutChart:"donut chart",FunnelChart:"funnel chart",GaugeChart:"gauge",LikertChart:"Likert chart",SwimlaneChart:"swimlane chart",ForceDirectedGraph:"network graph",SankeyDiagram:"Sankey diagram",ProcessSankey:"temporal Sankey diagram",ChordDiagram:"chord diagram",TreeDiagram:"tree diagram",Treemap:"treemap",CirclePack:"circle-packing chart",OrbitDiagram:"orbit diagram",ChoroplethMap:"choropleth map",ProportionalSymbolMap:"proportional-symbol map",FlowMap:"flow map",DistanceCartogram:"distance cartogram",BigNumber:"single value",StreamPhysicsFrame:"physics stream frame",EventDropChart:"event-drop physics chart",GaltonBoardChart:"Galton board chart",PhysicsPileChart:"physics pile chart",CollisionSwarmChart:"collision swarm chart",PhysicalFlowChart:"physical flow chart",ProcessFlowChart:"process flow physics chart",PhysicsCustomChart:"custom physics chart"},Ht=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),qt=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]);function Ut(e){return Dt[e]||e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()+" chart"}function Gt(e){const t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}var Wt=new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),Vt={"outlier-detection":"alerting","change-detection":"alerting",trend:"tracking","composition-over-time":"apportioning","compare-series":"comparing","compare-categories":"comparing",rank:"ranking","part-to-whole":"apportioning",distribution:"characterizing",correlation:"relating",flow:"tracing",hierarchy:"nesting",geo:"locating"},Kt={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},Yt=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],Xt={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"};function Jt(e){return Vt[e]}function Qt(e,t){const r=function(e){if(e){if("fits"in e||"buildProps"in e){const t=e,r={};for(const[e,a]of Object.entries(t.intentScores))"number"==typeof a&&Number.isFinite(a)&&(r[e]=a);return{family:t.family,intentScores:Object.keys(r).length?r:void 0}}return e}}(t);if(r?.act)return r.act;if(r?.intentScores){const e=function(e){let t,r=0;for(const[a,o]of Object.entries(e))if("number"==typeof o&&o>0)if(o>r)t=a,r=o;else if(o===r&&void 0!==t){const e=Yt.indexOf(a),r=Yt.indexOf(t);-1===e||-1!==r&&e>=r||(t=a)}return t}(r.intentScores);if(e&&Vt[e]&&(r.intentScores[e]??0)>=3)return Vt[e]}return r?.family?Kt[r.family]:function(e){return Pt.has(e)||"StackedAreaChart"===e?"apportioning":Wt.has(e)?"relating":$t.has(e)?"comparing":Rt.has(e)?"characterizing":Ct.has(e)?"tracking":Ht.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}var Zt=new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),er=new Set(["system","agent","watcher"]),tr=new Set(["ai","agent","system","computed","dbt","great-expectations"]),rr=new Set(["rule","statistical-test","llm-inference","computed"]);function ar(e){const t=e.annotations;return!!Array.isArray(t)&&t.some(e=>{if(!e||"object"!=typeof e)return!1;const t=e;if("string"!=typeof t.type||!Zt.has(t.type))return!1;const r=t.provenance;return!(!r||"object"!=typeof r)&&(er.has(r.authorKind)||tr.has(r.source)||rr.has(r.basis))})}function or(e="en"){let t,r;try{t=new Intl.NumberFormat(e,{notation:"compact",maximumFractionDigits:1}),r=new Intl.NumberFormat(e,{maximumFractionDigits:2})}catch{t=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),r=new Intl.NumberFormat("en",{maximumFractionDigits:2})}return e=>Number.isFinite(e)?1e4>Math.abs(e)?r.format(e):t.format(e):e+""}var ir={"y-threshold":"a threshold line","x-threshold":"a threshold line",band:"a highlighted band","x-band":"a highlighted band",label:"a label",callout:"a callout","callout-circle":"a callout","callout-rect":"a callout",text:"a text note",bracket:"a bracket",enclose:"an enclosure","rect-enclose":"an enclosure",highlight:"a highlight",widget:"a widget",trend:"a trend line",envelope:"an envelope","anomaly-band":"an anomaly band",forecast:"a forecast","category-highlight":"a category highlight"};function sr(e){const t=ir["string"==typeof e.type?e.type:"annotation"]||"an annotation",r=function(e){const t=e.provenance&&"object"==typeof e.provenance?e.provenance:null,r=t?.authorKind??t?.source??t?.basis;return"watcher"===r?"a watcher-flagged ":"agent"===r||"ai"===r||"llm-inference"===r?"an AI-suggested ":""}(e),a=r?r+t.replace(/^an? /,""):t,o="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return o?`${a} labeled "${o}"`:a}function nr(e){const t=Array.isArray(e.annotations)?e.annotations:null;if(!t||0===t.length)return;const r=jt(t.filter(e=>!!e&&"object"==typeof e));if(0===r.length)return;const a=r.map(sr),o=a.slice(0,5),i=a.length-o.length,s=function(e){return e.length>1?2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`:e[0]??""}(o)+(i>0?`, and ${i} more`:""),n=r.length;return`The author has marked ${1===n?"one feature":n+" features"} on this chart: ${s}.`}function cr(e,t,r={}){const a=void 0!==r.levels,o=new Set(r.levels??["l1","l2","l3"]);a||!r.capability&&!ar(t)||o.add("l4");const i=Nt(e,t,r.recipe);if(i){const e=["l1","l2","l3","l4"].filter(e=>o.has(e));a||e.includes("l4")||e.push("l4");const s=function(e,t,r={}){const a=Bt(t),o=zt(t),i=r.locale??"en",s="function"==typeof e.description?e.description({data:a,config:o,locale:i}):void 0,n=s?.levels??function(e,t,r,a){const o=Et(e,["nominal","ordinal"]),i=Et(e,["quantitative"]),s=o?Ot(o,r,t):void 0,n=i?Ot(i,r,t):void 0,c=o?.role??s??"category",l=i?.role??n??"value",d=e.encodings??[],u=d.length?d.slice(0,3).map(e=>e.meaning.replace(/\.$/,"")).join("; "):`${c} and ${l} are mapped through the recipe's declared visual semantics`,{number:p,percent:h}=function(e){try{return{number:new Intl.NumberFormat(e,{maximumFractionDigits:2}),percent:new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1})}}catch{return{number:new Intl.NumberFormat("en",{maximumFractionDigits:2}),percent:new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:1})}}}(a),m=new Map;if(s&&n)for(const e of t){const t=(e[s]??"Uncategorized")+"",r=Number(e[n]);Number.isFinite(r)&&m.set(t,(m.get(t)??0)+r)}const f=[...m].sort((e,t)=>t[1]-e[1]),y=f.reduce((e,[,t])=>e+t,0),g=f[0],b=f[1],v=y>0?((g?.[1]??0)+(b?.[1]??0))/y:0,w=e.intents.map(e=>({id:Tt(e),strength:"string"==typeof e?void 0:e.strength})).sort((e,t)=>"primary"===e.strength?-1:"primary"===t.strength?1:0)[0]?.id,x=e.audience?.primary??e.audienceFit?.find(e=>"strong"===e.fit)?.audience;return{l1:`A ${e.name.toLowerCase()} encodes ${c} and ${l}. ${S=u,S?S.charAt(0).toUpperCase()+S.slice(1):S}.`,l2:f.length>0?`${f.length} categories total ${p.format(y)}. ${g[0]} accounts for ${p.format(g[1])}${y>0?` (${h.format(g[1]/y)})`:""}${b?`, followed by ${b[0]} at ${p.format(b[1])}`:""}.`:`${t.length} data ${1===t.length?"item is":"items are"} represented.`,l3:2>f.length?g?g[0]+" is the only represented category.":"No quantitative pattern can be derived from the available data.":.5>v?`The total is distributed across ${f.length} categories without the first two forming a majority.`:`Most of the total is concentrated in ${g[0]} and ${b[0]}, which together account for ${h.format(v)}.`,l4:`The chart is intended for ${w??"explanation"}${x?` with a ${x} audience`:""}: ${e.designContract.whyCustom}`};var S}(e,a,o,i),c=r.levels??["l1","l2","l3","l4"],l={};for(const e of c)n[e]&&(l[e]=n[e]);const d=["l1","l2","l3","l4"].map(e=>l[e]).filter(e=>!!e).join(" "),u=r.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>"Misuse: "+e)]:void 0;return{text:d,levels:l,...u?.length?{caveats:u}:{}}}(i,t,{levels:e,locale:r.locale,audience:r.audience,includeCaveats:r.includeCaveats}),n=nr(t);return{...s,text:n?`${n} ${s.text}`.trim():s.text,...n?{annotations:n}:{}}}const s=or(r.locale??"en"),n=Ut(e),c=Array.isArray(t.data)?t.data:null,l=Lt(t),d=qt.has(e)?function(e,t){const r=e.physics&&"object"==typeof e.physics?e.physics:null,a=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,o=[e.settledProjectionRows,e.projectionRows,a?.rows,r?.settledProjectionRows,r?.projectionRows,r?.settledProjection&&"object"==typeof r.settledProjection?r.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(o)?o.map((e,r)=>{if(!e||"object"!=typeof e)return null;const a=e,o=Gt(a.count??a.value??a.total??a.bodies??a.events);if(null==o)return null;const i=a.label??a.id??a.name??"container "+(r+1),s=Gt(a.secondary??a.secondaryCount),n=Gt(a.observed??a.observedCount);return{label:Ft(i,t),count:o,...null!=s?{secondary:s}:{},..."string"==typeof a.secondaryLabel&&a.secondaryLabel?{secondaryLabel:a.secondaryLabel}:{},...null!=n?{observed:n}:{}}}).filter(e=>null!=e):null}(t,s):null,{measure:u,measureFallback:p,dimension:h,dimensionFallback:m}=Mt(e,t),f="string"==typeof u&&u?u:p,y="string"==typeof h&&h?h:m,g={};if(qt.has(e)&&function(e,t,r,a,o,i){const s=function(e){return"EventDropChart"===e?"time window":"GaltonBoardChart"===e?"bin":"CollisionSwarmChart"===e?"group lane":"PhysicalFlowChart"===e?"flow node":"container"}(e),n=function(e){return"EventDropChart"===e?"event":"GaltonBoardChart"===e?"sample":"CollisionSwarmChart"===e?"point":"PhysicalFlowChart"===e?"packet":"body"}(e);if(o.has("l1")&&(a.l1=function(e,t){return"EventDropChart"===e?"An event-drop physics chart that collapses moving events into a settled projection by event-time window.":"GaltonBoardChart"===e?"A Galton board chart that collapses falling samples into a settled histogram projection.":"PhysicsPileChart"===e?"A physics pile chart that collapses moving bodies into a settled bar-style projection by container.":"CollisionSwarmChart"===e?"A collision swarm chart that separates overlapping points while preserving their quantitative axis position.":"PhysicalFlowChart"===e?"A physical flow chart that keeps authored routes visible while packet bodies show throughput and proximity events.":`A ${t} whose accessible reading is the settled projection rather than individual trajectories.`}(e,t)),!o.has("l2")&&!o.has("l3"))return;if(!r||0===r.length)return void(o.has("l2")&&(a.l2="No settled projection is loaded yet."));const c=r.reduce((e,t)=>e+t.count,0),l=r.filter(e=>e.count>0).sort((e,t)=>t.count-e.count),d=l[0]??r.slice().sort((e,t)=>t.count-e.count)[0];if(!d)return;const u=r.reduce((e,t)=>e+(t.secondary??0),0),p=r.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(o.has("l2"))if(0===l.length)a.l2=`The settled projection contains ${i(c)} ${dr(c,n)} across ${r.length} ${dr(r.length,s)}; no ${dr(2,s)} are non-empty yet.`;else{const e=u>0?` ${i(u)} ${dr(u,n)} ${1===u?"is":"are"} marked ${p}.`:"";a.l2=`The settled projection contains ${i(c)} ${dr(c,n)} across ${r.length} ${dr(r.length,s)}; ${l.length} ${dr(l.length,s)} ${1===l.length?"is":"are"} non-empty. The largest ${s} is ${d.label} with ${i(d.count)} ${dr(d.count,n)}.${e}`}if(o.has("l3")&&c>0&&l.length>0){const e=l.find(e=>e!==d),t=function(e,t){if(0>=t)return"0%";const r=e/t*100;return(10>r?Math.round(10*r)/10:Math.round(r))+"%"}(d.count,c);a.l3=e?`The settled projection is most concentrated in ${d.label}, which holds ${i(d.count)} ${dr(d.count,n)} (${t}); ${e.label} follows with ${i(e.count)} ${dr(e.count,n)}.`:`The settled projection is concentrated in ${d.label}, which holds all ${i(d.count)} ${dr(d.count,n)}.`}}(e,n,d,g,o,s),o.has("l1")&&!qt.has(e))if(Ct.has(e)||$t.has(e))g.l1=`A ${n} of ${f} by ${y}`+(l?`, split by ${l}.`:".");else if(Pt.has(e))g.l1=`A ${n} showing ${f} across ${y} categories.`;else if(Rt.has(e))g.l1=`A ${n} of the distribution of ${f}`+(l?` by ${l}.`:".");else if(Ht.has(e)){const e=Array.isArray(t.nodes)?t.nodes.length:void 0,r=Array.isArray(t.edges)?t.edges.length:void 0,a=[null!=e?`${e} ${dr(e,"node")}`:null,null!=r?`${r} ${dr(r,"edge")}`:null].filter(Boolean);g.l1=`A ${n}${a.length?" with "+a.join(" and "):""}.`}else if("BigNumber"===e){const e="string"==typeof t.label?t.label:f;g.l1=`A single value${e?" for "+e:""}.`}else g.l1=`A ${n}.`;const b=Ct.has(e)||$t.has(e)||Pt.has(e)||Rt.has(e);let v=null;if((o.has("l2")||o.has("l3")||o.has("l4"))&&b&&c&&c.length>0&&(v=function(e,t,r,a){let o=0,i=0,s=1/0,n=-1/0,c=null,l=null,d=0,u=0,p=null,h=null,m=NaN,f=NaN;for(const r of e){const e=t(r);Number.isFinite(e)&&(0===o&&(m=e,p=r),f=e,h=r,s>e&&(s=e,c=r,d=o),e>n&&(n=e,l=r,u=o),o++,i+=e)}return 0===o?null:{count:o,min:s,max:n,mean:i/o,minLabel:Ft(null!=c?r(c):null,a),maxLabel:Ft(null!=l?r(l):null,a),first:m,last:f,firstLabel:Ft(null!=p?r(p):null,a),lastLabel:Ft(null!=h?r(h):null,a),minIndex:d,maxIndex:u}}(c,At(u,p),kt(h,m),s)),o.has("l2")&&b&&(c&&0!==c.length?v&&(g.l2=Pt.has(e)?`${v.count} segments totaling ${s(function(e){return e.mean*e.count}(v))}. Largest is ${v.maxLabel} at ${s(v.max)}; smallest is ${v.minLabel} at ${s(v.min)}.`:`${f} ranges from ${s(v.min)} (${v.minLabel}) to ${s(v.max)} (${v.maxLabel}), with a mean of ${s(v.mean)} across ${v.count} points.`):g.l2="No data is loaded yet."),o.has("l3")&&v&&!l&&Ct.has(e)?g.l3=function(e,t,r){const{first:a,last:o,min:i,max:s,maxLabel:n,minLabel:c,firstLabel:l,lastLabel:d,minIndex:u,maxIndex:p,count:h}=e,m=s-i,f=o-a;if(0===m)return`${lr(t)} is constant at ${r(a)} across the series.`;if(.04>m/(Math.abs(e.mean)||1))return`${lr(t)} ends roughly where it started (${r(a)} at ${l} to ${r(o)} at ${d}), ranging between ${r(i)} and ${r(s)}.`;const y=p>0&&h-1>p,g=u>0&&h-1>u,b=(s-Math.max(a,o))/m,v=(Math.min(a,o)-i)/m;return y&&b>.15?`Overall ${t} climbs to a peak of ${r(s)} (${n}), then falls to ${r(o)} (${d}).`:g&&v>.15?`Overall ${t} drops to a low of ${r(i)} (${c}), then recovers to ${r(o)} (${d}).`:.05>Math.abs(f)/m?`${lr(t)} ends roughly where it started (${r(a)} at ${l} to ${r(o)} at ${d}), ranging between ${r(i)} and ${r(s)}.`:f>0?p===h-1?`Overall ${t} rises from ${r(a)} (${l}) to a peak of ${r(o)} (${d}).`:`Overall ${t} rises from ${r(a)} (${l}) to ${r(o)} (${d}), after peaking at ${r(s)} (${n}).`:u===h-1?`Overall ${t} falls from ${r(a)} (${l}) to a low of ${r(o)} (${d}).`:`Overall ${t} falls from ${r(a)} (${l}) to ${r(o)} (${d}), after dipping to ${r(i)} (${c}).`}(v,f,s):o.has("l3")&&v&&!l&&$t.has(e)&&(g.l3=`The highest ${y} is ${v.maxLabel} and the lowest is ${v.minLabel}.`),o.has("l4")){const a=ar(t)?"alerting":Qt(e,r.capability);a&&(g.l4=function(e,t,r,a,o,i,s,n){const c=Xt[e],l=/^[aeiou]/i.test(c)?"an":"a";let d,u;switch(e){case"locating":d="This is a map",u="read values by location";break;case"presenting":d="This is a single-value display",u=`read ${"string"==typeof r.label&&r.label?r.label:o} as the headline number`;break;case"tracing":d=`This is ${l} ${c} chart`,u="follow the movement between states";break;case"nesting":d=`This is ${l} ${c} chart`,u="read it for nested structure and how children sum into their parents";break;case"relating":d=`This is ${l} ${c} chart`,u=`read it for whether ${i} and ${o} move together`;break;default:d=`This is ${l} ${c} chart`,u=function(e,t,r,a,o,i){if(!t)switch(e){case"alerting":return"watch for points that break from the rest";case"tracking":return"read it for the overall direction of "+r;case"comparing":return`compare ${r} across ${a}`;case"ranking":return"read it top to bottom by "+r;case"apportioning":return`read each ${a}'s share of the whole`;case"characterizing":return"read it for the spread and shape of "+r;default:return"read the highlighted features"}switch(e){case"alerting":return function(e,t,r){if($t.has(r)||Pt.has(r))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;const{first:a,last:o,min:i,max:s,minLabel:n,maxLabel:c,lastLabel:l,minIndex:d,maxIndex:u,count:p}=e,h=s-i;if(h>0){const e=u>0&&p-1>u,r=d>0&&p-1>d,m=(s-Math.max(a,o))/h,f=(Math.min(a,o)-i)/h;if(e&&m>.15)return`the peak of ${t(s)} at ${c} is the point to investigate`;if(r&&f>.15)return`the dip to ${t(i)} at ${n} is the point to investigate`;if(o>=s)return`the climb to ${t(o)} at ${l} warrants a closer look`;if(i>=o)return`the drop to ${t(o)} at ${l} warrants a closer look`}return`the extremes — ${c} (${t(s)}) and ${n} (${t(i)}) — are the points to check`}(t,o,i);case"tracking":return`read it for the trajectory of ${r}, which ${function(e){const t=e.max-e.min,r=e.last-e.first;return 0===t||.05>Math.abs(r)/t?"holds roughly steady":r>0?"rises":"falls"}(t)} from ${o(t.first)} (${t.firstLabel}) to ${o(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${r} across ${a}; ${t.maxLabel} leads at ${o(t.max)}`;case"ranking":return`read it top to bottom by ${r}; ${t.maxLabel} ranks highest at ${o(t.max)}`;case"apportioning":{const e=t.mean*t.count,r=e>0?Math.round(t.max/e*100):null;return`read each ${a}'s share of the ${o(e)} total; ${t.maxLabel} is the largest at ${o(t.max)}${null!=r?` (${r}%)`:""}`}case"characterizing":return`read it for the spread of ${r}, from ${o(t.min)} to ${o(t.max)}`;default:return"read the highlighted features"}}(e,a,o,i,s,t)}return`${d}; ${u}.${function(e,t){if(!t)return"";const r=t.familiarity?.[e];return"number"!=typeof r||r>2?"":` This ${Ut(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`}(t,n)}`}(a,e,t,l?null:v,f,y,s,r.audience))}const w=["l1","l2","l3","l4"].filter(e=>o.has(e)&&g[e]).map(e=>g[e]).join(" "),x=nr(t);return{text:x?`${x} ${w}`.trim():w,levels:g,...x?{annotations:x}:{}}}function lr(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function dr(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function ur(e){return((e??"unknown")+"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function pr(e,t,r={}){const a=r.locale??"en",o=Math.max(1,r.maxLeaves??200),i=or(a),s=Nt(e,t,r.recipe);if(s)return function(e,t,r={}){const a=Bt(t),o=zt(t),i=Math.max(1,r.maxLeaves??200);if("function"==typeof e.navigation)return e.navigation({data:a,config:o,locale:r.locale??"en"});const s=(n=e.navigation)&&"object"==typeof n?e.navigation:void 0;var n;const c=(s?.groupByRole?It(e,s.groupByRole):void 0)??(s?.groupBy?.[0]?It(e,s.groupBy[0])??e.dataRoles.find(e=>e.field===s.groupBy?.[0]):void 0)??Et(e,["nominal","ordinal"]),l=c?Ot(c,o,a):void 0,d=(s?.idRole?It(e,s.idRole):void 0)??Et(e,["identifier"]),u=d?Ot(d,o,a):void 0,p={id:"root",role:"chart",label:s?.summaryTemplate?_t(s.summaryTemplate,void 0,e,o,a,{count:a.length}):`${e.name}: ${a.length} ${1===a.length?"item":"items"} represented.`,level:1,children:[]};let h=0;const m=(t,r,i)=>{const n=u?t[u]:void 0,c=s?.itemLabelTemplate?_t(s.itemLabelTemplate,t,e,o,a,{count:a.length}):function(e,t,r,a){const o=Et(t,["nominal","ordinal"]),i=t.dataRoles.filter(e=>"quantitative"===e.semanticType),s=o?Ot(o,r,a):void 0,n=[];s&&null!=e[s]&&n.push(e[s]+"");for(const t of i){const o=Ot(t,r,a);o&&null!=e[o]&&n.push(`${t.role}: ${e[o]+""}`)}return n.length>0?n.join(", "):"Data item"}(t,e,o,a);return{id:"datum-"+ur(n??r),role:"datum",label:c,level:i,datum:t}};if(l){const e=new Map;for(const t of a){const r=(t[l]??"Uncategorized")+"",a=e.get(r);a?a.push(t):e.set(r,[t])}p.children=[...e].map(([e,t],r)=>{const a=t.slice(0,Math.max(0,i-h));h+=a.length;const o=a.map((e,t)=>m(e,1e5*r+t,3));return t.length>a.length&&o.push({id:"more-"+ur(e),role:"datum",label:`…and ${t.length-a.length} more items`,level:3}),{id:"group-"+ur(e),role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:o}})}else{const e=a.slice(0,i);p.children=e.map((e,t)=>m(e,t,2)),a.length>e.length&&p.children.push({id:"more",role:"datum",label:`…and ${a.length-e.length} more items`,level:2})}return p}(s,t,{maxLeaves:o,locale:a});const n={id:"root",role:"chart",label:cr(e,t,{locale:a}).text||"Chart.",level:1,children:[]},c=function(e,t){const r=Array.isArray(e.annotations)?e.annotations:null;if(!r)return null;const a=jt(r.filter(e=>!!e&&"object"==typeof e));if(0===a.length)return null;let o=0;const i=a.slice(0,t).map(e=>{const t=e.lifecycle?.status,r=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+o++,role:"annotation",level:3,label:`${a=sr(e),a?a.charAt(0).toUpperCase()+a.slice(1):a}${r}.`,datum:e};var a});a.length>t&&i.push({id:"annotation-"+o++,role:"annotation",level:3,label:`…and ${a.length-t} more annotations.`});const s=a.length;return{id:"annotations",role:"annotation",level:2,label:`Annotations: ${1===s?"one marked feature":s+" marked features"}.`,children:i}}(t,o),l=Array.isArray(t.data)?t.data:null,d=Ct.has(e)||$t.has(e)||Pt.has(e)||Rt.has(e);if(!l||0===l.length||!d)return c&&(n.children=[c]),n;const{measure:u,measureFallback:p,dimension:h,dimensionFallback:m}=Mt(e,t),f=At(u,p),y=kt(h,m),g="string"==typeof u&&u?u:p,b="string"==typeof h&&h?h:m,v=Lt(t);let w=0;const x=e=>`${e}-${w++}`,S=(e,t)=>{const r=e.slice(0,o).map(e=>((e,t)=>{const r=f(e),a=Ft(y(e),i);return{id:x("datum"),role:"datum",level:t,label:`${a}: ${Number.isFinite(r)?i(r):"—"}`,value:Number.isFinite(r)?r:void 0,datum:e}})(e,t));return e.length>o&&r.push({id:x("more"),role:"datum",level:t,label:`…and ${e.length-o} more points`}),r},A=[];if(Ct.has(e)||$t.has(e)){let t=1/0,r=-1/0,a=1/0,o=-1/0;const s=[];let n=!0;for(const e of l){const i=f(e);Number.isFinite(i)&&(t>i&&(t=i),i>r&&(r=i));const c=y(e);s.push(c),"number"==typeof c&&Number.isFinite(c)?(a>c&&(a=c),c>o&&(o=c)):n=!1}const c=new Set,d=[];for(const e of s){const t=e+"";c.has(t)||(c.add(t),d.push(e))}const u=n?`${i(a)} to ${i(o)}`:`${Ft(d[0],i)} to ${Ft(d[d.length-1],i)} (${$t.has(e)?d.length+" categories":l.length+" points"})`;A.push({id:x("axis"),role:"axis",level:2,label:`${$t.has(e)?"Category axis":"X axis"}: ${b}, ${u}.`}),t>r||A.push({id:x("axis"),role:"axis",level:2,label:`Value axis: ${g}, ${i(t)} to ${i(r)}.`})}if(v){const r=kt(v,v),o=new Map;for(const e of l){const t=(r(e)??"—")+"",a=o.get(t);a?a.push(e):o.set(t,[e])}const i=[];for(const[r,s]of o){const o=cr(e,{...t,data:s},{levels:["l2","l3"],locale:a}).text;i.push({id:x("series"),role:"series",level:2,label:`Series ${r}: ${o}`,children:S(s,3)})}n.children=[...A,...i]}else n.children=[...A,...S(l,2)];return c&&n.children.push(c),n}function hr(e,t){const r=[],a=e=>{if(r.push(e),e.children&&e.children.length>0&&t.has(e.id))for(const t of e.children)a(t)};return a(e),r}function mr(e){let t=1;if(e.children)for(const r of e.children)t+=mr(r);return t}var fr=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function yr(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function gr(e){return yr(e)?e:void 0}function br(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function vr(e){const t=br(e);return null==t?void 0:Math.max(0,Math.floor(t))}function wr(...e){return e.map(gr).find(Boolean)}function xr(...e){return e.find(Array.isArray)}function Sr(e){const t={};for(const[r,a]of Object.entries(e))void 0!==a&&(t[r]=a);return t}function Ar(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function kr(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function Cr(e,t,r){const a=e?.filter(e=>!0===gr(e)?.sensor).length,o=gr(t?.observation),i=gr(o?.sensors),s=xr(r?.activeSensors);return Math.max(a??0,i?Object.keys(i).length:0,s?.length??0)||void 0}function $r(e,t,r={}){const{capability:a,audience:o,locale:i}=r,s=r.levels??["l1","l2","l3"],n=!1!==r.includeStructure,c=Qt(e,a),l=cr(e,t,{levels:c?[...s,"l4"]:s,locale:i,capability:a,audience:o}),{l4:d,...u}=l.levels,p=["l1","l2","l3"].map(e=>l.levels[e]).filter(Boolean).join(" "),h={levels:u,text:l.annotations?`${l.annotations} ${p}`.trim():p,...l.annotations?{annotations:l.annotations}:{}};let m;if(c&&d){const e=(f=a)?"fits"in f||"buildProps"in f?{family:f.family}:{family:f.family,intentScores:f.intentScores}:{};m={act:c,sentence:d,family:e.family,intentScores:e.intentScores}}var f;const y=n?pr(e,t,{maxLeaves:r.maxLeaves,locale:i}):void 0,g=function(e,t,r){if(!1===r)return;const a=yr(r)?r:void 0,o=gr(t.physics),i=wr(a?.snapshot,o?.snapshot,t.physicsSnapshot,function(e){const t=gr(e);return!!t&&(yr(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),s=wr(a?.evidence,o?.evidence,t.physicsEvidence,t.settledEvidence),n=wr(a?.config,o?.config,i?.config,t.config),c=wr(gr(i?.world),gr(o?.world)),l=wr(gr(n?.kernel),gr(c?.options)),d=xr(c?.bodies),u=xr(c?.colliders,n?.colliders),p=xr(i?.queue,o?.queue),h=xr(i?.liveBodyOrder),m=xr(c?.springs),f=xr(i?.activeSensorPairs),y=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const r=gr(e);if(!r)return;const a=br(r.count??r.value??r.total??r.bodies??r.events);if(null==a)return;const o=(r.label??r.id??r.name??"container "+(t+1))+"",i=null==r.id?void 0:r.id+"",s=br(r.secondary??r.secondaryCount),n=br(r.observed??r.observedCount);return Sr({id:i,label:o,count:a,secondary:s,secondaryLabel:"string"==typeof r.secondaryLabel?r.secondaryLabel:void 0,observed:n})}).filter(e=>null!=e);if(0===t.length)return;const r=t.reduce((e,t)=>e+t.count,0),a=t.filter(e=>e.count>0).length,o=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:r,populatedCount:a,...o?{leader:o}:{}}}(function(e,t,r,a){const o=gr(e.settledProjection),i=gr(t?.settledProjection);return xr(r?.projectionRows,r?.aggregates,e.settledProjectionRows,e.projectionRows,o?.rows,t?.settledProjectionRows,t?.projectionRows,i?.rows,a?.binCounts)}(t,o,a,s)),g=function(e,t){const r=e?.map((e,t)=>{const r=gr(e);if(!r)return;const a=br(r.count)??0,o=br(r.total),i={label:(r.label??r.id??"sediment "+(t+1))+"",count:a};return null!=r.id&&(i.id=r.id+""),null!=o&&(i.total=o),i}).filter(e=>null!=e),a=vr(t?.bins)??r?.length??0,o=br(t?.count)??r?.reduce((e,t)=>e+t.count,0)??0,i=br(t?.total)??r?.reduce((e,t)=>e+(t.total??0),0),s=r?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==a||0!==o||i)return{bins:a,count:o,...null!=i&&i>0?{total:i}:{},...s?{leader:s}:{}}}(xr(a?.sediment,o?.sediment,i?.sediment),wr(a?.sedimentTotals,o?.sedimentTotals)),b=h?.length??d?.length??vr(s?.bodyCount),v=function(e){if(e)return e.filter(e=>!0===gr(e)?.sleeping).length}(d)??vr(s?.sleepingCount),w=p?.length,x="string"==typeof i?.simulationState?i.simulationState:void 0,S="boolean"==typeof s?.settled?s.settled:x?"settled"===x:null!=b||null!=v||null!=w?null!=b&&v===b&&0===(w??0):void 0,A=gr(l?.gravity),k=br(A?.x),C=br(A?.y),$=Sr({state:x,settled:S,elapsedSeconds:br(i?.elapsedSeconds),paused:"boolean"==typeof i?.paused?i.paused:void 0,visible:"boolean"==typeof i?.visible?i.visible:void 0,seed:br(l?.seed),gravity:null!=k&&null!=C?{x:k,y:C}:void 0,fixedDt:br(n?.fixedDt??l?.fixedDt),timeScale:br(n?.timeScale),maxSubsteps:vr(n?.maxSubsteps),liveBodies:b,sleepingBodies:v,queued:w,bodyLimit:br(n?.bodyLimit),eviction:"string"==typeof n?.eviction?n.eviction:void 0}),P=Sr({colliders:u?.length,sensors:Cr(u,n,c),springs:m?.length,activeSensorPairs:f?.length}),R=Object.keys(P).length>0,M=fr.has(e);if(!(Object.keys($).length>0||R||y||g)||!M&&null==r)return;const L={simulation:$,...R?{geometry:P}:{},...y?{aggregates:y}:{},...g?{sediment:g}:{}},F=function(e){const t=[],r=e.simulation,a=[r.state??(r.settled?"settled":void 0),null!=r.liveBodies?`${r.liveBodies} live ${Ar(r.liveBodies,"body")}`:void 0,null!=r.sleepingBodies?r.sleepingBodies+" sleeping":void 0,null!=r.queued?r.queued+" queued":void 0,null!=r.seed?"seed "+kr(r.seed):void 0,r.gravity?`gravity (${kr(r.gravity.x)}, ${kr(r.gravity.y)})`:void 0,null!=r.fixedDt?`fixed step ${kr(r.fixedDt)}s`:void 0,null!=r.timeScale?kr(r.timeScale)+"x time":void 0].filter(Boolean);a.length>0&&t.push(`Physics simulation: ${a.join("; ")}.`);const o=e.geometry;if(o){const e=[null!=o.colliders?`${o.colliders} ${Ar(o.colliders,"collider")}`:void 0,null!=o.sensors?`${o.sensors} ${Ar(o.sensors,"sensor")}`:void 0,null!=o.springs?`${o.springs} ${Ar(o.springs,"spring")}`:void 0,null!=o.activeSensorPairs?`${o.activeSensorPairs} active sensor ${Ar(o.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const i=e.aggregates;if(i){const e=i.leader,r=e?` Largest is ${e.label} with ${kr(e.count)}.`:"";t.push(`Physics aggregates: ${kr(i.totalCount)} settled ${Ar(i.totalCount,"body")} across ${i.rows.length} ${Ar(i.rows.length,"container")}; ${i.populatedCount} populated.${r}`)}const s=e.sediment;if(s){const e=null!=s.total?", value total "+kr(s.total):"",r=s.leader?`; largest sediment bin is ${s.leader.label} with ${kr(s.leader.count)}`:"";t.push(`Physics sediment: ${s.count} retained ${Ar(s.count,"body")} in ${s.bins} ${Ar(s.bins,"bin")}${e}${r}.`)}return t.join(" ")}(L);return{...L,text:F}}(e,t,r.physics),b=[h.text,m?.sentence,g?.text].filter(Boolean).join(" ");return{component:e,description:h,intent:m,structure:y,physics:g,text:b}}function Pr(e,t=30){return Math.max((e??4)+5,12,t)}var Rr="1",Mr=new Set(["tooltip","onObservation","xFormat","yFormat","valueFormat","svgAnnotationRules","tooltipContent","onHover","tickFormatTime","tickFormatValue","edgeSort","sortGroups","centerContent","frameProps","controls","oFormat","rFormat","oSort","pieceStyle","summaryStyle","nodeStyle","edgeStyle","customHoverBehavior","customClickBehavior","customDoubleClickBehavior","onBrush","onTopologyChange","backgroundGraphics","foregroundGraphics","legend","recipe","layout"]),Lr=new Set(["data","nodes","edges","points","areas","lines","flows"]);function Fr(e,t){return!!Lr.has(e)&&("areas"!==e||"string"!=typeof t)}var jr="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e));function Tr(e,t,r){const a=Ue(e)??Ge(t.recipe)??Ge(t.recipeId);if(a)return function(e,t,r){const a=function(e,t,r){const a={};for(const[o,i]of Object.entries(e))if(null!=i&&!Mr.has(o)&&"recipeId"!==o&&(t||!Fr(o,i)))if("function"==typeof i||i?.$$typeof){if(r)throw Error(`Portable recipe prop "${o}" is not JSON-safe.`)}else if(He(i))a[o]=jr(i);else if(r)throw Error(`Portable recipe prop "${o}" is not JSON-safe.`);return a}(t,!1!==r?.includeData,"portable"===e.portability),o=e.intents.map(Tt).filter(e=>!!e),i={name:e.name,intents:o,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily};if("portable"===e.portability){if(!He(a))throw Error(`Portable recipe "${e.id}" contains non-JSON-safe props or layoutConfig.`);return{component:"ChartRecipe",recipeId:e.id,portable:!0,props:a,manifest:i,version:Rr,createdAt:(new Date).toISOString(),...r?.selections?{selections:r.selections}:{}}}return{component:"ChartRecipe",recipeId:e.id,portable:!1,reason:"Recipe contains or may depend on non-serializable local layout callbacks.",warnings:["This config is inspectable but cannot be rendered remotely by CLI or MCP."],props:a,manifest:i,version:Rr,createdAt:(new Date).toISOString(),...r?.selections?{selections:r.selections}:{}}}(a,t,r);if(!Y[e])throw Error(`Unknown component "${e}". Known components: ${Object.keys(Y).join(", ")}`);const o=!1!==r?.includeData,i={};for(const[e,r]of Object.entries(t))null!=r&&(Mr.has(e)||!o&&Fr(e,r)||"function"!=typeof r&&(r?.$$typeof||(i[e]=jr(r))));return{component:e,props:i,version:Rr,createdAt:(new Date).toISOString(),...r?.selections?{selections:r.selections}:{}}}function zr(e){if(!e.component||!e.props)throw Error("Invalid chart config: missing component or props");if("ChartRecipe"===e.component||"LocalChartRecipe"===e.component){if(!e.recipeId)throw Error("Invalid chart recipe config: missing recipeId");const t=Ue(e.recipeId);if(!t)throw Error(`Unknown chart recipe "${e.recipeId}". Register it before deserializing this config.`);if("LocalChartRecipe"!==e.component&&!1!==e.portable&&"portable"!==t.portability)throw Error(`Chart recipe "${e.recipeId}" is registered as local, not portable.`);return{componentName:"ChartRecipe",props:{...jr(e.props),recipeId:e.recipeId}}}if(!Y[e.component])throw Error(`Unknown component "${e.component}". This config may require a newer version of semiotic.`);return{componentName:e.component,props:jr(e.props)}}function Br(e){const t=JSON.stringify(e);return"sc="+btoa(unescape(encodeURIComponent(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Nr(e){const t=new URLSearchParams(e.includes("?")?e.split("?")[1]:e).get("sc");if(!t)throw Error("No chart config found in URL (missing 'sc' parameter)");const r=t.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(escape(atob(r)));return JSON.parse(a)}async function Or(e,t="json"){const r="jsx"===t?Ir(e):JSON.stringify(e,null,2);if("undefined"==typeof navigator||!navigator.clipboard)throw Error("Clipboard API not available. copyConfig requires a browser environment.");await navigator.clipboard.writeText(r)}function Ir(e){const{props:t}=e,r=["<"+("LocalChartRecipe"===e.component?"ChartRecipe":e.component)];e.recipeId&&r.push(` recipeId="${e.recipeId}"`);for(const[e,a]of Object.entries(t))if("string"==typeof a)r.push(` ${e}="${a}"`);else if("boolean"==typeof a&&!0===a)r.push(" "+e);else if("boolean"==typeof a&&!1===a)r.push(` ${e}={false}`);else if("number"==typeof a)r.push(` ${e}={${a}}`);else{const t=JSON.stringify(a);r.push(80>t.length?` ${e}={${t}}`:` ${e}={${JSON.stringify(a,null,2)}}`)}return r.push("/>"),r.join("\n")}function Er(e){const t={};for(const[r,a]of e){const e=[];for(const[,t]of a.clauses){const r={};for(const[e,a]of Object.entries(t.fields))r[e]="point"===a.type?{type:"point",values:Array.from(a.values)}:{type:"interval",range:a.range};e.push({clientId:t.clientId,type:t.type,fields:r})}t[r]={name:a.name,resolution:a.resolution,clauses:e}}return t}function _r(e){const t=new Map;for(const[r,a]of Object.entries(e)){const e=new Map;for(const t of a.clauses){const r={};for(const[e,a]of Object.entries(t.fields))r[e]="point"===a.type?{type:"point",values:new Set(a.values)}:{type:"interval",range:a.range};e.set(t.clientId,{clientId:t.clientId,type:t.type,fields:r})}t.set(r,{name:a.name,resolution:a.resolution,clauses:e})}return t}async function Dr(e,t){const{format:r="png",filename:a="chart",scale:o=2,background:i="white"}=t||{},s=e.querySelector("svg");if(!s)throw Error("No SVG element found in the container");const n=s.cloneNode(!0),c=s.getBoundingClientRect();if(n.getAttribute("width")||n.setAttribute("width",c.width+""),n.getAttribute("height")||n.setAttribute("height",c.height+""),n.getAttribute("xmlns")||n.setAttribute("xmlns","http://www.w3.org/2000/svg"),Hr(s,n),"svg"===r){const e=(new XMLSerializer).serializeToString(n);qr(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),a+".svg")}else{const t=c.width*o,r=c.height*o,s=document.createElement("canvas");s.width=t,s.height=r;const l=s.getContext("2d");l.fillStyle=i,l.fillRect(0,0,t,r),l.scale(o,o);const d=e.querySelector("canvas");d&&l.drawImage(d,0,0,c.width,c.height);const u=(new XMLSerializer).serializeToString(n),p=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),h=URL.createObjectURL(p),m=new Image;m.width=c.width,m.height=c.height,await new Promise((e,t)=>{m.onload=()=>{l.drawImage(m,0,0),s.toBlob(r=>{r?(qr(r,a+".png"),e()):t(Error("Failed to create PNG blob"))},"image/png"),URL.revokeObjectURL(h)},m.onerror=()=>{URL.revokeObjectURL(h),t(Error("Failed to load SVG image"))},m.src=h})}}function Hr(e,t){const r=e.children,a=t.children,o=window.getComputedStyle(e),i=["fill","stroke","stroke-width","stroke-dasharray","opacity","fill-opacity","stroke-opacity","font-family","font-size","font-weight","text-anchor","dominant-baseline"];for(const e of i){const r=o.getPropertyValue(e);r&&"none"!==r&&""!==r&&t.style?.setProperty(e,r)}for(let e=0;Math.min(r.length,a.length)>e;e++)Hr(r[e],a[e])}function qr(e,t){const r=URL.createObjectURL(e),a=document.createElement("a");a.href=r,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}function Ur(e){const t={};if(null==e||"object"!=typeof e)return t;for(const[r,a]of Object.entries(e))r.startsWith("_")||null!=a&&""!==a&&("number"==typeof a?Number.isFinite(a)&&(t[r]=a):"string"==typeof a?t[r]=a:"boolean"==typeof a?t[r]=a+"":a instanceof Date&&(t[r]=a.toISOString().slice(0,10)));return t}function Gr(e){return e&&"object"==typeof e?e:{}}function Wr(e){return Gr(e.accessibility).tableFields??e.accessibleDatum??e.datum}function Vr(e){const t=e.pointId??e.id??e._transitionKey;return null==t||""===t?void 0:t+""}function Kr(e){return e.accessibility?.tableFields??e.accessibleDatum??e.datum??null}function Yr(e){return"number"==typeof e&&Number.isFinite(e)}function Xr(e){if(Yr(e.x)&&Yr(e.y)&&Yr(e.w)&&Yr(e.h))return{x0:e.x,y0:e.y,x1:e.x+e.w,y1:e.y+e.h};if(Yr(e.x)&&Yr(e.y)&&Yr(e.r))return{x0:e.x-e.r,y0:e.y-e.r,x1:e.x+e.r,y1:e.y+e.r};if(Yr(e.cx)&&Yr(e.cy)&&Yr(e.r))return{x0:e.cx-e.r,y0:e.cy-e.r,x1:e.cx+e.r,y1:e.cy+e.r};if(Yr(e.cx)&&Yr(e.cy)&&Yr(e.outerR))return{x0:e.cx-e.outerR,y0:e.cy-e.outerR,x1:e.cx+e.outerR,y1:e.cy+e.outerR};const t=[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat().filter(e=>Array.isArray(e)&&Yr(e[0])&&Yr(e[1]));return t.length>0?{x0:Math.min(...t.map(e=>e[0])),y0:Math.min(...t.map(e=>e[1])),x1:Math.max(...t.map(e=>e[0])),y1:Math.max(...t.map(e=>e[1]))}:null}function Jr(e,t){const r=Math.max(0,Math.min(e.x1,t.x1)-Math.max(e.x0,t.x0))*Math.max(0,Math.min(e.y1,t.y1)-Math.max(e.y0,t.y0)),a=Math.min(Math.max(0,e.x1-e.x0)*Math.max(0,e.y1-e.y0),Math.max(0,t.x1-t.x0)*Math.max(0,t.y1-t.y0));return a>0?r/a:0}function Qr(e,t,r,a,o){if(e===t)return!0;const i=r.dataRoles.map(e=>Ot(e,a,o)).filter(e=>!!e).filter(r=>null!=e[r]&&null!=t[r]);return i.length>0&&i.every(r=>e[r]+""==t[r]+"")}function Zr(e,t,r,a,o,i="warn",s){return{id:e,category:t,status:r?"pass":i,message:r?a:o,...s?{evidence:s}:{}}}function ea(e){const{recipe:t}=e,r=function(e){return Array.isArray(e)?e:e&&"object"==typeof e?[...e.nodes??e.sceneNodes??[],...e.sceneEdges??[]]:[]}(e.scene),a=e.layoutConfig??zt({layoutConfig:e.layoutConfig}),o=e.dimensions.plot??{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},i=o.x??0,s=o.y??0,n=[],c=r.filter(e=>null!=Kr(e)),l=r.filter(e=>!("string"!=typeof e.pathD||!/NaN|Infinity|undefined/.test(e.pathD))||function(e){return[...[e.x,e.y,e.w,e.h,e.r,e.cx,e.cy,e.innerR,e.outerR,e.x1,e.x2,e.y1,e.y2,e.openY,e.closeY,e.highY,e.lowY,e.bodyWidth].filter(e=>void 0!==e),...[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat(2)]}(e).some(e=>"number"!=typeof e||!Number.isFinite(e)));n.push(Zr("geometry.finite","geometry",0===l.length,"All emitted geometry is finite.",l.length+" marks contain non-finite geometry.","fail",{count:l.length}));const d=r.map(Xr),u=d.filter(e=>e&&(e.x0>=e.x1||e.y0>=e.y1)).length;n.push(Zr("geometry.nonzero-area","geometry",0===u,"All bounded marks have positive area.",u+" marks have zero or negative area.","warn",{count:u}));const p=d.filter(e=>e&&(i>e.x0||s>e.y0||e.x1>i+o.width||e.y1>s+o.height)).length;n.push(Zr("geometry.bounds","geometry",0===p,"All bounded marks stay inside the plot.",p+" marks extend outside the plot bounds.","warn",{count:p}));const h=t.audit?.minimumHitTargetSize??t.accessibility.minimumHitTarget??24,m=d.filter(e=>!!e&&(h>e.x1-e.x0||h>e.y1-e.y0)).length;n.push(Zr("interaction.target-size","interaction",0===m,`All bounded targets meet the declared ${h}px minimum.`,`${m} targets are smaller than ${h}px in at least one dimension.`,"warn",{count:m,minimumTarget:h}));const f=c.map(Vr),y=f.filter(e=>!e).length,g=new Set,b=f.filter(e=>!(!e||!g.has(e)&&(g.add(e),1)));n.push(Zr("identity.stable-ids","identity",0===y,"Every data-bearing mark exposes a stable id.",y+" data-bearing marks have no pointId, id, or transition key.",t.audit?.requireStableIds?"fail":"warn",{missing:y})),n.push(Zr("identity.unique-ids","identity",0===b.length,"Stable mark ids are unique.",b.length+" duplicate stable ids were observed.","fail",{duplicates:[...new Set(b)].slice(0,10)}));const v=f.filter(e=>e&&/^(datum|mark|node|point|rect)-?\d+$/.test(e)).length;v>0&&n.push({id:"identity.index-pattern",category:"identity",status:"warn",message:v+" ids look index-derived and may change when data is reordered.",remediation:"Derive ids from a declared identifier role or stable domain key."});const w=new Set;let x=0;const S=e.inputData;for(const e of c){const r=Kr(e),o=Array.isArray(r)?r:[r];let i=!1;for(const e of o)if(e&&"object"==typeof e)for(let r=0;S.length>r;r+=1)Qr(e,S[r],t,a,S)&&(w.add(r),i=!0);i||(x+=1)}const A=Math.max(0,S.length-w.size);n.push(Zr("coverage.input-data","coverage",0===A,"Every input datum is represented by the observed scene.",A+" input data items have no matching scene mark.",t.audit?.requireDatumCoverage?"fail":"warn",{represented:w.size,input:S.length})),n.push(Zr("coverage.scene-data","coverage",0===x,"Every data-bearing scene mark maps back to input data.",x+" scene marks do not map back to an input datum.","warn",{count:x}));const k=t.encodings?.some(e=>"count"===e.channel);!k&&c.length>w.size&&w.size>0&&n.push({id:"coverage.duplicate-references",category:"coverage",status:"warn",message:"Input data is referenced by multiple marks, but multiplicity is not declared as an encoding.",remediation:"Declare count/repetition semantics or preserve a one-to-one datum-to-mark mapping."});const C=c.filter(e=>!1===e.interactive).length;n.push(Zr("interaction.hit-targets","interaction",0===C&&c.length>0,"Every observed data-bearing scene node participates in hit testing.",0===c.length?"No data-bearing scene nodes were emitted for interaction.":C+" data-bearing marks explicitly disable interaction.","fail"));const $=(e.annotations??[]).map(e=>e.pointId).filter(e=>null!=e).map(String),P=$.filter(e=>!g.has(e));n.push(Zr("coverage.annotation-anchors","coverage",0===P.length,$.length?"All pointId annotation anchors resolve to observed scene nodes.":"No pointId annotations require scene resolution.",P.length+" annotations point to missing scene ids.","fail",{unresolved:P}));const R=(e.chart?.selectedIds??[]).filter(e=>!g.has(e));e.chart?.selectedIds&&n.push(Zr("interaction.selection-reachability","interaction",0===R.length,"Selected/highlighted states resolve to observed marks.",R.length+" selected ids are not reachable in the scene.","fail",{missing:R}));const M=function(e){const t=[];if(!Array.isArray(e))return t;const r=e.some(e=>e&&("line"===e.type||"area"===e.type));for(const a of e)if(a&&"object"==typeof a&&null!==a.datum)try{switch(a.type){case"point":if(r)break;t.push({label:"Point",values:Ur(Wr(a))});break;case"line":case"area":{const e=Wr(a),r=Array.isArray(e)?e:[],o="line"===a.type?"Line point":"Area point";for(const e of r)t.push({label:o,values:Ur(e)});break}case"rect":{const e=Wr(a),r=null!=e&&"object"==typeof e?e:{},o=r.category??a.group??"",i=r.value??r.__aggregateValue??r.total,s=Ur(r);null==s.category&&""!==o&&(s.category=o+""),null==s.value&&null!=i&&(s.value="number"==typeof i||"string"==typeof i?i:i+""),t.push({label:"Bar",values:s});break}case"heatcell":{const e=Ur(Wr(a));null==e.value&&"number"==typeof a.value&&Number.isFinite(a.value)&&(e.value=a.value),t.push({label:"Cell",values:e});break}case"wedge":{const e=Wr(a),r=Ur(e);if(null==r.category){const t=Gr(e),a=t.category??t.label;null!=a&&(r.category=a+"")}t.push({label:"Wedge",values:r});break}case"circle":t.push({label:"Node",values:Ur(Wr(a))});break;case"arc":t.push({label:"Arc",values:Ur(Wr(a))});break;case"candlestick":t.push({label:"Candlestick",values:Ur(Wr(a))});break;case"geoarea":{const e=Gr(Wr(a)),r=Ur(e);if(null==r.name){const t=Gr(e.properties).name??e.name;null!=t&&(r.name=t+"")}t.push({label:"Region",values:r});break}}}catch{}return t}(r),L=(t.accessibility.tableFields??t.accessibility.tableRoles?.map(e=>({role:e,label:e}))??[]).map(e=>{if(e.field)return e.field;const r=e.role?t.dataRoles.find(t=>t.role===e.role):void 0;return r?Ot(r,a,S):void 0}).filter(e=>!!e),F=new Set(M.flatMap(e=>Object.keys(e.values))),j=L.filter(e=>!F.has(e));n.push(Zr("accessibility.table-fields","accessibility",0===j.length,L.length?"The accessible table preserves all recipe-declared fields.":"The recipe declares no explicit accessible table field projection.",`The accessible table loses declared fields: ${j.join(", ")}.`,"fail",{expectedFields:L,observedFields:[...F]})),new Set(S.flatMap(e=>Object.entries(e).filter(([,e])=>["string","number","boolean"].includes(typeof e)).map(([e])=>e))).size>2&&2>=F.size&&[...F].every(e=>"category"===e||"value"===e)&&n.push({id:"accessibility.generic-table-loss",category:"accessibility",status:"warn",message:"The table exposes only generic category/value fields although richer input data exists.",remediation:"Emit accessibleDatum or accessibility.tableFields on scene nodes."});const T=(t.encodings?.filter(e=>"color"===e.channel)??[]).filter(e=>!e.redundantWith||0===e.redundantWith.length);n.push(Zr("accessibility.color-only","accessibility",0===T.length,"Every declared color encoding names a redundant cue.",T.length+" color encodings have no declared redundant cue.","warn"));const z=e.chart;if(z){for(const[e,r]of[["title",t.accessibility.requiresTitle],["summary",t.accessibility.requiresSummary],["description","required"===t.accessibility.description]])r&&n.push(Zr("accessibility."+e,"accessibility","string"==typeof z[e]&&z[e].trim().length>0,`A chart ${e} is present.`,`The recipe requires a chart ${e}, but none was supplied.`,"fail"));(t.accessibility.requiresAccessibleTable||"required"===t.accessibility.accessibleTable||t.accessibility.fallbackTable)&&n.push(Zr("accessibility.fallback-table","accessibility",!1!==z.accessibleTable,"The accessible fallback table is enabled.","The recipe requires a fallback table, but accessibleTable is disabled.","fail")),z.navigationTree&&n.push(Zr("accessibility.navigation-depth","accessibility",(z.navigationTree.children?.length??0)>0,"The navigation tree exposes structure below the root.","The navigation tree is root-only.","fail"))}const B=e.theme?.background??"#ffffff",N=r.filter(e=>{const t=e.style?.fill??e.fill;if("string"!=typeof t||!t.startsWith("#")||!B.startsWith("#"))return!1;const r=ae(t,B);return null!=r&&3>r}).length;n.push(Zr("visual.contrast","visual",0===N,"All statically checkable mark fills meet 3:1 contrast.",N+" marks have fill contrast below 3:1.","warn",{background:B}));let O=0;const I=d.filter(e=>!!e).slice(0,500);for(let e=0;I.length>e;e+=1)for(let t=e+1;I.length>t;t+=1).8>Jr(I[e],I[t])||(O+=1);O>I.length&&n.push({id:"visual.overlap-density",category:"visual",status:"warn",message:O+" near-total mark overlaps suggest occlusion or excessive density.",remediation:"Aggregate, jitter, layer explicitly, or declare overlap as intentional."});const E=[["manual-at.screen-reader","Verify real screen-reader behavior with the target browser/AT combinations."],["manual-at.cognitive-load","Assess cognitive load and whether the custom metaphor is understood."],["manual-at.keyboard-order","Verify that keyboard order is meaningful, not merely mechanically available."],["manual-at.animation","Verify that animation is not distracting and reduced-motion behavior is sufficient."],["manual-at.reception","Test whether the memorable form is received as intended by the target audience."],["manual-at.overlay-occlusion","Inspect labels, overlays, annotations, and important marks for clipping or occlusion."],["manual-at.observation","Exercise hover, focus, selection, and observation emission in the rendered chart."]].map(([e,t])=>({id:e,category:"manual-at",status:"manual",message:t})),_={dataRoles:t.dataRoles.map(e=>e.role),intents:t.intents.map(Tt).filter(e=>!!e),accessibilityExpectations:[...t.accessibility.requirements??[],...t.accessibility.tableFields?.map(e=>"table field: "+e.label)??[]],fallbackDeclared:!0===t.accessibility.fallbackTable||"required"===t.accessibility.accessibleTable||!0===t.accessibility.requiresAccessibleTable,designContractDeclared:!!t.designContract?.whyCustom},D=[...n,...E],H=n.filter(e=>"fail"===e.status).length;return{recipeId:t.id,ok:0===H,summary:{marks:r.length,passes:D.filter(e=>"pass"===e.status).length,warnings:D.filter(e=>"warn"===e.status).length,failures:H,manual:D.filter(e=>"manual"===e.status).length},declaredSemantics:_,observedSceneEvidence:n,manualATChecks:E}}function ta(e){let t=1/0,r=-1/0;for(const a of e)t>a&&(t=a),a>r&&(r=a);return[t,r]}function ra(e){return"nominal"===e||"ordinal"===e}function aa(e){return"quantitative"===e||"temporal"===e}function oa(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var ia={category10:"category10",category20:"category20",category20b:"category20",category20c:"category20",accent:"accent",dark2:"dark2",paired:"paired",pastel1:"pastel1",pastel2:"pastel2",set1:"set1",set2:"set2",set3:"set3",tableau10:"category10",tableau20:"category20"},sa={linear:"linear","monotone-x":"monotoneX","monotone-y":"monotoneY",monotone:"monotoneX",step:"step","step-after":"stepAfter","step-before":"stepBefore",basis:"basis",cardinal:"cardinal","catmull-rom":"catmullRom"},na={sum:"sum",mean:"mean",average:"mean",count:"count",min:"min",max:"max",median:"mean"};function ca(e){e=function(e){const t=e;if(!function(e){const t=e.usermeta;if(oa(t)&&oa(t.idid))return t.idid}(e)||!Array.isArray(t.layer))return e;const r=t.layer.filter(e=>oa(e)&&!function(e){return!!(oa(e)&&oa(e.usermeta)&&oa(e.usermeta.idid))&&"annotation-layer"===e.usermeta.idid.role}(e));if(1!==r.length||void 0===r[0].mark)return e;const{layer:a,...o}=t,{usermeta:i,...s}=r[0];return{...o,...s}}(e);const t=[],{type:r,markProps:a}=function(e){if(!e)return{type:"",markProps:{}};if("string"==typeof e)return{type:e,markProps:{}};const{type:t,...r}=e;return{type:t,markProps:r}}(e.mark),o=e.encoding||{},i=o.x,s=o.y,n=o.color,c=o.size,l=o.theta,d=o.opacity;let u;e.data?.values?u=e.data.values:e.data?.url&&t.push("data.url is not supported — only inline data.values can be translated. Provide data manually."),e.transform&&e.transform.length>0&&t.push("Vega-Lite transforms are not supported. Pre-transform your data before passing to fromVegaLite()."),e.layer&&t.push('Layered specs ("layer") are not supported. Only single-mark specs can be translated.'),(e.hconcat||e.vconcat||e.concat)&&t.push('Concatenated views ("hconcat"/"vconcat"/"concat") are not supported. Translate each sub-spec individually.'),(e.facet||o.facet||o.row||o.column)&&t.push("Faceted views are not supported. Use Semiotic's LinkedCharts or render multiple charts manually."),e.repeat&&t.push('Repeated views ("repeat") are not supported. Translate each field combination individually.'),(e.params||e.selection)&&t.push("Selections/params are not supported. Use Semiotic's LinkedCharts and selection props for interactivity.");const p={};e.width&&(p.width=e.width),e.height&&(p.height=e.height);const h=function(e){if(e)return"string"==typeof e?e:e.text}(e.title);if(h&&(p.title=h),n?.field&&(p.colorBy=n.field,n.scale?.scheme)){const e=ia[n.scale.scheme];e&&(p.colorScheme=e)}void 0!==d?.value&&(p.pointOpacity=d.value);const m=i?.aggregate,f=s?.aggregate;if(u&&(m||f)){const e=f?s:i,t=f?i:s,r=na[e.aggregate];if(r&&t?.field&&e.field)u=function(e,t){const{groupBy:r,value:a,agg:o="sum"}=t,i=new Map;for(const t of e){const e=t[r]+"";i.has(e)||i.set(e,[]),i.get(e).push(Number(t[a]))}const s=[];for(const[e,t]of i){let a;switch(o){case"count":a=t.length;break;case"mean":a=t.reduce((e,t)=>e+t,0)/t.length;break;case"min":a=ta(t)[0];break;case"max":a=ta(t)[1];break;default:a=t.reduce((e,t)=>e+t,0)}s.push({[r]:e,value:a})}return s}(u,{groupBy:t.field,value:e.field,agg:r});else if(("count"===r||"count"===e.aggregate)&&t?.field&&u){const e=new Map;for(const r of u){const a=r[t.field]+"";e.set(a,(e.get(a)||0)+1)}u=Array.from(e,([e,r])=>({[t.field]:e,value:r}))}}if(i?.bin||s?.bin){const e="Histogram";u&&(p.data=u),i?.bin?(p.valueAccessor=i.field,s?.field&&(p.categoryAccessor=s.field),i.axis?.title&&(p.valueLabel=i.axis.title)):s?.bin&&(p.valueAccessor=s.field,i?.field&&(p.categoryAccessor=i.field),s.axis?.title&&(p.valueLabel=s.axis.title));const r=i?.bin||s?.bin,a="object"==typeof r?r.maxbins:void 0;return a&&(p.bins=a),da(e,p,t)}let y;switch(r){case"bar":y=function(e,t,r,a,o,i,s){let n;return r?.field&&!1!==e?.stack&&!1!==t?.stack&&null!==e?.stack&&null!==t?.stack?(n="StackedBarChart",a.stackBy=r.field):n="BarChart",ra(e?.type)&&aa(t?.type)?(a.categoryAccessor=e.field,a.valueAccessor=s?"value":t.field,e?.axis?.title&&(a.categoryLabel=e.axis.title),t?.axis?.title&&(a.valueLabel=t.axis.title)):aa(e?.type)&&ra(t?.type)?(a.categoryAccessor=t.field,a.valueAccessor=i?"value":e.field,a.orientation="horizontal",t?.axis?.title&&(a.categoryLabel=t.axis.title),e?.axis?.title&&(a.valueLabel=e.axis.title)):(e?.field&&(a.categoryAccessor=e.field),t?.field&&(a.valueAccessor=s?"value":t.field),e?.axis?.title&&(a.categoryLabel=e.axis.title),t?.axis?.title&&(a.valueLabel=t.axis.title)),o&&(a.data=o),n}(i,s,n,p,u,m,f);break;case"line":if(y="LineChart",la(i,s,p,m,f),n?.field&&(p.lineBy=n.field),a.interpolate){const e=sa[a.interpolate];e&&(p.curve=e)}!0===a.point&&(p.showPoints=!0),u&&(p.data=u);break;case"area":if(n?.field?(y="StackedAreaChart",p.areaBy=n.field):y="AreaChart",la(i,s,p,m,f),a.interpolate){const e=sa[a.interpolate];e&&(p.curve=e)}void 0!==a.opacity&&(p.areaOpacity=a.opacity),u&&(p.data=u);break;case"point":case"circle":case"square":c?.field?(y="BubbleChart",p.sizeBy=c.field,c.scale?.range&&(p.sizeRange=c.scale.range)):y="Scatterplot",la(i,s,p,m,f),u&&(p.data=u);break;case"rect":y="Heatmap",i?.field&&(p.xAccessor=i.field),s?.field&&(p.yAccessor=s.field),n?.field&&(p.valueAccessor=n.field,delete p.colorBy),i?.axis?.title&&(p.xLabel=i.axis.title),s?.axis?.title&&(p.yLabel=s.axis.title),u&&(p.data=u);break;case"arc":a.innerRadius&&a.innerRadius>0?(y="DonutChart",p.innerRadius=a.innerRadius):y="PieChart",l?.field?p.valueAccessor=l.field:s?.field&&(p.valueAccessor=f?"value":s.field),n?.field&&(p.categoryAccessor=n.field),i?.field&&!l?.field&&(p.categoryAccessor=i.field),u&&(p.data=u);break;case"tick":y="DotPlot",ra(i?.type)?(p.categoryAccessor=i.field,s?.field&&(p.valueAccessor=f?"value":s.field),i?.axis?.title&&(p.categoryLabel=i.axis.title),s?.axis?.title&&(p.valueLabel=s.axis.title)):ra(s?.type)?(p.categoryAccessor=s.field,i?.field&&(p.valueAccessor=m?"value":i.field),p.orientation="horizontal",s?.axis?.title&&(p.categoryLabel=s.axis.title),i?.axis?.title&&(p.valueLabel=i.axis.title)):(i?.field&&(p.categoryAccessor=i.field),s?.field&&(p.valueAccessor=f?"value":s.field)),u&&(p.data=u);break;default:t.push(`Unsupported mark type "${r}". Defaulting to Scatterplot.`),y="Scatterplot",la(i,s,p,m,f),u&&(p.data=u)}return da(y,p,t)}function la(e,t,r,a,o){e?.field&&(r.xAccessor=a?"value":e.field),t?.field&&(r.yAccessor=o?"value":t.field),e?.axis?.title&&(r.xLabel=e.axis.title),t?.axis?.title&&(r.yLabel=t.axis.title)}function da(e,t,r){const a={component:e,props:t,version:"1",createdAt:(new Date).toISOString()};if(r.length>0){a.warnings=r;for(const e of r)console.warn("[semiotic/fromVegaLite] "+e)}return a}var ua=class{constructor(e){if(this._capacity=e,this.head=0,this._size=0,1>e)throw Error("RingBuffer capacity must be at least 1");this.buffer=Array(e)}push(e){let t;return this._size===this._capacity?t=this.buffer[this.head]:this._size++,this.buffer[this.head]=e,this.head=(this.head+1)%this._capacity,t}pushMany(e){const t=[];for(const r of e){const e=this.push(r);void 0!==e&&t.push(e)}return t}get(e){if(e>=0&&this._size>e)return this.buffer[(this.head-this._size+e+this._capacity)%this._capacity]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let e=0;return{next:()=>this._size>e?{done:!1,value:this.get(e++)}:{done:!0,value:void 0}}}forEach(e){const t=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;this._size>r;r++)e(this.buffer[(t+r)%this._capacity],r)}toArray(){const e=Array(this._size),t=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;this._size>r;r++)e[r]=this.buffer[(t+r)%this._capacity];return e}resize(e){if(1>e)throw Error("RingBuffer capacity must be at least 1");const t=this.toArray();let r=0,a=[];t.length>e&&(r=t.length-e,a=t.slice(0,r)),this._capacity=e,this.buffer=Array(e),this.head=0,this._size=0;for(let e=r;t.length>e;e++)this.push(t[e]);return a}update(e,t){const r=[],a=(this.head-this._size+this._capacity)%this._capacity;for(let o=0;this._size>o;o++){const i=(a+o)%this._capacity,s=this.buffer[i];if(e(s)){let e;e="object"!=typeof s||null===s?s:Array.isArray(s)?[...s]:{...s},r.push(e),this.buffer[i]=t(s)}}return r}remove(e){const t=[],r=[];if(this.forEach(a=>{e(a)?r.push(a):t.push(a)}),0===r.length)return r;this.buffer=Array(this._capacity),this.head=0,this._size=0;for(const e of t)this.push(e);return r}clear(){this.buffer=Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}},pa=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(e){Number.isFinite(e)&&(this._min>e&&(this._min=e),e>this._max&&(this._max=e))}evict(e){e!==this._min&&e!==this._max||(this._dirty=!0)}recalculate(e,t){this._min=1/0,this._max=-1/0;for(const r of e){const e=t?t(r):r;Number.isFinite(e)&&(this._min>e&&(this._min=e),e>this._max&&(this._max=e))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}},ha=require("react/jsx-runtime"),ma={background:"var(--semiotic-tooltip-bg, rgba(0, 0, 0, 0.85))",color:"var(--semiotic-tooltip-text, white)",padding:"8px 12px",borderRadius:"var(--semiotic-tooltip-radius, 6px)",fontSize:"var(--semiotic-tooltip-font-size, 14px)",fontFamily:"var(--semiotic-font-family, inherit)",lineHeight:"1.5",boxShadow:"var(--semiotic-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, 0.15))",pointerEvents:"none",maxWidth:"300px",wordWrap:"break-word"};function fa(e,t){return"function"==typeof t?t(e):e[t]}function ya(e,t){if(t)return t(e);if(null==e)return"";if("number"==typeof e){if(!Number.isFinite(e))return e+"";const t=Number.isInteger(e)?e:parseFloat(e.toPrecision(6));return Math.abs(t)>9999?t.toLocaleString():t+""}return e instanceof Date?e.toLocaleDateString():"object"==typeof e&&null!==e?void 0!==e.id?e.id+"":void 0!==e.name?e.name+"":JSON.stringify(e):e+""}function ga(e={}){const{fields:t,title:r,format:a,style:o={},className:i=""}=e;return e=>{if(!e||"object"!=typeof e)return null;let s;const n=[];if(r){const t=fa(e,r);s=ya(t,a)}if(t&&t.length>0)t.forEach(t=>{let r,o,i;"string"==typeof t?(r=t,o=t,i=a):(r=t.label,o=t.accessor||t.key||"",i=t.format||a);const s=fa(e,o);n.push({label:r,value:ya(s,i)})});else if(!r){const t=["value","y","name","id","label"];for(const r of t)if(void 0!==e[r]){s=ya(e[r],a);break}if(!s){const t=Object.keys(e).filter(e=>!e.startsWith("_"));t.length>0&&(s=ya(e[t[0]],a))}}const c={...ma,...o};return(0,ha.jsxs)("div",{className:("semiotic-tooltip "+i).trim(),style:c,children:[s&&(0,ha.jsx)("div",{style:{fontWeight:n.length>0?"bold":"normal"},children:s}),n.map((e,t)=>(0,ha.jsxs)("div",{style:{marginTop:0===t&&s?"4px":0},children:[e.label&&(0,ha.jsxs)("span",{children:[e.label,": "]}),e.value]},t))]})}}function ba(){return e=>{const t=e.allSeries;if(!t||0===t.length)return(0,ha.jsx)("div",{className:"semiotic-tooltip",style:ma,children:(0,ha.jsx)("div",{children:ya(e.data?.value??e.data?.y)})});const r=e.xValue??e.data?.time??e.data?.x;return(0,ha.jsxs)("div",{className:"semiotic-tooltip",style:ma,children:[null!=r&&(0,ha.jsx)("div",{style:{fontWeight:600,marginBottom:4,fontSize:"0.9em",borderBottom:"1px solid var(--semiotic-border, #eee)",paddingBottom:4},children:ya(r)}),t.map((e,t)=>(0,ha.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"1px 0"},children:[(0,ha.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,flexShrink:0}}),(0,ha.jsx)("span",{style:{flex:1,fontSize:"0.85em"},children:e.group}),(0,ha.jsx)("span",{style:{fontWeight:500,fontSize:"0.85em"},children:ya(e.value)})]},t))]})}}function va(e){if(!0!==e){if("function"==typeof e){const t=e;return e=>{let r=Array.isArray(a=!0===e?.__semioticHoverData||e&&void 0!==e.data&&"number"==typeof e.x&&"number"==typeof e.y&&e&&("node"===e.type||"edge"===e.type||void 0!==e.nodeOrEdge||void 0!==e.allSeries||void 0!==e.stats||void 0!==e.__chartType)?e.data??{}:e)?a[0]:a;var a;("node"===e?.nodeOrEdge&&"number"==typeof r?.x0&&"number"==typeof r?.x1||"edge"===e?.nodeOrEdge&&"number"==typeof r?.sankeyWidth)&&r.data&&"object"==typeof r.data&&(r=r.data);const o=t(r);return null==o?null:(0,ha.jsx)("div",{className:"semiotic-tooltip",style:ma,children:o})}}return!1!==e&&void 0!==e&&("object"==typeof e&&null!==e&&("fields"in e||"title"in e)?ga(e):ga())}}function wa(e=240){const t=360-e,r=180+t/2,a=r*Math.PI/180;return{sweepRad:e*Math.PI/180,gapDeg:t,startAngleDeg:r,startAngleRad:a,offsetRad:-Math.PI/2+a}}function xa(e,t,r,a,o){const i=r-t||1;return o+(Math.max(t,Math.min(r,e))-t)/i*a}function Sa(e=240){const{sweepRad:t,offsetRad:r}=wa(e),a=[[Math.cos(r),Math.sin(r)],[Math.cos(r+t),Math.sin(r+t)],[0,0]];for(let e=0;2*Math.PI>e;e+=Math.PI/2)((e-r)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)>t+.001||a.push([Math.cos(e),Math.sin(e)]);const o=a.map(e=>e[0]),i=a.map(e=>e[1]),[s,n]=ta(o),[c,l]=ta(i);return{minX:s,maxX:n,minY:c,maxY:l,width:n-s,height:l-c,cx:(s+n)/2,cy:(c+l)/2}}var Aa=c(require("react")),ka=require("react");function Ca(e,t){if("function"==typeof e.addEventListener)return e.addEventListener("change",t),()=>e.removeEventListener("change",t);const r=e;return r.addListener(t),()=>r.removeListener(t)}function $a(e){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(e).matches}function Pa(){const[e,t]=(0,ka.useState)(()=>$a("(prefers-reduced-motion: reduce)"));return(0,ka.useEffect)(()=>{if("undefined"==typeof window||!window.matchMedia)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)");return t(e.matches),Ca(e,e=>t(e.matches))},[]),e}function Ra(){const[e,t]=(0,ka.useState)(()=>$a("(forced-colors: active)"));return(0,ka.useEffect)(()=>{if("undefined"==typeof window||!window.matchMedia)return;const e=window.matchMedia("(forced-colors: active)");return t(e.matches),Ca(e,e=>t(e.matches))},[]),e}var Ma=require("react/jsx-runtime"),La=Aa.createContext(void 0),Fa="undefined"==typeof window?Aa.useEffect:Aa.useLayoutEffect;function ja(e){if("string"!=typeof e)return e;if("light"===e||"dark"===e||"high-contrast"===e)return e;return $(e)||(void 0!==console&&console.warn(`[ThemeProvider] Unknown theme preset "${e}". Falling back to light theme.`),"light")}function Ta({theme:e}){const t=w(e=>e.setTheme),r=w(e=>e.theme),a=Aa.useRef(r);a.current=r;const o=Aa.useRef(null);Aa.useEffect(()=>{if(void 0!==e)return;if("undefined"==typeof window||!window.matchMedia)return;const r=window.matchMedia("(forced-colors: active)");return r.matches&&(o.current=a.current===g?f:a.current,t("high-contrast")),Ca(r,e=>{e.matches?(o.current=a.current===g?o.current??f:a.current,t("high-contrast")):(function(e,t){e(t===f?"light":t===y?"dark":t===g?"high-contrast":t)}(t,o.current??f),o.current=null)})},[e,t]);const i=Aa.useRef(!1);return Fa(()=>{i.current?void 0!==e&&t(ja(e)):i.current=!0},[e,t]),null}function za({children:e}){const t=w(e=>e.theme),r={position:"relative","--semiotic-bg":t.colors.background,"--semiotic-text":t.colors.text,"--semiotic-text-secondary":t.colors.textSecondary,"--semiotic-grid":t.colors.grid,"--semiotic-border":t.colors.border,"--semiotic-cell-border":t.colors.cellBorder||t.colors.border,"--semiotic-primary":t.colors.primary,"--semiotic-font-family":t.typography.fontFamily,...t.colors.focus?{"--semiotic-focus":t.colors.focus}:{},...t.tooltip?.background?{"--semiotic-tooltip-bg":t.tooltip.background}:{},...t.tooltip?.text?{"--semiotic-tooltip-text":t.tooltip.text}:{},...t.tooltip?.borderRadius?{"--semiotic-tooltip-radius":t.tooltip.borderRadius}:{},...t.tooltip?.fontSize?{"--semiotic-tooltip-font-size":t.tooltip.fontSize}:{},...t.tooltip?.shadow?{"--semiotic-tooltip-shadow":t.tooltip.shadow}:{},...t.borderRadius?{"--semiotic-border-radius":t.borderRadius}:{},...t.colors.selection?{"--semiotic-selection-color":t.colors.selection}:{},...null!=t.colors.selectionOpacity?{"--semiotic-selection-opacity":t.colors.selectionOpacity+""}:{},...t.colors.diverging?{"--semiotic-diverging":t.colors.diverging}:{},...t.colors.annotation?{"--semiotic-annotation-color":t.colors.annotation}:{},...null!=t.typography.legendSize?{"--semiotic-legend-font-size":t.typography.legendSize+"px"}:{},...null!=t.typography.titleFontSize?{"--semiotic-title-font-size":t.typography.titleFontSize+"px"}:{},...null!=t.typography.tickFontFamily?{"--semiotic-tick-font-family":t.typography.tickFontFamily}:{},...null!=t.typography.tickSize?{"--semiotic-tick-font-size":t.typography.tickSize+"px"}:{},...null!=t.typography.labelSize?{"--semiotic-axis-label-font-size":t.typography.labelSize+"px"}:{},"--semiotic-secondary":t.colors.secondary||t.colors.primary,"--semiotic-surface":t.colors.surface||t.colors.background,...t.colors.success?{"--semiotic-success":t.colors.success}:{},...t.colors.danger?{"--semiotic-danger":t.colors.danger}:{},...t.colors.warning?{"--semiotic-warning":t.colors.warning}:{},...t.colors.error?{"--semiotic-error":t.colors.error}:{},...t.colors.info?{"--semiotic-info":t.colors.info}:{}},a=Aa.useContext(La),o={};return a&&(o["data-semiotic-theme"]=a),(0,Ma.jsx)("div",{style:r,...o,children:e})}function Ba({theme:e,children:t}){const r="string"==typeof e&&$(e)?e:void 0,a=Aa.useMemo(()=>function(e){return void 0!==e?b(f,ja(e)):"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(forced-colors: active)").matches?g:f}(e),[e]);return(0,Ma.jsx)(v,{initialState:{theme:a},children:(0,Ma.jsxs)(La.Provider,{value:r,children:[(0,Ma.jsx)(Ta,{theme:e}),(0,Ma.jsx)(za,{children:t})]})})}function Na(){return w(e=>e.theme)}
1
+ var e,t=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,s=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of n(t))i.call(e,c)||c===r||a(e,c,{get:()=>t[c],enumerable:!(s=o(t,c))||s.enumerable});return e},c=(e,o,n)=>(n=null!=e?t(r(e)):{},s(!o&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),l={};((e,t)=>{for(var o in t)a(e,o,{get:t[o],enumerable:!0})})(l,{CARBON_ALERT:()=>C,CARBON_CATEGORICAL_14:()=>S,COLOR_BLIND_SAFE_CATEGORICAL:()=>m,DARK_THEME:()=>g,HIGH_CONTRAST_THEME:()=>b,IncrementalExtent:()=>Ao,LIGHT_THEME:()=>h,MultiPointTooltip:()=>Po,RingBuffer:()=>wo,THEME_PRESETS:()=>$,ThemeProvider:()=>Uo,accessibilityCaveats:()=>it,adaptiveTimeTicks:()=>I,auditAccessibility:()=>rt,auditMobileVisualization:()=>$t,auditObservedScene:()=>po,buildNavigationTree:()=>va,buildReaderGrounding:()=>Ia,communicativeActForIntent:()=>na,composeStyleRules:()=>Y,computeArcBoundingBox:()=>No,configToJSX:()=>Ya,copyConfig:()=>Va,countNodes:()=>wa,createHatchPattern:()=>E,darkenColor:()=>z,describeChart:()=>ha,deserializeSelections:()=>Xa,diagnoseConfig:()=>Ve,exportChart:()=>Ja,flattenVisible:()=>xa,formatAccessibilityAudit:()=>lt,formatMobileVisualizationAudit:()=>Pt,fromConfig:()=>qa,fromURL:()=>Wa,fromVegaLite:()=>fo,getHitRadius:()=>za,hatchFillId:()=>M,hatchFillKey:()=>O,isHatchFill:()=>_,lightenColor:()=>B,makeNodeRuleContext:()=>G,makeRuleValueResolver:()=>D,makeStyleRuleStyleFn:()=>K,makeXYRuleContext:()=>H,matchesThreshold:()=>U,mobileVisualizationCaveats:()=>Rt,normalizeTooltip:()=>Ro,resolveCommunicativeAct:()=>ra,resolveResponsiveRules:()=>yt,resolveStyleRules:()=>V,resolveThemePreset:()=>k,responsiveRuleMatches:()=>ut,ruleMatches:()=>W,serializeSelections:()=>Ka,smartTickFormat:()=>j,sweepToAngles:()=>To,themeToCSS:()=>w,themeToTokens:()=>A,toConfig:()=>Ga,toURL:()=>Ua,unwrapDatum:()=>oe,useHighContrast:()=>_o,useReducedMotion:()=>Eo,useTheme:()=>Wo,validateProps:()=>ae,valueToAngle:()=>Lo}),module.exports=(e=l,s(a({},"__esModule",{value:!0}),e));var p=require("react"),u=require("react/jsx-runtime");function y(e,t){const a=new Set;let o={...e(function(e){const t=e(o);if(function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}(t)){o={...o,...t};for(const e of a)e()}}),...t??{}};return{getState:()=>o,subscribe:function(e){return a.add(e),()=>{a.delete(e)}}}}function d(e){if(!e.accessibility)return e;let t=e;if(e.accessibility.colorBlindSafe&&(t={...t,colors:{...t.colors,categorical:m}}),e.accessibility.highContrast){const e="dark"===t.mode;t={...t,colors:{...t.colors,text:e?"#ffffff":"#000000",textSecondary:e?"#cccccc":"#333333",grid:e?"#666666":"#999999",border:e?"#888888":"#000000"}}}return t}var m=["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9","#D55E00","#F0E442","#000000"],h={mode:"light",colors:{primary:"#00a2ce",secondary:"#6c757d",categorical:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],sequential:"blues",diverging:"RdBu",background:"transparent",surface:"#ffffff",text:"#333",textSecondary:"#666",grid:"#e0e0e0",border:"#ccc",selection:"#00a2ce",selectionOpacity:.15,success:"#2ca02c",danger:"#d62728",warning:"#f0ad4e",error:"#b4181b",info:"#00a2ce"},typography:{fontFamily:"sans-serif",titleSize:16,labelSize:12,tickSize:12}},g={mode:"dark",colors:{primary:"#4fc3f7",secondary:"#90a4ae",categorical:["#4fc3f7","#ffb74d","#81c784","#ef5350","#ba68c8","#a1887f","#f06292","#90a4ae","#dce775","#4dd0e1"],sequential:"blues",diverging:"RdBu",background:"#1a1a2e",surface:"#252540",text:"#e0e0e0",textSecondary:"#aaa",grid:"#333",border:"#555",selection:"#4fc3f7",selectionOpacity:.15,success:"#81c784",danger:"#ef5350",warning:"#ffb74d",error:"#d84848",info:"#4fc3f7"},typography:{fontFamily:"sans-serif",titleSize:16,labelSize:12,tickSize:12}},b={mode:"light",colors:{primary:"#0000cc",secondary:"#333333",categorical:m,sequential:"blues",diverging:"RdBu",background:"#ffffff",surface:"#ffffff",text:"#000000",textSecondary:"#333333",grid:"#999999",border:"#000000",focus:"#0000cc",selection:"#0000cc",selectionOpacity:.1,success:"#006400",danger:"#cc0000",warning:"#b15a00",error:"#8b0000",info:"#0000cc"},typography:{fontFamily:"system-ui, sans-serif",titleSize:18,labelSize:14,tickSize:12},tooltip:{background:"#000000",text:"#ffffff",borderRadius:"4px",fontSize:"14px",shadow:"0 2px 8px rgba(0, 0, 0, 0.3)"},borderRadius:"4px"};function f(e,t){if("light"===t)return h;if("dark"===t)return g;if("high-contrast"===t)return b;if("string"==typeof t)return void 0!==console&&console.warn(`[ThemeStore] Unknown theme preset "${t}". Keeping current theme.`),e;if(t.mode&&"auto"!==t.mode){const e="dark"===t.mode?g:h;return d({...e,...t,colors:{...e.colors,...t.colors||{}},typography:{...e.typography,...t.typography||{}}})}return d({...e,...t,colors:{...e.colors,...t.colors||{}},typography:{...e.typography,...t.typography||{}}})}var[v,x]=function(e){let t=null;const a=()=>(t||(t=(0,p.createContext)(null)),t),o=y(e);return[function({children:t,initialState:o}){const n=(0,p.useRef)(o),r=(0,p.useMemo)(()=>y(e,n.current),[]),i=a();return(0,u.jsx)(i.Provider,{value:r,children:t})},(e,t)=>{const n=a(),r=(0,p.useContext)(n)??o,i=(0,p.useRef)(e);i.current=e;const s=(0,p.useRef)({hasValue:!1,value:void 0}),c=(0,p.useCallback)(()=>{const e=i.current(r.getState()),a=s.current;return a.hasValue&&t&&t(a.value,e)?a.value:(s.current={hasValue:!0,value:e},e)},[r,t]),l=(0,p.useCallback)(()=>i.current(r.getState()),[r]);return(0,p.useSyncExternalStore)(r.subscribe,c,l)}]}(e=>({theme:h,setTheme(t){e(e=>({theme:f(e.theme,t)}))}}));function w(e,t=":root"){const a=[];return a.push(` --semiotic-bg: ${e.colors.background};`),a.push(` --semiotic-text: ${e.colors.text};`),a.push(` --semiotic-text-secondary: ${e.colors.textSecondary};`),a.push(` --semiotic-grid: ${e.colors.grid};`),a.push(` --semiotic-border: ${e.colors.border};`),a.push(` --semiotic-primary: ${e.colors.primary};`),a.push(` --semiotic-font-family: ${e.typography.fontFamily};`),e.colors.focus&&a.push(` --semiotic-focus: ${e.colors.focus};`),e.colors.selection&&a.push(` --semiotic-selection-color: ${e.colors.selection};`),null!=e.colors.selectionOpacity&&a.push(` --semiotic-selection-opacity: ${e.colors.selectionOpacity};`),e.colors.diverging&&a.push(` --semiotic-diverging: ${e.colors.diverging};`),e.tooltip?.background&&a.push(` --semiotic-tooltip-bg: ${e.tooltip.background};`),e.tooltip?.text&&a.push(` --semiotic-tooltip-text: ${e.tooltip.text};`),e.tooltip?.borderRadius&&a.push(` --semiotic-tooltip-radius: ${e.tooltip.borderRadius};`),e.tooltip?.fontSize&&a.push(` --semiotic-tooltip-font-size: ${e.tooltip.fontSize};`),e.tooltip?.shadow&&a.push(` --semiotic-tooltip-shadow: ${e.tooltip.shadow};`),e.borderRadius&&a.push(` --semiotic-border-radius: ${e.borderRadius};`),e.colors.annotation&&a.push(` --semiotic-annotation-color: ${e.colors.annotation};`),null!=e.typography.legendSize&&a.push(` --semiotic-legend-font-size: ${e.typography.legendSize}px;`),null!=e.typography.titleFontSize&&a.push(` --semiotic-title-font-size: ${e.typography.titleFontSize}px;`),null!=e.typography.tickFontFamily&&a.push(` --semiotic-tick-font-family: ${e.typography.tickFontFamily};`),null!=e.typography.tickSize&&a.push(` --semiotic-tick-font-size: ${e.typography.tickSize}px;`),null!=e.typography.labelSize&&a.push(` --semiotic-axis-label-font-size: ${e.typography.labelSize}px;`),a.push(` --semiotic-secondary: ${e.colors.secondary||e.colors.primary};`),a.push(` --semiotic-surface: ${e.colors.surface||e.colors.background};`),e.colors.success&&a.push(` --semiotic-success: ${e.colors.success};`),e.colors.danger&&a.push(` --semiotic-danger: ${e.colors.danger};`),e.colors.warning&&a.push(` --semiotic-warning: ${e.colors.warning};`),e.colors.error&&a.push(` --semiotic-error: ${e.colors.error};`),e.colors.info&&a.push(` --semiotic-info: ${e.colors.info};`),`${t} {\n${a.join("\n")}\n}`}function A(e){return{semiotic:{bg:{$value:e.colors.background,$type:"color"},text:{$value:e.colors.text,$type:"color"},"text-secondary":{$value:e.colors.textSecondary,$type:"color"},grid:{$value:e.colors.grid,$type:"color"},border:{$value:e.colors.border,$type:"color"},primary:{$value:e.colors.primary,$type:"color"},focus:{$value:e.colors.focus||e.colors.primary,$type:"color"},"font-family":{$value:e.typography.fontFamily,$type:"fontFamily"},"border-radius":{$value:e.borderRadius||"8px",$type:"dimension"},tooltip:{bg:{$value:e.tooltip?.background||e.colors.background,$type:"color"},text:{$value:e.tooltip?.text||e.colors.text,$type:"color"},radius:{$value:e.tooltip?.borderRadius||"6px",$type:"dimension"},"font-size":{$value:e.tooltip?.fontSize||"14px",$type:"dimension"},shadow:{$value:e.tooltip?.shadow||"0 2px 8px rgba(0,0,0,0.15)",$type:"shadow"}},selection:{color:{$value:e.colors.selection||e.colors.primary,$type:"color"},opacity:{$value:e.colors.selectionOpacity??.2,$type:"number"}},categorical:{$value:e.colors.categorical,$type:"color",$description:"Categorical color palette"},sequential:{$value:e.colors.sequential,$type:"string",$description:"d3-scale-chromatic sequential scheme name"},...e.colors.diverging?{diverging:{$value:e.colors.diverging,$type:"string",$description:"d3-scale-chromatic diverging scheme name"}}:{},...e.colors.annotation?{"annotation-color":{$value:e.colors.annotation,$type:"color"}}:{},...null!=e.typography.legendSize?{"legend-font-size":{$value:e.typography.legendSize+"px",$type:"dimension"}}:{},...null!=e.typography.titleFontSize?{"title-font-size":{$value:e.typography.titleFontSize+"px",$type:"dimension"}}:{},...null!=e.typography.tickFontFamily?{"tick-font-family":{$value:e.typography.tickFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.tickSize?{"tick-font-size":{$value:e.typography.tickSize+"px",$type:"dimension"}}:{},...null!=e.typography.labelSize?{"axis-label-font-size":{$value:e.typography.labelSize+"px",$type:"dimension"}}:{},secondary:{$value:e.colors.secondary||e.colors.primary,$type:"color"},surface:{$value:e.colors.surface||e.colors.background,$type:"color"},...e.colors.success?{success:{$value:e.colors.success,$type:"color"}}:{},...e.colors.danger?{danger:{$value:e.colors.danger,$type:"color"}}:{},...e.colors.warning?{warning:{$value:e.colors.warning,$type:"color"}}:{},...e.colors.error?{error:{$value:e.colors.error,$type:"color"}}:{},...e.colors.info?{info:{$value:e.colors.info,$type:"color"}}:{}}}}var S=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"],C={danger:"#da1e28",warning:"#f1c21b",success:"#24a148",info:"#0043ce"},$={light:h,dark:g,"high-contrast":b,pastels:{mode:"light",colors:{primary:"#c9a0dc",secondary:"#b8a8c8",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#fdf6f0",surface:"#fff5ee",text:"#4a3728",textSecondary:"#7a644a",grid:"#e8d5c4",border:"#e8d5c4",focus:"#8a5fae",annotation:"#8a5fae",success:"#9ad4a3",danger:"#e8869a",warning:"#f0c888",error:"#c86070",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#fff5ee",text:"#4a3728",borderRadius:"8px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"10px"},"pastels-dark":{mode:"dark",colors:{primary:"#c9a0dc",secondary:"#a899c0",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#1a1525",surface:"#251e35",text:"#e8ddf0",textSecondary:"#a899c0",grid:"#3d3455",border:"#3d3455",focus:"#c9a0dc",annotation:"#c9a0dc",success:"#88d4ab",danger:"#f0a0c0",warning:"#f0c888",error:"#e87690",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#251e35",text:"#e8ddf0",borderRadius:"8px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"10px"},"bi-tool":{mode:"light",colors:{primary:"#2563eb",secondary:"#6b7280",categorical:["#2563eb","#0d9488","#ea580c","#6b7280"],sequential:"blues",background:"#f5f6f8",surface:"#ffffff",text:"#2c3e50",textSecondary:"#64717f",grid:"#d8dce3",border:"#d8dce3",focus:"#2563eb",annotation:"#2563eb",success:"#10b981",danger:"#ef4444",warning:"#f59e0b",error:"#dc2626",info:"#2563eb"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2c3e50",borderRadius:"6px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"8px"},"bi-tool-dark":{mode:"dark",colors:{primary:"#3b82f6",secondary:"#9ca3af",categorical:["#3b82f6","#14b8a6","#f97316","#9ca3af"],sequential:"blues",background:"#111827",surface:"#1f2937",text:"#f3f4f6",textSecondary:"#9ca3af",grid:"#374151",border:"#374151",focus:"#3b82f6",annotation:"#3b82f6",success:"#34d399",danger:"#f87171",warning:"#fbbf24",error:"#ef4444",info:"#60a5fa"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f2937",text:"#f3f4f6",borderRadius:"6px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"8px"},italian:{mode:"light",colors:{primary:"#cc0000",secondary:"#666666",categorical:["#cc0000","#333333","#c8a415","#4682b4"],sequential:"reds",background:"#fafafa",surface:"#ffffff",text:"#1a1a1a",textSecondary:"#666666",grid:"#e0e0e0",border:"#e0e0e0",focus:"#cc0000",annotation:"#cc0000",success:"#556b2f",danger:"#cc0000",warning:"#c8a415",error:"#8b0000",info:"#4682b4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#1a1a1a",borderRadius:"2px",shadow:"0 2px 4px rgba(0, 0, 0, 0.15)"},borderRadius:"2px"},"italian-dark":{mode:"dark",colors:{primary:"#ff3333",secondary:"#aaaaaa",categorical:["#ff3333","#aaaaaa","#d4a843","#6aa4d4"],sequential:"reds",background:"#0a0a0a",surface:"#1a1a1a",text:"#f5f5f5",textSecondary:"#aaaaaa",grid:"#333333",border:"#333333",focus:"#ff3333",annotation:"#ff3333",success:"#7a8b5a",danger:"#ff3333",warning:"#d4a843",error:"#cc0000",info:"#6aa4d4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1a1a1a",text:"#f5f5f5",borderRadius:"2px",shadow:"0 2px 8px rgba(0, 0, 0, 0.5)"},borderRadius:"2px"},tufte:{mode:"light",colors:{primary:"#8b0000",secondary:"#555555",categorical:["#8b4513","#556b2f","#4a5568","#800020"],sequential:"oranges",background:"#fffff8",surface:"#fffff8",text:"#111111",textSecondary:"#555555",grid:"#e0ddd0",border:"#e0ddd0",focus:"#8b0000",annotation:"#8b0000",success:"#556b2f",danger:"#8b0000",warning:"#b88700",error:"#6b0000",info:"#4a5568"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#fffff8",text:"#111111",borderRadius:"2px",shadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},borderRadius:"0px"},"tufte-dark":{mode:"dark",colors:{primary:"#c05050",secondary:"#a09880",categorical:["#c08050","#7a8b5a","#8090a0","#a05060"],sequential:"oranges",background:"#1c1b18",surface:"#262520",text:"#e8e4d8",textSecondary:"#a09880",grid:"#3d3c35",border:"#3d3c35",focus:"#c05050",annotation:"#d06a6a",success:"#7a8b5a",danger:"#c05050",warning:"#c8a060",error:"#a04040",info:"#8090a0"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262520",text:"#e8e4d8",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.4)"},borderRadius:"0px"},journalist:{mode:"light",colors:{primary:"#e45050",secondary:"#666666",categorical:["#3a86c8","#e45050","#d4a843","#888888"],sequential:"blues",background:"#ffffff",surface:"#f8f8f8",text:"#222222",textSecondary:"#666666",grid:"#d4d4d4",border:"#d4d4d4",focus:"#e45050",annotation:"#c63b3b",success:"#2d7a3d",danger:"#c8303a",warning:"#d4a843",error:"#a02028",info:"#3a86c8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:18,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#f8f8f8",text:"#222222",borderRadius:"4px",shadow:"0 2px 6px rgba(0, 0, 0, 0.12)"},borderRadius:"4px"},"journalist-dark":{mode:"dark",colors:{primary:"#ff6b6b",secondary:"#a0a0a0",categorical:["#5a9fd8","#ff6b6b","#e0c060","#aaaaaa"],sequential:"blues",background:"#141414",surface:"#1e1e1e",text:"#ededed",textSecondary:"#a0a0a0",grid:"#383838",border:"#383838",focus:"#ff6b6b",annotation:"#ff6b6b",success:"#6fba78",danger:"#ff6b6b",warning:"#e0c060",error:"#d04040",info:"#5a9fd8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1e1e1e",text:"#ededed",borderRadius:"4px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"4px"},playful:{mode:"light",colors:{primary:"#8b5cf6",secondary:"#7c5a9e",categorical:["#8b5cf6","#ec4899","#06b6d4","#84cc16"],sequential:"viridis",background:"#fdf8ff",surface:"#ffffff",text:"#2d1b4e",textSecondary:"#7c5a9e",grid:"#e8d0f8",border:"#e8d0f8",focus:"#8b5cf6",annotation:"#7a47e8",success:"#10d870",danger:"#ff4b6e",warning:"#ffaa33",error:"#e11d48",info:"#06b6d4"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2d1b4e",borderRadius:"12px",shadow:"0 4px 12px rgba(139, 92, 246, 0.15)"},borderRadius:"12px"},"playful-dark":{mode:"dark",colors:{primary:"#a78bfa",secondary:"#b8a0d8",categorical:["#a78bfa","#f472b6","#22d3ee","#a3e635"],sequential:"viridis",background:"#150a28",surface:"#1f1138",text:"#f0e8ff",textSecondary:"#b8a0d8",grid:"#3a2560",border:"#3a2560",focus:"#a78bfa",annotation:"#a78bfa",success:"#4ade80",danger:"#fb7185",warning:"#fbbf24",error:"#f43f5e",info:"#22d3ee"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f1138",text:"#f0e8ff",borderRadius:"12px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"12px"},carbon:{mode:"light",colors:{primary:"#0f62fe",secondary:"#525252",categorical:["#6929c4","#1192e8","#005d5d","#9f1853"],sequential:"blues",diverging:"RdBu",background:"#ffffff",surface:"#ffffff",text:"#161616",textSecondary:"#525252",grid:"#e0e0e0",border:"#e0e0e0",focus:"#0f62fe",annotation:"#0f62fe",success:"#24a148",danger:"#da1e28",warning:"#f1c21b",error:"#a2191f",info:"#0043ce"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#161616",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.2)"},borderRadius:"0px"},"carbon-dark":{mode:"dark",colors:{primary:"#4589ff",secondary:"#a8a8a8",categorical:["#a56eff","#33b1ff","#08bdba","#ff7eb6"],sequential:"blues",diverging:"RdBu",background:"#161616",surface:"#262626",text:"#f4f4f4",textSecondary:"#a8a8a8",grid:"#393939",border:"#393939",focus:"#4589ff",annotation:"#4589ff",success:"#42be65",danger:"#fa4d56",warning:"#f1c21b",error:"#da1e28",info:"#4589ff"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262626",text:"#f4f4f4",borderRadius:"2px",shadow:"0 4px 12px rgba(0, 0, 0, 0.5)"},borderRadius:"0px"}};function k(e){return $[e]}function j(e){if(null==e)return"";if("number"!=typeof e)return e+"";if(!isFinite(e))return e+"";if(0===e)return"0";const t=parseFloat(e.toPrecision(12)),a=Math.abs(t);return 1e9>a?1e6>a?1e4>a?Number.isInteger(t)?t+"":parseFloat(t.toPrecision(6))+"":parseFloat((t/1e3).toPrecision(3))+"K":parseFloat((t/1e6).toPrecision(3))+"M":parseFloat((t/1e9).toPrecision(3))+"B"}c(require("react"));var P=6e4,R=60*P,T=24*R;function L(e){return 10>e?"0"+e:e+""}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(e){let t,a=e;return(o,n,r)=>{const i=o instanceof Date?o:new Date(o);e||!r||2>r.length||r===t||(t=r,a=function(e){if(2>e.length)return"days";const t=[];for(let a=1;e.length>a;a++)t.push(e[a]-e[a-1]);t.sort((e,t)=>e-t);const a=t[Math.floor(t.length/2)];return 2*P>a?"seconds":2*R>a?"minutes":2*T>a?"hours":60*T>a?"days":400*T>a?"months":"years"}(r));const s=a||"days";return null!=n&&0!==n&&r&&0!==r.length?function(e,t,a){const o=e.getUTCFullYear()!==t.getUTCFullYear(),n=o||e.getUTCMonth()!==t.getUTCMonth(),r=n||e.getUTCDate()!==t.getUTCDate(),i=r||e.getUTCHours()!==t.getUTCHours(),s=i||e.getUTCMinutes()!==t.getUTCMinutes(),c=N[e.getUTCMonth()],l=e.getUTCDate(),p=e.getUTCFullYear(),u=L(e.getUTCHours()),y=L(e.getUTCMinutes()),d=L(e.getUTCSeconds());switch(a){case"seconds":return o?`${c} ${l}, ${p} ${u}:${y}:${d}`:r?`${c} ${l} ${u}:${y}:${d}`:i?`${u}:${y}:${d}`:s?`${y}:${d}`:":"+d;case"minutes":return o?`${c} ${l}, ${p} ${u}:${y}`:r?`${c} ${l} ${u}:${y}`:i?`${u}:${y}`:":"+y;case"hours":return o?`${c} ${l}, ${p} ${u}:00`:n?`${c} ${l} ${u}:${y}`:r?`${c} ${l} ${u}:00`:u+":00";case"days":return o?`${c} ${l}, ${p}`:n?`${c} ${l}`:""+l;case"months":return o?`${c} ${p}`:""+c;case"years":return""+p}}(i,new Date(r[n-1]),s):function(e,t){const a=N[e.getUTCMonth()],o=e.getUTCDate(),n=e.getUTCFullYear(),r=L(e.getUTCHours()),i=L(e.getUTCMinutes()),s=L(e.getUTCSeconds());switch(t){case"seconds":return`${a} ${o}, ${n} ${r}:${i}:${s}`;case"minutes":case"hours":return`${a} ${o}, ${n} ${r}:${i}`;case"days":return`${a} ${o}, ${n}`;case"months":return`${a} ${n}`;case"years":return""+n}}(i,s)}}function z(e,t=.5){const a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!a)return e;const o=Math.round(parseInt(a[1],16)*(1-t)),n=Math.round(parseInt(a[2],16)*(1-t)),r=Math.round(parseInt(a[3],16)*(1-t));return`#${o.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}function B(e,t=.5){const a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!a)return e;const o=Math.round(parseInt(a[1],16)+(255-parseInt(a[1],16))*t),n=Math.round(parseInt(a[2],16)+(255-parseInt(a[2],16))*t),r=Math.round(parseInt(a[3],16)+(255-parseInt(a[3],16))*t);return`#${o.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}var F=null;function E(e={},t){const{background:a="transparent",stroke:o="#000",lineWidth:n=1.5,spacing:r=6,angle:i=45}=e,s=Math.max(8,Math.ceil(2*r));let c;try{c=function(e){return"undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(e,e):(F||(F=document.createElement("canvas")),F.width=e,F.height=e,F)}(s)}catch{return null}const l=c.getContext("2d");if(!l)return null;a&&"transparent"!==a?(l.fillStyle=a,l.fillRect(0,0,s,s)):l.clearRect(0,0,s,s),l.strokeStyle=o,l.lineWidth=n,l.lineCap="square";const p=i*Math.PI/180;if(45===i||-45===i){const e=i>0?1:-1;for(let t=-s;2*s>=t;t+=r)l.beginPath(),l.moveTo(t,0),l.lineTo(t+e*s,s),l.stroke()}else{l.save(),l.translate(s/2,s/2),l.rotate(p);const e=2*s;for(let t=-e;e>=t;t+=r)l.beginPath(),l.moveTo(-e,t),l.lineTo(e,t),l.stroke();l.restore()}return(t||l).createPattern(c,"repeat")}function _(e){return"object"==typeof e&&null!==e&&"hatch"===e.type}function O(e){return["hatch",e.background??"transparent",e.stroke??"#000",e.lineWidth??1.5,e.spacing??6,e.angle??45,e.lineOpacity??1].join("|")}function M(e,t){let a=2166136261;const o=O(t);for(let e=0;o.length>e;e++)a^=o.charCodeAt(e),a=Math.imul(a,16777619);return`${e}-hatch-${(a>>>0).toString(36)}`}function D(e){if(null==e)return()=>{};const t="function"==typeof e?e:t=>t[e];return e=>q(t(e))}function H(e,t){const a=D(e),o=D(t);return(e,t)=>{const n=o(e);return{value:n,x:a(e),y:n,category:t}}}function G(e,t){const a=D(t??"value"),o=null==e?void 0:"function"==typeof e?e:t=>t[e];return e=>{const t=o?o(e):void 0;return{value:a(e),category:null==t?void 0:t+""}}}function q(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}function U(e,t,a){const o=null!=e.axis?a[e.axis]:null!=e.field?t[e.field]:a.value;if(void 0!==e.eq&&o!==e.eq)return!1;if(void 0!==e.ne&&o===e.ne)return!1;if(void 0!==e.in&&!e.in.includes(o))return!1;if(void 0===e.gt&&void 0===e.gte&&void 0===e.lt&&void 0===e.lte&&void 0===e.within&&void 0===e.outside)return!0;const n=q(o);if(void 0===n)return!1;if(void 0!==e.gt&&e.gt>=n)return!1;if(void 0!==e.gte&&e.gte>n)return!1;if(void 0!==e.lt&&n>=e.lt)return!1;if(void 0!==e.lte&&n>e.lte)return!1;if(void 0!==e.within){const[t,a]=e.within;if(t>n||n>a)return!1}if(void 0!==e.outside){const[t,a]=e.outside;if(n>=t&&a>=n)return!1}return!0}function W(e,t,a){const o=e.when;return void 0===o||!0===o||!1!==o&&("function"==typeof o?o(t,a):U(o,t,a))}function V(e,t,a){if(!t||0===t.length)return{};let o={};for(const n of t){if(!W(n,e,a))continue;const t="function"==typeof n.style?n.style(e,a):n.style;t&&(o={...o,...t})}return o}function Y(e,t,a,o=e=>e){const n=e??(()=>({}));return t&&0!==t.length?(e,r)=>{const i=o(e),s={...n(e,r)};return Object.assign(s,V(i,t,a(i,r))),s}:n}function K(e,t,a){return e&&0!==e.length?(o,n)=>{const r=V(o,e,t(o,n)),i=a?a(o,n):void 0;return i?{...r,...i}:r}:a}function X(e,t){const a=e.length,o=t.length,n=Array(o+1);for(let e=0;o>=e;e++)n[e]=e;for(let r=1;a>=r;r++){let a=n[0];n[0]=r;for(let i=1;o>=i;i++){const o=n[i];n[i]=e[r-1]===t[i-1]?a:1+Math.min(a,n[i],n[i-1]),a=o}}return n[o]}function J(e,t,a=3){let o,n=a+1;for(const a of t){const t=X(e.toLowerCase(),a.toLowerCase());n>t&&(n=t,o=a)}return n>a?void 0:o}function Q(e){return e.length>3?[e[0],e[Math.floor(e.length/2)],e[e.length-1]]:[...e]}function Z(e,t){if(0===t.length)return null;const a=e.toLowerCase();return t.find(e=>e.toLowerCase().includes(a)||a.includes(e.toLowerCase()))||(J(e,t,3)??null)}require("react/jsx-runtime");var ee={BarChart:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},sort:{type:["boolean","string","function"]},barPadding:{type:"number"},roundedTop:{type:"number"},valueExtent:{type:"array"},styleRules:{type:"array"},gradientFill:{type:["boolean","object"]},regression:{type:["boolean","string","object"]}}},StackedBarChart:{required:["data","stackBy"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},stackBy:{type:["string","function"]},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},normalize:{type:"boolean"},sort:{type:["boolean","string","function"]},barPadding:{type:"number"},roundedTop:{type:"number"},styleRules:{type:"array"},gradientFill:{type:["boolean","object"]}}},GroupedBarChart:{required:["data","groupBy"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},groupBy:{type:["string","function"]},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},sort:{type:["boolean","string","function"]},barPadding:{type:"number"},roundedTop:{type:"number"},styleRules:{type:"array"},gradientFill:{type:["boolean","object"]}}},SwarmPlot:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},sizeBy:{type:["string","function"]},sizeRange:{type:"array"},symbolBy:{type:["string","function"]},symbolMap:{type:"object"},pointRadius:{type:"number"},pointOpacity:{type:"number"},categoryPadding:{type:"number"},brush:{type:"boolean"},onBrush:{type:"function"},linkedBrush:{type:["string","object"]}}},BoxPlot:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},showOutliers:{type:"boolean"},outlierRadius:{type:"number"},categoryPadding:{type:"number"}}},Histogram:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},bins:{type:"number"},relative:{type:"boolean"},categoryPadding:{type:"number"},brush:{type:"boolean"},onBrush:{type:"function"},linkedBrush:{type:["string","object"]}}},ViolinPlot:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},bins:{type:"number"},curve:{type:"string"},showIQR:{type:"boolean"},categoryPadding:{type:"number"},brush:{type:"boolean"},onBrush:{type:"function"},linkedBrush:{type:["string","object"]}}},RidgelinePlot:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},bins:{type:"number"},amplitude:{type:"number"},categoryPadding:{type:"number"}}},DotPlot:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},sort:{type:["boolean","string","function"]},dotRadius:{type:"number"},categoryPadding:{type:"number"},regression:{type:["boolean","string","object"]}}},PieChart:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},startAngle:{type:"number"},cornerRadius:{type:"number"}}},DonutChart:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},innerRadius:{type:"number"},centerContent:{type:["object","string","number"]},startAngle:{type:"number"},cornerRadius:{type:"number"}}},GaugeChart:{required:["value"],dataShape:"none",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},value:{type:"number"},min:{type:"number"},max:{type:"number"},thresholds:{type:"array"},gradientFill:{type:"object"},arcWidth:{type:"number"},cornerRadius:{type:"number"},sweep:{type:"number"},fillZones:{type:"boolean"},showNeedle:{type:"boolean"},needleColor:{type:"string"},color:{type:"string"},valueFormat:{type:"function"},centerContent:{type:["object","string","number","function"]},showScaleLabels:{type:"boolean"},backgroundColor:{type:"string"}}},FunnelChart:{required:["data"],dataShape:"array",dataAccessors:["stepAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},stepAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},categoryAccessor:{type:["string","function"]},orientation:{type:"string",enum:["horizontal","vertical"]},connectorOpacity:{type:"number"},showCategoryTicks:{type:"boolean"},responsiveWidth:{type:"boolean"},legendPosition:{type:"string",enum:["right","left","top","bottom"]}}},SwimlaneChart:{required:["subcategoryAccessor"],dataShape:"array",dataAccessors:["categoryAccessor","subcategoryAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},categoryAccessor:{type:["string","function"]},subcategoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},orientation:{type:"string",enum:["horizontal","vertical"]},barPadding:{type:"number"},roundedTop:{type:"number"},trackFill:{type:["string","object"]},brush:{type:"boolean"},onBrush:{type:"function"},linkedBrush:{type:["string","object"]},showCategoryTicks:{type:"boolean"},responsiveWidth:{type:"boolean"},legendPosition:{type:"string",enum:["right","left","top","bottom"]}}},LikertChart:{required:[],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor","levelAccessor","countAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},categoryLabel:{type:"string"},valueLabel:{type:"string"},valueFormat:{type:"function"},categoryFormat:{type:"function"},data:{type:"array"},levels:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},levelAccessor:{type:["string","function"]},countAccessor:{type:["string","function"]},orientation:{type:"string",enum:["vertical","horizontal"]},barPadding:{type:"number"}}},LineChart:{required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},styleRules:{type:"array"},data:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},lineBy:{type:["string","function"]},lineDataAccessor:{type:"string"},curve:{type:"string",enum:["linear","monotoneX","monotoneY","step","stepAfter","stepBefore","basis","cardinal","catmullRom"]},lineWidth:{type:"number"},showPoints:{type:"boolean"},pointRadius:{type:"number"},fillArea:{type:"boolean"},areaOpacity:{type:"number"},forecast:{type:"object"},anomaly:{type:"object"},band:{type:["object","array"]}}},AreaChart:{required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},styleRules:{type:"array"},data:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},areaBy:{type:["string","function"]},lineDataAccessor:{type:"string"},curve:{type:"string",enum:["linear","monotoneX","monotoneY","step","stepAfter","stepBefore","basis","cardinal","catmullRom"]},gradientFill:{type:["boolean","object"]},semanticGradient:{type:"array"},areaOpacity:{type:"number"},showLine:{type:"boolean"},lineWidth:{type:"number"},forecast:{type:"object"},anomaly:{type:"object"},band:{type:["object","array"]}}},DifferenceChart:{required:[],dataShape:"array",dataAccessors:["xAccessor","seriesAAccessor","seriesBAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},data:{type:"array"},xAccessor:{type:["string","function"]},seriesAAccessor:{type:["string","function"]},seriesBAccessor:{type:["string","function"]},seriesALabel:{type:"string"},seriesBLabel:{type:"string"},seriesAColor:{type:"string"},seriesBColor:{type:"string"},showLines:{type:"boolean"},lineWidth:{type:"number"},showPoints:{type:"boolean"},pointRadius:{type:"number"},curve:{type:"string",enum:["linear","monotoneX","monotoneY","step","stepAfter","stepBefore","basis","cardinal","catmullRom"]},areaOpacity:{type:"number"},gradientFill:{type:["boolean","object"]},xExtent:{type:"array"},yExtent:{type:"array"},pointIdAccessor:{type:["string","function"]},windowSize:{type:"number"}}},StackedAreaChart:{required:["data","areaBy"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},styleRules:{type:"array"},data:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},areaBy:{type:["string","function"]},lineDataAccessor:{type:"string"},curve:{type:"string",enum:["linear","monotoneX","monotoneY","step","stepAfter","stepBefore","basis","cardinal","catmullRom"]},areaOpacity:{type:"number"},showLine:{type:"boolean"},lineWidth:{type:"number"},normalize:{type:"boolean"}}},Scatterplot:{required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},styleRules:{type:"array"},data:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},sizeBy:{type:["string","function"]},sizeRange:{type:"array"},symbolBy:{type:["string","function"]},symbolMap:{type:"object"},pointRadius:{type:"number"},pointOpacity:{type:"number"},regression:{type:["boolean","string","object"]},forecast:{type:"object"},anomaly:{type:"object"}}},BubbleChart:{required:["data","sizeBy"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},styleRules:{type:"array"},data:{type:"array"},sizeBy:{type:["string","function"]},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},sizeRange:{type:"array"},bubbleOpacity:{type:"number"},bubbleStrokeWidth:{type:"number"},bubbleStrokeColor:{type:"string"},regression:{type:["boolean","string","object"]}}},Heatmap:{required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor","valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:"string",enum:["blues","reds","greens","viridis","custom"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},data:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},customColorScale:{type:["object","function"]},showValues:{type:"boolean"},valueFormat:{type:"function"},cellBorderColor:{type:"string"},cellBorderWidth:{type:"number"},legendPosition:{type:"string",enum:["right","left","top","bottom"]}}},QuadrantChart:{required:[],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},styleRules:{type:"array"},data:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},xCenter:{type:"number"},yCenter:{type:"number"},quadrants:{type:"object"},centerlineStyle:{type:"object"},showQuadrantLabels:{type:"boolean"},quadrantLabelSize:{type:"number"},sizeBy:{type:["string","function"]},sizeRange:{type:"array"},pointRadius:{type:"number"},pointOpacity:{type:"number"}}},MultiAxisLineChart:{required:["series"],dataShape:"array",dataAccessors:["xAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},data:{type:"array"},xAccessor:{type:["string","function"]},series:{type:"array"},curve:{type:"string"},lineWidth:{type:"number"}}},CandlestickChart:{required:["highAccessor","lowAccessor"],dataShape:"array",dataAccessors:["xAccessor","highAccessor","lowAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},data:{type:"array"},xAccessor:{type:["string","function"]},highAccessor:{type:["string","function"]},lowAccessor:{type:["string","function"]},openAccessor:{type:["string","function"]},closeAccessor:{type:["string","function"]},candlestickStyle:{type:"object"},mode:{type:"string",enum:["primary","context","sparkline"]}}},ConnectedScatterplot:{required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},xLabel:{type:"string"},yLabel:{type:"string"},xFormat:{type:"function"},yFormat:{type:"function"},xScaleType:{type:"string",enum:["linear","log","time"]},yScaleType:{type:"string",enum:["linear","log","time"]},styleRules:{type:"array"},data:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},orderAccessor:{type:["string","function"]},orderLabel:{type:"string"},pointRadius:{type:"number"},pointIdAccessor:{type:["string","function"]},regression:{type:["boolean","string","object"]},forecast:{type:"object"},anomaly:{type:"object"}}},ScatterplotMatrix:{required:["data","fields"],dataShape:"array",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"array"},fields:{type:"array"}}},MinimapChart:{required:["data"],dataShape:"array",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"array"}}},ForceDirectedGraph:{required:["nodes","edges"],dataShape:"network",dataAccessors:["nodeIDAccessor","sourceAccessor","targetAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},styleRules:{type:"array"},nodes:{type:"array"},edges:{type:"array"},nodeIDAccessor:{type:["string","function"]},sourceAccessor:{type:["string","function"]},targetAccessor:{type:["string","function"]},nodeLabel:{type:["string","function"]},nodeSize:{type:["number","string","function"]},nodeSizeRange:{type:"array"},edgeWidth:{type:["number","string","function"]},edgeColor:{type:"string"},edgeOpacity:{type:"number"},iterations:{type:"number"},forceStrength:{type:"number"},layoutExecution:{type:"string",enum:["auto","worker","sync"]},showLabels:{type:"boolean"}}},SankeyDiagram:{required:["edges"],dataShape:"network",dataAccessors:["sourceAccessor","targetAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},styleRules:{type:"array"},edges:{type:"array"},nodes:{type:"array"},sourceAccessor:{type:["string","function"]},targetAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},nodeIdAccessor:{type:["string","function"]},edgeColorBy:{type:["string","function"],enum:["source","target","gradient"]},orientation:{type:"string",enum:["vertical","horizontal"]},nodeAlign:{type:"string",enum:["justify","left","right","center"]},nodePaddingRatio:{type:"number"},nodeWidth:{type:"number"},nodeLabel:{type:["string","function"]},showLabels:{type:"boolean"},edgeOpacity:{type:"number"},edgeSort:{type:"function"}}},ProcessSankey:{required:["domain"],dataShape:"network",dataAccessors:["sourceAccessor","targetAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},edges:{type:"array"},nodes:{type:"array"},domain:{type:"array"},axisTicks:{type:"array"},sourceAccessor:{type:["string","function"]},targetAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},nodeIdAccessor:{type:["string","function"]},startTimeAccessor:{type:["string","function"]},endTimeAccessor:{type:["string","function"]},xExtentAccessor:{type:["string","function"]},edgeIdAccessor:{type:["string","function"]},legendPosition:{type:"string",enum:["right","left","top","bottom"]},pairing:{type:"string",enum:["value","temporal"]},packing:{type:"string",enum:["off","reuse"]},laneOrder:{type:"string",enum:["insertion","crossing-min","inside-out","crossing-min+inside-out"]},ribbonLane:{type:"string",enum:["source","target","both"]},lifetimeMode:{type:"string",enum:["full","half"]},showLaneRails:{type:"boolean"},showQualityReadout:{type:"boolean"},edgeOpacity:{type:"number"},timeFormat:{type:"function"},valueFormat:{type:"function"},showParticles:{type:"boolean"},particleStyle:{type:"object"}}},ChordDiagram:{required:["edges"],dataShape:"network",dataAccessors:["sourceAccessor","targetAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},styleRules:{type:"array"},edges:{type:"array"},nodes:{type:"array"},sourceAccessor:{type:["string","function"]},targetAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},nodeIdAccessor:{type:["string","function"]},edgeColorBy:{type:["string","function"],enum:["source","target"]},padAngle:{type:"number"},groupWidth:{type:"number"},sortGroups:{type:"function"},nodeLabel:{type:["string","function"]},showLabels:{type:"boolean"},edgeOpacity:{type:"number"}}},TreeDiagram:{required:["data"],dataShape:"object",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"object"},layout:{type:"string",enum:["tree","cluster","partition","treemap","circlepack"]},orientation:{type:"string",enum:["vertical","horizontal","radial"]},childrenAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},nodeIdAccessor:{type:["string","function"]},colorByDepth:{type:"boolean"},edgeStyle:{type:"string",enum:["line","curve"]},nodeLabel:{type:["string","function"]},showLabels:{type:"boolean"},nodeSize:{type:"number"}}},Treemap:{required:["data"],dataShape:"object",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"object"},childrenAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},nodeIdAccessor:{type:["string","function"]},colorByDepth:{type:"boolean"},showLabels:{type:"boolean"},nodeLabel:{type:["string","function"]},nodeStyle:{type:"function"}}},CirclePack:{required:["data"],dataShape:"object",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"object"},childrenAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},nodeIdAccessor:{type:["string","function"]},colorByDepth:{type:"boolean"},showLabels:{type:"boolean"},nodeLabel:{type:["string","function"]},circleOpacity:{type:"number"}}},OrbitDiagram:{required:["data"],dataShape:"object",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"object"},childrenAccessor:{type:["string","function"]},nodeIdAccessor:{type:["string","function"]},colorByDepth:{type:"boolean"},orbitMode:{type:["string","array"]},orbitSize:{type:["number","function"]},speed:{type:"number"},eccentricity:{type:["number","function"]},showRings:{type:"boolean"},nodeRadius:{type:["number","function"]},showLabels:{type:"boolean"},animated:{type:"boolean"},revolution:{type:"function"},foregroundGraphics:{type:"object"}}},ChoroplethMap:{required:["areas"],dataShape:"array",dataAccessors:["valueAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},styleRules:{type:"array"},areas:{type:["array","string"]},valueAccessor:{type:["string","function"]},projection:{type:"string"}}},ProportionalSymbolMap:{required:["points"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},styleRules:{type:"array"},points:{type:"array"},xAccessor:{type:["string","function"]},yAccessor:{type:["string","function"]},sizeBy:{type:["string","function"]},areas:{type:["array","string"]}}},FlowMap:{required:["flows"],dataShape:"array",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},flows:{type:"array"},nodes:{type:"array"},valueAccessor:{type:["string","function"]},lineIdAccessor:{type:["string","function"]}}},DistanceCartogram:{required:["points"],dataShape:"array",dataAccessors:[],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},styleRules:{type:"array"},points:{type:"array"},center:{type:"array"},costAccessor:{type:["string","function"]}}},RealtimeLineChart:{required:[],dataShape:"realtime",dataAccessors:[],props:{size:{type:"array"},width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},timeAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},windowSize:{type:"number"},windowMode:{type:"string",enum:["sliding","stepping"]},arrowOfTime:{type:"string",enum:["left","right"]},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"]},tooltipContent:{type:"function"},onHover:{type:"function"},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},svgAnnotationRules:{type:"function"},tickFormatTime:{type:"function"},tickFormatValue:{type:"function"},decay:{type:"object"},pulse:{type:"object"},staleness:{type:"object"},stroke:{type:"string"},strokeWidth:{type:"number"},strokeDasharray:{type:"string"},transition:{type:"object"}}},RealtimeHistogram:{required:["binSize"],dataShape:"realtime",dataAccessors:[],props:{size:{type:"array"},width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},timeAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},windowSize:{type:"number"},windowMode:{type:"string",enum:["sliding","stepping"]},arrowOfTime:{type:"string",enum:["left","right"]},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"]},tooltipContent:{type:"function"},onHover:{type:"function"},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},svgAnnotationRules:{type:"function"},tickFormatTime:{type:"function"},tickFormatValue:{type:"function"},decay:{type:"object"},pulse:{type:"object"},staleness:{type:"object"},binSize:{type:"number"},direction:{type:"string",enum:["up","down"]},categoryAccessor:{type:["string","function"]},colors:{type:"object"},fill:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},gap:{type:"number"},brush:{type:["boolean","string","object"]},onBrush:{type:"function"},linkedBrush:{type:["string","object"]},transition:{type:"object"}}},TemporalHistogram:{required:["data","binSize"],dataShape:"array",dataAccessors:["timeAccessor","valueAccessor","categoryAccessor"],props:{data:{type:"array"},binSize:{type:"number"},size:{type:"array"},width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},timeAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},direction:{type:"string",enum:["up","down"]},categoryAccessor:{type:["string","function"]},colors:{type:"object"},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"]},tooltipContent:{type:"function"},onHover:{type:"function"},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},svgAnnotationRules:{type:"function"},tickFormatTime:{type:"function"},tickFormatValue:{type:"function"},fill:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},gap:{type:"number"},linkedHover:{type:["boolean","string","object"]},linkedBrush:{type:["string","object"]},brush:{type:["boolean","string","object"]},onBrush:{type:"function"}}},RealtimeSwarmChart:{required:[],dataShape:"realtime",dataAccessors:[],props:{size:{type:"array"},width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},timeAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},windowSize:{type:"number"},windowMode:{type:"string",enum:["sliding","stepping"]},arrowOfTime:{type:"string",enum:["left","right"]},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"]},tooltipContent:{type:"function"},onHover:{type:"function"},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},svgAnnotationRules:{type:"function"},tickFormatTime:{type:"function"},tickFormatValue:{type:"function"},decay:{type:"object"},pulse:{type:"object"},staleness:{type:"object"},categoryAccessor:{type:["string","function"]},colors:{type:"object"},radius:{type:"number"},fill:{type:"string"},opacity:{type:"number"},stroke:{type:"string"},strokeWidth:{type:"number"},pointStyle:{type:"function"},yScaleType:{type:"string",enum:["linear","log","symlog"]},transition:{type:"object"}}},RealtimeWaterfallChart:{required:[],dataShape:"realtime",dataAccessors:[],props:{size:{type:"array"},width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},timeAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},windowSize:{type:"number"},windowMode:{type:"string",enum:["sliding","stepping"]},arrowOfTime:{type:"string",enum:["left","right"]},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"]},tooltipContent:{type:"function"},onHover:{type:"function"},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},svgAnnotationRules:{type:"function"},tickFormatTime:{type:"function"},tickFormatValue:{type:"function"},decay:{type:"object"},pulse:{type:"object"},staleness:{type:"object"},positiveColor:{type:"string"},negativeColor:{type:"string"},connectorStroke:{type:"string"},connectorWidth:{type:"number"},gap:{type:"number"},stroke:{type:"string"},strokeWidth:{type:"number"},transition:{type:"object"}}},RealtimeHeatmap:{required:[],dataShape:"realtime",dataAccessors:[],props:{size:{type:"array"},width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},timeAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},windowSize:{type:"number"},windowMode:{type:"string",enum:["sliding","stepping"]},arrowOfTime:{type:"string",enum:["left","right"]},timeExtent:{type:"array"},valueExtent:{type:"array"},extentPadding:{type:"number"},showAxes:{type:"boolean"},background:{type:"string"},enableHover:{type:["boolean","object"]},tooltip:{type:["function","object"]},tooltipContent:{type:"function"},onHover:{type:"function"},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},svgAnnotationRules:{type:"function"},tickFormatTime:{type:"function"},tickFormatValue:{type:"function"},decay:{type:"object"},pulse:{type:"object"},staleness:{type:"object"},heatmapXBins:{type:"number"},heatmapYBins:{type:"number"},aggregation:{type:"string",enum:["count","sum","mean"]}}},GaltonBoardChart:{required:[],dataShape:"array",dataAccessors:["valueAccessor"],props:{data:{type:"array"},size:{type:"array"},width:{type:"number"},height:{type:"number"},className:{type:"string"},title:{type:"string"},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},colorBy:{type:["string","function"]},seed:{type:"number"},ballRadius:{type:"number"},hoverRadius:{type:"number"},paused:{type:"boolean"},tooltip:{type:["boolean","function","object"]},frameProps:{type:"object"},styleRules:{type:"array"},valueAccessor:{type:["string","function"]},valueExtent:{type:"array"},bins:{type:"number"},mode:{type:"string",enum:["sample","mechanical"]},pegRows:{type:"number"},mechanicalCount:{type:"number"},branchProbability:{type:"number"},referenceLines:{type:["object","array"]},showProjection:{type:"boolean"}}},EventDropChart:{required:["data"],dataShape:"array",dataAccessors:["timeAccessor","arrivalAccessor"],props:{data:{type:"array"},size:{type:"array"},width:{type:"number"},height:{type:"number"},className:{type:"string"},title:{type:"string"},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},colorBy:{type:["string","function"]},seed:{type:"number"},ballRadius:{type:"number"},hoverRadius:{type:"number"},paused:{type:"boolean"},tooltip:{type:["boolean","function","object"]},frameProps:{type:"object"},styleRules:{type:"array"},timeAccessor:{type:["string","function"]},arrivalAccessor:{type:["string","function"]},windows:{type:"object"},watermark:{type:["object","function"]},timeExtent:{type:"array"},timeScale:{type:"number"}}},PhysicsPileChart:{required:[],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{data:{type:"array"},size:{type:"array"},width:{type:"number"},height:{type:"number"},className:{type:"string"},title:{type:"string"},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},colorBy:{type:["string","function"]},seed:{type:"number"},ballRadius:{type:"number"},hoverRadius:{type:"number"},paused:{type:"boolean"},tooltip:{type:["boolean","function","object"]},frameProps:{type:"object"},styleRules:{type:"array"},categoryAccessor:{type:["string","function"]},valueAccessor:{type:["string","function"]},mode:{type:"string",enum:["sample","mechanical"]},mechanicalCount:{type:"number"},mechanicalCategories:{type:"array"},unitValue:{type:"number"},showProjection:{type:"boolean"},sediment:{type:"boolean"}}},CollisionSwarmChart:{required:[],dataShape:"array",dataAccessors:["xAccessor","groupAccessor","radiusAccessor"],props:{data:{type:"array"},size:{type:"array"},width:{type:"number"},height:{type:"number"},className:{type:"string"},title:{type:"string"},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},colorBy:{type:["string","function"]},seed:{type:"number"},ballRadius:{type:"number"},hoverRadius:{type:"number"},paused:{type:"boolean"},tooltip:{type:["boolean","function","object"]},frameProps:{type:"object"},styleRules:{type:"array"},xAccessor:{type:["string","function"]},groupAccessor:{type:["string","function"]},radiusAccessor:{type:["string","function"]},pointRadius:{type:"number"},xExtent:{type:"array"},collisionIterations:{type:"number"},settle:{type:"boolean"},showProjection:{type:"boolean"}}},GauntletChart:{required:["negativeProperties"],dataShape:"array",dataAccessors:["idAccessor","positiveAccessor","negativeAccessor","metricsAccessor","startTimeAccessor"],props:{data:{type:"array"},size:{type:"array"},width:{type:"number"},height:{type:"number"},className:{type:"string"},title:{type:"string"},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},colorBy:{type:["string","function"]},seed:{type:"number"},ballRadius:{type:"number"},hoverRadius:{type:"number"},paused:{type:"boolean"},tooltip:{type:["boolean","function","object"]},frameProps:{type:"object"},positiveProperties:{type:"array"},negativeProperties:{type:"array"},gates:{type:"array"},events:{type:["array","function"]},startTimeAccessor:{type:["string","function"]},onCapacityChange:{type:"function"},crashDetection:{type:"boolean"},showChrome:{type:"boolean"},showProjection:{type:"boolean"},showTethers:{type:"boolean"},coreForceMode:{type:"string",enum:["route","net"]},terminalBehavior:{type:"string",enum:["outcome","hold-last"]}}},ProcessFlowChart:{required:["stages"],dataShape:"array",dataAccessors:["idAccessor","stageAccessor","groupBy","workAccessor","radiusAccessor"],props:{data:{type:"array"},size:{type:"array"},width:{type:"number"},height:{type:"number"},className:{type:"string"},title:{type:"string"},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},colorBy:{type:["string","function"]},seed:{type:"number"},ballRadius:{type:"number"},hoverRadius:{type:"number"},paused:{type:"boolean"},tooltip:{type:["boolean","function","object"]},frameProps:{type:"object"},stages:{type:"array"},stageAccessor:{type:["string","function"]},idAccessor:{type:["string","function"]},groupBy:{type:["string","function"]},groupLabelAccessor:{type:["string","function"]},workAccessor:{type:["string","function"]},radiusAccessor:{type:["string","function"]},groupCompletion:{type:"string",enum:["allAbsorbed","none"]},groupAnchorAlong:{type:"number"},showProjection:{type:"boolean"},showChrome:{type:"boolean"},settle:{type:"boolean"}}},PhysicalFlowChart:{required:[],dataShape:"network",dataAccessors:["nodeIdAccessor","nodeXAccessor","nodeYAccessor","sourceAccessor","targetAccessor","throughputAccessor","pathAccessor"],props:{width:{type:"number"},height:{type:"number"},margin:{type:"object"},className:{type:"string"},title:{type:"string"},description:{type:"string"},summary:{type:"string"},accessibleTable:{type:"boolean"},enableHover:{type:"boolean"},showLegend:{type:"boolean"},showGrid:{type:"boolean"},colorBy:{type:["string","function"]},colorScheme:{type:["string","array"]},tooltip:{type:["boolean","function","object"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},frameProps:{type:"object"},onClick:{type:"function"},size:{type:"array"},nodes:{type:"array"},links:{type:"array"},edges:{type:"array"},data:{type:"array"},nodeIdAccessor:{type:["string","function"]},nodeXAccessor:{type:["string","function"]},nodeYAccessor:{type:["string","function"]},sourceAccessor:{type:["string","function"]},targetAccessor:{type:["string","function"]},throughputAccessor:{type:["string","function"]},pathAccessor:{type:["string","function"]},coordinateMode:{type:"string",enum:["auto","normalized","pixels"]},particleRate:{type:"number"},maxParticles:{type:"number"},particleRadius:{type:"number"},flowSpeed:{type:"number"},pathConstraint:{type:"string",enum:["path","none"]},reducedMotion:{type:"boolean"},showStaticFlow:{type:"boolean"},showNodeLabels:{type:"boolean"},showSensors:{type:"boolean"},paused:{type:"boolean"},seed:{type:"number"}}},BigNumber:{required:[],dataShape:"none",dataAccessors:[],props:{width:{type:["number","string"]},height:{type:["number","string"]},className:{type:"string"},value:{type:"number"},label:{type:"string"},caption:{type:"string"},format:{type:["string","function"],enum:["number","currency","percent","compact","duration"]},locale:{type:"string"},currency:{type:"string"},precision:{type:"number"},prefix:{type:"string"},suffix:{type:"string"},unit:{type:"string"},comparison:{type:"object"},target:{type:"object"},delta:{type:"number"},deltaFormat:{type:["string","function"],enum:["number","currency","percent","compact","duration"]},showDeltaPercent:{type:"boolean"},direction:{type:"string",enum:["higher-is-better","lower-is-better","neutral"]},sentiment:{type:"string",enum:["auto","positive","negative","neutral"]},thresholds:{type:"array"},chartSlot:{type:["string","number","array","object","function"]},chartSize:{type:"number"},windowSize:{type:"number"},mode:{type:"string",enum:["tile","presentation","inline","thumbnail"]},align:{type:"string",enum:["start","center","end"]},padding:{type:["number","object"]},emphasis:{type:"string",enum:["primary","secondary"]},color:{type:"string"},background:{type:"string"},borderColor:{type:"string"},borderRadius:{type:["number","string"]},animate:{type:["boolean","object"]},stalenessThreshold:{type:"number"},staleLabel:{type:"string"},headerSlot:{type:["string","number","array","object","function"]},valueSlot:{type:["string","number","array","object","function"]},deltaSlot:{type:["string","number","array","object","function"]},trendSlot:{type:["string","number","array","object","function"]},footerSlot:{type:["string","number","array","object","function"]},onClick:{type:"function"},onObservation:{type:"function"}}}};function te(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}function ae(e,t){const a=[];null!=t&&"object"==typeof t||(t={});const o=ee[e];if(!o)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(ee).join(", ")}`]};for(const n of o.required)null==t[n]&&a.push(`"${n}" is required for ${e}.`);"array"!==o.dataShape||!Object.prototype.hasOwnProperty.call(o.props,"data")||o.required.includes("data")||function(e,t){return"mechanical"===t.mode&&("GaltonBoardChart"===e||"PhysicsPileChart"===e)}(e,t)||null!=t.data||a.push(`"data" is required for ${e}.`);for(const[e,n]of Object.entries(t)){if(null==n)continue;const t=o.props[e];if(t){if(!te(n,t.type)){const o=Array.isArray(t.type)?t.type.join(" | "):t.type;a.push(`"${e}" should be ${o}, got ${Array.isArray(n)?"array":typeof n}.`);continue}t.enum&&"string"==typeof n&&!t.enum.includes(n)&&a.push(`"${e}" value "${n}" is not valid. Expected one of: ${t.enum.join(", ")}.`)}}const n=Object.keys(o.props),r=new Set(n);for(const o of Object.keys(t))if(void 0!==t[o]&&!r.has(o)){const t=J(o,n),r=t?`Unknown prop "${o}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${o}" for ${e}. Valid props: ${n.join(", ")}.`;a.push(r)}if("array"===o.dataShape){const n=t.data,r={};for(const e of o.dataAccessors){const a=t[e];"string"==typeof a&&(r[e]=a)}const i=function({componentName:e,data:t,accessors:a,requiredProps:o}){if(o)for(const[t,a]of Object.entries(o))if(null==a)return`${e}: ${t} is required. Provide a field name or function.`;if(null==t)return null;if(!Array.isArray(t)&&"object"==typeof t)return e+": data should be an array, but received an object. If this is hierarchical data, use TreeDiagram, Treemap, or CirclePack instead.";if(!Array.isArray(t)||0===t.length)return e+": No data provided. Pass a non-empty array to the data prop.";if(a){const o=Q(t).find(e=>e&&"object"==typeof e);if(o){const t=Object.keys(o);for(const[n,r]of Object.entries(a))if(r&&"string"==typeof r&&!(r in o)){const a=Z(r,t),o=a?` Try ${n}="${a}".`:"";return`${e}: ${n} "${r}" not found in data. Available fields: ${t.join(", ")}.${o}`}}}return null}({componentName:e,data:n,accessors:Object.keys(r).length>0?r:void 0});i&&a.push(i)}else if("object"===o.dataShape){const o=function({componentName:e,data:t,dataLabel:a="data"}){return null==t?`${e}: No ${a} provided. Pass a hierarchical object with children: { name: "root", children: [...] }.`:Array.isArray(t)?`${e}: ${a} should be a single root object, not an array. Expected: { name: "root", children: [...] }. If you have flat data, use LineChart, BarChart, or Scatterplot instead.`:null}({componentName:e,data:t.data});o&&a.push(o)}else if("network"===o.dataShape){const n=function({componentName:e,nodes:t,edges:a,nodesRequired:o=!1,edgesRequired:n=!0,accessors:r}){if(null==t&&null==a)return null;if(n&&(!a||!Array.isArray(a)||0===a.length))return e+': No edges provided. Pass a non-empty array: edges={[{ source: "A", target: "B", value: 10 }, ...]}.';if(o&&(!t||!Array.isArray(t)||0===t.length))return e+': No nodes provided. Pass a non-empty array: nodes={[{ id: "A" }, { id: "B" }, ...]}.';if(r&&t&&t.length>0){const a=Q(t).find(e=>e&&"object"==typeof e);if(a){const t=Object.keys(a);for(const[o,n]of Object.entries(r))if(n&&"string"==typeof n&&!(n in a)){const a=Z(n,t),r=a?` Try ${o}="${a}".`:"";return`${e}: ${o} "${n}" not found in node data. Available fields: ${t.join(", ")}.${r}`}}}return null}({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:o.required.includes("nodes"),edgesRequired:o.required.includes("edges")});n&&a.push(n)}return{valid:0===a.length,errors:a}}function oe(e){return null==e?null:e.data??e.datum??e}require("d3-interpolate");var ne=80,re=100;function ie(e,t={}){const a=[],o=e.tokenSemantics,n=e.countStrategy,r=t.maxRecommendedTokens??("fixed-denominator"!==n||function(e){const t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}(e.denominator)>re?ne:re);return o||a.push({code:"TOKEN_SEMANTICS_UNCLEAR",severity:"warning",message:"Every tokenized encoding should state what one token represents."}),n||a.push({code:"MISSING_COUNT_STRATEGY",severity:"warning",message:"Every tokenized encoding should state how token counts are produced."}),"icon"!==e.tokenType&&"glyph"!==e.tokenType||"icon-only"!==e.labelPolicy&&"token-only"!==e.labelPolicy||a.push({code:"ICON_ONLY_LABELS",severity:"warning",message:"Icons should supplement text labels, not replace them."}),null!=t.visibleTokens&&t.visibleTokens>r&&a.push({code:"TOO_MANY_VISIBLE_TOKENS",severity:"warning",message:`This encoding renders ${t.visibleTokens} visible tokens. Consider unitizing, sampling, or a hybrid bar/token view.`}),"decorative"!==o||"icon"!==e.tokenType&&"glyph"!==e.tokenType||a.push({code:"DECORATIVE_PICTOGRAPHS",severity:"warning",message:"Decorative pictographs can harm recall and speed when they do not clarify the data."}),"unitized-measure"===o&&n&&"unitized"!==n&&a.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Unitized measures should use the unitized count strategy so each token has a stable value."}),"risk-case"===o&&n&&"fixed-denominator"!==n&&a.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Risk cases are usually clearest as a fixed-denominator natural frequency."}),"possible-outcome"!==o&&"posterior-sample"!==o&&"hypothetical-case"!==o||!n||"quantile"===n||"sample"===n||"posterior-sample"===n||"random-sample"===n||a.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Outcome/sample tokens should come from quantiles or samples, not from a unitized magnitude."}),"unitized-measure"===o&&"unitized"===n&&null==e.unitValue&&null==e.unit&&a.push({code:"MISSING_UNIT_VALUE",severity:"warning",message:"Unitized measures should set unitValue so each token has a declared value."}),"unitized-measure"!==o||"unitized"!==n||e.unitMeaning||a.push({code:"MISSING_UNIT_MEANING",severity:"info",message:"Add unitMeaning so readers know what one full token represents."}),a}function se(e){let t=e.replace(/^#/,"");/^[a-f\d]{3}$/i.test(t)&&(t=t.split("").map(e=>e+e).join(""));const a=t.match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!a)return null;const[o,n,r]=[parseInt(a[1],16)/255,parseInt(a[2],16)/255,parseInt(a[3],16)/255],i=e=>e>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92;return.2126*i(o)+.7152*i(n)+.0722*i(r)}function ce(e,t){const a=se(e),o=se(t);return null===a||null===o?null:(Math.max(a,o)+.05)/(Math.min(a,o)+.05)}var le=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),pe=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),ue=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),ye=new Set(["LineChart","AreaChart","StackedAreaChart"]),de=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),me=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),he=new Set(["PieChart","DonutChart"]),ge={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},be=new Set(Object.keys(ge)),fe={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},ve=new Set(["BigNumber"]),xe=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),we=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]),Ae=new Set(["OrbitDiagram",...we]),Se=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart"]),Ce=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]),$e=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),ke=new Set(["MultiAxisLineChart"]),je=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),Pe={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"},Re=new Set(["label","callout","callout-circle","callout-rect","text","widget"]),Te=new Set(["label","callout","callout-circle","callout-rect"]);function Le(e){return"string"==typeof e?.type?e.type:""}function Ne(e){return!!e&&"object"==typeof e&&Re.has(Le(e))}function Ie(e){return Te.has(Le(e))&&!function(e){return Array.isArray(e?.disable)&&e.disable.includes("connector")}(e)}var ze=2e4;function Be(e){const t=e.provenance,a=e.id??e.stableId??t?.stableId;return null==a||""===a?void 0:a+""}c(require("react"));var Fe=120,Ee=250;var _e=["xExtent","yExtent","rExtent"],Oe=8;function Me(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:null}function De(e,t,a){if("function"==typeof t)return t(e);const o="string"==typeof t?t:a;return e?.[o]}var He=new Set(["category10","tableau10","set3","blues","reds","greens","oranges","purples","greys","viridis","plasma","inferno","magma","cividis","turbo"]),Ge=["xAccessor","yAccessor","timeAccessor","valueAccessor","categoryAccessor","colorBy","sizeBy","lineBy","areaBy","stackBy","groupBy","orderAccessor","y0Accessor","sourceAccessor","targetAccessor","nodeIDAccessor","childrenAccessor","costAccessor"];function qe(e){return"object"==typeof e&&null!==e&&("tokenType"in e||"tokenSemantics"in e||"countStrategy"in e||"unitValue"in e||"unit"in e)}function Ue(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:void 0}function We(e,t){const a=Ue(e.visibleTokens);if(null!=a)return a;const o=Ue(t.denominator);if("fixed-denominator"===t.countStrategy&&null!=o)return o;const n=Ue(t.tokenCount),r=Ue(t.maxTokens);return null!=n&&null!=r?Math.min(n,r):n??o??r}function Ve(e,t){const a=[],o=ae(e,function(e){const t={...e};return delete t.tokenEncoding,delete t.visibleTokens,qe(t.encoding)&&delete t.encoding,t}(t));for(const e of o.errors)a.push({severity:"error",code:"VALIDATION",message:e,fix:""});return ee[e]?(function(e,t,a){const o=ee[e];if(o){if("array"===o.dataShape){const e=t.data;e&&Array.isArray(e)&&0===e.length&&a.push({severity:"error",code:"EMPTY_DATA",message:"data is an empty array — chart will render blank.",fix:"Provide at least one data point: data={[{ x: 1, y: 2 }]}."})}"network"===o.dataShape&&t.edges&&Array.isArray(t.edges)&&0===t.edges.length&&a.push({severity:"error",code:"EMPTY_EDGES",message:"edges is an empty array — network chart will render blank.",fix:'Provide at least one edge: edges={[{ source: "A", target: "B" }]}.'})}}(e,t,a),function(e,t,a){const o=t.width,n=t.height;if(void 0===o||"number"==typeof o&&o>0||a.push({severity:"error",code:"BAD_WIDTH",message:`width=${JSON.stringify(o)} — chart needs a positive number.`,fix:"Set width={600} or use responsiveWidth={true}."}),void 0===n||"number"==typeof n&&n>0||a.push({severity:"error",code:"BAD_HEIGHT",message:`height=${JSON.stringify(n)} — chart needs a positive number.`,fix:"Set height={400} or use responsiveHeight={true}."}),t.size&&Array.isArray(t.size)){const[e,o]=t.size;(null!=e&&0>=e||null!=o&&0>=o)&&a.push({severity:"error",code:"BAD_SIZE",message:`size=[${e}, ${o}] — both dimensions must be positive.`,fix:"Set size={[600, 400]}."})}}(0,t,a),function(e,t,a){const o=ee[e];if(!o||"array"!==o.dataShape)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const r=n[0];if(!r||"object"!=typeof r)return;const i=Object.keys(r);for(const e of o.dataAccessors){const o=t[e];"string"==typeof o&&(o in r||a.push({severity:"error",code:"ACCESSOR_MISSING",message:`${e}="${o}" not found in data. Available fields: ${i.join(", ")}.`,fix:`Change ${e} to one of: ${i.map(e=>`"${e}"`).join(", ")}.`}))}}(e,t,a),function(e,t,a){le.has(e)&&Array.isArray(t.data)&&a.push({severity:"error",code:"HIERARCHY_FLAT_ARRAY",message:e+" expects hierarchical data but received a flat array.",fix:'Pass a root object: data={{ name: "root", children: [...] }}. For flat data, use BarChart or LineChart.'})}(e,t,a),function(e,t,a){pe.has(e)&&(t.edges||t.data||a.push({severity:"error",code:"NETWORK_NO_EDGES",message:e+" requires an edges prop.",fix:'Provide edges={[{ source: "A", target: "B", value: 10 }]}.'}))}(e,t,a),function(e,t,a){const o=ee[e];if(!o||"array"!==o.dataShape)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const r=n[0];if(!r||"object"!=typeof r)return;const i=t.xAccessor;"string"==typeof i&&r[i]instanceof Date&&!t.xFormat&&a.push({severity:"warning",code:"DATE_NO_FORMAT",message:`xAccessor "${i}" contains Date objects but no xFormat is provided. Axis ticks may display "[object Object]".`,fix:"Add xFormat={d => d.toLocaleDateString()} or use timestamps (d.getTime()) instead of Date objects."})}(e,t,a),function(e,t,a){t.linkedHover&&!t.selection&&a.push({severity:"warning",code:"LINKED_HOVER_NO_SELECTION",message:"linkedHover is set but selection is not — this chart emits hover events but won't highlight from others.",fix:`Add selection={{ name: "${"object"==typeof t.linkedHover&&t.linkedHover.name||"hl"}" }} to receive cross-highlights.`})}(0,t,a),function(e,t,a){if(!ue.has(e))return;const o=t.rExtent||t.yExtent||t.valueExtent;o&&Array.isArray(o)&&o.length>=1&&null!=o[0]&&0!==o[0]&&a.push({severity:"warning",code:"NON_ZERO_BASELINE",message:`${e} has a non-zero baseline (${o[0]}). Bar and area charts should start at zero to avoid exaggerating differences.`,fix:`Remove the custom extent minimum or set it to 0: rExtent={[0, ${o[1]??"auto"}]}. For trend-focused charts, use LineChart instead.`})}(e,t,a),function(e,t,a){if(!ye.has(e))return;if(t.gapStrategy)return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const n=t.yAccessor||"y";"string"==typeof n&&o.some(e=>{const t=e[n];return null==t||Number.isNaN(t)})&&a.push({severity:"warning",code:"DATA_GAPS",message:`Data contains null/undefined/NaN values in "${n}". Default behavior breaks the line at gaps.`,fix:'Set gapStrategy="break" (default), "interpolate", or "zero" to control gap handling.'})}(e,t,a),function(e,t,a){const o=t.width??600,n=t.height??400,r=t.margin;if(!r||"object"!=typeof r)return;const i=(r.left||0)+(r.right||0),s=(r.top||0)+(r.bottom||0);o>i||a.push({severity:"error",code:"MARGIN_OVERFLOW_H",message:`Horizontal margins (${i}px) >= width (${o}px) — no drawing area left.`,fix:"Reduce margin.left/right or increase width."}),n>s||a.push({severity:"error",code:"MARGIN_OVERFLOW_V",message:`Vertical margins (${s}px) >= height (${n}px) — no drawing area left.`,fix:"Reduce margin.top/bottom or increase height."})}(0,t,a),function(e,t,a){const o=ee[e];if(!o||"array"!==o.dataShape)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const r=[];t.xAccessor&&"string"==typeof t.xAccessor&&r.push({prop:"xAccessor",name:t.xAccessor}),t.yAccessor&&"string"==typeof t.yAccessor&&r.push({prop:"yAccessor",name:t.yAccessor}),t.valueAccessor&&"string"==typeof t.valueAccessor&&r.push({prop:"valueAccessor",name:t.valueAccessor});const i=Math.min(n.length,5);for(const e of r){let t=!0;for(let a=0;i>a;a++){const o=n[a]?.[e.name];if("number"==typeof o&&Number.isFinite(o)){t=!1;break}}t&&a.push({severity:"error",code:"DEGENERATE_EXTENT",message:`${e.prop}="${e.name}" produces NaN or non-finite values for all sampled data points — chart extents will be invalid.`,fix:`Ensure data[].${e.name} contains finite numbers, or use a function accessor to transform values.`})}}(e,t,a),function(e,t,a){if(!de.has(e))return;const o=t.barPadding;"number"==typeof o&&10>o&&a.push({severity:"warning",code:"BAR_PADDING_INVISIBLE",message:`barPadding=${o} is very small — bars may appear to have no spacing between them.`,fix:"Increase barPadding to at least 10 for visible gaps, e.g. barPadding={12}."})}(e,t,a),function(e,t,a){if("bottom"!==t.legendPosition)return;const o=t.margin;if(!o||"object"!=typeof o)return;const n=o.bottom;"number"==typeof n&&70>n&&a.push({severity:"warning",code:"BOTTOM_MARGIN_WITH_LEGEND",message:`legendPosition="bottom" with margin.bottom=${n}px — legend may overlap axis labels.`,fix:"Increase margin.bottom to at least 70, e.g. margin={{ ...margin, bottom: 80 }}."})}(0,t,a),function(e,t,a){if(!t.showLegend)return;if("right"!==(t.legendPosition??"right"))return;const o=t.margin;if(!o||"object"!=typeof o)return;const n=o.right;"number"==typeof n&&100>n&&a.push({severity:"warning",code:"LEGEND_MARGIN_TIGHT",message:`showLegend is true with legendPosition="right" but margin.right=${n}px — legend may be clipped or overlap the chart.`,fix:"Increase margin.right to at least 100, e.g. margin={{ ...margin, right: 120 }}."})}(0,t,a),function(e,t,a){if("Heatmap"!==e)return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const n=o[0];if(n&&"object"==typeof n)for(const e of["xAccessor","yAccessor"]){const o=t[e];if("string"!=typeof o)continue;const r=n[o];"string"==typeof r&&a.push({severity:"warning",code:"HEATMAP_STRING_ACCESSOR",message:`${e}="${o}" resolves to string values (e.g. "${r}"). Heatmap will use categorical axis handling which may produce unexpected cell layout.`,fix:"If you intend categorical axes this is fine. Otherwise, convert values to numbers before passing data."})}}(e,t,a),function(e,t,a){const o=t.colorScheme;if(!o||!Array.isArray(o))return;const n="string"==typeof t.background?t.background:"#ffffff";if(!n.startsWith("#"))return;const r=[];for(const e of o){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ce(e,n);null!==t&&3>t&&r.push(`${e} (${t.toFixed(1)}:1)`)}r.length>0&&a.push({severity:"warning",code:"LOW_COLOR_CONTRAST",message:`${r.length} color(s) in colorScheme have < 3:1 contrast against background "${n}": ${r.join(", ")}. Data marks may be hard to see.`,fix:'Use darker colors on light backgrounds or lighter colors on dark backgrounds. Import COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for an accessible preset.'})}(0,t,a),function(e,t,a){const o=t.colorScheme;if(!o||!Array.isArray(o)||2>o.length)return;const n=o.filter(e=>"string"==typeof e&&e.startsWith("#"));if(2>n.length)return;const r=[];for(let e=0;n.length-1>e;e++){const t=ce(n[e],n[e+1]);null!==t&&1.5>t&&r.push(`${n[e]} / ${n[e+1]} (${t.toFixed(1)}:1)`)}r.length>0&&a.push({severity:"warning",code:"LOW_ADJACENT_CONTRAST",message:`${r.length} adjacent color pair(s) in colorScheme have very similar luminance: ${r.join("; ")}. Categories may be hard to distinguish.`,fix:'Alternate light and dark colors in the scheme, or use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for a pre-tested palette.'})}(0,t,a),function(e,t,a){const o=t.colorScheme;if("string"!=typeof o)return;const n=ee[e];n?.props?.colorScheme?.enum||He.has(o)||a.push({severity:"warning",code:"UNKNOWN_COLOR_SCHEME",message:`colorScheme "${o}" is not a recognized named scheme — the chart will fall back to the default palette.`,fix:`Use a known scheme name (${[...He].join(", ")}) or pass an explicit color array, e.g. colorScheme={["#1f77b4", "#ff7f0e"]}.`})}(e,t,a),function(e,t,a){const o=ee[e]?.props,n=e=>!!o?.[e]&&"string"==typeof t[e]&&t[e].trim().length>0,r=n("title"),i=n("description"),s=n("summary");r||i||s||a.push({severity:"warning",code:"MISSING_DESCRIPTION",message:"No title, description, or summary provided. Screen readers will fall back to a generic chart-type label.",fix:'Add a title="..." prop for a brief label, or description="..." for a detailed aria-label, or summary="..." for a screen-reader-only note describing the chart\'s purpose.'})}(e,t,a),function(e,t,a){const o=[];for(const e of Ge)"function"==typeof t[e]&&o.push(e);o.length>0&&a.push({severity:"warning",code:"FUNCTION_ACCESSOR",message:`Function accessor${o.length>1?"s":""} detected: ${o.join(", ")}. If defined inline (e.g. \`xAccessor={d => d.value}\`), every parent re-render creates a new reference; closures over changing values can force unnecessary scene rebuilds on resize/rotation.`,fix:'Use string accessors when possible (e.g. xAccessor="value"), or memoize with useCallback / define outside the component.'})}(0,t,a),function(e,t,a){const o=t.hoverRadius;"number"==typeof o&&o>0&&24>o&&!1!==t.enableHover&&(!1!==t.hoverAnnotation||t.tooltip||t.customHoverBehavior||t.customClickBehavior||t.onClick)&&a.push({severity:"warning",code:"TOUCH_TARGET_SMALL",message:`hoverRadius=${o}px is below the ~24px radius needed for reliable 48px touch targets on mobile screens.`,fix:"Use hoverRadius={24} or larger for touch-heavy views. Semiotic floors touch pointer hit testing to 24px, but explicit desktop-only radii should be documented."})}(0,t,a),function(e,t,a){!0===t.responsiveWidth&&!0===t.responsiveHeight&&a.push({severity:"warning",code:"RESPONSIVE_BOTH_AXES",message:"responsiveWidth and responsiveHeight are both true. On mobile this can create resize feedback loops when the parent height depends on chart content.",fix:"Prefer responsiveWidth={true} with a fixed parent height or size={[width, fixedHeight]}; use a ResizeObserver outside the chart if the height must follow aspect ratio."})}(0,t,a),function(e,t,a){if(!0!==t.showParticles)return;const o=t.particleStyle&&"object"==typeof t.particleStyle?t.particleStyle:{},n="number"==typeof o.maxPerLine?o.maxPerLine:void 0,r="number"==typeof o.spawnRate?o.spawnRate:void 0;("number"==typeof n&&n>20||"number"==typeof r&&r>.08)&&a.push({severity:"warning",code:"GEO_PARTICLE_MOBILE_COST",message:"Animated geo particles run a continuous canvas loop that can drain battery and trigger thermal throttling on mobile GPUs.",fix:"Set particleStyle={{ maxPerLine: 12, spawnRate: 0.06 }} for mobile-heavy views, or disable showParticles when reduced-motion or low-power modes are active."})}(0,t,a),function(e,t,a){const o=[];qe(t.tokenEncoding)&&o.push({source:"tokenEncoding",encoding:t.tokenEncoding}),qe(t.encoding)&&o.push({source:"encoding",encoding:t.encoding});for(const{source:e,encoding:n}of o){const o=We(t,n);for(const t of ie(n,{visibleTokens:o}))a.push({severity:"warning",code:"TOKEN_"+t.code,message:t.message,fix:"MISSING_UNIT_VALUE"===t.code?`Set ${e}.unitValue to the value represented by one full token.`:"MISSING_UNIT_MEANING"===t.code?`Set ${e}.unitMeaning so readers know what one full token represents.`:"MISSING_COUNT_STRATEGY"===t.code?`Set ${e}.countStrategy to actual, unitized, fixed-denominator, quantile, sample, posterior-sample, or random-sample.`:"TOKEN_SEMANTICS_UNCLEAR"===t.code?`Set ${e}.tokenSemantics to observed-unit, unitized-measure, risk-case, possible-outcome, posterior-sample, hypothetical-case, topic-anchor, or decorative.`:`Adjust ${e} so its semantics, strategy, labels, and visible token count match the task.`})}}(0,t,a),function(e,t,a){const o=Array.isArray(t.annotations)?t.annotations:null;if(o)for(const e of o){if(!e||"object"!=typeof e)continue;const t=Le(e);if(!Ne(e)||"widget"===t)continue;const o=Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0),n="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:t,r=Ie(e);!r&&o>Fe?a.push({severity:"warning",code:"ANNOTATION_FAR_NO_CONNECTOR",message:`Annotation "${n}" sits ~${Math.round(o)}px from its anchor with no connector — a reader can't tell what it refers to.`,fix:'Add a connector (connector: { end: "arrow" }, the label/callout default) or place the note adjacent to its target (smaller dx/dy).'}):r&&o>Ee&&a.push({severity:"warning",code:"ANNOTATION_LONG_CONNECTOR",message:`Annotation "${n}" uses a very long connector (~${Math.round(o)}px); prefer placing the note adjacent to its target when space allows.`,fix:"Reduce dx/dy so the note sits near its target, or keep the long connector only if proximity is genuinely infeasible."})}}(0,t,a),function(e,t,a){const o=Array.isArray(t.annotations)?t.annotations:null;if(!o)return;const n=o.filter(Ne).length;if(0===n)return;const r="number"==typeof t.width?t.width:600,i="number"==typeof t.height?t.height:400,s=function(e,t,a={}){return"number"==typeof a.maxAnnotations&&Number.isFinite(a.maxAnnotations)?Math.max(0,Math.floor(a.maxAnnotations)):e>0&&t>0?Math.max(1,Math.round(e*t/(a.areaPerAnnotation&&a.areaPerAnnotation>0?a.areaPerAnnotation:ze))):1/0}(r,i);Number.isFinite(s)&&n>s&&a.push({severity:"warning",code:"ANNOTATION_DENSITY",message:`${n} note annotations on a ${r}×${i} chart exceed the ~${s} notes the plot area carries comfortably — the chart may read as cluttered.`,fix:'Mark the essential notes emphasis: "primary" and let density management shed the rest (autoPlaceAnnotations: { density: true }), enable progressive disclosure to reveal secondary notes on hover, or give the chart more room.'})}(0,t,a),function(e,t,a){const o=Array.isArray(t.annotations)?t.annotations:null;if(o)for(const e of o)e&&"object"==typeof e&&"widget"===Le(e)&&null!=e.content&&!Be(e)&&a.push({severity:"warning",code:"ANNOTATION_INTERACTIVE_ID",message:"An interactive widget annotation has no stable id, so its activation cannot be normalized or replayed reliably.",fix:"Add id, stableId, or provenance.stableId to the widget annotation. Do not identify interactive annotations by array index."})}(0,t,a),function(e,t,a){for(const e of _e){const o=t[e];if(!Array.isArray(o)||2>o.length)continue;const[n,r]=o;"number"==typeof n&&"number"==typeof r&&n>r&&a.push({severity:"warning",code:"INVERTED_AXIS",message:`${e}=[${n}, ${r}] is descending — the axis renders inverted, so "up" reads as less. Inverted axes are a classic misleading-design pattern unless the inversion is the point.`,fix:`Order the extent ascending (${e}={[${r}, ${n}]}). If the inversion is deliberate (e.g. rank #1 at top), say so in the title or an annotation so readers aren't misled.`})}}(0,t,a),function(e,t,a){if("MultiAxisLineChart"!==e)return;const o=t.series;if(!Array.isArray(o)||2!==o.length)return;const n=o.filter(e=>!e||"object"!=typeof e||"string"!=typeof e.label||0===e.label.trim().length);n.length>0&&a.push({severity:"warning",code:"DUAL_AXIS_UNLABELED",message:`Dual-axis chart with ${n.length} unlabeled series. Two y-scales invite false equivalence between the lines; without per-series labels a reader can't tell which scale is whose.`,fix:'Give every series a label: series={[{ yAccessor: "a", label: "Revenue ($)" }, { yAccessor: "b", label: "Users" }]} — and consider whether two separate charts read more honestly.'})}(e,t,a),function(e,t,a){if(!ye.has(e))return;const o=t.xExtent;if(!Array.isArray(o)||2>o.length)return;const[n,r]=o;if("number"!=typeof n||"number"!=typeof r||n>=r)return;const i=t.data;if(!i||!Array.isArray(i)||4>i.length)return;const s=t.xAccessor??"x";if("string"!=typeof s)return;let c=1/0,l=-1/0;for(const e of i){const t=e?.[s];"number"==typeof t&&Number.isFinite(t)&&(c>t&&(c=t),t>l&&(l=t))}if(!Number.isFinite(c)||!Number.isFinite(l)||c>=l)return;const p=l-c,u=Math.max(0,Math.min(r,l)-Math.max(n,c))/p;.7>u&&a.push({severity:"warning",code:"CHERRY_PICKED_WINDOW",message:`xExtent=[${n}, ${r}] shows only ~${Math.round(100*u)}% of the data's x range [${c}, ${l}] — a trend cropped to a favorable window is a classic misleading-design pattern.`,fix:'Widen xExtent to cover the data, filter the data itself so the chart shows what it has, or annotate the visible window ("Q4 only") so the cropping is explicit.'})}(e,t,a),function(e,t,a){const o=ge[e],n=fe[e];if(!o&&!n)return;if(n&&!t.normalize)return;const r=o??n,i=t[r],s="string"==typeof i?i:"yAccessor"===r?"y":"value",c=t.data;if(!c||!Array.isArray(c)||0===c.length)return;const l=c.filter(e=>{const t=e?.[s];return"number"==typeof t&&0>t});l.length>0&&a.push({severity:o?"error":"warning",code:"PART_TO_WHOLE_NEGATIVE",message:`${l.length} negative value(s) in "${s}" — a part-to-whole encoding cannot represent negative parts${o?"; slice angles/areas for negatives are meaningless":"; normalized shares distort when parts are negative"}.`,fix:o?"Filter or transform negative values first, or switch to a BarChart/WaterfallChart, which encode signed values honestly.":"Drop normalize for signed data, or use a diverging BarChart so negative contributions read as negative."})}(e,t,a),function(e,t,a){me.has(e)&&"basis"===t.curve&&a.push({severity:"warning",code:"NON_PASSING_CURVE",message:'curve="basis" draws a B-spline that does NOT pass through your data points — rendered values differ from actual values everywhere except the endpoints.',fix:'Use curve="monotoneX" or curve="catmullRom" (both interpolate through every point), or keep "basis" only for deliberately schematic, clearly-labeled smoothing.'})}(e,t,a),function(e,t,a){if("LineChart"!==e&&"AreaChart"!==e)return;if("sparkline"===t.mode)return;if(t.responsiveWidth||t.responsiveHeight)return;const o="number"==typeof t.width?t.width:600,n="number"==typeof t.height?t.height:400;if(0>=o||0>=n)return;const r=o/n;if(r>8||.25>r){const e=r>8?"flattens":"exaggerates";a.push({severity:"warning",code:"EXTREME_ASPECT_RATIO",message:`${o}×${n} (${r.toFixed(1)}:1) is an extreme aspect ratio that ${e} the slopes a reader perceives — aspect-ratio distortion is a documented misleading-design pattern.`,fix:r>8?'Use a more balanced aspect (e.g. width/height between 1 and 3), or set mode="sparkline" if this is genuinely a sparkline strip.':"Use a more balanced aspect (e.g. width/height between 1 and 3); very tall trend charts overstate every change."})}}(e,t,a),function(e,t,a){if(!he.has(e))return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const n=t.categoryAccessor,r="string"==typeof n?n:"category",i=new Set;for(const e of o){const t=e?.[r];null!=t&&i.add(t)}i.size>Oe&&a.push({severity:"warning",code:"PIE_TOO_MANY_SLICES",message:`${i.size} slices — angle judgments degrade rapidly past ~${Oe} categories (Cleveland & McGill), and thin slices become unreadable and unlabelable.`,fix:`Use a BarChart or DotPlot for ${i.size} categories, or group the long tail into an "Other" slice before charting.`})}(e,t,a),function(e,t,a){if(Ce.has(e)){if("GaltonBoardChart"===e){const e=t.bins;"number"==typeof e&&2>e&&a.push({severity:"error",code:"PHYSICS_BAD_BINS",message:`bins=${e} leaves no meaningful settled projection for a Galton board.`,fix:"Use at least two bins; 8-24 bins is a practical range for physics distributions."});const o=Me(t.branchProbability);null!=t.branchProbability&&(null==o||0>o||o>1)&&a.push({severity:"error",code:"PHYSICS_BAD_BRANCH_PROBABILITY",message:`branchProbability=${t.branchProbability+""} must be between 0 and 1.`,fix:"Use branchProbability={0.5} for a balanced Galton board, or bias it within the [0, 1] range."});const n=Me(t.mechanicalCount);null==t.mechanicalCount||null!=n&&n>0||a.push({severity:"error",code:"PHYSICS_BAD_MECHANICAL_COUNT",message:`mechanicalCount=${t.mechanicalCount+""} cannot generate a mechanical Galton board.`,fix:"Use a positive mechanicalCount, for example 96."})}if("EventDropChart"===e){const e=t.windows,o=e&&"object"==typeof e?Me(e.size):null;null==o||o>0||a.push({severity:"error",code:"PHYSICS_BAD_WINDOW_SIZE",message:`windows.size=${o} cannot form event-time barriers.`,fix:"Set windows={{ size: positiveNumber }} so each event can settle into a real time window."}),"number"!=typeof t.timeScale||t.timeScale>0||a.push({severity:"error",code:"PHYSICS_BAD_TIME_SCALE",message:`timeScale=${t.timeScale} prevents arrival replay from advancing.`,fix:"Use a positive timeScale, or omit it for the default pace."});const n=Array.isArray(t.data)?t.data:[];if(n.length>0){const e=t.timeAccessor||"time",o=t.arrivalAccessor||"arrivalTime";n.some(t=>{const a=Me(De(t,e,"time")),n=Me(De(t,o,"arrivalTime"));return null!=a&&null!=n&&a!==n})||a.push({severity:"warning",code:"PHYSICS_EVENTDROP_NO_ARRIVAL_SPREAD",message:"EventDropChart data does not show distinct arrival times, so the physics replay collapses to event order.",fix:"Provide an arrivalAccessor field with event-arrival times when demonstrating lateness, watermarks, or out-of-order streams."})}}if("PhysicsPileChart"===e){const e=Me(t.mechanicalCount);null==t.mechanicalCount||null!=e&&e>0||a.push({severity:"error",code:"PHYSICS_BAD_MECHANICAL_COUNT",message:`mechanicalCount=${t.mechanicalCount+""} cannot generate a mechanical pile chart.`,fix:"Use a positive mechanicalCount, for example 80."}),"mechanical"===t.mode&&Array.isArray(t.mechanicalCategories)&&0===t.mechanicalCategories.length&&a.push({severity:"error",code:"PHYSICS_EMPTY_MECHANICAL_CATEGORIES",message:"mechanicalCategories=[] leaves no containers for the generated unit pile.",fix:"Provide at least one category label, or omit mechanicalCategories for the default set."});const o=Me(t.unitValue??1)??1;if(0>=o)return void a.push({severity:"error",code:"PHYSICS_BAD_UNIT_VALUE",message:`unitValue=${t.unitValue} cannot unitize values into physical bodies.`,fix:"Set unitValue to a positive number represented by one body."});const n=t.valueAccessor||"value",r=(Array.isArray(t.data)?t.data:[]).reduce((e,t)=>{const a=Me(De(t,n,"value"))??0;return e+Math.max(0,Math.round(a/o))},0);r>1500&&a.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`PhysicsPileChart would create about ${r} live bodies; motion may dominate the chart and stress the frame budget.`,fix:"Increase unitValue, cap visible units, or aggregate before rendering so the settled projection remains readable."})}if("CollisionSwarmChart"===e){if((Me(t.pointRadius??5)??5)>0||a.push({severity:"error",code:"PHYSICS_BAD_POINT_RADIUS",message:`pointRadius=${t.pointRadius} cannot produce collision bodies.`,fix:"Use a positive pointRadius, for example 5."}),(Me(t.collisionIterations??6)??6)>0||a.push({severity:"error",code:"PHYSICS_BAD_COLLISION_ITERATIONS",message:`collisionIterations=${t.collisionIterations} disables collision relaxation.`,fix:"Use at least one collision iteration; 4-8 is a practical range for swarms."}),null!=t.xExtent){const e=Array.isArray(t.xExtent)?t.xExtent:[],o=Me(e[0]),n=Me(e[1]);(2>e.length||null==o||null==n)&&a.push({severity:"error",code:"PHYSICS_BAD_X_EXTENT",message:"xExtent must be a numeric [min, max] pair for CollisionSwarmChart.",fix:"Pass xExtent={[min, max]} or omit it so the chart infers the domain from data."})}const e=Array.isArray(t.data)?t.data:[];e.length>1200&&a.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`CollisionSwarmChart would create ${e.length} live bodies; collision relaxation may dominate the frame budget.`,fix:"Sample, aggregate, reduce point radius, or move to a static SwarmPlot when every row does not need a physical body."});const o=t.groupAccessor;if(e.length>0&&o){const t=new Set;for(const a of e){const e=De(a,o,"group");null!=e&&t.add(e)}t.size>12&&a.push({severity:"warning",code:"PHYSICS_TOO_MANY_SWARM_LANES",message:`CollisionSwarmChart has ${t.size} group lanes, which leaves little vertical room for collision separation.`,fix:"Facet or filter groups, or use an ordinary SwarmPlot/BoxPlot for dense grouped comparison."})}}if("GaltonBoardChart"!==e&&"PhysicsPileChart"!==e&&"CollisionSwarmChart"!==e&&"ProcessFlowChart"!==e&&"EventDropChart"!==e||(null!=t.massBy||null!=t.massAccessor||t.frameProps&&"object"==typeof t.frameProps&&null!=t.frameProps.bodyMassBy)&&a.push({severity:"warning",code:"PHYSICS_DATA_IN_DYNAMICS",message:e+" appears to map a data field to mass/dynamics. Mass is not a readable quantitative channel.",fix:"Encode quantities in spawn position, bin, size, color, or glyph — keep mass/friction/restitution as process texture. Use showProjection for the truth layer."}),"PhysicsPileChart"!==e&&"GaltonBoardChart"!==e&&"CollisionSwarmChart"!==e&&"ProcessFlowChart"!==e||!1!==t.showProjection||a.push({severity:"warning",code:"PHYSICS_NO_PROJECTION",message:e+" has showProjection={false}. Without a settled projection, motion is easy to over-read as data.",fix:"Keep showProjection enabled (default) so the chart collapses to a legible static reading, or document why the process alone is the claim."}),"ProcessFlowChart"===e){const e=Array.isArray(t.stages)?t.stages:[];if(0===e.length)a.push({severity:"error",code:"PROCESS_FLOW_MISSING_STAGES",message:"ProcessFlowChart requires a non-empty stages array.",fix:'Provide stages={[{ id: "coding", force: 12 }, { id: "merged", absorb: true }]}.'});else{e.some(e=>!e||null==e.id||""===(e.id+"").trim())&&a.push({severity:"error",code:"PROCESS_FLOW_BAD_STAGE",message:"Every ProcessFlowChart stage needs a stable id.",fix:'Use stages like { id: "review", label: "Review", capacity: { unitsPerSecond: 4 } }.'});const o=e.filter(e=>e?.absorb).length;t.groupBy&&0===o&&a.push({severity:"warning",code:"PROCESS_FLOW_GROUP_NO_ABSORB",message:"groupBy is set but no stage has absorb: true, so all-members completion cannot resolve.",fix:'Mark a terminal stage with absorb: true (e.g. merged), or set groupCompletion="none".'})}}if("GauntletChart"===e&&(Array.isArray(t.negativeProperties)||a.push({severity:"warning",code:"GAUNTLET_MISSING_NEGATIVE_PROPERTIES",message:"GauntletChart usually needs negativeProperties for drag/cost bodies (empty array is ok if intentional).",fix:'Provide negativeProperties={[{ id: "cost", label: "Cost", load: 1 }]} or explicitly pass [].'})),"PhysicsPileChart"===e||"GaltonBoardChart"===e||"CollisionSwarmChart"===e||"ProcessFlowChart"===e||"EventDropChart"===e){const o=Array.isArray(t.data)?t.data:[],n=Me(t.mechanicalCount)??0,r=o.length>0?o.length*("PhysicsPileChart"===e?Math.max(1,(Me(t.unitValue),1)):1):n;r>2500&&a.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`${e} may spawn ~${Math.round(r)} live bodies, which can overwhelm the simulation loop.`,fix:"Lower mechanicalCount / unitize with a larger unitValue, enable sediment/windowSize, or sample the data before spawn."})}}}(e,t,a),{ok:a.every(e=>"warning"===e.severity),diagnoses:a}):{ok:0===a.length,diagnoses:a}}var Ye=["title","description","summary"];function Ke(e){return"string"==typeof e&&e.trim().length>0}function Xe(e,t=new Set){if(null===e)return!0;const a=typeof e;if("string"===a||"boolean"===a)return!0;if("number"===a)return Number.isFinite(e);if("object"!==a)return!1;if(t.has(e))return!1;t.add(e);const o=Array.isArray(e)?e.every(e=>Xe(e,t)):Object.entries(e).every(([,e])=>Xe(e,t));return t.delete(e),o}var Je=Symbol.for("semiotic.chartRecipeRegistry");function Qe(e){return function(){const e=globalThis;return e[Je]||(e[Je]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[Je]}().recipes.get(e)}function Ze(e){return"string"==typeof e?Qe(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}var et=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]),tt="Chartability (POUR-CAF) — https://chartability.github.io/POUR-CAF/. Not a pass/fail cert; pair with manual screen-reader testing (NVDA+Firefox, JAWS+Chrome, VoiceOver+Safari).";function at(e){return"primary"===e?.emphasis||"secondary"===e?.emphasis||null!=function(e){const t=e?.provenance?.confidence;return"number"==typeof t&&Number.isFinite(t)?t:null}(e)}function ot(e){const t=e.toLowerCase().replace(/[^a-z]/g,"");if(!t)return 0;if(3>=t.length)return 1;const a=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"").replace(/^y/,"").match(/[aeiouy]{1,2}/g);return a?a.length:1}function nt(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function rt(e,t,a={}){const o=[],n=Qe(e),r=we.has(e),i=!!ee[e]||!!n||r,s=!0===a.inChartContainer,c=!0===a.describe,l=!0===a.navigable,p=ve.has(e),u=le.has(e),{hasTitle:y,hasDescription:d,hasSummary:m,unsupportedFinding:h}=function(e,t){const a=ee[e]?.props,o=e=>!!a?.[e],n=Ye.filter(e=>Ke(t[e])&&!o(e));return{hasTitle:o("title")&&Ke(t.title),hasDescription:o("description")&&Ke(t.description),hasSummary:o("summary")&&Ke(t.summary),unsupportedFinding:n.length>0?{id:"understandable.unsupported-description-prop",principle:"understandable",heuristic:"Descriptive text is connected to the rendered chart",critical:!0,status:"warn",message:`Useful ${n.join(" and ")} text was supplied, but ${1===n.length?"that prop is":"those props are"} not supported by ${e}'s declared chart API and cannot be credited as rendered accessibility text.`,fix:"Use the component's declared title, description, and summary props when available; for richer generated description or navigation, use ChartContainer with chartConfig plus describe and/or navigable."}:void 0}}(e,t),g=!1!==t.accessibleTable&&!p,b=y||d||m,f=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(t),v=function(e){const t=nt(e),a=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===a.pause||"function"==typeof a.pause}(t),x=r,w=function(e){const t=nt(e);return!0===e.settledProjection||!0===t.settledProjection}(t)||Se.has(e)&&g,A=function(e){const t=nt(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(t)||x,S=Array.isArray(t.annotations)?t.annotations.filter(e=>!!e&&"object"==typeof e):[],C=i?"pass":"manual",$=i?"":` (unrecognized component "${e}" — verify manually that the built-in applies)`;if(h&&o.push(h),o.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},a=e.colorScheme,o="string"==typeof e.background?e.background:null;if(o&&!o.startsWith("#"))return{...t,status:"manual",message:`Background "${o}" isn't a hex literal (theme/CSS variable) — contrast can't be verified statically.`,fix:'Pass a hex `background` (e.g. "#ffffff"/"#000000"), or verify contrast manually once the theme resolves.'};const n=o??"#ffffff";if(!Array.isArray(a))return{...t,status:"manual",message:"Mark colors come from the theme/CSS variables — contrast can't be verified statically.",fix:"Confirm geometries/large text have ≥ 3:1 and regular text ≥ 4.5:1 contrast against the background."};const r=[];let i=0;for(const e of a){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ce(e,n);null!=t&&(i++,3>t&&r.push(`${e} (${t.toFixed(1)}:1)`))}return 0===i?{...t,status:"manual",message:"colorScheme has no parseable hex colors to check.",fix:"Verify contrast manually for non-hex colors."}:r.length>0?{...t,status:"fail",message:`${r.length} color(s) fall below 3:1 contrast vs ${n}: ${r.join(", ")}.`,fix:"Darken (light background) or lighten (dark background) those colors, or use COLOR_BLIND_SAFE_CATEGORICAL."}:{...t,status:"pass",message:`All ${i} checked colorScheme color(s) meet ≥ 3:1 contrast vs ${n}.`}}(t)),o.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...p?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:g?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:d&&m?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}}),o.push({id:"perceivable.small-text",principle:"perceivable",heuristic:"Small text size",critical:!0,status:"pass",message:"Semiotic's default tick and axis-label fonts are 12px, meeting Chartability's 9pt/12px floor.",fix:"If a theme or override lowers --semiotic-tick-font-size below 12px, raise it back for low-vision audiences."}),o.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=t.pulse||Ae.has(e)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),null!=t.colorBy){o.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...!0===t.directLabel||!0===t.showLabels?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:"Categories are encoded by color (colorBy) with no redundant channel — Semiotic does not yet ship texture/pattern fills.",fix:"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy), keep categories ≤ ~7, and use a CVD-safe palette."}});const e=Array.isArray(t.colorScheme)?t.colorScheme:null,a=e?e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase()):[],n=a.length>0&&a.every(e=>et.has(e));o.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...n?{status:"pass",message:"colorScheme uses Semiotic's Wong colorblind-safe palette."}:{status:"manual",message:"Color encodes meaning; statically we can't confirm the palette is colorblind-safe.",fix:'Use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic", or test your scheme with Viz Palette / Chroma.'}}),o.push({id:"flexible.textures-adjustable",principle:"flexible",heuristic:"Contrast and textures cannot be adjusted",critical:!1,status:"warn",message:"There's no per-category texture/pattern channel to toggle as an alternative to color.",fix:"Until texture fills land, ensure the encoding survives color removal: direct labels + a CVD-safe palette. Contrast itself is themeable via CSS variables."})}{const e=S.filter(Ne);if(e.length>0){const a=t.autoPlaceAnnotations,n="object"==typeof a&&null!==a&&!0===a.redundantCues,r=e.filter(e=>{if("string"!=typeof e.color)return!1;const t=Le(e),a=n&&"text"===t;return!(Ie(e)||a)});o.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===r.length?{status:"pass",message:"No annotation relies on color alone to indicate its target — wherever color is used, a connector, enclosure, or reference-line cue is present too."}:{status:"warn",message:`${r.length} of ${e.length} annotation(s) carry a color but no connector, enclosure, or reference-line cue, so a color-blind or non-visual reader can't tie them to their target (the correspondence problem).`,fix:"Add a connector (the label/callout default), place the note adjacent to its target, enclose the target, or enable autoPlaceAnnotations: { redundantCues: true } to give colored text notes a leader line — don't rely on color matching alone."}})}}o.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...i?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${e}".`,fix:"Verify Tab + arrow-key operation."}});{const e=[];null==t.brush&&null==t.onBrush||e.push("brushing"),!0===t.zoomable&&e.push("zoom/pan"),"isolate"!==t.legendInteraction&&"highlight"!==t.legendInteraction||e.push("legend filtering"),e.length>0&&o.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{const a=Pe[e];if(a&&f){const e=t[a];"number"==typeof e&&e>0&&24>2*e&&o.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${a}=${e} gives a ~${2*e}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}o.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:C,message:`The chart takes a single tab stop and navigates data with arrow keys${$} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),o.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...f?m||d?{status:"manual",message:"Chart is interactive and has descriptive text. Confirm that text explains how to interact (keyboard + pointer).",fix:'State the interaction model in summary, e.g. "Use arrow keys to move between points."'}:{status:"warn",message:"Chart is interactive but nothing explains how to use it.",fix:"Describe the interaction in a summary or nearby text (keyboard navigation, what hover/click reveals)."}:{status:"not-applicable",message:"No interactive behavior detected."}}),o.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:C,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${$}.`}),o.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:C,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${$}.`,fix:i?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),o.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...b?{status:"pass",message:`Provided: ${[y&&"title",d&&"description",m&&"summary"].filter(Boolean).join(", ")}.`}:s?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),o.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...d||m?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:c?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:y?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{const e=[t.description,t.summary].filter(Ke).join(". "),a=e?function(e){const t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),a=e.trim().split(/\s+/).filter(Boolean);if(0===a.length||0===t.length)return null;let o=0;for(const e of a)o+=ot(e);return a.length/t.length*.39+o/a.length*11.8-15.59}(e):null;o.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==a?{status:"not-applicable",message:"No description/summary text to grade."}:a>9?{status:"warn",message:`Description/summary reads at ~grade ${a.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(a))} (≤ 9).`}})}if(xe.has(e)){const e=Ke(t.xLabel),a=Ke(t.yLabel);o.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&a?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!a&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(ke.has(e)&&o.push({id:"understandable.information-complexity",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,status:"warn",message:"Dual-axis chart: two y-scales are hard to read accurately and notoriously easy to misinterpret (the crossover point is arbitrary).",fix:"Confirm the second axis is necessary; consider two aligned charts (small multiples) or indexing both series to a common baseline. Label each axis and its series unambiguously."}),S.length>1){const e=S.filter(at).length;o.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===S.length?{status:"pass",message:`All ${S.length} annotation(s) declare hierarchy through emphasis or provenance confidence, so the renderer can resolve reading order and visual priority.`}:0===e?{status:"warn",message:S.length+" annotations are present with no emphasis or provenance confidence; readers may not know which note is primary.",fix:'Mark the main annotation with emphasis="primary", set supporting notes to emphasis="secondary", or provide provenance.confidence so Semiotic can infer order.'}:{status:"warn",message:`${S.length-e} of ${S.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=t.forecast||null!=t.anomaly||null!=t.band||null!=t.regression)&&o.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=t.animate&&!1!==t.animate&&o.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:C,message:`Transitions animate with object constancy and data changes are mirrored to the live region${$}.`,fix:i?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),o.push({id:"robust.conforms-to-standards",principle:"robust",heuristic:"Does not conform to standards",critical:!1,status:"manual",message:"WCAG 2.1 / Section 508 conformance can't be settled from config alone.",fix:"Run an automated checker (axe) on the rendered output and test with real assistive tech."}),o.push({id:"robust.semantically-valid",principle:"robust",heuristic:"Semantically invalid",critical:!1,status:"manual",message:"Whether interactive elements expose correct roles/names is a render-time, screen-reader question.",fix:"Verify with a screen reader that buttons read as buttons, the chart as an image/group, etc."}),o.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:C,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${$}.`,fix:i?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),o.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...p?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:g?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}}),p||o.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...s?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),o.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:i?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${i?"":$}.`,fix:i?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),o.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...l?{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:u?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:C,message:`Keyboard navigation steps through points and switches series/groups${$}.`,fix:i?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const a=Array.isArray(t.data)?t.data:null,n=Array.isArray(t.nodes)?t.nodes:null,r={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let i;i=be.has(e)&&a&&a.length>7?{...r,status:"warn",message:a.length+" slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.",fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:n&&n.length>200?{...r,status:"warn",message:n.length+" nodes. A network this size is hard to navigate non-visually node by node.",fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:a&&a.length>5e3?{...r,status:"warn",message:a.length+" data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.",fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:a?{...r,status:"pass",message:a.length+" data points — a reasonable density for non-visual consumption."}:n?{...r,status:"pass",message:n.length+" nodes — a reasonable density for non-visual consumption."}:{...r,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},o.push(i)}{const e=Array.isArray(t.data)?t.data:null,a=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof t[e]||"string"==typeof t[e]);let n=!1;if(e&&!a)for(const t of e.slice(0,50))if(t&&"object"==typeof t){for(const e of Object.values(t))if("number"==typeof e&&Number.isFinite(e)&&Math.abs(e)>=1e5){n=!0;break}if(n)break}n&&o.push({id:"assistive.human-readable-numbers",principle:"assistive",heuristic:"Data in text is not human-readable",critical:!1,status:"warn",message:'Data includes large numbers (≥ 100,000) and no value/tick formatter — screen readers will read every digit (e.g. "six hundred fifty thousand…").',fix:'Pass valueFormat / yFormat (e.g. a compact formatter so 6,500,000 reads as "6.5M"); the formatter flows to ticks, tooltips, and the data table.'})}o.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...c?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:m?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),o.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...p?{status:"not-applicable",message:"Single value — nothing to skip."}:g?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}}),o.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:C,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${$}.`,fix:i?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),o.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...Ae.has(e)||$e.has(e)?v?{status:"pass",message:e+" animates continuously and declares an in-chart pause/stop control."}:{status:"warn",message:e+" animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.",fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:C,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${$}.`}}),r&&(o.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...v?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),o.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...w?{status:"pass",message:"A settled-projection table is declared, so non-visual readers get aggregate chart semantics instead of trajectories."}:{status:"warn",message:"Physics chart does not declare a settled projection for its accessible table.",fix:"Provide aggregate rows from the settled projection and set physics.settledProjection=true."}}),o.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...A?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{const a=!0===t.responsiveWidth||!0===t.responsiveHeight,n=je.has(e)&&!0===t.zoomable;o.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...a?{status:"pass",message:`Chart reflows to its container (${[!0===t.responsiveWidth&&"responsiveWidth",!0===t.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:n?{status:"pass",message:"Geo chart is zoomable/pannable."}:{status:"manual",message:"Fixed width/height — verify the chart survives browser zoom and reflow without clipping or loss of function.",fix:"Use responsiveWidth/responsiveHeight so the chart reflows to its container."}})}if(n){const e=n.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));e&&o.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:n.name+" declares a color encoding without a redundant cue.",fix:"Add shape, label, position, texture, or a textual category summary to the recipe encoding."}),"required"!==n.accessibility.description||Ke(t.description)||o.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:n.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),n.accessibility.fallbackTable&&!1===t.accessibleTable&&o.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:n.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const k=o.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),j={criticalsPassed:k.filter(e=>"pass"===e.status).length,criticalsEvaluated:k.length,fails:o.filter(e=>"fail"===e.status).length,warnings:o.filter(e=>"warn"===e.status).length,manual:o.filter(e=>"manual"===e.status).length,passes:o.filter(e=>"pass"===e.status).length};return{component:e,ok:!k.some(e=>"fail"===e.status),summary:j,findings:o,reference:tt}}function it(e,{onlyCritical:t=!1}={}){const a=[];for(const o of e.findings)"fail"!==o.status&&"warn"!==o.status||t&&!o.critical||a.push(o.message);return a}var st={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},ct=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function lt(e){const t=[],a=e.summary,o=e.ok?`${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`:`${a.fails} blocking failure(s) — ${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`;t.push(`${e.ok?"✓":"✗"} ${e.component}: accessibility audit (Chartability POUR-CAF)`),t.push(` ${o} · ${a.warnings} warning(s) · ${a.manual} to verify manually`);for(const a of ct){const o=e.findings.filter(e=>e.principle===a&&"not-applicable"!==e.status);if(0!==o.length){t.push(""),t.push(" "+a.toUpperCase());for(const e of o)t.push(` ${st[e.status]} ${e.id}${e.critical?" [critical]":""}: ${e.message}`),!e.fix||"fail"!==e.status&&"warn"!==e.status&&"manual"!==e.status||t.push(" → "+e.fix)}}return t.push(""),t.push(" Ref: "+e.reference),t.join("\n")}function pt(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function ut(e,t){const{when:a}=e,o=t.width,n=t.height,r=function(e){if("number"==typeof e.height&&e.height>0)return e.width/e.height}(t),i=function(e){if("number"==typeof e.height&&e.height>0)return e.height>e.width?"portrait":"landscape"}(t);return!("number"==typeof a.minWidth&&a.minWidth>o||"number"==typeof a.maxWidth&&o>a.maxWidth||"number"==typeof a.minHeight&&("number"!=typeof n||a.minHeight>n)||"number"==typeof a.maxHeight&&("number"!=typeof n||n>a.maxHeight)||"number"==typeof a.minAspectRatio&&("number"!=typeof r||a.minAspectRatio>r)||"number"==typeof a.maxAspectRatio&&("number"!=typeof r||r>a.maxAspectRatio)||a.orientation&&i!==a.orientation)}function yt(e,t,a=e.responsiveRules){if(!Array.isArray(a)||0===a.length)return{props:e,matches:[]};const o=a.map((e,t)=>({rule:e,index:t})).filter(e=>ut(e.rule,t)).sort((e,t)=>("number"==typeof e.rule.priority?e.rule.priority:e.index)-("number"==typeof t.rule.priority?t.rule.priority:t.index));return{props:o.reduce((e,t)=>function(e,t){const a={...e,...t};for(const o of["margin","frameProps","mobileSemantics","style"])pt(e[o])&&pt(t[o])&&(a[o]={...e[o],...t[o]});return"string"==typeof e.className&&"string"==typeof t.className&&(a.className=`${e.className} ${t.className}`),a}(e,t.rule.transform),e),matches:o}}var dt="Mobile visualization audit: informed by MobileVisFixer, mobile exploratory interaction research, small-multiple mobile studies, responsive visualization grammars, constraint-based breakpoints, and WCAG 2.2 input modalities.",mt=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart","RealtimeLineChart","RealtimeHeatmap"]),ht=new Set(["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","DotPlot","RidgelinePlot","FunnelChart","LikertChart","SwimlaneChart"]),gt={Scatterplot:["pointRadius","hoverRadius"],BubbleChart:["pointRadius","hoverRadius"],ConnectedScatterplot:["pointRadius","hoverRadius"],QuadrantChart:["pointRadius","hoverRadius"],SwarmPlot:["pointRadius","hoverRadius"],DotPlot:["dotRadius","hoverRadius"]};function bt(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function ft(e){return"string"==typeof e&&e.trim().length>0}function vt(e){const t=bt(e.capability)?e.capability:null,a=bt(e.recipe)?e.recipe:null,o=[e.mobileSemantics,e.mobileVisualization,e.mobile,t?.mobile,a?.mobile];for(const e of o)if(bt(e))return e;return null}function xt(e){return Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1]&&Number.isFinite(e[0])&&Number.isFinite(e[1])?[e[0],e[1]]:null}function wt(e){return xt(e.size)||xt(bt(e.frameProps)?e.frameProps.size:void 0)||("number"==typeof e.width&&"number"==typeof e.height?[e.width,e.height]:null)}function At(e,t){e.push({...t,status:"pass"})}function St(e,t){e.push({...t,status:"warn"})}function Ct(e,t){e.push({...t,status:"manual"})}function $t(e,t={},a={}){const o=a.viewportWidth??390,n=a.targetSize??44,r=wt(t),i=yt(t,{width:o,height:r?.[1]}),s=[],c=wt(t=i.props),l=vt(t),p=function(e,t){return e.includes("CustomChart")||e.includes("Custom")||null!=t.recipeId||null!=t.mobileSemantics}(e,t),u=function(e){const t=vt(e);return!0===e.responsive||!0===e.mobile||!0===t?.responsive||!0===t?.supportsResponsiveLayout||Array.isArray(t?.breakpoints)||"number"==typeof t?.minViewportWidth||"responsive"===t?.strategy||"small-multiples"===t?.strategy||"summary-cards"===t?.strategy||null!=e.mobileLayout||null!=e.responsiveRules||"mobile-readable"===e.density}(t),y=!0===a.inChartContainer,d=ft(t.title)||ft(t.summary)||ft(t.description)||!0===l?.summary||ft(l?.summary);if(i.matches.length>0&&At(s,{id:"layout.responsive-rule-applied",category:"layout",impact:"medium",message:`${i.matches.length} responsive rule(s) applied for the ${o}px mobile audit.`}),c){const[t,a]=c;t>o&&!u?St(s,{id:"layout.fixed-desktop-size",category:"layout",impact:"high",message:`Chart size is ${t}px wide against a ${o}px mobile viewport with no responsive/mobile transform hint.`,fix:"Use responsive sizing, responsiveRules/mobileLayout, or an explicit mobile variant that preserves the task instead of clipping the desktop chart."}):At(s,{id:"layout.fixed-desktop-size",category:"layout",impact:"high",message:"No fixed desktop-width overflow risk is visible from the config."}),"number"==typeof l?.minViewportWidth&&l.minViewportWidth>o&&St(s,{id:"layout.mobile-min-width",category:"layout",impact:"high",message:`The declared mobile contract supports ${l.minViewportWidth}px minimum, wider than the audited ${o}px viewport.`,fix:"Add a narrower breakpoint, summary-card fallback, or explicit horizontal-scroll affordance with a non-visual equivalent."});const n=t/Math.max(1,a);430>=o&&n>2.4&&"BigNumber"!==e&&St(s,{id:"layout.wide-aspect-ratio",category:"layout",impact:"medium",message:`Chart aspect ratio is ${n.toFixed(1)}:1, which tends to compress phone charts vertically.`,fix:"Prefer stacked sections, small multiples, cards plus a sparkline, or a taller mobile-specific chart ratio."}),160>a&&"BigNumber"!==e&&St(s,{id:"layout.too-short-for-reading",category:"layout",impact:"medium",message:`Chart height is ${a}px; most phone charts need enough vertical room for marks plus readable labels.`,fix:"Reserve more vertical space, remove nonessential axes, or switch to a card/sparkline pattern with external labels."})}else Ct(s,{id:"layout.unknown-size",category:"layout",impact:"medium",message:"No explicit size is available to audit. This may be responsive, but static mobile overflow cannot be checked.",fix:"Audit rendered widths at 320, 360, 390, and 430px, or pass size/responsiveRules metadata into the config."});const m=function(e){const t=[e.data,e.points,e.lines,e.nodes,e.edges,e.areas,bt(e.frameProps)?e.frameProps.data:void 0];let a=0;for(const e of t)Array.isArray(e)&&(a+=e.length);return a}(t);m>0&&(m>("number"==typeof l?.maxMarks?l.maxMarks:mt.has(e)?1.25*o:ht.has(e)?Math.max(8,Math.floor(o/34)):o)?St(s,{id:"density.mark-budget",category:"density",impact:mt.has(e)?"medium":"high",message:`${m} data item(s) exceed the rough mobile density budget for ${e} at ${o}px.`,fix:"Aggregate, filter, facet into small multiples, switch to a summary-card plus detail view, or use progressive disclosure."}):At(s,{id:"density.mark-budget",category:"density",impact:"medium",message:m+" data item(s) are within the rough mobile density budget for this component."}));const h=function(e){const t=[e.tickValues,e.xTickValues,e.yTickValues,e.rTickValues,e.oTickValues];let a=0;for(const e of t)Array.isArray(e)&&(a+=e.length);return a>0?a:null}(t),g=!1!==t.showAxes&&!1!==t.axis;if(g&&null!=h){const e=Math.max(3,Math.floor(o/58));h>e&&St(s,{id:"density.explicit-tick-count",category:"density",impact:"medium",message:`${h} explicit tick(s) exceed a phone-friendly budget of about ${e} at ${o}px.`,fix:"Use adaptive ticks, fewer tickValues, direct labels, or move exact values into a tap-accessible detail panel."})}else g&&(mt.has(e)||ht.has(e))&&Ct(s,{id:"density.axis-label-collision",category:"density",impact:"medium",message:"Axes are enabled, but label collision depends on rendered tick text and cannot be checked statically.",fix:"Verify tick labels at phone widths or provide explicit mobile tick density."});!function(e){const t=bt(e.frameProps)?e.frameProps:{};return(!0===e.enableHover||null!=e.tooltipContent||null!=e.tooltip||null!=t.tooltipContent||!0===t.enableHover)&&!function(e){const t=vt(e),a=bt(e.mobileInteraction)?e.mobileInteraction:null;return null!=e.controls||null!=e.mobileControls||!0===e.alternativeControls||null!=e.selection||null!=e.onClick||null!=e.onSelect||!0===e.mobileInteraction||!0===a?.tapToSelect||!0===a?.tapToLockTooltip||Array.isArray(t?.interaction?.alternatives)&&t.interaction.alternatives.length>0||"tap"===t?.interaction?.primary||"button"===t?.interaction?.primary||ft(t?.interaction?.hoverFallback)}(e)}(t)?At(s,{id:"interaction.hover-only-detail",category:"interaction",impact:"high",message:"No hover-only detail path is visible from the config."}):St(s,{id:"interaction.hover-only-detail",category:"interaction",impact:"high",message:"The chart exposes tooltip/hover detail without an obvious tap, selection, or control alternative.",fix:"Enable tap-to-select, a persistent details panel, visible segment buttons, or another non-hover path for the same information."});const b=function(e,t){const a=gt[e];if(!a)return null;let o=a.includes("hoverRadius")?30:null;for(const e of a){const a=t[e];"number"==typeof a&&Number.isFinite(a)&&a>0&&(o=null==o?a:Math.max(o,a))}return null==o?null:2*o}(e,t),f=bt(t.mobileInteraction)?t.mobileInteraction:null,v=b??("number"==typeof f?.targetSize?f.targetSize:!0===t.mobileInteraction?44:"number"==typeof l?.minimumHitTarget?l.minimumHitTarget:"number"==typeof l?.interaction?.targetSize?l.interaction.targetSize:null);null!=v&&(24>v?St(s,{id:"interaction.target-size-minimum",category:"interaction",impact:"high",message:`Small interactive marks expose an estimated ${v}px pointer target, below WCAG's 24px minimum.`,fix:"Increase mark radius/hoverRadius, add tap snapping to nearest datum, or provide larger external controls."}):n>v?St(s,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${v}px, above 24px but below the ${n}px comfortable phone target.`,fix:"Use hoverRadius/tapRadius near 44px while keeping the visible mark small if needed."}):At(s,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${v}px, meeting the configured ${n}px target.`}));const x=[];null==t.brush&&null==t.onBrush||x.push("brush"),!0===t.zoomable&&x.push("pan/zoom"),"isolate"!==t.legendInteraction&&"highlight"!==t.legendInteraction||x.push("legend filtering"),x.length>0&&!function(e,t){const a=vt(e),o=bt(e.mobileInteraction)?e.mobileInteraction:null,n=o?.standardControls;return!!(null!=e.controls||null!=e.mobileControls||!0===e.alternativeControls||Array.isArray(a?.interaction?.alternatives)&&a.interaction.alternatives.length>0)||!0===n||"all"===n||t.every(e=>"brush"===e?Array.isArray(n)?n.includes("brush"):"brush"===n:"pan/zoom"===e?Array.isArray(n)?n.includes("zoom"):"zoom"===n:"legend filtering"===e&&(Array.isArray(n)?n.includes("legend"):"legend"===n))}(t,x)&&St(s,{id:"interaction.complex-gesture-alternative",category:"interaction",impact:"high",message:`Mobile-hostile complex interaction detected: ${x.join(", ")} without standard control alternatives.`,fix:"Pair gestures with buttons, range inputs, chips, or a details panel that works with touch and keyboard."}),!1===t.showLegend||!1===t.legend||!0!==t.showLegend&&!0!==t.legend&&null==t.colorBy&&null==t.groupBy&&null==t.lineBy&&null==t.areaBy&&null==t.stackBy||!0===t.directLabel||!0===t.showLabels||"direct"===t.labelStrategy||"direct-end"===t.labelStrategy||"direct"===l?.labels?.strategy||"inline"===l?.labels?.strategy||"external"===l?.labels?.strategy||o>430||St(s,{id:"semantics.legend-over-direct-labels",category:"semantics",impact:"medium",message:"The chart appears to rely on a legend instead of direct labels at phone width.",fix:"Prefer direct end labels, inline labels, or a compact chip selector so readers do not bounce between plot and legend."});const w=Array.isArray(t.annotations)?t.annotations.filter(e=>bt(e)):[];if(w.length>("number"==typeof l?.maxAnnotations?l.maxAnnotations:3)&&430>=o&&St(s,{id:"annotation.mobile-density",category:"annotation",impact:"medium",message:w.length+" annotation(s) compete for phone plot space.",fix:"Assign annotation priority, collapse secondary notes into a callout list, or provide shorter mobileText."}),w.length>0){const e=w.filter(e=>!ft(e.mobileText)&&!ft(e.shortText)&&!ft(e.label));e.length>0&&Ct(s,{id:"annotation.mobile-copy",category:"annotation",impact:"low",message:e.length+" annotation(s) lack explicit short/mobile copy.",fix:"Add mobileText or shortText for notes that need to survive narrow layouts."})}u||"BigNumber"===e||Ct(s,{id:"layout.no-responsive-transform",category:"layout",impact:"low",message:"No explicit responsive transformation hint is present.",fix:"Declare responsiveRules/mobileLayout or a density/label strategy so the mobile version is a designed transformation, not an accidental resize."}),p&&(l?(At(s,{id:"semantics.custom-mobile-contract",category:"semantics",impact:"medium",message:"Custom chart/recipe provides a mobileSemantics/mobile contract, so the audit can inspect its authored phone behavior."}),!1===l.custom?.dataBearingSceneNodes?St(s,{id:"semantics.custom-data-bearing-scene",category:"semantics",impact:"medium",message:"Custom mobile contract says emitted scene nodes are not data-bearing.",fix:"Preserve datum references, semantic roles, or accessible-table fields so intelligence, navigation, and tap details can recover the chart's meaning."}):!0!==l.custom?.dataBearingSceneNodes&&Ct(s,{id:"semantics.custom-data-bearing-scene",category:"semantics",impact:"low",message:"Custom chart mobile contract does not state whether scene nodes are data-bearing.",fix:"Set mobile.custom.dataBearingSceneNodes and mobile.custom.navigationGranularity for custom layouts and interoperability adapters."})):Ct(s,{id:"semantics.custom-mobile-contract",category:"semantics",impact:"medium",message:"Custom chart layout is opaque to static mobile analysis because no mobileSemantics/mobile contract is present.",fix:"Declare mobileSemantics with strategy, breakpoints, mark budgets, touch target size, interaction alternatives, and custom scene semantics."})),d||y||St(s,{id:"semantics.no-mobile-summary",category:"semantics",impact:"medium",message:"No title, summary, description, or ChartContainer context is visible from the config.",fix:"Add title/summary text or wrap in ChartContainer so the small-screen reader gets the task before the chart."});const A=s.filter(e=>"warn"===e.status),S={highRisk:A.filter(e=>"high"===e.impact).length,warnings:A.length,manual:s.filter(e=>"manual"===e.status).length,passes:s.filter(e=>"pass"===e.status).length};return{component:e,viewportWidth:o,ok:0===S.highRisk,summary:S,findings:s,reference:dt}}var kt={pass:"PASS",warn:"WARN",manual:"MANUAL","not-applicable":"N/A"},jt=["layout","density","interaction","annotation","semantics"];function Pt(e){const t=[],a=e.summary,o=e.ok?`no high-risk mobile blockers at ${e.viewportWidth}px`:`${a.highRisk} high-risk mobile issue(s) at ${e.viewportWidth}px`;t.push(`${e.ok?"PASS":"WARN"} ${e.component}: mobile visualization audit`),t.push(` ${o} - ${a.warnings} warning(s) - ${a.manual} manual check(s)`);for(const a of jt){const o=e.findings.filter(e=>e.category===a&&"not-applicable"!==e.status);if(0!==o.length){t.push(""),t.push(" "+a.toUpperCase());for(const e of o)t.push(` ${kt[e.status]} [${e.impact}] ${e.id}: ${e.message}`),!e.fix||"warn"!==e.status&&"manual"!==e.status||t.push(" -> "+e.fix)}}return t.push(""),t.push(" Ref: "+e.reference),t.join("\n")}function Rt(){return["Static audit only: rendered label collision, CSS-resolved type size, and actual touch behavior still require viewport testing.","Use multiple widths, usually 320, 360, 390, 430, and 768 CSS pixels.","A mobile pass means no high-risk static warnings, not that the chart is perceptually or ergonomically optimal."]}function Tt(e,t){if("function"==typeof e)return t=>+e(t);const a=e||t;return e=>+e[a]}function Lt(e,t){if("function"==typeof e)return e;const a=e||t;return e=>e[a]}var Nt=new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),It=new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),zt=new Set(["PieChart","DonutChart","FunnelChart"]),Bt=new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]);function Ft(e,t){return It.has(e)||zt.has(e)||"SwimlaneChart"===e||"GaugeChart"===e?{measure:t.valueAccessor,measureFallback:"value",dimension:t.categoryAccessor??t.stepAccessor,dimensionFallback:"category"}:{measure:t.yAccessor??t.valueAccessor,measureFallback:"y",dimension:t.xAccessor,dimensionFallback:"x"}}function Et(e){for(const t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){const a=e[t];if("string"==typeof a&&a)return a}}function _t(e,t){return null==e?"—":e instanceof Date?e.toISOString().slice(0,10):"number"==typeof e?t(e):e+""}function Ot(e,t={}){const a=!0===t.showRetractedAnnotations,o=!0===t.showSupersededAnnotations,n=new Set;for(const t of e){const e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&n.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!a)return!1;const t=e?.provenance?.stableId;return!(t&&n.has(t)&&!o)})}function Mt(e){return"string"==typeof e?e:e.id??e.name}function Dt(e){return e.layoutConfig&&"object"==typeof e.layoutConfig?e.layoutConfig:{}}function Ht(e){return Array.isArray(e.data)?e.data:Array.isArray(e.nodes)?e.nodes:Array.isArray(e.points)?e.points:Array.isArray(e.areas)?e.areas:[]}function Gt(e,t,a){return a??Ze(t.recipe)??Ze(t.recipeId)??Qe(e)}function qt(e,t,a=[]){const o=e.accessor?t[e.accessor]:void 0;if("string"==typeof o&&o)return o;if(e.field)return e.field;const n=a.find(e=>e&&"object"==typeof e);if(!n)return;const r=Object.entries(n).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?r.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>e in n):r.find(([,e])=>"string"==typeof e)?.[0]}function Ut(e,t){return e.dataRoles.find(e=>e.role===t)}function Wt(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function Vt(e,t,a,o,n,r={}){const i={...r};if(t)for(const[e,a]of Object.entries(t))i[e]=a;for(const e of a.dataRoles){const a=qt(e,o,n),r=t&&a?t[a]:a;void 0!==r&&(i[e.role]=r)}return e.replace(/\{([^}]+)\}/g,(e,t)=>{const a=i[t];return null==a?`{${t}}`:a+""})}var Yt={LineChart:"line chart",AreaChart:"area chart",StackedAreaChart:"stacked area chart",DifferenceChart:"difference chart",Scatterplot:"scatter plot",BubbleChart:"bubble chart",ConnectedScatterplot:"connected scatter plot",QuadrantChart:"quadrant chart",MultiAxisLineChart:"dual-axis line chart",CandlestickChart:"candlestick chart",Heatmap:"heatmap",MinimapChart:"line chart",BarChart:"bar chart",StackedBarChart:"stacked bar chart",GroupedBarChart:"grouped bar chart",DotPlot:"dot plot",Histogram:"histogram",BoxPlot:"box plot",ViolinPlot:"violin plot",RidgelinePlot:"ridgeline plot",SwarmPlot:"swarm plot",PieChart:"pie chart",DonutChart:"donut chart",FunnelChart:"funnel chart",GaugeChart:"gauge",LikertChart:"Likert chart",SwimlaneChart:"swimlane chart",ForceDirectedGraph:"network graph",SankeyDiagram:"Sankey diagram",ProcessSankey:"temporal Sankey diagram",ChordDiagram:"chord diagram",TreeDiagram:"tree diagram",Treemap:"treemap",CirclePack:"circle-packing chart",OrbitDiagram:"orbit diagram",ChoroplethMap:"choropleth map",ProportionalSymbolMap:"proportional-symbol map",FlowMap:"flow map",DistanceCartogram:"distance cartogram",BigNumber:"single value",StreamPhysicsFrame:"physics stream frame",EventDropChart:"event-drop physics chart",GaltonBoardChart:"Galton board chart",PhysicsPileChart:"physics pile chart",CollisionSwarmChart:"collision swarm chart",PhysicalFlowChart:"physical flow chart",ProcessFlowChart:"process flow physics chart",PhysicsCustomChart:"custom physics chart"},Kt=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),Xt=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]);function Jt(e){return Yt[e]||e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()+" chart"}function Qt(e){const t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}var Zt=new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),ea={"outlier-detection":"alerting","change-detection":"alerting",trend:"tracking","composition-over-time":"apportioning","compare-series":"comparing","compare-categories":"comparing",rank:"ranking","part-to-whole":"apportioning",distribution:"characterizing",correlation:"relating",flow:"tracing",hierarchy:"nesting",geo:"locating"},ta={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},aa=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],oa={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"};function na(e){return ea[e]}function ra(e,t){const a=function(e){if(e){if("fits"in e||"buildProps"in e){const t=e,a={};for(const[e,o]of Object.entries(t.intentScores))"number"==typeof o&&Number.isFinite(o)&&(a[e]=o);return{family:t.family,intentScores:Object.keys(a).length?a:void 0}}return e}}(t);if(a?.act)return a.act;if(a?.intentScores){const e=function(e){let t,a=0;for(const[o,n]of Object.entries(e))if("number"==typeof n&&n>0)if(n>a)t=o,a=n;else if(n===a&&void 0!==t){const e=aa.indexOf(o),a=aa.indexOf(t);-1===e||-1!==a&&e>=a||(t=o)}return t}(a.intentScores);if(e&&ea[e]&&(a.intentScores[e]??0)>=3)return ea[e]}return a?.family?ta[a.family]:function(e){return zt.has(e)||"StackedAreaChart"===e?"apportioning":Zt.has(e)?"relating":It.has(e)?"comparing":Bt.has(e)?"characterizing":Nt.has(e)?"tracking":Kt.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}var ia=new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),sa=new Set(["system","agent","watcher"]),ca=new Set(["ai","agent","system","computed","dbt","great-expectations"]),la=new Set(["rule","statistical-test","llm-inference","computed"]);function pa(e){const t=e.annotations;return!!Array.isArray(t)&&t.some(e=>{if(!e||"object"!=typeof e)return!1;const t=e;if("string"!=typeof t.type||!ia.has(t.type))return!1;const a=t.provenance;return!(!a||"object"!=typeof a)&&(sa.has(a.authorKind)||ca.has(a.source)||la.has(a.basis))})}function ua(e="en"){let t,a;try{t=new Intl.NumberFormat(e,{notation:"compact",maximumFractionDigits:1}),a=new Intl.NumberFormat(e,{maximumFractionDigits:2})}catch{t=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),a=new Intl.NumberFormat("en",{maximumFractionDigits:2})}return e=>Number.isFinite(e)?1e4>Math.abs(e)?a.format(e):t.format(e):e+""}var ya={"y-threshold":"a threshold line","x-threshold":"a threshold line",band:"a highlighted band","x-band":"a highlighted band",label:"a label",callout:"a callout","callout-circle":"a callout","callout-rect":"a callout",text:"a text note",bracket:"a bracket",enclose:"an enclosure","rect-enclose":"an enclosure",highlight:"a highlight",widget:"a widget",trend:"a trend line",envelope:"an envelope","anomaly-band":"an anomaly band",forecast:"a forecast","category-highlight":"a category highlight"};function da(e){const t=ya["string"==typeof e.type?e.type:"annotation"]||"an annotation",a=function(e){const t=e.provenance&&"object"==typeof e.provenance?e.provenance:null,a=t?.authorKind??t?.source??t?.basis;return"watcher"===a?"a watcher-flagged ":"agent"===a||"ai"===a||"llm-inference"===a?"an AI-suggested ":""}(e),o=a?a+t.replace(/^an? /,""):t,n="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return n?`${o} labeled "${n}"`:o}function ma(e){const t=Array.isArray(e.annotations)?e.annotations:null;if(!t||0===t.length)return;const a=Ot(t.filter(e=>!!e&&"object"==typeof e));if(0===a.length)return;const o=a.map(da),n=o.slice(0,5),r=o.length-n.length,i=function(e){return e.length>1?2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`:e[0]??""}(n)+(r>0?`, and ${r} more`:""),s=a.length;return`The author has marked ${1===s?"one feature":s+" features"} on this chart: ${i}.`}function ha(e,t,a={}){const o=void 0!==a.levels,n=new Set(a.levels??["l1","l2","l3"]);o||!a.capability&&!pa(t)||n.add("l4");const r=Gt(e,t,a.recipe);if(r){const e=["l1","l2","l3","l4"].filter(e=>n.has(e));o||e.includes("l4")||e.push("l4");const i=function(e,t,a={}){const o=Ht(t),n=Dt(t),r=a.locale??"en",i="function"==typeof e.description?e.description({data:o,config:n,locale:r}):void 0,s=i?.levels??function(e,t,a,o){const n=Wt(e,["nominal","ordinal"]),r=Wt(e,["quantitative"]),i=n?qt(n,a,t):void 0,s=r?qt(r,a,t):void 0,c=n?.role??i??"category",l=r?.role??s??"value",p=e.encodings??[],u=p.length?p.slice(0,3).map(e=>e.meaning.replace(/\.$/,"")).join("; "):`${c} and ${l} are mapped through the recipe's declared visual semantics`,{number:y,percent:d}=function(e){try{return{number:new Intl.NumberFormat(e,{maximumFractionDigits:2}),percent:new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1})}}catch{return{number:new Intl.NumberFormat("en",{maximumFractionDigits:2}),percent:new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:1})}}}(o),m=new Map;if(i&&s)for(const e of t){const t=(e[i]??"Uncategorized")+"",a=Number(e[s]);Number.isFinite(a)&&m.set(t,(m.get(t)??0)+a)}const h=[...m].sort((e,t)=>t[1]-e[1]),g=h.reduce((e,[,t])=>e+t,0),b=h[0],f=h[1],v=g>0?((b?.[1]??0)+(f?.[1]??0))/g:0,x=e.intents.map(e=>({id:Mt(e),strength:"string"==typeof e?void 0:e.strength})).sort((e,t)=>"primary"===e.strength?-1:"primary"===t.strength?1:0)[0]?.id,w=e.audience?.primary??e.audienceFit?.find(e=>"strong"===e.fit)?.audience;return{l1:`A ${e.name.toLowerCase()} encodes ${c} and ${l}. ${A=u,A?A.charAt(0).toUpperCase()+A.slice(1):A}.`,l2:h.length>0?`${h.length} categories total ${y.format(g)}. ${b[0]} accounts for ${y.format(b[1])}${g>0?` (${d.format(b[1]/g)})`:""}${f?`, followed by ${f[0]} at ${y.format(f[1])}`:""}.`:`${t.length} data ${1===t.length?"item is":"items are"} represented.`,l3:2>h.length?b?b[0]+" is the only represented category.":"No quantitative pattern can be derived from the available data.":.5>v?`The total is distributed across ${h.length} categories without the first two forming a majority.`:`Most of the total is concentrated in ${b[0]} and ${f[0]}, which together account for ${d.format(v)}.`,l4:`The chart is intended for ${x??"explanation"}${w?` with a ${w} audience`:""}: ${e.designContract.whyCustom}`};var A}(e,o,n,r),c=a.levels??["l1","l2","l3","l4"],l={};for(const e of c)s[e]&&(l[e]=s[e]);const p=["l1","l2","l3","l4"].map(e=>l[e]).filter(e=>!!e).join(" "),u=a.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>"Misuse: "+e)]:void 0;return{text:p,levels:l,...u?.length?{caveats:u}:{}}}(r,t,{levels:e,locale:a.locale,audience:a.audience,includeCaveats:a.includeCaveats}),s=ma(t);return{...i,text:s?`${s} ${i.text}`.trim():i.text,...s?{annotations:s}:{}}}const i=ua(a.locale??"en"),s=Jt(e),c=Array.isArray(t.data)?t.data:null,l=Et(t),p=Xt.has(e)?function(e,t){const a=e.physics&&"object"==typeof e.physics?e.physics:null,o=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,n=[e.settledProjectionRows,e.projectionRows,o?.rows,a?.settledProjectionRows,a?.projectionRows,a?.settledProjection&&"object"==typeof a.settledProjection?a.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(n)?n.map((e,a)=>{if(!e||"object"!=typeof e)return null;const o=e,n=Qt(o.count??o.value??o.total??o.bodies??o.events);if(null==n)return null;const r=o.label??o.id??o.name??"container "+(a+1),i=Qt(o.secondary??o.secondaryCount),s=Qt(o.observed??o.observedCount);return{label:_t(r,t),count:n,...null!=i?{secondary:i}:{},..."string"==typeof o.secondaryLabel&&o.secondaryLabel?{secondaryLabel:o.secondaryLabel}:{},...null!=s?{observed:s}:{}}}).filter(e=>null!=e):null}(t,i):null,{measure:u,measureFallback:y,dimension:d,dimensionFallback:m}=Ft(e,t),h="string"==typeof u&&u?u:y,g="string"==typeof d&&d?d:m,b={};if(Xt.has(e)&&function(e,t,a,o,n,r){const i=function(e){return"EventDropChart"===e?"time window":"GaltonBoardChart"===e?"bin":"CollisionSwarmChart"===e?"group lane":"PhysicalFlowChart"===e?"flow node":"container"}(e),s=function(e){return"EventDropChart"===e?"event":"GaltonBoardChart"===e?"sample":"CollisionSwarmChart"===e?"point":"PhysicalFlowChart"===e?"packet":"body"}(e);if(n.has("l1")&&(o.l1=function(e,t){return"EventDropChart"===e?"An event-drop physics chart that collapses moving events into a settled projection by event-time window.":"GaltonBoardChart"===e?"A Galton board chart that collapses falling samples into a settled histogram projection.":"PhysicsPileChart"===e?"A physics pile chart that collapses moving bodies into a settled bar-style projection by container.":"CollisionSwarmChart"===e?"A collision swarm chart that separates overlapping points while preserving their quantitative axis position.":"PhysicalFlowChart"===e?"A physical flow chart that keeps authored routes visible while packet bodies show throughput and proximity events.":`A ${t} whose accessible reading is the settled projection rather than individual trajectories.`}(e,t)),!n.has("l2")&&!n.has("l3"))return;if(!a||0===a.length)return void(n.has("l2")&&(o.l2="No settled projection is loaded yet."));const c=a.reduce((e,t)=>e+t.count,0),l=a.filter(e=>e.count>0).sort((e,t)=>t.count-e.count),p=l[0]??a.slice().sort((e,t)=>t.count-e.count)[0];if(!p)return;const u=a.reduce((e,t)=>e+(t.secondary??0),0),y=a.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(n.has("l2"))if(0===l.length)o.l2=`The settled projection contains ${r(c)} ${ba(c,s)} across ${a.length} ${ba(a.length,i)}; no ${ba(2,i)} are non-empty yet.`;else{const e=u>0?` ${r(u)} ${ba(u,s)} ${1===u?"is":"are"} marked ${y}.`:"";o.l2=`The settled projection contains ${r(c)} ${ba(c,s)} across ${a.length} ${ba(a.length,i)}; ${l.length} ${ba(l.length,i)} ${1===l.length?"is":"are"} non-empty. The largest ${i} is ${p.label} with ${r(p.count)} ${ba(p.count,s)}.${e}`}if(n.has("l3")&&c>0&&l.length>0){const e=l.find(e=>e!==p),t=function(e,t){if(0>=t)return"0%";const a=e/t*100;return(10>a?Math.round(10*a)/10:Math.round(a))+"%"}(p.count,c);o.l3=e?`The settled projection is most concentrated in ${p.label}, which holds ${r(p.count)} ${ba(p.count,s)} (${t}); ${e.label} follows with ${r(e.count)} ${ba(e.count,s)}.`:`The settled projection is concentrated in ${p.label}, which holds all ${r(p.count)} ${ba(p.count,s)}.`}}(e,s,p,b,n,i),n.has("l1")&&!Xt.has(e))if(Nt.has(e)||It.has(e))b.l1=`A ${s} of ${h} by ${g}`+(l?`, split by ${l}.`:".");else if(zt.has(e))b.l1=`A ${s} showing ${h} across ${g} categories.`;else if(Bt.has(e))b.l1=`A ${s} of the distribution of ${h}`+(l?` by ${l}.`:".");else if(Kt.has(e)){const e=Array.isArray(t.nodes)?t.nodes.length:void 0,a=Array.isArray(t.edges)?t.edges.length:void 0,o=[null!=e?`${e} ${ba(e,"node")}`:null,null!=a?`${a} ${ba(a,"edge")}`:null].filter(Boolean);b.l1=`A ${s}${o.length?" with "+o.join(" and "):""}.`}else if("BigNumber"===e){const e="string"==typeof t.label?t.label:h;b.l1=`A single value${e?" for "+e:""}.`}else b.l1=`A ${s}.`;const f=Nt.has(e)||It.has(e)||zt.has(e)||Bt.has(e);let v=null;if((n.has("l2")||n.has("l3")||n.has("l4"))&&f&&c&&c.length>0&&(v=function(e,t,a,o){let n=0,r=0,i=1/0,s=-1/0,c=null,l=null,p=0,u=0,y=null,d=null,m=NaN,h=NaN;for(const a of e){const e=t(a);Number.isFinite(e)&&(0===n&&(m=e,y=a),h=e,d=a,i>e&&(i=e,c=a,p=n),e>s&&(s=e,l=a,u=n),n++,r+=e)}return 0===n?null:{count:n,min:i,max:s,mean:r/n,minLabel:_t(null!=c?a(c):null,o),maxLabel:_t(null!=l?a(l):null,o),first:m,last:h,firstLabel:_t(null!=y?a(y):null,o),lastLabel:_t(null!=d?a(d):null,o),minIndex:p,maxIndex:u}}(c,Tt(u,y),Lt(d,m),i)),n.has("l2")&&f&&(c&&0!==c.length?v&&(b.l2=zt.has(e)?`${v.count} segments totaling ${i(function(e){return e.mean*e.count}(v))}. Largest is ${v.maxLabel} at ${i(v.max)}; smallest is ${v.minLabel} at ${i(v.min)}.`:`${h} ranges from ${i(v.min)} (${v.minLabel}) to ${i(v.max)} (${v.maxLabel}), with a mean of ${i(v.mean)} across ${v.count} points.`):b.l2="No data is loaded yet."),n.has("l3")&&v&&!l&&Nt.has(e)?b.l3=function(e,t,a){const{first:o,last:n,min:r,max:i,maxLabel:s,minLabel:c,firstLabel:l,lastLabel:p,minIndex:u,maxIndex:y,count:d}=e,m=i-r,h=n-o;if(0===m)return`${ga(t)} is constant at ${a(o)} across the series.`;if(.04>m/(Math.abs(e.mean)||1))return`${ga(t)} ends roughly where it started (${a(o)} at ${l} to ${a(n)} at ${p}), ranging between ${a(r)} and ${a(i)}.`;const g=y>0&&d-1>y,b=u>0&&d-1>u,f=(i-Math.max(o,n))/m,v=(Math.min(o,n)-r)/m;return g&&f>.15?`Overall ${t} climbs to a peak of ${a(i)} (${s}), then falls to ${a(n)} (${p}).`:b&&v>.15?`Overall ${t} drops to a low of ${a(r)} (${c}), then recovers to ${a(n)} (${p}).`:.05>Math.abs(h)/m?`${ga(t)} ends roughly where it started (${a(o)} at ${l} to ${a(n)} at ${p}), ranging between ${a(r)} and ${a(i)}.`:h>0?y===d-1?`Overall ${t} rises from ${a(o)} (${l}) to a peak of ${a(n)} (${p}).`:`Overall ${t} rises from ${a(o)} (${l}) to ${a(n)} (${p}), after peaking at ${a(i)} (${s}).`:u===d-1?`Overall ${t} falls from ${a(o)} (${l}) to a low of ${a(n)} (${p}).`:`Overall ${t} falls from ${a(o)} (${l}) to ${a(n)} (${p}), after dipping to ${a(r)} (${c}).`}(v,h,i):n.has("l3")&&v&&!l&&It.has(e)&&(b.l3=`The highest ${g} is ${v.maxLabel} and the lowest is ${v.minLabel}.`),n.has("l4")){const o=pa(t)?"alerting":ra(e,a.capability);o&&(b.l4=function(e,t,a,o,n,r,i,s){const c=oa[e],l=/^[aeiou]/i.test(c)?"an":"a";let p,u;switch(e){case"locating":p="This is a map",u="read values by location";break;case"presenting":p="This is a single-value display",u=`read ${"string"==typeof a.label&&a.label?a.label:n} as the headline number`;break;case"tracing":p=`This is ${l} ${c} chart`,u="follow the movement between states";break;case"nesting":p=`This is ${l} ${c} chart`,u="read it for nested structure and how children sum into their parents";break;case"relating":p=`This is ${l} ${c} chart`,u=`read it for whether ${r} and ${n} move together`;break;default:p=`This is ${l} ${c} chart`,u=function(e,t,a,o,n,r){if(!t)switch(e){case"alerting":return"watch for points that break from the rest";case"tracking":return"read it for the overall direction of "+a;case"comparing":return`compare ${a} across ${o}`;case"ranking":return"read it top to bottom by "+a;case"apportioning":return`read each ${o}'s share of the whole`;case"characterizing":return"read it for the spread and shape of "+a;default:return"read the highlighted features"}switch(e){case"alerting":return function(e,t,a){if(It.has(a)||zt.has(a))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;const{first:o,last:n,min:r,max:i,minLabel:s,maxLabel:c,lastLabel:l,minIndex:p,maxIndex:u,count:y}=e,d=i-r;if(d>0){const e=u>0&&y-1>u,a=p>0&&y-1>p,m=(i-Math.max(o,n))/d,h=(Math.min(o,n)-r)/d;if(e&&m>.15)return`the peak of ${t(i)} at ${c} is the point to investigate`;if(a&&h>.15)return`the dip to ${t(r)} at ${s} is the point to investigate`;if(n>=i)return`the climb to ${t(n)} at ${l} warrants a closer look`;if(r>=n)return`the drop to ${t(n)} at ${l} warrants a closer look`}return`the extremes — ${c} (${t(i)}) and ${s} (${t(r)}) — are the points to check`}(t,n,r);case"tracking":return`read it for the trajectory of ${a}, which ${function(e){const t=e.max-e.min,a=e.last-e.first;return 0===t||.05>Math.abs(a)/t?"holds roughly steady":a>0?"rises":"falls"}(t)} from ${n(t.first)} (${t.firstLabel}) to ${n(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${a} across ${o}; ${t.maxLabel} leads at ${n(t.max)}`;case"ranking":return`read it top to bottom by ${a}; ${t.maxLabel} ranks highest at ${n(t.max)}`;case"apportioning":{const e=t.mean*t.count,a=e>0?Math.round(t.max/e*100):null;return`read each ${o}'s share of the ${n(e)} total; ${t.maxLabel} is the largest at ${n(t.max)}${null!=a?` (${a}%)`:""}`}case"characterizing":return`read it for the spread of ${a}, from ${n(t.min)} to ${n(t.max)}`;default:return"read the highlighted features"}}(e,o,n,r,i,t)}return`${p}; ${u}.${function(e,t){if(!t)return"";const a=t.familiarity?.[e];return"number"!=typeof a||a>2?"":` This ${Jt(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`}(t,s)}`}(o,e,t,l?null:v,h,g,i,a.audience))}const x=["l1","l2","l3","l4"].filter(e=>n.has(e)&&b[e]).map(e=>b[e]).join(" "),w=ma(t);return{text:w?`${w} ${x}`.trim():x,levels:b,...w?{annotations:w}:{}}}function ga(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function ba(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function fa(e){return((e??"unknown")+"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function va(e,t,a={}){const o=a.locale??"en",n=Math.max(1,a.maxLeaves??200),r=ua(o),i=Gt(e,t,a.recipe);if(i)return function(e,t,a={}){const o=Ht(t),n=Dt(t),r=Math.max(1,a.maxLeaves??200);if("function"==typeof e.navigation)return e.navigation({data:o,config:n,locale:a.locale??"en"});const i=(s=e.navigation)&&"object"==typeof s?e.navigation:void 0;var s;const c=(i?.groupByRole?Ut(e,i.groupByRole):void 0)??(i?.groupBy?.[0]?Ut(e,i.groupBy[0])??e.dataRoles.find(e=>e.field===i.groupBy?.[0]):void 0)??Wt(e,["nominal","ordinal"]),l=c?qt(c,n,o):void 0,p=(i?.idRole?Ut(e,i.idRole):void 0)??Wt(e,["identifier"]),u=p?qt(p,n,o):void 0,y={id:"root",role:"chart",label:i?.summaryTemplate?Vt(i.summaryTemplate,void 0,e,n,o,{count:o.length}):`${e.name}: ${o.length} ${1===o.length?"item":"items"} represented.`,level:1,children:[]};let d=0;const m=(t,a,r)=>{const s=u?t[u]:void 0,c=i?.itemLabelTemplate?Vt(i.itemLabelTemplate,t,e,n,o,{count:o.length}):function(e,t,a,o){const n=Wt(t,["nominal","ordinal"]),r=t.dataRoles.filter(e=>"quantitative"===e.semanticType),i=n?qt(n,a,o):void 0,s=[];i&&null!=e[i]&&s.push(e[i]+"");for(const t of r){const n=qt(t,a,o);n&&null!=e[n]&&s.push(`${t.role}: ${e[n]+""}`)}return s.length>0?s.join(", "):"Data item"}(t,e,n,o);return{id:"datum-"+fa(s??a),role:"datum",label:c,level:r,datum:t}};if(l){const e=new Map;for(const t of o){const a=(t[l]??"Uncategorized")+"",o=e.get(a);o?o.push(t):e.set(a,[t])}y.children=[...e].map(([e,t],a)=>{const o=t.slice(0,Math.max(0,r-d));d+=o.length;const n=o.map((e,t)=>m(e,1e5*a+t,3));return t.length>o.length&&n.push({id:"more-"+fa(e),role:"datum",label:`…and ${t.length-o.length} more items`,level:3}),{id:"group-"+fa(e),role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:n}})}else{const e=o.slice(0,r);y.children=e.map((e,t)=>m(e,t,2)),o.length>e.length&&y.children.push({id:"more",role:"datum",label:`…and ${o.length-e.length} more items`,level:2})}return y}(i,t,{maxLeaves:n,locale:o});const s={id:"root",role:"chart",label:ha(e,t,{locale:o}).text||"Chart.",level:1,children:[]},c=function(e,t){const a=Array.isArray(e.annotations)?e.annotations:null;if(!a)return null;const o=Ot(a.filter(e=>!!e&&"object"==typeof e));if(0===o.length)return null;let n=0;const r=o.slice(0,t).map(e=>{const t=e.lifecycle?.status,a=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+n++,role:"annotation",level:3,label:`${o=da(e),o?o.charAt(0).toUpperCase()+o.slice(1):o}${a}.`,datum:e};var o});o.length>t&&r.push({id:"annotation-"+n++,role:"annotation",level:3,label:`…and ${o.length-t} more annotations.`});const i=o.length;return{id:"annotations",role:"annotation",level:2,label:`Annotations: ${1===i?"one marked feature":i+" marked features"}.`,children:r}}(t,n),l=Array.isArray(t.data)?t.data:null,p=Nt.has(e)||It.has(e)||zt.has(e)||Bt.has(e);if(!l||0===l.length||!p)return c&&(s.children=[c]),s;const{measure:u,measureFallback:y,dimension:d,dimensionFallback:m}=Ft(e,t),h=Tt(u,y),g=Lt(d,m),b="string"==typeof u&&u?u:y,f="string"==typeof d&&d?d:m,v=Et(t);let x=0;const w=e=>`${e}-${x++}`,A=(e,t)=>{const a=e.slice(0,n).map(e=>((e,t)=>{const a=h(e),o=_t(g(e),r);return{id:w("datum"),role:"datum",level:t,label:`${o}: ${Number.isFinite(a)?r(a):"—"}`,value:Number.isFinite(a)?a:void 0,datum:e}})(e,t));return e.length>n&&a.push({id:w("more"),role:"datum",level:t,label:`…and ${e.length-n} more points`}),a},S=[];if(Nt.has(e)||It.has(e)){let t=1/0,a=-1/0,o=1/0,n=-1/0;const i=[];let s=!0;for(const e of l){const r=h(e);Number.isFinite(r)&&(t>r&&(t=r),r>a&&(a=r));const c=g(e);i.push(c),"number"==typeof c&&Number.isFinite(c)?(o>c&&(o=c),c>n&&(n=c)):s=!1}const c=new Set,p=[];for(const e of i){const t=e+"";c.has(t)||(c.add(t),p.push(e))}const u=s?`${r(o)} to ${r(n)}`:`${_t(p[0],r)} to ${_t(p[p.length-1],r)} (${It.has(e)?p.length+" categories":l.length+" points"})`;S.push({id:w("axis"),role:"axis",level:2,label:`${It.has(e)?"Category axis":"X axis"}: ${f}, ${u}.`}),t>a||S.push({id:w("axis"),role:"axis",level:2,label:`Value axis: ${b}, ${r(t)} to ${r(a)}.`})}if(v){const a=Lt(v,v),n=new Map;for(const e of l){const t=(a(e)??"—")+"",o=n.get(t);o?o.push(e):n.set(t,[e])}const r=[];for(const[a,i]of n){const n=ha(e,{...t,data:i},{levels:["l2","l3"],locale:o}).text;r.push({id:w("series"),role:"series",level:2,label:`Series ${a}: ${n}`,children:A(i,3)})}s.children=[...S,...r]}else s.children=[...S,...A(l,2)];return c&&s.children.push(c),s}function xa(e,t){const a=[],o=e=>{if(a.push(e),e.children&&e.children.length>0&&t.has(e.id))for(const t of e.children)o(t)};return o(e),a}function wa(e){let t=1;if(e.children)for(const a of e.children)t+=wa(a);return t}var Aa=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function Sa(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function Ca(e){return Sa(e)?e:void 0}function $a(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function ka(e){const t=$a(e);return null==t?void 0:Math.max(0,Math.floor(t))}function ja(...e){return e.map(Ca).find(Boolean)}function Pa(...e){return e.find(Array.isArray)}function Ra(e){const t={};for(const[a,o]of Object.entries(e))void 0!==o&&(t[a]=o);return t}function Ta(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function La(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function Na(e,t,a){const o=e?.filter(e=>!0===Ca(e)?.sensor).length,n=Ca(t?.observation),r=Ca(n?.sensors),i=Pa(a?.activeSensors);return Math.max(o??0,r?Object.keys(r).length:0,i?.length??0)||void 0}function Ia(e,t,a={}){const{capability:o,audience:n,locale:r}=a,i=a.levels??["l1","l2","l3"],s=!1!==a.includeStructure,c=ra(e,o),l=ha(e,t,{levels:c?[...i,"l4"]:i,locale:r,capability:o,audience:n}),{l4:p,...u}=l.levels,y=["l1","l2","l3"].map(e=>l.levels[e]).filter(Boolean).join(" "),d={levels:u,text:l.annotations?`${l.annotations} ${y}`.trim():y,...l.annotations?{annotations:l.annotations}:{}};let m;if(c&&p){const e=(h=o)?"fits"in h||"buildProps"in h?{family:h.family}:{family:h.family,intentScores:h.intentScores}:{};m={act:c,sentence:p,family:e.family,intentScores:e.intentScores}}var h;const g=s?va(e,t,{maxLeaves:a.maxLeaves,locale:r}):void 0,b=function(e,t,a){if(!1===a)return;const o=Sa(a)?a:void 0,n=Ca(t.physics),r=ja(o?.snapshot,n?.snapshot,t.physicsSnapshot,function(e){const t=Ca(e);return!!t&&(Sa(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),i=ja(o?.evidence,n?.evidence,t.physicsEvidence,t.settledEvidence),s=ja(o?.config,n?.config,r?.config,t.config),c=ja(Ca(r?.world),Ca(n?.world)),l=ja(Ca(s?.kernel),Ca(c?.options)),p=Pa(c?.bodies),u=Pa(c?.colliders,s?.colliders),y=Pa(r?.queue,n?.queue),d=Pa(r?.liveBodyOrder),m=Pa(c?.springs),h=Pa(r?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const a=Ca(e);if(!a)return;const o=$a(a.count??a.value??a.total??a.bodies??a.events);if(null==o)return;const n=(a.label??a.id??a.name??"container "+(t+1))+"",r=null==a.id?void 0:a.id+"",i=$a(a.secondary??a.secondaryCount),s=$a(a.observed??a.observedCount);return Ra({id:r,label:n,count:o,secondary:i,secondaryLabel:"string"==typeof a.secondaryLabel?a.secondaryLabel:void 0,observed:s})}).filter(e=>null!=e);if(0===t.length)return;const a=t.reduce((e,t)=>e+t.count,0),o=t.filter(e=>e.count>0).length,n=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:a,populatedCount:o,...n?{leader:n}:{}}}(function(e,t,a,o){const n=Ca(e.settledProjection),r=Ca(t?.settledProjection);return Pa(a?.projectionRows,a?.aggregates,e.settledProjectionRows,e.projectionRows,n?.rows,t?.settledProjectionRows,t?.projectionRows,r?.rows,o?.binCounts)}(t,n,o,i)),b=function(e,t){const a=e?.map((e,t)=>{const a=Ca(e);if(!a)return;const o=$a(a.count)??0,n=$a(a.total),r={label:(a.label??a.id??"sediment "+(t+1))+"",count:o};return null!=a.id&&(r.id=a.id+""),null!=n&&(r.total=n),r}).filter(e=>null!=e),o=ka(t?.bins)??a?.length??0,n=$a(t?.count)??a?.reduce((e,t)=>e+t.count,0)??0,r=$a(t?.total)??a?.reduce((e,t)=>e+(t.total??0),0),i=a?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==o||0!==n||r)return{bins:o,count:n,...null!=r&&r>0?{total:r}:{},...i?{leader:i}:{}}}(Pa(o?.sediment,n?.sediment,r?.sediment),ja(o?.sedimentTotals,n?.sedimentTotals)),f=d?.length??p?.length??ka(i?.bodyCount),v=function(e){if(e)return e.filter(e=>!0===Ca(e)?.sleeping).length}(p)??ka(i?.sleepingCount),x=y?.length,w="string"==typeof r?.simulationState?r.simulationState:void 0,A="boolean"==typeof i?.settled?i.settled:w?"settled"===w:null!=f||null!=v||null!=x?null!=f&&v===f&&0===(x??0):void 0,S=Ca(l?.gravity),C=$a(S?.x),$=$a(S?.y),k=Ra({state:w,settled:A,elapsedSeconds:$a(r?.elapsedSeconds),paused:"boolean"==typeof r?.paused?r.paused:void 0,visible:"boolean"==typeof r?.visible?r.visible:void 0,seed:$a(l?.seed),gravity:null!=C&&null!=$?{x:C,y:$}:void 0,fixedDt:$a(s?.fixedDt??l?.fixedDt),timeScale:$a(s?.timeScale),maxSubsteps:ka(s?.maxSubsteps),liveBodies:f,sleepingBodies:v,queued:x,bodyLimit:$a(s?.bodyLimit),eviction:"string"==typeof s?.eviction?s.eviction:void 0}),j=Ra({colliders:u?.length,sensors:Na(u,s,c),springs:m?.length,activeSensorPairs:h?.length}),P=Object.keys(j).length>0,R=Aa.has(e);if(!(Object.keys(k).length>0||P||g||b)||!R&&null==a)return;const T={simulation:k,...P?{geometry:j}:{},...g?{aggregates:g}:{},...b?{sediment:b}:{}},L=function(e){const t=[],a=e.simulation,o=[a.state??(a.settled?"settled":void 0),null!=a.liveBodies?`${a.liveBodies} live ${Ta(a.liveBodies,"body")}`:void 0,null!=a.sleepingBodies?a.sleepingBodies+" sleeping":void 0,null!=a.queued?a.queued+" queued":void 0,null!=a.seed?"seed "+La(a.seed):void 0,a.gravity?`gravity (${La(a.gravity.x)}, ${La(a.gravity.y)})`:void 0,null!=a.fixedDt?`fixed step ${La(a.fixedDt)}s`:void 0,null!=a.timeScale?La(a.timeScale)+"x time":void 0].filter(Boolean);o.length>0&&t.push(`Physics simulation: ${o.join("; ")}.`);const n=e.geometry;if(n){const e=[null!=n.colliders?`${n.colliders} ${Ta(n.colliders,"collider")}`:void 0,null!=n.sensors?`${n.sensors} ${Ta(n.sensors,"sensor")}`:void 0,null!=n.springs?`${n.springs} ${Ta(n.springs,"spring")}`:void 0,null!=n.activeSensorPairs?`${n.activeSensorPairs} active sensor ${Ta(n.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const r=e.aggregates;if(r){const e=r.leader,a=e?` Largest is ${e.label} with ${La(e.count)}.`:"";t.push(`Physics aggregates: ${La(r.totalCount)} settled ${Ta(r.totalCount,"body")} across ${r.rows.length} ${Ta(r.rows.length,"container")}; ${r.populatedCount} populated.${a}`)}const i=e.sediment;if(i){const e=null!=i.total?", value total "+La(i.total):"",a=i.leader?`; largest sediment bin is ${i.leader.label} with ${La(i.leader.count)}`:"";t.push(`Physics sediment: ${i.count} retained ${Ta(i.count,"body")} in ${i.bins} ${Ta(i.bins,"bin")}${e}${a}.`)}return t.join(" ")}(T);return{...T,text:L}}(e,t,a.physics),f=[d.text,m?.sentence,b?.text].filter(Boolean).join(" ");return{component:e,description:d,intent:m,structure:g,physics:b,text:f}}function za(e,t=30){return Math.max((e??4)+5,12,t)}var Ba=["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","RidgelinePlot","DotPlot","PieChart","DonutChart","GaugeChart","FunnelChart","SwimlaneChart","LikertChart","LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","BubbleChart","Heatmap","QuadrantChart","MultiAxisLineChart","CandlestickChart","ConnectedScatterplot","ScatterplotMatrix","MinimapChart","ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram","TreeDiagram","Treemap","CirclePack","OrbitDiagram","ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram","RealtimeLineChart","RealtimeHistogram","TemporalHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","GauntletChart","ProcessFlowChart","PhysicalFlowChart","BigNumber"],Fa=new Set(Ba);function Ea(e){return Fa.has(e)}var _a="1",Oa=new Set(["tooltip","onObservation","xFormat","yFormat","valueFormat","svgAnnotationRules","tooltipContent","onHover","tickFormatTime","tickFormatValue","edgeSort","sortGroups","centerContent","frameProps","controls","oFormat","rFormat","oSort","pieceStyle","summaryStyle","nodeStyle","edgeStyle","customHoverBehavior","customClickBehavior","customDoubleClickBehavior","onBrush","onTopologyChange","backgroundGraphics","foregroundGraphics","legend","recipe","layout"]),Ma=new Set(["data","nodes","edges","points","areas","lines","flows"]);function Da(e,t){return!!Ma.has(e)&&("areas"!==e||"string"!=typeof t)}var Ha="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e));function Ga(e,t,a){const o=Qe(e)??Ze(t.recipe)??Ze(t.recipeId);if(o)return function(e,t,a){const o=function(e,t,a){const o={};for(const[n,r]of Object.entries(e))if(null!=r&&!Oa.has(n)&&"recipeId"!==n&&(t||!Da(n,r)))if("function"==typeof r||r?.$$typeof){if(a)throw Error(`Portable recipe prop "${n}" is not JSON-safe.`)}else if(Xe(r))o[n]=Ha(r);else if(a)throw Error(`Portable recipe prop "${n}" is not JSON-safe.`);return o}(t,!1!==a?.includeData,"portable"===e.portability),n=e.intents.map(Mt).filter(e=>!!e),r={name:e.name,intents:n,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily};if("portable"===e.portability){if(!Xe(o))throw Error(`Portable recipe "${e.id}" contains non-JSON-safe props or layoutConfig.`);return{component:"ChartRecipe",recipeId:e.id,portable:!0,props:o,manifest:r,version:_a,createdAt:(new Date).toISOString(),...a?.selections?{selections:a.selections}:{}}}return{component:"ChartRecipe",recipeId:e.id,portable:!1,reason:"Recipe contains or may depend on non-serializable local layout callbacks.",warnings:["This config is inspectable but cannot be rendered remotely by CLI or MCP."],props:o,manifest:r,version:_a,createdAt:(new Date).toISOString(),...a?.selections?{selections:a.selections}:{}}}(o,t,a);if(!Ea(e))throw Error(`Unknown component "${e}". Known components: ${Ba.join(", ")}`);const n=!1!==a?.includeData,r={};for(const[e,a]of Object.entries(t))null!=a&&(Oa.has(e)||!n&&Da(e,a)||"function"!=typeof a&&(a?.$$typeof||(r[e]=Ha(a))));return{component:e,props:r,version:_a,createdAt:(new Date).toISOString(),...a?.selections?{selections:a.selections}:{}}}function qa(e){if(!e.component||!e.props)throw Error("Invalid chart config: missing component or props");if("ChartRecipe"===e.component||"LocalChartRecipe"===e.component){if(!e.recipeId)throw Error("Invalid chart recipe config: missing recipeId");const t=Qe(e.recipeId);if(!t)throw Error(`Unknown chart recipe "${e.recipeId}". Register it before deserializing this config.`);if("LocalChartRecipe"!==e.component&&!1!==e.portable&&"portable"!==t.portability)throw Error(`Chart recipe "${e.recipeId}" is registered as local, not portable.`);return{componentName:"ChartRecipe",props:{...Ha(e.props),recipeId:e.recipeId}}}if(!Ea(e.component))throw Error(`Unknown component "${e.component}". This config may require a newer version of semiotic.`);return{componentName:e.component,props:Ha(e.props)}}function Ua(e){const t=JSON.stringify(e);return"sc="+btoa(unescape(encodeURIComponent(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Wa(e){const t=new URLSearchParams(e.includes("?")?e.split("?")[1]:e).get("sc");if(!t)throw Error("No chart config found in URL (missing 'sc' parameter)");const a=t.replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(escape(atob(a)));return JSON.parse(o)}async function Va(e,t="json"){const a="jsx"===t?Ya(e):JSON.stringify(e,null,2);if("undefined"==typeof navigator||!navigator.clipboard)throw Error("Clipboard API not available. copyConfig requires a browser environment.");await navigator.clipboard.writeText(a)}function Ya(e){const{props:t}=e,a=["<"+("LocalChartRecipe"===e.component?"ChartRecipe":e.component)];e.recipeId&&a.push(` recipeId="${e.recipeId}"`);for(const[e,o]of Object.entries(t))if("string"==typeof o)a.push(` ${e}="${o}"`);else if("boolean"==typeof o&&!0===o)a.push(" "+e);else if("boolean"==typeof o&&!1===o)a.push(` ${e}={false}`);else if("number"==typeof o)a.push(` ${e}={${o}}`);else{const t=JSON.stringify(o);a.push(80>t.length?` ${e}={${t}}`:` ${e}={${JSON.stringify(o,null,2)}}`)}return a.push("/>"),a.join("\n")}function Ka(e){const t={};for(const[a,o]of e){const e=[];for(const[,t]of o.clauses){const a={};for(const[e,o]of Object.entries(t.fields))a[e]="point"===o.type?{type:"point",values:Array.from(o.values)}:{type:"interval",range:o.range};e.push({clientId:t.clientId,type:t.type,fields:a})}t[a]={name:o.name,resolution:o.resolution,clauses:e}}return t}function Xa(e){const t=new Map;for(const[a,o]of Object.entries(e)){const e=new Map;for(const t of o.clauses){const a={};for(const[e,o]of Object.entries(t.fields))a[e]="point"===o.type?{type:"point",values:new Set(o.values)}:{type:"interval",range:o.range};e.set(t.clientId,{clientId:t.clientId,type:t.type,fields:a})}t.set(a,{name:o.name,resolution:o.resolution,clauses:e})}return t}async function Ja(e,t){const{format:a="png",filename:o="chart",scale:n=2,background:r="white"}=t||{},i=e.querySelector("svg");if(!i)throw Error("No SVG element found in the container");const s=i.cloneNode(!0),c=i.getBoundingClientRect();if(s.getAttribute("width")||s.setAttribute("width",c.width+""),s.getAttribute("height")||s.setAttribute("height",c.height+""),s.getAttribute("xmlns")||s.setAttribute("xmlns","http://www.w3.org/2000/svg"),Qa(i,s),"svg"===a){const e=(new XMLSerializer).serializeToString(s);Za(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),o+".svg")}else{const t=c.width*n,a=c.height*n,i=document.createElement("canvas");i.width=t,i.height=a;const l=i.getContext("2d");l.fillStyle=r,l.fillRect(0,0,t,a),l.scale(n,n);const p=e.querySelector("canvas");p&&l.drawImage(p,0,0,c.width,c.height);const u=(new XMLSerializer).serializeToString(s),y=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(y),m=new Image;m.width=c.width,m.height=c.height,await new Promise((e,t)=>{m.onload=()=>{l.drawImage(m,0,0),i.toBlob(a=>{a?(Za(a,o+".png"),e()):t(Error("Failed to create PNG blob"))},"image/png"),URL.revokeObjectURL(d)},m.onerror=()=>{URL.revokeObjectURL(d),t(Error("Failed to load SVG image"))},m.src=d})}}function Qa(e,t){const a=e.children,o=t.children,n=window.getComputedStyle(e),r=["fill","stroke","stroke-width","stroke-dasharray","opacity","fill-opacity","stroke-opacity","font-family","font-size","font-weight","text-anchor","dominant-baseline"];for(const e of r){const a=n.getPropertyValue(e);a&&"none"!==a&&""!==a&&t.style?.setProperty(e,a)}for(let e=0;Math.min(a.length,o.length)>e;e++)Qa(a[e],o[e])}function Za(e,t){const a=URL.createObjectURL(e),o=document.createElement("a");o.href=a,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)}function eo(e){const t={};if(null==e||"object"!=typeof e)return t;for(const[a,o]of Object.entries(e))a.startsWith("_")||null!=o&&""!==o&&("number"==typeof o?Number.isFinite(o)&&(t[a]=o):"string"==typeof o?t[a]=o:"boolean"==typeof o?t[a]=o+"":o instanceof Date&&(t[a]=o.toISOString().slice(0,10)));return t}function to(e){return e&&"object"==typeof e?e:{}}function ao(e){return to(e.accessibility).tableFields??e.accessibleDatum??e.datum}function oo(e){const t=e.pointId??e.id??e._transitionKey;return null==t||""===t?void 0:t+""}function no(e){return e.accessibility?.tableFields??e.accessibleDatum??e.datum??null}function ro(e){return"number"==typeof e&&Number.isFinite(e)}function io(e){if(ro(e.x)&&ro(e.y)&&ro(e.w)&&ro(e.h))return{x0:e.x,y0:e.y,x1:e.x+e.w,y1:e.y+e.h};if(ro(e.x)&&ro(e.y)&&ro(e.r))return{x0:e.x-e.r,y0:e.y-e.r,x1:e.x+e.r,y1:e.y+e.r};if(ro(e.cx)&&ro(e.cy)&&ro(e.r))return{x0:e.cx-e.r,y0:e.cy-e.r,x1:e.cx+e.r,y1:e.cy+e.r};if(ro(e.cx)&&ro(e.cy)&&ro(e.outerR))return{x0:e.cx-e.outerR,y0:e.cy-e.outerR,x1:e.cx+e.outerR,y1:e.cy+e.outerR};const t=[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat().filter(e=>Array.isArray(e)&&ro(e[0])&&ro(e[1]));return t.length>0?{x0:Math.min(...t.map(e=>e[0])),y0:Math.min(...t.map(e=>e[1])),x1:Math.max(...t.map(e=>e[0])),y1:Math.max(...t.map(e=>e[1]))}:null}function so(e,t){const a=Math.max(0,Math.min(e.x1,t.x1)-Math.max(e.x0,t.x0))*Math.max(0,Math.min(e.y1,t.y1)-Math.max(e.y0,t.y0)),o=Math.min(Math.max(0,e.x1-e.x0)*Math.max(0,e.y1-e.y0),Math.max(0,t.x1-t.x0)*Math.max(0,t.y1-t.y0));return o>0?a/o:0}function co(e,t,a,o,n){if(e===t)return!0;const r=a.dataRoles.map(e=>qt(e,o,n)).filter(e=>!!e).filter(a=>null!=e[a]&&null!=t[a]);return r.length>0&&r.every(a=>e[a]+""==t[a]+"")}function lo(e,t,a,o,n,r="warn",i){return{id:e,category:t,status:a?"pass":r,message:a?o:n,...i?{evidence:i}:{}}}function po(e){const{recipe:t}=e,a=function(e){return Array.isArray(e)?e:e&&"object"==typeof e?[...e.nodes??e.sceneNodes??[],...e.sceneEdges??[]]:[]}(e.scene),o=e.layoutConfig??Dt({layoutConfig:e.layoutConfig}),n=e.dimensions.plot??{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},r=n.x??0,i=n.y??0,s=[],c=a.filter(e=>null!=no(e)),l=a.filter(e=>!("string"!=typeof e.pathD||!/NaN|Infinity|undefined/.test(e.pathD))||function(e){return[...[e.x,e.y,e.w,e.h,e.r,e.cx,e.cy,e.innerR,e.outerR,e.x1,e.x2,e.y1,e.y2,e.openY,e.closeY,e.highY,e.lowY,e.bodyWidth].filter(e=>void 0!==e),...[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat(2)]}(e).some(e=>"number"!=typeof e||!Number.isFinite(e)));s.push(lo("geometry.finite","geometry",0===l.length,"All emitted geometry is finite.",l.length+" marks contain non-finite geometry.","fail",{count:l.length}));const p=a.map(io),u=p.filter(e=>e&&(e.x0>=e.x1||e.y0>=e.y1)).length;s.push(lo("geometry.nonzero-area","geometry",0===u,"All bounded marks have positive area.",u+" marks have zero or negative area.","warn",{count:u}));const y=p.filter(e=>e&&(r>e.x0||i>e.y0||e.x1>r+n.width||e.y1>i+n.height)).length;s.push(lo("geometry.bounds","geometry",0===y,"All bounded marks stay inside the plot.",y+" marks extend outside the plot bounds.","warn",{count:y}));const d=t.audit?.minimumHitTargetSize??t.accessibility.minimumHitTarget??24,m=p.filter(e=>!!e&&(d>e.x1-e.x0||d>e.y1-e.y0)).length;s.push(lo("interaction.target-size","interaction",0===m,`All bounded targets meet the declared ${d}px minimum.`,`${m} targets are smaller than ${d}px in at least one dimension.`,"warn",{count:m,minimumTarget:d}));const h=c.map(oo),g=h.filter(e=>!e).length,b=new Set,f=h.filter(e=>!(!e||!b.has(e)&&(b.add(e),1)));s.push(lo("identity.stable-ids","identity",0===g,"Every data-bearing mark exposes a stable id.",g+" data-bearing marks have no pointId, id, or transition key.",t.audit?.requireStableIds?"fail":"warn",{missing:g})),s.push(lo("identity.unique-ids","identity",0===f.length,"Stable mark ids are unique.",f.length+" duplicate stable ids were observed.","fail",{duplicates:[...new Set(f)].slice(0,10)}));const v=h.filter(e=>e&&/^(datum|mark|node|point|rect)-?\d+$/.test(e)).length;v>0&&s.push({id:"identity.index-pattern",category:"identity",status:"warn",message:v+" ids look index-derived and may change when data is reordered.",remediation:"Derive ids from a declared identifier role or stable domain key."});const x=new Set;let w=0;const A=e.inputData;for(const e of c){const a=no(e),n=Array.isArray(a)?a:[a];let r=!1;for(const e of n)if(e&&"object"==typeof e)for(let a=0;A.length>a;a+=1)co(e,A[a],t,o,A)&&(x.add(a),r=!0);r||(w+=1)}const S=Math.max(0,A.length-x.size);s.push(lo("coverage.input-data","coverage",0===S,"Every input datum is represented by the observed scene.",S+" input data items have no matching scene mark.",t.audit?.requireDatumCoverage?"fail":"warn",{represented:x.size,input:A.length})),s.push(lo("coverage.scene-data","coverage",0===w,"Every data-bearing scene mark maps back to input data.",w+" scene marks do not map back to an input datum.","warn",{count:w}));const C=t.encodings?.some(e=>"count"===e.channel);!C&&c.length>x.size&&x.size>0&&s.push({id:"coverage.duplicate-references",category:"coverage",status:"warn",message:"Input data is referenced by multiple marks, but multiplicity is not declared as an encoding.",remediation:"Declare count/repetition semantics or preserve a one-to-one datum-to-mark mapping."});const $=c.filter(e=>!1===e.interactive).length;s.push(lo("interaction.hit-targets","interaction",0===$&&c.length>0,"Every observed data-bearing scene node participates in hit testing.",0===c.length?"No data-bearing scene nodes were emitted for interaction.":$+" data-bearing marks explicitly disable interaction.","fail"));const k=(e.annotations??[]).map(e=>e.pointId).filter(e=>null!=e).map(String),j=k.filter(e=>!b.has(e));s.push(lo("coverage.annotation-anchors","coverage",0===j.length,k.length?"All pointId annotation anchors resolve to observed scene nodes.":"No pointId annotations require scene resolution.",j.length+" annotations point to missing scene ids.","fail",{unresolved:j}));const P=(e.chart?.selectedIds??[]).filter(e=>!b.has(e));e.chart?.selectedIds&&s.push(lo("interaction.selection-reachability","interaction",0===P.length,"Selected/highlighted states resolve to observed marks.",P.length+" selected ids are not reachable in the scene.","fail",{missing:P}));const R=function(e){const t=[];if(!Array.isArray(e))return t;const a=e.some(e=>e&&("line"===e.type||"area"===e.type));for(const o of e)if(o&&"object"==typeof o&&null!==o.datum)try{switch(o.type){case"point":if(a)break;t.push({label:"Point",values:eo(ao(o))});break;case"line":case"area":{const e=ao(o),a=Array.isArray(e)?e:[],n="line"===o.type?"Line point":"Area point";for(const e of a)t.push({label:n,values:eo(e)});break}case"rect":{const e=ao(o),a=null!=e&&"object"==typeof e?e:{},n=a.category??o.group??"",r=a.value??a.__aggregateValue??a.total,i=eo(a);null==i.category&&""!==n&&(i.category=n+""),null==i.value&&null!=r&&(i.value="number"==typeof r||"string"==typeof r?r:r+""),t.push({label:"Bar",values:i});break}case"heatcell":{const e=eo(ao(o));null==e.value&&"number"==typeof o.value&&Number.isFinite(o.value)&&(e.value=o.value),t.push({label:"Cell",values:e});break}case"wedge":{const e=ao(o),a=eo(e);if(null==a.category){const t=to(e),o=t.category??t.label;null!=o&&(a.category=o+"")}t.push({label:"Wedge",values:a});break}case"circle":t.push({label:"Node",values:eo(ao(o))});break;case"arc":t.push({label:"Arc",values:eo(ao(o))});break;case"candlestick":t.push({label:"Candlestick",values:eo(ao(o))});break;case"geoarea":{const e=to(ao(o)),a=eo(e);if(null==a.name){const t=to(e.properties).name??e.name;null!=t&&(a.name=t+"")}t.push({label:"Region",values:a});break}}}catch{}return t}(a),T=(t.accessibility.tableFields??t.accessibility.tableRoles?.map(e=>({role:e,label:e}))??[]).map(e=>{if(e.field)return e.field;const a=e.role?t.dataRoles.find(t=>t.role===e.role):void 0;return a?qt(a,o,A):void 0}).filter(e=>!!e),L=new Set(R.flatMap(e=>Object.keys(e.values))),N=T.filter(e=>!L.has(e));s.push(lo("accessibility.table-fields","accessibility",0===N.length,T.length?"The accessible table preserves all recipe-declared fields.":"The recipe declares no explicit accessible table field projection.",`The accessible table loses declared fields: ${N.join(", ")}.`,"fail",{expectedFields:T,observedFields:[...L]})),new Set(A.flatMap(e=>Object.entries(e).filter(([,e])=>["string","number","boolean"].includes(typeof e)).map(([e])=>e))).size>2&&2>=L.size&&[...L].every(e=>"category"===e||"value"===e)&&s.push({id:"accessibility.generic-table-loss",category:"accessibility",status:"warn",message:"The table exposes only generic category/value fields although richer input data exists.",remediation:"Emit accessibleDatum or accessibility.tableFields on scene nodes."});const I=(t.encodings?.filter(e=>"color"===e.channel)??[]).filter(e=>!e.redundantWith||0===e.redundantWith.length);s.push(lo("accessibility.color-only","accessibility",0===I.length,"Every declared color encoding names a redundant cue.",I.length+" color encodings have no declared redundant cue.","warn"));const z=e.chart;if(z){for(const[e,a]of[["title",t.accessibility.requiresTitle],["summary",t.accessibility.requiresSummary],["description","required"===t.accessibility.description]])a&&s.push(lo("accessibility."+e,"accessibility","string"==typeof z[e]&&z[e].trim().length>0,`A chart ${e} is present.`,`The recipe requires a chart ${e}, but none was supplied.`,"fail"));(t.accessibility.requiresAccessibleTable||"required"===t.accessibility.accessibleTable||t.accessibility.fallbackTable)&&s.push(lo("accessibility.fallback-table","accessibility",!1!==z.accessibleTable,"The accessible fallback table is enabled.","The recipe requires a fallback table, but accessibleTable is disabled.","fail")),z.navigationTree&&s.push(lo("accessibility.navigation-depth","accessibility",(z.navigationTree.children?.length??0)>0,"The navigation tree exposes structure below the root.","The navigation tree is root-only.","fail"))}const B=e.theme?.background??"#ffffff",F=a.filter(e=>{const t=e.style?.fill??e.fill;if("string"!=typeof t||!t.startsWith("#")||!B.startsWith("#"))return!1;const a=ce(t,B);return null!=a&&3>a}).length;s.push(lo("visual.contrast","visual",0===F,"All statically checkable mark fills meet 3:1 contrast.",F+" marks have fill contrast below 3:1.","warn",{background:B}));let E=0;const _=p.filter(e=>!!e).slice(0,500);for(let e=0;_.length>e;e+=1)for(let t=e+1;_.length>t;t+=1).8>so(_[e],_[t])||(E+=1);E>_.length&&s.push({id:"visual.overlap-density",category:"visual",status:"warn",message:E+" near-total mark overlaps suggest occlusion or excessive density.",remediation:"Aggregate, jitter, layer explicitly, or declare overlap as intentional."});const O=[["manual-at.screen-reader","Verify real screen-reader behavior with the target browser/AT combinations."],["manual-at.cognitive-load","Assess cognitive load and whether the custom metaphor is understood."],["manual-at.keyboard-order","Verify that keyboard order is meaningful, not merely mechanically available."],["manual-at.animation","Verify that animation is not distracting and reduced-motion behavior is sufficient."],["manual-at.reception","Test whether the memorable form is received as intended by the target audience."],["manual-at.overlay-occlusion","Inspect labels, overlays, annotations, and important marks for clipping or occlusion."],["manual-at.observation","Exercise hover, focus, selection, and observation emission in the rendered chart."]].map(([e,t])=>({id:e,category:"manual-at",status:"manual",message:t})),M={dataRoles:t.dataRoles.map(e=>e.role),intents:t.intents.map(Mt).filter(e=>!!e),accessibilityExpectations:[...t.accessibility.requirements??[],...t.accessibility.tableFields?.map(e=>"table field: "+e.label)??[]],fallbackDeclared:!0===t.accessibility.fallbackTable||"required"===t.accessibility.accessibleTable||!0===t.accessibility.requiresAccessibleTable,designContractDeclared:!!t.designContract?.whyCustom},D=[...s,...O],H=s.filter(e=>"fail"===e.status).length;return{recipeId:t.id,ok:0===H,summary:{marks:a.length,passes:D.filter(e=>"pass"===e.status).length,warnings:D.filter(e=>"warn"===e.status).length,failures:H,manual:D.filter(e=>"manual"===e.status).length},declaredSemantics:M,observedSceneEvidence:s,manualATChecks:O}}function uo(e){let t=1/0,a=-1/0;for(const o of e)t>o&&(t=o),o>a&&(a=o);return[t,a]}function yo(e){return"nominal"===e||"ordinal"===e}function mo(e){return"quantitative"===e||"temporal"===e}var ho={category10:"category10",category20:"category20",category20b:"category20",category20c:"category20",accent:"accent",dark2:"dark2",paired:"paired",pastel1:"pastel1",pastel2:"pastel2",set1:"set1",set2:"set2",set3:"set3",tableau10:"category10",tableau20:"category20"},go={linear:"linear","monotone-x":"monotoneX","monotone-y":"monotoneY",monotone:"monotoneX",step:"step","step-after":"stepAfter","step-before":"stepBefore",basis:"basis",cardinal:"cardinal","catmull-rom":"catmullRom"},bo={sum:"sum",mean:"mean",average:"mean",count:"count",min:"min",max:"max",median:"mean"};function fo(e){e=function(e){if(!function(e){return e.usermeta?.idid}(e)||!Array.isArray(e.layer))return e;const t=e.layer.filter(e=>!function(e){return"annotation-layer"===e.usermeta?.idid?.role}(e));if(1!==t.length)return e;const{layer:a,...o}=e,{usermeta:n,...r}=t[0];return{...o,...r}}(e);const t=[],{type:a,markProps:o}=function(e){if(!e)return{type:"",markProps:{}};if("string"==typeof e)return{type:e,markProps:{}};const{type:t,...a}=e;return{type:t,markProps:a}}(e.mark),n=e.encoding||{},r=n.x,i=n.y,s=n.color,c=n.size,l=n.theta,p=n.opacity;let u;e.data?.values?u=e.data.values:e.data?.url&&t.push("data.url is not supported — only inline data.values can be translated. Provide data manually."),e.transform&&e.transform.length>0&&t.push("Vega-Lite transforms are not supported. Pre-transform your data before passing to fromVegaLite()."),e.layer&&t.push('Layered specs ("layer") are not supported. Only single-mark specs can be translated.'),(e.hconcat||e.vconcat||e.concat)&&t.push('Concatenated views ("hconcat"/"vconcat"/"concat") are not supported. Translate each sub-spec individually.'),(e.facet||n.facet||n.row||n.column)&&t.push("Faceted views are not supported. Use Semiotic's LinkedCharts or render multiple charts manually."),e.repeat&&t.push('Repeated views ("repeat") are not supported. Translate each field combination individually.'),(e.params||e.selection)&&t.push("Selections/params are not supported. Use Semiotic's LinkedCharts and selection props for interactivity.");const y={};e.width&&(y.width=e.width),e.height&&(y.height=e.height);const d=function(e){if(e)return"string"==typeof e?e:e.text}(e.title);if(d&&(y.title=d),s?.field&&(y.colorBy=s.field,s.scale?.scheme)){const e=ho[s.scale.scheme];e&&(y.colorScheme=e)}void 0!==p?.value&&(y.pointOpacity=p.value);const m=r?.aggregate,h=i?.aggregate;if(u&&(m||h)){const e=h?i:r,t=h?r:i,a=bo[e.aggregate];if(a&&t?.field&&e.field)u=function(e,t){const{groupBy:a,value:o,agg:n="sum"}=t,r=new Map;for(const t of e){const e=t[a]+"";r.has(e)||r.set(e,[]),r.get(e).push(Number(t[o]))}const i=[];for(const[e,t]of r){let o;switch(n){case"count":o=t.length;break;case"mean":o=t.reduce((e,t)=>e+t,0)/t.length;break;case"min":o=uo(t)[0];break;case"max":o=uo(t)[1];break;default:o=t.reduce((e,t)=>e+t,0)}i.push({[a]:e,value:o})}return i}(u,{groupBy:t.field,value:e.field,agg:a});else if(("count"===a||"count"===e.aggregate)&&t?.field&&u){const e=new Map;for(const a of u){const o=a[t.field]+"";e.set(o,(e.get(o)||0)+1)}u=Array.from(e,([e,a])=>({[t.field]:e,value:a}))}}if(r?.bin||i?.bin){const e="Histogram";u&&(y.data=u),r?.bin?(y.valueAccessor=r.field,i?.field&&(y.categoryAccessor=i.field),r.axis?.title&&(y.valueLabel=r.axis.title)):i?.bin&&(y.valueAccessor=i.field,r?.field&&(y.categoryAccessor=r.field),i.axis?.title&&(y.valueLabel=i.axis.title));const a=r?.bin||i?.bin,o="object"==typeof a?a.maxbins:void 0;return o&&(y.bins=o),xo(e,y,t)}let g;switch(a){case"bar":g=function(e,t,a,o,n,r,i){let s;return a?.field&&!1!==e?.stack&&!1!==t?.stack&&null!==e?.stack&&null!==t?.stack?(s="StackedBarChart",o.stackBy=a.field):s="BarChart",yo(e?.type)&&mo(t?.type)?(o.categoryAccessor=e.field,o.valueAccessor=i?"value":t.field,e?.axis?.title&&(o.categoryLabel=e.axis.title),t?.axis?.title&&(o.valueLabel=t.axis.title)):mo(e?.type)&&yo(t?.type)?(o.categoryAccessor=t.field,o.valueAccessor=r?"value":e.field,o.orientation="horizontal",t?.axis?.title&&(o.categoryLabel=t.axis.title),e?.axis?.title&&(o.valueLabel=e.axis.title)):(e?.field&&(o.categoryAccessor=e.field),t?.field&&(o.valueAccessor=i?"value":t.field),e?.axis?.title&&(o.categoryLabel=e.axis.title),t?.axis?.title&&(o.valueLabel=t.axis.title)),n&&(o.data=n),s}(r,i,s,y,u,m,h);break;case"line":if(g="LineChart",vo(r,i,y,m,h),s?.field&&(y.lineBy=s.field),o.interpolate){const e=go[o.interpolate];e&&(y.curve=e)}!0===o.point&&(y.showPoints=!0),u&&(y.data=u);break;case"area":if(s?.field?(g="StackedAreaChart",y.areaBy=s.field):g="AreaChart",vo(r,i,y,m,h),o.interpolate){const e=go[o.interpolate];e&&(y.curve=e)}void 0!==o.opacity&&(y.areaOpacity=o.opacity),u&&(y.data=u);break;case"point":case"circle":case"square":c?.field?(g="BubbleChart",y.sizeBy=c.field,c.scale?.range&&(y.sizeRange=c.scale.range)):g="Scatterplot",vo(r,i,y,m,h),u&&(y.data=u);break;case"rect":g="Heatmap",r?.field&&(y.xAccessor=r.field),i?.field&&(y.yAccessor=i.field),s?.field&&(y.valueAccessor=s.field,delete y.colorBy),r?.axis?.title&&(y.xLabel=r.axis.title),i?.axis?.title&&(y.yLabel=i.axis.title),u&&(y.data=u);break;case"arc":o.innerRadius&&o.innerRadius>0?(g="DonutChart",y.innerRadius=o.innerRadius):g="PieChart",l?.field?y.valueAccessor=l.field:i?.field&&(y.valueAccessor=h?"value":i.field),s?.field&&(y.categoryAccessor=s.field),r?.field&&!l?.field&&(y.categoryAccessor=r.field),u&&(y.data=u);break;case"tick":g="DotPlot",yo(r?.type)?(y.categoryAccessor=r.field,i?.field&&(y.valueAccessor=h?"value":i.field),r?.axis?.title&&(y.categoryLabel=r.axis.title),i?.axis?.title&&(y.valueLabel=i.axis.title)):yo(i?.type)?(y.categoryAccessor=i.field,r?.field&&(y.valueAccessor=m?"value":r.field),y.orientation="horizontal",i?.axis?.title&&(y.categoryLabel=i.axis.title),r?.axis?.title&&(y.valueLabel=r.axis.title)):(r?.field&&(y.categoryAccessor=r.field),i?.field&&(y.valueAccessor=h?"value":i.field)),u&&(y.data=u);break;default:t.push(`Unsupported mark type "${a}". Defaulting to Scatterplot.`),g="Scatterplot",vo(r,i,y,m,h),u&&(y.data=u)}return xo(g,y,t)}function vo(e,t,a,o,n){e?.field&&(a.xAccessor=o?"value":e.field),t?.field&&(a.yAccessor=n?"value":t.field),e?.axis?.title&&(a.xLabel=e.axis.title),t?.axis?.title&&(a.yLabel=t.axis.title)}function xo(e,t,a){const o={component:e,props:t,version:"1",createdAt:(new Date).toISOString()};if(a.length>0){o.warnings=a;for(const e of a)console.warn("[semiotic/fromVegaLite] "+e)}return o}var wo=class{constructor(e){if(this._capacity=e,this.head=0,this._size=0,1>e)throw Error("RingBuffer capacity must be at least 1");this.buffer=Array(e)}push(e){let t;return this._size===this._capacity?t=this.buffer[this.head]:this._size++,this.buffer[this.head]=e,this.head=(this.head+1)%this._capacity,t}pushMany(e){const t=[];for(const a of e){const e=this.push(a);void 0!==e&&t.push(e)}return t}get(e){if(e>=0&&this._size>e)return this.buffer[(this.head-this._size+e+this._capacity)%this._capacity]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let e=0;return{next:()=>this._size>e?{done:!1,value:this.get(e++)}:{done:!0,value:void 0}}}forEach(e){const t=(this.head-this._size+this._capacity)%this._capacity;for(let a=0;this._size>a;a++)e(this.buffer[(t+a)%this._capacity],a)}toArray(){const e=Array(this._size),t=(this.head-this._size+this._capacity)%this._capacity;for(let a=0;this._size>a;a++)e[a]=this.buffer[(t+a)%this._capacity];return e}resize(e){if(1>e)throw Error("RingBuffer capacity must be at least 1");const t=this.toArray();let a=0,o=[];t.length>e&&(a=t.length-e,o=t.slice(0,a)),this._capacity=e,this.buffer=Array(e),this.head=0,this._size=0;for(let e=a;t.length>e;e++)this.push(t[e]);return o}update(e,t){const a=[],o=(this.head-this._size+this._capacity)%this._capacity;for(let n=0;this._size>n;n++){const r=(o+n)%this._capacity,i=this.buffer[r];if(e(i)){let e;e="object"!=typeof i||null===i?i:Array.isArray(i)?[...i]:{...i},a.push(e),this.buffer[r]=t(i)}}return a}remove(e){const t=[],a=[];if(this.forEach(o=>{e(o)?a.push(o):t.push(o)}),0===a.length)return a;this.buffer=Array(this._capacity),this.head=0,this._size=0;for(const e of t)this.push(e);return a}clear(){this.buffer=Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}},Ao=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(e){Number.isFinite(e)&&(this._min>e&&(this._min=e),e>this._max&&(this._max=e))}evict(e){e!==this._min&&e!==this._max||(this._dirty=!0)}recalculate(e,t){this._min=1/0,this._max=-1/0;for(const a of e){const e=t?t(a):a;Number.isFinite(e)&&(this._min>e&&(this._min=e),e>this._max&&(this._max=e))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}},So=require("react/jsx-runtime"),Co={background:"var(--semiotic-tooltip-bg, rgba(0, 0, 0, 0.85))",color:"var(--semiotic-tooltip-text, white)",padding:"8px 12px",borderRadius:"var(--semiotic-tooltip-radius, 6px)",fontSize:"var(--semiotic-tooltip-font-size, 14px)",fontFamily:"var(--semiotic-font-family, inherit)",lineHeight:"1.5",boxShadow:"var(--semiotic-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, 0.15))",pointerEvents:"none",maxWidth:"300px",wordWrap:"break-word"};function $o(e,t){return"function"==typeof t?t(e):e[t]}function ko(e,t){if(t)return t(e);if(null==e)return"";if("number"==typeof e){if(!Number.isFinite(e))return e+"";const t=Number.isInteger(e)?e:parseFloat(e.toPrecision(6));return Math.abs(t)>9999?t.toLocaleString():t+""}return e instanceof Date?e.toLocaleDateString():"object"==typeof e&&null!==e?void 0!==e.id?e.id+"":void 0!==e.name?e.name+"":JSON.stringify(e):e+""}function jo(e={}){const{fields:t,title:a,format:o,style:n={},className:r=""}=e;return e=>{if(!e||"object"!=typeof e)return null;let i;const s=[];if(a){const t=$o(e,a);i=ko(t,o)}if(t&&t.length>0)t.forEach(t=>{let a,n,r;"string"==typeof t?(a=t,n=t,r=o):(a=t.label,n=t.accessor||t.key||"",r=t.format||o);const i=$o(e,n);s.push({label:a,value:ko(i,r)})});else if(!a){const t=["value","y","name","id","label"];for(const a of t)if(void 0!==e[a]){i=ko(e[a],o);break}if(!i){const t=Object.keys(e).filter(e=>!e.startsWith("_"));t.length>0&&(i=ko(e[t[0]],o))}}const c={...Co,...n};return(0,So.jsxs)("div",{className:("semiotic-tooltip "+r).trim(),style:c,children:[i&&(0,So.jsx)("div",{style:{fontWeight:s.length>0?"bold":"normal"},children:i}),s.map((e,t)=>(0,So.jsxs)("div",{style:{marginTop:0===t&&i?"4px":0},children:[e.label&&(0,So.jsxs)("span",{children:[e.label,": "]}),e.value]},t))]})}}function Po(){return e=>{const t=e.allSeries;if(!t||0===t.length)return(0,So.jsx)("div",{className:"semiotic-tooltip",style:Co,children:(0,So.jsx)("div",{children:ko(e.data?.value??e.data?.y)})});const a=e.xValue??e.data?.time??e.data?.x;return(0,So.jsxs)("div",{className:"semiotic-tooltip",style:Co,children:[null!=a&&(0,So.jsx)("div",{style:{fontWeight:600,marginBottom:4,fontSize:"0.9em",borderBottom:"1px solid var(--semiotic-border, #eee)",paddingBottom:4},children:ko(a)}),t.map((e,t)=>(0,So.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"1px 0"},children:[(0,So.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,flexShrink:0}}),(0,So.jsx)("span",{style:{flex:1,fontSize:"0.85em"},children:e.group}),(0,So.jsx)("span",{style:{fontWeight:500,fontSize:"0.85em"},children:ko(e.value)})]},t))]})}}function Ro(e){if(!0!==e){if("function"==typeof e){const t=e;return e=>{let a=Array.isArray(o=!0===e?.__semioticHoverData||e&&void 0!==e.data&&"number"==typeof e.x&&"number"==typeof e.y&&e&&("node"===e.type||"edge"===e.type||void 0!==e.nodeOrEdge||void 0!==e.allSeries||void 0!==e.stats||void 0!==e.__chartType)?e.data??{}:e)?o[0]:o;var o;if(!a)return null;if(("node"===e?.nodeOrEdge&&"number"==typeof a?.x0&&"number"==typeof a?.x1||"edge"===e?.nodeOrEdge&&"number"==typeof a?.sankeyWidth)&&a.data&&"object"==typeof a.data&&(a=a.data),!a)return null;const n=t(a);return null==n?null:(0,So.jsx)("div",{className:"semiotic-tooltip",style:Co,children:n})}}return!1!==e&&void 0!==e&&("object"==typeof e&&null!==e&&("fields"in e||"title"in e)?jo(e):jo())}}function To(e=240){const t=360-e,a=180+t/2,o=a*Math.PI/180;return{sweepRad:e*Math.PI/180,gapDeg:t,startAngleDeg:a,startAngleRad:o,offsetRad:-Math.PI/2+o}}function Lo(e,t,a,o,n){const r=a-t||1;return n+(Math.max(t,Math.min(a,e))-t)/r*o}function No(e=240){const{sweepRad:t,offsetRad:a}=To(e),o=[[Math.cos(a),Math.sin(a)],[Math.cos(a+t),Math.sin(a+t)],[0,0]];for(let e=0;2*Math.PI>e;e+=Math.PI/2)((e-a)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)>t+.001||o.push([Math.cos(e),Math.sin(e)]);const n=o.map(e=>e[0]),r=o.map(e=>e[1]),[i,s]=uo(n),[c,l]=uo(r);return{minX:i,maxX:s,minY:c,maxY:l,width:s-i,height:l-c,cx:(i+s)/2,cy:(c+l)/2}}var Io=c(require("react")),zo=require("react");function Bo(e,t){if("function"==typeof e.addEventListener)return e.addEventListener("change",t),()=>e.removeEventListener("change",t);const a=e;return a.addListener(t),()=>a.removeListener(t)}function Fo(e){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(e).matches}function Eo(){const[e,t]=(0,zo.useState)(()=>Fo("(prefers-reduced-motion: reduce)"));return(0,zo.useEffect)(()=>{if("undefined"==typeof window||!window.matchMedia)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)");return t(e.matches),Bo(e,e=>t(e.matches))},[]),e}function _o(){const[e,t]=(0,zo.useState)(()=>Fo("(forced-colors: active)"));return(0,zo.useEffect)(()=>{if("undefined"==typeof window||!window.matchMedia)return;const e=window.matchMedia("(forced-colors: active)");return t(e.matches),Bo(e,e=>t(e.matches))},[]),e}var Oo=require("react/jsx-runtime"),Mo=Io.createContext(void 0),Do="undefined"==typeof window?Io.useEffect:Io.useLayoutEffect;function Ho(e){if("string"!=typeof e)return e;if("light"===e||"dark"===e||"high-contrast"===e)return e;return k(e)||(void 0!==console&&console.warn(`[ThemeProvider] Unknown theme preset "${e}". Falling back to light theme.`),"light")}function Go({theme:e}){const t=x(e=>e.setTheme),a=x(e=>e.theme),o=Io.useRef(a);o.current=a;const n=Io.useRef(null);Io.useEffect(()=>{if(void 0!==e)return;if("undefined"==typeof window||!window.matchMedia)return;const a=window.matchMedia("(forced-colors: active)");return a.matches&&(n.current=o.current===b?h:o.current,t("high-contrast")),Bo(a,e=>{e.matches?(n.current=o.current===b?n.current??h:o.current,t("high-contrast")):(function(e,t){e(t===h?"light":t===g?"dark":t===b?"high-contrast":t)}(t,n.current??h),n.current=null)})},[e,t]);const r=Io.useRef(!1);return Do(()=>{r.current?void 0!==e&&t(Ho(e)):r.current=!0},[e,t]),null}function qo({children:e}){const t=x(e=>e.theme),a={position:"relative","--semiotic-bg":t.colors.background,"--semiotic-text":t.colors.text,"--semiotic-text-secondary":t.colors.textSecondary,"--semiotic-grid":t.colors.grid,"--semiotic-border":t.colors.border,"--semiotic-cell-border":t.colors.cellBorder||t.colors.border,"--semiotic-primary":t.colors.primary,"--semiotic-font-family":t.typography.fontFamily,...t.colors.focus?{"--semiotic-focus":t.colors.focus}:{},...t.tooltip?.background?{"--semiotic-tooltip-bg":t.tooltip.background}:{},...t.tooltip?.text?{"--semiotic-tooltip-text":t.tooltip.text}:{},...t.tooltip?.borderRadius?{"--semiotic-tooltip-radius":t.tooltip.borderRadius}:{},...t.tooltip?.fontSize?{"--semiotic-tooltip-font-size":t.tooltip.fontSize}:{},...t.tooltip?.shadow?{"--semiotic-tooltip-shadow":t.tooltip.shadow}:{},...t.borderRadius?{"--semiotic-border-radius":t.borderRadius}:{},...t.colors.selection?{"--semiotic-selection-color":t.colors.selection}:{},...null!=t.colors.selectionOpacity?{"--semiotic-selection-opacity":t.colors.selectionOpacity+""}:{},...t.colors.diverging?{"--semiotic-diverging":t.colors.diverging}:{},...t.colors.annotation?{"--semiotic-annotation-color":t.colors.annotation}:{},...null!=t.typography.legendSize?{"--semiotic-legend-font-size":t.typography.legendSize+"px"}:{},...null!=t.typography.titleFontSize?{"--semiotic-title-font-size":t.typography.titleFontSize+"px"}:{},...null!=t.typography.tickFontFamily?{"--semiotic-tick-font-family":t.typography.tickFontFamily}:{},...null!=t.typography.tickSize?{"--semiotic-tick-font-size":t.typography.tickSize+"px"}:{},...null!=t.typography.labelSize?{"--semiotic-axis-label-font-size":t.typography.labelSize+"px"}:{},"--semiotic-secondary":t.colors.secondary||t.colors.primary,"--semiotic-surface":t.colors.surface||t.colors.background,...t.colors.success?{"--semiotic-success":t.colors.success}:{},...t.colors.danger?{"--semiotic-danger":t.colors.danger}:{},...t.colors.warning?{"--semiotic-warning":t.colors.warning}:{},...t.colors.error?{"--semiotic-error":t.colors.error}:{},...t.colors.info?{"--semiotic-info":t.colors.info}:{}},o=Io.useContext(Mo),n={};return o&&(n["data-semiotic-theme"]=o),(0,Oo.jsx)("div",{style:a,...n,children:e})}function Uo({theme:e,children:t}){const a="string"==typeof e&&k(e)?e:void 0,o=Io.useMemo(()=>function(e){return void 0!==e?f(h,Ho(e)):"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(forced-colors: active)").matches?b:h}(e),[e]);return(0,Oo.jsx)(v,{initialState:{theme:o},children:(0,Oo.jsxs)(Mo.Provider,{value:a,children:[(0,Oo.jsx)(Go,{theme:e}),(0,Oo.jsx)(qo,{children:t})]})})}function Wo(){return x(e=>e.theme)}