semiotic 3.8.3 → 3.8.5

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 (215) hide show
  1. package/CLAUDE.md +13 -10
  2. package/README.md +52 -45
  3. package/ai/componentMetadata.cjs +1 -1
  4. package/ai/dist/mcp-server.js +4 -2
  5. package/ai/examples.md +168 -1
  6. package/ai/schema.json +3756 -327
  7. package/ai/surface-manifest.json +6 -4
  8. package/ai/system-prompt.md +1 -1
  9. package/dist/chunk-chartContainerDataAudit-74TLKIP6.module.min.js +2 -0
  10. package/dist/chunk-chunk-2JGJ5GUG.module.min.js +0 -1
  11. package/dist/chunk-chunk-4AANPFOX.module.min.js +2 -0
  12. package/dist/{chunk-chunk-JNCHKRIR.module.min.js → chunk-chunk-5I3UZV4Q.module.min.js} +1 -1
  13. package/dist/chunk-chunk-74CCPVXB.module.min.js +1 -0
  14. package/dist/{chunk-chunk-VVCA3DB7.module.min.js → chunk-chunk-7ALTGHK6.module.min.js} +1 -1
  15. package/dist/chunk-chunk-ACLDBMRH.module.min.js +2 -0
  16. package/dist/chunk-chunk-AVBI6GDT.module.min.js +1 -0
  17. package/dist/{chunk-chunk-XQYVEKEJ.module.min.js → chunk-chunk-BANTPINB.module.min.js} +1 -1
  18. package/dist/chunk-chunk-C4YA6TDR.module.min.js +1 -0
  19. package/dist/chunk-chunk-C57LR3YG.module.min.js +1 -0
  20. package/dist/chunk-chunk-CKMD5NV3.module.min.js +2 -0
  21. package/dist/chunk-chunk-CO5KQMGH.module.min.js +1 -0
  22. package/dist/chunk-chunk-CWQ5YIHX.module.min.js +2 -0
  23. package/dist/chunk-chunk-E6TXX6MI.module.min.js +1 -0
  24. package/dist/{chunk-chunk-7FW6EGLP.module.min.js → chunk-chunk-I36PJ4OC.module.min.js} +1 -1
  25. package/dist/chunk-chunk-IY7RYD4S.module.min.js +1 -0
  26. package/dist/chunk-chunk-K3DMEW22.module.min.js +1 -0
  27. package/dist/chunk-chunk-KT2VAZMZ.module.min.js +1 -0
  28. package/dist/{chunk-chunk-AZJUDQRM.module.min.js → chunk-chunk-L6EA5V3G.module.min.js} +1 -1
  29. package/dist/{chunk-chunk-SANERMIZ.module.min.js → chunk-chunk-LJLS6DY7.module.min.js} +1 -1
  30. package/dist/chunk-chunk-LJPCLYSC.module.min.js +2 -0
  31. package/dist/chunk-chunk-LRIFN2HK.module.min.js +1 -0
  32. package/dist/chunk-chunk-N5DDKCCF.module.min.js +1 -0
  33. package/dist/chunk-chunk-NEVE562N.module.min.js +1 -0
  34. package/dist/chunk-chunk-NLO44TOS.module.min.js +2 -0
  35. package/dist/{chunk-chunk-FYY2ACNJ.module.min.js → chunk-chunk-PRDGLMJT.module.min.js} +1 -1
  36. package/dist/chunk-chunk-PZJ2SBLL.module.min.js +2 -0
  37. package/dist/chunk-chunk-QUJ6TTLY.module.min.js +1 -0
  38. package/dist/chunk-chunk-RBIDBUT4.module.min.js +2 -0
  39. package/dist/chunk-chunk-RFLAG356.module.min.js +1 -0
  40. package/dist/chunk-chunk-RPU4IZAV.module.min.js +2 -0
  41. package/dist/chunk-chunk-SKMBCFIL.module.min.js +2 -0
  42. package/dist/chunk-chunk-TAE7W424.module.min.js +2 -0
  43. package/dist/{chunk-chunk-OQTLSTGI.module.min.js → chunk-chunk-TMWIZL3K.module.min.js} +1 -1
  44. package/dist/chunk-chunk-TUBMTZMU.module.min.js +2 -0
  45. package/dist/chunk-chunk-UFFEXJQY.module.min.js +1 -0
  46. package/dist/chunk-chunk-XSCHTS4D.module.min.js +2 -0
  47. package/dist/chunk-chunk-XXWSHGPL.module.min.js +2 -0
  48. package/dist/chunk-chunk-ZOAQDIJO.module.min.js +1 -0
  49. package/dist/chunk-chunk-ZXIXAPRE.module.min.js +2 -0
  50. package/dist/chunk-minimapBrushOverlay-JU57U7NM.module.min.js +2 -0
  51. package/dist/chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js +2 -0
  52. package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +1 -0
  53. package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +1 -0
  54. package/dist/components/ChartContainer.d.ts +12 -2
  55. package/dist/components/ai/chartCapabilities.d.ts +2 -1
  56. package/dist/components/ai/chartCapabilityTypes.d.ts +19 -0
  57. package/dist/components/chartContainerDataAudit.d.ts +10 -0
  58. package/dist/components/charts/geo/ChoroplethMap.d.ts +2 -0
  59. package/dist/components/charts/geo/DistanceCartogram.d.ts +35 -5
  60. package/dist/components/charts/geo/FlowMap.d.ts +4 -0
  61. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +3 -1
  62. package/dist/components/charts/index.d.ts +1 -0
  63. package/dist/components/charts/network/ForceDirectedGraph.d.ts +36 -1
  64. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +6 -1
  65. package/dist/components/charts/physics/CrucibleChart.capability.d.ts +8 -0
  66. package/dist/components/charts/physics/CrucibleChart.d.ts +63 -0
  67. package/dist/components/charts/physics/GaltonBoardChart.d.ts +6 -1
  68. package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +27 -0
  69. package/dist/components/charts/physics/crucibleChartProps.d.ts +90 -0
  70. package/dist/components/charts/physics/crucibleChrome.d.ts +47 -0
  71. package/dist/components/charts/physics/crucibleController.d.ts +59 -0
  72. package/dist/components/charts/physics/crucibleEffects.d.ts +30 -0
  73. package/dist/components/charts/physics/cruciblePhysics.d.ts +54 -0
  74. package/dist/components/charts/physics/crucibleProgram.d.ts +38 -0
  75. package/dist/components/charts/physics/crucibleTypes.d.ts +415 -0
  76. package/dist/components/charts/physics/gauntletChartProps.d.ts +7 -1
  77. package/dist/components/charts/physics/gauntletChrome.d.ts +2 -1
  78. package/dist/components/charts/physics/gauntletPhysics.d.ts +19 -4
  79. package/dist/components/charts/physics/gauntletRuntime.d.ts +3 -0
  80. package/dist/components/charts/physics/physicsHocUtils.d.ts +12 -0
  81. package/dist/components/charts/shared/chartMode.d.ts +8 -0
  82. package/dist/components/charts/shared/chartSpecCore.d.ts +10 -2
  83. package/dist/components/charts/shared/crucibleWireSchema.d.ts +5 -0
  84. package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
  85. package/dist/components/charts/shared/hatchPattern.d.ts +8 -3
  86. package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
  87. package/dist/components/charts/shared/lineSeriesSsr.d.ts +55 -0
  88. package/dist/components/charts/shared/types.d.ts +2 -2
  89. package/dist/components/charts/shared/validateProps.d.ts +1 -1
  90. package/dist/components/charts/xy/AreaChart.d.ts +10 -0
  91. package/dist/components/charts/xy/minimapBrushOverlay.d.ts +17 -0
  92. package/dist/components/charts/xy/minimapBrushOverlayLazy.d.ts +4 -0
  93. package/dist/components/charts/xy/scatterplotMatrixBrushOverlay.d.ts +8 -0
  94. package/dist/components/charts/xy/scatterplotMatrixBrushOverlayLazy.d.ts +3 -0
  95. package/dist/components/data/auditData.d.ts +51 -0
  96. package/dist/components/data/dataAuditPresentation.d.ts +18 -0
  97. package/dist/components/data/dataAuditSources.d.ts +9 -0
  98. package/dist/components/data/numericContracts.d.ts +59 -0
  99. package/dist/components/data/numericFieldProfiler.d.ts +23 -0
  100. package/dist/components/realtime/types.d.ts +5 -0
  101. package/dist/components/recipes/gridObservatory.d.ts +176 -0
  102. package/dist/components/recipes/netEnsembleLayout.d.ts +167 -0
  103. package/dist/components/recipes/netEnsembleOverlays.d.ts +20 -0
  104. package/dist/components/recipes/recipeChrome.d.ts +24 -0
  105. package/dist/components/recipes/sequenceLayout.d.ts +139 -0
  106. package/dist/components/recipes/wordTrails.d.ts +156 -0
  107. package/dist/components/recipes/wordTrailsProgressiveReveal.d.ts +42 -0
  108. package/dist/components/semiotic-ai-core.d.ts +3 -0
  109. package/dist/components/semiotic-ai-data-audit.d.ts +4 -0
  110. package/dist/components/semiotic-ai.d.ts +7 -5
  111. package/dist/components/semiotic-physics.d.ts +1 -0
  112. package/dist/components/semiotic-recipes-core.d.ts +10 -2
  113. package/dist/components/semiotic-utils-core.d.ts +3 -0
  114. package/dist/components/semiotic.d.ts +1 -1
  115. package/dist/components/server/renderEvidence.d.ts +27 -0
  116. package/dist/components/server/serverChartConfigs.d.ts +1 -0
  117. package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
  118. package/dist/components/server/staticAnnotations.d.ts +15 -1
  119. package/dist/components/stream/GeoPipelineStore.d.ts +1 -0
  120. package/dist/components/stream/GeoSVGOverlay.d.ts +7 -0
  121. package/dist/components/stream/SceneToSVG.d.ts +6 -6
  122. package/dist/components/stream/SceneToSVGOrdinal.d.ts +12 -0
  123. package/dist/components/stream/geoCartogram.d.ts +7 -0
  124. package/dist/components/stream/geoTypes.d.ts +17 -2
  125. package/dist/components/stream/networkFrameHandleTypes.d.ts +4 -0
  126. package/dist/components/stream/networkFramePaint.d.ts +2 -0
  127. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +18 -2
  128. package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +8 -0
  129. package/dist/components/stream/physics/physicsBodyCanvas.d.ts +7 -0
  130. package/dist/components/stream/physics/physicsPipelineEviction.d.ts +15 -0
  131. package/dist/components/stream/physics/physicsPipelineObservations.d.ts +1 -1
  132. package/dist/components/stream/physics/physicsPipelineQuiescence.d.ts +20 -0
  133. package/dist/components/stream/sceneToSVGShared.d.ts +30 -1
  134. package/dist/components/stream/types.d.ts +4 -0
  135. package/dist/components/stream/useHydration.d.ts +7 -1
  136. package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +1 -1
  137. package/dist/components/useChartContainerDataAudit.d.ts +7 -0
  138. package/dist/forceLayoutWorker.js +1 -1
  139. package/dist/geo.min.js +1 -1
  140. package/dist/geo.module.min.js +1 -1
  141. package/dist/network.min.js +1 -1
  142. package/dist/network.module.min.js +1 -1
  143. package/dist/ordinal.min.js +1 -1
  144. package/dist/ordinal.module.min.js +1 -1
  145. package/dist/physics.min.js +1 -1
  146. package/dist/physics.module.min.js +1 -1
  147. package/dist/physicsWorker.js +1 -1
  148. package/dist/realtime.min.js +1 -1
  149. package/dist/realtime.module.min.js +1 -1
  150. package/dist/rough.min.js +1 -1
  151. package/dist/rough.module.min.js +1 -1
  152. package/dist/semiotic-ai-core.d.ts +3 -0
  153. package/dist/semiotic-ai-core.min.js +1 -1
  154. package/dist/semiotic-ai-core.module.min.js +1 -1
  155. package/dist/semiotic-ai.d.ts +7 -5
  156. package/dist/semiotic-ai.min.js +1 -1
  157. package/dist/semiotic-ai.module.min.js +1 -1
  158. package/dist/semiotic-experimental.min.js +1 -1
  159. package/dist/semiotic-experimental.module.min.js +1 -1
  160. package/dist/semiotic-physics.d.ts +1 -0
  161. package/dist/semiotic-realtime-core.min.js +1 -1
  162. package/dist/semiotic-realtime-core.module.min.js +1 -1
  163. package/dist/semiotic-recipes-core.d.ts +10 -2
  164. package/dist/semiotic-recipes-core.min.js +1 -1
  165. package/dist/semiotic-recipes-core.module.min.js +1 -1
  166. package/dist/semiotic-recipes.min.js +1 -1
  167. package/dist/semiotic-recipes.module.min.js +1 -1
  168. package/dist/semiotic-server-edge.min.js +1 -1
  169. package/dist/semiotic-server-edge.module.min.js +1 -1
  170. package/dist/semiotic-server-node.min.js +1 -1
  171. package/dist/semiotic-server-node.module.min.js +1 -1
  172. package/dist/semiotic-utils-core.d.ts +3 -0
  173. package/dist/semiotic-utils-core.min.js +1 -1
  174. package/dist/semiotic-utils-core.module.min.js +1 -1
  175. package/dist/semiotic-utils.min.js +1 -1
  176. package/dist/semiotic-utils.module.min.js +1 -1
  177. package/dist/semiotic-value.module.min.js +1 -1
  178. package/dist/semiotic.d.ts +1 -1
  179. package/dist/semiotic.min.js +1 -1
  180. package/dist/semiotic.module.min.js +1 -1
  181. package/dist/server.min.js +1 -1
  182. package/dist/server.module.min.js +1 -1
  183. package/dist/xy.min.js +1 -1
  184. package/dist/xy.module.min.js +1 -1
  185. package/package.json +4 -3
  186. package/dist/chunk-chunk-255KDHW5.module.min.js +0 -1
  187. package/dist/chunk-chunk-2CCFBTQC.module.min.js +0 -2
  188. package/dist/chunk-chunk-2RXP3FS3.module.min.js +0 -1
  189. package/dist/chunk-chunk-2WVCH4PL.module.min.js +0 -1
  190. package/dist/chunk-chunk-4TMZXLCR.module.min.js +0 -1
  191. package/dist/chunk-chunk-5APBQXZA.module.min.js +0 -1
  192. package/dist/chunk-chunk-6HSGDMTA.module.min.js +0 -2
  193. package/dist/chunk-chunk-7OEOSCBP.module.min.js +0 -1
  194. package/dist/chunk-chunk-A63CTACR.module.min.js +0 -2
  195. package/dist/chunk-chunk-B6V35LMY.module.min.js +0 -2
  196. package/dist/chunk-chunk-BOSVL645.module.min.js +0 -2
  197. package/dist/chunk-chunk-CP3EN6KZ.module.min.js +0 -1
  198. package/dist/chunk-chunk-F25UA5HT.module.min.js +0 -1
  199. package/dist/chunk-chunk-FRIO6MCV.module.min.js +0 -1
  200. package/dist/chunk-chunk-GWSWSPXN.module.min.js +0 -1
  201. package/dist/chunk-chunk-I6C3KR5H.module.min.js +0 -2
  202. package/dist/chunk-chunk-IP2UE74X.module.min.js +0 -1
  203. package/dist/chunk-chunk-J3ELI22J.module.min.js +0 -1
  204. package/dist/chunk-chunk-J5RL6GXU.module.min.js +0 -2
  205. package/dist/chunk-chunk-L3H6DQCR.module.min.js +0 -2
  206. package/dist/chunk-chunk-M337NY6L.module.min.js +0 -1
  207. package/dist/chunk-chunk-M7VYYHCE.module.min.js +0 -2
  208. package/dist/chunk-chunk-MC35ILYP.module.min.js +0 -2
  209. package/dist/chunk-chunk-N72SWNBV.module.min.js +0 -1
  210. package/dist/chunk-chunk-OBQRFTIL.module.min.js +0 -2
  211. package/dist/chunk-chunk-QRIBHZYW.module.min.js +0 -1
  212. package/dist/chunk-chunk-SA3D43RA.module.min.js +0 -2
  213. package/dist/chunk-chunk-UHSZEB74.module.min.js +0 -1
  214. package/dist/chunk-chunk-Y6AXCRVO.module.min.js +0 -1
  215. package/dist/chunk-chunk-ZCNBUZPL.module.min.js +0 -2
@@ -1 +1 @@
1
- import{annotationBudget as e,annotationDrawsConnector as t,annotationType as r,isNoteAnnotation as o,resolveAccessor as a,resolveRawAccessor as n,resolveResponsiveRules as i}from"./chunk-chunk-J3ELI22J.module.min.js";function s(e,t){const r=e.length,o=t.length,a=Array(o+1);for(let e=0;o>=e;e++)a[e]=e;for(let n=1;r>=n;n++){let r=a[0];a[0]=n;for(let i=1;o>=i;i++){const o=a[i];a[i]=e[n-1]===t[i-1]?r:1+Math.min(r,a[i],a[i-1]),r=o}}return a[o]}function c(e,t,r=3){let o,a=r+1;for(const r of t){const t=s(e.toLowerCase(),r.toLowerCase());a>t&&(a=t,o=r)}return a>r?void 0:o}function l(e){return e.length>3?[e[0],e[Math.floor(e.length/2)],e[e.length-1]]:[...e]}function p(e,t){if(0===t.length)return null;const r=e.toLowerCase();return t.find(e=>e.toLowerCase().includes(r)||r.includes(e.toLowerCase()))||(c(e,t,3)??null)}var u={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 y(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}function d(e,t){const r=[];null!=t&&"object"==typeof t||(t={});const o=u[e];if(!o)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(u).join(", ")}`]};for(const a of o.required)null==t[a]&&r.push(`"${a}" 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||r.push(`"data" is required for ${e}.`);for(const[e,a]of Object.entries(t)){if(null==a)continue;const t=o.props[e];if(t){if(!y(a,t.type)){const o=Array.isArray(t.type)?t.type.join(" | "):t.type;r.push(`"${e}" should be ${o}, got ${Array.isArray(a)?"array":typeof a}.`);continue}t.enum&&"string"==typeof a&&!t.enum.includes(a)&&r.push(`"${e}" value "${a}" is not valid. Expected one of: ${t.enum.join(", ")}.`)}}const a=Object.keys(o.props),n=new Set(a);for(const o of Object.keys(t))if(void 0!==t[o]&&!n.has(o)){const t=c(o,a),n=t?`Unknown prop "${o}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${o}" for ${e}. Valid props: ${a.join(", ")}.`;r.push(n)}if("array"===o.dataShape){const a=t.data,n={};for(const e of o.dataAccessors){const r=t[e];"string"==typeof r&&(n[e]=r)}const i=function({componentName:e,data:t,accessors:r,requiredProps:o}){if(o)for(const[t,r]of Object.entries(o))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 o=l(t).find(e=>e&&"object"==typeof e);if(o){const t=Object.keys(o);for(const[a,n]of Object.entries(r))if(n&&"string"==typeof n&&!(n in o)){const r=p(n,t),o=r?` Try ${a}="${r}".`:"";return`${e}: ${a} "${n}" not found in data. Available fields: ${t.join(", ")}.${o}`}}}return null}({componentName:e,data:a,accessors:Object.keys(n).length>0?n:void 0});i&&r.push(i)}else if("object"===o.dataShape){const o=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});o&&r.push(o)}else if("network"===o.dataShape){const a=function({componentName:e,nodes:t,edges:r,nodesRequired:o=!1,edgesRequired:a=!0,accessors:n}){if(null==t&&null==r)return null;if(a&&(!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(o&&(!t||!Array.isArray(t)||0===t.length))return e+': No nodes provided. Pass a non-empty array: nodes={[{ id: "A" }, { id: "B" }, ...]}.';if(n&&t&&t.length>0){const r=l(t).find(e=>e&&"object"==typeof e);if(r){const t=Object.keys(r);for(const[o,a]of Object.entries(n))if(a&&"string"==typeof a&&!(a in r)){const r=p(a,t),n=r?` Try ${o}="${r}".`:"";return`${e}: ${o} "${a}" not found in node data. Available fields: ${t.join(", ")}.${n}`}}}return null}({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:o.required.includes("nodes"),edgesRequired:o.required.includes("edges")});a&&r.push(a)}return{valid:0===r.length,errors:r}}import{interpolateLab as m}from"d3-interpolate";function h(e,t={}){const r=[],o=e.tokenSemantics,a=e.countStrategy,n=t.maxRecommendedTokens??("fixed-denominator"!==a||function(e){const t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}(e.denominator)>100?80:100);return o||r.push({code:"TOKEN_SEMANTICS_UNCLEAR",severity:"warning",message:"Every tokenized encoding should state what one token represents."}),a||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>n&&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"!==o||"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"===o&&a&&"unitized"!==a&&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"===o&&a&&"fixed-denominator"!==a&&r.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||!a||"quantile"===a||"sample"===a||"posterior-sample"===a||"random-sample"===a||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"===o&&"unitized"===a&&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"!==o||"unitized"!==a||e.unitMeaning||r.push({code:"MISSING_UNIT_MEANING",severity:"info",message:"Add unitMeaning so readers know what one full token represents."}),r}function g(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[o,a,n]=[parseInt(r[1],16)/255,parseInt(r[2],16)/255,parseInt(r[3],16)/255],i=e=>e>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92;return.2126*i(o)+.7152*i(a)+.0722*i(n)}function b(e,t){const r=g(e),o=g(t);return null===r||null===o?null:(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}var f=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),v=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),w=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),x=new Set(["LineChart","AreaChart","StackedAreaChart"]),A=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),C=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),S=new Set(["PieChart","DonutChart"]),k={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},j=new Set(Object.keys(k)),P={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},$=new Set(["BigNumber"]),I=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),R=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]),T=new Set(["OrbitDiagram",...R]),N=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart"]),B=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]),L=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),F=new Set(["MultiAxisLineChart"]),D=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),E={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"};import*as M from"react";function O(e){const t=e.provenance,r=e.id??e.stableId??t?.stableId;return null==r||""===r?void 0:r+""}var z=["xExtent","yExtent","rExtent"];function G(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:null}function H(e,t,r){if("function"==typeof t)return t(e);const o="string"==typeof t?t:r;return e?.[o]}var _=new Set(["category10","tableau10","set3","blues","reds","greens","oranges","purples","greys","viridis","plasma","inferno","magma","cividis","turbo"]),q=["xAccessor","yAccessor","timeAccessor","valueAccessor","categoryAccessor","colorBy","sizeBy","lineBy","areaBy","stackBy","groupBy","orderAccessor","y0Accessor","sourceAccessor","targetAccessor","nodeIDAccessor","childrenAccessor","costAccessor"];function W(e){return"object"==typeof e&&null!==e&&("tokenType"in e||"tokenSemantics"in e||"countStrategy"in e||"unitValue"in e||"unit"in e)}function V(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:void 0}function U(e,t){const r=V(e.visibleTokens);if(null!=r)return r;const o=V(t.denominator);if("fixed-denominator"===t.countStrategy&&null!=o)return o;const a=V(t.tokenCount),n=V(t.maxTokens);return null!=a&&null!=n?Math.min(a,n):a??o??n}function Y(a,n){const i=[],s=d(a,function(e){const t={...e};return delete t.tokenEncoding,delete t.visibleTokens,W(t.encoding)&&delete t.encoding,t}(n));for(const e of s.errors)i.push({severity:"error",code:"VALIDATION",message:e,fix:""});return u[a]?(function(e,t,r){const o=u[e];if(o){if("array"===o.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"===o.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" }]}.'})}}(a,n,i),function(e,t,r){const o=t.width,a=t.height;if(void 0===o||"number"==typeof o&&o>0||r.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===a||"number"==typeof a&&a>0||r.push({severity:"error",code:"BAD_HEIGHT",message:`height=${JSON.stringify(a)} — 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)&&r.push({severity:"error",code:"BAD_SIZE",message:`size=[${e}, ${o}] — both dimensions must be positive.`,fix:"Set size={[600, 400]}."})}}(0,n,i),function(e,t,r){const o=u[e];if(!o||"array"!==o.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const n=a[0];if(!n||"object"!=typeof n)return;const i=Object.keys(n);for(const e of o.dataAccessors){const o=t[e];"string"==typeof o&&(o in n||r.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(", ")}.`}))}}(a,n,i),function(e,t,r){f.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.'})}(a,n,i),function(e,t,r){v.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 }]}.'}))}(a,n,i),function(e,t,r){const o=u[e];if(!o||"array"!==o.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const n=a[0];if(!n||"object"!=typeof n)return;const i=t.xAccessor;"string"==typeof i&&n[i]instanceof Date&&!t.xFormat&&r.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."})}(a,n,i),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,n,i),function(e,t,r){if(!w.has(e))return;const o=t.rExtent||t.yExtent||t.valueExtent;o&&Array.isArray(o)&&o.length>=1&&null!=o[0]&&0!==o[0]&&r.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.`})}(a,n,i),function(e,t,r){if(!x.has(e))return;if(t.gapStrategy)return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const a=t.yAccessor||"y";"string"==typeof a&&o.some(e=>{const t=e[a];return null==t||Number.isNaN(t)})&&r.push({severity:"warning",code:"DATA_GAPS",message:`Data contains null/undefined/NaN values in "${a}". Default behavior breaks the line at gaps.`,fix:'Set gapStrategy="break" (default), "interpolate", or "zero" to control gap handling.'})}(a,n,i),function(e,t,r){const o=t.width??600,a=t.height??400,n=t.margin;if(!n||"object"!=typeof n)return;const i=(n.left||0)+(n.right||0),s=(n.top||0)+(n.bottom||0);o>i||r.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."}),a>s||r.push({severity:"error",code:"MARGIN_OVERFLOW_V",message:`Vertical margins (${s}px) >= height (${a}px) — no drawing area left.`,fix:"Reduce margin.top/bottom or increase height."})}(0,n,i),function(e,t,r){const o=u[e];if(!o||"array"!==o.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const n=[];t.xAccessor&&"string"==typeof t.xAccessor&&n.push({prop:"xAccessor",name:t.xAccessor}),t.yAccessor&&"string"==typeof t.yAccessor&&n.push({prop:"yAccessor",name:t.yAccessor}),t.valueAccessor&&"string"==typeof t.valueAccessor&&n.push({prop:"valueAccessor",name:t.valueAccessor});const i=Math.min(a.length,5);for(const e of n){let t=!0;for(let r=0;i>r;r++){const o=a[r]?.[e.name];if("number"==typeof o&&Number.isFinite(o)){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.`})}}(a,n,i),function(e,t,r){if(!A.has(e))return;const o=t.barPadding;"number"==typeof o&&10>o&&r.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}."})}(a,n,i),function(e,t,r){if("bottom"!==t.legendPosition)return;const o=t.margin;if(!o||"object"!=typeof o)return;const a=o.bottom;"number"==typeof a&&70>a&&r.push({severity:"warning",code:"BOTTOM_MARGIN_WITH_LEGEND",message:`legendPosition="bottom" with margin.bottom=${a}px — legend may overlap axis labels.`,fix:"Increase margin.bottom to at least 70, e.g. margin={{ ...margin, bottom: 80 }}."})}(0,n,i),function(e,t,r){if(!t.showLegend)return;if("right"!==(t.legendPosition??"right"))return;const o=t.margin;if(!o||"object"!=typeof o)return;const a=o.right;"number"==typeof a&&100>a&&r.push({severity:"warning",code:"LEGEND_MARGIN_TIGHT",message:`showLegend is true with legendPosition="right" but margin.right=${a}px — legend may be clipped or overlap the chart.`,fix:"Increase margin.right to at least 100, e.g. margin={{ ...margin, right: 120 }}."})}(0,n,i),function(e,t,r){if("Heatmap"!==e)return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const a=o[0];if(a&&"object"==typeof a)for(const e of["xAccessor","yAccessor"]){const o=t[e];if("string"!=typeof o)continue;const n=a[o];"string"==typeof n&&r.push({severity:"warning",code:"HEATMAP_STRING_ACCESSOR",message:`${e}="${o}" resolves to string values (e.g. "${n}"). 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."})}}(a,n,i),function(e,t,r){const o=t.colorScheme;if(!o||!Array.isArray(o))return;const a="string"==typeof t.background?t.background:"#ffffff";if(!a.startsWith("#"))return;const n=[];for(const e of o){if("string"!=typeof e||!e.startsWith("#"))continue;const t=b(e,a);null!==t&&3>t&&n.push(`${e} (${t.toFixed(1)}:1)`)}n.length>0&&r.push({severity:"warning",code:"LOW_COLOR_CONTRAST",message:`${n.length} color(s) in colorScheme have < 3:1 contrast against background "${a}": ${n.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,n,i),function(e,t,r){const o=t.colorScheme;if(!o||!Array.isArray(o)||2>o.length)return;const a=o.filter(e=>"string"==typeof e&&e.startsWith("#"));if(2>a.length)return;const n=[];for(let e=0;a.length-1>e;e++){const t=b(a[e],a[e+1]);null!==t&&1.5>t&&n.push(`${a[e]} / ${a[e+1]} (${t.toFixed(1)}:1)`)}n.length>0&&r.push({severity:"warning",code:"LOW_ADJACENT_CONTRAST",message:`${n.length} adjacent color pair(s) in colorScheme have very similar luminance: ${n.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,n,i),function(e,t,r){const o=t.colorScheme;if("string"!=typeof o)return;const a=u[e];a?.props?.colorScheme?.enum||_.has(o)||r.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 (${[..._].join(", ")}) or pass an explicit color array, e.g. colorScheme={["#1f77b4", "#ff7f0e"]}.`})}(a,n,i),function(e,t,r){const o=u[e]?.props,a=e=>!!o?.[e]&&"string"==typeof t[e]&&t[e].trim().length>0,n=a("title"),i=a("description"),s=a("summary");n||i||s||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.'})}(a,n,i),function(e,t,r){const o=[];for(const e of q)"function"==typeof t[e]&&o.push(e);o.length>0&&r.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,n,i),function(e,t,r){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)&&r.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,n,i),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,n,i),function(e,t,r){if(!0!==t.showParticles)return;const o=t.particleStyle&&"object"==typeof t.particleStyle?t.particleStyle:{},a="number"==typeof o.maxPerLine?o.maxPerLine:void 0,n="number"==typeof o.spawnRate?o.spawnRate:void 0;("number"==typeof a&&a>20||"number"==typeof n&&n>.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,n,i),function(e,t,r){const o=[];W(t.tokenEncoding)&&o.push({source:"tokenEncoding",encoding:t.tokenEncoding}),W(t.encoding)&&o.push({source:"encoding",encoding:t.encoding});for(const{source:e,encoding:a}of o){const o=U(t,a);for(const t of h(a,{visibleTokens:o}))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,n,i),function(e,a,n){const i=Array.isArray(a.annotations)?a.annotations:null;if(i)for(const e of i){if(!e||"object"!=typeof e)continue;const a=r(e);if(!o(e)||"widget"===a)continue;const i=Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0),s="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:a,c=t(e);!c&&i>120?n.push({severity:"warning",code:"ANNOTATION_FAR_NO_CONNECTOR",message:`Annotation "${s}" sits ~${Math.round(i)}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).'}):c&&i>250&&n.push({severity:"warning",code:"ANNOTATION_LONG_CONNECTOR",message:`Annotation "${s}" uses a very long connector (~${Math.round(i)}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,n,i),function(t,r,a){const n=Array.isArray(r.annotations)?r.annotations:null;if(!n)return;const i=n.filter(o).length;if(0===i)return;const s="number"==typeof r.width?r.width:600,c="number"==typeof r.height?r.height:400,l=e(s,c);Number.isFinite(l)&&i>l&&a.push({severity:"warning",code:"ANNOTATION_DENSITY",message:`${i} note annotations on a ${s}×${c} chart exceed the ~${l} 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,n,i),function(e,t,o){const a=Array.isArray(t.annotations)?t.annotations:null;if(a)for(const e of a)e&&"object"==typeof e&&"widget"===r(e)&&null!=e.content&&!O(e)&&o.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,n,i),function(e,t,r){for(const e of z){const o=t[e];if(!Array.isArray(o)||2>o.length)continue;const[a,n]=o;"number"==typeof a&&"number"==typeof n&&a>n&&r.push({severity:"warning",code:"INVERTED_AXIS",message:`${e}=[${a}, ${n}] 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}={[${n}, ${a}]}). 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,n,i),function(e,t,r){if("MultiAxisLineChart"!==e)return;const o=t.series;if(!Array.isArray(o)||2!==o.length)return;const a=o.filter(e=>!e||"object"!=typeof e||"string"!=typeof e.label||0===e.label.trim().length);a.length>0&&r.push({severity:"warning",code:"DUAL_AXIS_UNLABELED",message:`Dual-axis chart with ${a.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.'})}(a,n,i),function(e,t,r){if(!x.has(e))return;const o=t.xExtent;if(!Array.isArray(o)||2>o.length)return;const[a,n]=o;if("number"!=typeof a||"number"!=typeof n||a>=n)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(n,l)-Math.max(a,c))/p;.7>u&&r.push({severity:"warning",code:"CHERRY_PICKED_WINDOW",message:`xExtent=[${a}, ${n}] 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.'})}(a,n,i),function(e,t,r){const o=k[e],a=P[e];if(!o&&!a)return;if(a&&!t.normalize)return;const n=o??a,i=t[n],s="string"==typeof i?i:"yAccessor"===n?"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&&r.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."})}(a,n,i),function(e,t,r){C.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.'})}(a,n,i),function(e,t,r){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,a="number"==typeof t.height?t.height:400;if(0>=o||0>=a)return;const n=o/a;if(n>8||.25>n){const e=n>8?"flattens":"exaggerates";r.push({severity:"warning",code:"EXTREME_ASPECT_RATIO",message:`${o}×${a} (${n.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:n>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."})}}(a,n,i),function(e,t,r){if(!S.has(e))return;const o=t.data;if(!o||!Array.isArray(o)||0===o.length)return;const a=t.categoryAccessor,n="string"==typeof a?a:"category",i=new Set;for(const e of o){const t=e?.[n];null!=t&&i.add(t)}i.size>8&&r.push({severity:"warning",code:"PIE_TOO_MANY_SLICES",message:i.size+" slices — angle judgments degrade rapidly past ~8 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.`})}(a,n,i),function(e,t,r){if(B.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 o=G(t.branchProbability);null!=t.branchProbability&&(null==o||0>o||o>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 a=G(t.mechanicalCount);null==t.mechanicalCount||null!=a&&a>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,o=e&&"object"==typeof e?G(e.size):null;null==o||o>0||r.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||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 a=Array.isArray(t.data)?t.data:[];if(a.length>0){const e=t.timeAccessor||"time",o=t.arrivalAccessor||"arrivalTime";a.some(t=>{const r=G(H(t,e,"time")),a=G(H(t,o,"arrivalTime"));return null!=r&&null!=a&&r!==a})||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=G(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 o=G(t.unitValue??1)??1;if(0>=o)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 a=t.valueAccessor||"value",n=(Array.isArray(t.data)?t.data:[]).reduce((e,t)=>{const r=G(H(t,a,"value"))??0;return e+Math.max(0,Math.round(r/o))},0);n>1500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`PhysicsPileChart would create about ${n} 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((G(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."}),(G(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:[],o=G(e[0]),a=G(e[1]);(2>e.length||null==o||null==a)&&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 o=t.groupAccessor;if(e.length>0&&o){const t=new Set;for(const r of e){const e=H(r,o,"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 o=e.filter(e=>e?.absorb).length;t.groupBy&&0===o&&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 o=Array.isArray(t.data)?t.data:[],a=G(t.mechanicalCount)??0,n=o.length>0?o.length*("PhysicsPileChart"===e?Math.max(1,(G(t.unitValue),1)):1):a;n>2500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`${e} may spawn ~${Math.round(n)} 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."})}}}(a,n,i),{ok:i.every(e=>"warning"===e.severity),diagnoses:i}):{ok:0===i.length,diagnoses:i}}var X=["title","description","summary"];function K(e){return"string"==typeof e&&e.trim().length>0}function J(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 o=Array.isArray(e)?e.every(e=>J(e,t)):Object.entries(e).every(([,e])=>J(e,t));return t.delete(e),o}var Q=Symbol.for("semiotic.chartRecipeRegistry");function Z(){const e=globalThis;return e[Q]||(e[Q]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[Q]}function ee(e){return Z().recipes.get(e)}function te(e){return"string"==typeof e?ee(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}var re=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]);function oe(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 ae(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 ne(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function ie(e,a,n={}){const i=[],s=ee(e),c=R.has(e),l=!!u[e]||!!s||c,p=!0===n.inChartContainer,y=!0===n.describe,d=!0===n.navigable,m=$.has(e),h=f.has(e),{hasTitle:g,hasDescription:v,hasSummary:w,unsupportedFinding:x}=function(e,t){const r=u[e]?.props,o=e=>!!r?.[e],a=X.filter(e=>K(t[e])&&!o(e));return{hasTitle:o("title")&&K(t.title),hasDescription:o("description")&&K(t.description),hasSummary:o("summary")&&K(t.summary),unsupportedFinding:a.length>0?{id:"understandable.unsupported-description-prop",principle:"understandable",heuristic:"Descriptive text is connected to the rendered chart",critical:!0,status:"warn",message:`Useful ${a.join(" and ")} text was supplied, but ${1===a.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,a),A=!1!==a.accessibleTable&&!m,C=g||v||w,S=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(a),k=function(e){const t=ne(e),r=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===r.pause||"function"==typeof r.pause}(a),P=c,B=function(e){const t=ne(e);return!0===e.settledProjection||!0===t.settledProjection}(a)||N.has(e)&&A,M=function(e){const t=ne(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(a)||P,O=Array.isArray(a.annotations)?a.annotations.filter(e=>!!e&&"object"==typeof e):[],z=l?"pass":"manual",G=l?"":` (unrecognized component "${e}" — verify manually that the built-in applies)`;if(x&&i.push(x),i.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},r=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 a=o??"#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 n=[];let i=0;for(const e of r){if("string"!=typeof e||!e.startsWith("#"))continue;const t=b(e,a);null!=t&&(i++,3>t&&n.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."}:n.length>0?{...t,status:"fail",message:`${n.length} color(s) fall below 3:1 contrast vs ${a}: ${n.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 ${a}.`}}(a)),i.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...m?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:A?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:v&&w?{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."}}),i.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."}),i.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=a.pulse||T.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!=a.colorBy){i.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...!0===a.directLabel||!0===a.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(a.colorScheme)?a.colorScheme:null,t=e?e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase()):[],r=t.length>0&&t.every(e=>re.has(e));i.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...r?{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.'}}),i.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=O.filter(o);if(e.length>0){const o=a.autoPlaceAnnotations,n="object"==typeof o&&null!==o&&!0===o.redundantCues,s=e.filter(e=>{if("string"!=typeof e.color)return!1;const o=r(e),a=n&&"text"===o;return!(t(e)||a)});i.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===s.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:`${s.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."}})}}i.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...l?{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==a.brush&&null==a.onBrush||e.push("brushing"),!0===a.zoomable&&e.push("zoom/pan"),"isolate"!==a.legendInteraction&&"highlight"!==a.legendInteraction||e.push("legend filtering"),e.length>0&&i.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 t=E[e];if(t&&S){const e=a[t];"number"==typeof e&&e>0&&24>2*e&&i.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${t}=${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."})}}i.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:z,message:`The chart takes a single tab stop and navigates data with arrow keys${G} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),i.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...S?w||v?{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."}}),i.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:z,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${G}.`}),i.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:z,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${G}.`,fix:l?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),i.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...C?{status:"pass",message:`Provided: ${[g&&"title",v&&"description",w&&"summary"].filter(Boolean).join(", ")}.`}:p?{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)."}}),i.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...v||w?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:y?{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."}:g?{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=[a.description,a.summary].filter(K).join(". "),t=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 o=0;for(const e of r)o+=ae(e);return r.length/t.length*.39+o/r.length*11.8-15.59}(e):null;i.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==t?{status:"not-applicable",message:"No description/summary text to grade."}:t>9?{status:"warn",message:`Description/summary reads at ~grade ${t.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(t))} (≤ 9).`}})}if(I.has(e)){const e=K(a.xLabel),t=K(a.yLabel);i.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&t?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!t&&"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(F.has(e)&&i.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."}),O.length>1){const e=O.filter(oe).length;i.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===O.length?{status:"pass",message:`All ${O.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:O.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:`${O.length-e} of ${O.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!=a.forecast||null!=a.anomaly||null!=a.band||null!=a.regression)&&i.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!=a.animate&&!1!==a.animate&&i.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:z,message:`Transitions animate with object constancy and data changes are mirrored to the live region${G}.`,fix:l?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),i.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."}),i.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."}),i.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:z,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${G}.`,fix:l?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),i.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...m?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:A?{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)."}}),m||i.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...p?{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)."}}),i.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:l?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${l?"":G}.`,fix:l?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),i.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...d?{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:h?{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:z,message:`Keyboard navigation steps through points and switches series/groups${G}.`,fix:l?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const t=Array.isArray(a.data)?a.data:null,r=Array.isArray(a.nodes)?a.nodes:null,o={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let n;n=j.has(e)&&t&&t.length>7?{...o,status:"warn",message:t.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.'}:r&&r.length>200?{...o,status:"warn",message:r.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."}:t&&t.length>5e3?{...o,status:"warn",message:t.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."}:t?{...o,status:"pass",message:t.length+" data points — a reasonable density for non-visual consumption."}:r?{...o,status:"pass",message:r.length+" nodes — a reasonable density for non-visual consumption."}:{...o,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},i.push(n)}{const e=Array.isArray(a.data)?a.data:null,t=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof a[e]||"string"==typeof a[e]);let r=!1;if(e&&!t)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){r=!0;break}if(r)break}r&&i.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.'})}i.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...y?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:w?{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."}}),i.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...m?{status:"not-applicable",message:"Single value — nothing to skip."}:A?{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."}}),i.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:z,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${G}.`,fix:l?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),i.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...T.has(e)||L.has(e)?k?{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:z,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${G}.`}}),c&&(i.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...k?{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."}}),i.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...B?{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."}}),i.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...M?{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 t=!0===a.responsiveWidth||!0===a.responsiveHeight,r=D.has(e)&&!0===a.zoomable;i.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...t?{status:"pass",message:`Chart reflows to its container (${[!0===a.responsiveWidth&&"responsiveWidth",!0===a.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:r?{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(s){const e=s.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));e&&i.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:s.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"!==s.accessibility.description||K(a.description)||i.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:s.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),s.accessibility.fallbackTable&&!1===a.accessibleTable&&i.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:s.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const H=i.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),_={criticalsPassed:H.filter(e=>"pass"===e.status).length,criticalsEvaluated:H.length,fails:i.filter(e=>"fail"===e.status).length,warnings:i.filter(e=>"warn"===e.status).length,manual:i.filter(e=>"manual"===e.status).length,passes:i.filter(e=>"pass"===e.status).length};return{component:e,ok:!H.some(e=>"fail"===e.status),summary:_,findings:i,reference:"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 se(e,{onlyCritical:t=!1}={}){const r=[];for(const o of e.findings)"fail"!==o.status&&"warn"!==o.status||t&&!o.critical||r.push(o.message);return r}var ce={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},le=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function pe(e){const t=[],r=e.summary,o=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(` ${o} · ${r.warnings} warning(s) · ${r.manual} to verify manually`);for(const r of le){const o=e.findings.filter(e=>e.principle===r&&"not-applicable"!==e.status);if(0!==o.length){t.push(""),t.push(" "+r.toUpperCase());for(const e of o)t.push(` ${ce[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")}var ue=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart","RealtimeLineChart","RealtimeHeatmap"]),ye=new Set(["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","DotPlot","RidgelinePlot","FunnelChart","LikertChart","SwimlaneChart"]),de={Scatterplot:["pointRadius","hoverRadius"],BubbleChart:["pointRadius","hoverRadius"],ConnectedScatterplot:["pointRadius","hoverRadius"],QuadrantChart:["pointRadius","hoverRadius"],SwarmPlot:["pointRadius","hoverRadius"],DotPlot:["dotRadius","hoverRadius"]};function me(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function he(e){return"string"==typeof e&&e.trim().length>0}function ge(e){const t=me(e.capability)?e.capability:null,r=me(e.recipe)?e.recipe:null,o=[e.mobileSemantics,e.mobileVisualization,e.mobile,t?.mobile,r?.mobile];for(const e of o)if(me(e))return e;return null}function be(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 fe(e){return be(e.size)||be(me(e.frameProps)?e.frameProps.size:void 0)||("number"==typeof e.width&&"number"==typeof e.height?[e.width,e.height]:null)}function ve(e,t){e.push({...t,status:"pass"})}function we(e,t){e.push({...t,status:"warn"})}function xe(e,t){e.push({...t,status:"manual"})}function Ae(e,t={},r={}){const o=r.viewportWidth??390,a=r.targetSize??44,n=fe(t),s=i(t,{width:o,height:n?.[1]}),c=[],l=fe(t=s.props),p=ge(t),u=function(e,t){return e.includes("CustomChart")||e.includes("Custom")||null!=t.recipeId||null!=t.mobileSemantics}(e,t),y=function(e){const t=ge(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),d=!0===r.inChartContainer,m=he(t.title)||he(t.summary)||he(t.description)||!0===p?.summary||he(p?.summary);if(s.matches.length>0&&ve(c,{id:"layout.responsive-rule-applied",category:"layout",impact:"medium",message:`${s.matches.length} responsive rule(s) applied for the ${o}px mobile audit.`}),l){const[t,r]=l;t>o&&!y?we(c,{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."}):ve(c,{id:"layout.fixed-desktop-size",category:"layout",impact:"high",message:"No fixed desktop-width overflow risk is visible from the config."}),"number"==typeof p?.minViewportWidth&&p.minViewportWidth>o&&we(c,{id:"layout.mobile-min-width",category:"layout",impact:"high",message:`The declared mobile contract supports ${p.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 a=t/Math.max(1,r);430>=o&&a>2.4&&"BigNumber"!==e&&we(c,{id:"layout.wide-aspect-ratio",category:"layout",impact:"medium",message:`Chart aspect ratio is ${a.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&&we(c,{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 xe(c,{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 h=function(e){const t=[e.data,e.points,e.lines,e.nodes,e.edges,e.areas,me(e.frameProps)?e.frameProps.data:void 0];let r=0;for(const e of t)Array.isArray(e)&&(r+=e.length);return r}(t);h>0&&(h>("number"==typeof p?.maxMarks?p.maxMarks:ue.has(e)?1.25*o:ye.has(e)?Math.max(8,Math.floor(o/34)):o)?we(c,{id:"density.mark-budget",category:"density",impact:ue.has(e)?"medium":"high",message:`${h} 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."}):ve(c,{id:"density.mark-budget",category:"density",impact:"medium",message:h+" data item(s) are within the rough mobile density budget for this component."}));const g=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),b=!1!==t.showAxes&&!1!==t.axis;if(b&&null!=g){const e=Math.max(3,Math.floor(o/58));g>e&&we(c,{id:"density.explicit-tick-count",category:"density",impact:"medium",message:`${g} 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 b&&(ue.has(e)||ye.has(e))&&xe(c,{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=me(e.frameProps)?e.frameProps:{};return(!0===e.enableHover||null!=e.tooltipContent||null!=e.tooltip||null!=t.tooltipContent||!0===t.enableHover)&&!function(e){const t=ge(e),r=me(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||he(t?.interaction?.hoverFallback)}(e)}(t)?ve(c,{id:"interaction.hover-only-detail",category:"interaction",impact:"high",message:"No hover-only detail path is visible from the config."}):we(c,{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 f=function(e,t){const r=de[e];if(!r)return null;let o=r.includes("hoverRadius")?30:null;for(const e of r){const r=t[e];"number"==typeof r&&Number.isFinite(r)&&r>0&&(o=null==o?r:Math.max(o,r))}return null==o?null:2*o}(e,t),v=me(t.mobileInteraction)?t.mobileInteraction:null,w=f??("number"==typeof v?.targetSize?v.targetSize:!0===t.mobileInteraction?44:"number"==typeof p?.minimumHitTarget?p.minimumHitTarget:"number"==typeof p?.interaction?.targetSize?p.interaction.targetSize:null);null!=w&&(24>w?we(c,{id:"interaction.target-size-minimum",category:"interaction",impact:"high",message:`Small interactive marks expose an estimated ${w}px pointer target, below WCAG's 24px minimum.`,fix:"Increase mark radius/hoverRadius, add tap snapping to nearest datum, or provide larger external controls."}):a>w?we(c,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${w}px, above 24px but below the ${a}px comfortable phone target.`,fix:"Use hoverRadius/tapRadius near 44px while keeping the visible mark small if needed."}):ve(c,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${w}px, meeting the configured ${a}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 r=ge(e),o=me(e.mobileInteraction)?e.mobileInteraction:null,a=o?.standardControls;return!!(null!=e.controls||null!=e.mobileControls||!0===e.alternativeControls||Array.isArray(r?.interaction?.alternatives)&&r.interaction.alternatives.length>0)||!0===a||"all"===a||t.every(e=>"brush"===e?Array.isArray(a)?a.includes("brush"):"brush"===a:"pan/zoom"===e?Array.isArray(a)?a.includes("zoom"):"zoom"===a:"legend filtering"===e&&(Array.isArray(a)?a.includes("legend"):"legend"===a))}(t,x)&&we(c,{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"===p?.labels?.strategy||"inline"===p?.labels?.strategy||"external"===p?.labels?.strategy||o>430||we(c,{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 A=Array.isArray(t.annotations)?t.annotations.filter(e=>me(e)):[];if(A.length>("number"==typeof p?.maxAnnotations?p.maxAnnotations:3)&&430>=o&&we(c,{id:"annotation.mobile-density",category:"annotation",impact:"medium",message:A.length+" annotation(s) compete for phone plot space.",fix:"Assign annotation priority, collapse secondary notes into a callout list, or provide shorter mobileText."}),A.length>0){const e=A.filter(e=>!he(e.mobileText)&&!he(e.shortText)&&!he(e.label));e.length>0&&xe(c,{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."})}y||"BigNumber"===e||xe(c,{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."}),u&&(p?(ve(c,{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===p.custom?.dataBearingSceneNodes?we(c,{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!==p.custom?.dataBearingSceneNodes&&xe(c,{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."})):xe(c,{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."})),m||d||we(c,{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 C=c.filter(e=>"warn"===e.status),S={highRisk:C.filter(e=>"high"===e.impact).length,warnings:C.length,manual:c.filter(e=>"manual"===e.status).length,passes:c.filter(e=>"pass"===e.status).length};return{component:e,viewportWidth:o,ok:0===S.highRisk,summary:S,findings:c,reference:"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."}}var Ce={pass:"PASS",warn:"WARN",manual:"MANUAL","not-applicable":"N/A"},Se=["layout","density","interaction","annotation","semantics"];function ke(e){const t=[],r=e.summary,o=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(` ${o} - ${r.warnings} warning(s) - ${r.manual} manual check(s)`);for(const r of Se){const o=e.findings.filter(e=>e.category===r&&"not-applicable"!==e.status);if(0!==o.length){t.push(""),t.push(" "+r.toUpperCase());for(const e of o)t.push(` ${Ce[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 je(){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."]}var Pe=["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"],$e=new Set(Pe);function Ie(e){return $e.has(e)}function Re(e){return"string"==typeof e?e:e.id??e.name}function Te(e){return e.layoutConfig&&"object"==typeof e.layoutConfig?e.layoutConfig:{}}function Ne(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 Be(e,t,r){return r??te(t.recipe)??te(t.recipeId)??ee(e)}function Le(e,t,r=[]){const o=e.accessor?t[e.accessor]:void 0;if("string"==typeof o&&o)return o;if(e.field)return e.field;const a=r.find(e=>e&&"object"==typeof e);if(!a)return;const n=Object.entries(a).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?n.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>e in a):n.find(([,e])=>"string"==typeof e)?.[0]}function Fe(e,t){return e.dataRoles.find(e=>e.role===t)}function De(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function Ee(e,t,r,o,a,n={}){const i={...n};if(t)for(const[e,r]of Object.entries(t))i[e]=r;for(const e of r.dataRoles){const r=Le(e,o,a),n=t&&r?t[r]:r;void 0!==n&&(i[e.role]=n)}return e.replace(/\{([^}]+)\}/g,(e,t)=>{const r=i[t];return null==r?`{${t}}`:r+""})}var Me=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"]),Oe=new Set(["data","nodes","edges","points","areas","lines","flows"]);function ze(e,t){return!!Oe.has(e)&&("areas"!==e||"string"!=typeof t)}var Ge="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e));function He(e,t,r){const o=ee(e)??te(t.recipe)??te(t.recipeId);if(o)return function(e,t,r){const o=function(e,t,r){const o={};for(const[a,n]of Object.entries(e))if(null!=n&&!Me.has(a)&&"recipeId"!==a&&(t||!ze(a,n)))if("function"==typeof n||n?.$$typeof){if(r)throw Error(`Portable recipe prop "${a}" is not JSON-safe.`)}else if(J(n))o[a]=Ge(n);else if(r)throw Error(`Portable recipe prop "${a}" is not JSON-safe.`);return o}(t,!1!==r?.includeData,"portable"===e.portability),a=e.intents.map(Re).filter(e=>!!e),n={name:e.name,intents:a,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily};if("portable"===e.portability){if(!J(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:n,version:"1",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:o,manifest:n,version:"1",createdAt:(new Date).toISOString(),...r?.selections?{selections:r.selections}:{}}}(o,t,r);if(!Ie(e))throw Error(`Unknown component "${e}". Known components: ${Pe.join(", ")}`);const a=!1!==r?.includeData,n={};for(const[e,r]of Object.entries(t))null!=r&&(Me.has(e)||!a&&ze(e,r)||"function"!=typeof r&&(r?.$$typeof||(n[e]=Ge(r))));return{component:e,props:n,version:"1",createdAt:(new Date).toISOString(),...r?.selections?{selections:r.selections}:{}}}function _e(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=ee(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:{...Ge(e.props),recipeId:e.recipeId}}}if(!Ie(e.component))throw Error(`Unknown component "${e.component}". This config may require a newer version of semiotic.`);return{componentName:e.component,props:Ge(e.props)}}function qe(e){const t=JSON.stringify(e);return"sc="+btoa(unescape(encodeURIComponent(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function We(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,"/"),o=decodeURIComponent(escape(atob(r)));return JSON.parse(o)}async function Ve(e,t="json"){const r="jsx"===t?Ue(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 Ue(e){const{props:t}=e,r=["<"+("LocalChartRecipe"===e.component?"ChartRecipe":e.component)];e.recipeId&&r.push(` recipeId="${e.recipeId}"`);for(const[e,o]of Object.entries(t))if("string"==typeof o)r.push(` ${e}="${o}"`);else if("boolean"==typeof o&&!0===o)r.push(" "+e);else if("boolean"==typeof o&&!1===o)r.push(` ${e}={false}`);else if("number"==typeof o)r.push(` ${e}={${o}}`);else{const t=JSON.stringify(o);r.push(80>t.length?` ${e}={${t}}`:` ${e}={${JSON.stringify(o,null,2)}}`)}return r.push("/>"),r.join("\n")}var Ye=/^\d{4}[-/]\d{2}/,Xe=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ke(e){return"number"==typeof e?Number.isFinite(e)?"numeric":"unknown":e instanceof Date?"date":"string"==typeof e?Ye.test(e)&&!Number.isNaN(Date.parse(e))?"date":Xe.test(e)&&Number.isFinite(Number(e))?"numeric":"categorical":"boolean"==typeof e?"categorical":"unknown"}function Je(e){let t=1/0,r=-1/0;for(let o=0;e.length>o;o++){const a=e[o];t>a&&(t=a),a>r&&(r=a)}return{min:t,max:r}}function Qe(e){const t=e.length;if(0===t)return NaN;const r=t>>1;return t%2==0?(e[r-1]+e[r])/2:e[r]}function Ze(e,t={}){const{maxDistinct:r=10,sampleSize:o=5,keyScanRows:a=100}=t;if(!Array.isArray(e)||0===e.length)return{rowCount:0,fields:{},sample:[]};const n=new Set,i=Math.min(e.length,a);for(let t=0;i>t;t++){const r=e[t];if(r&&"object"==typeof r)for(const e of Object.keys(r))n.add(e)}const s={};for(const t of n){const o=[];for(let r=0;e.length>r;r++){const a=e[r]?.[t];null!=a&&o.push(a)}if(0===o.length){s[t]={type:"unknown"};continue}const a=Ke(o[0]);if("numeric"===a){const e=[];for(let t=0;o.length>t;t++){const r=Number(o[t]);Number.isFinite(r)&&e.push(r)}if(0===e.length){s[t]={type:"unknown"};continue}const{min:r,max:a}=Je(e);let n=0;for(let t=0;e.length>t;t++)n+=e[t];const i=[...e].sort((e,t)=>e-t);s[t]={type:"numeric",min:r,max:a,mean:n/e.length,median:Qe(i)}}else if("date"===a){const e=[];for(let t=0;o.length>t;t++){const r=o[t],a=r instanceof Date?r.getTime():Date.parse(r);Number.isFinite(a)&&e.push(a)}if(0===e.length){s[t]={type:"unknown"};continue}const{min:r,max:a}=Je(e);s[t]={type:"date",min:new Date(r).toISOString(),max:new Date(a).toISOString()}}else if("categorical"===a){const e=new Map;for(let t=0;o.length>t;t++){const r=o[t]+"";e.set(r,(e.get(r)??0)+1)}const a=[...e.entries()].sort((e,t)=>t[1]-e[1]).slice(0,r).map(([e,t])=>({value:e,count:t}));s[t]={type:"categorical",distinctCount:e.size,topValues:a,distinctValues:e.size>r?void 0:a.map(e=>e.value)}}else s[t]={type:"unknown"}}return{rowCount:e.length,fields:s,sample:e.slice(0,o)}}var et=/^(x|index|rank|order|step|sequence|year|quarter|qtr|fiscal|month|week|day|date|time|timestamp)$/i,tt=/^(y|value|amount|total|count|revenue|sales|price|score|rate|population|measure)$/i,rt=/(size|magnitude|volume|weight|count|amount)/i,ot=/^(category|label|name|type|group|region|segment|kind|class)$/i,at=/^(series|group|type|category|segment|cohort|product)$/i,nt=new Set(["numeric"]),it=new Set(["numeric","date"]),st=new Set(["numeric"]),ct=new Set(["date"]),lt=new Set(["categorical","boolean"]);function pt(e){return"numeric"===e.type?"numeric":"date"===e.type?"date":"categorical"===e.type?"categorical":"unknown"}function ut(e,t){return t.test(e)?.2:0}function yt(e,t){let r=null;for(let o=0;e.length>o;o++){const a=e[o]?.[t];if(null==a)continue;const n=a instanceof Date?a.getTime():Number(a);if(!Number.isFinite(n))return!1;if(null!==r&&r>n)return!1;r=n}return null!==r}function dt(e,t,r,o,a={}){const n=[];for(const[i,s]of Object.entries(e)){const e=pt(s);if(!r.has(e))continue;let c,l=.5;l+=ut(i,o),"categorical"===s.type&&(c=s.distinctCount,!c||2>c||c>12||(l+=.2),c&&c>50&&(l-=.2)),"numeric"===s.type&&Number.isFinite(s.min)&&Number.isFinite(s.max)&&s.max>s.min&&(l+=.1);const p={field:i,kind:e,quality:Math.max(0,Math.min(1,l)),distinctCount:c};!a.computeMonotonic||"numeric"!==e&&"date"!==e||(p.monotonic=yt(t,i),p.monotonic&&(p.quality=Math.min(1,p.quality+.2))),n.push(p)}return n.sort((e,t)=>t.quality-e.quality),n}function mt(e,t){const r=new Set;for(let o=0;e.length>o;o++){const a=e[o]?.[t];null!=a&&r.add(a+"")}return r.size}var ht=/^(source|from|origin|stage|currentstage|sourcestage|fromstage)$/i,gt=/^(target|to|destination|nextstage|next|targetstage|tostage|destinationstage|status)$/i,bt=/^(starttime|startedat|enteredat|startdate|start|timestamp|date|time)$/i,ft=/^(endtime|endedat|exitedat|completedat|finishtime|enddate|end)$/i,vt=/^(value|weight|amount|count|magnitude|volume)$/i;function wt(e,t){return e.find(e=>t.test(e))}function xt(e,t={}){const r=Ze(e??[]),o=Array.isArray(e)?e:[],a=function(e){if(e&&"object"==typeof e&&!Array.isArray(e)){const t=e;if("FeatureCollection"===t.type&&Array.isArray(t.features))return{hasHierarchy:!1,hasNetwork:!1,hasGeo:!0,geo:{features:t.features,points:Array.isArray(t.points)?t.points:void 0,flows:Array.isArray(t.flows)?t.flows:void 0}};if(Array.isArray(t.children))return{hasHierarchy:!0,hasNetwork:!1,hasGeo:!1,hierarchy:t};if(Array.isArray(t.nodes)&&(Array.isArray(t.edges)||Array.isArray(t.links)))return{hasHierarchy:!1,hasNetwork:!0,hasGeo:!1,network:{nodes:t.nodes,edges:t.edges??t.links}}}return{hasHierarchy:!1,hasNetwork:!1,hasGeo:!1}}(t.rawInput);if(!a.hasNetwork&&!a.hasHierarchy&&!a.hasGeo){const e=function(e){if(3>e.length)return null;const t=e[0];if(!t||"object"!=typeof t)return null;const r=Object.keys(t),o=wt(r,ht),a=wt(r,gt);if(!o||!a||o===a)return null;const n=wt(r,bt),i=wt(r,ft),s=wt(r,vt),c=[];for(const t of e){if(!t)continue;const e=t[o],r=t[a];if(null==e||null==r)continue;const n=(e+"").trim(),i=(r+"").trim();n&&i&&n!==i&&c.push(t)}if(3>c.length)return null;const l=new Map,p=new Map,u=new Map;for(const e of c){const t=(e[o]+"").trim(),r=(e[a]+"").trim();l.has(t)||l.set(t,{id:t,label:t}),l.has(r)||l.set(r,{id:r,label:r});const c=`${t}->${r}`,y=s?Number(e[s]):1,d=Number.isFinite(y)?y:1;p.set(c,(p.get(c)??0)+d),u.has(c)||u.set(c,{source:t,target:r,...n?{startTime:e[n]}:{},...i?{endTime:e[i]}:{}})}const y=[];for(const[e,t]of u)y.push({...t,value:p.get(e)??1});return{nodes:Array.from(l.values()),edges:y}}(o);e&&(a.hasNetwork=!0,a.network=e)}const n=dt(r.fields,o,it,et,{computeMonotonic:!0}),i=dt(r.fields,o,st,tt),s=dt(r.fields,o,nt,rt),c=dt(r.fields,o,lt,ot),l=dt(r.fields,o,lt,at),p=dt(r.fields,o,ct,/(date|time|timestamp)/i,{computeMonotonic:!0}),u=p[0]?.field;let y=u,d=u?"time":"none";if(!y){const e=n.find(e=>et.test(e.field)&&"numeric"===e.kind);e&&(y=e.field,d="named")}const m=i.find(e=>e.field!==y)?.field;if(!y&&m){const e=Object.entries(r.fields).filter(([e,t])=>"numeric"===t.type).map(([e])=>e);2>e.length||(y=e.find(e=>e!==m),y&&(d="scatter"))}const h=s.find(e=>e.field!==y&&e.field!==m)?.field,g="time"===d||"named"===d,b=c.map(e=>e.field);let f,v;g?(v=t.seriesField??b[0],f=b.find(e=>e!==v)):(f=b[0],v=t.seriesField??b.find(e=>e!==f));const w=f?mt(o,f):void 0,x=v?mt(o,v):void 0,A=y?mt(o,y):void 0,C=!!y&&function(e,t){const r=new Set;for(let o=0;e.length>o;o++){const a=e[o]?.[t];if(null==a)continue;const n=a+"";if(r.has(n))return!0;r.add(n)}return!1}(o,y),S=n.find(e=>e.field===y)?.monotonic??!1,k=p.length>0;return{...r,data:o,candidates:{x:n,y:i,size:s,category:c,series:l,time:p},primary:{x:y,y:m,size:h,category:f,series:v,time:u},categoryCount:w,seriesCount:x,uniqueXCount:A,hasRepeatedX:C,monotonicX:S,hasTimeAxis:k,hasHierarchy:a.hasHierarchy,hasNetwork:a.hasNetwork,hasGeo:a.hasGeo,xProvenance:d,network:a.network,hierarchy:a.hierarchy,geo:a.geo}}var At=[{intent:"outlier-detection",weight:4,patterns:[/\b(outlier|outliers|anomal|anomaly|anomalies|extreme|extremes|unusual|stands? out|sticks? out|odd one)\b/i,/\b(peak|peaks|highest|lowest|biggest spike|spike|min|max|maximum|minimum)\b/i]},{intent:"trend",weight:4,patterns:[/\b(trend|trends|trending|trajectory|over time|across time|growth|decline|rising|falling|increasing|decreasing)\b/i,/\b(history|historical|evolved|evolution|change over)\b/i]},{intent:"change-detection",weight:3,patterns:[/\b(when did|what changed|shift|shifted|breakpoint|inflection|turning point|sudden|abrupt)\b/i]},{intent:"rank",weight:4,patterns:[/\b(rank|ranking|ranked|biggest|smallest|largest|order by|sorted|best|worst|leaderboard)\b/i,/\btop\s+(\d+|sellers?|performers?|picks?|results?|categories|items?)\b/i,/\bbottom\s+(\d+|results?|items?)\b/i,/\b(who has the most|which.*most|which.*highest|which.*lowest)\b/i]},{intent:"part-to-whole",weight:4,patterns:[/\b(share|shares|composition|portion|portions|fraction|percentage of|percent of|breakdown|make up|made up of|slice|slices)\b/i,/\b(part of|part to whole|piece of the pie|how much of)\b/i]},{intent:"composition-over-time",weight:5,patterns:[/\b(composition.*time|share.*over time|share.*across|how.*mix.*changed|stacked.*time)\b/i,/\b(over time.*share|over time.*composition|over time.*breakdown)\b/i]},{intent:"distribution",weight:4,patterns:[/\b(distribution|distributions|spread|variance|variation|histogram|skew|skewed|range of|how.*spread|shape of|bell curve)\b/i,/\b(typical value|typical range|where do most|mode|median)\b/i]},{intent:"correlation",weight:4,patterns:[/\b(correl|correlation|relationship|related to|connected to|associated|connection between|relate to)\b/i,/\b(\w+ vs\.? \w+|\w+ versus \w+|\w+ against \w+|scatter)\b/i]},{intent:"compare-series",weight:3,patterns:[/\b(compare.*series|compare.*groups|compare.*cohorts|side by side|group.*vs|series.*vs)\b/i,/\b(how do.*compare|each group|each series|each cohort)\b/i]},{intent:"compare-categories",weight:3,patterns:[/\b(compare.*categor|category.*compar|which is bigger|how does.*compare|differences? between)\b/i]},{intent:"flow",weight:4,patterns:[/\b(flow|flows|transition|transitions|movement|moved from|funnel|conversion|drop[- ]off|sankey|chord)\b/i,/\b(from.*to|source.*target|path|journey|pipeline)\b/i]},{intent:"hierarchy",weight:4,patterns:[/\b(hierarchy|hierarchical|tree|nested|parent.*child|subcategory|sub-?categor|drill down|drilldown|breakdown by level)\b/i]},{intent:"geo",weight:5,patterns:[/\b(geographic|geography|geospatial|map|maps|country|countries|cities|latitude|longitude|spatial|cartogr|choropleth)\b/i,/\b(city|us state|each state|the states)\b/i,/\bacross\s+(countries|states|regions|cities|the world|the country)\b/i]}];function Ct(e){if("string"!=typeof e||0===e.trim().length)return null;const t=new Map;for(const r of At)for(const o of r.patterns)if(o.test(e)){const e=t.get(r.intent)??0;t.set(r.intent,Math.min(5,0===e?r.weight:e+.5));break}if(0===t.size)return null;const r=Array.from(t.entries()).map(([e,t])=>({intent:e,confidence:t})).sort((e,t)=>t.confidence-e.confidence),[o,...a]=r;return{intent:o.intent,confidence:o.confidence,alternates:a}}var St={tiny:3,small:25,medium:250,large:5e3},kt={low:7,medium:25},jt={narrow:3,typical:10},Pt=["tiny","small","medium","large","huge"];function $t(e){return{rows:{...St,...e?.rows??{}},cardinality:{...kt,...e?.cardinality??{}},fields:{...jt,...e?.fields??{}}}}function It(e,t){return Pt.indexOf(e)-Pt.indexOf(t)}function Rt(e,t){const r=e.rowCount??0,o=t?.rows,a=function(e,t,r){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=$t(r?.thresholds).rows;switch(e){case"tiny":return Math.max(1,Math.floor(t.tiny/2));case"small":return Math.floor((t.tiny+t.small)/2);case"medium":return Math.floor((t.small+t.medium)/2);case"large":return Math.floor((t.medium+t.large)/2);case"huge":return Math.floor(2*t.large)}}return t}(o,r,t),n=function(e,t){if(!Number.isFinite(e)||0>e)return"tiny";const r=$t(t?.thresholds).rows;return e>r.tiny?e>r.small?e>r.medium?e>r.large?"huge":"large":"medium":"small":"tiny"}(a,t),i=Object.keys(e.fields??{}).length,s=t?.fields,c="number"==typeof s?s:"string"==typeof s?function(e,t){const r=$t(t?.thresholds).fields;switch(e){case"narrow":return Math.max(1,Math.floor(r.narrow/2));case"typical":return Math.floor((r.narrow+r.typical)/2);case"wide":return Math.floor(2*r.typical)}}(s,t):i,l=function(e,t){if(!Number.isFinite(e)||0>e)return"narrow";const r=$t(t?.thresholds).fields;return e>r.narrow?e>r.typical?"wide":"typical":"narrow"}(c,t),p=e.primary.category,u=function(e,t,r){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=$t(r?.thresholds).cardinality;switch(e){case"low":return Math.max(1,Math.floor(t.low/2));case"medium":return Math.floor((t.low+t.medium)/2);case"high":return Math.floor(2*t.medium)}}return t}((p?t?.cardinality?.[p]:void 0)??t?.typicalCardinality,e.categoryCount,t),y=void 0!==u?function(e,t){if(!Number.isFinite(e)||0>e)return"low";const r=$t(t?.thresholds).cardinality;return e>r.low?e>r.medium?"high":"medium":"low"}(u,t):void 0;return{rows:a,rowBand:n,fields:c,fieldBand:l,typicalCardinality:u,cardinalityBand:y,growth:t?.growth??"static",rowsSource:void 0!==o?"declared":"measured"}}var Tt=2.5;function Nt(e,t,r,o,a){const n=[],i=[];let s=0,c=!1;if(e.scaleFit){const a=e.scaleFit(t,r,o);if(a&&(s+=Math.max(-2.5,Math.min(Tt,a.delta??0)),a.reason&&n.push(a.reason),a.caveats))for(const e of a.caveats)i.push(e)}const l=o?.charts?.[e.component];if(l&&(l.minBand&&0>It(r.rowBand,l.minBand)||l.maxBand&&It(r.rowBand,l.maxBand)>0?c=!0:"number"==typeof l.bias?(s+=Math.max(-3,Math.min(3,l.bias)),l.reason&&n.push(`${o?.name?o.name+": ":""}${l.reason}`)):l.reason&&n.push(`${o?.name?o.name+": ":""}${l.reason}`)),a&&e.qualityFit){const r=e.qualityFit(t,a);if(r&&(s+=Math.max(-1,Math.min(1,r.delta??0)),r.reason&&n.push(r.reason),r.caveats))for(const e of r.caveats)i.push(e)}else if(a){const e=t.primary.y;if(e){const t=function(e,t){if(void 0===e)return;if("number"==typeof e)return e;const r=e[t];return"number"==typeof r?r:void 0}(a.completeness,e);void 0!==t&&.85>t&&i.push(`${e} is only ${Math.round(100*t)}% complete — expect gaps`)}}return{delta:s,reasons:n,caveats:i,excluded:c}}function Bt(e){return(t,r)=>{let o=0;const a=[];let n;if(e.rows){const[t,i]=e.rows.sweetSpot;t>r.rows||r.rows>i?t>r.rows?(o-=Math.min(Tt,.8*(0===t?1:(t-r.rows)/t)),void 0===e.rows.caveatBelow||r.rows>e.rows.caveatBelow||a.push(`only ${r.rows} rows — chart may feel sparse`)):(o-=Math.min(Tt,.4*(0===i?1:(r.rows-i)/i)),void 0===e.rows.caveatAbove||e.rows.caveatAbove>r.rows||a.push(r.rows+" rows is past this chart's comfortable density")):(o+=.6,n=r.rows+" rows is in the sweet spot for this chart")}if(e.cardinality&&void 0!==r.typicalCardinality){const t=r.typicalCardinality,[n,i]=e.cardinality.sweetSpot;n>t||t>i?t>i&&(o-=Math.min(Tt,.5*(0===i?1:(t-i)/i)),void 0===e.cardinality.caveatAbove||e.cardinality.caveatAbove>t||a.push(t+" distinct categories may overwhelm this chart")):o+=.4}return 0!==o||0!==a.length||n?{delta:o,reason:n,caveats:a}:null}}var Lt={component:"LineChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:5,accuracy:4,precision:4},fits:e=>{if(2>e.rowCount)return"needs at least 2 rows";if(!e.primary.x)return"needs a numeric or time x field";if(!e.primary.y)return"needs a numeric y field";const t=e.candidates.x.find(t=>t.field===e.primary.x)?.kind;return t&&"numeric"!==t&&"date"!==t?`x field "${e.primary.x}" is ${t}, LineChart needs numeric or time`:"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — given x looks like a scatter pattern, not a sequence"},intentScores:{trend:e=>"scatter"!==e.xProvenance||e.monotonicX?!e.uniqueXCount||4>e.uniqueXCount?3:!e.seriesCount||2>e.seriesCount?4:5:1,"compare-series":e=>"scatter"!==e.xProvenance||e.monotonicX?!e.seriesCount||2>e.seriesCount?1:e.seriesCount>8?2:4:1,"change-detection":e=>"scatter"!==e.xProvenance||e.monotonicX?4:1,"outlier-detection":2,correlation:2},caveats:e=>{const t=[];return!e.hasRepeatedX||e.seriesCount&&e.seriesCount>=2||t.push("x values repeat — consider aggregating or adding a series field"),e.seriesCount&&e.seriesCount>8&&t.push(e.seriesCount+" series may produce a spaghetti chart"),t},variants:[{key:"linear",label:"Linear trend",props:{curve:"linear",showPoints:!1},tags:["linear"]},{key:"smooth",label:"Smooth trend",description:"Monotone smoothing — emphasizes the shape over individual points.",props:{curve:"monotoneX",showPoints:!1},tags:["smooth","narrative"],intentDeltas:{trend:1,"outlier-detection":-2},rubricDeltas:{precision:-1},caveats:["smoothing hides individual outliers"]},{key:"stepped-with-points",label:"Discrete steps",description:"Step curve plus visible points — for state changes or discrete events.",props:{curve:"step",showPoints:!0,pointRadius:3},tags:["step","discrete"],intentDeltas:{"change-detection":1,trend:-1},rubricDeltas:{precision:1}},{key:"annotated-threshold",label:"With alert threshold",description:'A reference threshold or band turns the chart from a report into an alert — read it for breaches of the expected range. Pair with a provenanced annotation (e.g. from the data-quality bridge) and the chart\'s communicative act becomes "alerting".',props:{showGrid:!0,showPoints:!0},tags:["alert","annotated-threshold","monitoring"],intentDeltas:{"outlier-detection":2,"change-detection":1}}],buildProps:(e,t)=>{const r={data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y};return e.seriesCount&&e.seriesCount>=2&&e.primary.series&&(r.lineBy=e.primary.series,r.colorBy=e.primary.series),e.hasTimeAxis&&e.primary.x===e.primary.time&&(r.xScaleType="time"),{...r,...t?.props??{}}},scaleFit:Bt({rows:{sweetSpot:[25,2e3],caveatBelow:4,caveatAbove:1e4}})},Ft={component:"AreaChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:4,accuracy:3,precision:3},fits:e=>3>e.rowCount?"needs at least 3 rows":e.primary.x?e.primary.y?"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — given x looks like a scatter pattern, not a sequence":"needs a numeric y field":"needs a numeric or time x field",intentScores:{trend:e=>"scatter"!==e.xProvenance||e.monotonicX?e.seriesCount&&e.seriesCount>=2||!e.uniqueXCount||4>e.uniqueXCount?3:5:1,"change-detection":e=>"scatter"!==e.xProvenance||e.monotonicX?3:1},caveats:e=>{const t=[];return e.seriesCount&&e.seriesCount>=2&&e.primary.series&&t.push(`showing only the leading "${e.primary.series}" series — for multi-series comparison use LineChart or DifferenceChart`),t},variants:[{key:"smooth",label:"Smooth gradient",props:{curve:"monotoneX"},tags:["smooth","gradient","narrative"]},{key:"linear",label:"Linear",props:{curve:"linear",gradientFill:!1,areaOpacity:.5},tags:["linear"]},{key:"stepped",label:"Stepped",props:{curve:"stepAfter"},tags:["step"],intentDeltas:{"change-detection":1}},{key:"annotated-threshold",label:"With alert threshold",description:'A reference threshold or expected band turns the area into an alert — read for breaches. Pair with a provenanced annotation (e.g. from the data-quality bridge) and the communicative act becomes "alerting".',props:{showGrid:!0},tags:["alert","annotated-threshold","monitoring"],intentDeltas:{"outlier-detection":2,"change-detection":1}}],buildProps:(e,t)=>{let r=e.data;if(e.seriesCount&&e.seriesCount>=2&&e.primary.series){const t=e.primary.series,o=e.primary.y,a=new Map;for(const r of e.data){const e=r[t];if(null==e||""===e)continue;const n=Number(r[o]);a.set(e,(a.get(e)??0)+(Number.isFinite(n)?n:0))}let n,i=-1/0;for(const[e,t]of a)t>i&&(i=t,n=e);null!=n&&a.size>0&&(r=e.data.filter(e=>e[t]===n))}const o={data:r,xAccessor:e.primary.x,yAccessor:e.primary.y,gradientFill:!0,areaOpacity:.55};return e.hasTimeAxis&&e.primary.x===e.primary.time&&(o.xScaleType="time"),{...o,...t?.props??{}}},scaleFit:Bt({rows:{sweetSpot:[6,200],caveatAbove:2e3}})},Dt={component:"StackedAreaChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:4,accuracy:3,precision:3},fits:e=>4>e.rowCount?"needs at least 4 rows":e.primary.x?e.primary.y?!e.seriesCount||2>e.seriesCount?"needs 2+ stack groups (series field)":e.seriesCount>10?e.seriesCount+" series is too many to stack legibly":"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — stacking only makes sense across a sequence":"needs a numeric y field":"needs an ordered x field",intentScores:{"composition-over-time":5,"part-to-whole":e=>e.hasTimeAxis?4:3,trend:3,"compare-series":2},caveats:()=>["readability of individual layers degrades below the baseline"],variants:[{key:"baseline-zero",label:"Zero baseline",props:{baseline:"zero",stackOrder:"key"},tags:["zero-baseline"]},{key:"streamgraph",label:"Streamgraph",description:"Wiggle baseline + inside-out ordering — emphasizes momentum over precise totals.",props:{baseline:"wiggle",stackOrder:"insideOut",showLine:!1},tags:["streamgraph","narrative"],intentDeltas:{"composition-over-time":0,trend:1,"part-to-whole":-2},rubricDeltas:{accuracy:-1,precision:-1},caveats:["streamgraph hides absolute totals; precise reads not possible"]},{key:"centered",label:"Centered baseline",props:{baseline:"silhouette",stackOrder:"insideOut"},tags:["silhouette"],intentDeltas:{"part-to-whole":-1}}],buildProps:(e,t)=>{const r={data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y,areaBy:e.primary.series,colorBy:e.primary.series};return e.hasTimeAxis&&e.primary.x===e.primary.time&&(r.xScaleType="time"),{...r,...t?.props??{}}},scaleFit:Bt({rows:{sweetSpot:[30,1500],caveatBelow:12,caveatAbove:1e4}})},Et={component:"Scatterplot",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:4,accuracy:5,precision:5},fits:e=>{if(3>e.rowCount)return"needs at least 3 rows";if(!e.primary.x)return"needs a numeric x field";if(!e.primary.y)return"needs a numeric y field";const t=e.candidates.x.find(t=>t.field===e.primary.x)?.kind;return"date"===t?null:t&&"numeric"!==t?`x field "${e.primary.x}" is ${t}, Scatterplot needs numeric`:null},intentScores:{correlation:e=>{const t="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:e.primary.time,r=t?e.candidates.y.filter(e=>e.field!==t).map(e=>e.field):[];return t&&r.length>=2||e.primary.size?4:5},"outlier-detection":5,distribution:3,"compare-series":e=>!e.seriesCount||2>e.seriesCount||e.seriesCount>6?1:3,rank:1},variants:[{key:"points",label:"Points only",props:{},tags:["points"]},{key:"with-trend",label:"Points with regression line",props:{regression:"linear"},tags:["regression","trend"],intentDeltas:{correlation:0,trend:1}}],buildProps:(e,t)=>{const r={data:e.data},o="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:void 0,a=o?e.candidates.y.filter(e=>e.field!==o).map(e=>e.field):[];return o&&a.length>=2?(r.xAccessor=a[0],r.yAccessor=a[1]):(r.xAccessor=e.primary.x,r.yAccessor=e.primary.y,e.primary.size&&(r.sizeBy=e.primary.size)),e.primary.series&&e.seriesCount&&6>=e.seriesCount&&(r.colorBy=e.primary.series),{...r,...t?.props??{}}},scaleFit:Bt({rows:{sweetSpot:[50,5e3],caveatBelow:20,caveatAbove:1e4}})},Mt={component:"BubbleChart",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>4>e.rowCount?"needs at least 4 points":e.primary.x?e.primary.y?e.primary.size?null:"needs a third numeric measure for bubble size":"needs a numeric y field":"needs a numeric x field",intentScores:{correlation:5,"compare-categories":3,"outlier-detection":4},caveats:()=>["bubble area is harder to compare than length — large dynamic ranges distort"],buildProps:e=>({data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y,sizeBy:e.primary.size,...e.primary.series&&6>=(e.seriesCount??0)?{colorBy:e.primary.series}:{}}),scaleFit:Bt({rows:{sweetSpot:[10,500],caveatAbove:1500}})},Ot={label:"Low / High",color:"#E9C46A",opacity:.08},zt={label:"High / High",color:"#2A9D8F",opacity:.08},Gt={label:"Low / Low",color:"#E76F51",opacity:.08},Ht={label:"High / Low",color:"#86BBD8",opacity:.08},_t={component:"QuadrantChart",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},fits:e=>4>e.rowCount?"needs at least 4 points":e.primary.x?e.primary.y?null:"needs a numeric y field":"needs a numeric x field",intentScores:{"compare-categories":2,correlation:3,"outlier-detection":3},buildProps:e=>{const t=e.primary.x,r=e.primary.y,o=e.fields[t],a=e.fields[r],n="numeric"===o?.type?o.median:void 0,i="numeric"===a?.type?a.median:void 0;return{data:e.data,xAccessor:t,yAccessor:r,...void 0!==n?{xCenter:n}:{},...void 0!==i?{yCenter:i}:{},...e.primary.series&&6>=(e.seriesCount??0)?{colorBy:e.primary.series}:{},quadrants:{topLeft:{...Ot},topRight:{...zt},bottomLeft:{...Gt},bottomRight:{...Ht}}}}},qt={component:"MultiAxisLineChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:3,precision:3},fits:e=>4>e.rowCount?"needs at least 4 rows":e.primary.x?2>Object.entries(e.fields).filter(([t,r])=>"numeric"===r.type&&t!==e.primary.x).map(([e])=>e).length?"needs at least 2 numeric measures":"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — multi-axis lines need a shared sequence":"needs an x field",intentScores:{"compare-series":4,trend:3,correlation:3},caveats:()=>["dual axes can mislead — only use when measures share interpretation"],buildProps:e=>{const t=Object.entries(e.fields).filter(([t,r])=>"numeric"===r.type&&t!==e.primary.x).slice(0,2).map(([e])=>({yAccessor:e,label:e}));return{data:e.data,xAccessor:e.primary.x,series:t}}},Wt={component:"DifferenceChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},fits:e=>4>e.rowCount?"needs at least 4 rows":e.primary.x?e.primary.series?!e.seriesCount||2>e.seriesCount?`needs 2+ series (got ${e.seriesCount??0})`:e.primary.y?"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — given x looks like a scatter pattern, not a sequence":"needs a numeric y field":"needs a series field with at least two groups":"needs an x field (numeric or time)",intentScores:{"compare-series":e=>2===e.seriesCount?5:3,"change-detection":4,trend:3},caveats:e=>{const t=[];return e.seriesCount&&e.seriesCount>2&&t.push(`showing the top 2 of ${e.seriesCount} series — for full multi-series comparison use LineChart`),t},buildProps:e=>{const t=e.primary.x,r=e.primary.y,o=e.primary.series,a=e=>null!=e&&(e+"").length>0,n=new Map;for(const t of e.data){const e=t[o];if(!a(e))continue;const i=e+"",s=Number(t[r]);n.set(i,(n.get(i)??0)+(Number.isFinite(s)?s:0))}const i=[...n.entries()].sort((e,t)=>t[1]-e[1]),s=i[0]?.[0],c=i[1]?.[0],l=e=>e instanceof Date?e.getTime():e,p=new Map;for(const n of e.data){const e=n[o];if(!a(e))continue;const i=e+"";if(i!==s&&i!==c)continue;const u=n[t],y=n[r],d=l(u);let m=p.get(d);m||(m={[t]:u},p.set(d,m)),i===s?m.a=y:i===c&&(m.b=y)}return{data:Array.from(p.values()).filter(e=>null!=e.a&&null!=e.b),xAccessor:t,seriesAAccessor:"a",seriesBAccessor:"b",seriesALabel:s,seriesBLabel:c}}},Vt={component:"CandlestickChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},fits:e=>{if(4>e.rowCount)return"needs at least 4 rows";if(!e.primary.x)return"needs an x field (typically date)";const t=new Set(Object.keys(e.fields).map(e=>e.toLowerCase())),r=t.has("high"),o=t.has("low");return r&&o?null:"needs at minimum high/low fields (open/close optional)"},intentScores:{"change-detection":4,trend:3,"outlier-detection":3},buildProps:e=>{const t=Object.keys(e.fields),r=e=>t.find(t=>t.toLowerCase()===e);return{data:e.data,xAccessor:e.primary.x,highAccessor:r("high"),lowAccessor:r("low"),openAccessor:r("open"),closeAccessor:r("close")}}},Ut={component:"Heatmap",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>{if(4>e.rowCount)return"needs at least 4 cells";if(!e.primary.y)return"needs a numeric value to encode in cell color";const t=e.candidates.category.length;return t>=2||t>=1&&e.hasTimeAxis?(e.uniqueXCount??0)>50?"too many x cells for a legible heatmap":null:"needs two categorical-or-time dimensions for the axes"},intentScores:{correlation:3,distribution:2,"compare-categories":e=>2>e.candidates.category.length?1:4,"composition-over-time":e=>e.hasTimeAxis&&e.candidates.category.length>=1?4:1},caveats:e=>{const t=[];return(e.uniqueXCount??0)>30&&t.push("many x values — cells will be narrow"),t},variants:[{key:"default",label:"Sequential color",props:{},tags:["sequential"]},{key:"show-values",label:"With cell labels",props:{showValues:!0},tags:["labeled"],intentDeltas:{"compare-categories":1},rubricDeltas:{precision:1},caveats:["cell labels crowd dense matrices"]}],buildProps:(e,t)=>{const r=e.candidates.category.map(e=>e.field),o=e.primary.time??r[0],a=r.find(e=>e!==o)??r[0]??e.primary.series;return{data:e.data,xAccessor:o,yAccessor:a,valueAccessor:e.primary.y,...t?.props??{}}},scaleFit:Bt({rows:{sweetSpot:[100,1e4],caveatBelow:25,caveatAbove:5e4}})},Yt=/(^|[^a-z])(date|time|timestamp|month|week|day|year|quarter|qtr|hour|minute)(?=[^a-z]|$)/i,Xt=/^(jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec|january|february|march|april|june|july|august|september|october|november|december|mon|tue|wed|thu|fri|sat|sun|monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b/i,Kt=/^(\d{4}(-\d{1,2}(-\d{1,2})?)?|q[1-4]|week\s*\d+|wk\s*\d+|\d{1,2}:\d{2})$/i,Jt={component:"BarChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:5,accuracy:5,precision:4},fits:e=>e.primary.category?e.primary.y?1>(e.categoryCount??0)?"needs at least 1 category":(e.categoryCount??0)>50?"too many categories — consider aggregating or use a different chart":null:"needs a numeric value field":"needs a category field",intentScores:{"compare-categories":e=>e.categoryCount?2>e.candidates.category.length?10>e.rowCount/e.categoryCount?5:2:3:0,rank:5,"part-to-whole":e=>(e.categoryCount??0)>8?2:3,distribution:1},caveats:e=>{const t=[];return function(e){const t=e.primary.category;if(!t)return!1;const r=t.replace(/([a-z])([A-Z])/g,"$1 $2");if(Yt.test(r))return!0;const o=e.data;if(!o||0===o.length)return!1;let a=0,n=0;for(const e of o){const r=e[t];if(null==r)continue;n++;const o=(r+"").trim();(Xt.test(o)||Kt.test(o))&&a++}return n>0&&a/n>=.6}(e)&&t.push("category axis looks like time bins — for a time series, supply real dates and use LineChart/AreaChart (reads trend, scales the time axis); for streaming counts use a temporal histogram"),t},variants:[{key:"sorted-desc",label:"Ranked",props:{sort:"desc"},tags:["sorted","ranked"],intentDeltas:{rank:0,"compare-categories":0}},{key:"source-order",label:"Source order",props:{sort:!1},tags:["source-order"],intentDeltas:{rank:-2}},{key:"horizontal",label:"Horizontal bars",props:{orientation:"horizontal",sort:"desc"},tags:["horizontal","ranked"],intentDeltas:{rank:1},rubricDeltas:{precision:1}},{key:"annotated-threshold",label:"With alert threshold",description:'A target/threshold reference turns the bars into an alert — read for which categories breach. Pair with a provenanced annotation (e.g. from the data-quality bridge) and the communicative act becomes "alerting".',props:{showGrid:!0},tags:["alert","annotated-threshold","monitoring"],intentDeltas:{"outlier-detection":2}}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...t?.props??{}}),scaleFit:Bt({cardinality:{sweetSpot:[3,15],caveatAbove:25},rows:{sweetSpot:[3,200]}})},Qt={component:"DotPlot",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:5,precision:5},fits:e=>e.primary.category?e.primary.y?(e.categoryCount??0)>30?"too many categories for a dot plot":null:"needs a numeric value field":"needs a category field",intentScores:{"compare-categories":e=>e.categoryCount?10>e.rowCount/e.categoryCount?5:3:0,rank:5,"outlier-detection":3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y}),scaleFit:Bt({cardinality:{sweetSpot:[10,30],caveatAbove:40},rows:{sweetSpot:[5,300]}})},Zt={component:"PieChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:5,accuracy:3,precision:2},fits:e=>{if(!e.primary.category)return"needs a category field";if(!e.primary.y)return"needs a numeric value field";const t=e.categoryCount??0;return 2>t?"needs 2+ categories":t>8?t+" slices is too many for a pie chart":null},intentScores:{"part-to-whole":4,"compare-categories":2,rank:1},caveats:()=>["angle comparisons are less accurate than length — prefer a bar chart unless part-to-whole is the explicit message"],variants:[{key:"pie",label:"Pie",props:{},tags:["pie"]},{key:"donut",label:"Donut",description:"Hollow center — easier to fit a label or KPI inside.",props:{innerRadius:60},tags:["donut"]}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...t?.props??{}}),scaleFit:Bt({cardinality:{sweetSpot:[2,5],caveatAbove:6}})},er=/(stage|step|funnel|status|outcome|phase)/i,tr=/(rating|score|likert|satisfaction|nps|agree|sentiment|level)/i;function rr(e){if(!e||"object"!=typeof e)return 0;const t=e.children;return Array.isArray(t)&&t.length>0?t.reduce((e,t)=>e+rr(t),0):1}function or(e){return Number.isFinite("number"==typeof e?e:Number(e))}function ar(e){return["value","throughput","traffic","rate","volume","count"].find(t=>e.some(e=>{const r=Number(e?.[t]);return Number.isFinite(r)&&r>0}))??"value"}function nr(e,t){return e.data.some(e=>e&&"object"==typeof e&&t in e)}var ir=[Lt,Ft,Dt,Et,{component:"ConnectedScatterplot",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},fits:e=>4>e.rowCount?"needs at least 4 ordered points":e.primary.x?e.primary.y?e.monotonicX||e.hasTimeAxis?null:"needs an ordered x sequence":"needs a y field":"needs an x field",intentScores:{trend:3,correlation:e=>{const t="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:e.primary.time,r=t?e.candidates.y.filter(e=>e.field!==t).map(e=>e.field):[];return t&&r.length>=2?5:4},"change-detection":3},caveats:()=>["readers can confuse path direction without explicit start/end markers"],buildProps:e=>{const t={data:e.data},r="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:e.primary.time,o=r?e.candidates.y.filter(e=>e.field!==r).map(e=>e.field):[];return r&&o.length>=2?(t.xAccessor=o[0],t.yAccessor=o[1],t.orderAccessor=r):(t.xAccessor=e.primary.x,t.yAccessor=e.primary.y,t.orderAccessor=e.primary.time??e.primary.x),e.primary.series&&6>=(e.seriesCount??0)&&(t.colorBy=e.primary.series),t}},Mt,_t,qt,{component:"MinimapChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:4,accuracy:4,precision:4},fits:e=>30>e.rowCount?"minimap pays off only on long sequences (30+ rows)":e.primary.x?e.primary.y?"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — minimap previews a sequence":"needs a numeric y field":"needs an ordered x field",intentScores:{trend:4,"change-detection":4,"outlier-detection":3},buildProps:e=>({data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y,...e.hasTimeAxis&&e.primary.x===e.primary.time?{xScaleType:"time"}:{}})},Wt,Vt,Ut,Jt,{component:"GroupedBarChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:5,precision:4},fits:e=>e.primary.category?e.primary.y?e.primary.series?2>(e.seriesCount??0)?"needs 2+ groups":(e.seriesCount??0)>6?e.seriesCount+" groups is too many for grouped bars":(e.categoryCount??0)>25?"too many categories for grouped bars":null:"needs a series field to group by":"needs a numeric value field":"needs a category field",intentScores:{"compare-categories":5,"compare-series":4,rank:3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,groupBy:e.primary.series,colorBy:e.primary.series})},{component:"StackedBarChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:4,precision:3},fits:e=>e.primary.category?e.primary.y?e.primary.series?2>(e.seriesCount??0)?"needs 2+ stack groups":(e.seriesCount??0)>8?e.seriesCount+" stacked groups is too many":null:"needs a series field to stack by":"needs a numeric value field":"needs a category field",intentScores:{"part-to-whole":4,"compare-categories":4,"composition-over-time":e=>e.hasTimeAxis?3:1,"compare-series":2},caveats:()=>["only the bottom segment shares a baseline; others are harder to compare across categories"],variants:[{key:"absolute",label:"Absolute stacks",props:{normalize:!1},tags:["absolute"]},{key:"normalized",label:"100% stacked",description:"Each bar normalized to 1 — emphasizes composition, hides totals.",props:{normalize:!0},tags:["normalized","part-to-whole"],intentDeltas:{"part-to-whole":1,"compare-categories":-1},caveats:["absolute magnitudes are no longer comparable across bars"]}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,stackBy:e.primary.series,colorBy:e.primary.series,...t?.props??{}})},Qt,Zt,{component:"DonutChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:3,precision:2},fits:e=>{if(!e.primary.category)return"needs a category field";if(!e.primary.y)return"needs a numeric value field";const t=e.categoryCount??0;return 2>t?"needs 2+ categories":t>8?t+" slices is too many for a donut":null},intentScores:{"part-to-whole":4,"compare-categories":2},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,innerRadius:40})},{component:"FunnelChart",family:"flow",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:3,precision:3},fits:e=>e.primary.y?Object.keys(e.fields).find(e=>er.test(e))?null:"needs a stage/step/funnel-named field":"needs a numeric value field",intentScores:{flow:4,rank:3,"part-to-whole":2},caveats:()=>["readers infer conversion drop-off — make sure rows actually represent sequential stages"],buildProps:e=>{const t=Object.keys(e.fields).find(e=>er.test(e));return{data:e.data,stepAccessor:t,valueAccessor:e.primary.y,...e.primary.category&&e.primary.category!==t?{categoryAccessor:e.primary.category}:{}}}},{component:"GaugeChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:2,precision:2},fits:e=>e.rowCount>1?"GaugeChart shows a single value — provide a 1-row dataset or use BarChart":e.primary.y?null:"needs a numeric value",intentScores:{"compare-categories":1,rank:1,"part-to-whole":e=>1===e.rowCount?5:1},caveats:()=>["gauges only show a single value; consider a stat card or bar instead for comparison"],buildProps:e=>{const t=e.primary.y,r=e.data[0],o=r?Number(r[t]):0,a=e.fields[t],n="numeric"===a?.type?a.max:100;return{value:Number.isFinite(o)?o:0,min:0,max:n}},scaleFit:(e,t)=>"tiny"===t.rowBand?{delta:.6,reason:"designed for single-value displays"}:null},{component:"LikertChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.primary.category?e.primary.y?Object.keys(e.fields).find(e=>tr.test(e))?null:"needs an ordinal rating/level field (rating, score, level...)":"needs a numeric rating/count field":"needs a category (question) field",intentScores:{"compare-categories":4,distribution:3,"part-to-whole":3},buildProps:e=>{const t=Object.keys(e.fields).find(e=>tr.test(e));return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,levelAccessor:t,levels:["Very Low","Low","Neutral","High","Very High"]}}},{component:"SwimlaneChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:4},fits:e=>e.primary.category?e.primary.series?e.primary.y?2>(e.categoryCount??0)?"needs 2+ categories":null:"needs a numeric value field":"needs a sub-category (lane) field":"needs a category field",intentScores:{"compare-categories":4,"composition-over-time":e=>e.hasTimeAxis?3:1,"compare-series":3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,subcategoryAccessor:e.primary.series,valueAccessor:e.primary.y,colorBy:e.primary.series})},{component:"Histogram",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:4,precision:3},fits:e=>{if(10>e.rowCount)return"histograms need at least ~10 observations";if(!e.primary.y)return"needs a numeric field to bin";const t=e.primary.y,r=e.candidates.y.find(e=>e.field===t);return void 0!==r?.distinctCount&&6>r.distinctCount?"too few distinct numeric values; a bar chart of counts is a better fit":null},intentScores:{distribution:5,"outlier-detection":3,"compare-categories":1},variants:[{key:"count-bins",label:"Count bins",props:{bins:10,relative:!1},tags:["count"]},{key:"share-bins",label:"Share bins (relative)",props:{bins:10,relative:!0},tags:["share"],intentDeltas:{distribution:0}}],buildProps:(e,t)=>({data:e.data,valueAccessor:e.primary.y,...t?.props??{}})},{component:"BoxPlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:4,precision:3},fits:e=>e.primary.y?e.primary.category?3>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 3+ observations per category":null:"needs a category to split distributions":"needs a numeric field",intentScores:{distribution:5,"compare-categories":4,"outlier-detection":4},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y})},{component:"SwarmPlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:4},fits:e=>e.primary.y?e.primary.category?4>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 4+ observations per category":e.rowCount>2e3?"too many points for a swarm — consider a violin or box":null:"needs a category":"needs a numeric field",intentScores:{distribution:4,"outlier-detection":5,"compare-categories":3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...e.primary.series&&e.primary.series!==e.primary.category?{colorBy:e.primary.series}:{}})},{component:"ViolinPlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.primary.y?e.primary.category?6>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 6+ observations per category":null:"needs a category to split distributions":"needs a numeric field",intentScores:{distribution:5,"compare-categories":4},variants:[{key:"density",label:"Density only",props:{showIQR:!1},tags:["density"]},{key:"density-iqr",label:"Density with IQR",props:{showIQR:!0},tags:["density","iqr"],intentDeltas:{distribution:0},rubricDeltas:{precision:1}}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...t?.props??{}})},{component:"RidgelinePlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:2,accuracy:3,precision:3},fits:e=>e.primary.y?e.primary.category?3>(e.categoryCount??0)?"needs 3+ categories to make a ridgeline meaningful":6>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 6+ observations per category":null:"needs a category dimension to stack distributions":"needs a numeric field",intentScores:{distribution:4,"compare-categories":3,"composition-over-time":2},caveats:()=>["readers can confuse overlapping ridges — limit categories or use small multiples"],buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y})},{component:"ForceDirectedGraph",family:"network",importPath:"semiotic/network",rubric:{familiarity:3,accuracy:3,precision:3},fits:e=>e.hasNetwork&&e.network?2>e.network.nodes.length?"needs at least 2 nodes":1>e.network.edges.length?"needs at least 1 edge":null:"needs a {nodes, edges} network passed via rawInput",intentScores:{flow:3,correlation:2},caveats:e=>(e.network?.nodes.length??0)>500?["large graphs become hairballs — consider filtering or aggregating"]:[],buildProps:e=>({nodes:e.network?.nodes??[],edges:e.network?.edges??[],nodeIdAccessor:"id",sourceAccessor:"source",targetAccessor:"target"}),scaleFit:e=>{const t=e.network?.nodes.length??0;return 5>t?{delta:-.4,caveats:[`only ${t} nodes — force layout is overkill for this size`]}:t>100?t>300?{delta:-.8,caveats:[t+" nodes — expect a hairball; filter or aggregate before rendering"]}:{delta:0}:{delta:.5,reason:t+" nodes is in the readable range for force layout"}}},{component:"SankeyDiagram",family:"flow",importPath:"semiotic/network",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.hasNetwork&&e.network?2>e.network.edges.length?"needs 2+ weighted edges":null:"needs a {nodes, edges} network with edge weights",intentScores:{flow:5,"part-to-whole":3},buildProps:e=>({nodes:e.network?.nodes??[],edges:e.network?.edges??[],sourceAccessor:"source",targetAccessor:"target",valueAccessor:"value",nodeIdAccessor:"id"})},{component:"ChordDiagram",family:"flow",importPath:"semiotic/network",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.hasNetwork&&e.network?3>e.network.nodes.length?"needs 3+ nodes":3>e.network.edges.length?"needs 3+ edges":null:"needs a {nodes, edges} network",intentScores:{flow:4},caveats:()=>["chord diagrams trade accuracy for symmetry; use Sankey if direction matters"],buildProps:e=>({nodes:e.network?.nodes??[],edges:e.network?.edges??[],valueAccessor:"value"})},{component:"ProcessSankey",family:"flow",importPath:"semiotic/network",rubric:{familiarity:2,accuracy:4,precision:3},fits:e=>{if(!e.hasNetwork||!e.network)return"needs a {nodes, edges} network";const t=e.network.edges[0];return t?void 0===t.startTime&&void 0===t.start||void 0===t.endTime&&void 0===t.end?"edges need both startTime and endTime (or start/end) for a temporal sankey":null:"needs at least one edge with start/end times"},intentScores:{flow:5,"composition-over-time":4,"change-detection":3},buildProps:e=>{const t={nodes:e.network?.nodes??[],edges:e.network?.edges??[],pairing:"temporal",laneOrder:"crossing-min"},r=e.network?.edges[0];return r&&(void 0===r.startTime&&void 0!==r.start&&(t.startTimeAccessor="start"),void 0===r.endTime&&void 0!==r.end&&(t.endTimeAccessor="end")),t}},{component:"TreeDiagram",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:4,accuracy:4,precision:3},fits:e=>e.hasHierarchy&&e.hierarchy?null:"needs a hierarchical root (object with children) via rawInput",intentScores:{hierarchy:5},variants:[{key:"vertical-tree",label:"Vertical tree",props:{layout:"tree",orientation:"vertical"},tags:["vertical"]},{key:"horizontal-cluster",label:"Horizontal cluster",props:{layout:"cluster",orientation:"horizontal"},tags:["horizontal"]}],buildProps:(e,t)=>({data:e.hierarchy??{name:"root",children:[]},...t?.props??{}})},{component:"Treemap",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:4,accuracy:3,precision:3},fits:e=>e.hasHierarchy&&e.hierarchy?4>e.rowCount?"declared scale is too small to render a hierarchy meaningfully":null:"needs a hierarchical root with values",intentScores:{hierarchy:4,"part-to-whole":e=>e.hasHierarchy?5:4,"compare-categories":3},caveats:()=>["rectangle area comparisons are less precise than length — prefer a bar chart for ranking"],buildProps:e=>({data:e.hierarchy??{name:"root",children:[]},valueAccessor:"value"}),scaleFit:(e,t)=>{const r=rr(e.hierarchy);let o=0;const a=[];let n;return 5>r?(o-=.5,a.push(`only ${r} leaves — treemap needs more cells to show structure`)):r>100?r>500&&(o-=.7,a.push(r+" leaves — most tiles will be sub-pixel; prefer aggregation or zoomable treatment")):(o+=.4,n=r+" leaves is in the legible band for treemap"),"huge"===t.rowBand&&(o-=.5,a.push("at huge declared scale a stacked or matrix view aggregates better than hierarchical browsing")),{delta:o,reason:n,caveats:a}}},{component:"CirclePack",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:3,accuracy:3,precision:2},fits:e=>e.hasHierarchy&&e.hierarchy?null:"needs a hierarchical root with values",intentScores:{hierarchy:4,"part-to-whole":3},caveats:()=>["circle area is harder to compare than rectangle area"],buildProps:e=>({data:e.hierarchy??{name:"root",children:[]},valueAccessor:"value"})},{component:"OrbitDiagram",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:1,accuracy:2,precision:2},fits:e=>e.hasHierarchy&&e.hierarchy?null:"needs a hierarchical root",intentScores:{hierarchy:3},caveats:()=>["decorative — readers without context will not infer hierarchy easily"],buildProps:e=>({data:e.hierarchy??{name:"root",children:[]},orbitMode:"solar"})},{component:"ChoroplethMap",family:"geo",importPath:"semiotic/geo",rubric:{familiarity:4,accuracy:3,precision:2},fits:e=>e.hasGeo&&e.geo?2>e.geo.features.length?"needs at least 2 area features to compare":null:"needs a GeoJSON FeatureCollection via rawInput",intentScores:{geo:5,"compare-categories":3},caveats:()=>["large areas dominate visual weight regardless of measurement"],buildProps:e=>({areas:e.geo?.features??[],valueAccessor:e.primary.y??"value"})},{component:"ProportionalSymbolMap",family:"geo",importPath:"semiotic/geo",rubric:{familiarity:3,accuracy:3,precision:3},fits:e=>e.hasGeo&&e.geo?(e.geo.points?.length??0)>0||0!==(e.geo.features.length??0)?null:"needs points or area features":"needs a GeoJSON FeatureCollection (with points or area centroids)",intentScores:{geo:4,rank:3,"compare-categories":3},buildProps:e=>({points:e.geo?.points??[],areas:e.geo?.features??void 0,xAccessor:"lon",yAccessor:"lat",sizeBy:e.primary.size??"value"})},{component:"FlowMap",family:"geo",importPath:"semiotic/geo",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.hasGeo&&e.geo?e.geo.flows?.length?e.geo.points?.length?null:"needs point nodes with lat/lon":"needs flow records (source/target/value)":"needs a geo dataset",intentScores:{geo:4,flow:5},buildProps:e=>({flows:e.geo?.flows??[],nodes:e.geo?.points??[],valueAccessor:"value"})},{component:"DistanceCartogram",family:"geo",importPath:"semiotic/geo",rubric:{familiarity:1,accuracy:3,precision:3},fits:e=>e.hasGeo&&e.geo?e.geo.points?.length?null:"needs point nodes with lat/lon and a cost field":"needs a geo dataset",intentScores:{geo:3,rank:3,"compare-categories":2},caveats:()=>["non-standard projection — requires explanation for most readers"],buildProps:e=>({points:e.geo?.points??[],costAccessor:"cost"})},{component:"GaltonBoardChart",family:"distribution",importPath:"semiotic/physics",rubric:{familiarity:3,accuracy:3,precision:2},fits:e=>20>e.rowCount?"Galton boards need enough observations for a distribution to form":e.primary.y?null:"needs a numeric field to drop into bins",intentScores:{distribution:4,"outlier-detection":1},caveats:()=>["The settled projection is the chart; motion is explanatory context and should not be used for exact value reading"],buildProps:e=>({data:e.data,valueAccessor:e.primary.y,bins:Math.max(8,Math.min(24,Math.round(Math.sqrt(e.rowCount))))})},{component:"EventDropChart",family:"realtime",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.primary.time??e.primary.x?3>e.rowCount?"needs multiple events to show arrival/window behavior":null:"needs an event-time field",intentScores:{"change-detection":3,trend:1,distribution:1},caveats:()=>["Use for event-time arrival stories, watermarks, and lateness; use a line or histogram for precise temporal values"],buildProps:e=>{const t=e.primary.time??e.primary.x,r=(function(e){return e.data.some(e=>e&&"object"==typeof e&&"arrivalTime"in e)}(e)?"arrivalTime":e.candidates.time.find(e=>e.field!==t)?.field)||t;return{data:e.data,timeAccessor:t,arrivalAccessor:r,windows:{size:Math.max(1,Math.ceil(e.rowCount/8))},watermark:{delay:1}}}},{component:"PhysicsPileChart",family:"categorical",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.primary.category?e.primary.y?(e.categoryCount??0)>12?"too many categories for readable physics piles":null:"needs a numeric value to unitize into bodies":"needs a categorical field for piles",intentScores:{"compare-categories":3,"part-to-whole":2,distribution:1},caveats:()=>["Physics piles dramatize accumulation; use bars or dots when exact rank or precise value comparison is the task"],buildProps:e=>{const t=e.primary.y,r=t?e.data.map(e=>Number(e?.[t])).filter(e=>Number.isFinite(e)):[],o=r.length?Math.max(...r):1;return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:t,unitValue:Math.max(1,Math.ceil(o/40))}}},{component:"CollisionSwarmChart",family:"distribution",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:4,precision:3},fits:e=>e.primary.y??e.primary.x?8>e.rowCount?"needs enough points for collision density to matter":e.rowCount>1200?"too many points for browser collision relaxation":(e.categoryCount??0)>12?"too many group lanes for a physics swarm":null:"needs a numeric field for the swarm axis",intentScores:{distribution:3,"outlier-detection":3,"compare-categories":2},caveats:()=>["CollisionSwarmChart makes overlap and settling visible; use SwarmPlot when a static distribution is enough"],buildProps:e=>{const t=e.primary.category&&8>=(e.categoryCount??0)?e.primary.category:void 0;return{data:e.data,xAccessor:e.primary.y??e.primary.x,...t?{groupAccessor:t,colorBy:t}:{},...e.primary.size?{radiusAccessor:e.primary.size}:{}}}},{component:"PhysicalFlowChart",family:"flow",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:2,precision:1},fits:e=>{return e.hasNetwork&&e.network?1>e.network.edges.length?"needs at least 1 flow link":e.network.edges.length>160?"too many links for animated particle flow":(t=e.network.edges,e.network.nodes.some(e=>or(e.x)&&or(e.y))||t.some(e=>Array.isArray(e.path)||Array.isArray(e.points)||Array.isArray(e.route))?null:"requires authored node x/y coordinates or per-link path geometry; use SankeyDiagram for plain source-target-value data"):"needs explicit {nodes, edges} or {nodes, links} route input";var t},intentScores:{flow:4,"change-detection":1,"part-to-whole":1},caveats:()=>["PhysicalFlowChart is experimental: keep showStaticFlow enabled so throughput remains readable when animation is paused or reduced","Requires explicit route geometry; it does not infer physical pipe paths from a flat source-target table"],buildProps:e=>{const t=e.network?.edges??[];return{nodes:e.network?.nodes??[],links:e.network?.edges??[],nodeIdAccessor:"id",nodeXAccessor:"x",nodeYAccessor:"y",sourceAccessor:"source",targetAccessor:"target",throughputAccessor:ar(t),showStaticFlow:!0,showSensors:!0,maxParticles:160}},scaleFit:e=>{const t=e.network?.edges.length??0;return t>4?t>60?{delta:-.7,caveats:[t+" links can create occlusion and packet budget pressure; aggregate routes first"]}:{delta:.2,reason:t+" links is small enough for route-constrained packet animation"}:{delta:-.2,caveats:[`only ${t} links — a static Sankey may communicate the flow more directly`]}}},{component:"ProcessFlowChart",family:"realtime",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>3>e.rowCount?"needs multiple work items to show stage flow":nr(e,"stage")||nr(e,"status")||e.primary.category?null:"needs a categorical stage/status field",intentScores:{flow:4,"change-detection":3,"compare-categories":2,rank:1},caveats:()=>["Use for capacitated multi-body process stories (review queues, triage, merge pipelines); use a bar or Sankey for precise stage totals without motion","Motion dramatizes backlog and capacity; settled stage counts and group completion are the readable chart"],buildProps:e=>{const t=(nr(e,"stage")?"stage":nr(e,"status")&&"status")||e.primary.category||"stage",r=nr(e,"id")?"id":void 0,o=(nr(e,"featureId")?"featureId":nr(e,"group")&&"group")||e.primary.series||void 0,a=new Set;for(const r of e.data){if(!r||"object"!=typeof r)continue;const e=r[t];null!=e&&""!==e&&a.add(e+"")}const n=a.size>0?Array.from(a):["coding","review","merged"],i=n.map((t,r)=>{const o=r===n.length-1,a=r===Math.floor(n.length/2);return{id:t,label:t,force:o?20:12,capacity:a?{unitsPerSecond:Math.max(2,Math.round(e.rowCount/8))}:void 0,pressure:a||void 0,absorb:o||void 0}});return{data:e.data,...r?{idAccessor:r}:{},stageAccessor:t,...o?{groupBy:o,groupCompletion:"allAbsorbed"}:{},stages:i,showProjection:!0,showChrome:!0}}},{component:"GauntletChart",family:"realtime",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:2,precision:2},fits:e=>{if(1>e.rowCount)return"needs at least one project/plan row";const t=e.data.some(e=>e&&"object"==typeof e&&"id"in e);return e.primary.category||t?null:"needs project rows with stable ids (or a categorical identity field)"},intentScores:{flow:3,"change-detection":2,"compare-categories":1},caveats:()=>["GauntletChart is for compound entities whose attached properties transform at gates. Use ProcessFlowChart when work items do not need compound property bodies.","Read viability, property inventory, and outcomes — not body trajectories."],buildProps:e=>({data:e.data.map((e,t)=>({...e,id:e?.id??"project-"+t,positives:Array.isArray(e?.positives)?e.positives:["value"],negatives:Array.isArray(e?.negatives)?e.negatives:["cost"]})),idAccessor:"id",positiveAccessor:"positives",negativeAccessor:"negatives",positiveProperties:[{id:"value",label:"Value",short:"V",color:"#22c55e",buoyancy:2,radius:9}],negativeProperties:[{id:"cost",label:"Cost",short:"$",color:"#ef4444",load:1.1,radius:7}],gates:[{id:"review",label:"Review"},{id:"approval",label:"Approval"}],showProjection:!0,showChrome:!0})},{component:"BigNumber",family:"value",importPath:"semiotic/value",rubric:{familiarity:5,accuracy:5,precision:5},fits:e=>e.primary.y||e.primary.size||0!==e.candidates.y.length?e.rowCount>50?"BigNumber shows a single focal value — pass scalar data, or use a chart family for >50 rows":null:"needs a numeric value to display",intentScores:{trend:e=>e.hasTimeAxis||"named"===e.xProvenance||e.monotonicX?e.rowCount>8?1:3:0,"compare-categories":1,rank:1,"part-to-whole":e=>1===e.rowCount?5:1,"change-detection":e=>e.hasTimeAxis||"named"===e.xProvenance||e.monotonicX?e.rowCount>8?1:4:0},caveats:e=>{const t=[];return e.rowCount>1&&t.push("BigNumber renders the latest row's value as the focal number; earlier rows feed an optional sparkline"),t},buildProps:e=>{const t=e.primary.y??e.primary.size??e.candidates.y[0]?.field;if(!t)return{value:0};const r=e.data,o=r.length>0?r[r.length-1]:null,a=o?Number(o[t]):0,n={value:Number.isFinite(a)?a:0,label:t};if(r.length>=2){const e=Number(r[r.length-2][t]);Number.isFinite(e)&&(n.comparison={value:e,label:"vs previous"})}return n},scaleFit:(e,t)=>"tiny"===t.rowBand?{delta:.8,reason:"single-value displays beat charts when there is one number to show"}:"small"===t.rowBand?{delta:.2,reason:"the latest value with a trend spark is often more legible than a chart at small scale"}:null}],sr=new Map;function cr(){if(0===sr.size&&0>=Z().capabilities.size)return ir;const e=new Map;for(const t of ir)e.set(t.component,t);for(const t of Array.from(Z().capabilities.values()))e.set(t.component,t);for(const[t,r]of sr)e.set(t,r);return Array.from(e.values())}function lr(e){return cr().find(t=>t.component===e)}var pr=new Set(["perceivable.content-only-visual","perceivable.color-alone","assistive.data-density","assistive.human-readable-numbers","assistive.skippable-navigation","compromising.table","compromising.navigable-structure"]),ur={"screen-reader":"a screen reader",sonified:"sonification",agent:"an AI reader"};function yr(e,t){if("visual"===t)return{delta:0,caveats:[]};let r=0;const o=[],a=[];for(const t of e.findings){if(!pr.has(t.id))continue;let e=0;"fail"===t.status?e=t.critical?1.2:.8:"warn"===t.status&&(e=.4),e>0&&(r-=e,o.push(t.heuristic.charAt(0).toLowerCase()+t.heuristic.slice(1)),a.push(t.message))}return 0===o.length?{delta:0,caveats:[]}:{delta:Math.max(-3,r),reason:`Harder to receive via ${ur[t]}: ${o.slice(0,3).join("; ")}`,caveats:a}}function dr(e,t,r,o,a){if(!o)return{score:e,rubric:t};const n=o.familiarity?.[r],i=n??t.familiarity,s=o.targets?.[r];let c,l,p=0;void 0!==n&&(p+=.5*(n-3)),s&&(p+=1*("increase"===s.direction?1:-1)*Math.max(1,Math.min(3,s.weight??1)),c=s.reason?`${o.name?o.name+": ":""}${s.reason}`:`${o.name?o.name+" ":""}target: ${s.direction} ${r}`);const u=o.receptionModality;return a&&u&&"visual"!==u&&(p+=a.delta,l=a.reason),{score:e+p,rubric:{...t,familiarity:i},appliedReason:c,receivabilityReason:l}}function mr(e,t,r){return r?r.familiarity?.[e]??t:t}function hr(e,t){if(void 0===e)return 0;const r="function"==typeof e?e(t):e;return Number.isFinite(r)?Math.max(0,Math.min(5,r)):0}function gr(e,t){if(!t?.intentDeltas)return e;const r={...e};for(const[e,o]of Object.entries(t.intentDeltas))r[e]=Math.max(0,Math.min(5,(r[e]??0)+o));return r}function br(e,t){return t?.rubricDeltas?function(e){const t=e=>Math.max(1,Math.min(5,Math.round(e)));return{familiarity:t(e.familiarity),accuracy:t(e.accuracy),precision:t(e.precision)}}({familiarity:e.familiarity+(t.rubricDeltas.familiarity??0),accuracy:e.accuracy+(t.rubricDeltas.accuracy??0),precision:e.precision+(t.rubricDeltas.precision??0)}):e}function fr(e,t,r,o){const a=[],n=o.map(e=>({intent:e,score:r[e]??0})).filter(e=>e.score>=3).sort((e,t)=>t.score-e.score).slice(0,2);for(const{intent:e,score:t}of n)a.push(`Strong fit for ${e} (${t}/5)`);if(t.primary.x&&t.primary.y&&a.push(`x = ${t.primary.x}, y = ${t.primary.y}`),t.seriesCount&&t.seriesCount>1&&a.push(`${t.seriesCount} series detected on field "${t.primary.series??"series"}"`),"recipe"===e.candidateKind){for(const t of e.positiveRationale?.slice(0,2)??[])a.push(t);e.whyCustom?.reason&&a.push("Why leave the catalog: "+e.whyCustom.reason)}return a}function vr(e,t){if("recipe"!==e.candidateKind||!e.recipe)return{delta:0,reasons:[],caveats:[]};const r=e.recipe;if(t.portability&&r.portability!==t.portability)return{delta:0,reasons:[],caveats:[],excluded:`requires a ${t.portability} recipe`};let o=0;const a=[],n=[],i=t.audience?.name?.trim().toLowerCase();if(i){const e=r.audienceFit?.find(e=>e.audience.trim().toLowerCase()===i);e&&(o+={strong:.75,moderate:.25,weak:-.5,avoid:-2}[e.fit],a.push(e.rationale??`${e.fit} fit for ${t.audience?.name??e.audience}`))}const s=t.receptionChannel??t.audience?.receptionModality??"visual";r.reception?.channels?.includes(s)?(o+=.25,a.push(`Designed for ${s} reception`)):r.reception?.channels?.length&&(o-=1,n.push(`Recipe does not declare support for the ${s} reception channel.`));const c=r.reception?.risks??[];return"low"===t.riskTolerance&&c.length>0?(o-=Math.min(1.5,.35*c.length),n.push(...c)):"medium"===t.riskTolerance&&c.length>2&&(o-=.25),"local"===r.portability?n.push("Local-only recipe: cannot be rendered remotely by CLI or MCP."):a.push("Portable registered recipe"),{delta:o,reasons:a,caveats:n}}function wr(e,t){if(0===t.length){const t=Object.values(e).filter(e=>"number"==typeof e&&e>0);return 0===t.length?0:t.reduce((e,t)=>e+t,0)/t.length}let r=0;for(const o of t)r+=e[o]??0;return r/t.length}function xr(e,t={}){const r=t.profile??xt(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),o=t.capabilities??cr(),a=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],n=!1!==t.includeVariants,i=t.minScore??0,s=t.maxResults??10,c=t.allow?new Set(t.allow):null,l=t.deny?new Set(t.deny):null,p=t.audience?.receptionModality,u=void 0!==p&&"visual"!==p,y=Rt(r,t.scale),d=void 0!==t.scale&&y.rows!==r.rowCount?{...r,rowCount:y.rows}:r,m=[];for(const e of o){if(c&&!c.has(e.component))continue;if(l&&l.has(e.component))continue;if(null!==e.fits(d))continue;const o={};for(const[t,r]of Object.entries(e.intentScores))o[t]=hr(r,d);const s=e.caveats?Array.from(e.caveats(d)):[],h=n&&e.variants&&e.variants.length>0?e.variants:[void 0];for(const n of h){const c=gr(o,n),l=wr(c,a),h=br(e.rubric,n),g=e.buildProps(r,n);let b;u&&(b=yr(ie(e.component,g),p));const f=dr(l,h,e.component,t.audience,b),v=Nt(e,d,y,t.scale,t.quality);if(v.excluded)continue;const w=vr(e,t);if(w.excluded)continue;const x=f.score+v.delta+w.delta;if(i>x)continue;const A=fr(e,d,c,a);f.appliedReason&&A.push(f.appliedReason),f.receivabilityReason&&A.push(f.receivabilityReason);for(const e of v.reasons)A.push(e);A.push(...w.reasons);const C=[...s,...n?.caveats??[],...v.caveats,...b?.caveats.slice(0,3)??[],...w.caveats];m.push({component:e.component,displayName:e.displayName??e.component,candidateKind:e.candidateKind??"built-in",...e.recipe?{recipeId:e.recipe.id}:{},family:e.family,importPath:e.importPath,variant:n,score:x,intentScores:c,rubric:f.rubric,reasons:A,caveats:C,props:g,...e.whyCustom?{whyCustom:e.whyCustom}:{},scaleRange:{band:y.rowBand,cardinalityBand:y.cardinalityBand,rows:y.rows,rowsSource:y.rowsSource}})}}m.sort((e,t)=>t.score!==e.score?t.score-e.score:t.rubric.accuracy!==e.rubric.accuracy?t.rubric.accuracy-e.rubric.accuracy:t.rubric.familiarity-e.rubric.familiarity);const h=new Set;return m.filter(e=>{const t=`${e.component}:${e.score.toFixed(4)}`;return!h.has(t)&&(h.add(t),!0)}).slice(0,s)}function Ar(e,t={}){const r=t.profile??xt(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),o=t.capabilities??cr(),a=t.allow?new Set(t.allow):null,n=t.deny?new Set(t.deny):null,i=Rt(r,t.scale),s=void 0!==t.scale&&i.rows!==r.rowCount?{...r,rowCount:i.rows}:r,c=[];for(const e of o){if(a&&!a.has(e.component))continue;if(n&&n.has(e.component))continue;const t=e.fits(s);null!==t&&c.push({component:e.component,family:e.family,importPath:e.importPath,reason:t})}return{fitting:xr(e,{...t,profile:r}),rejected:c,profile:r}}function Cr(e,t,r={}){const o=cr().find(t=>t.component===e);if(!o)return{reason:`No capability registered for "${e}"`};const a=r.profile??xt(t??[]),n=o.fits(a);if(null!==n)return{reason:n};const i=r.variantKey?o.variants?.find(e=>e.key===r.variantKey):void 0,s=r.intent?Array.isArray(r.intent)?r.intent:[r.intent]:[],c={};for(const[e,t]of Object.entries(o.intentScores))c[e]=hr(t,a);const l=gr(c,i),p=wr(l,s),u=br(o.rubric,i),y=fr(o,a,l,s),d=vr(o,r);if(d.excluded)return{reason:d.excluded};y.push(...d.reasons);const m=[...o.caveats?o.caveats(a):[],...i?.caveats??[],...d.caveats];return{component:o.component,displayName:o.displayName??o.component,candidateKind:o.candidateKind??"built-in",...o.recipe?{recipeId:o.recipe.id}:{},family:o.family,importPath:o.importPath,variant:i,score:p+d.delta,intentScores:l,rubric:u,reasons:y,caveats:m,props:o.buildProps(a,i),...o.whyCustom?{whyCustom:o.whyCustom}:{}}}function Sr(e,t={}){const r=t.profile??xt(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),o=Rt(r,t.scale),a=t.maxPerBand??t.maxResults??5,n=["tiny","small","medium","large","huge"],i={};for(const o of n){const n={...t.scale??{},rows:o};i[o]=xr(e,{...t,profile:r,scale:n,maxResults:a})}return{tiny:i.tiny??[],small:i.small??[],medium:i.medium??[],large:i.large??[],huge:i.huge??[],effective:o}}function kr(e,t={}){const r=t.audience;if(!r)return[];const o=t.profile??xt(e??[],{rawInput:t.rawInput}),a=function(e){return e&&2===e.exposureLevel?4:3}(r),n=t.scoreTolerance??1.5,i=t.maxResults??5,s=cr(),c=new Map;for(const e of s)c.set(e.component,mr(e.component,e.rubric.familiarity,r));const l=xr(e,{profile:o,intent:t.intent,maxResults:30,includeVariants:!0,minScore:1,allow:t.allow,deny:t.deny}),p=l.filter(e=>(c.get(e.component)??e.rubric.familiarity)>=4)[0],u=[];for(const e of l)(c.get(e.component)??e.rubric.familiarity)>a||("increase"===r.targets?.[e.component]?.direction||!p||n>=p.score-e.score)&&u.push({stretch:e,familiar:p});const y=new Set,d=[];for(const{stretch:e,familiar:t}of u){const o=`${e.component}/${e.variant?.key??"base"}`;if(y.has(o))continue;y.add(o);const a=c.get(e.component)??e.rubric.familiarity,n=r.targets?.[e.component],s=n?.reason??("increase"===n?.direction?`${r.name??"your audience"} is growing adoption of ${e.component}`:t?`${e.component} is on the data, and within reach of ${t.component} which you're already familiar with`:e.component+" fits this data and would expand your team's vocabulary");if(d.push({suggestion:e,replacing:t?.component,rationale:s,familiarity:a}),d.length>=i)break}return d}function jr(e,t={}){const r=t.profile??xt(e??[],{rawInput:t.rawInput}),o=t.maxPanels??6,a=!1!==t.diversifyByFamily,n=t.intents??function(e){const t=[];return e.hasTimeAxis&&(t.push("trend"),e.seriesCount&&e.seriesCount>=2&&t.push("compare-series","composition-over-time"),t.push("change-detection")),e.categoryCount&&t.push("rank","compare-categories","part-to-whole"),e.primary.y&&e.rowCount>=10&&t.push("distribution"),2>Object.values(e.fields).filter(e=>"numeric"===e.type).length||t.push("correlation","outlier-detection"),e.hasHierarchy&&t.push("hierarchy"),e.hasNetwork&&t.push("flow"),e.hasGeo&&t.push("geo"),Array.from(new Set(t))}(r),i=[],s=[],c=[],l=new Set,p=new Set;for(const u of n){if(i.length>=o){c.push(u);continue}const n=xr(e,{profile:r,intent:u,allow:t.allow,deny:t.deny,maxResults:20,includeVariants:!0,minScore:1.5,audience:t.audience});let y;for(const e of n)if(!(p.has(`${e.component}/${e.variant?.key??"base"}`)||a&&l.has(e.family))){y=e;break}if(!y&&a)for(const e of n)if(!p.has(`${e.component}/${e.variant?.key??"base"}`)){y=e;break}y?(i.push({intent:u,suggestion:y}),s.push(u),l.add(y.family),p.add(`${y.component}/${y.variant?.key??"base"}`)):c.push(u)}return{panels:i,intentsCovered:s,intentsMissing:c,stretchPanels:t.audience&&(t.audience.exposureLevel??1)>0?kr(e,{profile:r,audience:t.audience,deny:Array.from(p).map(e=>e.split("/")[0]),maxResults:t.maxStretchPanels??Math.min(3,o)}):[],profile:r}}var Pr=[{component:"RealtimeLineChart",importPath:"semiotic/realtime",rubric:{familiarity:4,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"y"===e.role||"value"===e.role)?"high"===e.throughput?"for high-throughput streams, prefer RealtimeHeatmap or RealtimeWaterfallChart":null:"needs a numeric value field":"needs a date/time field for the x axis",intentScores:{trend:5,"change-detection":4,"outlier-detection":2},caveats:e=>{const t=[];return"cumulative"===e.retention&&t.push("cumulative retention will eventually exhaust the buffer — set a windowSize or downsample"),t},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,r=e.fields.find(e=>"y"===e.role||"value"===e.role||"numeric"===e.kind)?.name;return{timeAccessor:t,valueAccessor:r}}},{component:"RealtimeHistogram",importPath:"semiotic/realtime",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?null:"needs a numeric field to bin":"needs a time field",intentScores:{distribution:5,"outlier-detection":4,"change-detection":2},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,r=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name;return{timeAccessor:t,valueAccessor:r}}},{component:"RealtimeSwarmChart",importPath:"semiotic/realtime",rubric:{familiarity:2,accuracy:4,precision:4},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?e.fields.some(e=>"categorical"===e.kind||"category"===e.role)?null:"needs a category to swarm by":"needs a numeric field":"needs a time field (points are placed at (time, value))",intentScores:{"outlier-detection":5,distribution:4,"compare-categories":3},caveats:e=>"high"===e.throughput?["high-throughput swarms get crowded — consider RealtimeHistogram"]:[],buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,r=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name,o=e.fields.find(e=>"category"===e.role||"categorical"===e.kind)?.name;return{timeAccessor:t,valueAccessor:r,categoryAccessor:o}}},{component:"RealtimeWaterfallChart",importPath:"semiotic/realtime",rubric:{familiarity:2,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?null:"needs a numeric value field":"needs a time field",intentScores:{"change-detection":5,trend:3,"outlier-detection":4,distribution:e=>"high"===e.throughput?4:2},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,r=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name;return{timeAccessor:t,valueAccessor:r}}},{component:"RealtimeHeatmap",importPath:"semiotic/realtime",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?null:"needs a numeric value field":"needs a time field for the x axis",intentScores:{trend:e=>"high"===e.throughput?4:2,distribution:3,"change-detection":3,"compare-series":e=>e.fields.find(e=>"series"===e.role||"categorical"===e.kind&&"category"!==e.role)?4:1},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,r=e.fields.find(e=>"y"===e.role||"value"===e.role||"numeric"===e.kind)?.name,o=e.fields.find(e=>"category"===e.role||"categorical"===e.kind&&"series"!==e.role)?.name;return{timeAccessor:t,valueAccessor:r,...o?{categoryAccessor:o}:{}}}},{component:"TemporalHistogram",importPath:"semiotic/realtime",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?"windowed"===e.retention?"windowed retention is RealtimeHistogram's job; TemporalHistogram serves bounded/cumulative data":null:"needs a numeric value field":"needs a time field",intentScores:{distribution:5,"change-detection":3,trend:2},buildProps:e=>{const t=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name,r=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name;return{timeAccessor:r,valueAccessor:t}}}],$r=new Map;function Ir(e,t){if(void 0===e)return 0;const r="function"==typeof e?e(t):e;return Number.isFinite(r)?Math.max(0,Math.min(5,r)):0}function Rr(e,t){if(0===t.length){const t=Object.values(e).filter(e=>"number"==typeof e&&e>0);return 0===t.length?0:t.reduce((e,t)=>e+t,0)/t.length}let r=0;for(const o of t)r+=e[o]??0;return r/t.length}function Tr(e,t,r){const o=[],a=r.map(e=>({intent:e,score:t[e]??0})).filter(e=>e.score>=3).sort((e,t)=>t.score-e.score).slice(0,2);for(const{intent:e,score:t}of a)o.push(`Strong fit for ${e} (${t}/5)`);return e.throughput&&o.push(`tuned for ${e.throughput} throughput`),o}function Nr(e,t={}){const r=t.capabilities??function(){if(0===$r.size)return Pr;const e=new Map;for(const t of Pr)e.set(t.component,t);for(const[t,r]of $r)e.set(t,r);return Array.from(e.values())}(),o=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],a=t.minScore??0,n=t.maxResults??10,i=t.allow?new Set(t.allow):null,s=t.deny?new Set(t.deny):null,c=[];for(const t of r){if(i&&!i.has(t.component))continue;if(s&&s.has(t.component))continue;if(null!==t.fits(e))continue;const r={};for(const[o,a]of Object.entries(t.intentScores))r[o]=Ir(a,e);const n=Rr(r,o);if(a>n)continue;const l={...t.rubric},p=t.caveats?Array.from(t.caveats(e)):[],u=Tr(e,r,o),y=t.buildProps(e);c.push({component:t.component,family:"realtime",importPath:t.importPath,score:n,intentScores:r,rubric:l,reasons:u,caveats:p,props:y})}return c.sort((e,t)=>t.score!==e.score?t.score-e.score:t.rubric.accuracy!==e.rubric.accuracy?t.rubric.accuracy-e.rubric.accuracy:t.rubric.familiarity-e.rubric.familiarity),c.slice(0,n)}function Br(e,t,r={}){const o=r.profile??xt(t??[],{rawInput:r.rawInput}),a=lr(e),n=r.maxAlternatives??3,i=a?.recipe?function(e,t){const r=[];"required"===e.accessibility.description&&"string"!=typeof(t.props??{}).description&&r.push("This custom recipe needs a generated or authored description."),e.reception?.risks?.some(e=>/unfamiliar/i.test(e))&&!(e.reception.scaffolds??[]).some(e=>["legend","annotation","summary","description"].includes(e))&&r.push("This recipe is unfamiliar; add an orienting legend, annotation, or summary.");const o=e.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));o&&r.push("This recipe is color-dependent; add a shape, position, texture, or label cue."),e.reception?.channels.includes("interactive")&&!e.accessibility.fallbackTable&&"required"!==e.accessibility.accessibleTable&&r.push("This interactive recipe needs a static data fallback."),"local"===e.portability&&r.push("This recipe is local-only and cannot be exported to MCP or CLI rendering.");for(const e of t.observedSceneAudit?.observedSceneEvidence??[])"fail"!==e.status&&"warn"!==e.status||("interaction.hit-targets"===e.id?r.push("Scene audit found data-bearing marks without hit targets."):"accessibility.table-fields"===e.id?r.push("Scene audit found accessible-table field loss."):"accessibility.navigation-depth"===e.id&&r.push("The recipe navigation tree is root-only; expose groups and reachable data marks."));return[...new Set(r)]}(a.recipe,r):[];if(!a)return{status:"unknown",component:e,alternatives:xr(t,{profile:o,intent:r.intent,maxResults:n,includeVariants:!1}),profile:o};const s=a.fits(o);return null===s?{status:"ok",component:e,profile:o,...i.length?{repairs:i}:{}}:{status:"alternative",component:e,reason:s,alternatives:xr(t,{profile:o,intent:r.intent,maxResults:n,deny:[e],includeVariants:!1}),profile:o,...i.length?{repairs:i}:{}}}var Lr=new Set;function Fr(e,t,r){return Number.isFinite(e)?Math.max(t,Math.min(r,e)):t}function Dr(e,t){return void 0===e?0:Fr("function"==typeof e?e(t):e,0,5)}function Er(e){return e?Array.isArray(e)?[...e]:[e]:[]}function Mr(e,t,r){const o={};for(const[r,a]of Object.entries(e.intentScores))o[r]=Dr(a,t);if(r)for(const[e,t]of Object.entries(r))o[e]=Fr((o[e]??0)+t,0,5);return o}function Or(e,t){if(t.length>0)return t.reduce((t,r)=>t+(e[r]??0),0)/t.length;const r=Object.values(e).filter(e=>"number"==typeof e&&e>0);return r.length?r.reduce((e,t)=>e+t,0)/r.length:0}function zr(e,t){return{id:`${e.component}:${t.key}`,baseComponent:e.component,label:t.label,intentDeltas:t.intentDeltas,rubricDeltas:t.rubricDeltas,buildProps:r=>e.buildProps(r,t),rationale:t.description??`Registered ${e.component} variant: ${t.label}.`,source:"manual",variantKey:t.key,tags:t.tags}}function Gr(e,t,r){return e.some(e=>e.props?.[t]===r)}var Hr=new Set(["BarChart","GroupedBarChart","StackedBarChart","DotPlot"]);var _r=(e,t,r)=>function(e,t,r){const o=new Map,a=e=>{for(const t of e)t&&t.id&&t.baseComponent&&(o.has(t.id)||o.set(t.id,t))};a(function(e,t,r){const o=r.profile,a=r.existingVariants??t.variants??[],n=Er(r.intent),i=[];for(const e of a)i.push(zr(t,e));const s=n.includes("rank")||n.includes("compare-categories");!Hr.has(e)||"categorical"!==t.family||Gr(a,"orientation","horizontal")||!s&&6>(o.categoryCount??0)||i.push({id:e+":heuristic-horizontal",baseComponent:e,label:"Horizontal ranked view",intentDeltas:{rank:1,"compare-categories":.5},rubricDeltas:{precision:1},buildProps:e=>({...t.buildProps(e),orientation:"horizontal",sort:"desc"}),rationale:"Horizontal orientation improves label legibility and rank scanning for categorical comparisons.",source:"heuristic",tags:["horizontal","ranked"]});const c=Gr(a,"normalize",!0)||Gr(a,"type","percent")||a.some(e=>/normal|percent/i.test(`${e.key} ${e.label}`));if(/Stacked/.test(e)&&!c&&(n.includes("part-to-whole")||n.includes("composition-over-time"))&&i.push({id:e+":heuristic-normalized",baseComponent:e,label:"Normalized composition",intentDeltas:{"part-to-whole":1,"compare-categories":-.5},rubricDeltas:{precision:-1},buildProps:e=>({...t.buildProps(e),normalize:!0}),rationale:"Normalization emphasizes proportional composition when absolute magnitude is secondary.",source:"heuristic",tags:["normalized","part-to-whole"]}),n.length>0){const t=cr().filter(t=>t.component!==e).filter(e=>null===e.fits(o)).map(e=>{const t=Mr(e,o);return{candidate:e,fit:Or(t,n),scores:t}}).filter(e=>e.fit>=4).sort((e,t)=>t.fit!==e.fit?t.fit-e.fit:t.candidate.rubric.accuracy!==e.candidate.rubric.accuracy?t.candidate.rubric.accuracy-e.candidate.rubric.accuracy:t.candidate.rubric.familiarity-e.candidate.rubric.familiarity).slice(0,3);for(const{candidate:e,fit:r}of t)i.push({id:`${e.component}:heuristic-${n.join("-")}`,baseComponent:e.component,label:e.component+" alternative",buildProps:t=>e.buildProps(t),rationale:`${e.component} is a strong ${n.join(" + ")} alternative (${r.toFixed(1)}/5) for this data shape.`,source:"heuristic",tags:["cross-family",e.family]})}return i}(e,t,r));for(const o of Lr)try{a(o(e,t,r)??[])}catch(e){void 0!==console&&console.warn("[variantDiscovery] proposer threw:",e)}return Array.from(o.values())}(e,t,r),qr=(e,t,r,o={})=>{const a=lr(e.baseComponent);if(!a)return{proposalId:e.id,fit:0,novelty:1,risk:1,reasons:[`No capability registered for proposed component "${e.baseComponent}".`]};const n=a.fits(t);if(null!==n)return{proposalId:e.id,fit:0,novelty:"manual"===e.source?.2:.7,risk:1,reasons:["Rejected: "+n]};const i=Er(o.intent),s=Mr(a,t,e.intentDeltas),c=Or(s,i),l=function(e,t){return t?{familiarity:Math.round(Fr((r={familiarity:e.familiarity+(t.familiarity??0),accuracy:e.accuracy+(t.accuracy??0),precision:e.precision+(t.precision??0)}).familiarity,1,5)),accuracy:Math.round(Fr(r.accuracy,1,5)),precision:Math.round(Fr(r.precision,1,5))}:e;var r}(a.rubric,e.rubricDeltas);let p;const u=r?.receptionModality;if(u&&"visual"!==u){const o=e.variantKey?a.variants?.find(t=>t.key===e.variantKey):void 0,n=e.buildProps?e.buildProps(t,r):a.buildProps(t,o);p=yr(ie(e.baseComponent,n),u)}const y=dr(c,l,e.baseComponent,r,p),d=Fr(y.score,0,5);let m="manual"===e.source?.15:"heuristic"===e.source?.45:.75;o.baselineComponent&&o.baselineComponent!==e.baseComponent&&(m+=.2),e.variantKey||(m+=.05),m=Fr(m,0,1);let h="manual"===e.source?.1:"heuristic"===e.source?.25:.45;0>(e.rubricDeltas?.accuracy??0)&&(h+=.15),0>(e.rubricDeltas?.precision??0)&&(h+=.1),l.accuracy>3||(h+=.1),3>d&&(h+=.2),h=Fr(h,0,1);const g=[];if(e.rationale&&g.push(e.rationale),i.length>0){const e=i.map(e=>`${e}: ${(s[e]??0).toFixed(1)}/5`).join(", ");g.push(`Intent fit — ${e}.`)}else g.push(`Mean non-zero intent fit ${c.toFixed(1)}/5.`);return"manual"!==e.source&&g.push(e.source+" proposal; verify against domain context."),y.appliedReason&&g.push(y.appliedReason),y.receivabilityReason&&g.push(y.receivabilityReason),e.rubricDeltas&&Object.values(e.rubricDeltas).some(e=>0>(e??0))&&g.push("Rubric tradeoff: improves one reading mode while reducing precision or accuracy."),{proposalId:e.id,fit:d,novelty:m,risk:h,reasons:g}},Wr=new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),Vr=new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),Ur=new Set(["PieChart","DonutChart","FunnelChart"]),Yr=new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]);function Xr(e,t){return Vr.has(e)||Ur.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 Kr(e){for(const t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){const r=e[t];if("string"==typeof r&&r)return r}}function Jr(e,t){return null==e?"—":e instanceof Date?e.toISOString().slice(0,10):"number"==typeof e?t(e):e+""}function Qr(e,t={}){const r=!0===t.showRetractedAnnotations,o=!0===t.showSupersededAnnotations,a=new Set;for(const t of e){const e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&a.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!r)return!1;const t=e?.provenance?.stableId;return!(t&&a.has(t)&&!o)})}var Zr={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"},eo=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),to=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]);function ro(e){return Zr[e]||e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()+" chart"}function oo(e){const t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}var ao=new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),no={"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"},io={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},so=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],co={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"};function lo(e){return no[e]}function po(e,t){const r=function(e){if(e){if("fits"in e||"buildProps"in e){const t=e,r={};for(const[e,o]of Object.entries(t.intentScores))"number"==typeof o&&Number.isFinite(o)&&(r[e]=o);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[o,a]of Object.entries(e))if("number"==typeof a&&a>0)if(a>r)t=o,r=a;else if(a===r&&void 0!==t){const e=so.indexOf(o),r=so.indexOf(t);-1===e||-1!==r&&e>=r||(t=o)}return t}(r.intentScores);if(e&&no[e]&&(r.intentScores[e]??0)>=3)return no[e]}return r?.family?io[r.family]:function(e){return Ur.has(e)||"StackedAreaChart"===e?"apportioning":ao.has(e)?"relating":Vr.has(e)?"comparing":Yr.has(e)?"characterizing":Wr.has(e)?"tracking":eo.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}var uo=new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),yo=new Set(["system","agent","watcher"]),mo=new Set(["ai","agent","system","computed","dbt","great-expectations"]),ho=new Set(["rule","statistical-test","llm-inference","computed"]);function go(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||!uo.has(t.type))return!1;const r=t.provenance;return!(!r||"object"!=typeof r)&&(yo.has(r.authorKind)||mo.has(r.source)||ho.has(r.basis))})}function bo(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 fo={"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 vo(e){const t=fo["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),o=r?r+t.replace(/^an? /,""):t,a="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return a?`${o} labeled "${a}"`:o}function wo(e){const t=Array.isArray(e.annotations)?e.annotations:null;if(!t||0===t.length)return;const r=Qr(t.filter(e=>!!e&&"object"==typeof e));if(0===r.length)return;const o=r.map(vo),a=o.slice(0,5),n=o.length-a.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]??""}(a)+(n>0?`, and ${n} more`:""),s=r.length;return`The author has marked ${1===s?"one feature":s+" features"} on this chart: ${i}.`}function xo(e,t,r={}){const o=void 0!==r.levels,i=new Set(r.levels??["l1","l2","l3"]);o||!r.capability&&!go(t)||i.add("l4");const s=Be(e,t,r.recipe);if(s){const e=["l1","l2","l3","l4"].filter(e=>i.has(e));o||e.includes("l4")||e.push("l4");const a=function(e,t,r={}){const o=Ne(t),a=Te(t),n=r.locale??"en",i="function"==typeof e.description?e.description({data:o,config:a,locale:n}):void 0,s=i?.levels??function(e,t,r,o){const a=De(e,["nominal","ordinal"]),n=De(e,["quantitative"]),i=a?Le(a,r,t):void 0,s=n?Le(n,r,t):void 0,c=a?.role??i??"category",l=n?.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")+"",r=Number(e[s]);Number.isFinite(r)&&m.set(t,(m.get(t)??0)+r)}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,w=e.intents.map(e=>({id:Re(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}. ${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 ${w??"explanation"}${x?` with a ${x} audience`:""}: ${e.designContract.whyCustom}`};var A}(e,o,a,n),c=r.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=r.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>"Misuse: "+e)]:void 0;return{text:p,levels:l,...u?.length?{caveats:u}:{}}}(s,t,{levels:e,locale:r.locale,audience:r.audience,includeCaveats:r.includeCaveats}),n=wo(t);return{...a,text:n?`${n} ${a.text}`.trim():a.text,...n?{annotations:n}:{}}}const c=bo(r.locale??"en"),l=ro(e),p=Array.isArray(t.data)?t.data:null,u=Kr(t),y=to.has(e)?function(e,t){const r=e.physics&&"object"==typeof e.physics?e.physics:null,o=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,a=[e.settledProjectionRows,e.projectionRows,o?.rows,r?.settledProjectionRows,r?.projectionRows,r?.settledProjection&&"object"==typeof r.settledProjection?r.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(a)?a.map((e,r)=>{if(!e||"object"!=typeof e)return null;const o=e,a=oo(o.count??o.value??o.total??o.bodies??o.events);if(null==a)return null;const n=o.label??o.id??o.name??"container "+(r+1),i=oo(o.secondary??o.secondaryCount),s=oo(o.observed??o.observedCount);return{label:Jr(n,t),count:a,...null!=i?{secondary:i}:{},..."string"==typeof o.secondaryLabel&&o.secondaryLabel?{secondaryLabel:o.secondaryLabel}:{},...null!=s?{observed:s}:{}}}).filter(e=>null!=e):null}(t,c):null,{measure:d,measureFallback:m,dimension:h,dimensionFallback:g}=Xr(e,t),b="string"==typeof d&&d?d:m,f="string"==typeof h&&h?h:g,v={};if(to.has(e)&&function(e,t,r,o,a,n){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(a.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)),!a.has("l2")&&!a.has("l3"))return;if(!r||0===r.length)return void(a.has("l2")&&(o.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),p=l[0]??r.slice().sort((e,t)=>t.count-e.count)[0];if(!p)return;const u=r.reduce((e,t)=>e+(t.secondary??0),0),y=r.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(a.has("l2"))if(0===l.length)o.l2=`The settled projection contains ${n(c)} ${Co(c,s)} across ${r.length} ${Co(r.length,i)}; no ${Co(2,i)} are non-empty yet.`;else{const e=u>0?` ${n(u)} ${Co(u,s)} ${1===u?"is":"are"} marked ${y}.`:"";o.l2=`The settled projection contains ${n(c)} ${Co(c,s)} across ${r.length} ${Co(r.length,i)}; ${l.length} ${Co(l.length,i)} ${1===l.length?"is":"are"} non-empty. The largest ${i} is ${p.label} with ${n(p.count)} ${Co(p.count,s)}.${e}`}if(a.has("l3")&&c>0&&l.length>0){const e=l.find(e=>e!==p),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))+"%"}(p.count,c);o.l3=e?`The settled projection is most concentrated in ${p.label}, which holds ${n(p.count)} ${Co(p.count,s)} (${t}); ${e.label} follows with ${n(e.count)} ${Co(e.count,s)}.`:`The settled projection is concentrated in ${p.label}, which holds all ${n(p.count)} ${Co(p.count,s)}.`}}(e,l,y,v,i,c),i.has("l1")&&!to.has(e))if(Wr.has(e)||Vr.has(e))v.l1=`A ${l} of ${b} by ${f}`+(u?`, split by ${u}.`:".");else if(Ur.has(e))v.l1=`A ${l} showing ${b} across ${f} categories.`;else if(Yr.has(e))v.l1=`A ${l} of the distribution of ${b}`+(u?` by ${u}.`:".");else if(eo.has(e)){const e=Array.isArray(t.nodes)?t.nodes.length:void 0,r=Array.isArray(t.edges)?t.edges.length:void 0,o=[null!=e?`${e} ${Co(e,"node")}`:null,null!=r?`${r} ${Co(r,"edge")}`:null].filter(Boolean);v.l1=`A ${l}${o.length?" with "+o.join(" and "):""}.`}else if("BigNumber"===e){const e="string"==typeof t.label?t.label:b;v.l1=`A single value${e?" for "+e:""}.`}else v.l1=`A ${l}.`;const w=Wr.has(e)||Vr.has(e)||Ur.has(e)||Yr.has(e);let x=null;if((i.has("l2")||i.has("l3")||i.has("l4"))&&w&&p&&p.length>0&&(x=function(e,t,r,o){let a=0,n=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 r of e){const e=t(r);Number.isFinite(e)&&(0===a&&(m=e,y=r),h=e,d=r,i>e&&(i=e,c=r,p=a),e>s&&(s=e,l=r,u=a),a++,n+=e)}return 0===a?null:{count:a,min:i,max:s,mean:n/a,minLabel:Jr(null!=c?r(c):null,o),maxLabel:Jr(null!=l?r(l):null,o),first:m,last:h,firstLabel:Jr(null!=y?r(y):null,o),lastLabel:Jr(null!=d?r(d):null,o),minIndex:p,maxIndex:u}}(p,a(d,m),n(h,g),c)),i.has("l2")&&w&&(p&&0!==p.length?x&&(v.l2=Ur.has(e)?`${x.count} segments totaling ${c(function(e){return e.mean*e.count}(x))}. Largest is ${x.maxLabel} at ${c(x.max)}; smallest is ${x.minLabel} at ${c(x.min)}.`:`${b} ranges from ${c(x.min)} (${x.minLabel}) to ${c(x.max)} (${x.maxLabel}), with a mean of ${c(x.mean)} across ${x.count} points.`):v.l2="No data is loaded yet."),i.has("l3")&&x&&!u&&Wr.has(e)?v.l3=function(e,t,r){const{first:o,last:a,min:n,max:i,maxLabel:s,minLabel:c,firstLabel:l,lastLabel:p,minIndex:u,maxIndex:y,count:d}=e,m=i-n,h=a-o;if(0===m)return`${Ao(t)} is constant at ${r(o)} across the series.`;if(.04>m/(Math.abs(e.mean)||1))return`${Ao(t)} ends roughly where it started (${r(o)} at ${l} to ${r(a)} at ${p}), ranging between ${r(n)} and ${r(i)}.`;const g=y>0&&d-1>y,b=u>0&&d-1>u,f=(i-Math.max(o,a))/m,v=(Math.min(o,a)-n)/m;return g&&f>.15?`Overall ${t} climbs to a peak of ${r(i)} (${s}), then falls to ${r(a)} (${p}).`:b&&v>.15?`Overall ${t} drops to a low of ${r(n)} (${c}), then recovers to ${r(a)} (${p}).`:.05>Math.abs(h)/m?`${Ao(t)} ends roughly where it started (${r(o)} at ${l} to ${r(a)} at ${p}), ranging between ${r(n)} and ${r(i)}.`:h>0?y===d-1?`Overall ${t} rises from ${r(o)} (${l}) to a peak of ${r(a)} (${p}).`:`Overall ${t} rises from ${r(o)} (${l}) to ${r(a)} (${p}), after peaking at ${r(i)} (${s}).`:u===d-1?`Overall ${t} falls from ${r(o)} (${l}) to a low of ${r(a)} (${p}).`:`Overall ${t} falls from ${r(o)} (${l}) to ${r(a)} (${p}), after dipping to ${r(n)} (${c}).`}(x,b,c):i.has("l3")&&x&&!u&&Vr.has(e)&&(v.l3=`The highest ${f} is ${x.maxLabel} and the lowest is ${x.minLabel}.`),i.has("l4")){const o=go(t)?"alerting":po(e,r.capability);o&&(v.l4=function(e,t,r,o,a,n,i,s){const c=co[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 r.label&&r.label?r.label:a} 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 ${n} and ${a} move together`;break;default:p=`This is ${l} ${c} chart`,u=function(e,t,r,o,a,n){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 ${o}`;case"ranking":return"read it top to bottom by "+r;case"apportioning":return`read each ${o}'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(Vr.has(r)||Ur.has(r))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;const{first:o,last:a,min:n,max:i,minLabel:s,maxLabel:c,lastLabel:l,minIndex:p,maxIndex:u,count:y}=e,d=i-n;if(d>0){const e=u>0&&y-1>u,r=p>0&&y-1>p,m=(i-Math.max(o,a))/d,h=(Math.min(o,a)-n)/d;if(e&&m>.15)return`the peak of ${t(i)} at ${c} is the point to investigate`;if(r&&h>.15)return`the dip to ${t(n)} at ${s} is the point to investigate`;if(a>=i)return`the climb to ${t(a)} at ${l} warrants a closer look`;if(n>=a)return`the drop to ${t(a)} at ${l} warrants a closer look`}return`the extremes — ${c} (${t(i)}) and ${s} (${t(n)}) — are the points to check`}(t,a,n);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 ${a(t.first)} (${t.firstLabel}) to ${a(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${r} across ${o}; ${t.maxLabel} leads at ${a(t.max)}`;case"ranking":return`read it top to bottom by ${r}; ${t.maxLabel} ranks highest at ${a(t.max)}`;case"apportioning":{const e=t.mean*t.count,r=e>0?Math.round(t.max/e*100):null;return`read each ${o}'s share of the ${a(e)} total; ${t.maxLabel} is the largest at ${a(t.max)}${null!=r?` (${r}%)`:""}`}case"characterizing":return`read it for the spread of ${r}, from ${a(t.min)} to ${a(t.max)}`;default:return"read the highlighted features"}}(e,o,a,n,i,t)}return`${p}; ${u}.${function(e,t){if(!t)return"";const r=t.familiarity?.[e];return"number"!=typeof r||r>2?"":` This ${ro(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`}(t,s)}`}(o,e,t,u?null:x,b,f,c,r.audience))}const A=["l1","l2","l3","l4"].filter(e=>i.has(e)&&v[e]).map(e=>v[e]).join(" "),C=wo(t);return{text:C?`${C} ${A}`.trim():A,levels:v,...C?{annotations:C}:{}}}function Ao(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function Co(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function So(e){return((e??"unknown")+"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function ko(e,t,r={}){const o=r.locale??"en",i=Math.max(1,r.maxLeaves??200),s=bo(o),c=Be(e,t,r.recipe);if(c)return function(e,t,r={}){const o=Ne(t),a=Te(t),n=Math.max(1,r.maxLeaves??200);if("function"==typeof e.navigation)return e.navigation({data:o,config:a,locale:r.locale??"en"});const i=(s=e.navigation)&&"object"==typeof s?e.navigation:void 0;var s;const c=(i?.groupByRole?Fe(e,i.groupByRole):void 0)??(i?.groupBy?.[0]?Fe(e,i.groupBy[0])??e.dataRoles.find(e=>e.field===i.groupBy?.[0]):void 0)??De(e,["nominal","ordinal"]),l=c?Le(c,a,o):void 0,p=(i?.idRole?Fe(e,i.idRole):void 0)??De(e,["identifier"]),u=p?Le(p,a,o):void 0,y={id:"root",role:"chart",label:i?.summaryTemplate?Ee(i.summaryTemplate,void 0,e,a,o,{count:o.length}):`${e.name}: ${o.length} ${1===o.length?"item":"items"} represented.`,level:1,children:[]};let d=0;const m=(t,r,n)=>{const s=u?t[u]:void 0,c=i?.itemLabelTemplate?Ee(i.itemLabelTemplate,t,e,a,o,{count:o.length}):function(e,t,r,o){const a=De(t,["nominal","ordinal"]),n=t.dataRoles.filter(e=>"quantitative"===e.semanticType),i=a?Le(a,r,o):void 0,s=[];i&&null!=e[i]&&s.push(e[i]+"");for(const t of n){const a=Le(t,r,o);a&&null!=e[a]&&s.push(`${t.role}: ${e[a]+""}`)}return s.length>0?s.join(", "):"Data item"}(t,e,a,o);return{id:"datum-"+So(s??r),role:"datum",label:c,level:n,datum:t}};if(l){const e=new Map;for(const t of o){const r=(t[l]??"Uncategorized")+"",o=e.get(r);o?o.push(t):e.set(r,[t])}y.children=[...e].map(([e,t],r)=>{const o=t.slice(0,Math.max(0,n-d));d+=o.length;const a=o.map((e,t)=>m(e,1e5*r+t,3));return t.length>o.length&&a.push({id:"more-"+So(e),role:"datum",label:`…and ${t.length-o.length} more items`,level:3}),{id:"group-"+So(e),role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:a}})}else{const e=o.slice(0,n);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}(c,t,{maxLeaves:i,locale:o});const l={id:"root",role:"chart",label:xo(e,t,{locale:o}).text||"Chart.",level:1,children:[]},p=function(e,t){const r=Array.isArray(e.annotations)?e.annotations:null;if(!r)return null;const o=Qr(r.filter(e=>!!e&&"object"==typeof e));if(0===o.length)return null;let a=0;const n=o.slice(0,t).map(e=>{const t=e.lifecycle?.status,r=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+a++,role:"annotation",level:3,label:`${o=vo(e),o?o.charAt(0).toUpperCase()+o.slice(1):o}${r}.`,datum:e};var o});o.length>t&&n.push({id:"annotation-"+a++,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:n}}(t,i),u=Array.isArray(t.data)?t.data:null,y=Wr.has(e)||Vr.has(e)||Ur.has(e)||Yr.has(e);if(!u||0===u.length||!y)return p&&(l.children=[p]),l;const{measure:d,measureFallback:m,dimension:h,dimensionFallback:g}=Xr(e,t),b=a(d,m),f=n(h,g),v="string"==typeof d&&d?d:m,w="string"==typeof h&&h?h:g,x=Kr(t);let A=0;const C=e=>`${e}-${A++}`,S=(e,t)=>{const r=e.slice(0,i).map(e=>((e,t)=>{const r=b(e),o=Jr(f(e),s);return{id:C("datum"),role:"datum",level:t,label:`${o}: ${Number.isFinite(r)?s(r):"—"}`,value:Number.isFinite(r)?r:void 0,datum:e}})(e,t));return e.length>i&&r.push({id:C("more"),role:"datum",level:t,label:`…and ${e.length-i} more points`}),r},k=[];if(Wr.has(e)||Vr.has(e)){let t=1/0,r=-1/0,o=1/0,a=-1/0;const n=[];let i=!0;for(const e of u){const s=b(e);Number.isFinite(s)&&(t>s&&(t=s),s>r&&(r=s));const c=f(e);n.push(c),"number"==typeof c&&Number.isFinite(c)?(o>c&&(o=c),c>a&&(a=c)):i=!1}const c=new Set,l=[];for(const e of n){const t=e+"";c.has(t)||(c.add(t),l.push(e))}const p=i?`${s(o)} to ${s(a)}`:`${Jr(l[0],s)} to ${Jr(l[l.length-1],s)} (${Vr.has(e)?l.length+" categories":u.length+" points"})`;k.push({id:C("axis"),role:"axis",level:2,label:`${Vr.has(e)?"Category axis":"X axis"}: ${w}, ${p}.`}),t>r||k.push({id:C("axis"),role:"axis",level:2,label:`Value axis: ${v}, ${s(t)} to ${s(r)}.`})}if(x){const r=n(x,x),a=new Map;for(const e of u){const t=(r(e)??"—")+"",o=a.get(t);o?o.push(e):a.set(t,[e])}const i=[];for(const[r,n]of a){const a=xo(e,{...t,data:n},{levels:["l2","l3"],locale:o}).text;i.push({id:C("series"),role:"series",level:2,label:`Series ${r}: ${a}`,children:S(n,3)})}l.children=[...k,...i]}else l.children=[...k,...S(u,2)];return p&&l.children.push(p),l}function jo(e,t){const r=[],o=e=>{if(r.push(e),e.children&&e.children.length>0&&t.has(e.id))for(const t of e.children)o(t)};return o(e),r}function Po(e){let t=1;if(e.children)for(const r of e.children)t+=Po(r);return t}var $o=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function Io(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function Ro(e){return Io(e)?e:void 0}function To(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function No(e){const t=To(e);return null==t?void 0:Math.max(0,Math.floor(t))}function Bo(...e){return e.map(Ro).find(Boolean)}function Lo(...e){return e.find(Array.isArray)}function Fo(e){const t={};for(const[r,o]of Object.entries(e))void 0!==o&&(t[r]=o);return t}function Do(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function Eo(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function Mo(e,t,r){const o=e?.filter(e=>!0===Ro(e)?.sensor).length,a=Ro(t?.observation),n=Ro(a?.sensors),i=Lo(r?.activeSensors);return Math.max(o??0,n?Object.keys(n).length:0,i?.length??0)||void 0}function Oo(e,t,r={}){const{capability:o,audience:a,locale:n}=r,i=r.levels??["l1","l2","l3"],s=!1!==r.includeStructure,c=po(e,o),l=xo(e,t,{levels:c?[...i,"l4"]:i,locale:n,capability:o,audience:a}),{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?ko(e,t,{maxLeaves:r.maxLeaves,locale:n}):void 0,b=function(e,t,r){if(!1===r)return;const o=Io(r)?r:void 0,a=Ro(t.physics),n=Bo(o?.snapshot,a?.snapshot,t.physicsSnapshot,function(e){const t=Ro(e);return!!t&&(Io(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),i=Bo(o?.evidence,a?.evidence,t.physicsEvidence,t.settledEvidence),s=Bo(o?.config,a?.config,n?.config,t.config),c=Bo(Ro(n?.world),Ro(a?.world)),l=Bo(Ro(s?.kernel),Ro(c?.options)),p=Lo(c?.bodies),u=Lo(c?.colliders,s?.colliders),y=Lo(n?.queue,a?.queue),d=Lo(n?.liveBodyOrder),m=Lo(c?.springs),h=Lo(n?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const r=Ro(e);if(!r)return;const o=To(r.count??r.value??r.total??r.bodies??r.events);if(null==o)return;const a=(r.label??r.id??r.name??"container "+(t+1))+"",n=null==r.id?void 0:r.id+"",i=To(r.secondary??r.secondaryCount),s=To(r.observed??r.observedCount);return Fo({id:n,label:a,count:o,secondary:i,secondaryLabel:"string"==typeof r.secondaryLabel?r.secondaryLabel:void 0,observed:s})}).filter(e=>null!=e);if(0===t.length)return;const r=t.reduce((e,t)=>e+t.count,0),o=t.filter(e=>e.count>0).length,a=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:r,populatedCount:o,...a?{leader:a}:{}}}(function(e,t,r,o){const a=Ro(e.settledProjection),n=Ro(t?.settledProjection);return Lo(r?.projectionRows,r?.aggregates,e.settledProjectionRows,e.projectionRows,a?.rows,t?.settledProjectionRows,t?.projectionRows,n?.rows,o?.binCounts)}(t,a,o,i)),b=function(e,t){const r=e?.map((e,t)=>{const r=Ro(e);if(!r)return;const o=To(r.count)??0,a=To(r.total),n={label:(r.label??r.id??"sediment "+(t+1))+"",count:o};return null!=r.id&&(n.id=r.id+""),null!=a&&(n.total=a),n}).filter(e=>null!=e),o=No(t?.bins)??r?.length??0,a=To(t?.count)??r?.reduce((e,t)=>e+t.count,0)??0,n=To(t?.total)??r?.reduce((e,t)=>e+(t.total??0),0),i=r?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==o||0!==a||n)return{bins:o,count:a,...null!=n&&n>0?{total:n}:{},...i?{leader:i}:{}}}(Lo(o?.sediment,a?.sediment,n?.sediment),Bo(o?.sedimentTotals,a?.sedimentTotals)),f=d?.length??p?.length??No(i?.bodyCount),v=function(e){if(e)return e.filter(e=>!0===Ro(e)?.sleeping).length}(p)??No(i?.sleepingCount),w=y?.length,x="string"==typeof n?.simulationState?n.simulationState:void 0,A="boolean"==typeof i?.settled?i.settled:x?"settled"===x:null!=f||null!=v||null!=w?null!=f&&v===f&&0===(w??0):void 0,C=Ro(l?.gravity),S=To(C?.x),k=To(C?.y),j=Fo({state:x,settled:A,elapsedSeconds:To(n?.elapsedSeconds),paused:"boolean"==typeof n?.paused?n.paused:void 0,visible:"boolean"==typeof n?.visible?n.visible:void 0,seed:To(l?.seed),gravity:null!=S&&null!=k?{x:S,y:k}:void 0,fixedDt:To(s?.fixedDt??l?.fixedDt),timeScale:To(s?.timeScale),maxSubsteps:No(s?.maxSubsteps),liveBodies:f,sleepingBodies:v,queued:w,bodyLimit:To(s?.bodyLimit),eviction:"string"==typeof s?.eviction?s.eviction:void 0}),P=Fo({colliders:u?.length,sensors:Mo(u,s,c),springs:m?.length,activeSensorPairs:h?.length}),$=Object.keys(P).length>0,I=$o.has(e);if(!(Object.keys(j).length>0||$||g||b)||!I&&null==r)return;const R={simulation:j,...$?{geometry:P}:{},...g?{aggregates:g}:{},...b?{sediment:b}:{}},T=function(e){const t=[],r=e.simulation,o=[r.state??(r.settled?"settled":void 0),null!=r.liveBodies?`${r.liveBodies} live ${Do(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 "+Eo(r.seed):void 0,r.gravity?`gravity (${Eo(r.gravity.x)}, ${Eo(r.gravity.y)})`:void 0,null!=r.fixedDt?`fixed step ${Eo(r.fixedDt)}s`:void 0,null!=r.timeScale?Eo(r.timeScale)+"x time":void 0].filter(Boolean);o.length>0&&t.push(`Physics simulation: ${o.join("; ")}.`);const a=e.geometry;if(a){const e=[null!=a.colliders?`${a.colliders} ${Do(a.colliders,"collider")}`:void 0,null!=a.sensors?`${a.sensors} ${Do(a.sensors,"sensor")}`:void 0,null!=a.springs?`${a.springs} ${Do(a.springs,"spring")}`:void 0,null!=a.activeSensorPairs?`${a.activeSensorPairs} active sensor ${Do(a.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const n=e.aggregates;if(n){const e=n.leader,r=e?` Largest is ${e.label} with ${Eo(e.count)}.`:"";t.push(`Physics aggregates: ${Eo(n.totalCount)} settled ${Do(n.totalCount,"body")} across ${n.rows.length} ${Do(n.rows.length,"container")}; ${n.populatedCount} populated.${r}`)}const i=e.sediment;if(i){const e=null!=i.total?", value total "+Eo(i.total):"",r=i.leader?`; largest sediment bin is ${i.leader.label} with ${Eo(i.leader.count)}`:"";t.push(`Physics sediment: ${i.count} retained ${Do(i.count,"body")} in ${i.bins} ${Do(i.bins,"bin")}${e}${r}.`)}return t.join(" ")}(R);return{...R,text:T}}(e,t,r.physics),f=[d.text,m?.sentence,b?.text].filter(Boolean).join(" ");return{component:e,description:d,intent:m,structure:g,physics:b,text:f}}var zo={valid:!1,errors:[]};function Go(e,t={}){const r=e.component,o=e.props??{},a=[],n=!!u[r];n||a.push(`Unknown component "${r}". It is not in the chart registry — pick a known chart.`);const i=n?d(r,o):{...zo};if(!i.valid)for(const e of i.errors)a.push(e);const s=!1!==t.diagnose&&n?Y(r,o).diagnoses:[],c=s.filter(e=>"error"===e.severity),l=!1!==t.treatErrorsAsBlocking;if(l)for(const e of c)a.push(`${e.code}: ${e.message}`);let p,y,m,h,g;if((t.repair??!!t.data)&&t.data&&(p=Br(r,t.data,{intent:t.intent}),"alternative"===p.status?a.push(`${r} is a poor fit: ${p.reason}. Consider ${p.alternatives.map(e=>e.component).slice(0,3).join(", ")}.`):"unknown"===p.status&&a.push(`${r} could not be evaluated against the data; consider ${p.alternatives.map(e=>e.component).slice(0,3).join(", ")}.`)),n&&(y=He(r,o),m=Ue(y)),t.render&&n){const e=t.render(r,o);g=e.svg,h=e.evidence,h.empty&&a.push("Rendered to an empty scene (no marks) — the data or accessors produce nothing to draw.");for(const e of h.warnings)a.push(e)}const b=n&&i.valid&&(!l||0===c.length)&&(!p||"ok"===p.status)&&(!h||!h.empty);return{ok:b,component:r,props:o,config:y,jsx:m,validation:i,diagnostics:s,repair:p,evidence:h,svg:g,reasons:b?[]:a}}function Ho(e={}){const t=e.components??Object.keys(u).sort();return{name:e.name??"render_semiotic_chart",description:"Render a Semiotic chart from a component name and props. The result is validated, diagnosed for anti-patterns, and (when data is supplied) checked for fit against the data. Inject a renderer to prove it paints; otherwise the result returns validation and repair reasons plus ranked alternatives.",inputSchema:{type:"object",additionalProperties:!1,required:["component"],properties:{component:{type:"string",enum:[...t],description:"The chart component to render."},props:{type:"object",description:"Props for the chart (accessors, data, encodings). See the component schema.",additionalProperties:!0}}}}}function _o(e){return{name:e.name,description:e.description,input_schema:e.inputSchema}}function qo(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.inputSchema}}}function Wo(e,t=!0){if(!e||"object"!=typeof e||Array.isArray(e))return!1;const r=e,o=Array.isArray(r.type)?r.type:[r.type],a=o.includes("object")||!!r.properties;if(t&&!a)return!1;if(a){if(!1!==r.additionalProperties)return!1;const e=r.properties;if(!e||"object"!=typeof e||Array.isArray(e))return!1;const t=new Set(Array.isArray(r.required)?r.required:[]);if(Object.keys(e).some(e=>!t.has(e)))return!1;if(!Object.values(e).every(e=>Wo(e,!1)))return!1}if(o.includes("array")&&(!r.items||!Wo(r.items,!1)))return!1;for(const e of["anyOf","oneOf","allOf"]){if(void 0===r[e])continue;const t=r[e];if(!Array.isArray(t)||0===t.length)return!1;if(!t.every(e=>Wo(e,!1)))return!1}return!0}function Vo(e,t={}){const r=t.strict??!1;if(r&&!Wo(e.inputSchema))throw Error("OpenAI strict mode requires a top-level object schema, closed object schemas, and every property required. chartGenerationTool() intentionally leaves props open for chart-specific props; use strict: false or pass a component-specific closed schema.");return{type:"function",name:e.name,description:e.description,parameters:e.inputSchema,strict:r}}function Uo(e){return t=>Go(t,e?e(t):{})}var Yo={BarChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server",docsRoute:"/charts/bar-chart",pilot:!0},StackedBarChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},GroupedBarChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},SwarmPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},BoxPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},Histogram:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},ViolinPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},RidgelinePlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},DotPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},PieChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},DonutChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},GaugeChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},FunnelChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},SwimlaneChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},LikertChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},LineChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server",docsRoute:"/charts/line-chart",pilot:!0},AreaChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},DifferenceChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},StackedAreaChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},Scatterplot:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},BubbleChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},Heatmap:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},QuadrantChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},MultiAxisLineChart:{category:"xy",recommendedImport:"semiotic/xy"},CandlestickChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},ConnectedScatterplot:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},ScatterplotMatrix:{category:"xy",recommendedImport:"semiotic/xy"},MinimapChart:{category:"xy",recommendedImport:"semiotic/xy"},ForceDirectedGraph:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server",docsRoute:"/charts/force-directed-graph",pilot:!0},SankeyDiagram:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},ProcessSankey:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},ChordDiagram:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},TreeDiagram:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},Treemap:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},CirclePack:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},OrbitDiagram:{category:"network",recommendedImport:"semiotic/network"},ChoroplethMap:{category:"geo",recommendedImport:"semiotic/geo",serverImport:"semiotic/server"},ProportionalSymbolMap:{category:"geo",recommendedImport:"semiotic/geo",serverImport:"semiotic/server"},FlowMap:{category:"geo",recommendedImport:"semiotic/geo",serverImport:"semiotic/server",docsRoute:"/charts/flow-map",pilot:!0},DistanceCartogram:{category:"geo",recommendedImport:"semiotic/geo"},RealtimeLineChart:{category:"realtime",recommendedImport:"semiotic/realtime",docsRoute:"/charts/realtime-line-chart",pilot:!0},RealtimeHistogram:{category:"realtime",recommendedImport:"semiotic/realtime"},TemporalHistogram:{category:"realtime",recommendedImport:"semiotic/realtime",serverImport:"semiotic/server"},RealtimeSwarmChart:{category:"realtime",recommendedImport:"semiotic/realtime"},RealtimeWaterfallChart:{category:"realtime",recommendedImport:"semiotic/realtime"},RealtimeHeatmap:{category:"realtime",recommendedImport:"semiotic/realtime"},GaltonBoardChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server",docsRoute:"/charts/galton-board-chart",pilot:!0},EventDropChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},PhysicsPileChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},CollisionSwarmChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},GauntletChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},ProcessFlowChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},PhysicalFlowChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},BigNumber:{category:"value",recommendedImport:"semiotic/value",docsRoute:"/charts/big-number",pilot:!0}};function Xo(e){const t=Yo[e];return t?{category:t.category,recommendedImport:t.recommendedImport,...t.serverImport?{serverImport:t.serverImport}:{},...t.docsRoute?{docsRoute:t.docsRoute}:{},note:t.pilot?"This chart is in the ChartDefinition pilot. Its module and server support are explicit; existing family facades remain compatible.":"Use the family facade today. Granular chart modules are a later package-boundary migration, so this recommendation does not claim a smaller per-chart bundle."}:{note:"Unknown chart component: no package or server guidance can be determined."}}function Ko(e){if(!e)return{state:"not-observed",pending:[]};const t=Object.keys(e.revisions).filter(t=>e.revisions[t]>(e.consumed?.[t]??0));return{state:0===t.length?"fully-consumed":"pending-consumption",revisions:{...e.revisions},...e.consumed?{consumed:{...e.consumed}}:{},pending:t}}function Jo(e){return{status:e.status,frameType:e.frameType,markCount:e.markCount,markCountByType:{...e.markCountByType},...e.xDomain?{xDomain:[...e.xDomain]}:{},...e.yDomain?{yDomain:[...e.yDomain]}:{},...e.categories?{categories:[...e.categories]}:{},...void 0!==e.nodeCount?{nodeCount:e.nodeCount}:{},...void 0!==e.edgeCount?{edgeCount:e.edgeCount}:{}}}function Qo(e){const{createdAt:t,...r}=e;return r}function Zo(e,t={}){const r=Go({component:e.component,props:e.props??{}},{repair:!1}),o=[...r.reasons];let a;if(t.render&&r.ok)try{a=t.render(e.component,e.props??{}).evidence,a.empty&&o.push("EMPTY_SCENE: the renderer produced no data marks.");for(const e of a.warnings)o.includes(e)||o.push(e)}catch{o.push("RENDER_FAILED: static evidence could not be produced for this configuration.")}const n=r.ok&&!a?.empty&&!o.some(e=>e.startsWith("RENDER_FAILED"));return{mode:"read-only",component:e.component,...r.config?{normalizedConfig:Qo(r.config)}:{},validation:r.validation,diagnostics:r.diagnostics,...a?{evidence:a,scene:Jo(a)}:{},revisions:Ko(e.revision),bundle:Xo(e.component),reasons:n?[]:o,ok:n}}export{se as accessibilityCaveats,ie as auditAccessibility,Ae as auditMobileVisualization,ko as buildNavigationTree,Oo as buildReaderGrounding,Ho as chartGenerationTool,lo as communicativeActForIntent,Ue as configToJSX,Ve as copyConfig,Po as countNodes,Uo as createChartToolHandler,xo as describeChart,Y as diagnoseConfig,qr as evaluateVariantProposal,Ar as explainCapabilityFit,jo as flattenVisible,pe as formatAccessibilityAudit,ke as formatMobileVisualizationAudit,_e as fromConfig,We as fromURL,Ct as inferIntent,Zo as inspectChart,je as mobileVisualizationCaveats,Go as prepareChart,xt as profileData,_r as proposeVariant,Br as repairChartConfig,po as resolveCommunicativeAct,Cr as scoreChart,xr as suggestCharts,Sr as suggestChartsGrouped,jr as suggestDashboard,Nr as suggestStreamCharts,kr as suggestStretchCharts,Ze as summarizeData,_o as toAnthropicTool,He as toConfig,Vo as toOpenAIResponsesTool,qo as toOpenAITool,qe as toURL,d as validateProps};
1
+ import{annotationBudget as e,annotationDrawsConnector as t,annotationStableId as o,annotationType as r,closestMatch as n,filterAnnotationsByStatus as a,isNoteAnnotation as i,parseDateLikeString as s,resolveAccessor as c,resolveRawAccessor as l,resolveResponsiveRules as p,validateArrayData as u,validateNetworkData as y,validateObjectData as m}from"./chunk-chunk-74CCPVXB.module.min.js";var d={BarChart:{required:["data"],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor"],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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"},valueFormat:{type:"function"},centerContent:{type:["object","string","number","function"]},showScaleLabels:{type:"boolean"},backgroundColor:{type:"string"}}},FunnelChart:{required:["data"],dataShape:"array",dataAccessors:["stepAccessor","valueAccessor"],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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"},legendPosition:{type:"string",enum:["right","left","top","bottom"]}}},SwimlaneChart:{required:["subcategoryAccessor"],dataShape:"array",dataAccessors:["categoryAccessor","subcategoryAccessor","valueAccessor"],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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"},legendPosition:{type:"string",enum:["right","left","top","bottom"]}}},LikertChart:{required:[],dataShape:"array",dataAccessors:["categoryAccessor","valueAccessor","levelAccessor","countAccessor"],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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"}}},ConnectedScatterplot:{required:["data"],dataShape:"array",dataAccessors:["xAccessor","yAccessor"],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"array"},fields:{type:"array"}}},MinimapChart:{required:["data"],dataShape:"array",dataAccessors:[],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},frameProps:{type:"object"},onClick:{type:"function"},data:{type:"array"}}},ForceDirectedGraph:{required:["nodes","edges"],dataShape:"network",dataAccessors:["nodeIDAccessor","sourceAccessor","targetAccessor"],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},frameProps:{type:"object"},onClick:{type:"function"},flows:{type:"array"},nodes:{type:"array"},valueAccessor:{type:["string","function"]},lineIdAccessor:{type:["string","function"]},pointRadius:{type:"number"}}},DistanceCartogram:{required:["points"],dataShape:"array",dataAccessors:[],props:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},frameProps:{type:"object"},onClick:{type:"function"},styleRules:{type:"array"},points:{type:"array"},center:{type:"array"},costAccessor:{type:["string","function"]},showRingLabels:{type:"boolean"},cartogramLayout:{type:"string",enum:["radial","strip"]}}},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"]},rerunMS:{type:["number","null"]},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"},rerunMS:{type:["number","null"]},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"},rerunMS:{type:["number","null"]},showChrome:{type:"boolean"},showProjection:{type:"boolean"},showTethers:{type:"boolean"},coreForceMode:{type:"string",enum:["route","net"]},terminalBehavior:{type:"string",enum:["outcome","hold-last"]}}},CrucibleChart:{required:["data","phases"],dataShape:"array",dataAccessors:["idAccessor","labelAccessor","categoryAccessor","amountAccessor","metricsAccessor","initialStateAccessor"],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","string"]},ballRadius:{type:"number"},hoverRadius:{type:"number"},paused:{type:"boolean"},tooltip:{type:["boolean","function","object"]},frameProps:{type:"object"},description:{type:"string"},summary:{type:"string"},phases:{type:"array"},products:{type:"array"},events:{type:"array"},outlets:{type:"array"},idAccessor:{type:["string","function"]},labelAccessor:{type:["string","function"]},categoryAccessor:{type:["string","function"]},amountAccessor:{type:["string","function"]},metricsAccessor:{type:["string","function"]},initialStateAccessor:{type:["string","function"]},metrics:{type:"object"},amountLabel:{type:"string"},conservation:{type:["boolean","object"]},projection:{type:"object"},playback:{type:"string",enum:["replay","snapshot"]},snapshotAt:{type:["number","object"]},controls:{type:["boolean","object"]},playbackRate:{type:"number"},rerunMS:{type:["number","null"]},bodyRadius:{type:"number"},radiusRange:{type:"array"},showBonds:{type:"boolean"},showChrome:{type:"boolean"},showProjection:{type:"boolean"},initialSpawnPacing:{type:"object"},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},onStateChange:{type:"function"},onCrucibleObservation:{type:"function"},onDiagnostic:{type:"function"},onConservation:{type:"function"},onClick:{type:"function"}}},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:{mode:{type:"string",enum:["primary","context","sparkline","mobile"]},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","object"]},tooltip:{type:["boolean","function","object","string"]},annotations:{type:"array"},autoPlaceAnnotations:{type:["boolean","object"]},responsiveRules:{type:"array"},mobileSemantics:{type:"object"},mobileInteraction:{type:["boolean","object"]},axisExtent:{type:"string",enum:["nice","exact"]},animate:{type:["boolean","object"]},loading:{type:"boolean"},loadingContent:{type:["boolean","object"]},emptyContent:{type:["boolean","object"]},hoverHighlight:{type:"boolean"},chartId:{type:"string"},emphasis:{type:"string",enum:["primary","secondary"]},responsiveWidth:{type:"boolean"},responsiveHeight:{type:"boolean"},color:{type:"string"},stroke:{type:"string"},strokeWidth:{type:"number"},opacity:{type:"number"},onObservation:{type:"function"},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 h(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}function g(e,t){const o=[];null!=t&&"object"==typeof t||(t={});const r=d[e];if(!r)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(d).join(", ")}`]};for(const n of r.required)null==t[n]&&o.push(`"${n}" is required for ${e}.`);"array"!==r.dataShape||!Object.prototype.hasOwnProperty.call(r.props,"data")||r.required.includes("data")||function(e,t){return"mechanical"===t.mode&&("GaltonBoardChart"===e||"PhysicsPileChart"===e)}(e,t)||null!=t.data||o.push(`"data" is required for ${e}.`);for(const[e,n]of Object.entries(t)){if(null==n)continue;const t=r.props[e];if(t){if(!h(n,t.type)){const r=Array.isArray(t.type)?t.type.join(" | "):t.type;o.push(`"${e}" should be ${r}, got ${Array.isArray(n)?"array":typeof n}.`);continue}t.enum&&"string"==typeof n&&!t.enum.includes(n)&&o.push(`"${e}" value "${n}" is not valid. Expected one of: ${t.enum.join(", ")}.`)}}const a=Object.keys(r.props),i=new Set(a);for(const r of Object.keys(t))if(void 0!==t[r]&&!i.has(r)){const t=n(r,a),i=t?`Unknown prop "${r}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${r}" for ${e}. Valid props: ${a.join(", ")}.`;o.push(i)}if("array"===r.dataShape){const n=t.data,a={};for(const e of r.dataAccessors){const o=t[e];"string"==typeof o&&(a[e]=o)}const i=u({componentName:e,data:n,accessors:Object.keys(a).length>0?a:void 0});i&&o.push(i)}else if("object"===r.dataShape){const r=m({componentName:e,data:t.data});r&&o.push(r)}else if("network"===r.dataShape){const n=y({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:r.required.includes("nodes"),edgesRequired:r.required.includes("edges")});n&&o.push(n)}return{valid:0===o.length,errors:o}}import{interpolateLab as b}from"d3-interpolate";function f(e,t={}){const o=[],r=e.tokenSemantics,n=e.countStrategy,a=t.maxRecommendedTokens??("fixed-denominator"!==n||function(e){const t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}(e.denominator)>100?80:100);return r||o.push({code:"TOKEN_SEMANTICS_UNCLEAR",severity:"warning",message:"Every tokenized encoding should state what one token represents."}),n||o.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||o.push({code:"ICON_ONLY_LABELS",severity:"warning",message:"Icons should supplement text labels, not replace them."}),null!=t.visibleTokens&&t.visibleTokens>a&&o.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"!==r||"icon"!==e.tokenType&&"glyph"!==e.tokenType||o.push({code:"DECORATIVE_PICTOGRAPHS",severity:"warning",message:"Decorative pictographs can harm recall and speed when they do not clarify the data."}),"unitized-measure"===r&&n&&"unitized"!==n&&o.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"===r&&n&&"fixed-denominator"!==n&&o.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Risk cases are usually clearest as a fixed-denominator natural frequency."}),"possible-outcome"!==r&&"posterior-sample"!==r&&"hypothetical-case"!==r||!n||"quantile"===n||"sample"===n||"posterior-sample"===n||"random-sample"===n||o.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Outcome/sample tokens should come from quantiles or samples, not from a unitized magnitude."}),"unitized-measure"===r&&"unitized"===n&&null==e.unitValue&&null==e.unit&&o.push({code:"MISSING_UNIT_VALUE",severity:"warning",message:"Unitized measures should set unitValue so each token has a declared value."}),"unitized-measure"!==r||"unitized"!==n||e.unitMeaning||o.push({code:"MISSING_UNIT_MEANING",severity:"info",message:"Add unitMeaning so readers know what one full token represents."}),o}function v(e){let t=e.replace(/^#/,"");/^[a-f\d]{3}$/i.test(t)&&(t=t.split("").map(e=>e+e).join(""));const o=t.match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!o)return null;const[r,n,a]=[parseInt(o[1],16)/255,parseInt(o[2],16)/255,parseInt(o[3],16)/255],i=e=>e>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92;return.2126*i(r)+.7152*i(n)+.0722*i(a)}function w(e,t){const o=v(e),r=v(t);return null===o||null===r?null:(Math.max(o,r)+.05)/(Math.min(o,r)+.05)}var C=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),x=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),A=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),k=new Set(["LineChart","AreaChart","StackedAreaChart"]),S=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),j=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),P=new Set(["PieChart","DonutChart"]),$={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},I=new Set(Object.keys($)),R={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},N=new Set(["BigNumber"]),T=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),L=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]),B=new Set(["OrbitDiagram",...L]),E=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart"]),O=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]),F=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),D=new Set(["MultiAxisLineChart"]),M=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),z={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"},H=["xExtent","yExtent","rExtent"];function _(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:null}function G(e,t,o){if("function"==typeof t)return t(e);const r="string"==typeof t?t:o;return e?.[r]}function W(e,t){const o=e.nestedDataAccessorProp?t[e.nestedDataAccessorProp]:void 0;return"string"==typeof o?o:e.defaultNestedDataAccessor}function q(e,t,o){const r=e.dataProp??"data",n=t[r],a=o??(Array.isArray(n)?n:[]),i=W(e,t);if(!i)return{dataProp:r,rows:a};const s=[];let c=!1;for(const e of a){const t=e?.[i];if(Array.isArray(t)){c=!0;for(const e of t)e&&"object"==typeof e&&s.push(e)}}return{dataProp:r,rows:c?s:a}}var U=[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"y",accessor:"yAccessor",defaultAccessor:"y",domain:!0}],V={fields:U},Y=[{...U[0],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates"},{...U[1],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates",allowMissing:!0}],X={fields:Y},K={role:"value",accessor:"valueAccessor",defaultAccessor:"value"},Q={...K,domain:!0},J={fields:[{...K,requirements:["finite","non-negative"]}],aggregates:[{kind:"positive-total",role:"value"}]},Z={fields:[K],aggregates:[{kind:"normalized-total",role:"value",groupAccessor:"categoryAccessor",defaultGroupAccessor:"category",whenProp:"normalize"}]},ee={fields:Y,aggregates:[{kind:"normalized-total",role:"y",groupAccessor:"xAccessor",defaultGroupAccessor:"x",whenProp:"normalize"}]},te={fields:[...U,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},oe={fields:[...U,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},re={fields:[K]},ne={fields:[{...K,dataProp:"edges",requirements:["finite","non-negative"],missingValue:1}]},ae={LineChart:X,AreaChart:X,Scatterplot:oe,ConnectedScatterplot:V,QuadrantChart:oe,MinimapChart:X,BubbleChart:te,StackedAreaChart:ee,DifferenceChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date",domain:!0},{role:"value",accessor:"seriesAAccessor",defaultAccessor:"a"},{role:"value",accessor:"seriesBAccessor",defaultAccessor:"b"}]},CandlestickChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"high",accessor:"highAccessor",defaultAccessor:"high",requirements:["finite"]},{role:"low",accessor:"lowAccessor",defaultAccessor:"low",requirements:["finite"]},{role:"open",accessor:"openAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]},{role:"close",accessor:"closeAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]}]},Heatmap:re,BarChart:{fields:[K]},GroupedBarChart:{fields:[K]},StackedBarChart:Z,DotPlot:{fields:[Q]},Histogram:{fields:[Q]},BoxPlot:{fields:[Q]},SwarmPlot:{fields:[Q,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},ViolinPlot:{fields:[Q]},RidgelinePlot:{fields:[Q]},PieChart:J,DonutChart:J,FunnelChart:J,SankeyDiagram:ne,ChordDiagram:ne,ProportionalSymbolMap:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"lon",dataProp:"points",requirements:["finite"]},{role:"y",accessor:"yAccessor",defaultAccessor:"lat",dataProp:"points",requirements:["finite"]},{role:"size",accessor:"sizeBy",dataProp:"points",requirements:["finite","non-negative"]}]}},ie=Symbol.for("semiotic.numericContractRegistry");function se(e,t){const o={numbers:[],missing:0,nonFinite:0,nonNumeric:0,zero:0,negative:0,fractional:0};for(const r of e){const e=r?.[t];if(null==e||""===e){o.missing++;continue}let n;if("number"==typeof e)n=e;else if("string"==typeof e){const t=e.trim();if(""===t){o.missing++;continue}const r=Number(t);Number.isNaN(r)?/^[+-]?nan$/i.test(t)&&(n=r):n=r}void 0!==n?Number.isFinite(n)?(o.numbers.push(n),0===n&&o.zero++,0>n&&o.negative++,Number.isInteger(n)||o.fractional++):o.nonFinite++:o.nonNumeric++}return o}function ce(e,t){if(0===e.length)return;const o=(e.length-1)*t,r=Math.floor(o),n=Math.ceil(o);if(r===n)return e[r];const a=o-r;return e[r]*(1-a)+e[n]*a}function le(e,t={}){if(!Array.isArray(e)||0===e.length)return{};const o=new Set;for(const t of e)if(t&&"object"==typeof t)for(const e of Object.keys(t))o.add(e);const r={};for(const n of o){const o=se(e,n);let a=1/0,i=-1/0;for(const e of o.numbers)a>e&&(a=e),e>i&&(i=e);const s=!1===t.quantiles?void 0:[...o.numbers].sort((e,t)=>e-t);r[n]={field:n,observedCount:e.length-o.missing,finiteCount:o.numbers.length,missingCount:o.missing,nonFiniteCount:o.nonFinite,nonNumericCount:o.nonNumeric,zeroCount:o.zero,negativeCount:o.negative,fractionalCount:o.fractional,...o.numbers.length>0?{min:a,...s?{q1:ce(s,.25),median:ce(s,.5),q3:ce(s,.75)}:{},max:i}:{}}}return r}function pe(e){const t=[`${e.component}: ${e.ok?"✓ numerically safe":"✗ numeric hazards found"}`,`${e.rowCount} rows · ${e.summary.fieldsChecked} numeric fields · ${e.summary.errors} errors · ${e.summary.warnings} warnings`];for(const o of e.diagnoses)t.push(`${"error"===o.severity?"ERROR":"WARN"} ${o.code}${o.field?` [${o.field}]`:""}: ${o.message}`),o.fix&&t.push(" Fix: "+o.fix);return t.join("\n")}function ue(e){return e.code.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function ye(e,t={}){const o=Number.isFinite(t.max)?Math.max(0,Math.floor(t.max)):6,r=e.diagnoses.map((e,t)=>({item:e,diagnosisIndex:t})).filter(({item:e})=>!t.errorsOnly||"error"===e.severity),n=r.slice(0,o).map(({item:e,diagnosisIndex:t})=>({id:`data-audit:${e.code}:${e.role??"chart"}:${e.field??"chart"}:${t}`,level:e.severity,title:e.field?`${ue(e)} · ${e.field}`:ue(e),message:e.fix?`${e.message} ${e.fix}`:e.message,source:"Semiotic data audit",dismissible:!0}));return r.length>o&&n.push({id:"data-audit:overflow:chart",level:r.slice(o).some(({item:e})=>"error"===e.severity)?"error":"warning",title:`${r.length-o} more numeric finding${r.length-o===1?"":"s"}`,message:"Run auditData() or diagnoseConfig() to inspect the complete report.",source:"Semiotic data audit",dismissible:!0}),n}var me={xAccessor:"x",yAccessor:"y",valueAccessor:"value",sizeBy:"size",sizeAccessor:"size",radiusAccessor:"size",countAccessor:"count",amountAccessor:"value",highAccessor:"high",lowAccessor:"low",openAccessor:"open",closeAccessor:"close",lowerAccessor:"lower",upperAccessor:"upper",positiveAccessor:"value",negativeAccessor:"value",progressAccessor:"value",confidenceAccessor:"value",costAccessor:"value",throughputAccessor:"value"};function de(e,t,o){return"function"==typeof e?e(t,o):t[e]}function he(e,t){if("number"==typeof e)return Number.isFinite(e)?e:null;if(e instanceof Date){const o=e.getTime();return t&&Number.isFinite(o)?o:null}if("string"==typeof e){const o=e.trim(),r=Number(o);if(o&&Number.isFinite(r))return r;if("date-like"===t){const e=s(o);return Number.isFinite(e)?e:null}}return null}function ge(e){return"number"==typeof e&&!Number.isFinite(e)}function be(e,t,o,r,n){const a={field:o,numbers:[],finiteRows:[],missingRows:[],nonFiniteRows:[],nonNumericRows:[],accessorErrorRows:[],zeroRows:[],negativeRows:[],fractionalRows:[]};for(let o=0;e.length>o;o++){let i;try{i=de(t,e[o],o)}catch{a.accessorErrorRows.push(o);continue}if(null==i||""===i){if(void 0!==n){a.numbers.push(n),a.finiteRows.push(o),0===n&&a.zeroRows.push(o),0>n&&a.negativeRows.push(o),Number.isInteger(n)||a.fractionalRows.push(o);continue}a.missingRows.push(o);continue}const s=he(i,r);null!=s?(a.numbers.push(s),a.finiteRows.push(o),0===s&&a.zeroRows.push(o),0>s&&a.negativeRows.push(o),Number.isInteger(s)||a.fractionalRows.push(o)):ge(i)?a.nonFiniteRows.push(o):a.nonNumericRows.push(o)}return a}function fe(e,t){if(0===e.length)return;const o=(e.length-1)*t,r=Math.floor(o),n=Math.ceil(o);if(r===n)return e[r];const a=o-r;return e[r]*(1-a)+e[n]*a}function ve(e,t){const o=new Set(e.requirements??["finite"]);return o.add("finite"),("x"===e.role&&"log"===t.xScaleType||"y"===e.role&&"log"===t.yScaleType)&&o.add("positive"),[...o]}function we(e){return e.slice(0,5)}function Ce(e){return{domain:"data",...e}}function xe(e,t){const o=[],{observation:r,contract:n,accessorLabel:a,requirements:i}=e,s={field:a,role:n.role},c=[...r.nonFiniteRows,...r.nonNumericRows,...r.accessorErrorRows].sort((e,t)=>e-t);if(0===r.numbers.length)return o.push(Ce({severity:"error",code:"DEGENERATE_EXTENT",message:`${n.accessor}="${a}" produces no finite numeric values; the chart cannot resolve its ${n.role} input.`,fix:`Ensure ${a} contains finite numbers${"x"===n.role?" (or valid dates for a time scale)":""}.`,...s,...c.length>0?{rows:we(c),count:c.length}:{}})),o;r.nonFiniteRows.length>0&&o.push(Ce({severity:"error",code:"NON_FINITE_VALUE",message:`${a} contains ${r.nonFiniteRows.length} NaN or infinite value${1===r.nonFiniteRows.length?"":"s"}; scale and layout math require finite numbers.`,fix:`Filter or replace NaN/Infinity in ${a} before rendering.`,...s,rows:we(r.nonFiniteRows),count:r.nonFiniteRows.length})),!n.allowMissing&&r.missingRows.length>0&&o.push(Ce({severity:"error",code:"MISSING_NUMERIC_VALUE",message:`${a} is missing for ${r.missingRows.length} row${1===r.missingRows.length?"":"s"}; the ${n.role} role requires an explicit numeric value.`,fix:`Fill or filter missing ${a} values before rendering.`,...s,rows:we(r.missingRows),count:r.missingRows.length}));const l=[...r.nonNumericRows,...r.accessorErrorRows].sort((e,t)=>e-t);if(l.length>0&&o.push(Ce({severity:"error",code:"NON_NUMERIC_VALUE",message:`${a} produces ${l.length} non-numeric value${1===l.length?"":"s"} for the ${n.role} role.`,fix:`Bind ${n.accessor} to a numeric field or return finite numbers from the accessor.`,...s,rows:we(l),count:l.length})),n.domain&&r.numbers.length>=2){const[e,t]=function(e){let t=1/0,o=-1/0;for(const r of e)t>r&&(t=r),r>o&&(o=r);return[t,o]}(r.numbers);e===t&&o.push(Ce({severity:"warning",code:"ZERO_SPAN_DOMAIN",message:`${a} is constant at ${e}; its ${n.role} scale has a zero-span data domain.`,fix:`Provide varying ${n.role} values, set an explicit extent around ${e}, or use a single-value display.`,...s,rows:we(r.finiteRows),count:r.finiteRows.length}))}if(i.includes("positive")){const t=r.numbers.map((e,t)=>({number:e,row:r.finiteRows[t]})).filter(({number:e})=>0>=e).map(({row:e})=>e);if(t.length>0){const r=e.logScale;o.push(Ce({severity:"error",code:r?"LOG_NON_POSITIVE":"NON_POSITIVE_VALUE",message:`${a} contains ${t.length} non-positive value${1===t.length?"":"s"}, which ${r?"cannot be represented on a log scale":"violate the positive-value contract"}.`,fix:r?"Remove or transform values ≤ 0, or use a linear/symlog scale.":"Provide values greater than zero.",...s,rows:we(t),count:t.length}))}}if(i.includes("non-negative")&&r.negativeRows.length>0&&o.push(Ce({severity:"error",code:"size"===n.role?"NEGATIVE_SIZE":"NEGATIVE_VALUE",message:`${a} contains ${r.negativeRows.length} negative ${n.role} value${1===r.negativeRows.length?"":"s"}; the chart maps this role to non-negative geometry.`,fix:"Use a non-negative measure, clamp intentionally, or encode sign with position/color instead.",...s,rows:we(r.negativeRows),count:r.negativeRows.length})),i.includes("integer")){const e=[...new Set([...r.negativeRows,...r.zeroRows,...r.fractionalRows])].sort((e,t)=>e-t);e.length>0&&o.push(Ce({severity:"error",code:"INVALID_COUNT",message:`${a} contains ${e.length} value${1===e.length?"":"s"} that are not positive integers.`,fix:"Counts must be integers ≥ 1; aggregate, round intentionally, or use a continuous-value encoding.",...s,rows:we(e),count:e.length}))}if(i.includes("unit-interval")){const e=r.numbers.map((e,t)=>({number:e,row:r.finiteRows[t]})).filter(({number:e})=>0>e||e>1).map(({row:e})=>e);e.length>0&&o.push(Ce({severity:"error",code:"OUTSIDE_UNIT_INTERVAL",message:`${a} contains ${e.length} value${1===e.length?"":"s"} outside [0, 1].`,fix:`Normalize ${a} to [0, 1] before using it as ${n.role}.`,...s,rows:we(e),count:e.length}))}if(t&&n.domain){const t=function(e){const t=e.observation.numbers.map((t,o)=>({value:t,row:e.observation.finiteRows[o]})).sort((e,t)=>e.value-t.value);if(8>t.length)return[];const o=t.map(e=>e.value),r=fe(o,.25),n=fe(o,.75),a=fe(o,.5),i=n-r;if(i>0){const e=r-10*i,o=n+10*i;return t.filter(t=>e>t.value||t.value>o).map(e=>e.row)}const s=100*Math.max(1,Math.abs(a));return t.filter(e=>Math.abs(e.value-a)>s).map(e=>e.row)}(e);t.length>0&&o.push(Ce({severity:"warning",code:"OUTLIER_DOMINATED_DOMAIN",message:`${a} has ${t.length} extreme value${1===t.length?"":"s"} beyond the 10×IQR guardrail; the main distribution may collapse visually.`,fix:"Verify the extreme values, then consider a log scale, robust extent, inset, or explicit annotation rather than silently clipping them.",...s,rows:we(t),count:t.length}))}return o}function Ae(e,t,o){if(!e)return"__all__";try{return de(e,t,o)+""}catch{return"__accessor_error__"}}function ke(e,t,o){if(e.whenProp&&!0!==o[e.whenProp])return[];const r=t.find(t=>t.contract.role===e.role);if(!r||0===r.observation.numbers.length)return[];const n=e.groupAccessor?o[e.groupAccessor]:void 0,a="string"==typeof n||"function"==typeof n?n:e.defaultGroupAccessor,i=new Map;for(let e=0;r.rows.length>e;e++){let t;try{t=de(r.accessor,r.rows[e],e)}catch{continue}const o=he(t,void 0);if(null==o)continue;const n=Ae(a,r.rows[e],e),s=i.get(n)??{sum:0,magnitude:0,positive:!1,negative:!1,rows:[],negativeRows:[]};s.sum+=o,s.magnitude+=Math.abs(o),s.positive||(s.positive=o>0),s.negative||(s.negative=0>o),s.rows.push(e),0>o&&s.negativeRows.push(e),i.set(n,s)}const s=[],c=[],l=[],p=[],u=[],y=[];for(const[t,o]of i)("positive-total"===e.kind&&0>=o.sum||"normalized-total"===e.kind&&Number.EPSILON*Math.max(1,o.magnitude)*10>=Math.abs(o.sum))&&(s.push(t),p.push(...o.rows)),"normalized-total"===e.kind&&o.positive&&o.negative&&(c.push(t),u.push(...o.rows)),"normalized-total"===e.kind&&o.negative&&(l.push(t),y.push(...o.negativeRows));const m=[];return s.length>0&&m.push(Ce({severity:"error",code:"normalized-total"===e.kind?"ZERO_NORMALIZED_TOTAL":"NON_POSITIVE_TOTAL",message:"normalized-total"===e.kind?`${s.length} normalization group${1===s.length?" has":"s have"} a zero total, so division would be undefined.`:"The part-to-whole total is not positive, so meaningful shares cannot be computed.",fix:"normalized-total"===e.kind?"Remove empty/zero-sum groups or disable normalization.":"Provide at least one positive value and ensure the total is greater than zero.",field:r.accessorLabel,role:e.role,rows:we([...new Set(p)].sort((e,t)=>e-t)),count:s.length})),l.length>0&&m.push(Ce({severity:"error",code:"NEGATIVE_NORMALIZED_VALUE",message:`${l.length} normalization group${1===l.length?" contains":"s contain"} negative contributions, so conventional percentage shares are not defined.`,fix:"Use non-negative contributions, a diverging stack, or disable normalization.",field:r.accessorLabel,role:e.role,rows:we([...new Set(y)].sort((e,t)=>e-t)),count:y.length})),c.length>0&&m.push(Ce({severity:"warning",code:"MIXED_SIGN_NORMALIZATION",message:`${c.length} normalization group${1===c.length?" mixes":"s mix"} positive and negative contributions; percentage shares may be unstable or misleading.`,fix:"Separate positive and negative contributions, use diverging stacks, or disable normalization.",field:r.accessorLabel,role:e.role,rows:we([...new Set(u)].sort((e,t)=>e-t)),count:c.length})),m}function Se(e,t,o,r={}){const n=r.contracts??function(e){return function(){const e=globalThis;return e[ie]??(e[ie]={contracts:new Map}),e[ie]}().contracts.get(e)??ae[e]}(e)??function(e){const t=[];for(const[o,r]of Object.entries(me))"string"!=typeof e[o]&&"function"!=typeof e[o]||t.push({role:r,accessor:o,..."size"===r?{requirements:["finite","non-negative"]}:{},..."x"===r||"y"===r?{domain:!0}:{}});return t.length>0?{fields:t}:void 0}(t);if(!n)return{component:e,ok:!0,rowCount:o?.length??(Array.isArray(t.data)?t.data.length:0),summary:{fieldsChecked:0,errors:0,warnings:0},contracts:[],diagnoses:[]};const a=function(e,t,o){const r=[],n=new Set;for(const a of e.fields){if(a.whenProps?.some(e=>null==t[e]))continue;const e=t[a.accessor],i="string"==typeof e||"function"==typeof e?e:a.defaultAccessor;if("string"!=typeof i&&"function"!=typeof i)continue;const{dataProp:s,rows:c}=q(a,t,o);if(0===c.length)continue;const l="string"==typeof i?i:a.accessor+"()",p=`${s}:${a.role}:${l}`;if(n.has(p))continue;n.add(p);const u=a.temporalValues??("time"===a.role||"x"===a.role&&"time"===t.xScaleType?"date-like":void 0),y="x"===a.role&&"log"===t.xScaleType||"y"===a.role&&"log"===t.yScaleType,m=ve(a,t);r.push({contract:a,accessor:i,accessorLabel:l,dataProp:s,rows:c,requirements:m,logScale:y,observation:be(c,i,l,u,a.missingValue)})}return r}(n,t,o),i=[],s=!1!==r.checkOutliers;for(const e of function(e,t,o){const r=new Set;for(const n of e.fields){const e=n.dataProp??"data",a=o??t[e];if(!Array.isArray(a))continue;if(0===a.length){r.add(e);continue}const i=W(n,t);if(!i)continue;const s=a.map(e=>e?.[i]).filter(Array.isArray);s.length>0&&s.every(e=>0===e.length)&&r.add(`${e}.${i}`)}return[...r]}(n,t,o))i.push(Ce({severity:"error",code:"EMPTY_DATA",message:e+" is an explicitly empty array; there are no numeric inputs to render.",fix:`Provide at least one valid row, render an intentional empty state, or omit ${e} when using the ref push API.`,count:0,rows:[]}));const c=new Set(a.filter(e=>e.contract.domain&&1===e.rows.length).map(e=>e.dataProp));for(const e of c)i.push(Ce({severity:"warning",code:"SINGLE_ROW_DOMAIN",message:e+" has one row; a quantitative scale cannot establish variation from a single observation.",fix:"Provide at least two observations or use a single-value display such as BigNumber.",count:1,rows:[0]}));for(const e of a)i.push(...xe(e,s));for(const e of n.aggregates??[])i.push(...ke(e,a,t));const l=i.filter(e=>"error"===e.severity).length,p=i.length-l;return{component:e,ok:0===l,rowCount:a.reduce((e,t)=>Math.max(e,t.rows.length),o?.length??(Array.isArray(t.data)?t.data.length:0)),summary:{fieldsChecked:a.length,errors:l,warnings:p},contracts:a.map(e=>({role:e.contract.role,accessor:e.accessorLabel,dataProp:e.dataProp,requirements:e.requirements,allowMissing:!0===e.contract.allowMissing,...void 0!==e.contract.missingValue?{missingValue:e.contract.missingValue}:{},domain:!0===e.contract.domain})),diagnoses:i}}var je=new Set(["category10","tableau10","set3","blues","reds","greens","oranges","purples","greys","viridis","plasma","inferno","magma","cividis","turbo"]),Pe=["xAccessor","yAccessor","timeAccessor","valueAccessor","categoryAccessor","colorBy","sizeBy","lineBy","areaBy","stackBy","groupBy","orderAccessor","y0Accessor","sourceAccessor","targetAccessor","nodeIDAccessor","childrenAccessor","costAccessor"];function $e(e){return"object"==typeof e&&null!==e&&("tokenType"in e||"tokenSemantics"in e||"countStrategy"in e||"unitValue"in e||"unit"in e)}function Ie(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:void 0}function Re(e,t){const o=Ie(e.visibleTokens);if(null!=o)return o;const r=Ie(t.denominator);if("fixed-denominator"===t.countStrategy&&null!=r)return r;const n=Ie(t.tokenCount),a=Ie(t.maxTokens);return null!=n&&null!=a?Math.min(n,a):n??r??a}function Ne(n,a){const s=[],c=g(n,function(e){const t={...e};return delete t.tokenEncoding,delete t.visibleTokens,$e(t.encoding)&&delete t.encoding,t}(a));for(const e of c.errors)s.push({severity:"error",code:"VALIDATION",message:e,fix:""});if(!d[n])return{ok:0===s.length,diagnoses:s};!function(e,t,o){const r=d[e];if(r){if("array"===r.dataShape){const e=t.data;e&&Array.isArray(e)&&0===e.length&&o.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"===r.dataShape&&t.edges&&Array.isArray(t.edges)&&0===t.edges.length&&o.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" }]}.'})}}(n,a,s),function(e,t,o){const r=t.width,n=t.height;if(void 0===r||"number"==typeof r&&r>0||o.push({severity:"error",code:"BAD_WIDTH",message:`width=${JSON.stringify(r)} — chart needs a positive number.`,fix:"Set width={600} or use responsiveWidth={true}."}),void 0===n||"number"==typeof n&&n>0||o.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,r]=t.size;(null!=e&&0>=e||null!=r&&0>=r)&&o.push({severity:"error",code:"BAD_SIZE",message:`size=[${e}, ${r}] — both dimensions must be positive.`,fix:"Set size={[600, 400]}."})}}(0,a,s),function(e,t,o){const r=d[e];if(!r||"array"!==r.dataShape)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=n[0];if(!a||"object"!=typeof a)return;const i=Object.keys(a);for(const e of r.dataAccessors){const r=t[e];"string"==typeof r&&(r in a||o.push({severity:"error",code:"ACCESSOR_MISSING",message:`${e}="${r}" not found in data. Available fields: ${i.join(", ")}.`,fix:`Change ${e} to one of: ${i.map(e=>`"${e}"`).join(", ")}.`}))}}(n,a,s),function(e,t,o){C.has(e)&&Array.isArray(t.data)&&o.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.'})}(n,a,s),function(e,t,o){x.has(e)&&(t.edges||t.data||o.push({severity:"error",code:"NETWORK_NO_EDGES",message:e+" requires an edges prop.",fix:'Provide edges={[{ source: "A", target: "B", value: 10 }]}.'}))}(n,a,s),function(e,t,o){const r=d[e];if(!r||"array"!==r.dataShape)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=n[0];if(!a||"object"!=typeof a)return;const i=t.xAccessor;"string"==typeof i&&a[i]instanceof Date&&!t.xFormat&&o.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."})}(n,a,s),function(e,t,o){t.linkedHover&&!t.selection&&o.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,a,s),function(e,t,o){if(!A.has(e))return;const r=t.rExtent||t.yExtent||t.valueExtent;r&&Array.isArray(r)&&r.length>=1&&null!=r[0]&&0!==r[0]&&o.push({severity:"warning",code:"NON_ZERO_BASELINE",message:`${e} has a non-zero baseline (${r[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, ${r[1]??"auto"}]}. For trend-focused charts, use LineChart instead.`})}(n,a,s),function(e,t,o){if(!k.has(e))return;if(t.gapStrategy)return;const r=t.data;if(!r||!Array.isArray(r)||0===r.length)return;const n=t.yAccessor||"y";"string"==typeof n&&r.some(e=>{const t=e[n];return null==t||Number.isNaN(t)})&&o.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.'})}(n,a,s),function(e,t,o){const r=t.width??600,n=t.height??400,a=t.margin;if(!a||"object"!=typeof a)return;const i=(a.left||0)+(a.right||0),s=(a.top||0)+(a.bottom||0);r>i||o.push({severity:"error",code:"MARGIN_OVERFLOW_H",message:`Horizontal margins (${i}px) >= width (${r}px) — no drawing area left.`,fix:"Reduce margin.left/right or increase width."}),n>s||o.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,a,s);const l=Se(n,a,void 0,{checkOutliers:!1}).diagnoses;for(const e of l)"EMPTY_DATA"===e.code&&s.some(e=>"EMPTY_DATA"===e.code||"EMPTY_EDGES"===e.code)||s.push(e);return function(e,t,o){if(!S.has(e))return;const r=t.barPadding;"number"==typeof r&&10>r&&o.push({severity:"warning",code:"BAR_PADDING_INVISIBLE",message:`barPadding=${r} 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}."})}(n,a,s),function(e,t,o){if("bottom"!==t.legendPosition)return;const r=t.margin;if(!r||"object"!=typeof r)return;const n=r.bottom;"number"==typeof n&&70>n&&o.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,a,s),function(e,t,o){if(!t.showLegend)return;if("right"!==(t.legendPosition??"right"))return;const r=t.margin;if(!r||"object"!=typeof r)return;const n=r.right;"number"==typeof n&&100>n&&o.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,a,s),function(e,t,o){if("Heatmap"!==e)return;const r=t.data;if(!r||!Array.isArray(r)||0===r.length)return;const n=r[0];if(n&&"object"==typeof n)for(const e of["xAccessor","yAccessor"]){const r=t[e];if("string"!=typeof r)continue;const a=n[r];"string"==typeof a&&o.push({severity:"warning",code:"HEATMAP_STRING_ACCESSOR",message:`${e}="${r}" resolves to string values (e.g. "${a}"). 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."})}}(n,a,s),function(e,t,o){const r=t.colorScheme;if(!r||!Array.isArray(r))return;const n="string"==typeof t.background?t.background:"#ffffff";if(!n.startsWith("#"))return;const a=[];for(const e of r){if("string"!=typeof e||!e.startsWith("#"))continue;const t=w(e,n);null!==t&&3>t&&a.push(`${e} (${t.toFixed(1)}:1)`)}a.length>0&&o.push({severity:"warning",code:"LOW_COLOR_CONTRAST",message:`${a.length} color(s) in colorScheme have < 3:1 contrast against background "${n}": ${a.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,a,s),function(e,t,o){const r=t.colorScheme;if(!r||!Array.isArray(r)||2>r.length)return;const n=r.filter(e=>"string"==typeof e&&e.startsWith("#"));if(2>n.length)return;const a=[];for(let e=0;n.length-1>e;e++){const t=w(n[e],n[e+1]);null!==t&&1.5>t&&a.push(`${n[e]} / ${n[e+1]} (${t.toFixed(1)}:1)`)}a.length>0&&o.push({severity:"warning",code:"LOW_ADJACENT_CONTRAST",message:`${a.length} adjacent color pair(s) in colorScheme have very similar luminance: ${a.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,a,s),function(e,t,o){const r=t.colorScheme;if("string"!=typeof r)return;const n=d[e];n?.props?.colorScheme?.enum||je.has(r)||o.push({severity:"warning",code:"UNKNOWN_COLOR_SCHEME",message:`colorScheme "${r}" is not a recognized named scheme — the chart will fall back to the default palette.`,fix:`Use a known scheme name (${[...je].join(", ")}) or pass an explicit color array, e.g. colorScheme={["#1f77b4", "#ff7f0e"]}.`})}(n,a,s),function(e,t,o){const r=d[e]?.props,n=e=>!!r?.[e]&&"string"==typeof t[e]&&t[e].trim().length>0,a=n("title"),i=n("description"),s=n("summary");a||i||s||o.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.'})}(n,a,s),function(e,t,o){const r=[];for(const e of Pe)"function"==typeof t[e]&&r.push(e);r.length>0&&o.push({severity:"warning",code:"FUNCTION_ACCESSOR",message:`Function accessor${r.length>1?"s":""} detected: ${r.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,a,s),function(e,t,o){const r=t.hoverRadius;"number"==typeof r&&r>0&&24>r&&!1!==t.enableHover&&(!1!==t.hoverAnnotation||t.tooltip||t.customHoverBehavior||t.customClickBehavior||t.onClick)&&o.push({severity:"warning",code:"TOUCH_TARGET_SMALL",message:`hoverRadius=${r}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,a,s),function(e,t,o){!0===t.responsiveWidth&&!0===t.responsiveHeight&&o.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,a,s),function(e,t,o){if(!0!==t.showParticles)return;const r=t.particleStyle&&"object"==typeof t.particleStyle?t.particleStyle:{},n="number"==typeof r.maxPerLine?r.maxPerLine:void 0,a="number"==typeof r.spawnRate?r.spawnRate:void 0;("number"==typeof n&&n>20||"number"==typeof a&&a>.08)&&o.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,a,s),function(e,t,o){const r=[];$e(t.tokenEncoding)&&r.push({source:"tokenEncoding",encoding:t.tokenEncoding}),$e(t.encoding)&&r.push({source:"encoding",encoding:t.encoding});for(const{source:e,encoding:n}of r){const r=Re(t,n);for(const t of f(n,{visibleTokens:r}))o.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,a,s),function(e,o,n){const a=Array.isArray(o.annotations)?o.annotations:null;if(a)for(const e of a){if(!e||"object"!=typeof e)continue;const o=r(e);if(!i(e)||"widget"===o)continue;const a=Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0),s="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:o,c=t(e);!c&&a>120?n.push({severity:"warning",code:"ANNOTATION_FAR_NO_CONNECTOR",message:`Annotation "${s}" 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).'}):c&&a>250&&n.push({severity:"warning",code:"ANNOTATION_LONG_CONNECTOR",message:`Annotation "${s}" 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,a,s),function(t,o,r){const n=Array.isArray(o.annotations)?o.annotations:null;if(!n)return;const a=n.filter(i).length;if(0===a)return;const s="number"==typeof o.width?o.width:600,c="number"==typeof o.height?o.height:400,l=e(s,c);Number.isFinite(l)&&a>l&&r.push({severity:"warning",code:"ANNOTATION_DENSITY",message:`${a} note annotations on a ${s}×${c} chart exceed the ~${l} 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,a,s),function(e,t,n){const a=Array.isArray(t.annotations)?t.annotations:null;if(a)for(const e of a)e&&"object"==typeof e&&"widget"===r(e)&&null!=e.content&&!o(e)&&n.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,a,s),function(e,t,o){for(const e of H){const r=t[e];if(!Array.isArray(r)||2>r.length)continue;const[n,a]=r;"number"==typeof n&&"number"==typeof a&&n>a&&o.push({severity:"warning",code:"INVERTED_AXIS",message:`${e}=[${n}, ${a}] 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}={[${a}, ${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,a,s),function(e,t,o){if("MultiAxisLineChart"!==e)return;const r=t.series;if(!Array.isArray(r)||2!==r.length)return;const n=r.filter(e=>!e||"object"!=typeof e||"string"!=typeof e.label||0===e.label.trim().length);n.length>0&&o.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.'})}(n,a,s),function(e,t,o){if(!k.has(e))return;const r=t.xExtent;if(!Array.isArray(r)||2>r.length)return;const[n,a]=r;if("number"!=typeof n||"number"!=typeof a||n>=a)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(a,l)-Math.max(n,c))/p;.7>u&&o.push({severity:"warning",code:"CHERRY_PICKED_WINDOW",message:`xExtent=[${n}, ${a}] 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.'})}(n,a,s),s.some(e=>"NEGATIVE_VALUE"===e.code||"NEGATIVE_NORMALIZED_VALUE"===e.code)||function(e,t,o){const r=$[e],n=R[e];if(!r&&!n)return;if(n&&!t.normalize)return;const a=r??n,i=t[a],s="string"==typeof i?i:"yAccessor"===a?"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&&o.push({severity:r?"error":"warning",code:"PART_TO_WHOLE_NEGATIVE",message:`${l.length} negative value(s) in "${s}" — a part-to-whole encoding cannot represent negative parts${r?"; slice angles/areas for negatives are meaningless":"; normalized shares distort when parts are negative"}.`,fix:r?"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."})}(n,a,s),function(e,t,o){j.has(e)&&"basis"===t.curve&&o.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.'})}(n,a,s),function(e,t,o){if("LineChart"!==e&&"AreaChart"!==e)return;if("sparkline"===t.mode)return;if(t.responsiveWidth||t.responsiveHeight)return;const r="number"==typeof t.width?t.width:600,n="number"==typeof t.height?t.height:400;if(0>=r||0>=n)return;const a=r/n;if(a>8||.25>a){const e=a>8?"flattens":"exaggerates";o.push({severity:"warning",code:"EXTREME_ASPECT_RATIO",message:`${r}×${n} (${a.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:a>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."})}}(n,a,s),function(e,t,o){if(!P.has(e))return;const r=t.data;if(!r||!Array.isArray(r)||0===r.length)return;const n=t.categoryAccessor,a="string"==typeof n?n:"category",i=new Set;for(const e of r){const t=e?.[a];null!=t&&i.add(t)}i.size>8&&o.push({severity:"warning",code:"PIE_TOO_MANY_SLICES",message:i.size+" slices — angle judgments degrade rapidly past ~8 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.`})}(n,a,s),function(e,t,o){if(O.has(e)){if("GaltonBoardChart"===e){const e=t.bins;"number"==typeof e&&2>e&&o.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 r=_(t.branchProbability);null!=t.branchProbability&&(null==r||0>r||r>1)&&o.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=_(t.mechanicalCount);null==t.mechanicalCount||null!=n&&n>0||o.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,r=e&&"object"==typeof e?_(e.size):null;null==r||r>0||o.push({severity:"error",code:"PHYSICS_BAD_WINDOW_SIZE",message:`windows.size=${r} 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||o.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",r=t.arrivalAccessor||"arrivalTime";n.some(t=>{const o=_(G(t,e,"time")),n=_(G(t,r,"arrivalTime"));return null!=o&&null!=n&&o!==n})||o.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=_(t.mechanicalCount);null==t.mechanicalCount||null!=e&&e>0||o.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&&o.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 r=_(t.unitValue??1)??1;if(0>=r)return void o.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",a=(Array.isArray(t.data)?t.data:[]).reduce((e,t)=>{const o=_(G(t,n,"value"))??0;return e+Math.max(0,Math.round(o/r))},0);a>1500&&o.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`PhysicsPileChart would create about ${a} 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((_(t.pointRadius??5)??5)>0||o.push({severity:"error",code:"PHYSICS_BAD_POINT_RADIUS",message:`pointRadius=${t.pointRadius} cannot produce collision bodies.`,fix:"Use a positive pointRadius, for example 5."}),(_(t.collisionIterations??6)??6)>0||o.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:[],r=_(e[0]),n=_(e[1]);(2>e.length||null==r||null==n)&&o.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&&o.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 r=t.groupAccessor;if(e.length>0&&r){const t=new Set;for(const o of e){const e=G(o,r,"group");null!=e&&t.add(e)}t.size>12&&o.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)&&o.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&&"CrucibleChart"!==e||!1!==t.showProjection||o.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)o.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())&&o.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 r=e.filter(e=>e?.absorb).length;t.groupBy&&0===r&&o.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)||o.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 [].'})),"CrucibleChart"===e){const e=Array.isArray(t.phases)?t.phases:[],r=Array.isArray(t.products)?t.products:[],n=Array.isArray(t.events)?t.events:[],a=Array.isArray(t.outlets)?t.outlets:[];0===e.length?o.push({severity:"error",code:"CRUCIBLE_MISSING_PHASES",message:"CrucibleChart requires an authored, non-empty phases array; a treatment program cannot be inferred from flat data.",fix:'Provide phases={[{ id: "charge", label: "Charge", duration: 1, motion: "charge" }]}.'}):e.some(e=>!e||null==e.id||""===(e.id+"").trim()||null==_(e.duration)||0>=Number(e.duration))&&o.push({severity:"error",code:"CRUCIBLE_BAD_PHASE",message:"Every CrucibleChart phase needs a stable id and a positive finite duration.",fix:'Use phases like { id: "assay", label: "Assay", duration: 2, motion: "mix" }.'}),0===r.length&&o.push({severity:"warning",code:"CRUCIBLE_NO_PRODUCTS",message:"CrucibleChart has no declared product molds. Products are never discovered from collisions or source fields.",fix:'Declare products={[{ id: "accepted", label: "Accepted", outletId: "product" }]} when the treatment forms an output.'}),0===n.length&&o.push({severity:"warning",code:"CRUCIBLE_NO_EVENTS",message:"CrucibleChart has no authored events, so its phases cannot transform, combine, split, or route the charge.",fix:"Supply an explicit events array; do not ask the chart or an AI layer to infer a treatment from the rows."}),Array.isArray(t.outlets)||o.push({severity:"warning",code:"CRUCIBLE_IMPLICIT_OUTLETS",message:"CrucibleChart is using generic default outlets rather than domain-specific destinations.",fix:"Provide reason-labelled outlets and reference their ids from products, complete-product, and eject effects."});const i=new Set(r.map(e=>e?.id).filter(e=>null!=e).map(String)),s=new Set(["product","retained","residue","failed","recovered",...a.map(e=>e?.id).filter(e=>null!=e).map(String)]),c=new Set,l=new Set;for(const e of n)if(e&&Array.isArray(e.effects))for(const t of e.effects){if(!t||"object"!=typeof t)continue;const e=t.type;if("combine"!==e&&"contribute"!==e&&"complete-product"!==e||null==t.productId||i.has(t.productId+"")||c.add(t.productId+""),"split"===e&&Array.isArray(t.products))for(const e of t.products)null==e?.productId||i.has(e.productId+"")||c.add(e.productId+"");null==t.outletId||s.has(t.outletId+"")||l.add(t.outletId+"")}c.size>0&&o.push({severity:"error",code:"CRUCIBLE_UNKNOWN_PRODUCT",message:`CrucibleChart events reference undeclared product molds: ${[...c].sort().join(", ")}.`,fix:"Declare every referenced product id in products; do not create product definitions implicitly inside events."}),l.size>0&&o.push({severity:"error",code:"CRUCIBLE_UNKNOWN_OUTLET",message:`CrucibleChart events reference undeclared outlets: ${[...l].sort().join(", ")}.`,fix:"Declare every domain outlet in outlets and reuse its stable id in authored effects."});const p=_(t.playbackRate);null==t.playbackRate||null!=p&&p>0||o.push({severity:"error",code:"CRUCIBLE_BAD_PLAYBACK_RATE",message:`playbackRate=${t.playbackRate+""} cannot advance the authored CrucibleChart tape.`,fix:"Use a positive playbackRate such as 0.5 for half speed or 2 for double speed."});const u=_(t.rerunMS);null==t.rerunMS||null!=u&&u>=0||o.push({severity:"error",code:"CRUCIBLE_BAD_RERUN_MS",message:`rerunMS=${t.rerunMS+""} must be a finite non-negative delay or null.`,fix:"Use rerunMS={3000}, rerunMS={0}, or omit the prop for a single run."})}if("PhysicsPileChart"===e||"GaltonBoardChart"===e||"CollisionSwarmChart"===e||"ProcessFlowChart"===e||"EventDropChart"===e||"CrucibleChart"===e){const r=Array.isArray(t.data)?t.data:[],n=_(t.mechanicalCount)??0,a=r.length>0?r.length*("PhysicsPileChart"===e?Math.max(1,(_(t.unitValue),1)):1):n;a>2500&&o.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`${e} may spawn ~${Math.round(a)} 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."})}}}(n,a,s),{ok:s.every(e=>"warning"===e.severity),diagnoses:s}}var Te=["title","description","summary"];function Le(e){return"string"==typeof e&&e.trim().length>0}function Be(e,t=new Set){if(null===e)return!0;const o=typeof e;if("string"===o||"boolean"===o)return!0;if("number"===o)return Number.isFinite(e);if("object"!==o)return!1;if(t.has(e))return!1;t.add(e);const r=Array.isArray(e)?e.every(e=>Be(e,t)):Object.entries(e).every(([,e])=>Be(e,t));return t.delete(e),r}var Ee=Symbol.for("semiotic.chartRecipeRegistry");function Oe(){const e=globalThis;return e[Ee]||(e[Ee]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[Ee]}function Fe(e){return Oe().recipes.get(e)}function De(e){return"string"==typeof e?Fe(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}var Me=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]);function ze(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 He(e){const t=e.toLowerCase().replace(/[^a-z]/g,"");if(!t)return 0;if(3>=t.length)return 1;const o=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"").replace(/^y/,"").match(/[aeiouy]{1,2}/g);return o?o.length:1}function _e(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function Ge(e,o,n={}){const a=[],s=Fe(e),c=L.has(e),l=!!d[e]||!!s||c,p=!0===n.inChartContainer,u=!0===n.describe,y=!0===n.navigable,m=N.has(e),h=C.has(e),{hasTitle:g,hasDescription:b,hasSummary:f,unsupportedFinding:v}=function(e,t){const o=d[e]?.props,r=e=>!!o?.[e],n=Te.filter(e=>Le(t[e])&&!r(e));return{hasTitle:r("title")&&Le(t.title),hasDescription:r("description")&&Le(t.description),hasSummary:r("summary")&&Le(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,o),x=!1!==o.accessibleTable&&!m,A=g||b||f,k=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(o),S=function(e){const t=_e(e),o=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===o.pause||"function"==typeof o.pause}(o),j=c,P=function(e){const t=_e(e);return!0===e.settledProjection||!0===t.settledProjection}(o)||E.has(e)&&x,$=function(e){const t=_e(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(o)||j,R=Array.isArray(o.annotations)?o.annotations.filter(e=>!!e&&"object"==typeof e):[],O=l?"pass":"manual",H=l?"":` (unrecognized component "${e}" — verify manually that the built-in applies)`;if(v&&a.push(v),a.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},o=e.colorScheme,r="string"==typeof e.background?e.background:null;if(r&&!r.startsWith("#"))return{...t,status:"manual",message:`Background "${r}" 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=r??"#ffffff";if(!Array.isArray(o))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 a=[];let i=0;for(const e of o){if("string"!=typeof e||!e.startsWith("#"))continue;const t=w(e,n);null!=t&&(i++,3>t&&a.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."}:a.length>0?{...t,status:"fail",message:`${a.length} color(s) fall below 3:1 contrast vs ${n}: ${a.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}.`}}(o)),a.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...m?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:x?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:b&&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!=o.pulse||B.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!=o.colorBy){a.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...!0===o.directLabel||!0===o.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(o.colorScheme)?o.colorScheme:null,t=e?e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase()):[],r=t.length>0&&t.every(e=>Me.has(e));a.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...r?{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=R.filter(i);if(e.length>0){const n=o.autoPlaceAnnotations,i="object"==typeof n&&null!==n&&!0===n.redundantCues,s=e.filter(e=>{if("string"!=typeof e.color)return!1;const o=r(e),n=i&&"text"===o;return!(t(e)||n)});a.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===s.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:`${s.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,...l?{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==o.brush&&null==o.onBrush||e.push("brushing"),!0===o.zoomable&&e.push("zoom/pan"),"isolate"!==o.legendInteraction&&"highlight"!==o.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 t=z[e];if(t&&k){const e=o[t];"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:`${t}=${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:O,message:`The chart takes a single tab stop and navigates data with arrow keys${H} — 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,...k?f||b?{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:O,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${H}.`}),a.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:O,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${H}.`,fix:l?"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,...A?{status:"pass",message:`Provided: ${[g&&"title",b&&"description",f&&"summary"].filter(Boolean).join(", ")}.`}:p?{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,...b||f?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:u?{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."}:g?{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=[o.description,o.summary].filter(Le).join(". "),t=e?function(e){const t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),o=e.trim().split(/\s+/).filter(Boolean);if(0===o.length||0===t.length)return null;let r=0;for(const e of o)r+=He(e);return o.length/t.length*.39+r/o.length*11.8-15.59}(e):null;a.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==t?{status:"not-applicable",message:"No description/summary text to grade."}:t>9?{status:"warn",message:`Description/summary reads at ~grade ${t.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(t))} (≤ 9).`}})}if(T.has(e)){const e=Le(o.xLabel),t=Le(o.yLabel);a.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&t?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!t&&"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(D.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."}),R.length>1){const e=R.filter(ze).length;a.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===R.length?{status:"pass",message:`All ${R.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:R.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:`${R.length-e} of ${R.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!=o.forecast||null!=o.anomaly||null!=o.band||null!=o.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!=o.animate&&!1!==o.animate&&a.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:O,message:`Transitions animate with object constancy and data changes are mirrored to the live region${H}.`,fix:l?"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:O,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${H}.`,fix:l?"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,...m?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:x?{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)."}}),m||a.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...p?{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:l?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${l?"":H}.`,fix:l?"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,...y?h?{status:"pass",message:"ChartContainer's navigable option mounts a structured navigation tree. For hierarchical/network charts the tree is currently shallow (root/topology summary + annotations branch), not a full descent of every node."}:{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:h?{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:O,message:`Keyboard navigation steps through points and switches series/groups${H}.`,fix:l?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const t=Array.isArray(o.data)?o.data:null,r=Array.isArray(o.nodes)?o.nodes:null,n={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let i;i=I.has(e)&&t&&t.length>7?{...n,status:"warn",message:t.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.'}:r&&r.length>200?{...n,status:"warn",message:r.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."}:t&&t.length>5e3?{...n,status:"warn",message:t.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."}:t?{...n,status:"pass",message:t.length+" data points — a reasonable density for non-visual consumption."}:r?{...n,status:"pass",message:r.length+" nodes — a reasonable density for non-visual consumption."}:{...n,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},a.push(i)}{const e=Array.isArray(o.data)?o.data:null,t=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof o[e]||"string"==typeof o[e]);let r=!1;if(e&&!t)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){r=!0;break}if(r)break}r&&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,...u?{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,...m?{status:"not-applicable",message:"Single value — nothing to skip."}:x?{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:O,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${H}.`,fix:l?"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,...B.has(e)||F.has(e)?S?{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:O,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${H}.`}}),c&&(a.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...S?{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,...P?{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,...$?{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 t=!0===o.responsiveWidth||!0===o.responsiveHeight,r=M.has(e)&&!0===o.zoomable;a.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...t?{status:"pass",message:`Chart reflows to its container (${[!0===o.responsiveWidth&&"responsiveWidth",!0===o.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:r?{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(s){const e=s.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:s.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"!==s.accessibility.description||Le(o.description)||a.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:s.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),s.accessibility.fallbackTable&&!1===o.accessibleTable&&a.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:s.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const _=a.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),G={criticalsPassed:_.filter(e=>"pass"===e.status).length,criticalsEvaluated:_.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:!_.some(e=>"fail"===e.status),summary:G,findings:a,reference:"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 We(e,{onlyCritical:t=!1}={}){const o=[];for(const r of e.findings)"fail"!==r.status&&"warn"!==r.status||t&&!r.critical||o.push(r.message);return o}var qe={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},Ue=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function Ve(e){const t=[],o=e.summary,r=e.ok?`${o.criticalsPassed}/${o.criticalsEvaluated} critical heuristics pass`:`${o.fails} blocking failure(s) — ${o.criticalsPassed}/${o.criticalsEvaluated} critical heuristics pass`;t.push(`${e.ok?"✓":"✗"} ${e.component}: accessibility audit (Chartability POUR-CAF)`),t.push(` ${r} · ${o.warnings} warning(s) · ${o.manual} to verify manually`);for(const o of Ue){const r=e.findings.filter(e=>e.principle===o&&"not-applicable"!==e.status);if(0!==r.length){t.push(""),t.push(" "+o.toUpperCase());for(const e of r)t.push(` ${qe[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")}var Ye=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart","RealtimeLineChart","RealtimeHeatmap"]),Xe=new Set(["BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","DotPlot","RidgelinePlot","FunnelChart","LikertChart","SwimlaneChart"]),Ke={Scatterplot:["pointRadius","hoverRadius"],BubbleChart:["pointRadius","hoverRadius"],ConnectedScatterplot:["pointRadius","hoverRadius"],QuadrantChart:["pointRadius","hoverRadius"],SwarmPlot:["pointRadius","hoverRadius"],DotPlot:["dotRadius","hoverRadius"]};function Qe(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function Je(e){return"string"==typeof e&&e.trim().length>0}function Ze(e){const t=Qe(e.capability)?e.capability:null,o=Qe(e.recipe)?e.recipe:null,r=[e.mobileSemantics,e.mobileVisualization,e.mobile,t?.mobile,o?.mobile];for(const e of r)if(Qe(e))return e;return null}function et(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 tt(e){return et(e.size)||et(Qe(e.frameProps)?e.frameProps.size:void 0)||("number"==typeof e.width&&"number"==typeof e.height?[e.width,e.height]:null)}function ot(e,t){e.push({...t,status:"pass"})}function rt(e,t){e.push({...t,status:"warn"})}function nt(e,t){e.push({...t,status:"manual"})}function at(e,t={},o={}){const r=o.viewportWidth??390,n=o.targetSize??44,a=tt(t),i=p(t,{width:r,height:a?.[1]}),s=[],c=tt(t=i.props),l=Ze(t),u=function(e,t){return e.includes("CustomChart")||e.includes("Custom")||null!=t.recipeId||null!=t.mobileSemantics}(e,t),y=function(e){const t=Ze(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),m=!0===o.inChartContainer,d=Je(t.title)||Je(t.summary)||Je(t.description)||!0===l?.summary||Je(l?.summary);if(i.matches.length>0&&ot(s,{id:"layout.responsive-rule-applied",category:"layout",impact:"medium",message:`${i.matches.length} responsive rule(s) applied for the ${r}px mobile audit.`}),c){const[t,o]=c;t>r&&!y?rt(s,{id:"layout.fixed-desktop-size",category:"layout",impact:"high",message:`Chart size is ${t}px wide against a ${r}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."}):ot(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>r&&rt(s,{id:"layout.mobile-min-width",category:"layout",impact:"high",message:`The declared mobile contract supports ${l.minViewportWidth}px minimum, wider than the audited ${r}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,o);430>=r&&n>2.4&&"BigNumber"!==e&&rt(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>o&&"BigNumber"!==e&&rt(s,{id:"layout.too-short-for-reading",category:"layout",impact:"medium",message:`Chart height is ${o}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 nt(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 h=function(e){const t=[e.data,e.points,e.lines,e.nodes,e.edges,e.areas,Qe(e.frameProps)?e.frameProps.data:void 0];let o=0;for(const e of t)Array.isArray(e)&&(o+=e.length);return o}(t);h>0&&(h>("number"==typeof l?.maxMarks?l.maxMarks:Ye.has(e)?1.25*r:Xe.has(e)?Math.max(8,Math.floor(r/34)):r)?rt(s,{id:"density.mark-budget",category:"density",impact:Ye.has(e)?"medium":"high",message:`${h} data item(s) exceed the rough mobile density budget for ${e} at ${r}px.`,fix:"Aggregate, filter, facet into small multiples, switch to a summary-card plus detail view, or use progressive disclosure."}):ot(s,{id:"density.mark-budget",category:"density",impact:"medium",message:h+" data item(s) are within the rough mobile density budget for this component."}));const g=function(e){const t=[e.tickValues,e.xTickValues,e.yTickValues,e.rTickValues,e.oTickValues];let o=0;for(const e of t)Array.isArray(e)&&(o+=e.length);return o>0?o:null}(t),b=!1!==t.showAxes&&!1!==t.axis;if(b&&null!=g){const e=Math.max(3,Math.floor(r/58));g>e&&rt(s,{id:"density.explicit-tick-count",category:"density",impact:"medium",message:`${g} explicit tick(s) exceed a phone-friendly budget of about ${e} at ${r}px.`,fix:"Use adaptive ticks, fewer tickValues, direct labels, or move exact values into a tap-accessible detail panel."})}else b&&(Ye.has(e)||Xe.has(e))&&nt(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=Qe(e.frameProps)?e.frameProps:{};return(!0===e.enableHover||null!=e.tooltipContent||null!=e.tooltip||null!=t.tooltipContent||!0===t.enableHover)&&!function(e){const t=Ze(e),o=Qe(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===o?.tapToSelect||!0===o?.tapToLockTooltip||Array.isArray(t?.interaction?.alternatives)&&t.interaction.alternatives.length>0||"tap"===t?.interaction?.primary||"button"===t?.interaction?.primary||Je(t?.interaction?.hoverFallback)}(e)}(t)?ot(s,{id:"interaction.hover-only-detail",category:"interaction",impact:"high",message:"No hover-only detail path is visible from the config."}):rt(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 f=function(e,t){const o=Ke[e];if(!o)return null;let r=o.includes("hoverRadius")?30:null;for(const e of o){const o=t[e];"number"==typeof o&&Number.isFinite(o)&&o>0&&(r=null==r?o:Math.max(r,o))}return null==r?null:2*r}(e,t),v=Qe(t.mobileInteraction)?t.mobileInteraction:null,w=f??("number"==typeof v?.targetSize?v.targetSize:!0===t.mobileInteraction?44:"number"==typeof l?.minimumHitTarget?l.minimumHitTarget:"number"==typeof l?.interaction?.targetSize?l.interaction.targetSize:null);null!=w&&(24>w?rt(s,{id:"interaction.target-size-minimum",category:"interaction",impact:"high",message:`Small interactive marks expose an estimated ${w}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>w?rt(s,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${w}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."}):ot(s,{id:"interaction.target-size-comfort",category:"interaction",impact:"medium",message:`Pointer target is about ${w}px, meeting the configured ${n}px target.`}));const C=[];null==t.brush&&null==t.onBrush||C.push("brush"),!0===t.zoomable&&C.push("pan/zoom"),"isolate"!==t.legendInteraction&&"highlight"!==t.legendInteraction||C.push("legend filtering"),C.length>0&&!function(e,t){const o=Ze(e),r=Qe(e.mobileInteraction)?e.mobileInteraction:null,n=r?.standardControls;return!!(null!=e.controls||null!=e.mobileControls||!0===e.alternativeControls||Array.isArray(o?.interaction?.alternatives)&&o.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,C)&&rt(s,{id:"interaction.complex-gesture-alternative",category:"interaction",impact:"high",message:`Mobile-hostile complex interaction detected: ${C.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||r>430||rt(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 x=Array.isArray(t.annotations)?t.annotations.filter(e=>Qe(e)):[];if(x.length>("number"==typeof l?.maxAnnotations?l.maxAnnotations:3)&&430>=r&&rt(s,{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=>!Je(e.mobileText)&&!Je(e.shortText)&&!Je(e.label));e.length>0&&nt(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."})}y||"BigNumber"===e||nt(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."}),u&&(l?(ot(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?rt(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&&nt(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."})):nt(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||m||rt(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),k={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:r,ok:0===k.highRisk,summary:k,findings:s,reference:"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."}}var it={pass:"PASS",warn:"WARN",manual:"MANUAL","not-applicable":"N/A"},st=["layout","density","interaction","annotation","semantics"];function ct(e){const t=[],o=e.summary,r=e.ok?`no high-risk mobile blockers at ${e.viewportWidth}px`:`${o.highRisk} high-risk mobile issue(s) at ${e.viewportWidth}px`;t.push(`${e.ok?"PASS":"WARN"} ${e.component}: mobile visualization audit`),t.push(` ${r} - ${o.warnings} warning(s) - ${o.manual} manual check(s)`);for(const o of st){const r=e.findings.filter(e=>e.category===o&&"not-applicable"!==e.status);if(0!==r.length){t.push(""),t.push(" "+o.toUpperCase());for(const e of r)t.push(` ${it[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 lt(){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."]}var pt=["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","CrucibleChart","ProcessFlowChart","PhysicalFlowChart","BigNumber"],ut=new Set(pt);function yt(e){return ut.has(e)}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,o){return o??De(t.recipe)??De(t.recipeId)??Fe(e)}function bt(e,t,o=[]){const r=e.accessor?t[e.accessor]:void 0;if("string"==typeof r&&r)return r;if(e.field)return e.field;const n=o.find(e=>e&&"object"==typeof e);if(!n)return;const a=Object.entries(n).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?a.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>e in n):a.find(([,e])=>"string"==typeof e)?.[0]}function ft(e,t){return e.dataRoles.find(e=>e.role===t)}function vt(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function wt(e,t,o,r,n,a={}){const i={...a};if(t)for(const[e,o]of Object.entries(t))i[e]=o;for(const e of o.dataRoles){const o=bt(e,r,n),a=t&&o?t[o]:o;void 0!==a&&(i[e.role]=a)}return e.replace(/\{([^}]+)\}/g,(e,t)=>{const o=i[t];return null==o?`{${t}}`:o+""})}var Ct=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"]),xt=new Set(["data","nodes","edges","points","areas","lines","flows"]);function At(e){if(null==e)return e;if("function"==typeof e)return;if("object"!=typeof e)return e;if(e.$$typeof)return;if(Array.isArray(e))return e.map(At).filter(e=>void 0!==e);if(e instanceof Date)return e;const t={};for(const[o,r]of Object.entries(e)){if("function"==typeof r)continue;if(r&&"object"==typeof r&&r.$$typeof)continue;const e=At(r);void 0!==e&&(t[o]=e)}return t}function kt(e,t){return!!xt.has(e)&&("areas"!==e||"string"!=typeof t)}var St="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e));function jt(e,t,o){const r=Fe(e)??De(t.recipe)??De(t.recipeId);if(r)return function(e,t,o){const r=function(e,t,o){const r={};for(const[n,a]of Object.entries(e))if(null!=a&&!Ct.has(n)&&"recipeId"!==n&&(t||!kt(n,a)))if("function"==typeof a||a?.$$typeof){if(o)throw Error(`Portable recipe prop "${n}" is not JSON-safe.`)}else if(Be(a))r[n]=St(a);else if(o)throw Error(`Portable recipe prop "${n}" is not JSON-safe.`);return r}(t,!1!==o?.includeData,"portable"===e.portability),n=e.intents.map(mt).filter(e=>!!e),a={name:e.name,intents:n,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily};if("portable"===e.portability){if(!Be(r))throw Error(`Portable recipe "${e.id}" contains non-JSON-safe props or layoutConfig.`);return{component:"ChartRecipe",recipeId:e.id,portable:!0,props:r,manifest:a,version:"1",createdAt:(new Date).toISOString(),...o?.selections?{selections:o.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:r,manifest:a,version:"1",createdAt:(new Date).toISOString(),...o?.selections?{selections:o.selections}:{}}}(r,t,o);if(!yt(e))throw Error(`Unknown component "${e}". Known components: ${pt.join(", ")}`);const n=!1!==o?.includeData,a={};for(const[e,o]of Object.entries(t))if(null!=o&&!Ct.has(e)&&(n||!kt(e,o))&&"function"!=typeof o&&!o?.$$typeof)try{a[e]=St(At(o))}catch{}return{component:e,props:a,version:"1",createdAt:(new Date).toISOString(),...o?.selections?{selections:o.selections}:{}}}function Pt(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=Fe(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:{...St(e.props),recipeId:e.recipeId}}}if(!yt(e.component))throw Error(`Unknown component "${e.component}". This config may require a newer version of semiotic.`);return{componentName:e.component,props:St(e.props)}}function $t(e){const t=JSON.stringify(e);return"sc="+btoa(unescape(encodeURIComponent(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function It(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 o=t.replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(escape(atob(o)));return JSON.parse(r)}async function Rt(e,t="json"){const o="jsx"===t?Nt(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(o)}function Nt(e){const{props:t}=e,o=["<"+("LocalChartRecipe"===e.component?"ChartRecipe":e.component)];e.recipeId&&o.push(` recipeId="${e.recipeId}"`);for(const[e,r]of Object.entries(t))if("string"==typeof r)o.push(` ${e}="${r}"`);else if("boolean"==typeof r&&!0===r)o.push(" "+e);else if("boolean"==typeof r&&!1===r)o.push(` ${e}={false}`);else if("number"==typeof r)o.push(` ${e}={${r}}`);else{const t=JSON.stringify(r);o.push(80>t.length?` ${e}={${t}}`:` ${e}={${JSON.stringify(r,null,2)}}`)}return o.push("/>"),o.join("\n")}var Tt=/^\d{4}[-/]\d{2}/,Lt=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Bt(e){return"number"==typeof e?Number.isFinite(e)?"numeric":"unknown":e instanceof Date?"date":"string"==typeof e?Tt.test(e)&&!Number.isNaN(Date.parse(e))?"date":Lt.test(e)&&Number.isFinite(Number(e))?"numeric":"categorical":"boolean"==typeof e?"categorical":"unknown"}function Et(e){let t=1/0,o=-1/0;for(let r=0;e.length>r;r++){const n=e[r];t>n&&(t=n),n>o&&(o=n)}return{min:t,max:o}}function Ot(e){const t=e.length;if(0===t)return NaN;const o=t>>1;return t%2==0?(e[o-1]+e[o])/2:e[o]}function Ft(e,t={}){const{maxDistinct:o=10,sampleSize:r=5,keyScanRows:n=100}=t;if(!Array.isArray(e)||0===e.length)return{rowCount:0,fields:{},sample:[]};const a=new Set,i=Math.min(e.length,n);for(let t=0;i>t;t++){const o=e[t];if(o&&"object"==typeof o)for(const e of Object.keys(o))a.add(e)}const s={};for(const t of a){const r=[];for(let o=0;e.length>o;o++){const n=e[o]?.[t];null!=n&&r.push(n)}if(0===r.length){s[t]={type:"unknown"};continue}const n=Bt(r[0]);if("numeric"===n){const e=[];for(let t=0;r.length>t;t++){const o=Number(r[t]);Number.isFinite(o)&&e.push(o)}if(0===e.length){s[t]={type:"unknown"};continue}const{min:o,max:n}=Et(e);let a=0;for(let t=0;e.length>t;t++)a+=e[t];const i=[...e].sort((e,t)=>e-t);s[t]={type:"numeric",min:o,max:n,mean:a/e.length,median:Ot(i)}}else if("date"===n){const e=[];for(let t=0;r.length>t;t++){const o=r[t],n=o instanceof Date?o.getTime():Date.parse(o);Number.isFinite(n)&&e.push(n)}if(0===e.length){s[t]={type:"unknown"};continue}const{min:o,max:n}=Et(e);s[t]={type:"date",min:new Date(o).toISOString(),max:new Date(n).toISOString()}}else if("categorical"===n){const e=new Map;for(let t=0;r.length>t;t++){const o=r[t]+"";e.set(o,(e.get(o)??0)+1)}const n=[...e.entries()].sort((e,t)=>t[1]-e[1]).slice(0,o).map(([e,t])=>({value:e,count:t}));s[t]={type:"categorical",distinctCount:e.size,topValues:n,distinctValues:e.size>o?void 0:n.map(e=>e.value)}}else s[t]={type:"unknown"}}return{rowCount:e.length,fields:s,sample:e.slice(0,r)}}var Dt=/^(x|index|rank|order|step|sequence|year|quarter|qtr|fiscal|month|week|day|date|time|timestamp)$/i,Mt=/^(y|value|amount|total|count|revenue|sales|price|score|rate|population|measure)$/i,zt=/(size|magnitude|volume|weight|count|amount)/i,Ht=/^(category|label|name|type|group|region|segment|kind|class)$/i,_t=/^(series|group|type|category|segment|cohort|product)$/i,Gt=new Set(["numeric"]),Wt=new Set(["numeric","date"]),qt=new Set(["numeric"]),Ut=new Set(["date"]),Vt=new Set(["categorical","boolean"]);function Yt(e){return"numeric"===e.type?"numeric":"date"===e.type?"date":"categorical"===e.type?"categorical":"unknown"}function Xt(e,t){return t.test(e)?.2:0}function Kt(e,t){let o=null;for(let r=0;e.length>r;r++){const n=e[r]?.[t];if(null==n)continue;const a=n instanceof Date?n.getTime():Number(n);if(!Number.isFinite(a))return!1;if(null!==o&&o>a)return!1;o=a}return null!==o}function Qt(e,t,o,r,n={}){const a=[];for(const[i,s]of Object.entries(e)){const e=Yt(s);if(!o.has(e))continue;let c,l=.5;l+=Xt(i,r),"categorical"===s.type&&(c=s.distinctCount,!c||2>c||c>12||(l+=.2),c&&c>50&&(l-=.2)),"numeric"===s.type&&Number.isFinite(s.min)&&Number.isFinite(s.max)&&s.max>s.min&&(l+=.1);const p={field:i,kind:e,quality:Math.max(0,Math.min(1,l)),distinctCount:c};!n.computeMonotonic||"numeric"!==e&&"date"!==e||(p.monotonic=Kt(t,i),p.monotonic&&(p.quality=Math.min(1,p.quality+.2))),a.push(p)}return a.sort((e,t)=>t.quality-e.quality),a}function Jt(e,t){const o=new Set;for(let r=0;e.length>r;r++){const n=e[r]?.[t];null!=n&&o.add(n+"")}return o.size}var Zt=/^(source|from|origin|stage|currentstage|sourcestage|fromstage)$/i,eo=/^(target|to|destination|nextstage|next|targetstage|tostage|destinationstage|status)$/i,to=/^(starttime|startedat|enteredat|startdate|start|timestamp|date|time)$/i,oo=/^(endtime|endedat|exitedat|completedat|finishtime|enddate|end)$/i,ro=/^(value|weight|amount|count|magnitude|volume)$/i;function no(e,t){return e.find(e=>t.test(e))}function ao(e,t={}){const o=Ft(e??[]),r=Array.isArray(e)?e:[],n=function(e){if(e&&"object"==typeof e&&!Array.isArray(e)){const t=e;if("FeatureCollection"===t.type&&Array.isArray(t.features))return{hasHierarchy:!1,hasNetwork:!1,hasGeo:!0,geo:{features:t.features,points:Array.isArray(t.points)?t.points:void 0,flows:Array.isArray(t.flows)?t.flows:void 0}};if(Array.isArray(t.children))return{hasHierarchy:!0,hasNetwork:!1,hasGeo:!1,hierarchy:t};if(Array.isArray(t.nodes)&&(Array.isArray(t.edges)||Array.isArray(t.links)))return{hasHierarchy:!1,hasNetwork:!0,hasGeo:!1,network:{nodes:t.nodes,edges:t.edges??t.links}}}return{hasHierarchy:!1,hasNetwork:!1,hasGeo:!1}}(t.rawInput);if(!n.hasNetwork&&!n.hasHierarchy&&!n.hasGeo){const e=function(e){if(3>e.length)return null;const t=e[0];if(!t||"object"!=typeof t)return null;const o=Object.keys(t),r=no(o,Zt),n=no(o,eo);if(!r||!n||r===n)return null;const a=no(o,to),i=no(o,oo),s=no(o,ro),c=[];for(const t of e){if(!t)continue;const e=t[r],o=t[n];if(null==e||null==o)continue;const a=(e+"").trim(),i=(o+"").trim();a&&i&&a!==i&&c.push(t)}if(3>c.length)return null;const l=new Map,p=new Map,u=new Map;for(const e of c){const t=(e[r]+"").trim(),o=(e[n]+"").trim();l.has(t)||l.set(t,{id:t,label:t}),l.has(o)||l.set(o,{id:o,label:o});const c=`${t}->${o}`,y=s?Number(e[s]):1,m=Number.isFinite(y)?y:1;p.set(c,(p.get(c)??0)+m),u.has(c)||u.set(c,{source:t,target:o,...a?{startTime:e[a]}:{},...i?{endTime:e[i]}:{}})}const y=[];for(const[e,t]of u)y.push({...t,value:p.get(e)??1});return{nodes:Array.from(l.values()),edges:y}}(r);e&&(n.hasNetwork=!0,n.network=e)}const a=Qt(o.fields,r,Wt,Dt,{computeMonotonic:!0}),i=Qt(o.fields,r,qt,Mt),s=Qt(o.fields,r,Gt,zt),c=Qt(o.fields,r,Vt,Ht),l=Qt(o.fields,r,Vt,_t),p=Qt(o.fields,r,Ut,/(date|time|timestamp)/i,{computeMonotonic:!0}),u=p[0]?.field;let y=u,m=u?"time":"none";if(!y){const e=a.find(e=>Dt.test(e.field)&&"numeric"===e.kind);e&&(y=e.field,m="named")}const d=i.find(e=>e.field!==y)?.field;if(!y&&d){const e=Object.entries(o.fields).filter(([e,t])=>"numeric"===t.type).map(([e])=>e);2>e.length||(y=e.find(e=>e!==d),y&&(m="scatter"))}const h=s.find(e=>e.field!==y&&e.field!==d)?.field,g="time"===m||"named"===m,b=c.map(e=>e.field);let f,v;g?(v=t.seriesField??b[0],f=b.find(e=>e!==v)):(f=b[0],v=t.seriesField??b.find(e=>e!==f));const w=f?Jt(r,f):void 0,C=v?Jt(r,v):void 0,x=y?Jt(r,y):void 0,A=!!y&&function(e,t){const o=new Set;for(let r=0;e.length>r;r++){const n=e[r]?.[t];if(null==n)continue;const a=n+"";if(o.has(a))return!0;o.add(a)}return!1}(r,y),k=a.find(e=>e.field===y)?.monotonic??!1,S=p.length>0;return{...o,data:r,numericFields:le(r,{quantiles:!1}),candidates:{x:a,y:i,size:s,category:c,series:l,time:p},primary:{x:y,y:d,size:h,category:f,series:v,time:u},categoryCount:w,seriesCount:C,uniqueXCount:x,hasRepeatedX:A,monotonicX:k,hasTimeAxis:S,hasHierarchy:n.hasHierarchy,hasNetwork:n.hasNetwork,hasGeo:n.hasGeo,xProvenance:m,network:n.network,hierarchy:n.hierarchy,geo:n.geo}}var io=[{intent:"outlier-detection",weight:4,patterns:[/\b(outlier|outliers|anomal|anomaly|anomalies|extreme|extremes|unusual|stands? out|sticks? out|odd one)\b/i,/\b(peak|peaks|highest|lowest|biggest spike|spike|min|max|maximum|minimum)\b/i]},{intent:"trend",weight:4,patterns:[/\b(trend|trends|trending|trajectory|over time|across time|growth|decline|rising|falling|increasing|decreasing)\b/i,/\b(history|historical|evolved|evolution|change over)\b/i]},{intent:"change-detection",weight:3,patterns:[/\b(when did|what changed|shift|shifted|breakpoint|inflection|turning point|sudden|abrupt)\b/i]},{intent:"rank",weight:4,patterns:[/\b(rank|ranking|ranked|biggest|smallest|largest|order by|sorted|best|worst|leaderboard)\b/i,/\btop\s+(\d+|sellers?|performers?|picks?|results?|categories|items?)\b/i,/\bbottom\s+(\d+|results?|items?)\b/i,/\b(who has the most|which.*most|which.*highest|which.*lowest)\b/i]},{intent:"part-to-whole",weight:4,patterns:[/\b(share|shares|composition|portion|portions|fraction|percentage of|percent of|breakdown|make up|made up of|slice|slices)\b/i,/\b(part of|part to whole|piece of the pie|how much of)\b/i]},{intent:"composition-over-time",weight:5,patterns:[/\b(composition.*time|share.*over time|share.*across|how.*mix.*changed|stacked.*time)\b/i,/\b(over time.*share|over time.*composition|over time.*breakdown)\b/i]},{intent:"distribution",weight:4,patterns:[/\b(distribution|distributions|spread|variance|variation|histogram|skew|skewed|range of|how.*spread|shape of|bell curve)\b/i,/\b(typical value|typical range|where do most|mode|median)\b/i]},{intent:"correlation",weight:4,patterns:[/\b(correl|correlation|relationship|related to|connected to|associated|connection between|relate to)\b/i,/\b(\w+ vs\.? \w+|\w+ versus \w+|\w+ against \w+|scatter)\b/i]},{intent:"compare-series",weight:3,patterns:[/\b(compare.*series|compare.*groups|compare.*cohorts|side by side|group.*vs|series.*vs)\b/i,/\b(how do.*compare|each group|each series|each cohort)\b/i]},{intent:"compare-categories",weight:3,patterns:[/\b(compare.*categor|category.*compar|which is bigger|how does.*compare|differences? between)\b/i]},{intent:"flow",weight:4,patterns:[/\b(flow|flows|transition|transitions|movement|moved from|funnel|conversion|drop[- ]off|sankey|chord)\b/i,/\b(from.*to|source.*target|path|journey|pipeline)\b/i]},{intent:"hierarchy",weight:4,patterns:[/\b(hierarchy|hierarchical|tree|nested|parent.*child|subcategory|sub-?categor|drill down|drilldown|breakdown by level)\b/i]},{intent:"geo",weight:5,patterns:[/\b(geographic|geography|geospatial|map|maps|country|countries|cities|latitude|longitude|spatial|cartogr|choropleth)\b/i,/\b(city|us state|each state|the states)\b/i,/\bacross\s+(countries|states|regions|cities|the world|the country)\b/i]}];function so(e){if("string"!=typeof e||0===e.trim().length)return null;const t=new Map;for(const o of io)for(const r of o.patterns)if(r.test(e)){const e=t.get(o.intent)??0;t.set(o.intent,Math.min(5,0===e?o.weight:e+.5));break}if(0===t.size)return null;const o=Array.from(t.entries()).map(([e,t])=>({intent:e,confidence:t})).sort((e,t)=>t.confidence-e.confidence),[r,...n]=o;return{intent:r.intent,confidence:r.confidence,alternates:n}}var co={tiny:3,small:25,medium:250,large:5e3},lo={low:7,medium:25},po={narrow:3,typical:10},uo=["tiny","small","medium","large","huge"];function yo(e){return{rows:{...co,...e?.rows??{}},cardinality:{...lo,...e?.cardinality??{}},fields:{...po,...e?.fields??{}}}}function mo(e,t){return uo.indexOf(e)-uo.indexOf(t)}function ho(e,t){const o=e.rowCount??0,r=t?.rows,n=function(e,t,o){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=yo(o?.thresholds).rows;switch(e){case"tiny":return Math.max(1,Math.floor(t.tiny/2));case"small":return Math.floor((t.tiny+t.small)/2);case"medium":return Math.floor((t.small+t.medium)/2);case"large":return Math.floor((t.medium+t.large)/2);case"huge":return Math.floor(2*t.large)}}return t}(r,o,t),a=function(e,t){if(!Number.isFinite(e)||0>e)return"tiny";const o=yo(t?.thresholds).rows;return e>o.tiny?e>o.small?e>o.medium?e>o.large?"huge":"large":"medium":"small":"tiny"}(n,t),i=Object.keys(e.fields??{}).length,s=t?.fields,c="number"==typeof s?s:"string"==typeof s?function(e,t){const o=yo(t?.thresholds).fields;switch(e){case"narrow":return Math.max(1,Math.floor(o.narrow/2));case"typical":return Math.floor((o.narrow+o.typical)/2);case"wide":return Math.floor(2*o.typical)}}(s,t):i,l=function(e,t){if(!Number.isFinite(e)||0>e)return"narrow";const o=yo(t?.thresholds).fields;return e>o.narrow?e>o.typical?"wide":"typical":"narrow"}(c,t),p=e.primary.category,u=function(e,t,o){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=yo(o?.thresholds).cardinality;switch(e){case"low":return Math.max(1,Math.floor(t.low/2));case"medium":return Math.floor((t.low+t.medium)/2);case"high":return Math.floor(2*t.medium)}}return t}((p?t?.cardinality?.[p]:void 0)??t?.typicalCardinality,e.categoryCount,t),y=void 0!==u?function(e,t){if(!Number.isFinite(e)||0>e)return"low";const o=yo(t?.thresholds).cardinality;return e>o.low?e>o.medium?"high":"medium":"low"}(u,t):void 0;return{rows:n,rowBand:a,fields:c,fieldBand:l,typicalCardinality:u,cardinalityBand:y,growth:t?.growth??"static",rowsSource:void 0!==r?"declared":"measured"}}var go=2.5;function bo(e,t,o,r,n){const a=[],i=[];let s=0,c=!1;if(e.scaleFit){const n=e.scaleFit(t,o,r);if(n&&(s+=Math.max(-2.5,Math.min(go,n.delta??0)),n.reason&&a.push(n.reason),n.caveats))for(const e of n.caveats)i.push(e)}const l=r?.charts?.[e.component];if(l&&(l.minBand&&0>mo(o.rowBand,l.minBand)||l.maxBand&&mo(o.rowBand,l.maxBand)>0?c=!0:"number"==typeof l.bias?(s+=Math.max(-3,Math.min(3,l.bias)),l.reason&&a.push(`${r?.name?r.name+": ":""}${l.reason}`)):l.reason&&a.push(`${r?.name?r.name+": ":""}${l.reason}`)),n&&e.qualityFit){const o=e.qualityFit(t,n);if(o&&(s+=Math.max(-1,Math.min(1,o.delta??0)),o.reason&&a.push(o.reason),o.caveats))for(const e of o.caveats)i.push(e)}else if(n){const e=t.primary.y;if(e){const t=function(e,t){if(void 0===e)return;if("number"==typeof e)return e;const o=e[t];return"number"==typeof o?o:void 0}(n.completeness,e);void 0!==t&&.85>t&&i.push(`${e} is only ${Math.round(100*t)}% complete — expect gaps`)}}return{delta:s,reasons:a,caveats:i,excluded:c}}function fo(e){return(t,o)=>{let r=0;const n=[];let a;if(e.rows){const[t,i]=e.rows.sweetSpot;t>o.rows||o.rows>i?t>o.rows?(r-=Math.min(go,.8*(0===t?1:(t-o.rows)/t)),void 0===e.rows.caveatBelow||o.rows>e.rows.caveatBelow||n.push(`only ${o.rows} rows — chart may feel sparse`)):(r-=Math.min(go,.4*(0===i?1:(o.rows-i)/i)),void 0===e.rows.caveatAbove||e.rows.caveatAbove>o.rows||n.push(o.rows+" rows is past this chart's comfortable density")):(r+=.6,a=o.rows+" rows is in the sweet spot for this chart")}if(e.cardinality&&void 0!==o.typicalCardinality){const t=o.typicalCardinality,[a,i]=e.cardinality.sweetSpot;a>t||t>i?t>i&&(r-=Math.min(go,.5*(0===i?1:(t-i)/i)),void 0===e.cardinality.caveatAbove||e.cardinality.caveatAbove>t||n.push(t+" distinct categories may overwhelm this chart")):r+=.4}return 0!==r||0!==n.length||a?{delta:r,reason:a,caveats:n}:null}}var vo={component:"LineChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:5,accuracy:4,precision:4},numericContracts:ae.LineChart,fits:e=>{if(2>e.rowCount)return"needs at least 2 rows";if(!e.primary.x)return"needs a numeric or time x field";if(!e.primary.y)return"needs a numeric y field";const t=e.candidates.x.find(t=>t.field===e.primary.x)?.kind;return t&&"numeric"!==t&&"date"!==t?`x field "${e.primary.x}" is ${t}, LineChart needs numeric or time`:"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — given x looks like a scatter pattern, not a sequence"},intentScores:{trend:e=>"scatter"!==e.xProvenance||e.monotonicX?!e.uniqueXCount||4>e.uniqueXCount?3:!e.seriesCount||2>e.seriesCount?4:5:1,"compare-series":e=>"scatter"!==e.xProvenance||e.monotonicX?!e.seriesCount||2>e.seriesCount?1:e.seriesCount>8?2:4:1,"change-detection":e=>"scatter"!==e.xProvenance||e.monotonicX?4:1,"outlier-detection":2,correlation:2},caveats:e=>{const t=[];return!e.hasRepeatedX||e.seriesCount&&e.seriesCount>=2||t.push("x values repeat — consider aggregating or adding a series field"),e.seriesCount&&e.seriesCount>8&&t.push(e.seriesCount+" series may produce a spaghetti chart"),t},variants:[{key:"linear",label:"Linear trend",props:{curve:"linear",showPoints:!1},tags:["linear"]},{key:"smooth",label:"Smooth trend",description:"Monotone smoothing — emphasizes the shape over individual points.",props:{curve:"monotoneX",showPoints:!1},tags:["smooth","narrative"],intentDeltas:{trend:1,"outlier-detection":-2},rubricDeltas:{precision:-1},caveats:["smoothing hides individual outliers"]},{key:"stepped-with-points",label:"Discrete steps",description:"Step curve plus visible points — for state changes or discrete events.",props:{curve:"step",showPoints:!0,pointRadius:3},tags:["step","discrete"],intentDeltas:{"change-detection":1,trend:-1},rubricDeltas:{precision:1}},{key:"annotated-threshold",label:"With alert threshold",description:'A reference threshold or band turns the chart from a report into an alert — read it for breaches of the expected range. Pair with a provenanced annotation (e.g. from the data-quality bridge) and the chart\'s communicative act becomes "alerting".',props:{showGrid:!0,showPoints:!0},tags:["alert","annotated-threshold","monitoring"],intentDeltas:{"outlier-detection":2,"change-detection":1}}],buildProps:(e,t)=>{const o={data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y};return e.seriesCount&&e.seriesCount>=2&&e.primary.series&&(o.lineBy=e.primary.series,o.colorBy=e.primary.series),e.hasTimeAxis&&e.primary.x===e.primary.time&&(o.xScaleType="time"),{...o,...t?.props??{}}},scaleFit:fo({rows:{sweetSpot:[25,2e3],caveatBelow:4,caveatAbove:1e4}})},wo={component:"AreaChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:4,accuracy:3,precision:3},numericContracts:ae.AreaChart,fits:e=>3>e.rowCount?"needs at least 3 rows":e.primary.x?e.primary.y?"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — given x looks like a scatter pattern, not a sequence":"needs a numeric y field":"needs a numeric or time x field",intentScores:{trend:e=>"scatter"!==e.xProvenance||e.monotonicX?e.seriesCount&&e.seriesCount>=2||!e.uniqueXCount||4>e.uniqueXCount?3:5:1,"change-detection":e=>"scatter"!==e.xProvenance||e.monotonicX?3:1},caveats:e=>{const t=[];return e.seriesCount&&e.seriesCount>=2&&e.primary.series&&t.push(`showing only the leading "${e.primary.series}" series — for multi-series comparison use LineChart or DifferenceChart`),t},variants:[{key:"smooth",label:"Smooth gradient",props:{curve:"monotoneX"},tags:["smooth","gradient","narrative"]},{key:"linear",label:"Linear",props:{curve:"linear",gradientFill:!1,areaOpacity:.5},tags:["linear"]},{key:"stepped",label:"Stepped",props:{curve:"stepAfter"},tags:["step"],intentDeltas:{"change-detection":1}},{key:"annotated-threshold",label:"With alert threshold",description:'A reference threshold or expected band turns the area into an alert — read for breaches. Pair with a provenanced annotation (e.g. from the data-quality bridge) and the communicative act becomes "alerting".',props:{showGrid:!0},tags:["alert","annotated-threshold","monitoring"],intentDeltas:{"outlier-detection":2,"change-detection":1}}],buildProps:(e,t)=>{let o=e.data;if(e.seriesCount&&e.seriesCount>=2&&e.primary.series){const t=e.primary.series,r=e.primary.y,n=new Map;for(const o of e.data){const e=o[t];if(null==e||""===e)continue;const a=Number(o[r]);n.set(e,(n.get(e)??0)+(Number.isFinite(a)?a:0))}let a,i=-1/0;for(const[e,t]of n)t>i&&(i=t,a=e);null!=a&&n.size>0&&(o=e.data.filter(e=>e[t]===a))}const r={data:o,xAccessor:e.primary.x,yAccessor:e.primary.y,gradientFill:!0,areaOpacity:.55};return e.hasTimeAxis&&e.primary.x===e.primary.time&&(r.xScaleType="time"),{...r,...t?.props??{}}},scaleFit:fo({rows:{sweetSpot:[6,200],caveatAbove:2e3}})},Co={component:"StackedAreaChart",family:"time-series",importPath:"semiotic/xy",numericContracts:ae.StackedAreaChart,rubric:{familiarity:4,accuracy:3,precision:3},fits:e=>4>e.rowCount?"needs at least 4 rows":e.primary.x?e.primary.y?!e.seriesCount||2>e.seriesCount?"needs 2+ stack groups (series field)":e.seriesCount>10?e.seriesCount+" series is too many to stack legibly":"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — stacking only makes sense across a sequence":"needs a numeric y field":"needs an ordered x field",intentScores:{"composition-over-time":5,"part-to-whole":e=>e.hasTimeAxis?4:3,trend:3,"compare-series":2},caveats:()=>["readability of individual layers degrades below the baseline"],variants:[{key:"baseline-zero",label:"Zero baseline",props:{baseline:"zero",stackOrder:"key"},tags:["zero-baseline"]},{key:"streamgraph",label:"Streamgraph",description:"Wiggle baseline + inside-out ordering — emphasizes momentum over precise totals.",props:{baseline:"wiggle",stackOrder:"insideOut",showLine:!1},tags:["streamgraph","narrative"],intentDeltas:{"composition-over-time":0,trend:1,"part-to-whole":-2},rubricDeltas:{accuracy:-1,precision:-1},caveats:["streamgraph hides absolute totals; precise reads not possible"]},{key:"centered",label:"Centered baseline",props:{baseline:"silhouette",stackOrder:"insideOut"},tags:["silhouette"],intentDeltas:{"part-to-whole":-1}}],buildProps:(e,t)=>{const o={data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y,areaBy:e.primary.series,colorBy:e.primary.series};return e.hasTimeAxis&&e.primary.x===e.primary.time&&(o.xScaleType="time"),{...o,...t?.props??{}}},scaleFit:fo({rows:{sweetSpot:[30,1500],caveatBelow:12,caveatAbove:1e4}})},xo={component:"Scatterplot",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:4,accuracy:5,precision:5},numericContracts:ae.Scatterplot,fits:e=>{if(3>e.rowCount)return"needs at least 3 rows";if(!e.primary.x)return"needs a numeric x field";if(!e.primary.y)return"needs a numeric y field";const t=e.candidates.x.find(t=>t.field===e.primary.x)?.kind;return"date"===t?null:t&&"numeric"!==t?`x field "${e.primary.x}" is ${t}, Scatterplot needs numeric`:null},intentScores:{correlation:e=>{const t="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:e.primary.time,o=t?e.candidates.y.filter(e=>e.field!==t).map(e=>e.field):[];return t&&o.length>=2||e.primary.size?4:5},"outlier-detection":5,distribution:3,"compare-series":e=>!e.seriesCount||2>e.seriesCount||e.seriesCount>6?1:3,rank:1},variants:[{key:"points",label:"Points only",props:{},tags:["points"]},{key:"with-trend",label:"Points with regression line",props:{regression:"linear"},tags:["regression","trend"],intentDeltas:{correlation:0,trend:1}}],buildProps:(e,t)=>{const o={data:e.data},r="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:void 0,n=r?e.candidates.y.filter(e=>e.field!==r).map(e=>e.field):[];return r&&n.length>=2?(o.xAccessor=n[0],o.yAccessor=n[1]):(o.xAccessor=e.primary.x,o.yAccessor=e.primary.y,e.primary.size&&(o.sizeBy=e.primary.size)),e.primary.series&&e.seriesCount&&6>=e.seriesCount&&(o.colorBy=e.primary.series),{...o,...t?.props??{}}},scaleFit:fo({rows:{sweetSpot:[50,5e3],caveatBelow:20,caveatAbove:1e4}})},Ao={component:"ConnectedScatterplot",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},numericContracts:ae.ConnectedScatterplot,fits:e=>4>e.rowCount?"needs at least 4 ordered points":e.primary.x?e.primary.y?e.monotonicX||e.hasTimeAxis?null:"needs an ordered x sequence":"needs a y field":"needs an x field",intentScores:{trend:3,correlation:e=>{const t="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:e.primary.time,o=t?e.candidates.y.filter(e=>e.field!==t).map(e=>e.field):[];return t&&o.length>=2?5:4},"change-detection":3},caveats:()=>["readers can confuse path direction without explicit start/end markers"],buildProps:e=>{const t={data:e.data},o="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:e.primary.time,r=o?e.candidates.y.filter(e=>e.field!==o).map(e=>e.field):[];return o&&r.length>=2?(t.xAccessor=r[0],t.yAccessor=r[1],t.orderAccessor=o):(t.xAccessor=e.primary.x,t.yAccessor=e.primary.y,t.orderAccessor=e.primary.time??e.primary.x),e.primary.series&&6>=(e.seriesCount??0)&&(t.colorBy=e.primary.series),t}},ko={component:"BubbleChart",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:3},numericContracts:ae.BubbleChart,fits:e=>4>e.rowCount?"needs at least 4 points":e.primary.x?e.primary.y?e.primary.size?null:"needs a third numeric measure for bubble size":"needs a numeric y field":"needs a numeric x field",intentScores:{correlation:5,"compare-categories":3,"outlier-detection":4},caveats:()=>["bubble area is harder to compare than length — large dynamic ranges distort"],buildProps:e=>({data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y,sizeBy:e.primary.size,...e.primary.series&&6>=(e.seriesCount??0)?{colorBy:e.primary.series}:{}}),scaleFit:fo({rows:{sweetSpot:[10,500],caveatAbove:1500}})},So={label:"Low / High",color:"#E9C46A",opacity:.08},jo={label:"High / High",color:"#2A9D8F",opacity:.08},Po={label:"Low / Low",color:"#E76F51",opacity:.08},$o={label:"High / Low",color:"#86BBD8",opacity:.08},Io={component:"QuadrantChart",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},numericContracts:ae.QuadrantChart,fits:e=>4>e.rowCount?"needs at least 4 points":e.primary.x?e.primary.y?null:"needs a numeric y field":"needs a numeric x field",intentScores:{"compare-categories":2,correlation:3,"outlier-detection":3},buildProps:e=>{const t=e.primary.x,o=e.primary.y,r=e.fields[t],n=e.fields[o],a="numeric"===r?.type?r.median:void 0,i="numeric"===n?.type?n.median:void 0;return{data:e.data,xAccessor:t,yAccessor:o,...void 0!==a?{xCenter:a}:{},...void 0!==i?{yCenter:i}:{},...e.primary.series&&6>=(e.seriesCount??0)?{colorBy:e.primary.series}:{},quadrants:{topLeft:{...So},topRight:{...jo},bottomLeft:{...Po},bottomRight:{...$o}}}}},Ro={component:"MultiAxisLineChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:3,precision:3},fits:e=>4>e.rowCount?"needs at least 4 rows":e.primary.x?2>Object.entries(e.fields).filter(([t,o])=>"numeric"===o.type&&t!==e.primary.x).map(([e])=>e).length?"needs at least 2 numeric measures":"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — multi-axis lines need a shared sequence":"needs an x field",intentScores:{"compare-series":4,trend:3,correlation:3},caveats:()=>["dual axes can mislead — only use when measures share interpretation"],buildProps:e=>{const t=Object.entries(e.fields).filter(([t,o])=>"numeric"===o.type&&t!==e.primary.x).slice(0,2).map(([e])=>({yAccessor:e,label:e}));return{data:e.data,xAccessor:e.primary.x,series:t}}},No={component:"MinimapChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:4,accuracy:4,precision:4},numericContracts:ae.MinimapChart,fits:e=>30>e.rowCount?"minimap pays off only on long sequences (30+ rows)":e.primary.x?e.primary.y?"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — minimap previews a sequence":"needs a numeric y field":"needs an ordered x field",intentScores:{trend:4,"change-detection":4,"outlier-detection":3},buildProps:e=>({data:e.data,xAccessor:e.primary.x,yAccessor:e.primary.y,...e.hasTimeAxis&&e.primary.x===e.primary.time?{xScaleType:"time"}:{}})},To={component:"DifferenceChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},numericContracts:ae.DifferenceChart,fits:e=>4>e.rowCount?"needs at least 4 rows":e.primary.x?e.primary.series?!e.seriesCount||2>e.seriesCount?`needs 2+ series (got ${e.seriesCount??0})`:e.primary.y?"scatter"!==e.xProvenance||e.monotonicX?null:"needs an ordered/temporal x — given x looks like a scatter pattern, not a sequence":"needs a numeric y field":"needs a series field with at least two groups":"needs an x field (numeric or time)",intentScores:{"compare-series":e=>2===e.seriesCount?5:3,"change-detection":4,trend:3},caveats:e=>{const t=[];return e.seriesCount&&e.seriesCount>2&&t.push(`showing the top 2 of ${e.seriesCount} series — for full multi-series comparison use LineChart`),t},buildProps:e=>{const t=e.primary.x,o=e.primary.y,r=e.primary.series,n=e=>null!=e&&(e+"").length>0,a=new Map;for(const t of e.data){const e=t[r];if(!n(e))continue;const i=e+"",s=Number(t[o]);a.set(i,(a.get(i)??0)+(Number.isFinite(s)?s:0))}const i=[...a.entries()].sort((e,t)=>t[1]-e[1]),s=i[0]?.[0],c=i[1]?.[0],l=e=>e instanceof Date?e.getTime():e,p=new Map;for(const a of e.data){const e=a[r];if(!n(e))continue;const i=e+"";if(i!==s&&i!==c)continue;const u=a[t],y=a[o],m=l(u);let d=p.get(m);d||(d={[t]:u},p.set(m,d)),i===s?d.a=y:i===c&&(d.b=y)}return{data:Array.from(p.values()).filter(e=>null!=e.a&&null!=e.b),xAccessor:t,seriesAAccessor:"a",seriesBAccessor:"b",seriesALabel:s,seriesBLabel:c}}},Lo={component:"CandlestickChart",family:"time-series",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:4},numericContracts:ae.CandlestickChart,fits:e=>{if(4>e.rowCount)return"needs at least 4 rows";if(!e.primary.x)return"needs an x field (typically date)";const t=new Set(Object.keys(e.fields).map(e=>e.toLowerCase())),o=t.has("high"),r=t.has("low");return o&&r?null:"needs at minimum high/low fields (open/close optional)"},intentScores:{"change-detection":4,trend:3,"outlier-detection":3},buildProps:e=>{const t=Object.keys(e.fields),o=e=>t.find(t=>t.toLowerCase()===e);return{data:e.data,xAccessor:e.primary.x,highAccessor:o("high"),lowAccessor:o("low"),openAccessor:o("open"),closeAccessor:o("close")}}},Bo={component:"Heatmap",family:"relationship",importPath:"semiotic/xy",rubric:{familiarity:3,accuracy:4,precision:3},numericContracts:ae.Heatmap,fits:e=>{if(4>e.rowCount)return"needs at least 4 cells";if(!e.primary.y)return"needs a numeric value to encode in cell color";const t=e.candidates.category.length;return t>=2||t>=1&&e.hasTimeAxis?(e.uniqueXCount??0)>50?"too many x cells for a legible heatmap":null:"needs two categorical-or-time dimensions for the axes"},intentScores:{correlation:3,distribution:2,"compare-categories":e=>2>e.candidates.category.length?1:4,"composition-over-time":e=>e.hasTimeAxis&&e.candidates.category.length>=1?4:1},caveats:e=>{const t=[];return(e.uniqueXCount??0)>30&&t.push("many x values — cells will be narrow"),t},variants:[{key:"default",label:"Sequential color",props:{},tags:["sequential"]},{key:"show-values",label:"With cell labels",props:{showValues:!0},tags:["labeled"],intentDeltas:{"compare-categories":1},rubricDeltas:{precision:1},caveats:["cell labels crowd dense matrices"]}],buildProps:(e,t)=>{const o=e.candidates.category.map(e=>e.field),r=e.primary.time??o[0],n=o.find(e=>e!==r)??o[0]??e.primary.series;return{data:e.data,xAccessor:r,yAccessor:n,valueAccessor:e.primary.y,...t?.props??{}}},scaleFit:fo({rows:{sweetSpot:[100,1e4],caveatBelow:25,caveatAbove:5e4}})},Eo=/(^|[^a-z])(date|time|timestamp|month|week|day|year|quarter|qtr|hour|minute)(?=[^a-z]|$)/i,Oo=/^(jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec|january|february|march|april|june|july|august|september|october|november|december|mon|tue|wed|thu|fri|sat|sun|monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b/i,Fo=/^(\d{4}(-\d{1,2}(-\d{1,2})?)?|q[1-4]|week\s*\d+|wk\s*\d+|\d{1,2}:\d{2})$/i,Do={component:"BarChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:5,accuracy:5,precision:4},numericContracts:ae.BarChart,fits:e=>e.primary.category?e.primary.y?1>(e.categoryCount??0)?"needs at least 1 category":(e.categoryCount??0)>50?"too many categories — consider aggregating or use a different chart":null:"needs a numeric value field":"needs a category field",intentScores:{"compare-categories":e=>e.categoryCount?2>e.candidates.category.length?10>e.rowCount/e.categoryCount?5:2:3:0,rank:5,"part-to-whole":e=>(e.categoryCount??0)>8?2:3,distribution:1},caveats:e=>{const t=[];return function(e){const t=e.primary.category;if(!t)return!1;const o=t.replace(/([a-z])([A-Z])/g,"$1 $2");if(Eo.test(o))return!0;const r=e.data;if(!r||0===r.length)return!1;let n=0,a=0;for(const e of r){const o=e[t];if(null==o)continue;a++;const r=(o+"").trim();(Oo.test(r)||Fo.test(r))&&n++}return a>0&&n/a>=.6}(e)&&t.push("category axis looks like time bins — for a time series, supply real dates and use LineChart/AreaChart (reads trend, scales the time axis); for streaming counts use a temporal histogram"),t},variants:[{key:"sorted-desc",label:"Ranked",props:{sort:"desc"},tags:["sorted","ranked"],intentDeltas:{rank:0,"compare-categories":0}},{key:"source-order",label:"Source order",props:{sort:!1},tags:["source-order"],intentDeltas:{rank:-2}},{key:"horizontal",label:"Horizontal bars",props:{orientation:"horizontal",sort:"desc"},tags:["horizontal","ranked"],intentDeltas:{rank:1},rubricDeltas:{precision:1}},{key:"annotated-threshold",label:"With alert threshold",description:'A target/threshold reference turns the bars into an alert — read for which categories breach. Pair with a provenanced annotation (e.g. from the data-quality bridge) and the communicative act becomes "alerting".',props:{showGrid:!0},tags:["alert","annotated-threshold","monitoring"],intentDeltas:{"outlier-detection":2}}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...t?.props??{}}),scaleFit:fo({cardinality:{sweetSpot:[3,15],caveatAbove:25},rows:{sweetSpot:[3,200]}})},Mo={component:"GroupedBarChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:5,precision:4},numericContracts:ae.GroupedBarChart,fits:e=>e.primary.category?e.primary.y?e.primary.series?2>(e.seriesCount??0)?"needs 2+ groups":(e.seriesCount??0)>6?e.seriesCount+" groups is too many for grouped bars":(e.categoryCount??0)>25?"too many categories for grouped bars":null:"needs a series field to group by":"needs a numeric value field":"needs a category field",intentScores:{"compare-categories":5,"compare-series":4,rank:3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,groupBy:e.primary.series,colorBy:e.primary.series})},zo={component:"StackedBarChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:4,precision:3},numericContracts:ae.StackedBarChart,fits:e=>e.primary.category?e.primary.y?e.primary.series?2>(e.seriesCount??0)?"needs 2+ stack groups":(e.seriesCount??0)>8?e.seriesCount+" stacked groups is too many":null:"needs a series field to stack by":"needs a numeric value field":"needs a category field",intentScores:{"part-to-whole":4,"compare-categories":4,"composition-over-time":e=>e.hasTimeAxis?3:1,"compare-series":2},caveats:()=>["only the bottom segment shares a baseline; others are harder to compare across categories"],variants:[{key:"absolute",label:"Absolute stacks",props:{normalize:!1},tags:["absolute"]},{key:"normalized",label:"100% stacked",description:"Each bar normalized to 1 — emphasizes composition, hides totals.",props:{normalize:!0},tags:["normalized","part-to-whole"],intentDeltas:{"part-to-whole":1,"compare-categories":-1},caveats:["absolute magnitudes are no longer comparable across bars"]}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,stackBy:e.primary.series,colorBy:e.primary.series,...t?.props??{}})},Ho={component:"DotPlot",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:5,precision:5},numericContracts:ae.DotPlot,fits:e=>e.primary.category?e.primary.y?(e.categoryCount??0)>30?"too many categories for a dot plot":null:"needs a numeric value field":"needs a category field",intentScores:{"compare-categories":e=>e.categoryCount?10>e.rowCount/e.categoryCount?5:3:0,rank:5,"outlier-detection":3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y}),scaleFit:fo({cardinality:{sweetSpot:[10,30],caveatAbove:40},rows:{sweetSpot:[5,300]}})},_o={component:"PieChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:5,accuracy:3,precision:2},numericContracts:ae.PieChart,fits:e=>{if(!e.primary.category)return"needs a category field";if(!e.primary.y)return"needs a numeric value field";const t=e.categoryCount??0;return 2>t?"needs 2+ categories":t>8?t+" slices is too many for a pie chart":null},intentScores:{"part-to-whole":4,"compare-categories":2,rank:1},caveats:()=>["angle comparisons are less accurate than length — prefer a bar chart unless part-to-whole is the explicit message"],variants:[{key:"pie",label:"Pie",props:{},tags:["pie"]}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...t?.props??{}}),scaleFit:fo({cardinality:{sweetSpot:[2,5],caveatAbove:6}})},Go=/(stage|step|funnel|status|outcome|phase)/i,Wo=/(rating|score|likert|satisfaction|nps|agree|sentiment|level)/i;function qo(e){if(!e||"object"!=typeof e)return 0;const t=e.children;return Array.isArray(t)&&t.length>0?t.reduce((e,t)=>e+qo(t),0):1}function Uo(e){return Number.isFinite("number"==typeof e?e:Number(e))}function Vo(e){return["value","throughput","traffic","rate","volume","count"].find(t=>e.some(e=>{const o=Number(e?.[t]);return Number.isFinite(o)&&o>0}))??"value"}function Yo(e,t){return e.data.some(e=>e&&"object"==typeof e&&t in e)}var Xo=[vo,wo,Co,xo,Ao,ko,Io,Ro,No,To,Lo,Bo,Do,Mo,zo,Ho,_o,{component:"DonutChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:3,precision:2},numericContracts:ae.DonutChart,fits:e=>{if(!e.primary.category)return"needs a category field";if(!e.primary.y)return"needs a numeric value field";const t=e.categoryCount??0;return 2>t?"needs 2+ categories":t>8?t+" slices is too many for a donut":null},intentScores:{"part-to-whole":4,"compare-categories":2},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,innerRadius:40})},{component:"FunnelChart",family:"flow",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:3,precision:3},numericContracts:ae.FunnelChart,fits:e=>e.primary.y?Object.keys(e.fields).find(e=>Go.test(e))?null:"needs a stage/step/funnel-named field":"needs a numeric value field",intentScores:{flow:4,rank:3,"part-to-whole":2},caveats:()=>["readers infer conversion drop-off — make sure rows actually represent sequential stages"],buildProps:e=>{const t=Object.keys(e.fields).find(e=>Go.test(e));return{data:e.data,stepAccessor:t,valueAccessor:e.primary.y,...e.primary.category&&e.primary.category!==t?{categoryAccessor:e.primary.category}:{}}}},{component:"GaugeChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:2,precision:2},fits:e=>e.rowCount>1?"GaugeChart shows a single value — provide a 1-row dataset or use BarChart":e.primary.y?null:"needs a numeric value",intentScores:{"compare-categories":1,rank:1,"part-to-whole":e=>1===e.rowCount?5:1},caveats:()=>["gauges only show a single value; consider a stat card or bar instead for comparison"],buildProps:e=>{const t=e.primary.y,o=e.data[0],r=o?Number(o[t]):0,n=e.fields[t],a="numeric"===n?.type?n.max:100;return{value:Number.isFinite(r)?r:0,min:0,max:a}},scaleFit:(e,t)=>"tiny"===t.rowBand?{delta:.6,reason:"designed for single-value displays"}:null},{component:"LikertChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.primary.category?e.primary.y?Object.keys(e.fields).find(e=>Wo.test(e))?null:"needs an ordinal rating/level field (rating, score, level...)":"needs a numeric rating/count field":"needs a category (question) field",intentScores:{"compare-categories":4,distribution:3,"part-to-whole":3},buildProps:e=>{const t=Object.keys(e.fields).find(e=>Wo.test(e));return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,levelAccessor:t,levels:["Very Low","Low","Neutral","High","Very High"]}}},{component:"SwimlaneChart",family:"categorical",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:4},fits:e=>e.primary.category?e.primary.series?e.primary.y?2>(e.categoryCount??0)?"needs 2+ categories":null:"needs a numeric value field":"needs a sub-category (lane) field":"needs a category field",intentScores:{"compare-categories":4,"composition-over-time":e=>e.hasTimeAxis?3:1,"compare-series":3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,subcategoryAccessor:e.primary.series,valueAccessor:e.primary.y,colorBy:e.primary.series})},{component:"Histogram",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:4,precision:3},numericContracts:ae.Histogram,fits:e=>{if(10>e.rowCount)return"histograms need at least ~10 observations";if(!e.primary.y)return"needs a numeric field to bin";const t=e.primary.y,o=e.candidates.y.find(e=>e.field===t);return void 0!==o?.distinctCount&&6>o.distinctCount?"too few distinct numeric values; a bar chart of counts is a better fit":null},intentScores:{distribution:5,"outlier-detection":3,"compare-categories":1},variants:[{key:"count-bins",label:"Count bins",props:{bins:10,relative:!1},tags:["count"]},{key:"share-bins",label:"Share bins (relative)",props:{bins:10,relative:!0},tags:["share"],intentDeltas:{distribution:0}}],buildProps:(e,t)=>({data:e.data,valueAccessor:e.primary.y,...t?.props??{}})},{component:"BoxPlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:4,accuracy:4,precision:3},numericContracts:ae.BoxPlot,fits:e=>e.primary.y?e.primary.category?3>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 3+ observations per category":null:"needs a category to split distributions":"needs a numeric field",intentScores:{distribution:5,"compare-categories":4,"outlier-detection":4},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y})},{component:"SwarmPlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:4},numericContracts:ae.SwarmPlot,fits:e=>e.primary.y?e.primary.category?4>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 4+ observations per category":e.rowCount>2e3?"too many points for a swarm — consider a violin or box":null:"needs a category":"needs a numeric field",intentScores:{distribution:4,"outlier-detection":5,"compare-categories":3},buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...e.primary.series&&e.primary.series!==e.primary.category?{colorBy:e.primary.series}:{}})},{component:"ViolinPlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:3,accuracy:4,precision:3},numericContracts:ae.ViolinPlot,fits:e=>e.primary.y?e.primary.category?6>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 6+ observations per category":null:"needs a category to split distributions":"needs a numeric field",intentScores:{distribution:5,"compare-categories":4},variants:[{key:"density",label:"Density only",props:{showIQR:!1},tags:["density"]},{key:"density-iqr",label:"Density with IQR",props:{showIQR:!0},tags:["density","iqr"],intentDeltas:{distribution:0},rubricDeltas:{precision:1}}],buildProps:(e,t)=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,...t?.props??{}})},{component:"RidgelinePlot",family:"distribution",importPath:"semiotic/ordinal",rubric:{familiarity:2,accuracy:3,precision:3},numericContracts:ae.RidgelinePlot,fits:e=>e.primary.y?e.primary.category?3>(e.categoryCount??0)?"needs 3+ categories to make a ridgeline meaningful":6>e.rowCount/Math.max(e.categoryCount??1,1)?"needs 6+ observations per category":null:"needs a category dimension to stack distributions":"needs a numeric field",intentScores:{distribution:4,"compare-categories":3,"composition-over-time":2},caveats:()=>["readers can confuse overlapping ridges — limit categories or use small multiples"],buildProps:e=>({data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y})},{component:"ForceDirectedGraph",family:"network",importPath:"semiotic/network",rubric:{familiarity:3,accuracy:3,precision:3},fits:e=>e.hasNetwork&&e.network?2>e.network.nodes.length?"needs at least 2 nodes":1>e.network.edges.length?"needs at least 1 edge":null:"needs a {nodes, edges} network passed via rawInput",intentScores:{flow:3,correlation:2},caveats:e=>(e.network?.nodes.length??0)>500?["large graphs become hairballs — consider filtering or aggregating"]:[],buildProps:e=>({nodes:e.network?.nodes??[],edges:e.network?.edges??[],nodeIdAccessor:"id",sourceAccessor:"source",targetAccessor:"target"}),scaleFit:e=>{const t=e.network?.nodes.length??0;return 5>t?{delta:-.4,caveats:[`only ${t} nodes — force layout is overkill for this size`]}:t>100?t>300?{delta:-.8,caveats:[t+" nodes — expect a hairball; filter or aggregate before rendering"]}:{delta:0}:{delta:.5,reason:t+" nodes is in the readable range for force layout"}}},{component:"SankeyDiagram",family:"flow",importPath:"semiotic/network",rubric:{familiarity:3,accuracy:4,precision:3},numericContracts:ae.SankeyDiagram,fits:e=>e.hasNetwork&&e.network?2>e.network.edges.length?"needs 2+ weighted edges":null:"needs a {nodes, edges} network with edge weights",intentScores:{flow:5,"part-to-whole":3},buildProps:e=>({nodes:e.network?.nodes??[],edges:e.network?.edges??[],sourceAccessor:"source",targetAccessor:"target",valueAccessor:"value",nodeIdAccessor:"id"})},{component:"ChordDiagram",family:"flow",importPath:"semiotic/network",rubric:{familiarity:2,accuracy:3,precision:2},numericContracts:ae.ChordDiagram,fits:e=>e.hasNetwork&&e.network?3>e.network.nodes.length?"needs 3+ nodes":3>e.network.edges.length?"needs 3+ edges":null:"needs a {nodes, edges} network",intentScores:{flow:4},caveats:()=>["chord diagrams trade accuracy for symmetry; use Sankey if direction matters"],buildProps:e=>({nodes:e.network?.nodes??[],edges:e.network?.edges??[],valueAccessor:"value"})},{component:"ProcessSankey",family:"flow",importPath:"semiotic/network",rubric:{familiarity:2,accuracy:4,precision:3},fits:e=>{if(!e.hasNetwork||!e.network)return"needs a {nodes, edges} network";const t=e.network.edges[0];return t?void 0===t.startTime&&void 0===t.start||void 0===t.endTime&&void 0===t.end?"edges need both startTime and endTime (or start/end) for a temporal sankey":null:"needs at least one edge with start/end times"},intentScores:{flow:5,"composition-over-time":4,"change-detection":3},buildProps:e=>{const t=e.network?.edges??[],o={nodes:e.network?.nodes??[],edges:t,pairing:"temporal",laneOrder:"crossing-min"},r=t[0],n=r&&void 0===r.startTime&&void 0!==r.start?"start":"startTime",a=r&&void 0===r.endTime&&void 0!==r.end?"end":"endTime";r&&("start"===n&&(o.startTimeAccessor="start"),"end"===a&&(o.endTimeAccessor="end"));let i=1/0,s=-1/0;for(const e of t){const t=e?.[n],o=e?.[a],r=t instanceof Date?t.getTime():"number"==typeof t?t:null!=t?new Date(t).getTime():NaN,c=o instanceof Date?o.getTime():"number"==typeof o?o:null!=o?new Date(o).getTime():NaN;Number.isFinite(r)&&(i=Math.min(i,r),s=Math.max(s,r)),Number.isFinite(c)&&(i=Math.min(i,c),s=Math.max(s,c))}return Number.isFinite(i)&&Number.isFinite(s)&&s>=i&&(o.domain=[i,s===i?i+1:s]),o}},{component:"TreeDiagram",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:4,accuracy:4,precision:3},fits:e=>e.hasHierarchy&&e.hierarchy?null:"needs a hierarchical root (object with children) via rawInput",intentScores:{hierarchy:5},variants:[{key:"vertical-tree",label:"Vertical tree",props:{layout:"tree",orientation:"vertical"},tags:["vertical"]},{key:"horizontal-cluster",label:"Horizontal cluster",props:{layout:"cluster",orientation:"horizontal"},tags:["horizontal"]}],buildProps:(e,t)=>({data:e.hierarchy??{name:"root",children:[]},...t?.props??{}})},{component:"Treemap",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:4,accuracy:3,precision:3},fits:e=>e.hasHierarchy&&e.hierarchy?4>e.rowCount?"declared scale is too small to render a hierarchy meaningfully":null:"needs a hierarchical root with values",intentScores:{hierarchy:4,"part-to-whole":e=>e.hasHierarchy?5:4,"compare-categories":3},caveats:()=>["rectangle area comparisons are less precise than length — prefer a bar chart for ranking"],buildProps:e=>({data:e.hierarchy??{name:"root",children:[]},valueAccessor:"value"}),scaleFit:(e,t)=>{const o=qo(e.hierarchy);let r=0;const n=[];let a;return 5>o?(r-=.5,n.push(`only ${o} leaves — treemap needs more cells to show structure`)):o>100?o>500&&(r-=.7,n.push(o+" leaves — most tiles will be sub-pixel; prefer aggregation or zoomable treatment")):(r+=.4,a=o+" leaves is in the legible band for treemap"),"huge"===t.rowBand&&(r-=.5,n.push("at huge declared scale a stacked or matrix view aggregates better than hierarchical browsing")),{delta:r,reason:a,caveats:n}}},{component:"CirclePack",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:3,accuracy:3,precision:2},fits:e=>e.hasHierarchy&&e.hierarchy?null:"needs a hierarchical root with values",intentScores:{hierarchy:4,"part-to-whole":3},caveats:()=>["circle area is harder to compare than rectangle area"],buildProps:e=>({data:e.hierarchy??{name:"root",children:[]},valueAccessor:"value"})},{component:"OrbitDiagram",family:"hierarchy",importPath:"semiotic/network",rubric:{familiarity:1,accuracy:2,precision:2},fits:e=>e.hasHierarchy&&e.hierarchy?null:"needs a hierarchical root",intentScores:{hierarchy:3},caveats:()=>["decorative — readers without context will not infer hierarchy easily"],buildProps:e=>({data:e.hierarchy??{name:"root",children:[]},orbitMode:"solar"})},{component:"ChoroplethMap",family:"geo",importPath:"semiotic/geo",rubric:{familiarity:4,accuracy:3,precision:2},fits:e=>e.hasGeo&&e.geo?2>e.geo.features.length?"needs at least 2 area features to compare":null:"needs a GeoJSON FeatureCollection via rawInput",intentScores:{geo:5,"compare-categories":3},caveats:()=>["large areas dominate visual weight regardless of measurement"],buildProps:e=>({areas:e.geo?.features??[],valueAccessor:e.primary.y??"value"})},{component:"ProportionalSymbolMap",family:"geo",importPath:"semiotic/geo",numericContracts:ae.ProportionalSymbolMap,rubric:{familiarity:3,accuracy:3,precision:3},fits:e=>e.hasGeo&&e.geo?(e.geo.points?.length??0)>0||0!==(e.geo.features.length??0)?null:"needs points or area features":"needs a GeoJSON FeatureCollection (with points or area centroids)",intentScores:{geo:4,rank:3,"compare-categories":3},buildProps:e=>({points:e.geo?.points??[],areas:e.geo?.features??void 0,xAccessor:"lon",yAccessor:"lat",sizeBy:e.primary.size??"value"})},{component:"FlowMap",family:"geo",importPath:"semiotic/geo",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.hasGeo&&e.geo?e.geo.flows?.length?e.geo.points?.length?null:"needs point nodes with lat/lon":"needs flow records (source/target/value)":"needs a geo dataset",intentScores:{geo:4,flow:5},buildProps:e=>({flows:e.geo?.flows??[],nodes:e.geo?.points??[],valueAccessor:"value"})},{component:"DistanceCartogram",family:"geo",importPath:"semiotic/geo",rubric:{familiarity:1,accuracy:3,precision:3},fits:e=>e.hasGeo&&e.geo?e.geo.points?.length?null:"needs point nodes with lat/lon and a cost field":"needs a geo dataset",intentScores:{geo:3,rank:3,"compare-categories":2},caveats:()=>["non-standard projection — requires explanation for most readers"],buildProps:e=>({points:e.geo?.points??[],costAccessor:"cost"})},{component:"GaltonBoardChart",family:"distribution",importPath:"semiotic/physics",rubric:{familiarity:3,accuracy:3,precision:2},fits:e=>20>e.rowCount?"Galton boards need enough observations for a distribution to form":e.primary.y?null:"needs a numeric field to drop into bins",intentScores:{distribution:4,"outlier-detection":1},caveats:()=>["The settled projection is the chart; motion is explanatory context and should not be used for exact value reading"],buildProps:e=>({data:e.data,valueAccessor:e.primary.y,bins:Math.max(8,Math.min(24,Math.round(Math.sqrt(e.rowCount))))})},{component:"EventDropChart",family:"realtime",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.primary.time??e.primary.x?3>e.rowCount?"needs multiple events to show arrival/window behavior":null:"needs an event-time field",intentScores:{"change-detection":3,trend:1,distribution:1},caveats:()=>["Use for event-time arrival stories, watermarks, and lateness; use a line or histogram for precise temporal values"],buildProps:e=>{const t=e.primary.time??e.primary.x,o=(function(e){return e.data.some(e=>e&&"object"==typeof e&&"arrivalTime"in e)}(e)?"arrivalTime":e.candidates.time.find(e=>e.field!==t)?.field)||t;return{data:e.data,timeAccessor:t,arrivalAccessor:o,windows:{size:Math.max(1,Math.ceil(e.rowCount/8))},watermark:{delay:1}}}},{component:"PhysicsPileChart",family:"categorical",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.primary.category?e.primary.y?(e.categoryCount??0)>12?"too many categories for readable physics piles":null:"needs a numeric value to unitize into bodies":"needs a categorical field for piles",intentScores:{"compare-categories":3,"part-to-whole":2,distribution:1},caveats:()=>["Physics piles dramatize accumulation; use bars or dots when exact rank or precise value comparison is the task"],buildProps:e=>{const t=e.primary.y,o=t?e.data.map(e=>Number(e?.[t])).filter(e=>Number.isFinite(e)):[],r=o.length?Math.max(...o):1;return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:t,unitValue:Math.max(1,Math.ceil(r/40))}}},{component:"CollisionSwarmChart",family:"distribution",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:4,precision:3},fits:e=>e.primary.y??e.primary.x?8>e.rowCount?"needs enough points for collision density to matter":e.rowCount>1200?"too many points for browser collision relaxation":(e.categoryCount??0)>12?"too many group lanes for a physics swarm":null:"needs a numeric field for the swarm axis",intentScores:{distribution:3,"outlier-detection":3,"compare-categories":2},caveats:()=>["CollisionSwarmChart makes overlap and settling visible; use SwarmPlot when a static distribution is enough"],buildProps:e=>{const t=e.primary.category&&8>=(e.categoryCount??0)?e.primary.category:void 0;return{data:e.data,xAccessor:e.primary.y??e.primary.x,...t?{groupAccessor:t,colorBy:t}:{},...e.primary.size?{radiusAccessor:e.primary.size}:{}}}},{component:"PhysicalFlowChart",family:"flow",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:2,precision:1},fits:e=>{return e.hasNetwork&&e.network?1>e.network.edges.length?"needs at least 1 flow link":e.network.edges.length>160?"too many links for animated particle flow":(t=e.network.edges,e.network.nodes.some(e=>Uo(e.x)&&Uo(e.y))||t.some(e=>Array.isArray(e.path)||Array.isArray(e.points)||Array.isArray(e.route))?null:"requires authored node x/y coordinates or per-link path geometry; use SankeyDiagram for plain source-target-value data"):"needs explicit {nodes, edges} or {nodes, links} route input";var t},intentScores:{flow:4,"change-detection":1,"part-to-whole":1},caveats:()=>["PhysicalFlowChart is experimental: keep showStaticFlow enabled so throughput remains readable when animation is paused or reduced","Requires explicit route geometry; it does not infer physical pipe paths from a flat source-target table"],buildProps:e=>{const t=e.network?.edges??[];return{nodes:e.network?.nodes??[],links:e.network?.edges??[],nodeIdAccessor:"id",nodeXAccessor:"x",nodeYAccessor:"y",sourceAccessor:"source",targetAccessor:"target",throughputAccessor:Vo(t),showStaticFlow:!0,showSensors:!0,maxParticles:160}},scaleFit:e=>{const t=e.network?.edges.length??0;return t>4?t>60?{delta:-.7,caveats:[t+" links can create occlusion and packet budget pressure; aggregate routes first"]}:{delta:.2,reason:t+" links is small enough for route-constrained packet animation"}:{delta:-.2,caveats:[`only ${t} links — a static Sankey may communicate the flow more directly`]}}},{component:"ProcessFlowChart",family:"realtime",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>3>e.rowCount?"needs multiple work items to show stage flow":Yo(e,"stage")||Yo(e,"status")||e.primary.category?null:"needs a categorical stage/status field",intentScores:{flow:4,"change-detection":3,"compare-categories":2,rank:1},caveats:()=>["Use for capacitated multi-body process stories (review queues, triage, merge pipelines); use a bar or Sankey for precise stage totals without motion","Motion dramatizes backlog and capacity; settled stage counts and group completion are the readable chart"],buildProps:e=>{const t=(Yo(e,"stage")?"stage":Yo(e,"status")&&"status")||e.primary.category||"stage",o=Yo(e,"id")?"id":void 0,r=(Yo(e,"featureId")?"featureId":Yo(e,"group")&&"group")||e.primary.series||void 0,n=new Set;for(const o of e.data){if(!o||"object"!=typeof o)continue;const e=o[t];null!=e&&""!==e&&n.add(e+"")}const a=n.size>0?Array.from(n):["coding","review","merged"],i=a.map((t,o)=>{const r=o===a.length-1,n=o===Math.floor(a.length/2);return{id:t,label:t,force:r?20:12,capacity:n?{unitsPerSecond:Math.max(2,Math.round(e.rowCount/8))}:void 0,pressure:n||void 0,absorb:r||void 0}});return{data:e.data,...o?{idAccessor:o}:{},stageAccessor:t,...r?{groupBy:r,groupCompletion:"allAbsorbed"}:{},stages:i,showProjection:!0,showChrome:!0}}},{component:"GauntletChart",family:"realtime",importPath:"semiotic/physics",rubric:{familiarity:2,accuracy:2,precision:2},fits:e=>{if(1>e.rowCount)return"needs at least one project/plan row";const t=e.data.some(e=>e&&"object"==typeof e&&"id"in e);return e.primary.category||t?null:"needs project rows with stable ids (or a categorical identity field)"},intentScores:{flow:3,"change-detection":2,"compare-categories":1},caveats:()=>["GauntletChart is for compound entities whose attached properties transform at gates. Use ProcessFlowChart when work items do not need compound property bodies.","Read viability, property inventory, and outcomes — not body trajectories."],buildProps:e=>({data:e.data.map((e,t)=>({...e,id:e?.id??"project-"+t,positives:Array.isArray(e?.positives)?e.positives:["value"],negatives:Array.isArray(e?.negatives)?e.negatives:["cost"]})),idAccessor:"id",positiveAccessor:"positives",negativeAccessor:"negatives",positiveProperties:[{id:"value",label:"Value",short:"V",color:"#22c55e",buoyancy:2,radius:9}],negativeProperties:[{id:"cost",label:"Cost",short:"$",color:"#ef4444",load:1.1,radius:7}],gates:[{id:"review",label:"Review"},{id:"approval",label:"Approval"}],showProjection:!0,showChrome:!0})},{component:"CrucibleChart",family:"flow",importPath:"semiotic/physics",rubric:{familiarity:1,accuracy:4,precision:3},fits:()=>"requires authored phases, product molds, events, and outlets; these cannot be inferred from flat data",intentScores:{flow:4,"change-detection":3,"compare-categories":1},caveats:()=>["CrucibleChart presents an authored treatment and its accounting; collisions never discover products, affinity, failure, or causality.","Supply stable source ids plus explicit phases, products, events, and reason-labelled outlets. Use the settled projection for the exact reading.","buildCrucibleProductEvents can serialize an explicit form → contribute → complete lifecycle, but the caller must still author every member, relation, event position, and outlet."],buildProps:e=>({data:e.data})},{component:"BigNumber",family:"value",importPath:"semiotic/value",rubric:{familiarity:5,accuracy:5,precision:5},fits:e=>e.primary.y||e.primary.size||0!==e.candidates.y.length?e.rowCount>50?"BigNumber shows a single focal value — pass scalar data, or use a chart family for >50 rows":null:"needs a numeric value to display",intentScores:{trend:e=>e.hasTimeAxis||"named"===e.xProvenance||e.monotonicX?e.rowCount>8?1:3:0,"compare-categories":1,rank:1,"part-to-whole":e=>1===e.rowCount?5:1,"change-detection":e=>e.hasTimeAxis||"named"===e.xProvenance||e.monotonicX?e.rowCount>8?1:4:0},caveats:e=>{const t=[];return e.rowCount>1&&t.push("BigNumber renders the latest row's value as the focal number; earlier rows feed an optional sparkline"),t},buildProps:e=>{const t=e.primary.y??e.primary.size??e.candidates.y[0]?.field;if(!t)return{value:0};const o=e.data,r=o.length>0?o[o.length-1]:null,n=r?Number(r[t]):0,a={value:Number.isFinite(n)?n:0,label:t};if(o.length>=2){const e=Number(o[o.length-2][t]);Number.isFinite(e)&&(a.comparison={value:e,label:"vs previous"})}return a},scaleFit:(e,t)=>"tiny"===t.rowBand?{delta:.8,reason:"single-value displays beat charts when there is one number to show"}:"small"===t.rowBand?{delta:.2,reason:"the latest value with a trend spark is often more legible than a chart at small scale"}:null}],Ko=new Map;function Qo(){if(0===Ko.size&&0>=Oe().capabilities.size)return Xo;const e=new Map;for(const t of Xo)e.set(t.component,t);for(const t of Array.from(Oe().capabilities.values()))e.set(t.component,t);for(const[t,o]of Ko)e.set(t,o);return Array.from(e.values())}function Jo(e){return Qo().find(t=>t.component===e)}var Zo=new Set(["perceivable.content-only-visual","perceivable.color-alone","assistive.data-density","assistive.human-readable-numbers","assistive.skippable-navigation","compromising.table","compromising.navigable-structure"]),er={"screen-reader":"a screen reader",sonified:"sonification",agent:"an AI reader"};function tr(e,t){if("visual"===t)return{delta:0,caveats:[]};let o=0;const r=[],n=[];for(const t of e.findings){if(!Zo.has(t.id))continue;let e=0;"fail"===t.status?e=t.critical?1.2:.8:"warn"===t.status&&(e=.4),e>0&&(o-=e,r.push(t.heuristic.charAt(0).toLowerCase()+t.heuristic.slice(1)),n.push(t.message))}return 0===r.length?{delta:0,caveats:[]}:{delta:Math.max(-3,o),reason:`Harder to receive via ${er[t]}: ${r.slice(0,3).join("; ")}`,caveats:n}}function or(e,t,o,r,n){if(!r)return{score:e,rubric:t};const a=r.familiarity?.[o],i=a??t.familiarity,s=r.targets?.[o];let c,l,p=0;void 0!==a&&(p+=.5*(a-3)),s&&(p+=1*("increase"===s.direction?1:-1)*Math.max(1,Math.min(3,s.weight??1)),c=s.reason?`${r.name?r.name+": ":""}${s.reason}`:`${r.name?r.name+" ":""}target: ${s.direction} ${o}`);const u=r.receptionModality;return n&&u&&"visual"!==u&&(p+=n.delta,l=n.reason),{score:e+p,rubric:{...t,familiarity:i},appliedReason:c,receivabilityReason:l}}function rr(e,t,o){return o?o.familiarity?.[e]??t:t}function nr(e,t){if(void 0===e)return 0;const o="function"==typeof e?e(t):e;return Number.isFinite(o)?Math.max(0,Math.min(5,o)):0}function ar(e,t){if(!t?.intentDeltas)return e;const o={...e};for(const[e,r]of Object.entries(t.intentDeltas))o[e]=Math.max(0,Math.min(5,(o[e]??0)+r));return o}function ir(e,t){return t?.rubricDeltas?function(e){const t=e=>Math.max(1,Math.min(5,Math.round(e)));return{familiarity:t(e.familiarity),accuracy:t(e.accuracy),precision:t(e.precision)}}({familiarity:e.familiarity+(t.rubricDeltas.familiarity??0),accuracy:e.accuracy+(t.rubricDeltas.accuracy??0),precision:e.precision+(t.rubricDeltas.precision??0)}):e}function sr(e,t,o,r){const n=[],a=r.map(e=>({intent:e,score:o[e]??0})).filter(e=>e.score>=3).sort((e,t)=>t.score-e.score).slice(0,2);for(const{intent:e,score:t}of a)n.push(`Strong fit for ${e} (${t}/5)`);if(t.primary.x&&t.primary.y&&n.push(`x = ${t.primary.x}, y = ${t.primary.y}`),t.seriesCount&&t.seriesCount>1&&n.push(`${t.seriesCount} series detected on field "${t.primary.series??"series"}"`),"recipe"===e.candidateKind){for(const t of e.positiveRationale?.slice(0,2)??[])n.push(t);e.whyCustom?.reason&&n.push("Why leave the catalog: "+e.whyCustom.reason)}return n}function cr(e,t){if("recipe"!==e.candidateKind||!e.recipe)return{delta:0,reasons:[],caveats:[]};const o=e.recipe;if(t.portability&&o.portability!==t.portability)return{delta:0,reasons:[],caveats:[],excluded:`requires a ${t.portability} recipe`};let r=0;const n=[],a=[],i=t.audience?.name?.trim().toLowerCase();if(i){const e=o.audienceFit?.find(e=>e.audience.trim().toLowerCase()===i);e&&(r+={strong:.75,moderate:.25,weak:-.5,avoid:-2}[e.fit],n.push(e.rationale??`${e.fit} fit for ${t.audience?.name??e.audience}`))}const s=t.receptionChannel??t.audience?.receptionModality??"visual";o.reception?.channels?.includes(s)?(r+=.25,n.push(`Designed for ${s} reception`)):o.reception?.channels?.length&&(r-=1,a.push(`Recipe does not declare support for the ${s} reception channel.`));const c=o.reception?.risks??[];return"low"===t.riskTolerance&&c.length>0?(r-=Math.min(1.5,.35*c.length),a.push(...c)):"medium"===t.riskTolerance&&c.length>2&&(r-=.25),"local"===o.portability?a.push("Local-only recipe: cannot be rendered remotely by CLI or MCP."):n.push("Portable registered recipe"),{delta:r,reasons:n,caveats:a}}function lr(e,t){if(0===t.length){const t=Object.values(e).filter(e=>"number"==typeof e&&e>0);return 0===t.length?0:t.reduce((e,t)=>e+t,0)/t.length}let o=0;for(const r of t)o+=e[r]??0;return o/t.length}function pr(e,t={}){const o=t.profile??ao(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),r=t.capabilities??Qo(),n=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],a=!1!==t.includeVariants,i=t.minScore??0,s=t.maxResults??10,c=t.allow?new Set(t.allow):null,l=t.deny?new Set(t.deny):null,p=t.audience?.receptionModality,u=void 0!==p&&"visual"!==p,y=ho(o,t.scale),m=void 0!==t.scale&&y.rows!==o.rowCount?{...o,rowCount:y.rows}:o,d=[];for(const e of r){if(c&&!c.has(e.component))continue;if(l&&l.has(e.component))continue;if(null!==e.fits(m))continue;const r={};for(const[t,o]of Object.entries(e.intentScores))r[t]=nr(o,m);const s=e.caveats?Array.from(e.caveats(m)):[],h=a&&e.variants&&e.variants.length>0?e.variants:[void 0];for(const a of h){const c=ar(r,a),l=lr(c,n),h=ir(e.rubric,a),g=e.buildProps(o,a);let b;u&&(b=tr(Ge(e.component,g),p));const f=or(l,h,e.component,t.audience,b),v=bo(e,m,y,t.scale,t.quality);if(v.excluded)continue;const w=cr(e,t);if(w.excluded)continue;const C=f.score+v.delta+w.delta;if(i>C)continue;const x=sr(e,m,c,n);f.appliedReason&&x.push(f.appliedReason),f.receivabilityReason&&x.push(f.receivabilityReason);for(const e of v.reasons)x.push(e);x.push(...w.reasons);const A=[...s,...a?.caveats??[],...v.caveats,...b?.caveats.slice(0,3)??[],...w.caveats],k={band:y.rowBand,cardinalityBand:y.cardinalityBand,rows:y.rows,rowsSource:y.rowsSource},S=a?.component??e.component;d.push({component:S,displayName:e.displayName??S,candidateKind:e.candidateKind??"built-in",...e.recipe?{recipeId:e.recipe.id}:{},family:e.family,importPath:e.importPath,variant:a,score:C,intentScores:c,rubric:f.rubric,reasons:x,caveats:A,props:g,...e.whyCustom?{whyCustom:e.whyCustom}:{},scaleRange:k})}}d.sort((e,t)=>t.score!==e.score?t.score-e.score:t.rubric.accuracy!==e.rubric.accuracy?t.rubric.accuracy-e.rubric.accuracy:t.rubric.familiarity-e.rubric.familiarity);const h=new Set;return d.filter(e=>{const t=`${e.component}:${e.score.toFixed(4)}`;return!h.has(t)&&(h.add(t),!0)}).slice(0,s)}function ur(e,t={}){const o=t.profile??ao(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),r=t.capabilities??Qo(),n=t.allow?new Set(t.allow):null,a=t.deny?new Set(t.deny):null,i=ho(o,t.scale),s=void 0!==t.scale&&i.rows!==o.rowCount?{...o,rowCount:i.rows}:o,c=[];for(const e of r){if(n&&!n.has(e.component))continue;if(a&&a.has(e.component))continue;const t=e.fits(s);null!==t&&c.push({component:e.component,family:e.family,importPath:e.importPath,reason:t})}return{fitting:pr(e,{...t,profile:o}),rejected:c,profile:o}}function yr(e,t,o={}){const r=Qo().find(t=>t.component===e);if(!r)return{reason:`No capability registered for "${e}"`};const n=o.profile??ao(t??[]),a=r.fits(n);if(null!==a)return{reason:a};const i=o.variantKey?r.variants?.find(e=>e.key===o.variantKey):void 0,s=o.intent?Array.isArray(o.intent)?o.intent:[o.intent]:[],c={};for(const[e,t]of Object.entries(r.intentScores))c[e]=nr(t,n);const l=ar(c,i),p=lr(l,s),u=ir(r.rubric,i),y=sr(r,n,l,s),m=cr(r,o);if(m.excluded)return{reason:m.excluded};y.push(...m.reasons);const d=[...r.caveats?r.caveats(n):[],...i?.caveats??[],...m.caveats],h=i?.component??r.component;return{component:h,displayName:r.displayName??h,candidateKind:r.candidateKind??"built-in",...r.recipe?{recipeId:r.recipe.id}:{},family:r.family,importPath:r.importPath,variant:i,score:p+m.delta,intentScores:l,rubric:u,reasons:y,caveats:d,props:r.buildProps(n,i),...r.whyCustom?{whyCustom:r.whyCustom}:{}}}function mr(e,t={}){const o=t.profile??ao(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),r=ho(o,t.scale),n=t.maxPerBand??t.maxResults??5,a=["tiny","small","medium","large","huge"],i={};for(const r of a){const a={...t.scale??{},rows:r};i[r]=pr(e,{...t,profile:o,scale:a,maxResults:n})}return{tiny:i.tiny??[],small:i.small??[],medium:i.medium??[],large:i.large??[],huge:i.huge??[],effective:r}}function dr(e,t={}){const o=t.audience;if(!o)return[];const r=t.profile??ao(e??[],{rawInput:t.rawInput}),n=function(e){return e&&2===e.exposureLevel?4:3}(o),a=t.scoreTolerance??1.5,i=t.maxResults??5,s=Qo(),c=new Map;for(const e of s)c.set(e.component,rr(e.component,e.rubric.familiarity,o));const l=pr(e,{profile:r,intent:t.intent,maxResults:30,includeVariants:!0,minScore:1,allow:t.allow,deny:t.deny}),p=l.filter(e=>(c.get(e.component)??e.rubric.familiarity)>=4)[0],u=[];for(const e of l)(c.get(e.component)??e.rubric.familiarity)>n||("increase"===o.targets?.[e.component]?.direction||!p||a>=p.score-e.score)&&u.push({stretch:e,familiar:p});const y=new Set,m=[];for(const{stretch:e,familiar:t}of u){const r=`${e.component}/${e.variant?.key??"base"}`;if(y.has(r))continue;y.add(r);const n=c.get(e.component)??e.rubric.familiarity,a=o.targets?.[e.component],s=a?.reason??("increase"===a?.direction?`${o.name??"your audience"} is growing adoption of ${e.component}`:t?`${e.component} is on the data, and within reach of ${t.component} which you're already familiar with`:e.component+" fits this data and would expand your team's vocabulary");if(m.push({suggestion:e,replacing:t?.component,rationale:s,familiarity:n}),m.length>=i)break}return m}function hr(e,t={}){const o=t.profile??ao(e??[],{rawInput:t.rawInput}),r=t.maxPanels??6,n=!1!==t.diversifyByFamily,a=t.intents??function(e){const t=[];return e.hasTimeAxis&&(t.push("trend"),e.seriesCount&&e.seriesCount>=2&&t.push("compare-series","composition-over-time"),t.push("change-detection")),e.categoryCount&&t.push("rank","compare-categories","part-to-whole"),e.primary.y&&e.rowCount>=10&&t.push("distribution"),2>Object.values(e.fields).filter(e=>"numeric"===e.type).length||t.push("correlation","outlier-detection"),e.hasHierarchy&&t.push("hierarchy"),e.hasNetwork&&t.push("flow"),e.hasGeo&&t.push("geo"),Array.from(new Set(t))}(o),i=[],s=[],c=[],l=new Set,p=new Set;for(const u of a){if(i.length>=r){c.push(u);continue}const a=pr(e,{profile:o,intent:u,allow:t.allow,deny:t.deny,maxResults:20,includeVariants:!0,minScore:1.5,audience:t.audience});let y;for(const e of a)if(!(p.has(`${e.component}/${e.variant?.key??"base"}`)||n&&l.has(e.family))){y=e;break}if(!y&&n)for(const e of a)if(!p.has(`${e.component}/${e.variant?.key??"base"}`)){y=e;break}y?(i.push({intent:u,suggestion:y}),s.push(u),l.add(y.family),p.add(`${y.component}/${y.variant?.key??"base"}`)):c.push(u)}return{panels:i,intentsCovered:s,intentsMissing:c,stretchPanels:t.audience&&(t.audience.exposureLevel??1)>0?dr(e,{profile:o,audience:t.audience,deny:Array.from(p).map(e=>e.split("/")[0]),maxResults:t.maxStretchPanels??Math.min(3,r)}):[],profile:o}}var gr=[{component:"RealtimeLineChart",importPath:"semiotic/realtime",rubric:{familiarity:4,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"y"===e.role||"value"===e.role)?"high"===e.throughput?"for high-throughput streams, prefer RealtimeHeatmap or RealtimeWaterfallChart":null:"needs a numeric value field":"needs a date/time field for the x axis",intentScores:{trend:5,"change-detection":4,"outlier-detection":2},caveats:e=>{const t=[];return"cumulative"===e.retention&&t.push("cumulative retention will eventually exhaust the buffer — set a windowSize or downsample"),t},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,o=e.fields.find(e=>"y"===e.role||"value"===e.role||"numeric"===e.kind)?.name;return{timeAccessor:t,valueAccessor:o}}},{component:"RealtimeHistogram",importPath:"semiotic/realtime",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?null:"needs a numeric field to bin":"needs a time field",intentScores:{distribution:5,"outlier-detection":4,"change-detection":2},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,o=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name;return{timeAccessor:t,valueAccessor:o}}},{component:"RealtimeSwarmChart",importPath:"semiotic/realtime",rubric:{familiarity:2,accuracy:4,precision:4},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?e.fields.some(e=>"categorical"===e.kind||"category"===e.role)?null:"needs a category to swarm by":"needs a numeric field":"needs a time field (points are placed at (time, value))",intentScores:{"outlier-detection":5,distribution:4,"compare-categories":3},caveats:e=>"high"===e.throughput?["high-throughput swarms get crowded — consider RealtimeHistogram"]:[],buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,o=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name,r=e.fields.find(e=>"category"===e.role||"categorical"===e.kind)?.name;return{timeAccessor:t,valueAccessor:o,categoryAccessor:r}}},{component:"RealtimeWaterfallChart",importPath:"semiotic/realtime",rubric:{familiarity:2,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?null:"needs a numeric value field":"needs a time field",intentScores:{"change-detection":5,trend:3,"outlier-detection":4,distribution:e=>"high"===e.throughput?4:2},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,o=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name;return{timeAccessor:t,valueAccessor:o}}},{component:"RealtimeHeatmap",importPath:"semiotic/realtime",rubric:{familiarity:2,accuracy:3,precision:2},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?null:"needs a numeric value field":"needs a time field for the x axis",intentScores:{trend:e=>"high"===e.throughput?4:2,distribution:3,"change-detection":3,"compare-series":e=>e.fields.find(e=>"series"===e.role||"categorical"===e.kind&&"category"!==e.role)?4:1},buildProps:e=>{const t=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name,o=e.fields.find(e=>"y"===e.role||"value"===e.role||"numeric"===e.kind)?.name,r=e.fields.find(e=>"category"===e.role||"categorical"===e.kind&&"series"!==e.role)?.name;return{timeAccessor:t,valueAccessor:o,...r?{categoryAccessor:r}:{}}}},{component:"TemporalHistogram",importPath:"semiotic/realtime",rubric:{familiarity:3,accuracy:4,precision:3},fits:e=>e.fields.some(e=>"date"===e.kind||"x"===e.role)?e.fields.some(e=>"numeric"===e.kind||"value"===e.role)?"windowed"===e.retention?"windowed retention is RealtimeHistogram's job; TemporalHistogram serves bounded/cumulative data":null:"needs a numeric value field":"needs a time field",intentScores:{distribution:5,"change-detection":3,trend:2},buildProps:e=>{const t=e.fields.find(e=>"value"===e.role||"numeric"===e.kind)?.name,o=e.fields.find(e=>"x"===e.role||"date"===e.kind)?.name;return{timeAccessor:o,valueAccessor:t}}}],br=new Map;function fr(e,t){if(void 0===e)return 0;const o="function"==typeof e?e(t):e;return Number.isFinite(o)?Math.max(0,Math.min(5,o)):0}function vr(e,t){if(0===t.length){const t=Object.values(e).filter(e=>"number"==typeof e&&e>0);return 0===t.length?0:t.reduce((e,t)=>e+t,0)/t.length}let o=0;for(const r of t)o+=e[r]??0;return o/t.length}function wr(e,t,o){const r=[],n=o.map(e=>({intent:e,score:t[e]??0})).filter(e=>e.score>=3).sort((e,t)=>t.score-e.score).slice(0,2);for(const{intent:e,score:t}of n)r.push(`Strong fit for ${e} (${t}/5)`);return e.throughput&&r.push(`tuned for ${e.throughput} throughput`),r}function Cr(e,t={}){const o=t.capabilities??function(){if(0===br.size)return gr;const e=new Map;for(const t of gr)e.set(t.component,t);for(const[t,o]of br)e.set(t,o);return Array.from(e.values())}(),r=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],n=t.minScore??0,a=t.maxResults??10,i=t.allow?new Set(t.allow):null,s=t.deny?new Set(t.deny):null,c=[];for(const t of o){if(i&&!i.has(t.component))continue;if(s&&s.has(t.component))continue;if(null!==t.fits(e))continue;const o={};for(const[r,n]of Object.entries(t.intentScores))o[r]=fr(n,e);const a=vr(o,r);if(n>a)continue;const l={...t.rubric},p=t.caveats?Array.from(t.caveats(e)):[],u=wr(e,o,r),y=t.buildProps(e);c.push({component:t.component,family:"realtime",importPath:t.importPath,score:a,intentScores:o,rubric:l,reasons:u,caveats:p,props:y})}return c.sort((e,t)=>t.score!==e.score?t.score-e.score:t.rubric.accuracy!==e.rubric.accuracy?t.rubric.accuracy-e.rubric.accuracy:t.rubric.familiarity-e.rubric.familiarity),c.slice(0,a)}function xr(e,t,o={}){const r=o.profile??ao(t??[],{rawInput:o.rawInput}),n=Jo(e),a=o.maxAlternatives??3,i=n?.recipe?function(e,t){const o=[];"required"===e.accessibility.description&&"string"!=typeof(t.props??{}).description&&o.push("This custom recipe needs a generated or authored description."),e.reception?.risks?.some(e=>/unfamiliar/i.test(e))&&!(e.reception.scaffolds??[]).some(e=>["legend","annotation","summary","description"].includes(e))&&o.push("This recipe is unfamiliar; add an orienting legend, annotation, or summary.");const r=e.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));r&&o.push("This recipe is color-dependent; add a shape, position, texture, or label cue."),e.reception?.channels.includes("interactive")&&!e.accessibility.fallbackTable&&"required"!==e.accessibility.accessibleTable&&o.push("This interactive recipe needs a static data fallback."),"local"===e.portability&&o.push("This recipe is local-only and cannot be exported to MCP or CLI rendering.");for(const e of t.observedSceneAudit?.observedSceneEvidence??[])"fail"!==e.status&&"warn"!==e.status||("interaction.hit-targets"===e.id?o.push("Scene audit found data-bearing marks without hit targets."):"accessibility.table-fields"===e.id?o.push("Scene audit found accessible-table field loss."):"accessibility.navigation-depth"===e.id&&o.push("The recipe navigation tree is root-only; expose groups and reachable data marks."));return[...new Set(o)]}(n.recipe,o):[];if(!n)return{status:"unknown",component:e,alternatives:pr(t,{profile:r,intent:o.intent,maxResults:a,includeVariants:!1}),profile:r};const s=n.fits(r);return null===s?{status:"ok",component:e,profile:r,...i.length?{repairs:i}:{}}:{status:"alternative",component:e,reason:s,alternatives:pr(t,{profile:r,intent:o.intent,maxResults:a,deny:[e],includeVariants:!1}),profile:r,...i.length?{repairs:i}:{}}}var Ar=new Set;function kr(e,t,o){return Number.isFinite(e)?Math.max(t,Math.min(o,e)):t}function Sr(e,t){return void 0===e?0:kr("function"==typeof e?e(t):e,0,5)}function jr(e){return e?Array.isArray(e)?[...e]:[e]:[]}function Pr(e,t,o){const r={};for(const[o,n]of Object.entries(e.intentScores))r[o]=Sr(n,t);if(o)for(const[e,t]of Object.entries(o))r[e]=kr((r[e]??0)+t,0,5);return r}function $r(e,t){if(t.length>0)return t.reduce((t,o)=>t+(e[o]??0),0)/t.length;const o=Object.values(e).filter(e=>"number"==typeof e&&e>0);return o.length?o.reduce((e,t)=>e+t,0)/o.length:0}function Ir(e,t){return{id:`${e.component}:${t.key}`,baseComponent:e.component,label:t.label,intentDeltas:t.intentDeltas,rubricDeltas:t.rubricDeltas,buildProps:o=>e.buildProps(o,t),rationale:t.description??`Registered ${e.component} variant: ${t.label}.`,source:"manual",variantKey:t.key,tags:t.tags}}function Rr(e,t,o){return e.some(e=>e.props?.[t]===o)}var Nr=new Set(["BarChart","GroupedBarChart","StackedBarChart","DotPlot"]);var Tr=(e,t,o)=>function(e,t,o){const r=new Map,n=e=>{for(const t of e)t&&t.id&&t.baseComponent&&(r.has(t.id)||r.set(t.id,t))};n(function(e,t,o){const r=o.profile,n=o.existingVariants??t.variants??[],a=jr(o.intent),i=[];for(const e of n)i.push(Ir(t,e));const s=a.includes("rank")||a.includes("compare-categories");!Nr.has(e)||"categorical"!==t.family||Rr(n,"orientation","horizontal")||!s&&6>(r.categoryCount??0)||i.push({id:e+":heuristic-horizontal",baseComponent:e,label:"Horizontal ranked view",intentDeltas:{rank:1,"compare-categories":.5},rubricDeltas:{precision:1},buildProps:e=>({...t.buildProps(e),orientation:"horizontal",sort:"desc"}),rationale:"Horizontal orientation improves label legibility and rank scanning for categorical comparisons.",source:"heuristic",tags:["horizontal","ranked"]});const c=Rr(n,"normalize",!0)||Rr(n,"type","percent")||n.some(e=>/normal|percent/i.test(`${e.key} ${e.label}`));if(/Stacked/.test(e)&&!c&&(a.includes("part-to-whole")||a.includes("composition-over-time"))&&i.push({id:e+":heuristic-normalized",baseComponent:e,label:"Normalized composition",intentDeltas:{"part-to-whole":1,"compare-categories":-.5},rubricDeltas:{precision:-1},buildProps:e=>({...t.buildProps(e),normalize:!0}),rationale:"Normalization emphasizes proportional composition when absolute magnitude is secondary.",source:"heuristic",tags:["normalized","part-to-whole"]}),a.length>0){const t=Qo().filter(t=>t.component!==e).filter(e=>null===e.fits(r)).map(e=>{const t=Pr(e,r);return{candidate:e,fit:$r(t,a),scores:t}}).filter(e=>e.fit>=4).sort((e,t)=>t.fit!==e.fit?t.fit-e.fit:t.candidate.rubric.accuracy!==e.candidate.rubric.accuracy?t.candidate.rubric.accuracy-e.candidate.rubric.accuracy:t.candidate.rubric.familiarity-e.candidate.rubric.familiarity).slice(0,3);for(const{candidate:e,fit:o}of t)i.push({id:`${e.component}:heuristic-${a.join("-")}`,baseComponent:e.component,label:e.component+" alternative",buildProps:t=>e.buildProps(t),rationale:`${e.component} is a strong ${a.join(" + ")} alternative (${o.toFixed(1)}/5) for this data shape.`,source:"heuristic",tags:["cross-family",e.family]})}return i}(e,t,o));for(const r of Ar)try{n(r(e,t,o)??[])}catch(e){void 0!==console&&console.warn("[variantDiscovery] proposer threw:",e)}return Array.from(r.values())}(e,t,o),Lr=(e,t,o,r={})=>{const n=Jo(e.baseComponent);if(!n)return{proposalId:e.id,fit:0,novelty:1,risk:1,reasons:[`No capability registered for proposed component "${e.baseComponent}".`]};const a=n.fits(t);if(null!==a)return{proposalId:e.id,fit:0,novelty:"manual"===e.source?.2:.7,risk:1,reasons:["Rejected: "+a]};const i=jr(r.intent),s=Pr(n,t,e.intentDeltas),c=$r(s,i),l=function(e,t){return t?{familiarity:Math.round(kr((o={familiarity:e.familiarity+(t.familiarity??0),accuracy:e.accuracy+(t.accuracy??0),precision:e.precision+(t.precision??0)}).familiarity,1,5)),accuracy:Math.round(kr(o.accuracy,1,5)),precision:Math.round(kr(o.precision,1,5))}:e;var o}(n.rubric,e.rubricDeltas);let p;const u=o?.receptionModality;if(u&&"visual"!==u){const r=e.variantKey?n.variants?.find(t=>t.key===e.variantKey):void 0,a=e.buildProps?e.buildProps(t,o):n.buildProps(t,r);p=tr(Ge(e.baseComponent,a),u)}const y=or(c,l,e.baseComponent,o,p),m=kr(y.score,0,5);let d="manual"===e.source?.15:"heuristic"===e.source?.45:.75;r.baselineComponent&&r.baselineComponent!==e.baseComponent&&(d+=.2),e.variantKey||(d+=.05),d=kr(d,0,1);let h="manual"===e.source?.1:"heuristic"===e.source?.25:.45;0>(e.rubricDeltas?.accuracy??0)&&(h+=.15),0>(e.rubricDeltas?.precision??0)&&(h+=.1),l.accuracy>3||(h+=.1),3>m&&(h+=.2),h=kr(h,0,1);const g=[];if(e.rationale&&g.push(e.rationale),i.length>0){const e=i.map(e=>`${e}: ${(s[e]??0).toFixed(1)}/5`).join(", ");g.push(`Intent fit — ${e}.`)}else g.push(`Mean non-zero intent fit ${c.toFixed(1)}/5.`);return"manual"!==e.source&&g.push(e.source+" proposal; verify against domain context."),y.appliedReason&&g.push(y.appliedReason),y.receivabilityReason&&g.push(y.receivabilityReason),e.rubricDeltas&&Object.values(e.rubricDeltas).some(e=>0>(e??0))&&g.push("Rubric tradeoff: improves one reading mode while reducing precision or accuracy."),{proposalId:e.id,fit:m,novelty:d,risk:h,reasons:g}},Br=new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),Er=new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),Or=new Set(["PieChart","DonutChart","FunnelChart"]),Fr=new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]);function Dr(e,t){return Er.has(e)||Or.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 Mr(e){for(const t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){const o=e[t];if("string"==typeof o&&o)return o}}function zr(e,t){return null==e?"—":e instanceof Date?e.toISOString().slice(0,10):"number"==typeof e?t(e):e+""}var Hr={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",CrucibleChart:"crucible physics chart",PhysicsCustomChart:"custom physics chart"},_r=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),Gr=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]);function Wr(e){return Hr[e]||e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()+" chart"}function qr(e){const t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}var Ur=new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),Vr={"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"},Yr={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},Xr=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],Kr={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"};function Qr(e){return Vr[e]}function Jr(e,t){const o=function(e){if(e){if("fits"in e||"buildProps"in e){const t=e,o={};for(const[e,r]of Object.entries(t.intentScores))"number"==typeof r&&Number.isFinite(r)&&(o[e]=r);return{family:t.family,intentScores:Object.keys(o).length?o:void 0}}return e}}(t);if(o?.act)return o.act;if(o?.intentScores){const e=function(e){let t,o=0;for(const[r,n]of Object.entries(e))if("number"==typeof n&&n>0)if(n>o)t=r,o=n;else if(n===o&&void 0!==t){const e=Xr.indexOf(r),o=Xr.indexOf(t);-1===e||-1!==o&&e>=o||(t=r)}return t}(o.intentScores);if(e&&Vr[e]&&(o.intentScores[e]??0)>=3)return Vr[e]}return o?.family?Yr[o.family]:function(e){return Or.has(e)||"StackedAreaChart"===e?"apportioning":Ur.has(e)?"relating":Er.has(e)?"comparing":Fr.has(e)?"characterizing":Br.has(e)?"tracking":_r.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}var Zr=new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),en=new Set(["system","agent","watcher"]),tn=new Set(["ai","agent","system","computed","dbt","great-expectations"]),on=new Set(["rule","statistical-test","llm-inference","computed"]);function rn(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||!Zr.has(t.type))return!1;const o=t.provenance;return!(!o||"object"!=typeof o)&&(en.has(o.authorKind)||tn.has(o.source)||on.has(o.basis))})}function nn(e="en"){let t,o;try{t=new Intl.NumberFormat(e,{notation:"compact",maximumFractionDigits:1}),o=new Intl.NumberFormat(e,{maximumFractionDigits:2})}catch{t=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),o=new Intl.NumberFormat("en",{maximumFractionDigits:2})}return e=>Number.isFinite(e)?1e4>Math.abs(e)?o.format(e):t.format(e):e+""}var an={"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 sn(e){const t=an["string"==typeof e.type?e.type:"annotation"]||"an annotation",o=function(e){const t=e.provenance&&"object"==typeof e.provenance?e.provenance:null,o=t?.authorKind??t?.source??t?.basis;return"watcher"===o?"a watcher-flagged ":"agent"===o||"ai"===o||"llm-inference"===o?"an AI-suggested ":""}(e),r=o?o+t.replace(/^an? /,""):t,n="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return n?`${r} labeled "${n}"`:r}function cn(e){const t=Array.isArray(e.annotations)?e.annotations:null;if(!t||0===t.length)return;const o=a(t.filter(e=>!!e&&"object"==typeof e));if(0===o.length)return;const r=o.map(sn),n=r.slice(0,5),i=r.length-n.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]??""}(n)+(i>0?`, and ${i} more`:""),c=o.length;return`The author has marked ${1===c?"one feature":c+" features"} on this chart: ${s}.`}function ln(e,t,o={}){const r=void 0!==o.levels,n=new Set(o.levels??["l1","l2","l3"]);r||!o.capability&&!rn(t)||n.add("l4");const a=gt(e,t,o.recipe);if(a){const e=["l1","l2","l3","l4"].filter(e=>n.has(e));r||e.includes("l4")||e.push("l4");const i=function(e,t,o={}){const r=ht(t),n=dt(t),a=o.locale??"en",i="function"==typeof e.description?e.description({data:r,config:n,locale:a}):void 0,s=i?.levels??function(e,t,o,r){const n=vt(e,["nominal","ordinal"]),a=vt(e,["quantitative"]),i=n?bt(n,o,t):void 0,s=a?bt(a,o,t):void 0,c=n?.role??i??"category",l=a?.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:m}=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})}}}(r),d=new Map;if(i&&s)for(const e of t){const t=(e[i]??"Uncategorized")+"",o=Number(e[s]);Number.isFinite(o)&&d.set(t,(d.get(t)??0)+o)}const h=[...d].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,w=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,C=e.audience?.primary??e.audienceFit?.find(e=>"strong"===e.fit)?.audience;return{l1:`A ${e.name.toLowerCase()} encodes ${c} and ${l}. ${x=u,x?x.charAt(0).toUpperCase()+x.slice(1):x}.`,l2:h.length>0?`${h.length} categories total ${y.format(g)}. ${b[0]} accounts for ${y.format(b[1])}${g>0?` (${m.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 ${m.format(v)}.`,l4:`The chart is intended for ${w??"explanation"}${C?` with a ${C} audience`:""}: ${e.designContract.whyCustom}`};var x}(e,r,n,a),c=o.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=o.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>"Misuse: "+e)]:void 0;return{text:p,levels:l,...u?.length?{caveats:u}:{}}}(a,t,{levels:e,locale:o.locale,audience:o.audience,includeCaveats:o.includeCaveats}),s=cn(t);return{...i,text:s?`${s} ${i.text}`.trim():i.text,...s?{annotations:s}:{}}}const i=nn(o.locale??"en"),s=Wr(e),p=Array.isArray(t.data)?t.data:null,u=Mr(t),y=Gr.has(e)?function(e,t){const o=e.physics&&"object"==typeof e.physics?e.physics:null,r=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,n=[e.settledProjectionRows,e.projectionRows,r?.rows,o?.settledProjectionRows,o?.projectionRows,o?.settledProjection&&"object"==typeof o.settledProjection?o.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(n)?n.map((e,o)=>{if(!e||"object"!=typeof e)return null;const r=e,n=qr(r.count??r.value??r.total??r.bodies??r.events);if(null==n)return null;const a=r.label??r.id??r.name??"container "+(o+1),i=qr(r.secondary??r.secondaryCount),s=qr(r.observed??r.observedCount);return{label:zr(a,t),count:n,...null!=i?{secondary:i}:{},..."string"==typeof r.secondaryLabel&&r.secondaryLabel?{secondaryLabel:r.secondaryLabel}:{},...null!=s?{observed:s}:{}}}).filter(e=>null!=e):null}(t,i):null,{measure:m,measureFallback:d,dimension:h,dimensionFallback:g}=Dr(e,t),b="string"==typeof m&&m?m:d,f="string"==typeof h&&h?h:g,v={};if(Gr.has(e)&&function(e,t,o,r,n,a){const i=function(e){return"EventDropChart"===e?"time window":"GaltonBoardChart"===e?"bin":"CollisionSwarmChart"===e?"group lane":"PhysicalFlowChart"===e?"flow node":"CrucibleChart"===e?"result group":"container"}(e),s=function(e){return"EventDropChart"===e?"event":"GaltonBoardChart"===e?"sample":"CollisionSwarmChart"===e?"point":"PhysicalFlowChart"===e?"packet":"CrucibleChart"===e?"settled item":"body"}(e);if(n.has("l1")&&(r.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.":"CrucibleChart"===e?"A crucible physics chart that replays authored phases and events into declared products and outlets; the settled ledger, not collisions, determines the result.":`A ${t} whose accessible reading is the settled projection rather than individual trajectories.`}(e,t)),!n.has("l2")&&!n.has("l3"))return;if(!o||0===o.length)return void(n.has("l2")&&(r.l2="No settled projection is loaded yet."));const c=o.reduce((e,t)=>e+t.count,0),l=o.filter(e=>e.count>0).sort((e,t)=>t.count-e.count),p=l[0]??o.slice().sort((e,t)=>t.count-e.count)[0];if(!p)return;const u=o.reduce((e,t)=>e+(t.secondary??0),0),y=o.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(n.has("l2"))if(0===l.length)r.l2=`The settled projection contains ${a(c)} ${un(c,s)} across ${o.length} ${un(o.length,i)}; no ${un(2,i)} are non-empty yet.`;else{const e=u>0?` ${a(u)} ${un(u,s)} ${1===u?"is":"are"} marked ${y}.`:"";r.l2=`The settled projection contains ${a(c)} ${un(c,s)} across ${o.length} ${un(o.length,i)}; ${l.length} ${un(l.length,i)} ${1===l.length?"is":"are"} non-empty. The largest ${i} is ${p.label} with ${a(p.count)} ${un(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 o=e/t*100;return(10>o?Math.round(10*o)/10:Math.round(o))+"%"}(p.count,c);r.l3=e?`The settled projection is most concentrated in ${p.label}, which holds ${a(p.count)} ${un(p.count,s)} (${t}); ${e.label} follows with ${a(e.count)} ${un(e.count,s)}.`:`The settled projection is concentrated in ${p.label}, which holds all ${a(p.count)} ${un(p.count,s)}.`}}(e,s,y,v,n,i),n.has("l1")&&!Gr.has(e))if(Br.has(e)||Er.has(e))v.l1=`A ${s} of ${b} by ${f}`+(u?`, split by ${u}.`:".");else if(Or.has(e))v.l1=`A ${s} showing ${b} across ${f} categories.`;else if(Fr.has(e))v.l1=`A ${s} of the distribution of ${b}`+(u?` by ${u}.`:".");else if(_r.has(e)){const e=Array.isArray(t.nodes)?t.nodes.length:void 0,o=Array.isArray(t.edges)?t.edges.length:void 0,r=[null!=e?`${e} ${un(e,"node")}`:null,null!=o?`${o} ${un(o,"edge")}`:null].filter(Boolean);v.l1=`A ${s}${r.length?" with "+r.join(" and "):""}.`}else if("BigNumber"===e){const e="string"==typeof t.label?t.label:b;v.l1=`A single value${e?" for "+e:""}.`}else v.l1=`A ${s}.`;const w=Br.has(e)||Er.has(e)||Or.has(e)||Fr.has(e);let C=null;if((n.has("l2")||n.has("l3")||n.has("l4"))&&w&&p&&p.length>0&&(C=function(e,t,o,r){let n=0,a=0,i=1/0,s=-1/0,c=null,l=null,p=0,u=0,y=null,m=null,d=NaN,h=NaN;for(const o of e){const e=t(o);Number.isFinite(e)&&(0===n&&(d=e,y=o),h=e,m=o,i>e&&(i=e,c=o,p=n),e>s&&(s=e,l=o,u=n),n++,a+=e)}return 0===n?null:{count:n,min:i,max:s,mean:a/n,minLabel:zr(null!=c?o(c):null,r),maxLabel:zr(null!=l?o(l):null,r),first:d,last:h,firstLabel:zr(null!=y?o(y):null,r),lastLabel:zr(null!=m?o(m):null,r),minIndex:p,maxIndex:u}}(p,c(m,d),l(h,g),i)),n.has("l2")&&w&&(p&&0!==p.length?C&&(v.l2=Or.has(e)?`${C.count} segments totaling ${i(function(e){return e.mean*e.count}(C))}. Largest is ${C.maxLabel} at ${i(C.max)}; smallest is ${C.minLabel} at ${i(C.min)}.`:`${b} ranges from ${i(C.min)} (${C.minLabel}) to ${i(C.max)} (${C.maxLabel}), with a mean of ${i(C.mean)} across ${C.count} points.`):v.l2="No data is loaded yet."),n.has("l3")&&C&&!u&&Br.has(e)?v.l3=function(e,t,o){const{first:r,last:n,min:a,max:i,maxLabel:s,minLabel:c,firstLabel:l,lastLabel:p,minIndex:u,maxIndex:y,count:m}=e,d=i-a,h=n-r;if(0===d)return`${pn(t)} is constant at ${o(r)} across the series.`;if(.04>d/(Math.abs(e.mean)||1))return`${pn(t)} ends roughly where it started (${o(r)} at ${l} to ${o(n)} at ${p}), ranging between ${o(a)} and ${o(i)}.`;const g=y>0&&m-1>y,b=u>0&&m-1>u,f=(i-Math.max(r,n))/d,v=(Math.min(r,n)-a)/d;return g&&f>.15?`Overall ${t} climbs to a peak of ${o(i)} (${s}), then falls to ${o(n)} (${p}).`:b&&v>.15?`Overall ${t} drops to a low of ${o(a)} (${c}), then recovers to ${o(n)} (${p}).`:.05>Math.abs(h)/d?`${pn(t)} ends roughly where it started (${o(r)} at ${l} to ${o(n)} at ${p}), ranging between ${o(a)} and ${o(i)}.`:h>0?y===m-1?`Overall ${t} rises from ${o(r)} (${l}) to a peak of ${o(n)} (${p}).`:`Overall ${t} rises from ${o(r)} (${l}) to ${o(n)} (${p}), after peaking at ${o(i)} (${s}).`:u===m-1?`Overall ${t} falls from ${o(r)} (${l}) to a low of ${o(n)} (${p}).`:`Overall ${t} falls from ${o(r)} (${l}) to ${o(n)} (${p}), after dipping to ${o(a)} (${c}).`}(C,b,i):n.has("l3")&&C&&!u&&Er.has(e)&&(v.l3=`The highest ${f} is ${C.maxLabel} and the lowest is ${C.minLabel}.`),n.has("l4")){const r=rn(t)?"alerting":Jr(e,o.capability);r&&(v.l4=function(e,t,o,r,n,a,i,s){const c=Kr[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 o.label&&o.label?o.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 ${a} and ${n} move together`;break;default:p=`This is ${l} ${c} chart`,u=function(e,t,o,r,n,a){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 "+o;case"comparing":return`compare ${o} across ${r}`;case"ranking":return"read it top to bottom by "+o;case"apportioning":return`read each ${r}'s share of the whole`;case"characterizing":return"read it for the spread and shape of "+o;default:return"read the highlighted features"}switch(e){case"alerting":return function(e,t,o){if(Er.has(o)||Or.has(o))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;const{first:r,last:n,min:a,max:i,minLabel:s,maxLabel:c,lastLabel:l,minIndex:p,maxIndex:u,count:y}=e,m=i-a;if(m>0){const e=u>0&&y-1>u,o=p>0&&y-1>p,d=(i-Math.max(r,n))/m,h=(Math.min(r,n)-a)/m;if(e&&d>.15)return`the peak of ${t(i)} at ${c} is the point to investigate`;if(o&&h>.15)return`the dip to ${t(a)} at ${s} is the point to investigate`;if(n>=i)return`the climb to ${t(n)} at ${l} warrants a closer look`;if(a>=n)return`the drop to ${t(n)} at ${l} warrants a closer look`}return`the extremes — ${c} (${t(i)}) and ${s} (${t(a)}) — are the points to check`}(t,n,a);case"tracking":return`read it for the trajectory of ${o}, which ${function(e){const t=e.max-e.min,o=e.last-e.first;return 0===t||.05>Math.abs(o)/t?"holds roughly steady":o>0?"rises":"falls"}(t)} from ${n(t.first)} (${t.firstLabel}) to ${n(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${o} across ${r}; ${t.maxLabel} leads at ${n(t.max)}`;case"ranking":return`read it top to bottom by ${o}; ${t.maxLabel} ranks highest at ${n(t.max)}`;case"apportioning":{const e=t.mean*t.count,o=e>0?Math.round(t.max/e*100):null;return`read each ${r}'s share of the ${n(e)} total; ${t.maxLabel} is the largest at ${n(t.max)}${null!=o?` (${o}%)`:""}`}case"characterizing":return`read it for the spread of ${o}, from ${n(t.min)} to ${n(t.max)}`;default:return"read the highlighted features"}}(e,r,n,a,i,t)}return`${p}; ${u}.${function(e,t){if(!t)return"";const o=t.familiarity?.[e];return"number"!=typeof o||o>2?"":` This ${Wr(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`}(t,s)}`}(r,e,t,u?null:C,b,f,i,o.audience))}const x=["l1","l2","l3","l4"].filter(e=>n.has(e)&&v[e]).map(e=>v[e]).join(" "),A=cn(t);return{text:A?`${A} ${x}`.trim():x,levels:v,...A?{annotations:A}:{}}}function pn(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function un(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function yn(e){return((e??"unknown")+"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function mn(e,t,o={}){const r=o.locale??"en",n=Math.max(1,o.maxLeaves??200),i=nn(r),s=gt(e,t,o.recipe);if(s)return function(e,t,o={}){const r=ht(t),n=dt(t),a=Math.max(1,o.maxLeaves??200);if("function"==typeof e.navigation)return e.navigation({data:r,config:n,locale:o.locale??"en"});const i=(s=e.navigation)&&"object"==typeof s?e.navigation:void 0;var s;const c=(i?.groupByRole?ft(e,i.groupByRole):void 0)??(i?.groupBy?.[0]?ft(e,i.groupBy[0])??e.dataRoles.find(e=>e.field===i.groupBy?.[0]):void 0)??vt(e,["nominal","ordinal"]),l=c?bt(c,n,r):void 0,p=(i?.idRole?ft(e,i.idRole):void 0)??vt(e,["identifier"]),u=p?bt(p,n,r):void 0,y={id:"root",role:"chart",label:i?.summaryTemplate?wt(i.summaryTemplate,void 0,e,n,r,{count:r.length}):`${e.name}: ${r.length} ${1===r.length?"item":"items"} represented.`,level:1,children:[]};let m=0;const d=(t,o,a)=>{const s=u?t[u]:void 0,c=i?.itemLabelTemplate?wt(i.itemLabelTemplate,t,e,n,r,{count:r.length}):function(e,t,o,r){const n=vt(t,["nominal","ordinal"]),a=t.dataRoles.filter(e=>"quantitative"===e.semanticType),i=n?bt(n,o,r):void 0,s=[];i&&null!=e[i]&&s.push(e[i]+"");for(const t of a){const n=bt(t,o,r);n&&null!=e[n]&&s.push(`${t.role}: ${e[n]+""}`)}return s.length>0?s.join(", "):"Data item"}(t,e,n,r);return{id:"datum-"+yn(s??o),role:"datum",label:c,level:a,datum:t}};if(l){const e=new Map;for(const t of r){const o=(t[l]??"Uncategorized")+"",r=e.get(o);r?r.push(t):e.set(o,[t])}y.children=[...e].map(([e,t],o)=>{const r=t.slice(0,Math.max(0,a-m));m+=r.length;const n=r.map((e,t)=>d(e,1e5*o+t,3));return t.length>r.length&&n.push({id:"more-"+yn(e),role:"datum",label:`…and ${t.length-r.length} more items`,level:3}),{id:"group-"+yn(e),role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:n}})}else{const e=r.slice(0,a);y.children=e.map((e,t)=>d(e,t,2)),r.length>e.length&&y.children.push({id:"more",role:"datum",label:`…and ${r.length-e.length} more items`,level:2})}return y}(s,t,{maxLeaves:n,locale:r});const p={id:"root",role:"chart",label:ln(e,t,{locale:r}).text||"Chart.",level:1,children:[]},u=function(e,t){const o=Array.isArray(e.annotations)?e.annotations:null;if(!o)return null;const r=a(o.filter(e=>!!e&&"object"==typeof e));if(0===r.length)return null;let n=0;const i=r.slice(0,t).map(e=>{const t=e.lifecycle?.status,o=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+n++,role:"annotation",level:3,label:`${r=sn(e),r?r.charAt(0).toUpperCase()+r.slice(1):r}${o}.`,datum:e};var r});r.length>t&&i.push({id:"annotation-"+n++,role:"annotation",level:3,label:`…and ${r.length-t} more annotations.`});const s=r.length;return{id:"annotations",role:"annotation",level:2,label:`Annotations: ${1===s?"one marked feature":s+" marked features"}.`,children:i}}(t,n),y=Array.isArray(t.data)?t.data:null,m=Br.has(e)||Er.has(e)||Or.has(e)||Fr.has(e);if(!y||0===y.length||!m)return u&&(p.children=[u]),p;const{measure:d,measureFallback:h,dimension:g,dimensionFallback:b}=Dr(e,t),f=c(d,h),v=l(g,b),w="string"==typeof d&&d?d:h,C="string"==typeof g&&g?g:b,x=Mr(t);let A=0;const k=e=>`${e}-${A++}`,S=(e,t)=>{const o=e.slice(0,n).map(e=>((e,t)=>{const o=f(e),r=zr(v(e),i);return{id:k("datum"),role:"datum",level:t,label:`${r}: ${Number.isFinite(o)?i(o):"—"}`,value:Number.isFinite(o)?o:void 0,datum:e}})(e,t));return e.length>n&&o.push({id:k("more"),role:"datum",level:t,label:`…and ${e.length-n} more points`}),o},j=[];if(Br.has(e)||Er.has(e)){let t=1/0,o=-1/0,r=1/0,n=-1/0;const a=[];let s=!0;for(const e of y){const i=f(e);Number.isFinite(i)&&(t>i&&(t=i),i>o&&(o=i));const c=v(e);a.push(c),"number"==typeof c&&Number.isFinite(c)?(r>c&&(r=c),c>n&&(n=c)):s=!1}const c=new Set,l=[];for(const e of a){const t=e+"";c.has(t)||(c.add(t),l.push(e))}const p=s?`${i(r)} to ${i(n)}`:`${zr(l[0],i)} to ${zr(l[l.length-1],i)} (${Er.has(e)?l.length+" categories":y.length+" points"})`;j.push({id:k("axis"),role:"axis",level:2,label:`${Er.has(e)?"Category axis":"X axis"}: ${C}, ${p}.`}),t>o||j.push({id:k("axis"),role:"axis",level:2,label:`Value axis: ${w}, ${i(t)} to ${i(o)}.`})}if(x){const o=l(x,x),n=new Map;for(const e of y){const t=(o(e)??"—")+"",r=n.get(t);r?r.push(e):n.set(t,[e])}const a=[];for(const[o,i]of n){const n=ln(e,{...t,data:i},{levels:["l2","l3"],locale:r}).text;a.push({id:k("series"),role:"series",level:2,label:`Series ${o}: ${n}`,children:S(i,3)})}p.children=[...j,...a]}else p.children=[...j,...S(y,2)];return u&&p.children.push(u),p}function dn(e,t){const o=[],r=e=>{if(o.push(e),e.children&&e.children.length>0&&t.has(e.id))for(const t of e.children)r(t)};return r(e),o}function hn(e){let t=1;if(e.children)for(const o of e.children)t+=hn(o);return t}var gn=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function bn(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function fn(e){return bn(e)?e:void 0}function vn(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function wn(e){const t=vn(e);return null==t?void 0:Math.max(0,Math.floor(t))}function Cn(...e){return e.map(fn).find(Boolean)}function xn(...e){return e.find(Array.isArray)}function An(e){const t={};for(const[o,r]of Object.entries(e))void 0!==r&&(t[o]=r);return t}function kn(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function Sn(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function jn(e,t,o){const r=e?.filter(e=>!0===fn(e)?.sensor).length,n=fn(t?.observation),a=fn(n?.sensors),i=xn(o?.activeSensors);return Math.max(r??0,a?Object.keys(a).length:0,i?.length??0)||void 0}function Pn(e,t,o={}){const{capability:r,audience:n,locale:a}=o,i=o.levels??["l1","l2","l3"],s=!1!==o.includeStructure,c=Jr(e,r),l=ln(e,t,{levels:c?[...i,"l4"]:i,locale:a,capability:r,audience:n}),{l4:p,...u}=l.levels,y=["l1","l2","l3"].map(e=>l.levels[e]).filter(Boolean).join(" "),m={levels:u,text:l.annotations?`${l.annotations} ${y}`.trim():y,...l.annotations?{annotations:l.annotations}:{}};let d;if(c&&p){const e=(h=r)?"fits"in h||"buildProps"in h?{family:h.family}:{family:h.family,intentScores:h.intentScores}:{};d={act:c,sentence:p,family:e.family,intentScores:e.intentScores}}var h;const g=s?mn(e,t,{maxLeaves:o.maxLeaves,locale:a}):void 0,b=function(e,t,o){if(!1===o)return;const r=bn(o)?o:void 0,n=fn(t.physics),a=Cn(r?.snapshot,n?.snapshot,t.physicsSnapshot,function(e){const t=fn(e);return!!t&&(bn(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),i=Cn(r?.evidence,n?.evidence,t.physicsEvidence,t.settledEvidence),s=Cn(r?.config,n?.config,a?.config,t.config),c=Cn(fn(a?.world),fn(n?.world)),l=Cn(fn(s?.kernel),fn(c?.options)),p=xn(c?.bodies),u=xn(c?.colliders,s?.colliders),y=xn(a?.queue,n?.queue),m=xn(a?.liveBodyOrder),d=xn(c?.springs),h=xn(a?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const o=fn(e);if(!o)return;const r=vn(o.count??o.value??o.total??o.bodies??o.events);if(null==r)return;const n=(o.label??o.id??o.name??"container "+(t+1))+"",a=null==o.id?void 0:o.id+"",i=vn(o.secondary??o.secondaryCount),s=vn(o.observed??o.observedCount);return An({id:a,label:n,count:r,secondary:i,secondaryLabel:"string"==typeof o.secondaryLabel?o.secondaryLabel:void 0,observed:s})}).filter(e=>null!=e);if(0===t.length)return;const o=t.reduce((e,t)=>e+t.count,0),r=t.filter(e=>e.count>0).length,n=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:o,populatedCount:r,...n?{leader:n}:{}}}(function(e,t,o,r){const n=fn(e.settledProjection),a=fn(t?.settledProjection);return xn(o?.projectionRows,o?.aggregates,e.settledProjectionRows,e.projectionRows,n?.rows,t?.settledProjectionRows,t?.projectionRows,a?.rows,r?.binCounts)}(t,n,r,i)),b=function(e,t){const o=e?.map((e,t)=>{const o=fn(e);if(!o)return;const r=vn(o.count)??0,n=vn(o.total),a={label:(o.label??o.id??"sediment "+(t+1))+"",count:r};return null!=o.id&&(a.id=o.id+""),null!=n&&(a.total=n),a}).filter(e=>null!=e),r=wn(t?.bins)??o?.length??0,n=vn(t?.count)??o?.reduce((e,t)=>e+t.count,0)??0,a=vn(t?.total)??o?.reduce((e,t)=>e+(t.total??0),0),i=o?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==r||0!==n||a)return{bins:r,count:n,...null!=a&&a>0?{total:a}:{},...i?{leader:i}:{}}}(xn(r?.sediment,n?.sediment,a?.sediment),Cn(r?.sedimentTotals,n?.sedimentTotals)),f=m?.length??p?.length??wn(i?.bodyCount),v=function(e){if(e)return e.filter(e=>!0===fn(e)?.sleeping).length}(p)??wn(i?.sleepingCount),w=y?.length,C="string"==typeof a?.simulationState?a.simulationState:void 0,x="boolean"==typeof i?.settled?i.settled:C?"settled"===C:null!=f||null!=v||null!=w?null!=f&&v===f&&0===(w??0):void 0,A=fn(l?.gravity),k=vn(A?.x),S=vn(A?.y),j=An({state:C,settled:x,elapsedSeconds:vn(a?.elapsedSeconds),paused:"boolean"==typeof a?.paused?a.paused:void 0,visible:"boolean"==typeof a?.visible?a.visible:void 0,seed:vn(l?.seed),gravity:null!=k&&null!=S?{x:k,y:S}:void 0,fixedDt:vn(s?.fixedDt??l?.fixedDt),timeScale:vn(s?.timeScale),maxSubsteps:wn(s?.maxSubsteps),liveBodies:f,sleepingBodies:v,queued:w,bodyLimit:vn(s?.bodyLimit),eviction:"string"==typeof s?.eviction?s.eviction:void 0}),P=An({colliders:u?.length,sensors:jn(u,s,c),springs:d?.length,activeSensorPairs:h?.length}),$=Object.keys(P).length>0,I=gn.has(e);if(!(Object.keys(j).length>0||$||g||b)||!I&&null==o)return;const R={simulation:j,...$?{geometry:P}:{},...g?{aggregates:g}:{},...b?{sediment:b}:{}},N=function(e){const t=[],o=e.simulation,r=[o.state??(o.settled?"settled":void 0),null!=o.liveBodies?`${o.liveBodies} live ${kn(o.liveBodies,"body")}`:void 0,null!=o.sleepingBodies?o.sleepingBodies+" sleeping":void 0,null!=o.queued?o.queued+" queued":void 0,null!=o.seed?"seed "+Sn(o.seed):void 0,o.gravity?`gravity (${Sn(o.gravity.x)}, ${Sn(o.gravity.y)})`:void 0,null!=o.fixedDt?`fixed step ${Sn(o.fixedDt)}s`:void 0,null!=o.timeScale?Sn(o.timeScale)+"x time":void 0].filter(Boolean);r.length>0&&t.push(`Physics simulation: ${r.join("; ")}.`);const n=e.geometry;if(n){const e=[null!=n.colliders?`${n.colliders} ${kn(n.colliders,"collider")}`:void 0,null!=n.sensors?`${n.sensors} ${kn(n.sensors,"sensor")}`:void 0,null!=n.springs?`${n.springs} ${kn(n.springs,"spring")}`:void 0,null!=n.activeSensorPairs?`${n.activeSensorPairs} active sensor ${kn(n.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const a=e.aggregates;if(a){const e=a.leader,o=e?` Largest is ${e.label} with ${Sn(e.count)}.`:"";t.push(`Physics aggregates: ${Sn(a.totalCount)} settled ${kn(a.totalCount,"body")} across ${a.rows.length} ${kn(a.rows.length,"container")}; ${a.populatedCount} populated.${o}`)}const i=e.sediment;if(i){const e=null!=i.total?", value total "+Sn(i.total):"",o=i.leader?`; largest sediment bin is ${i.leader.label} with ${Sn(i.leader.count)}`:"";t.push(`Physics sediment: ${i.count} retained ${kn(i.count,"body")} in ${i.bins} ${kn(i.bins,"bin")}${e}${o}.`)}return t.join(" ")}(R);return{...R,text:N}}(e,t,o.physics),f=[m.text,d?.sentence,b?.text].filter(Boolean).join(" ");return{component:e,description:m,intent:d,structure:g,physics:b,text:f}}var $n={valid:!1,errors:[]};function In(e,t={}){const o=e.component,r=e.props??{},n=[],a=!!d[o];a||n.push(`Unknown component "${o}". It is not in the chart registry — pick a known chart.`);const i=a?g(o,r):{...$n};if(!i.valid)for(const e of i.errors)n.push(e);const s=!1!==t.diagnose&&a?Ne(o,r).diagnoses:[],c=s.filter(e=>"error"===e.severity),l=!1!==t.treatErrorsAsBlocking;if(l)for(const e of c)n.push(`${e.code}: ${e.message}`);let p,u,y,m,h;if((t.repair??!!t.data)&&t.data&&(p=xr(o,t.data,{intent:t.intent}),"alternative"===p.status?n.push(`${o} is a poor fit: ${p.reason}. Consider ${p.alternatives.map(e=>e.component).slice(0,3).join(", ")}.`):"unknown"===p.status&&n.push(`${o} could not be evaluated against the data; consider ${p.alternatives.map(e=>e.component).slice(0,3).join(", ")}.`)),a&&(u=jt(o,r),y=Nt(u)),t.render&&a){const e=t.render(o,r);h=e.svg,m=e.evidence,m.empty&&n.push("Rendered to an empty scene (no marks) — the data or accessors produce nothing to draw.");for(const e of m.warnings)n.push(e)}const b=a&&i.valid&&(!l||0===c.length)&&(!p||"ok"===p.status)&&(!m||!m.empty);return{ok:b,component:o,props:r,config:u,jsx:y,validation:i,diagnostics:s,repair:p,evidence:m,svg:h,reasons:b?[]:n}}function Rn(e={}){const t=e.components??Object.keys(d).sort();return{name:e.name??"render_semiotic_chart",description:"Render a Semiotic chart from a component name and props. The result is validated, diagnosed for anti-patterns, and (when data is supplied) checked for fit against the data. Inject a renderer to prove it paints; otherwise the result returns validation and repair reasons plus ranked alternatives.",inputSchema:{type:"object",additionalProperties:!1,required:["component"],properties:{component:{type:"string",enum:[...t],description:"The chart component to render."},props:{type:"object",description:"Props for the chart (accessors, data, encodings). See the component schema.",additionalProperties:!0}}}}}function Nn(e){return{name:e.name,description:e.description,input_schema:e.inputSchema}}function Tn(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.inputSchema}}}function Ln(e,t=!0){if(!e||"object"!=typeof e||Array.isArray(e))return!1;const o=e,r=Array.isArray(o.type)?o.type:[o.type],n=r.includes("object")||!!o.properties;if(t&&!n)return!1;if(n){if(!1!==o.additionalProperties)return!1;const e=o.properties;if(!e||"object"!=typeof e||Array.isArray(e))return!1;const t=new Set(Array.isArray(o.required)?o.required:[]);if(Object.keys(e).some(e=>!t.has(e)))return!1;if(!Object.values(e).every(e=>Ln(e,!1)))return!1}if(r.includes("array")&&(!o.items||!Ln(o.items,!1)))return!1;for(const e of["anyOf","oneOf","allOf"]){if(void 0===o[e])continue;const t=o[e];if(!Array.isArray(t)||0===t.length)return!1;if(!t.every(e=>Ln(e,!1)))return!1}return!0}function Bn(e,t={}){const o=t.strict??!1;if(o&&!Ln(e.inputSchema))throw Error("OpenAI strict mode requires a top-level object schema, closed object schemas, and every property required. chartGenerationTool() intentionally leaves props open for chart-specific props; use strict: false or pass a component-specific closed schema.");return{type:"function",name:e.name,description:e.description,parameters:e.inputSchema,strict:o}}function En(e){return t=>In(t,e?e(t):{})}var On={BarChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server",docsRoute:"/charts/bar-chart",pilot:!0},StackedBarChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},GroupedBarChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},SwarmPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},BoxPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},Histogram:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},ViolinPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},RidgelinePlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},DotPlot:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},PieChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},DonutChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},GaugeChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},FunnelChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},SwimlaneChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},LikertChart:{category:"ordinal",recommendedImport:"semiotic/ordinal",serverImport:"semiotic/server"},LineChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server",docsRoute:"/charts/line-chart",pilot:!0},AreaChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},DifferenceChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},StackedAreaChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},Scatterplot:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},BubbleChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},Heatmap:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},QuadrantChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},MultiAxisLineChart:{category:"xy",recommendedImport:"semiotic/xy"},CandlestickChart:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},ConnectedScatterplot:{category:"xy",recommendedImport:"semiotic/xy",serverImport:"semiotic/server"},ScatterplotMatrix:{category:"xy",recommendedImport:"semiotic/xy"},MinimapChart:{category:"xy",recommendedImport:"semiotic/xy"},ForceDirectedGraph:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server",docsRoute:"/charts/force-directed-graph",pilot:!0},SankeyDiagram:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},ProcessSankey:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},ChordDiagram:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},TreeDiagram:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},Treemap:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},CirclePack:{category:"network",recommendedImport:"semiotic/network",serverImport:"semiotic/server"},OrbitDiagram:{category:"network",recommendedImport:"semiotic/network"},ChoroplethMap:{category:"geo",recommendedImport:"semiotic/geo",serverImport:"semiotic/server"},ProportionalSymbolMap:{category:"geo",recommendedImport:"semiotic/geo",serverImport:"semiotic/server"},FlowMap:{category:"geo",recommendedImport:"semiotic/geo",serverImport:"semiotic/server",docsRoute:"/charts/flow-map",pilot:!0},DistanceCartogram:{category:"geo",recommendedImport:"semiotic/geo"},RealtimeLineChart:{category:"realtime",recommendedImport:"semiotic/realtime",docsRoute:"/charts/realtime-line-chart",pilot:!0},RealtimeHistogram:{category:"realtime",recommendedImport:"semiotic/realtime"},TemporalHistogram:{category:"realtime",recommendedImport:"semiotic/realtime",serverImport:"semiotic/server"},RealtimeSwarmChart:{category:"realtime",recommendedImport:"semiotic/realtime"},RealtimeWaterfallChart:{category:"realtime",recommendedImport:"semiotic/realtime"},RealtimeHeatmap:{category:"realtime",recommendedImport:"semiotic/realtime"},GaltonBoardChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server",docsRoute:"/charts/galton-board-chart",pilot:!0},EventDropChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},PhysicsPileChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},CollisionSwarmChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},GauntletChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},CrucibleChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},ProcessFlowChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},PhysicalFlowChart:{category:"physics",recommendedImport:"semiotic/physics",serverImport:"semiotic/server"},BigNumber:{category:"value",recommendedImport:"semiotic/value",docsRoute:"/charts/big-number",pilot:!0}};function Fn(e){const t=On[e];return t?{category:t.category,recommendedImport:t.recommendedImport,...t.serverImport?{serverImport:t.serverImport}:{},...t.docsRoute?{docsRoute:t.docsRoute}:{},note:t.pilot?"This chart is in the ChartDefinition pilot. Its module and server support are explicit; existing family facades remain compatible.":"Use the family facade today. Granular chart modules are a later package-boundary migration, so this recommendation does not claim a smaller per-chart bundle."}:{note:"Unknown chart component: no package or server guidance can be determined."}}function Dn(e){if(!e)return{state:"not-observed",pending:[]};const t=Object.keys(e.revisions).filter(t=>e.revisions[t]>(e.consumed?.[t]??0));return{state:0===t.length?"fully-consumed":"pending-consumption",revisions:{...e.revisions},...e.consumed?{consumed:{...e.consumed}}:{},pending:t}}function Mn(e){return{status:e.status,frameType:e.frameType,markCount:e.markCount,markCountByType:{...e.markCountByType},...e.xDomain?{xDomain:[...e.xDomain]}:{},...e.yDomain?{yDomain:[...e.yDomain]}:{},...e.categories?{categories:[...e.categories]}:{},...void 0!==e.nodeCount?{nodeCount:e.nodeCount}:{},...void 0!==e.edgeCount?{edgeCount:e.edgeCount}:{}}}function zn(e){const{createdAt:t,...o}=e;return o}function Hn(e,t={}){const o=In({component:e.component,props:e.props??{}},{repair:!1}),r=[...o.reasons];let n;if(t.render&&o.ok)try{n=t.render(e.component,e.props??{}).evidence,n.empty&&r.push("EMPTY_SCENE: the renderer produced no data marks.");for(const e of n.warnings)r.includes(e)||r.push(e)}catch{r.push("RENDER_FAILED: static evidence could not be produced for this configuration.")}const a=o.ok&&!n?.empty&&!r.some(e=>e.startsWith("RENDER_FAILED"));return{mode:"read-only",component:e.component,...o.config?{normalizedConfig:zn(o.config)}:{},validation:o.validation,diagnostics:o.diagnostics,...n?{evidence:n,scene:Mn(n)}:{},revisions:Dn(e.revision),bundle:Fn(e.component),reasons:a?[]:r,ok:a}}export{We as accessibilityCaveats,Ge as auditAccessibility,Se as auditData,at as auditMobileVisualization,mn as buildNavigationTree,Pn as buildReaderGrounding,Rn as chartGenerationTool,Qr as communicativeActForIntent,Nt as configToJSX,Rt as copyConfig,hn as countNodes,En as createChartToolHandler,ln as describeChart,Ne as diagnoseConfig,Lr as evaluateVariantProposal,ur as explainCapabilityFit,dn as flattenVisible,Ve as formatAccessibilityAudit,pe as formatDataAudit,ct as formatMobileVisualizationAudit,Pt as fromConfig,It as fromURL,so as inferIntent,Hn as inspectChart,lt as mobileVisualizationCaveats,In as prepareChart,ao as profileData,le as profileNumericFields,Tr as proposeVariant,xr as repairChartConfig,Jr as resolveCommunicativeAct,yr as scoreChart,pr as suggestCharts,mr as suggestChartsGrouped,hr as suggestDashboard,Cr as suggestStreamCharts,dr as suggestStretchCharts,Ft as summarizeData,Nn as toAnthropicTool,jt as toConfig,ye as toDataAuditNotifications,Bn as toOpenAIResponsesTool,Tn as toOpenAITool,$t as toURL,g as validateProps};