semiotic 3.8.2 → 3.8.3
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.
- package/CLAUDE.md +1 -1
- package/README.md +34 -33
- package/ai/schema.json +1 -1
- package/ai/surface-manifest.json +1 -1
- package/ai/system-prompt.md +1 -1
- package/dist/{chunk-chunk-C6EJ4IOD.module.min.js → chunk-chunk-2CCFBTQC.module.min.js} +1 -1
- package/dist/chunk-chunk-2RXP3FS3.module.min.js +1 -0
- package/dist/chunk-chunk-4TMZXLCR.module.min.js +1 -0
- package/dist/{chunk-chunk-H4PPRW6N.module.min.js → chunk-chunk-5APBQXZA.module.min.js} +1 -1
- package/dist/{chunk-chunk-NO4MCQVD.module.min.js → chunk-chunk-5RKXZQ2P.module.min.js} +1 -1
- package/dist/chunk-chunk-6HSGDMTA.module.min.js +2 -0
- package/dist/{chunk-chunk-7LHMKRKE.module.min.js → chunk-chunk-7FW6EGLP.module.min.js} +1 -1
- package/dist/{chunk-chunk-RH5TSQPH.module.min.js → chunk-chunk-7OEOSCBP.module.min.js} +1 -1
- package/dist/{chunk-chunk-FAKO3RGQ.module.min.js → chunk-chunk-A63CTACR.module.min.js} +1 -1
- package/dist/chunk-chunk-ANYDWOZF.module.min.js +1 -0
- package/dist/{chunk-chunk-ZLKRTF5N.module.min.js → chunk-chunk-AZJUDQRM.module.min.js} +1 -1
- package/dist/{chunk-chunk-W3DB2MN4.module.min.js → chunk-chunk-B6V35LMY.module.min.js} +1 -1
- package/dist/chunk-chunk-BOSVL645.module.min.js +2 -0
- package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
- package/dist/chunk-chunk-F25UA5HT.module.min.js +1 -0
- package/dist/chunk-chunk-FRIO6MCV.module.min.js +1 -0
- package/dist/{chunk-chunk-T27ZEV6A.module.min.js → chunk-chunk-GWSWSPXN.module.min.js} +1 -1
- package/dist/chunk-chunk-I6C3KR5H.module.min.js +2 -0
- package/dist/chunk-chunk-IP2UE74X.module.min.js +1 -0
- package/dist/chunk-chunk-J5RL6GXU.module.min.js +2 -0
- package/dist/chunk-chunk-JNCHKRIR.module.min.js +2 -0
- package/dist/{chunk-chunk-Z5KXAVQD.module.min.js → chunk-chunk-L3H6DQCR.module.min.js} +1 -1
- package/dist/{chunk-chunk-5WEFWNUW.module.min.js → chunk-chunk-M7VYYHCE.module.min.js} +1 -1
- package/dist/chunk-chunk-MC35ILYP.module.min.js +2 -0
- package/dist/{chunk-chunk-2VUEY5TH.module.min.js → chunk-chunk-N72SWNBV.module.min.js} +1 -1
- package/dist/chunk-chunk-OBQRFTIL.module.min.js +2 -0
- package/dist/chunk-chunk-OQTLSTGI.module.min.js +2 -0
- package/dist/{chunk-chunk-2UN3ANRN.module.min.js → chunk-chunk-SA3D43RA.module.min.js} +1 -1
- package/dist/chunk-chunk-SANERMIZ.module.min.js +2 -0
- package/dist/{chunk-chunk-DNY43POY.module.min.js → chunk-chunk-UHSZEB74.module.min.js} +1 -1
- package/dist/{chunk-chunk-CYIML3AV.module.min.js → chunk-chunk-XQYVEKEJ.module.min.js} +1 -1
- package/dist/{chunk-chunk-27HVVXS6.module.min.js → chunk-chunk-Y6AXCRVO.module.min.js} +1 -1
- package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -6
- package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +11 -0
- package/dist/components/charts/shared/areaSeriesData.d.ts +15 -0
- package/dist/components/charts/shared/chartMode.d.ts +67 -0
- package/dist/components/charts/shared/colorUtils.d.ts +8 -0
- package/dist/components/charts/shared/geoStyleDefaults.d.ts +3 -0
- package/dist/components/charts/shared/hooks.d.ts +13 -80
- package/dist/components/charts/shared/useChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useXYLineStyle.d.ts +3 -2
- package/dist/components/charts/shared/xyLineStyle.d.ts +21 -0
- package/dist/components/charts/xy/LineChart.d.ts +3 -0
- package/dist/components/legendLayout.d.ts +31 -0
- package/dist/components/server/serverChartConfigShared.d.ts +29 -0
- package/dist/components/server/serverChartConfigs.d.ts +2 -13
- package/dist/components/server/serverChartConfigsXY.d.ts +3 -0
- package/dist/components/server/serverGaugeOverlay.d.ts +28 -0
- package/dist/components/server/staticLegend.d.ts +7 -1
- package/dist/components/server/staticSVGChrome.d.ts +57 -0
- package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
- package/dist/components/stream/GeoSVGOverlay.d.ts +2 -0
- package/dist/components/stream/SceneToSVG.d.ts +8 -6
- package/dist/components/stream/SceneToSVGGeo.d.ts +10 -0
- package/dist/components/stream/SceneToSVGNetwork.d.ts +12 -0
- package/dist/components/stream/canvasBackground.d.ts +7 -0
- package/dist/components/stream/networkTypes.d.ts +2 -4
- package/dist/components/stream/renderBackend.d.ts +14 -0
- package/dist/components/stream/sceneToSVGShared.d.ts +51 -0
- package/dist/components/types/legendTypes.d.ts +16 -3
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-chunk-6F6GEAQU.module.min.js +0 -1
- package/dist/chunk-chunk-BHYTYMY2.module.min.js +0 -2
- package/dist/chunk-chunk-E7MIQX7D.module.min.js +0 -2
- package/dist/chunk-chunk-ES4DCG3L.module.min.js +0 -1
- package/dist/chunk-chunk-IFYPMWKY.module.min.js +0 -1
- package/dist/chunk-chunk-L6D3I3V7.module.min.js +0 -2
- package/dist/chunk-chunk-ODUZEEBH.module.min.js +0 -2
- package/dist/chunk-chunk-P6UBCMSQ.module.min.js +0 -2
- package/dist/chunk-chunk-STZFFTAN.module.min.js +0 -2
- package/dist/chunk-chunk-U3AGQ5EF.module.min.js +0 -2
- package/dist/chunk-chunk-WDIN4LRC.module.min.js +0 -1
- package/dist/chunk-chunk-XOYX77KF.module.min.js +0 -2
- package/dist/chunk-chunk-ZTNVDWAK.module.min.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{GeoCustomChart as e}from"./chunk-chunk-P6UBCMSQ.module.min.js";import{BigNumber as t}from"./chunk-chunk-FYY2ACNJ.module.min.js";import{AccessibleNavTree as r,ChartContainer as n,ChartGrid as a,ContextLayout as o,DetailsPanel as i,IntentMark as s,MobileAnnotationCalloutList as c,MobileChartContainer as l,SmallMultipleChart as p,annotationFreshnessFor as u,applyAnnotationLifecycle as d,applyAnnotationStatus as y,auditMobileVisualization as m,buildNavigationTree as h,buildRecipeNavigationTree as g,communicativeActForIntent as b,computeAnnotationFreshness as f,configToJSX as v,copyConfig as w,countNodes as x,createIndexedDBConversationArcSink as A,createLocalStorageConversationArcSink as C,createWebhookConversationArcSink as k,currentTimestamp as S,defineChartRecipe as P,describeChart as j,describeRecipeChart as T,deserializeSelections as N,disableConversationArc as R,enableConversationArc as $,exportChart as I,fieldForRole as M,filterAnnotationsByStatus as B,flattenVisible as E,formatMobileVisualizationAudit as F,fromConfig as L,fromURL as D,fromVegaLite as _,getChartRecipe as O,getConversationArcStore as z,getRecipeLayout as H,getRegisteredRecipeCapabilities as G,hasRegisteredRecipeCapabilities as q,intentManifestFromRecipe as V,isJsonSafe as W,isRegisteredRecipeLayout as U,listChartRecipes as Y,loadConversationArc as X,mobileVisualizationCaveats as K,recipeConfig as Q,recipeIntentId as J,recipeToChartCapability as Z,recordAnnotationStatusChange as ee,recordAudienceChange as te,registerChartRecipe as re,registerConversationArcSink as ne,registerRecipeLayout as ae,replayConversationArc as oe,resolveChartRecipe as ie,resolveCommunicativeAct as se,resolveRecipeRoleField as ce,serializeSelections as le,subscribeToConversationArcChange as pe,summarizeIntentManifest as ue,toConfig as de,toURL as ye,unregisterChartRecipe as me,unregisterRecipeLayout as he,useNavigationSync as ge,validateChartRecipe as be,withCurrentProvenance as fe,withProvenance as ve}from"./chunk-chunk-C6EJ4IOD.module.min.js";import{MobileStandardControls as we,auditVisualizationControls as xe,clampMobileRange as Ae,useMobileRangeControls as Ce,zoomMobileRange as ke}from"./chunk-chunk-RCF52Z42.module.min.js";import{AreaChart as Se,BubbleChart as Pe,CandlestickChart as je,ConnectedScatterplot as Te,DEFAULT_QUADRANTS as Ne,DifferenceChart as Re,Heatmap as $e,LineChart as Ie,MinimapChart as Me,MultiAxisLineChart as Be,QuadrantChart as Ee,Scatterplot as Fe,ScatterplotMatrix as Le,StackedAreaChart as De,XYCustomChart as _e}from"./chunk-chunk-U3AGQ5EF.module.min.js";import{BarChart as Oe,BoxPlot as ze,DonutChart as He,DotPlot as Ge,FunnelChart as qe,GaugeChart as Ve,GroupedBarChart as We,Histogram as Ue,LikertChart as Ye,OrdinalCustomChart as Xe,PieChart as Ke,RidgelinePlot as Qe,StackedBarChart as Je,SwarmPlot as Ze,SwimlaneChart as et,ViolinPlot as tt}from"./chunk-chunk-W3DB2MN4.module.min.js";import"./chunk-chunk-YCQYG6J5.module.min.js";import{ChordDiagram as rt,CirclePack as nt,ForceDirectedGraph as at,NetworkCustomChart as ot,OrbitDiagram as it,ProcessSankey as st,SankeyDiagram as ct,TreeDiagram as lt,Treemap as pt}from"./chunk-chunk-E7MIQX7D.module.min.js";import{closestMatch as ut,validateArrayData as dt,validateNetworkData as yt,validateObjectData as mt}from"./chunk-chunk-JCG72SGW.module.min.js";import"./chunk-chunk-BHYTYMY2.module.min.js";import{RealtimeHeatmap as ht,RealtimeHistogram as gt,RealtimeLineChart as bt,RealtimeSwarmChart as ft,RealtimeWaterfallChart as vt,TemporalHistogram as wt}from"./chunk-chunk-ZTNVDWAK.module.min.js";import"./chunk-chunk-L6D3I3V7.module.min.js";import"./chunk-chunk-CYIML3AV.module.min.js";import"./chunk-chunk-ZLKRTF5N.module.min.js";import"./chunk-chunk-5WEFWNUW.module.min.js";import"./chunk-chunk-2UN3ANRN.module.min.js";import"./chunk-chunk-XOYX77KF.module.min.js";import"./chunk-chunk-FAKO3RGQ.module.min.js";import"./chunk-chunk-5UKL5W76.module.min.js";import{CollisionSwarmChart as xt,EventDropChart as At,GaltonBoardChart as Ct,GauntletChart as kt,PhysicalFlowChart as St,PhysicsCustomChart as Pt,PhysicsPileChart as jt,ProcessFlowChart as Tt}from"./chunk-chunk-Z5KXAVQD.module.min.js";import"./chunk-chunk-SIRIJ3DY.module.min.js";import"./chunk-chunk-EMO5NUGE.module.min.js";import"./chunk-chunk-SV4XAZ3Q.module.min.js";import"./chunk-chunk-STZFFTAN.module.min.js";import{CategoryColorProvider as Nt,DEFAULT_LIFECYCLE_THRESHOLDS as Rt,LinkedCharts as $t,MultiLineTooltip as It,annotationBudget as Mt,annotationDrawsConnector as Bt,annotationStableId as Et,annotationType as Ft,bandFromAge as Lt,extractAllRows as Dt,isNoteAnnotation as _t,resolveResponsiveRules as Ot,responsiveRuleMatches as zt,useBrushSelection as Ht,useCategoryColors as Gt,useChartObserver as qt,useFilteredData as Vt,useLinkedChartsActive as Wt,useLinkedHover as Ut,useSelection as Yt,useSelectionActions as Xt}from"./chunk-chunk-ODUZEEBH.module.min.js";import"./chunk-chunk-JJ2OOIET.module.min.js";import{ThemeProviderWrapper as Kt,createStore as Qt,useTheme as Jt}from"./chunk-chunk-WCX6U47H.module.min.js";import"./chunk-chunk-KTWEBFMX.module.min.js";import"./chunk-chunk-ZCNBUZPL.module.min.js";import"./chunk-chunk-YHNZCPOZ.module.min.js";var[Zt,er]=Qt(e=>({tooltip:null,changeTooltip(t){e(()=>({tooltip:t}))}})),tr={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 rr(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}function nr(e,t){const r=[];null!=t&&"object"==typeof t||(t={});const n=tr[e];if(!n)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(tr).join(", ")}`]};for(const a of n.required)null==t[a]&&r.push(`"${a}" is required for ${e}.`);"array"!==n.dataShape||!Object.prototype.hasOwnProperty.call(n.props,"data")||n.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=n.props[e];if(t){if(!rr(a,t.type)){const n=Array.isArray(t.type)?t.type.join(" | "):t.type;r.push(`"${e}" should be ${n}, 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(n.props),o=new Set(a);for(const n of Object.keys(t))if(void 0!==t[n]&&!o.has(n)){const t=ut(n,a),o=t?`Unknown prop "${n}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${n}" for ${e}. Valid props: ${a.join(", ")}.`;r.push(o)}if("array"===n.dataShape){const a=t.data,o={};for(const e of n.dataAccessors){const r=t[e];"string"==typeof r&&(o[e]=r)}const i=dt({componentName:e,data:a,accessors:Object.keys(o).length>0?o:void 0});i&&r.push(i)}else if("object"===n.dataShape){const n=mt({componentName:e,data:t.data});n&&r.push(n)}else if("network"===n.dataShape){const a=yt({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:n.required.includes("nodes"),edgesRequired:n.required.includes("edges")});a&&r.push(a)}return{valid:0===r.length,errors:r}}import{interpolateLab as ar}from"d3-interpolate";function or(e){const t=e.unitValue??e.unit,r=e.icon??e.token;return{...e,...null!=t&&{unitValue:t},...null!=r&&{icon:r}}}function ir(e,t={}){const r=[],n=e.tokenSemantics,a=e.countStrategy,o=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 n||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>o&&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"!==n||"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"===n&&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"===n&&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"!==n&&"posterior-sample"!==n&&"hypothetical-case"!==n||!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"===n&&"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"!==n||"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 sr(e){return"measure"===e?"precise-comparison":"estimate probability"===e?"probability-estimation":"understand risk"===e?"risk-communication":"remember"===e?"memory":"decide"===e?"support-decision":e}function cr(e){const t=sr(e);return"precise-comparison"===t?["compare-categories","rank"]:"probability-estimation"===t?["distribution"]:"risk-communication"===t?["part-to-whole","distribution"]:"frequency-reasoning"===t?["distribution","compare-categories"]:"memory"===t||"editorial-engagement"===t?["compare-categories"]:"public-explanation"===t||"support-decision"===t?["distribution","compare-categories"]:["compare-categories"]}function lr(e){const t=sr(e.taskIntent),r="small"===(n=e.availableSpace)?25:"large"===n?100:50;var n;if("precise-comparison"===t)return{recommendedEncoding:"bar-or-line",rationale:"Use continuous position/length encodings when precise magnitude comparison is the primary task.",warnings:[],alternatives:["hybrid-bar-token","unitized-measure"]};if("probability-estimation"===t){const e={tokenType:"dot",tokenSemantics:"possible-outcome",countStrategy:"quantile",tokenCount:r,layout:"dotplot",labelPolicy:"text-plus-token"};return{recommendedEncoding:"quantile-dotplot",tokenEncoding:e,rationale:"This task asks readers to estimate probability from a distribution. Quantile tokens turn probability mass into countable possible outcomes.",warnings:ir(e),alternatives:["cdf-with-threshold","density-with-threshold"]}}if("risk-communication"===t){const t={tokenType:e.concreteEntity?"icon":"dot",icon:e.concreteEntity,tokenSemantics:"risk-case",countStrategy:"fixed-denominator",denominator:100,layout:"waffle",labelPolicy:"text-plus-token"};return{recommendedEncoding:"fixed-denominator-icon-array",tokenEncoding:t,rationale:"Risk is often clearer as natural frequency: highlighted cases out of a fixed denominator.",warnings:ir(t,{visibleTokens:100,maxRecommendedTokens:100}),alternatives:["labeled-percent","bar-with-risk-threshold"]}}if("memory"===t||"editorial-engagement"===t){const t={tokenType:e.concreteEntity?"glyph":"icon",icon:e.concreteEntity,tokenSemantics:"unitized-measure",countStrategy:"unitized",unitValue:1,layout:"grid",labelPolicy:"text-plus-token",unitMeaning:e.concreteEntity?"one token represents a unit of "+e.concreteEntity:"one token represents one unit"};return{recommendedEncoding:"semantic-isotype",tokenEncoding:t,rationale:"Semantic tokens are useful when the chart needs to make a topic concrete and memorable.",warnings:ir(t),alternatives:["labeled-bar","hybrid-bar-token"]}}if("frequency-reasoning"===t||"public-explanation"===t||"support-decision"===t){const t={tokenType:e.concreteEntity?"icon":"dot",icon:e.concreteEntity,tokenSemantics:"distribution"===e.dataType?"possible-outcome":"unitized-measure",countStrategy:"distribution"===e.dataType?"quantile":"unitized",unitValue:"distribution"===e.dataType?void 0:1,tokenCount:r,layout:"distribution"===e.dataType?"dotplot":"bar-segment",labelPolicy:"text-plus-token",unitMeaning:"distribution"===e.dataType?void 0:"one token represents one unit interval"};return{recommendedEncoding:"hybrid-continuous-token",tokenEncoding:t,rationale:"A hybrid view preserves measurement while adding countable tokens for explanation and decisions.",warnings:ir(t),alternatives:["bar-or-line","quantile-dotplot","fixed-denominator-icon-array"]}}return{recommendedEncoding:"bar-or-line",rationale:"Use continuous encodings unless the task needs frequency, risk, memory, or outcome reasoning.",warnings:[],alternatives:["unitized-measure","quantile-dotplot","fixed-denominator-icon-array"]}}function pr(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[n,a,o]=[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(n)+.7152*i(a)+.0722*i(o)}function ur(e,t){const r=pr(e),n=pr(t);return null===r||null===n?null:(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var dr=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),yr=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),mr=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),hr=new Set(["LineChart","AreaChart","StackedAreaChart"]),gr=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),br=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),fr=new Set(["PieChart","DonutChart"]),vr={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},wr=new Set(Object.keys(vr)),xr={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},Ar=new Set(["BigNumber"]),Cr=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),kr=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]),Sr=new Set(["OrbitDiagram",...kr]),Pr=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart"]),jr=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]),Tr=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),Nr=new Set(["MultiAxisLineChart"]),Rr=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),$r={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"},Ir=["xExtent","yExtent","rExtent"];function Mr(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:null}function Br(e,t,r){if("function"==typeof t)return t(e);const n="string"==typeof t?t:r;return e?.[n]}var Er=new Set(["category10","tableau10","set3","blues","reds","greens","oranges","purples","greys","viridis","plasma","inferno","magma","cividis","turbo"]),Fr=["xAccessor","yAccessor","timeAccessor","valueAccessor","categoryAccessor","colorBy","sizeBy","lineBy","areaBy","stackBy","groupBy","orderAccessor","y0Accessor","sourceAccessor","targetAccessor","nodeIDAccessor","childrenAccessor","costAccessor"];function Lr(e){return"object"==typeof e&&null!==e&&("tokenType"in e||"tokenSemantics"in e||"countStrategy"in e||"unitValue"in e||"unit"in e)}function Dr(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:void 0}function _r(e,t){const r=Dr(e.visibleTokens);if(null!=r)return r;const n=Dr(t.denominator);if("fixed-denominator"===t.countStrategy&&null!=n)return n;const a=Dr(t.tokenCount),o=Dr(t.maxTokens);return null!=a&&null!=o?Math.min(a,o):a??n??o}function Or(e,t){const r=[],n=nr(e,function(e){const t={...e};return delete t.tokenEncoding,delete t.visibleTokens,Lr(t.encoding)&&delete t.encoding,t}(t));for(const e of n.errors)r.push({severity:"error",code:"VALIDATION",message:e,fix:""});return tr[e]?(function(e,t,r){const n=tr[e];if(n){if("array"===n.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"===n.dataShape&&t.edges&&Array.isArray(t.edges)&&0===t.edges.length&&r.push({severity:"error",code:"EMPTY_EDGES",message:"edges is an empty array — network chart will render blank.",fix:'Provide at least one edge: edges={[{ source: "A", target: "B" }]}.'})}}(e,t,r),function(e,t,r){const n=t.width,a=t.height;if(void 0===n||"number"==typeof n&&n>0||r.push({severity:"error",code:"BAD_WIDTH",message:`width=${JSON.stringify(n)} — 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,n]=t.size;(null!=e&&0>=e||null!=n&&0>=n)&&r.push({severity:"error",code:"BAD_SIZE",message:`size=[${e}, ${n}] — both dimensions must be positive.`,fix:"Set size={[600, 400]}."})}}(0,t,r),function(e,t,r){const n=tr[e];if(!n||"array"!==n.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=a[0];if(!o||"object"!=typeof o)return;const i=Object.keys(o);for(const e of n.dataAccessors){const n=t[e];"string"==typeof n&&(n in o||r.push({severity:"error",code:"ACCESSOR_MISSING",message:`${e}="${n}" not found in data. Available fields: ${i.join(", ")}.`,fix:`Change ${e} to one of: ${i.map(e=>`"${e}"`).join(", ")}.`}))}}(e,t,r),function(e,t,r){dr.has(e)&&Array.isArray(t.data)&&r.push({severity:"error",code:"HIERARCHY_FLAT_ARRAY",message:e+" expects hierarchical data but received a flat array.",fix:'Pass a root object: data={{ name: "root", children: [...] }}. For flat data, use BarChart or LineChart.'})}(e,t,r),function(e,t,r){yr.has(e)&&(t.edges||t.data||r.push({severity:"error",code:"NETWORK_NO_EDGES",message:e+" requires an edges prop.",fix:'Provide edges={[{ source: "A", target: "B", value: 10 }]}.'}))}(e,t,r),function(e,t,r){const n=tr[e];if(!n||"array"!==n.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=a[0];if(!o||"object"!=typeof o)return;const i=t.xAccessor;"string"==typeof i&&o[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."})}(e,t,r),function(e,t,r){t.linkedHover&&!t.selection&&r.push({severity:"warning",code:"LINKED_HOVER_NO_SELECTION",message:"linkedHover is set but selection is not — this chart emits hover events but won't highlight from others.",fix:`Add selection={{ name: "${"object"==typeof t.linkedHover&&t.linkedHover.name||"hl"}" }} to receive cross-highlights.`})}(0,t,r),function(e,t,r){if(!mr.has(e))return;const n=t.rExtent||t.yExtent||t.valueExtent;n&&Array.isArray(n)&&n.length>=1&&null!=n[0]&&0!==n[0]&&r.push({severity:"warning",code:"NON_ZERO_BASELINE",message:`${e} has a non-zero baseline (${n[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, ${n[1]??"auto"}]}. For trend-focused charts, use LineChart instead.`})}(e,t,r),function(e,t,r){if(!hr.has(e))return;if(t.gapStrategy)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=t.yAccessor||"y";"string"==typeof a&&n.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.'})}(e,t,r),function(e,t,r){const n=t.width??600,a=t.height??400,o=t.margin;if(!o||"object"!=typeof o)return;const i=(o.left||0)+(o.right||0),s=(o.top||0)+(o.bottom||0);n>i||r.push({severity:"error",code:"MARGIN_OVERFLOW_H",message:`Horizontal margins (${i}px) >= width (${n}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,t,r),function(e,t,r){const n=tr[e];if(!n||"array"!==n.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=[];t.xAccessor&&"string"==typeof t.xAccessor&&o.push({prop:"xAccessor",name:t.xAccessor}),t.yAccessor&&"string"==typeof t.yAccessor&&o.push({prop:"yAccessor",name:t.yAccessor}),t.valueAccessor&&"string"==typeof t.valueAccessor&&o.push({prop:"valueAccessor",name:t.valueAccessor});const i=Math.min(a.length,5);for(const e of o){let t=!0;for(let r=0;i>r;r++){const n=a[r]?.[e.name];if("number"==typeof n&&Number.isFinite(n)){t=!1;break}}t&&r.push({severity:"error",code:"DEGENERATE_EXTENT",message:`${e.prop}="${e.name}" produces NaN or non-finite values for all sampled data points — chart extents will be invalid.`,fix:`Ensure data[].${e.name} contains finite numbers, or use a function accessor to transform values.`})}}(e,t,r),function(e,t,r){if(!gr.has(e))return;const n=t.barPadding;"number"==typeof n&&10>n&&r.push({severity:"warning",code:"BAR_PADDING_INVISIBLE",message:`barPadding=${n} is very small — bars may appear to have no spacing between them.`,fix:"Increase barPadding to at least 10 for visible gaps, e.g. barPadding={12}."})}(e,t,r),function(e,t,r){if("bottom"!==t.legendPosition)return;const n=t.margin;if(!n||"object"!=typeof n)return;const a=n.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,t,r),function(e,t,r){if(!t.showLegend)return;if("right"!==(t.legendPosition??"right"))return;const n=t.margin;if(!n||"object"!=typeof n)return;const a=n.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,t,r),function(e,t,r){if("Heatmap"!==e)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=n[0];if(a&&"object"==typeof a)for(const e of["xAccessor","yAccessor"]){const n=t[e];if("string"!=typeof n)continue;const o=a[n];"string"==typeof o&&r.push({severity:"warning",code:"HEATMAP_STRING_ACCESSOR",message:`${e}="${n}" resolves to string values (e.g. "${o}"). Heatmap will use categorical axis handling which may produce unexpected cell layout.`,fix:"If you intend categorical axes this is fine. Otherwise, convert values to numbers before passing data."})}}(e,t,r),function(e,t,r){const n=t.colorScheme;if(!n||!Array.isArray(n))return;const a="string"==typeof t.background?t.background:"#ffffff";if(!a.startsWith("#"))return;const o=[];for(const e of n){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ur(e,a);null!==t&&3>t&&o.push(`${e} (${t.toFixed(1)}:1)`)}o.length>0&&r.push({severity:"warning",code:"LOW_COLOR_CONTRAST",message:`${o.length} color(s) in colorScheme have < 3:1 contrast against background "${a}": ${o.join(", ")}. Data marks may be hard to see.`,fix:'Use darker colors on light backgrounds or lighter colors on dark backgrounds. Import COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for an accessible preset.'})}(0,t,r),function(e,t,r){const n=t.colorScheme;if(!n||!Array.isArray(n)||2>n.length)return;const a=n.filter(e=>"string"==typeof e&&e.startsWith("#"));if(2>a.length)return;const o=[];for(let e=0;a.length-1>e;e++){const t=ur(a[e],a[e+1]);null!==t&&1.5>t&&o.push(`${a[e]} / ${a[e+1]} (${t.toFixed(1)}:1)`)}o.length>0&&r.push({severity:"warning",code:"LOW_ADJACENT_CONTRAST",message:`${o.length} adjacent color pair(s) in colorScheme have very similar luminance: ${o.join("; ")}. Categories may be hard to distinguish.`,fix:'Alternate light and dark colors in the scheme, or use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for a pre-tested palette.'})}(0,t,r),function(e,t,r){const n=t.colorScheme;if("string"!=typeof n)return;const a=tr[e];a?.props?.colorScheme?.enum||Er.has(n)||r.push({severity:"warning",code:"UNKNOWN_COLOR_SCHEME",message:`colorScheme "${n}" is not a recognized named scheme — the chart will fall back to the default palette.`,fix:`Use a known scheme name (${[...Er].join(", ")}) or pass an explicit color array, e.g. colorScheme={["#1f77b4", "#ff7f0e"]}.`})}(e,t,r),function(e,t,r){const n=tr[e]?.props,a=e=>!!n?.[e]&&"string"==typeof t[e]&&t[e].trim().length>0,o=a("title"),i=a("description"),s=a("summary");o||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.'})}(e,t,r),function(e,t,r){const n=[];for(const e of Fr)"function"==typeof t[e]&&n.push(e);n.length>0&&r.push({severity:"warning",code:"FUNCTION_ACCESSOR",message:`Function accessor${n.length>1?"s":""} detected: ${n.join(", ")}. If defined inline (e.g. \`xAccessor={d => d.value}\`), every parent re-render creates a new reference; closures over changing values can force unnecessary scene rebuilds on resize/rotation.`,fix:'Use string accessors when possible (e.g. xAccessor="value"), or memoize with useCallback / define outside the component.'})}(0,t,r),function(e,t,r){const n=t.hoverRadius;"number"==typeof n&&n>0&&24>n&&!1!==t.enableHover&&(!1!==t.hoverAnnotation||t.tooltip||t.customHoverBehavior||t.customClickBehavior||t.onClick)&&r.push({severity:"warning",code:"TOUCH_TARGET_SMALL",message:`hoverRadius=${n}px is below the ~24px radius needed for reliable 48px touch targets on mobile screens.`,fix:"Use hoverRadius={24} or larger for touch-heavy views. Semiotic floors touch pointer hit testing to 24px, but explicit desktop-only radii should be documented."})}(0,t,r),function(e,t,r){!0===t.responsiveWidth&&!0===t.responsiveHeight&&r.push({severity:"warning",code:"RESPONSIVE_BOTH_AXES",message:"responsiveWidth and responsiveHeight are both true. On mobile this can create resize feedback loops when the parent height depends on chart content.",fix:"Prefer responsiveWidth={true} with a fixed parent height or size={[width, fixedHeight]}; use a ResizeObserver outside the chart if the height must follow aspect ratio."})}(0,t,r),function(e,t,r){if(!0!==t.showParticles)return;const n=t.particleStyle&&"object"==typeof t.particleStyle?t.particleStyle:{},a="number"==typeof n.maxPerLine?n.maxPerLine:void 0,o="number"==typeof n.spawnRate?n.spawnRate:void 0;("number"==typeof a&&a>20||"number"==typeof o&&o>.08)&&r.push({severity:"warning",code:"GEO_PARTICLE_MOBILE_COST",message:"Animated geo particles run a continuous canvas loop that can drain battery and trigger thermal throttling on mobile GPUs.",fix:"Set particleStyle={{ maxPerLine: 12, spawnRate: 0.06 }} for mobile-heavy views, or disable showParticles when reduced-motion or low-power modes are active."})}(0,t,r),function(e,t,r){const n=[];Lr(t.tokenEncoding)&&n.push({source:"tokenEncoding",encoding:t.tokenEncoding}),Lr(t.encoding)&&n.push({source:"encoding",encoding:t.encoding});for(const{source:e,encoding:a}of n){const n=_r(t,a);for(const t of ir(a,{visibleTokens:n}))r.push({severity:"warning",code:"TOKEN_"+t.code,message:t.message,fix:"MISSING_UNIT_VALUE"===t.code?`Set ${e}.unitValue to the value represented by one full token.`:"MISSING_UNIT_MEANING"===t.code?`Set ${e}.unitMeaning so readers know what one full token represents.`:"MISSING_COUNT_STRATEGY"===t.code?`Set ${e}.countStrategy to actual, unitized, fixed-denominator, quantile, sample, posterior-sample, or random-sample.`:"TOKEN_SEMANTICS_UNCLEAR"===t.code?`Set ${e}.tokenSemantics to observed-unit, unitized-measure, risk-case, possible-outcome, posterior-sample, hypothetical-case, topic-anchor, or decorative.`:`Adjust ${e} so its semantics, strategy, labels, and visible token count match the task.`})}}(0,t,r),function(e,t,r){const n=Array.isArray(t.annotations)?t.annotations:null;if(n)for(const e of n){if(!e||"object"!=typeof e)continue;const t=Ft(e);if(!_t(e)||"widget"===t)continue;const n=Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0),a="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:t,o=Bt(e);!o&&n>120?r.push({severity:"warning",code:"ANNOTATION_FAR_NO_CONNECTOR",message:`Annotation "${a}" sits ~${Math.round(n)}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).'}):o&&n>250&&r.push({severity:"warning",code:"ANNOTATION_LONG_CONNECTOR",message:`Annotation "${a}" uses a very long connector (~${Math.round(n)}px); prefer placing the note adjacent to its target when space allows.`,fix:"Reduce dx/dy so the note sits near its target, or keep the long connector only if proximity is genuinely infeasible."})}}(0,t,r),function(e,t,r){const n=Array.isArray(t.annotations)?t.annotations:null;if(!n)return;const a=n.filter(_t).length;if(0===a)return;const o="number"==typeof t.width?t.width:600,i="number"==typeof t.height?t.height:400,s=Mt(o,i);Number.isFinite(s)&&a>s&&r.push({severity:"warning",code:"ANNOTATION_DENSITY",message:`${a} note annotations on a ${o}×${i} chart exceed the ~${s} notes the plot area carries comfortably — the chart may read as cluttered.`,fix:'Mark the essential notes emphasis: "primary" and let density management shed the rest (autoPlaceAnnotations: { density: true }), enable progressive disclosure to reveal secondary notes on hover, or give the chart more room.'})}(0,t,r),function(e,t,r){const n=Array.isArray(t.annotations)?t.annotations:null;if(n)for(const e of n)e&&"object"==typeof e&&"widget"===Ft(e)&&null!=e.content&&!Et(e)&&r.push({severity:"warning",code:"ANNOTATION_INTERACTIVE_ID",message:"An interactive widget annotation has no stable id, so its activation cannot be normalized or replayed reliably.",fix:"Add id, stableId, or provenance.stableId to the widget annotation. Do not identify interactive annotations by array index."})}(0,t,r),function(e,t,r){for(const e of Ir){const n=t[e];if(!Array.isArray(n)||2>n.length)continue;const[a,o]=n;"number"==typeof a&&"number"==typeof o&&a>o&&r.push({severity:"warning",code:"INVERTED_AXIS",message:`${e}=[${a}, ${o}] 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}={[${o}, ${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,t,r),function(e,t,r){if("MultiAxisLineChart"!==e)return;const n=t.series;if(!Array.isArray(n)||2!==n.length)return;const a=n.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.'})}(e,t,r),function(e,t,r){if(!hr.has(e))return;const n=t.xExtent;if(!Array.isArray(n)||2>n.length)return;const[a,o]=n;if("number"!=typeof a||"number"!=typeof o||a>=o)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(o,l)-Math.max(a,c))/p;.7>u&&r.push({severity:"warning",code:"CHERRY_PICKED_WINDOW",message:`xExtent=[${a}, ${o}] shows only ~${Math.round(100*u)}% of the data's x range [${c}, ${l}] — a trend cropped to a favorable window is a classic misleading-design pattern.`,fix:'Widen xExtent to cover the data, filter the data itself so the chart shows what it has, or annotate the visible window ("Q4 only") so the cropping is explicit.'})}(e,t,r),function(e,t,r){const n=vr[e],a=xr[e];if(!n&&!a)return;if(a&&!t.normalize)return;const o=n??a,i=t[o],s="string"==typeof i?i:"yAccessor"===o?"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:n?"error":"warning",code:"PART_TO_WHOLE_NEGATIVE",message:`${l.length} negative value(s) in "${s}" — a part-to-whole encoding cannot represent negative parts${n?"; slice angles/areas for negatives are meaningless":"; normalized shares distort when parts are negative"}.`,fix:n?"Filter or transform negative values first, or switch to a BarChart/WaterfallChart, which encode signed values honestly.":"Drop normalize for signed data, or use a diverging BarChart so negative contributions read as negative."})}(e,t,r),function(e,t,r){br.has(e)&&"basis"===t.curve&&r.push({severity:"warning",code:"NON_PASSING_CURVE",message:'curve="basis" draws a B-spline that does NOT pass through your data points — rendered values differ from actual values everywhere except the endpoints.',fix:'Use curve="monotoneX" or curve="catmullRom" (both interpolate through every point), or keep "basis" only for deliberately schematic, clearly-labeled smoothing.'})}(e,t,r),function(e,t,r){if("LineChart"!==e&&"AreaChart"!==e)return;if("sparkline"===t.mode)return;if(t.responsiveWidth||t.responsiveHeight)return;const n="number"==typeof t.width?t.width:600,a="number"==typeof t.height?t.height:400;if(0>=n||0>=a)return;const o=n/a;if(o>8||.25>o){const e=o>8?"flattens":"exaggerates";r.push({severity:"warning",code:"EXTREME_ASPECT_RATIO",message:`${n}×${a} (${o.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:o>8?'Use a more balanced aspect (e.g. width/height between 1 and 3), or set mode="sparkline" if this is genuinely a sparkline strip.':"Use a more balanced aspect (e.g. width/height between 1 and 3); very tall trend charts overstate every change."})}}(e,t,r),function(e,t,r){if(!fr.has(e))return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=t.categoryAccessor,o="string"==typeof a?a:"category",i=new Set;for(const e of n){const t=e?.[o];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.`})}(e,t,r),function(e,t,r){if(jr.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 n=Mr(t.branchProbability);null!=t.branchProbability&&(null==n||0>n||n>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=Mr(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,n=e&&"object"==typeof e?Mr(e.size):null;null==n||n>0||r.push({severity:"error",code:"PHYSICS_BAD_WINDOW_SIZE",message:`windows.size=${n} 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",n=t.arrivalAccessor||"arrivalTime";a.some(t=>{const r=Mr(Br(t,e,"time")),a=Mr(Br(t,n,"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=Mr(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 n=Mr(t.unitValue??1)??1;if(0>=n)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",o=(Array.isArray(t.data)?t.data:[]).reduce((e,t)=>{const r=Mr(Br(t,a,"value"))??0;return e+Math.max(0,Math.round(r/n))},0);o>1500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`PhysicsPileChart would create about ${o} 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((Mr(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."}),(Mr(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:[],n=Mr(e[0]),a=Mr(e[1]);(2>e.length||null==n||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 n=t.groupAccessor;if(e.length>0&&n){const t=new Set;for(const r of e){const e=Br(r,n,"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 n=e.filter(e=>e?.absorb).length;t.groupBy&&0===n&&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 n=Array.isArray(t.data)?t.data:[],a=Mr(t.mechanicalCount)??0,o=n.length>0?n.length*("PhysicsPileChart"===e?Math.max(1,(Mr(t.unitValue),1)):1):a;o>2500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`${e} may spawn ~${Math.round(o)} live bodies, which can overwhelm the simulation loop.`,fix:"Lower mechanicalCount / unitize with a larger unitValue, enable sediment/windowSize, or sample the data before spawn."})}}}(e,t,r),{ok:r.every(e=>"warning"===e.severity),diagnoses:r}):{ok:0===r.length,diagnoses:r}}var zr=["title","description","summary"];function Hr(e){return"string"==typeof e&&e.trim().length>0}var Gr=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]);function qr(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 Vr(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 Wr(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function Ur(e,t,r={}){const n=[],a=O(e),o=kr.has(e),i=!!tr[e]||!!a||o,s=!0===r.inChartContainer,c=!0===r.describe,l=!0===r.navigable,p=Ar.has(e),u=dr.has(e),{hasTitle:d,hasDescription:y,hasSummary:m,unsupportedFinding:h}=function(e,t){const r=tr[e]?.props,n=e=>!!r?.[e],a=zr.filter(e=>Hr(t[e])&&!n(e));return{hasTitle:n("title")&&Hr(t.title),hasDescription:n("description")&&Hr(t.description),hasSummary:n("summary")&&Hr(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,t),g=!1!==t.accessibleTable&&!p,b=d||y||m,f=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(t),v=function(e){const t=Wr(e),r=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===r.pause||"function"==typeof r.pause}(t),w=o,x=function(e){const t=Wr(e);return!0===e.settledProjection||!0===t.settledProjection}(t)||Pr.has(e)&&g,A=function(e){const t=Wr(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(t)||w,C=Array.isArray(t.annotations)?t.annotations.filter(e=>!!e&&"object"==typeof e):[],k=i?"pass":"manual",S=i?"":` (unrecognized component "${e}" — verify manually that the built-in applies)`;if(h&&n.push(h),n.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},r=e.colorScheme,n="string"==typeof e.background?e.background:null;if(n&&!n.startsWith("#"))return{...t,status:"manual",message:`Background "${n}" 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=n??"#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 o=[];let i=0;for(const e of r){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ur(e,a);null!=t&&(i++,3>t&&o.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."}:o.length>0?{...t,status:"fail",message:`${o.length} color(s) fall below 3:1 contrast vs ${a}: ${o.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}.`}}(t)),n.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...p?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:g?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:y&&m?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}}),n.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."}),n.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=t.pulse||Sr.has(e)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),null!=t.colorBy){n.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...!0===t.directLabel||!0===t.showLabels?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:"Categories are encoded by color (colorBy) with no redundant channel — Semiotic does not yet ship texture/pattern fills.",fix:"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy), keep categories ≤ ~7, and use a CVD-safe palette."}});const e=Array.isArray(t.colorScheme)?t.colorScheme:null,r=e?e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase()):[],a=r.length>0&&r.every(e=>Gr.has(e));n.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...a?{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.'}}),n.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=C.filter(_t);if(e.length>0){const r=t.autoPlaceAnnotations,a="object"==typeof r&&null!==r&&!0===r.redundantCues,o=e.filter(e=>{if("string"!=typeof e.color)return!1;const t=Ft(e),r=a&&"text"===t;return!(Bt(e)||r)});n.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===o.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:`${o.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."}})}}n.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...i?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${e}".`,fix:"Verify Tab + arrow-key operation."}});{const e=[];null==t.brush&&null==t.onBrush||e.push("brushing"),!0===t.zoomable&&e.push("zoom/pan"),"isolate"!==t.legendInteraction&&"highlight"!==t.legendInteraction||e.push("legend filtering"),e.length>0&&n.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{const r=$r[e];if(r&&f){const e=t[r];"number"==typeof e&&e>0&&24>2*e&&n.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${r}=${e} gives a ~${2*e}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}n.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:k,message:`The chart takes a single tab stop and navigates data with arrow keys${S} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),n.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...f?m||y?{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."}}),n.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:k,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${S}.`}),n.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:k,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${S}.`,fix:i?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),n.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...b?{status:"pass",message:`Provided: ${[d&&"title",y&&"description",m&&"summary"].filter(Boolean).join(", ")}.`}:s?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),n.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...y||m?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:c?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:d?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{const e=[t.description,t.summary].filter(Hr).join(". "),r=e?function(e){const t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),r=e.trim().split(/\s+/).filter(Boolean);if(0===r.length||0===t.length)return null;let n=0;for(const e of r)n+=Vr(e);return r.length/t.length*.39+n/r.length*11.8-15.59}(e):null;n.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==r?{status:"not-applicable",message:"No description/summary text to grade."}:r>9?{status:"warn",message:`Description/summary reads at ~grade ${r.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(r))} (≤ 9).`}})}if(Cr.has(e)){const e=Hr(t.xLabel),r=Hr(t.yLabel);n.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&r?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!r&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(Nr.has(e)&&n.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."}),C.length>1){const e=C.filter(qr).length;n.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===C.length?{status:"pass",message:`All ${C.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:C.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:`${C.length-e} of ${C.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=t.forecast||null!=t.anomaly||null!=t.band||null!=t.regression)&&n.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=t.animate&&!1!==t.animate&&n.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:k,message:`Transitions animate with object constancy and data changes are mirrored to the live region${S}.`,fix:i?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),n.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."}),n.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."}),n.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:k,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${S}.`,fix:i?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),n.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...p?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:g?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}}),p||n.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...s?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),n.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:i?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${i?"":S}.`,fix:i?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),n.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...l?{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:u?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:k,message:`Keyboard navigation steps through points and switches series/groups${S}.`,fix:i?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const r=Array.isArray(t.data)?t.data:null,a=Array.isArray(t.nodes)?t.nodes:null,o={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let i;i=wr.has(e)&&r&&r.length>7?{...o,status:"warn",message:r.length+" slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.",fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:a&&a.length>200?{...o,status:"warn",message:a.length+" nodes. A network this size is hard to navigate non-visually node by node.",fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:r&&r.length>5e3?{...o,status:"warn",message:r.length+" data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.",fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:r?{...o,status:"pass",message:r.length+" data points — a reasonable density for non-visual consumption."}:a?{...o,status:"pass",message:a.length+" nodes — a reasonable density for non-visual consumption."}:{...o,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},n.push(i)}{const e=Array.isArray(t.data)?t.data:null,r=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof t[e]||"string"==typeof t[e]);let a=!1;if(e&&!r)for(const t of e.slice(0,50))if(t&&"object"==typeof t){for(const e of Object.values(t))if("number"==typeof e&&Number.isFinite(e)&&Math.abs(e)>=1e5){a=!0;break}if(a)break}a&&n.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.'})}n.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...c?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:m?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),n.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...p?{status:"not-applicable",message:"Single value — nothing to skip."}:g?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}}),n.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:k,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${S}.`,fix:i?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),n.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...Sr.has(e)||Tr.has(e)?v?{status:"pass",message:e+" animates continuously and declares an in-chart pause/stop control."}:{status:"warn",message:e+" animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.",fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:k,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${S}.`}}),o&&(n.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...v?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),n.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...x?{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."}}),n.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...A?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{const r=!0===t.responsiveWidth||!0===t.responsiveHeight,a=Rr.has(e)&&!0===t.zoomable;n.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...r?{status:"pass",message:`Chart reflows to its container (${[!0===t.responsiveWidth&&"responsiveWidth",!0===t.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:a?{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(a){const e=a.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));e&&n.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:a.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"!==a.accessibility.description||Hr(t.description)||n.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:a.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),a.accessibility.fallbackTable&&!1===t.accessibleTable&&n.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:a.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const P=n.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),j={criticalsPassed:P.filter(e=>"pass"===e.status).length,criticalsEvaluated:P.length,fails:n.filter(e=>"fail"===e.status).length,warnings:n.filter(e=>"warn"===e.status).length,manual:n.filter(e=>"manual"===e.status).length,passes:n.filter(e=>"pass"===e.status).length};return{component:e,ok:!P.some(e=>"fail"===e.status),summary:j,findings:n,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 Yr(e,{onlyCritical:t=!1}={}){const r=[];for(const n of e.findings)"fail"!==n.status&&"warn"!==n.status||t&&!n.critical||r.push(n.message);return r}var Xr={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},Kr=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function Qr(e){const t=[],r=e.summary,n=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(` ${n} · ${r.warnings} warning(s) · ${r.manual} to verify manually`);for(const r of Kr){const n=e.findings.filter(e=>e.principle===r&&"not-applicable"!==e.status);if(0!==n.length){t.push(""),t.push(" "+r.toUpperCase());for(const e of n)t.push(` ${Xr[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")}import{useCallback as Jr,useMemo as Zr,useRef as en,useState as tn}from"react";var rn=/^\d{4}[-/]\d{2}/,nn=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function an(e){return"number"==typeof e?Number.isFinite(e)?"numeric":"unknown":e instanceof Date?"date":"string"==typeof e?rn.test(e)&&!Number.isNaN(Date.parse(e))?"date":nn.test(e)&&Number.isFinite(Number(e))?"numeric":"categorical":"boolean"==typeof e?"categorical":"unknown"}function on(e){let t=1/0,r=-1/0;for(let n=0;e.length>n;n++){const a=e[n];t>a&&(t=a),a>r&&(r=a)}return{min:t,max:r}}function sn(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 cn(e,t={}){const{maxDistinct:r=10,sampleSize:n=5,keyScanRows:a=100}=t;if(!Array.isArray(e)||0===e.length)return{rowCount:0,fields:{},sample:[]};const o=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))o.add(e)}const s={};for(const t of o){const n=[];for(let r=0;e.length>r;r++){const a=e[r]?.[t];null!=a&&n.push(a)}if(0===n.length){s[t]={type:"unknown"};continue}const a=an(n[0]);if("numeric"===a){const e=[];for(let t=0;n.length>t;t++){const r=Number(n[t]);Number.isFinite(r)&&e.push(r)}if(0===e.length){s[t]={type:"unknown"};continue}const{min:r,max:a}=on(e);let o=0;for(let t=0;e.length>t;t++)o+=e[t];const i=[...e].sort((e,t)=>e-t);s[t]={type:"numeric",min:r,max:a,mean:o/e.length,median:sn(i)}}else if("date"===a){const e=[];for(let t=0;n.length>t;t++){const r=n[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}=on(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;n.length>t;t++){const r=n[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,n)}}var ln=/^(x|index|rank|order|step|sequence|year|quarter|qtr|fiscal|month|week|day|date|time|timestamp)$/i,pn=/^(y|value|amount|total|count|revenue|sales|price|score|rate|population|measure)$/i,un=/(size|magnitude|volume|weight|count|amount)/i,dn=/^(category|label|name|type|group|region|segment|kind|class)$/i,yn=/^(series|group|type|category|segment|cohort|product)$/i,mn=new Set(["numeric"]),hn=new Set(["numeric","date"]),gn=new Set(["numeric"]),bn=new Set(["date"]),fn=new Set(["categorical","boolean"]);function vn(e){return"numeric"===e.type?"numeric":"date"===e.type?"date":"categorical"===e.type?"categorical":"unknown"}function wn(e,t){return t.test(e)?.2:0}function xn(e,t){let r=null;for(let n=0;e.length>n;n++){const a=e[n]?.[t];if(null==a)continue;const o=a instanceof Date?a.getTime():Number(a);if(!Number.isFinite(o))return!1;if(null!==r&&r>o)return!1;r=o}return null!==r}function An(e,t,r,n,a={}){const o=[];for(const[i,s]of Object.entries(e)){const e=vn(s);if(!r.has(e))continue;let c,l=.5;l+=wn(i,n),"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=xn(t,i),p.monotonic&&(p.quality=Math.min(1,p.quality+.2))),o.push(p)}return o.sort((e,t)=>t.quality-e.quality),o}function Cn(e,t){const r=new Set;for(let n=0;e.length>n;n++){const a=e[n]?.[t];null!=a&&r.add(a+"")}return r.size}var kn=/^(source|from|origin|stage|currentstage|sourcestage|fromstage)$/i,Sn=/^(target|to|destination|nextstage|next|targetstage|tostage|destinationstage|status)$/i,Pn=/^(starttime|startedat|enteredat|startdate|start|timestamp|date|time)$/i,jn=/^(endtime|endedat|exitedat|completedat|finishtime|enddate|end)$/i,Tn=/^(value|weight|amount|count|magnitude|volume)$/i;function Nn(e,t){return e.find(e=>t.test(e))}function Rn(e,t={}){const r=cn(e??[]),n=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),n=Nn(r,kn),a=Nn(r,Sn);if(!n||!a||n===a)return null;const o=Nn(r,Pn),i=Nn(r,jn),s=Nn(r,Tn),c=[];for(const t of e){if(!t)continue;const e=t[n],r=t[a];if(null==e||null==r)continue;const o=(e+"").trim(),i=(r+"").trim();o&&i&&o!==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[n]+"").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}`,d=s?Number(e[s]):1,y=Number.isFinite(d)?d:1;p.set(c,(p.get(c)??0)+y),u.has(c)||u.set(c,{source:t,target:r,...o?{startTime:e[o]}:{},...i?{endTime:e[i]}:{}})}const d=[];for(const[e,t]of u)d.push({...t,value:p.get(e)??1});return{nodes:Array.from(l.values()),edges:d}}(n);e&&(a.hasNetwork=!0,a.network=e)}const o=An(r.fields,n,hn,ln,{computeMonotonic:!0}),i=An(r.fields,n,gn,pn),s=An(r.fields,n,mn,un),c=An(r.fields,n,fn,dn),l=An(r.fields,n,fn,yn),p=An(r.fields,n,bn,/(date|time|timestamp)/i,{computeMonotonic:!0}),u=p[0]?.field;let d=u,y=u?"time":"none";if(!d){const e=o.find(e=>ln.test(e.field)&&"numeric"===e.kind);e&&(d=e.field,y="named")}const m=i.find(e=>e.field!==d)?.field;if(!d&&m){const e=Object.entries(r.fields).filter(([e,t])=>"numeric"===t.type).map(([e])=>e);2>e.length||(d=e.find(e=>e!==m),d&&(y="scatter"))}const h=s.find(e=>e.field!==d&&e.field!==m)?.field,g="time"===y||"named"===y,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?Cn(n,f):void 0,x=v?Cn(n,v):void 0,A=d?Cn(n,d):void 0,C=!!d&&function(e,t){const r=new Set;for(let n=0;e.length>n;n++){const a=e[n]?.[t];if(null==a)continue;const o=a+"";if(r.has(o))return!0;r.add(o)}return!1}(n,d),k=o.find(e=>e.field===d)?.monotonic??!1,S=p.length>0;return{...r,data:n,candidates:{x:o,y:i,size:s,category:c,series:l,time:p},primary:{x:d,y:m,size:h,category:f,series:v,time:u},categoryCount:w,seriesCount:x,uniqueXCount:A,hasRepeatedX:C,monotonicX:k,hasTimeAxis:S,hasHierarchy:a.hasHierarchy,hasNetwork:a.hasNetwork,hasGeo:a.hasGeo,xProvenance:y,network:a.network,hierarchy:a.hierarchy,geo:a.geo}}var $n={rows:{tiny:3,small:25,medium:250,large:5e3},cardinality:{low:7,medium:25},fields:{narrow:3,typical:10}},In=["tiny","small","medium","large","huge"];function Mn(e){return{rows:{...$n.rows,...e?.rows??{}},cardinality:{...$n.cardinality,...e?.cardinality??{}},fields:{...$n.fields,...e?.fields??{}}}}function Bn(e,t){if(!Number.isFinite(e)||0>e)return"tiny";const r=Mn(t?.thresholds).rows;return e>r.tiny?e>r.small?e>r.medium?e>r.large?"huge":"large":"medium":"small":"tiny"}function En(e,t){if(!Number.isFinite(e)||0>e)return"low";const r=Mn(t?.thresholds).cardinality;return e>r.low?e>r.medium?"high":"medium":"low"}function Fn(e,t){if(!Number.isFinite(e)||0>e)return"narrow";const r=Mn(t?.thresholds).fields;return e>r.narrow?e>r.typical?"wide":"typical":"narrow"}function Ln(e,t){return In.indexOf(e)-In.indexOf(t)}function Dn(e,t,r){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=Mn(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}function _n(e,t,r){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=Mn(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}function On(e,t){const r=e.rowCount??0,n=t?.rows,a=Dn(n,r,t),o=Bn(a,t),i=Object.keys(e.fields??{}).length,s=t?.fields,c="number"==typeof s?s:"string"==typeof s?function(e,t){const r=Mn(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=Fn(c,t),p=e.primary.category,u=_n((p?t?.cardinality?.[p]:void 0)??t?.typicalCardinality,e.categoryCount,t);return{rows:a,rowBand:o,fields:c,fieldBand:l,typicalCardinality:u,cardinalityBand:void 0!==u?En(u,t):void 0,growth:t?.growth??"static",rowsSource:void 0!==n?"declared":"measured"}}var zn=2.5;function Hn(e,t,r,n,a){const o=[],i=[];let s=0,c=!1;if(e.scaleFit){const a=e.scaleFit(t,r,n);if(a&&(s+=Math.max(-2.5,Math.min(zn,a.delta??0)),a.reason&&o.push(a.reason),a.caveats))for(const e of a.caveats)i.push(e)}const l=n?.charts?.[e.component];if(l&&(l.minBand&&0>Ln(r.rowBand,l.minBand)||l.maxBand&&Ln(r.rowBand,l.maxBand)>0?c=!0:"number"==typeof l.bias?(s+=Math.max(-3,Math.min(3,l.bias)),l.reason&&o.push(`${n?.name?n.name+": ":""}${l.reason}`)):l.reason&&o.push(`${n?.name?n.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&&o.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:o,caveats:i,excluded:c}}function Gn(e){return(t,r)=>{let n=0;const a=[];let o;if(e.rows){const[t,i]=e.rows.sweetSpot;t>r.rows||r.rows>i?t>r.rows?(n-=Math.min(zn,.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`)):(n-=Math.min(zn,.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")):(n+=.6,o=r.rows+" rows is in the sweet spot for this chart")}if(e.cardinality&&void 0!==r.typicalCardinality){const t=r.typicalCardinality,[o,i]=e.cardinality.sweetSpot;o>t||t>i?t>i&&(n-=Math.min(zn,.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")):n+=.4}return 0!==n||0!==a.length||o?{delta:n,reason:o,caveats:a}:null}}var qn={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:Gn({rows:{sweetSpot:[25,2e3],caveatBelow:4,caveatAbove:1e4}})},Vn={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,n=e.primary.y,a=new Map;for(const r of e.data){const e=r[t];if(null==e||""===e)continue;const o=Number(r[n]);a.set(e,(a.get(e)??0)+(Number.isFinite(o)?o:0))}let o,i=-1/0;for(const[e,t]of a)t>i&&(i=t,o=e);null!=o&&a.size>0&&(r=e.data.filter(e=>e[t]===o))}const n={data:r,xAccessor:e.primary.x,yAccessor:e.primary.y,gradientFill:!0,areaOpacity:.55};return e.hasTimeAxis&&e.primary.x===e.primary.time&&(n.xScaleType="time"),{...n,...t?.props??{}}},scaleFit:Gn({rows:{sweetSpot:[6,200],caveatAbove:2e3}})},Wn={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:Gn({rows:{sweetSpot:[30,1500],caveatBelow:12,caveatAbove:1e4}})},Un={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},n="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:void 0,a=n?e.candidates.y.filter(e=>e.field!==n).map(e=>e.field):[];return n&&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:Gn({rows:{sweetSpot:[50,5e3],caveatBelow:20,caveatAbove:1e4}})},Yn={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,n=r?e.candidates.y.filter(e=>e.field!==r).map(e=>e.field):[];return r&&n.length>=2?(t.xAccessor=n[0],t.yAccessor=n[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}},Xn={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:Gn({rows:{sweetSpot:[10,500],caveatAbove:1500}})},Kn={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,n=e.fields[t],a=e.fields[r],o="numeric"===n?.type?n.median:void 0,i="numeric"===a?.type?a.median:void 0;return{data:e.data,xAccessor:t,yAccessor:r,...void 0!==o?{xCenter:o}:{},...void 0!==i?{yCenter:i}:{},...e.primary.series&&6>=(e.seriesCount??0)?{colorBy:e.primary.series}:{},quadrants:{topLeft:{...Ne.topLeft},topRight:{...Ne.topRight},bottomLeft:{...Ne.bottomLeft},bottomRight:{...Ne.bottomRight}}}}},Qn={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}}},Jn={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"}:{}})},Zn={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,n=e.primary.series,a=e=>null!=e&&(e+"").length>0,o=new Map;for(const t of e.data){const e=t[n];if(!a(e))continue;const i=e+"",s=Number(t[r]);o.set(i,(o.get(i)??0)+(Number.isFinite(s)?s:0))}const i=[...o.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 o of e.data){const e=o[n];if(!a(e))continue;const i=e+"";if(i!==s&&i!==c)continue;const u=o[t],d=o[r],y=l(u);let m=p.get(y);m||(m={[t]:u},p.set(y,m)),i===s?m.a=d:i===c&&(m.b=d)}return{data:Array.from(p.values()).filter(e=>null!=e.a&&null!=e.b),xAccessor:t,seriesAAccessor:"a",seriesBAccessor:"b",seriesALabel:s,seriesBLabel:c}}},ea={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"),n=t.has("low");return r&&n?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")}}},ta={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),n=e.primary.time??r[0],a=r.find(e=>e!==n)??r[0]??e.primary.series;return{data:e.data,xAccessor:n,yAccessor:a,valueAccessor:e.primary.y,...t?.props??{}}},scaleFit:Gn({rows:{sweetSpot:[100,1e4],caveatBelow:25,caveatAbove:5e4}})},ra=/(^|[^a-z])(date|time|timestamp|month|week|day|year|quarter|qtr|hour|minute)(?=[^a-z]|$)/i,na=/^(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,aa=/^(\d{4}(-\d{1,2}(-\d{1,2})?)?|q[1-4]|week\s*\d+|wk\s*\d+|\d{1,2}:\d{2})$/i,oa={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(ra.test(r))return!0;const n=e.data;if(!n||0===n.length)return!1;let a=0,o=0;for(const e of n){const r=e[t];if(null==r)continue;o++;const n=(r+"").trim();(na.test(n)||aa.test(n))&&a++}return o>0&&a/o>=.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:Gn({cardinality:{sweetSpot:[3,15],caveatAbove:25},rows:{sweetSpot:[3,200]}})},ia={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})},sa={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??{}})},ca={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:Gn({cardinality:{sweetSpot:[10,30],caveatAbove:40},rows:{sweetSpot:[5,300]}})},la={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:Gn({cardinality:{sweetSpot:[2,5],caveatAbove:6}})},pa={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})},ua=/(stage|step|funnel|status|outcome|phase)/i,da={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=>ua.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=>ua.test(e));return{data:e.data,stepAccessor:t,valueAccessor:e.primary.y,...e.primary.category&&e.primary.category!==t?{categoryAccessor:e.primary.category}:{}}}},ya={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],n=r?Number(r[t]):0,a=e.fields[t],o="numeric"===a?.type?a.max:100;return{value:Number.isFinite(n)?n:0,min:0,max:o}},scaleFit:(e,t)=>"tiny"===t.rowBand?{delta:.6,reason:"designed for single-value displays"}:null},ma=/(rating|score|likert|satisfaction|nps|agree|sentiment|level)/i,ha={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=>ma.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=>ma.test(e));return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,levelAccessor:t,levels:["Very Low","Low","Neutral","High","Very High"]}}},ga={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})},ba={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??{}})},fa={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})},va={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}:{}})},wa={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??{}})},xa={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})},Aa={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"}}},Ca={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"})},ka={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"})},Sa={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}},Pa={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??{}})};function ja(e){if(!e||"object"!=typeof e)return 0;const t=e.children;return Array.isArray(t)&&t.length>0?t.reduce((e,t)=>e+ja(t),0):1}var Ta={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=ja(e.hierarchy);let n=0;const a=[];let o;return 5>r?(n-=.5,a.push(`only ${r} leaves — treemap needs more cells to show structure`)):r>100?r>500&&(n-=.7,a.push(r+" leaves — most tiles will be sub-pixel; prefer aggregation or zoomable treatment")):(n+=.4,o=r+" leaves is in the legible band for treemap"),"huge"===t.rowBand&&(n-=.5,a.push("at huge declared scale a stacked or matrix view aggregates better than hierarchical browsing")),{delta:n,reason:o,caveats:a}}},Na={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"})},Ra={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"})},$a={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"})},Ia={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"})},Ma={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"})},Ba={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"})};function Ea(e){return Number.isFinite("number"==typeof e?e:Number(e))}function Fa(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 La(e,t){return e.data.some(e=>e&&"object"==typeof e&&t in e)}var Da=[qn,Vn,Wn,Un,Yn,Xn,Kn,Qn,Jn,Zn,ea,ta,oa,ia,sa,ca,la,pa,da,ya,ha,ga,ba,fa,va,wa,xa,Aa,Ca,ka,Sa,Pa,Ta,Na,Ra,$a,Ia,Ma,Ba,{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)):[],n=r.length?Math.max(...r):1;return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:t,unitValue:Math.max(1,Math.ceil(n/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=>Ea(e.x)&&Ea(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:Fa(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":La(e,"stage")||La(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=(La(e,"stage")?"stage":La(e,"status")&&"status")||e.primary.category||"stage",r=La(e,"id")?"id":void 0,n=(La(e,"featureId")?"featureId":La(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 o=a.size>0?Array.from(a):["coding","review","merged"],i=o.map((t,r)=>{const n=r===o.length-1,a=r===Math.floor(o.length/2);return{id:t,label:t,force:n?20:12,capacity:a?{unitsPerSecond:Math.max(2,Math.round(e.rowCount/8))}:void 0,pressure:a||void 0,absorb:n||void 0}});return{data:e.data,...r?{idAccessor:r}:{},stageAccessor:t,...n?{groupBy:n,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,n=r.length>0?r[r.length-1]:null,a=n?Number(n[t]):0,o={value:Number.isFinite(a)?a:0,label:t};if(r.length>=2){const e=Number(r[r.length-2][t]);Number.isFinite(e)&&(o.comparison={value:e,label:"vs previous"})}return o},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}],_a=new Map;function Oa(e){_a.set(e.component,e)}function za(e){_a.delete(e)}function Ha(){if(0===_a.size&&!q())return Da;const e=new Map;for(const t of Da)e.set(t.component,t);for(const t of G())e.set(t.component,t);for(const[t,r]of _a)e.set(t,r);return Array.from(e.values())}function Ga(e){return Ha().find(t=>t.component===e)}var qa=new Set(["perceivable.content-only-visual","perceivable.color-alone","assistive.data-density","assistive.human-readable-numbers","assistive.skippable-navigation","compromising.table","compromising.navigable-structure"]),Va={"screen-reader":"a screen reader",sonified:"sonification",agent:"an AI reader"};function Wa(e,t){if("visual"===t)return{delta:0,caveats:[]};let r=0;const n=[],a=[];for(const t of e.findings){if(!qa.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,n.push(t.heuristic.charAt(0).toLowerCase()+t.heuristic.slice(1)),a.push(t.message))}return 0===n.length?{delta:0,caveats:[]}:{delta:Math.max(-3,r),reason:`Harder to receive via ${Va[t]}: ${n.slice(0,3).join("; ")}`,caveats:a}}function Ua(e,t,r,n,a){if(!n)return{score:e,rubric:t};const o=n.familiarity?.[r],i=o??t.familiarity,s=n.targets?.[r];let c,l,p=0;void 0!==o&&(p+=.5*(o-3)),s&&(p+=1*("increase"===s.direction?1:-1)*Math.max(1,Math.min(3,s.weight??1)),c=s.reason?`${n.name?n.name+": ":""}${s.reason}`:`${n.name?n.name+" ":""}target: ${s.direction} ${r}`);const u=n.receptionModality;return a&&u&&"visual"!==u&&(p+=a.delta,l=a.reason),{score:e+p,rubric:{...t,familiarity:i},appliedReason:c,receivabilityReason:l}}function Ya(e,t,r){return r?r.familiarity?.[e]??t:t}function Xa(e){return e&&2===e.exposureLevel?4:3}function Ka(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 Qa(e,t){if(!t?.intentDeltas)return e;const r={...e};for(const[e,n]of Object.entries(t.intentDeltas))r[e]=Math.max(0,Math.min(5,(r[e]??0)+n));return r}function Ja(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 Za(e,t,r,n){const a=[],o=n.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 o)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 eo(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 n=0;const a=[],o=[],i=t.audience?.name?.trim().toLowerCase();if(i){const e=r.audienceFit?.find(e=>e.audience.trim().toLowerCase()===i);e&&(n+={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)?(n+=.25,a.push(`Designed for ${s} reception`)):r.reception?.channels?.length&&(n-=1,o.push(`Recipe does not declare support for the ${s} reception channel.`));const c=r.reception?.risks??[];return"low"===t.riskTolerance&&c.length>0?(n-=Math.min(1.5,.35*c.length),o.push(...c)):"medium"===t.riskTolerance&&c.length>2&&(n-=.25),"local"===r.portability?o.push("Local-only recipe: cannot be rendered remotely by CLI or MCP."):a.push("Portable registered recipe"),{delta:n,reasons:a,caveats:o}}function to(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 n of t)r+=e[n]??0;return r/t.length}function ro(e,t={}){const r=t.profile??Rn(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),n=t.capabilities??Ha(),a=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],o=!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,d=On(r,t.scale),y=void 0!==t.scale&&d.rows!==r.rowCount?{...r,rowCount:d.rows}:r,m=[];for(const e of n){if(c&&!c.has(e.component))continue;if(l&&l.has(e.component))continue;if(null!==e.fits(y))continue;const n={};for(const[t,r]of Object.entries(e.intentScores))n[t]=Ka(r,y);const s=e.caveats?Array.from(e.caveats(y)):[],h=o&&e.variants&&e.variants.length>0?e.variants:[void 0];for(const o of h){const c=Qa(n,o),l=to(c,a),h=Ja(e.rubric,o),g=e.buildProps(r,o);let b;u&&(b=Wa(Ur(e.component,g),p));const f=Ua(l,h,e.component,t.audience,b),v=Hn(e,y,d,t.scale,t.quality);if(v.excluded)continue;const w=eo(e,t);if(w.excluded)continue;const x=f.score+v.delta+w.delta;if(i>x)continue;const A=Za(e,y,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,...o?.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:o,score:x,intentScores:c,rubric:f.rubric,reasons:A,caveats:C,props:g,...e.whyCustom?{whyCustom:e.whyCustom}:{},scaleRange:{band:d.rowBand,cardinalityBand:d.cardinalityBand,rows:d.rows,rowsSource:d.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 no(e,t={}){const r=t.profile??Rn(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),n=t.capabilities??Ha(),a=t.allow?new Set(t.allow):null,o=t.deny?new Set(t.deny):null,i=On(r,t.scale),s=void 0!==t.scale&&i.rows!==r.rowCount?{...r,rowCount:i.rows}:r,c=[];for(const e of n){if(a&&!a.has(e.component))continue;if(o&&o.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:ro(e,{...t,profile:r}),rejected:c,profile:r}}function ao(e,t,r={}){const n=Ha().find(t=>t.component===e);if(!n)return{reason:`No capability registered for "${e}"`};const a=r.profile??Rn(t??[]),o=n.fits(a);if(null!==o)return{reason:o};const i=r.variantKey?n.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(n.intentScores))c[e]=Ka(t,a);const l=Qa(c,i),p=to(l,s),u=Ja(n.rubric,i),d=Za(n,a,l,s),y=eo(n,r);if(y.excluded)return{reason:y.excluded};d.push(...y.reasons);const m=[...n.caveats?n.caveats(a):[],...i?.caveats??[],...y.caveats];return{component:n.component,displayName:n.displayName??n.component,candidateKind:n.candidateKind??"built-in",...n.recipe?{recipeId:n.recipe.id}:{},family:n.family,importPath:n.importPath,variant:i,score:p+y.delta,intentScores:l,rubric:u,reasons:d,caveats:m,props:n.buildProps(a,i),...n.whyCustom?{whyCustom:n.whyCustom}:{}}}function oo(e,t={}){const r=t.profile??Rn(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),n=On(r,t.scale),a=t.maxPerBand??t.maxResults??5,o=["tiny","small","medium","large","huge"],i={};for(const n of o){const o={...t.scale??{},rows:n};i[n]=ro(e,{...t,profile:r,scale:o,maxResults:a})}return{tiny:i.tiny??[],small:i.small??[],medium:i.medium??[],large:i.large??[],huge:i.huge??[],effective:n}}var io=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function so(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function co(e){return so(e)?e:void 0}function lo(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function po(e){const t=lo(e);return null==t?void 0:Math.max(0,Math.floor(t))}function uo(...e){return e.map(co).find(Boolean)}function yo(...e){return e.find(Array.isArray)}function mo(e){const t={};for(const[r,n]of Object.entries(e))void 0!==n&&(t[r]=n);return t}function ho(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function go(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function bo(e,t,r){const n=e?.filter(e=>!0===co(e)?.sensor).length,a=co(t?.observation),o=co(a?.sensors),i=yo(r?.activeSensors);return Math.max(n??0,o?Object.keys(o).length:0,i?.length??0)||void 0}function fo(e,t,r={}){const{capability:n,audience:a,locale:o}=r,i=r.levels??["l1","l2","l3"],s=!1!==r.includeStructure,c=se(e,n),l=c?[...i,"l4"]:i,p=j(e,t,{levels:l,locale:o,capability:n,audience:a}),{l4:u,...d}=p.levels,y=["l1","l2","l3"].map(e=>p.levels[e]).filter(Boolean).join(" "),m={levels:d,text:p.annotations?`${p.annotations} ${y}`.trim():y,...p.annotations?{annotations:p.annotations}:{}};let g;if(c&&u){const e=(b=n)?"fits"in b||"buildProps"in b?{family:b.family}:{family:b.family,intentScores:b.intentScores}:{};g={act:c,sentence:u,family:e.family,intentScores:e.intentScores}}var b;const f=s?h(e,t,{maxLeaves:r.maxLeaves,locale:o}):void 0,v=function(e,t,r){if(!1===r)return;const n=so(r)?r:void 0,a=co(t.physics),o=uo(n?.snapshot,a?.snapshot,t.physicsSnapshot,function(e){const t=co(e);return!!t&&(so(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),i=uo(n?.evidence,a?.evidence,t.physicsEvidence,t.settledEvidence),s=uo(n?.config,a?.config,o?.config,t.config),c=uo(co(o?.world),co(a?.world)),l=uo(co(s?.kernel),co(c?.options)),p=yo(c?.bodies),u=yo(c?.colliders,s?.colliders),d=yo(o?.queue,a?.queue),y=yo(o?.liveBodyOrder),m=yo(c?.springs),h=yo(o?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const r=co(e);if(!r)return;const n=lo(r.count??r.value??r.total??r.bodies??r.events);if(null==n)return;const a=(r.label??r.id??r.name??"container "+(t+1))+"",o=null==r.id?void 0:r.id+"",i=lo(r.secondary??r.secondaryCount),s=lo(r.observed??r.observedCount);return mo({id:o,label:a,count:n,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),n=t.filter(e=>e.count>0).length,a=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:r,populatedCount:n,...a?{leader:a}:{}}}(function(e,t,r,n){const a=co(e.settledProjection),o=co(t?.settledProjection);return yo(r?.projectionRows,r?.aggregates,e.settledProjectionRows,e.projectionRows,a?.rows,t?.settledProjectionRows,t?.projectionRows,o?.rows,n?.binCounts)}(t,a,n,i)),b=function(e,t){const r=e?.map((e,t)=>{const r=co(e);if(!r)return;const n=lo(r.count)??0,a=lo(r.total),o={label:(r.label??r.id??"sediment "+(t+1))+"",count:n};return null!=r.id&&(o.id=r.id+""),null!=a&&(o.total=a),o}).filter(e=>null!=e),n=po(t?.bins)??r?.length??0,a=lo(t?.count)??r?.reduce((e,t)=>e+t.count,0)??0,o=lo(t?.total)??r?.reduce((e,t)=>e+(t.total??0),0),i=r?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==n||0!==a||o)return{bins:n,count:a,...null!=o&&o>0?{total:o}:{},...i?{leader:i}:{}}}(yo(n?.sediment,a?.sediment,o?.sediment),uo(n?.sedimentTotals,a?.sedimentTotals)),f=y?.length??p?.length??po(i?.bodyCount),v=function(e){if(e)return e.filter(e=>!0===co(e)?.sleeping).length}(p)??po(i?.sleepingCount),w=d?.length,x="string"==typeof o?.simulationState?o.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=co(l?.gravity),k=lo(C?.x),S=lo(C?.y),P=mo({state:x,settled:A,elapsedSeconds:lo(o?.elapsedSeconds),paused:"boolean"==typeof o?.paused?o.paused:void 0,visible:"boolean"==typeof o?.visible?o.visible:void 0,seed:lo(l?.seed),gravity:null!=k&&null!=S?{x:k,y:S}:void 0,fixedDt:lo(s?.fixedDt??l?.fixedDt),timeScale:lo(s?.timeScale),maxSubsteps:po(s?.maxSubsteps),liveBodies:f,sleepingBodies:v,queued:w,bodyLimit:lo(s?.bodyLimit),eviction:"string"==typeof s?.eviction?s.eviction:void 0}),j=mo({colliders:u?.length,sensors:bo(u,s,c),springs:m?.length,activeSensorPairs:h?.length}),T=Object.keys(j).length>0,N=io.has(e);if(!(Object.keys(P).length>0||T||g||b)||!N&&null==r)return;const R={simulation:P,...T?{geometry:j}:{},...g?{aggregates:g}:{},...b?{sediment:b}:{}},$=function(e){const t=[],r=e.simulation,n=[r.state??(r.settled?"settled":void 0),null!=r.liveBodies?`${r.liveBodies} live ${ho(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 "+go(r.seed):void 0,r.gravity?`gravity (${go(r.gravity.x)}, ${go(r.gravity.y)})`:void 0,null!=r.fixedDt?`fixed step ${go(r.fixedDt)}s`:void 0,null!=r.timeScale?go(r.timeScale)+"x time":void 0].filter(Boolean);n.length>0&&t.push(`Physics simulation: ${n.join("; ")}.`);const a=e.geometry;if(a){const e=[null!=a.colliders?`${a.colliders} ${ho(a.colliders,"collider")}`:void 0,null!=a.sensors?`${a.sensors} ${ho(a.sensors,"sensor")}`:void 0,null!=a.springs?`${a.springs} ${ho(a.springs,"spring")}`:void 0,null!=a.activeSensorPairs?`${a.activeSensorPairs} active sensor ${ho(a.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const o=e.aggregates;if(o){const e=o.leader,r=e?` Largest is ${e.label} with ${go(e.count)}.`:"";t.push(`Physics aggregates: ${go(o.totalCount)} settled ${ho(o.totalCount,"body")} across ${o.rows.length} ${ho(o.rows.length,"container")}; ${o.populatedCount} populated.${r}`)}const i=e.sediment;if(i){const e=null!=i.total?", value total "+go(i.total):"",r=i.leader?`; largest sediment bin is ${i.leader.label} with ${go(i.leader.count)}`:"";t.push(`Physics sediment: ${i.count} retained ${ho(i.count,"body")} in ${i.bins} ${ho(i.bins,"bin")}${e}${r}.`)}return t.join(" ")}(R);return{...R,text:$}}(e,t,r.physics),w=[m.text,g?.sentence,v?.text].filter(Boolean).join(" ");return{component:e,description:m,intent:g,structure:f,physics:v,text:w}}function vo(e,t){return null==e?e:e.length>t?e.slice(0,t-1)+"…":e}function wo(e){const{data:t,onQuery:r,initialAnnotations:n,componentName:a,props:o,includeProfile:i,includeSuggestions:s,suggestionsIntent:c,suggestionsMax:l,focus:p,includeGrounding:u}=e,[d,y]=tn([]),[m,h]=tn([]),[g,b]=tn(!1),[f,v]=tn(null),w=Zr(()=>cn(t??[]),[t]),x=i||s,A=Zr(()=>x?Rn(t??[]):void 0,[x,t]),C=Zr(()=>s&&A?ro(t,{profile:A,intent:c,maxResults:l??5}):void 0,[s,A,t,c,l]),k=Zr(()=>{if(u&&a)return fo(a,{data:t??[],...o??{}},"object"==typeof u?u:void 0)},[u,a,o,t]),S=en(r);S.current=r;const P=en(a);P.current=a;const j=en(o);j.current=o;const T=en(t);T.current=t;const N=en(w);N.current=w;const R=en(A);R.current=A;const $=en(C);$.current=C;const I=en(p);I.current=p;const M=en(k);M.current=k;const B=Jr(async e=>{const t=e.trim();if(!t)return;b(!0),v(null),y(e=>[...e,{role:"user",text:t}]);const r="undefined"!=typeof performance?performance.now():Date.now();z().record({type:"interrogation-asked",component:P.current,query:vo(t,500)});try{const e=await S.current(t,{data:T.current??[],summary:N.current,profile:R.current,suggestions:$.current,componentName:P.current,props:j.current,grounding:M.current,focus:I.current??void 0});y(t=>[...t,{role:"assistant",text:e.answer}]),e.annotations&&h(e.annotations);const n="undefined"!=typeof performance?performance.now():Date.now();z().record({type:"interrogation-answered",component:P.current,answer:vo(e.answer,2e3),annotationCount:e.annotations?.length,latencyMs:Math.max(0,Math.round(n-r))})}catch(e){v(e instanceof Error?e:Error(e+"")),y(e=>[...e,{role:"assistant",text:"Sorry, I couldn't process that query."}]);const t="undefined"!=typeof performance?performance.now():Date.now();z().record({type:"interrogation-answered",component:P.current,error:!0,latencyMs:Math.max(0,Math.round(t-r))})}finally{b(!1)}},[]),E=Jr(({text:e,annotations:t})=>{const r=e.trim();r&&(y(e=>[...e,{role:"assistant",text:r}]),t&&t.length>0&&h(e=>[...e,...t]))},[]),F=Jr(()=>{y([]),h([]),v(null)},[]);return{ask:B,announce:E,history:d,summary:w,annotations:Zr(()=>{const e=n??[];return 0===e.length?m:0===m.length?e:[...e,...m]},[n,m]),loading:g,error:f,reset:F}}import{useMemo as xo}from"react";var Ao=["hover","hover-end","click","click-end","selection","selection-end","brush-end"];function Co(e={}){const{chartId:t,types:r=Ao}=e,{latest:n}=qt({chartId:t,types:r,limit:1});return xo(()=>{if(!n)return null;if("hover-end"===n.type||"selection-end"===n.type||"brush-end"===n.type||"click-end"===n.type)return null;let e;if("selection"===n.type)e=n.selection.fields;else{if("hover"!==n.type&&"click"!==n.type)return null;e=n.datum}return e&&"object"==typeof e?{datum:e,x:n.x,y:n.y,source:n.type}:null},[n])}function ko(e){if("number"==typeof e)return e;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function So(e,t){return"pass"===e?t.passColor??"var(--semiotic-success)":"warn"===e?t.warnColor??"var(--semiotic-warning)":t.failColor??"var(--semiotic-danger)"}function Po(e){if(null==e)return;const t="number"==typeof e?e:Date.parse(e);return Number.isNaN(t)?void 0:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function jo(e){const t=e.label??e.name??e.id;return"number"==typeof e.confidence&&1>e.confidence?`${t} · ${Math.round(100*e.confidence)}%`:t}function To(e){return{author:e.name??e.id,authorKind:"system",source:e.source,basis:e.basis??"rule",confidence:e.confidence,createdAt:e.createdAt,dataVersion:e.dataVersion,stableId:e.id}}function No(e,t={}){const r=[],n=[],a=t.valueAxis??"y",o={status:t.status??"proposed",anchor:t.anchor??"semantic",...void 0!==t.ttlHint?{ttlHint:t.ttlHint}:{}};for(const i of e){if("pass"===i.status&&!t.includePassed)continue;const e=So(i.status,t),s=jo(i),c={provenance:To(i),lifecycle:o},l=e=>n.push({result:i,reason:e}),p=e=>r.push(ve(e,c));switch(i.kind){case"range":if("number"!=typeof i.min||"number"!=typeof i.max){l("range check is missing numeric min/max bounds");break}p({type:"band",y0:i.min,y1:i.max,fill:e,fillOpacity:.12,color:e,label:s});break;case"min":case"max":case"threshold":{const t=i.value??("min"===i.kind?i.min:i.max);if("number"!=typeof t){l(i.kind+" check is missing a numeric value");break}p({type:"x"===a?"x-threshold":"y-threshold",value:t,label:s,color:e});break}case"freshness":{const t=void 0!==i.at?ko(i.at):void 0;if(void 0===t){l("freshness check has no parseable timestamp (`at`); render as a chart-level status badge");break}p({type:"x-threshold",value:t,label:s,color:e});break}default:l(`${i.kind} check on "${i.column??"?"}" has no single chart coordinate; surface it as a chart-level status badge or a row-level mark in your UI`)}}return{annotations:r,unplaced:n}}function Ro(e){switch(e){case"pass":return"pass";case"warn":return"warn";case"fail":return"fail";default:return"error"}}function $o(e){if(!e)return"dbt check";const t=e.split(".");return t[t.length-1]||e}function Io(e,t={}){const r=[],n=e.sources;if(n?.results){const e=n.metadata?.generated_at,t=n.metadata?.invocation_id;for(const a of n.results){const n=Ro(a.status),o=$o(a.unique_id),i=Po(a.max_loaded_at);r.push({id:a.unique_id??o,name:"dbt freshness: "+o,label:"pass"===n?o+" fresh":`${o} stale${i?" since "+i:""}`,status:n,kind:"freshness",at:a.max_loaded_at,message:`freshness ${n}${a.max_loaded_at?" — last load "+a.max_loaded_at:""}`,source:"dbt",basis:"rule",createdAt:e,dataVersion:t})}}const a=e.runResults;if(a?.results){const e=a.metadata?.generated_at,n=a.metadata?.invocation_id;for(const o of a.results){const a=Ro(o.status);if("pass"===a&&!t.includePassed)continue;const i=$o(o.unique_id);r.push({id:o.unique_id??i,name:"dbt test · "+i,status:a,kind:"custom",message:o.message??void 0,observedCount:"number"==typeof o.failures?o.failures:void 0,source:"dbt",basis:"rule",createdAt:e,dataVersion:n})}}return No(r,t)}function Mo(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}function Bo(e){return e.replace(/^expect_/,"").replace(/column_values_to_be_|column_values_to_|column_|to_be_|to_/g," ").replace(/_/g," ").replace(/\s+/g," ").trim()||e}function Eo(e,t={}){const{createdAt:r,dataVersion:n}=function(e){const t=e?.run_id;return t?"string"==typeof t?{dataVersion:t}:{createdAt:t.run_time,dataVersion:t.run_name??t.run_time}:{}}(e.meta),a=[];for(const[t,o]of(e.results??[]).entries()){const e=o.expectation_config??{},i=e.expectation_type??"unknown_expectation",s=e.kwargs??{},c=s.column,l=o.success?"pass":"fail",p=Mo(s.min_value),u=Mo(s.max_value),d=Mo(s.value),y=Mo(o.result?.observed_value),m=c??"value",h=Bo(i),g=void 0!==y?`${m}: ${y} `:"",b={id:`ge:${i}:${c??t}`,name:`GE ${h}${c?` (${c})`:""}`,status:l,column:c,message:void 0!==y?"observed "+y:void 0,observedCount:o.result?.unexpected_count,source:"great-expectations",basis:"statistical-test",createdAt:r,dataVersion:n},f=/_to_be_between$/.test(i);a.push(f&&void 0!==p&&void 0!==u?{...b,kind:"range",min:p,max:u,label:`${g}(expected ${p}–${u})`}:f&&void 0!==p?{...b,kind:"min",value:p,label:`${g}(min ${p})`}:f&&void 0!==u?{...b,kind:"max",value:u,label:`${g}(max ${u})`}:void 0!==d?{...b,kind:"threshold",value:d,label:`${g}(target ${d})`}:{...b,kind:"custom",label:`${m} ${h}`})}return No(a,t)}function Fo(e,t,r={}){const n=r.profile??Rn(t??[],{rawInput:r.rawInput}),a=Ga(e),o=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 n=e.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));n&&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:ro(t,{profile:n,intent:r.intent,maxResults:o,includeVariants:!1}),profile:n};const s=a.fits(n);return null===s?{status:"ok",component:e,profile:n,...i.length?{repairs:i}:{}}:{status:"alternative",component:e,reason:s,alternatives:ro(t,{profile:n,intent:r.intent,maxResults:o,deny:[e],includeVariants:!1}),profile:n,...i.length?{repairs:i}:{}}}var Lo={valid:!1,errors:[]};function Do(e,t={}){const r=e.component,n=e.props??{},a=[],o=!!tr[r];o||a.push(`Unknown component "${r}". It is not in the chart registry — pick a known chart.`);const i=o?nr(r,n):{...Lo};if(!i.valid)for(const e of i.errors)a.push(e);const s=!1!==t.diagnose&&o?Or(r,n).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,u,d,y,m;if((t.repair??!!t.data)&&t.data&&(p=Fo(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(", ")}.`)),o&&(u=de(r,n),d=v(u)),t.render&&o){const e=t.render(r,n);m=e.svg,y=e.evidence,y.empty&&a.push("Rendered to an empty scene (no marks) — the data or accessors produce nothing to draw.");for(const e of y.warnings)a.push(e)}const h=o&&i.valid&&(!l||0===c.length)&&(!p||"ok"===p.status)&&(!y||!y.empty);return{ok:h,component:r,props:n,config:u,jsx:d,validation:i,diagnostics:s,repair:p,evidence:y,svg:m,reasons:h?[]:a}}function _o(e={}){const t=e.components??Object.keys(tr).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 Oo(e){return{name:e.name,description:e.description,input_schema:e.inputSchema}}function zo(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.inputSchema}}}function Ho(e,t=!0){if(!e||"object"!=typeof e||Array.isArray(e))return!1;const r=e,n=Array.isArray(r.type)?r.type:[r.type],a=n.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=>Ho(e,!1)))return!1}if(n.includes("array")&&(!r.items||!Ho(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=>Ho(e,!1)))return!1}return!0}function Go(e,t={}){const r=t.strict??!1;if(r&&!Ho(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 qo(e){return t=>Do(t,e?e(t):{})}var Vo=[{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 Wo(e){if("string"!=typeof e||0===e.trim().length)return null;const t=new Map;for(const r of Vo)for(const n of r.patterns)if(n.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),[n,...a]=r;return{intent:n.intent,confidence:n.confidence,alternates:a}}function Uo(e,t={}){const r=t.audience;if(!r)return[];const n=t.profile??Rn(e??[],{rawInput:t.rawInput}),a=Xa(r),o=t.scoreTolerance??1.5,i=t.maxResults??5,s=Ha(),c=new Map;for(const e of s)c.set(e.component,Ya(e.component,e.rubric.familiarity,r));const l=ro(e,{profile:n,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||o>=p.score-e.score)&&u.push({stretch:e,familiar:p});const d=new Set,y=[];for(const{stretch:e,familiar:t}of u){const n=`${e.component}/${e.variant?.key??"base"}`;if(d.has(n))continue;d.add(n);const a=c.get(e.component)??e.rubric.familiarity,o=r.targets?.[e.component],s=o?.reason??("increase"===o?.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(y.push({suggestion:e,replacing:t?.component,rationale:s,familiarity:a}),y.length>=i)break}return y}function Yo(e,t={}){const r=t.profile??Rn(e??[],{rawInput:t.rawInput}),n=t.maxPanels??6,a=!1!==t.diversifyByFamily,o=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 o){if(i.length>=n){c.push(u);continue}const o=ro(e,{profile:r,intent:u,allow:t.allow,deny:t.deny,maxResults:20,includeVariants:!0,minScore:1.5,audience:t.audience});let d;for(const e of o)if(!(p.has(`${e.component}/${e.variant?.key??"base"}`)||a&&l.has(e.family))){d=e;break}if(!d&&a)for(const e of o)if(!p.has(`${e.component}/${e.variant?.key??"base"}`)){d=e;break}d?(i.push({intent:u,suggestion:d}),s.push(u),l.add(d.family),p.add(`${d.component}/${d.variant?.key??"base"}`)):c.push(u)}return{panels:i,intentsCovered:s,intentsMissing:c,stretchPanels:t.audience&&(t.audience.exposureLevel??1)>0?Uo(e,{profile:r,audience:t.audience,deny:Array.from(p).map(e=>e.split("/")[0]),maxResults:t.maxStretchPanels??Math.min(3,n)}):[],profile:r}}var Xo={name:"Executive",familiarity:{BarChart:5,LineChart:5,PieChart:5,DonutChart:4,GaugeChart:5,AreaChart:4,FunnelChart:4,ChoroplethMap:4,Histogram:3,Heatmap:3,StackedBarChart:3,StackedAreaChart:3,Scatterplot:3,BubbleChart:3,GroupedBarChart:3,DotPlot:3,BoxPlot:2,ViolinPlot:1,SwarmPlot:1,RidgelinePlot:1,MultiAxisLineChart:2,CandlestickChart:2,DifferenceChart:2,QuadrantChart:3,LikertChart:3,SwimlaneChart:2,MinimapChart:2,ConnectedScatterplot:1,SankeyDiagram:2,TreeDiagram:3,Treemap:3,CirclePack:2,OrbitDiagram:1,ChordDiagram:1,ProcessSankey:2,ForceDirectedGraph:1,ProportionalSymbolMap:3,FlowMap:2,DistanceCartogram:1},targets:{PieChart:{direction:"decrease",weight:1,reason:"shifting from share-by-angle toward share-by-length for accuracy"},BarChart:{direction:"increase",weight:1}},exposureLevel:1},Ko={name:"Analyst",familiarity:{BarChart:5,LineChart:5,PieChart:4,DonutChart:4,AreaChart:5,StackedAreaChart:4,StackedBarChart:5,GroupedBarChart:5,Histogram:5,Heatmap:5,Scatterplot:5,BubbleChart:4,BoxPlot:4,DotPlot:4,GaugeChart:3,FunnelChart:4,LikertChart:4,QuadrantChart:4,SwimlaneChart:4,MinimapChart:4,DifferenceChart:3,MultiAxisLineChart:4,CandlestickChart:3,ConnectedScatterplot:3,ViolinPlot:3,SwarmPlot:3,RidgelinePlot:2,TreeDiagram:4,Treemap:4,CirclePack:3,SankeyDiagram:4,ProcessSankey:3,ChordDiagram:3,OrbitDiagram:2,ForceDirectedGraph:3,ChoroplethMap:4,ProportionalSymbolMap:4,FlowMap:3,DistanceCartogram:2},targets:{PieChart:{direction:"decrease",weight:1},BoxPlot:{direction:"increase",weight:1,reason:"team is shifting from averages to distribution-aware comparisons"}},exposureLevel:1},Qo={name:"Data scientist",familiarity:{BarChart:5,LineChart:5,PieChart:3,DonutChart:3,AreaChart:5,StackedAreaChart:5,StackedBarChart:5,GroupedBarChart:5,Histogram:5,Heatmap:5,Scatterplot:5,BubbleChart:5,BoxPlot:5,ViolinPlot:5,SwarmPlot:4,RidgelinePlot:4,DotPlot:4,QuadrantChart:4,LikertChart:4,DifferenceChart:4,MultiAxisLineChart:4,ConnectedScatterplot:4,GaugeChart:2,FunnelChart:3,SwimlaneChart:3,MinimapChart:4,CandlestickChart:3,TreeDiagram:4,Treemap:4,CirclePack:4,SankeyDiagram:4,ProcessSankey:3,ChordDiagram:3,OrbitDiagram:2,ForceDirectedGraph:4,ChoroplethMap:4,ProportionalSymbolMap:4,FlowMap:3,DistanceCartogram:3},targets:{PieChart:{direction:"decrease",weight:2,reason:"preferring length-encoded comparisons for precision"},BarChart:{direction:"decrease",weight:1,reason:"promoting distribution-aware charts over single-value bars when raw observations are available"},BoxPlot:{direction:"increase",weight:1},ViolinPlot:{direction:"increase",weight:1}},exposureLevel:2},Jo={executive:Xo,analyst:Ko,"data-scientist":Qo},Zo=[{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,n=e.fields.find(e=>"category"===e.role||"categorical"===e.kind)?.name;return{timeAccessor:t,valueAccessor:r,categoryAccessor:n}}},{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,n=e.fields.find(e=>"category"===e.role||"categorical"===e.kind&&"series"!==e.role)?.name;return{timeAccessor:t,valueAccessor:r,...n?{categoryAccessor:n}:{}}}},{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}}}],ei=new Map;function ti(e){ei.set(e.component,e)}function ri(e){ei.delete(e)}function ni(){if(0===ei.size)return Zo;const e=new Map;for(const t of Zo)e.set(t.component,t);for(const[t,r]of ei)e.set(t,r);return Array.from(e.values())}function ai(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 oi(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 n of t)r+=e[n]??0;return r/t.length}function ii(e,t,r){const n=[],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)n.push(`Strong fit for ${e} (${t}/5)`);return e.throughput&&n.push(`tuned for ${e.throughput} throughput`),n}function si(e,t={}){const r=t.capabilities??ni(),n=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],a=t.minScore??0,o=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[n,a]of Object.entries(t.intentScores))r[n]=ai(a,e);const o=oi(r,n);if(a>o)continue;const l={...t.rubric},p=t.caveats?Array.from(t.caveats(e)):[],u=ii(e,r,n),d=t.buildProps(e);c.push({component:t.component,family:"realtime",importPath:t.importPath,score:o,intentScores:r,rubric:l,reasons:u,caveats:p,props:d})}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,o)}var ci=["x","y","size","category","series","time"];function li(e,t){const r=e.fields[t];return r?"numeric"===r.type?"numeric":"categorical"===r.type?"categorical":"date"===r.type?"date":"unknown":"unknown"}function pi(e){const t=new Set;for(const r of Ha())null===r.fits(e)&&t.add(r.component);return t}function ui(e,t){const r=new Set(Object.keys(e.fields)),n=new Set(Object.keys(t.fields)),a=[],o=[];for(const e of n)r.has(e)||a.push(e);for(const e of r)n.has(e)||o.push(e);a.sort(),o.sort();const i=[];for(const a of n){if(!r.has(a))continue;const n=li(e,a),o=li(t,a);n!==o&&i.push({field:a,from:n,to:o})}i.sort((e,t)=>e.field.localeCompare(t.field));const s=[];for(const r of ci){const n=e.primary[r],a=t.primary[r];n!==a&&s.push({role:r,from:n,to:a})}const c=pi(e),l=pi(t),p=Array.from(c).filter(e=>!l.has(e)).sort(),u=Array.from(l).filter(e=>!c.has(e)).sort();return{rowCountChange:t.rowCount-e.rowCount,added:a,removed:o,typeChanges:i,primaryChanges:s,becameUnfit:p,becameFit:u,unchanged:0===a.length&&0===o.length&&0===i.length&&0===s.length&&0===p.length&&0===u.length&&e.rowCount===t.rowCount}}function di(e,t=Ha()){const r=new Map;for(const e of t)r.set(e.component,{component:e.component,family:e.family,fitsOn:0,rejectedOn:0,inTopThreeOn:0,topPickOn:0,expertAgreementCount:0,averageScore:0,caveatCoverage:0,variantUtilization:0});const n=new Map,a=new Map,o=new Map,i=new Map,s=[];for(const c of e){let e,l;try{e=Rn(c.data,{rawInput:c.rawInput}),l=no(c.data,{profile:e,intent:c.intent,capabilities:t,maxResults:40})}catch{const e=!!c.expected&&c.expected.length>0;s.push({fixture:c.name,shape:c.shape,intent:c.intent,expected:c.expected,topPick:void 0,topThree:[],fittingCount:0,rejectedCount:0,expertAgreement:!e&&null,topPickAgreement:!e&&null,noFitHonored:null});continue}const p=[],u=new Set;for(const e of l.fitting)if(!u.has(e.component)&&(u.add(e.component),p.push({component:e.component,variantKey:e.variant?.key,score:e.score}),3===p.length))break;const d=c.expected&&c.expected.length>0?p.some(e=>c.expected.includes(e.component)):null,y=c.expected&&c.expected.length>0?p.length>0&&c.expected.includes(p[0].component):null;s.push({fixture:c.name,shape:c.shape,intent:c.intent,expected:c.expected,topPick:p[0],topThree:p,fittingCount:l.fitting.length,rejectedCount:l.rejected.length,expertAgreement:d,topPickAgreement:y,noFitHonored:!0===c.expectsNoFit?0===l.fitting.length:null});for(const e of l.fitting){const t=r.get(e.component);t&&(t.fitsOn+=1,n.set(e.component,(n.get(e.component)??0)+e.score),a.set(e.component,(a.get(e.component)??0)+1),e.caveats.length>0&&o.set(e.component,(o.get(e.component)??0)+1),e.variant&&i.set(e.component,(i.get(e.component)??0)+1))}for(const e of l.rejected){const t=r.get(e.component);t&&(t.rejectedOn+=1)}for(const e of p){const t=r.get(e.component);t&&(t.inTopThreeOn+=1)}if(p[0]){const e=r.get(p[0].component);e&&(e.topPickOn+=1)}if(c.expected&&d)for(const e of p)if(c.expected.includes(e.component)){const t=r.get(e.component);t&&(t.expertAgreementCount+=1)}}for(const e of r.values()){const t=a.get(e.component)??0;e.averageScore=0===t?0:(n.get(e.component)??0)/t,e.caveatCoverage=0===t?0:(o.get(e.component)??0)/t,e.variantUtilization=0===t?0:(i.get(e.component)??0)/t}const c=Array.from(r.values()).sort((e,t)=>{const r=e.expertAgreementCount-t.expertAgreementCount;return 0!==r?r:t.fitsOn-e.fitsOn}),l=s.filter(e=>null!==e.expertAgreement),p=0===l.length?0:l.filter(e=>!0===e.expertAgreement).length/l.length,u=0===l.length?0:l.filter(e=>!0===e.topPickAgreement).length/l.length,d=Array.from(a.values()).reduce((e,t)=>e+t,0),y=Array.from(o.values()).reduce((e,t)=>e+t,0),m=Array.from(i.values()).reduce((e,t)=>e+t,0);return{perCapability:c,perFixture:s,summary:{fixtureCount:e.length,capabilityCount:t.length,expertAgreementRate:p,top1AgreementRate:u,overallCaveatCoverage:0===d?0:y/d,overallVariantUtilization:0===d?0:m/d}}}var yi=(()=>{const e=Array.from({length:12},(e,t)=>t+1);return["EU","NA","APAC"].flatMap((t,r)=>e.map(e=>({month:e,revenue:800+e*(200+40*r)+150*Math.sin(e),region:t})))})(),mi=Array.from({length:12},(e,t)=>({month:t+1,revenue:1e3+150*t+100*Math.sin(t/2)})),hi=[{product:"Widget",units:480},{product:"Gadget",units:620},{product:"Sprocket",units:290},{product:"Whatsit",units:740},{product:"Doohickey",units:410}],gi=Array.from({length:150},(e,t)=>({respondent_id:t+1,satisfaction:Math.max(1,Math.min(10,6+2*Math.sin(t/7)+3*Math.random()-1)),cohort:["Beta","GA","Enterprise"][t%3]})),bi=Array.from({length:80},(e,t)=>{const r=Math.max(0,40*Math.random());return{student_id:"s"+(t+1),hours:r,grade:Math.min(100,1.8*r+30+20*(Math.random()-.5))}}),fi=Array.from({length:50},(e,t)=>({observation:50+12*Math.sin(t/4)+6*Math.random()})),vi=[{product:"Widget",region:"EU",units:480},{product:"Widget",region:"NA",units:620},{product:"Widget",region:"APAC",units:290},{product:"Gadget",region:"EU",units:320},{product:"Gadget",region:"NA",units:740},{product:"Gadget",region:"APAC",units:410},{product:"Sprocket",region:"EU",units:200},{product:"Sprocket",region:"NA",units:380},{product:"Sprocket",region:"APAC",units:150},{product:"Whatsit",region:"EU",units:290},{product:"Whatsit",region:"NA",units:550},{product:"Whatsit",region:"APAC",units:180}],wi=[{name:"monthly revenue with regions, intent=trend",shape:"12 months × 3 regions, numeric month, numeric revenue",data:yi,intent:"trend",expected:["LineChart","AreaChart","MinimapChart"]},{name:"monthly revenue with regions, intent=compare-series",shape:"12 months × 3 regions",data:yi,intent:"compare-series",expected:["LineChart","GroupedBarChart"]},{name:"monthly revenue with regions, intent=composition-over-time",shape:"12 months × 3 regions, additive",data:yi,intent:"composition-over-time",expected:["StackedAreaChart","StackedBarChart"]},{name:"monthly revenue single series, intent=trend",shape:"12 months, no series",data:mi,intent:"trend",expected:["LineChart","AreaChart"]},{name:"product sales, intent=rank",shape:"5 products, single numeric measure",data:hi,intent:"rank",expected:["BarChart","DotPlot"]},{name:"product sales, intent=part-to-whole",shape:"5 products, single numeric measure",data:hi,intent:"part-to-whole",expected:["PieChart","DonutChart","BarChart"]},{name:"satisfaction scores, intent=distribution",shape:"150 numeric observations across 3 cohorts",data:gi,intent:"distribution",expected:["Histogram","BoxPlot","ViolinPlot"]},{name:"satisfaction scores, intent=compare-categories",shape:"150 obs × 3 cohorts",data:gi,intent:"compare-categories",expected:["BoxPlot","ViolinPlot","SwarmPlot"]},{name:"hours vs grade, intent=correlation",shape:"80 students, hours + grade",data:bi,intent:"correlation",expected:["Scatterplot"]},{name:"hours vs grade, intent=outlier-detection",shape:"80 students",data:bi,intent:"outlier-detection",expected:["Scatterplot"]},{name:"conversion funnel, intent=flow",shape:"4 stages, descending values",data:[{stage:"Visit",users:1e4},{stage:"Signup",users:2400},{stage:"Trial",users:1100},{stage:"Paid",users:380}],intent:"flow",expected:["FunnelChart"]},{name:"org chart, intent=hierarchy",shape:"3-deep org tree",data:[],rawInput:{name:"Acme",children:[{name:"Engineering",children:[{name:"Platform",value:18},{name:"Product",value:22}]},{name:"Sales",children:[{name:"EMEA",value:12},{name:"AMER",value:26}]},{name:"Ops",value:9}]},intent:"hierarchy",expected:["TreeDiagram","Treemap","CirclePack"]},{name:"approval workflow transitions, intent=flow",shape:"5 nodes / 4 weighted edges",data:[],rawInput:{nodes:[{id:"draft"},{id:"review"},{id:"approved"},{id:"shipped"},{id:"rejected"}],edges:[{source:"draft",target:"review",value:100},{source:"review",target:"approved",value:60},{source:"review",target:"rejected",value:40},{source:"approved",target:"shipped",value:58}]},intent:"flow",expected:["SankeyDiagram","ChordDiagram"]},{name:"US states with values, intent=geo",shape:"3 polygon features with numeric values",data:[],rawInput:{type:"FeatureCollection",features:[{type:"Feature",id:"CA",properties:{name:"California",value:39},geometry:{type:"Polygon",coordinates:[[[-124,32],[-114,32],[-114,42],[-124,42],[-124,32]]]}},{type:"Feature",id:"TX",properties:{name:"Texas",value:29},geometry:{type:"Polygon",coordinates:[[[-106,26],[-93,26],[-93,36],[-106,36],[-106,26]]]}},{type:"Feature",id:"NY",properties:{name:"New York",value:19},geometry:{type:"Polygon",coordinates:[[[-79,40],[-72,40],[-72,45],[-79,45],[-79,40]]]}}]},intent:"geo",expected:["ChoroplethMap","ProportionalSymbolMap"]},{name:"country economies, intent=correlation",shape:"10 countries × 3 numeric measures (gdp, hours, population)",data:[{country:"USA",gdp_per_capita:70,hours_worked:1700,population_size:330},{country:"UK",gdp_per_capita:48,hours_worked:1500,population_size:67},{country:"Germany",gdp_per_capita:53,hours_worked:1330,population_size:84},{country:"Japan",gdp_per_capita:40,hours_worked:1600,population_size:125},{country:"France",gdp_per_capita:45,hours_worked:1480,population_size:67},{country:"Italy",gdp_per_capita:38,hours_worked:1700,population_size:60},{country:"Spain",gdp_per_capita:32,hours_worked:1640,population_size:47},{country:"Canada",gdp_per_capita:52,hours_worked:1690,population_size:38},{country:"Australia",gdp_per_capita:56,hours_worked:1700,population_size:26},{country:"South Korea",gdp_per_capita:35,hours_worked:1900,population_size:52}],intent:"correlation",expected:["Scatterplot","BubbleChart"]},{name:"website metrics with 3 measures, intent=compare-series",shape:"24 months × 3 numeric measures with different ranges",data:Array.from({length:24},(e,t)=>({month:t+1,page_views:Math.round(5e4+1200*t+8e3*Math.sin(t/3)),conversion_rate:2.5+.8*Math.sin(t/4)+.05*t,avg_session_seconds:Math.round(120+2*t+15*Math.cos(t/5))})),intent:"compare-series",expected:["MultiAxisLineChart","LineChart"]},{name:"sales by region and product, intent=compare-series",shape:"12 rows = 4 products × 3 regions",data:vi,intent:"compare-series",expected:["GroupedBarChart","StackedBarChart"]},{name:"sales by region and product, intent=part-to-whole",shape:"12 rows = 4 products × 3 regions",data:vi,intent:"part-to-whole",expected:["StackedBarChart","PieChart"]},{name:"revenue vs expenses, intent=compare-series",shape:"48 rows = 24 months × 2 series",data:[...Array.from({length:24},(e,t)=>({month:t+1,amount:100+8*t+25*Math.sin(t/3),series:"revenue"})),...Array.from({length:24},(e,t)=>({month:t+1,amount:80+6*t+15*Math.cos(t/4),series:"expenses"}))],intent:"compare-series",expected:["DifferenceChart","LineChart","GroupedBarChart"]},{name:"stock OHLC prices, intent=change-detection",shape:"30 days × open/high/low/close",data:Array.from({length:30},(e,t)=>{const r=100+1.2*t+8*Math.sin(t/4),n=r+4*(Math.random()-.5),a=r+4*(Math.random()-.5);return{day:t+1,open:n,high:Math.max(n,a)+3*Math.random(),low:Math.min(n,a)-3*Math.random(),close:a}}),intent:"change-detection",expected:["CandlestickChart","LineChart"]},{name:"unemployment vs inflation by year, intent=correlation",shape:"20 years × 2 measures, ordered by year",data:Array.from({length:20},(e,t)=>({year:2005+t,unemployment:5+2*Math.sin(t/2)+(t>4&&10>t?3:0),inflation:2+1.5*Math.cos(t/3)})),intent:"correlation",expected:["ConnectedScatterplot","Scatterplot"]},{name:"transition events, intent=flow",shape:"11 stage transitions across 3 deals with startTime + value",data:[{case:"deal-001",stage:"Inbound Lead",nextStage:"Qualified",startTime:"2024-04-01T09:00:00",value:18},{case:"deal-001",stage:"Qualified",nextStage:"Discovery",startTime:"2024-04-01T13:00:00",value:16},{case:"deal-001",stage:"Discovery",nextStage:"Proposal",startTime:"2024-04-02T11:00:00",value:14},{case:"deal-001",stage:"Proposal",nextStage:"Closed Won",startTime:"2024-04-04T09:00:00",value:12},{case:"deal-002",stage:"Inbound Lead",nextStage:"Qualified",startTime:"2024-04-01T10:00:00",value:10},{case:"deal-002",stage:"Qualified",nextStage:"Discovery",startTime:"2024-04-02T09:00:00",value:9},{case:"deal-002",stage:"Discovery",nextStage:"Proposal",startTime:"2024-04-03T09:00:00",value:7},{case:"deal-002",stage:"Proposal",nextStage:"Closed Lost",startTime:"2024-04-04T11:00:00",value:5},{case:"deal-003",stage:"Signup",nextStage:"Activated",startTime:"2024-04-01T08:30:00",value:28},{case:"deal-003",stage:"Activated",nextStage:"Trial",startTime:"2024-04-01T10:00:00",value:24},{case:"deal-003",stage:"Trial",nextStage:"Subscribed",startTime:"2024-04-02T10:00:00",value:18}],intent:"flow",expected:["SankeyDiagram","ProcessSankey","ChordDiagram"]},{name:"incidents by service and weekday, intent=compare-categories",shape:"56 cells = 8 services × 7 weekdays, numeric incident count",data:(()=>{const e=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];return["auth","billing","search","ingest","notify","reports","exports","webhooks"].flatMap((t,r)=>e.map((e,n)=>({service:t,day:e,incidents:Math.round(2+9*Math.abs(Math.sin(1.7*r+n))+(5>n?1.5:-1.5))})))})(),intent:"compare-categories",expected:["Heatmap","GroupedBarChart"]},{name:"capacity utilization single value, intent=part-to-whole",shape:"1 row, one numeric value against an implicit 0–100 plan",data:[{metric:"Cluster capacity used",value:78}],intent:"part-to-whole",expected:["GaugeChart","BigNumber"]},{name:"shipping flows between cities, intent=flow",shape:"6 lat/lon nodes, 6 weighted flows, 1 outline feature",data:[],rawInput:{type:"FeatureCollection",features:[{type:"Feature",id:"outline",properties:{name:"Region"},geometry:{type:"Polygon",coordinates:[[[-125,24],[-66,24],[-66,50],[-125,50],[-125,24]]]}}],points:[{id:"SEA",lon:-122.3,lat:47.6},{id:"SFO",lon:-122.4,lat:37.8},{id:"DEN",lon:-104.9,lat:39.7},{id:"ORD",lon:-87.6,lat:41.9},{id:"ATL",lon:-84.4,lat:33.7},{id:"JFK",lon:-73.8,lat:40.6}],flows:[{source:"SEA",target:"ORD",value:320},{source:"SFO",target:"JFK",value:540},{source:"SFO",target:"ATL",value:210},{source:"DEN",target:"ORD",value:180},{source:"ORD",target:"JFK",value:460},{source:"ATL",target:"JFK",value:250}]},intent:"flow",expected:["FlowMap"]},{name:"travel times from HQ, intent=geo",shape:"6 lat/lon points with a cost field measured from a center",data:[],rawInput:{type:"FeatureCollection",features:[{type:"Feature",id:"outline",properties:{name:"Region"},geometry:{type:"Polygon",coordinates:[[[-125,24],[-66,24],[-66,50],[-125,50],[-125,24]]]}}],points:[{id:"HQ",lon:-122.4,lat:37.8,cost:0},{id:"Seattle",lon:-122.3,lat:47.6,cost:95},{id:"Denver",lon:-104.9,lat:39.7,cost:150},{id:"Chicago",lon:-87.6,lat:41.9,cost:245},{id:"Atlanta",lon:-84.4,lat:33.7,cost:280},{id:"New York",lon:-73.8,lat:40.6,cost:330}]},intent:"geo",expected:["DistanceCartogram","ProportionalSymbolMap"]},{name:"flat single column",shape:"50 rows, one numeric column",data:fi,expected:["Histogram"]},{name:"sparse 3-row data, intent=rank",shape:"3 rows total",data:[{name:"A",value:12},{name:"B",value:34},{name:"C",value:8}],intent:"rank",expected:["BarChart","DotPlot"]}];import{useEffect as xi,useMemo as Ai,useRef as Ci,useSyncExternalStore as ki}from"react";var Si=e=>pe(e),Pi=()=>z().enabled,ji=()=>!1;function Ti(e,t={}){const{intent:r,allow:n,deny:a,maxResults:o,includeVariants:i,minScore:s,rawInput:c,seriesField:l,capabilities:p,audience:u,profile:d}=t,y=Ai(()=>d??Rn(e??[],{rawInput:c,seriesField:l}),[d,e,c,l]),m=Ai(()=>ro(e,{intent:r,allow:n,deny:a,maxResults:o,includeVariants:i,minScore:s,capabilities:p,audience:u,profile:y}),[e,r,n,a,o,i,s,p,u,y]),h=ki(Si,Pi,ji),g=Ci(null);return xi(()=>{if(0===m.length)return void(g.current=null);if(!h)return void(g.current=null);const e=z(),t=u?.name??(u?"custom":void 0),n=`${r??""}|${t??""}|${m.map(e=>e.component).join(",")}`;if(n===g.current)return;const a=e.getEvents();for(let e=a.length-1;e>=0;e--){const t=a[e];if("suggestion-shown"===t.type){if(`${Array.isArray(t.intent)?t.intent.join(","):t.intent??""}|${t.audience??""}|${t.components.join(",")}`===n)return void(g.current=n);break}}g.current=n,e.record({type:"suggestion-shown",intent:r,components:m.map(e=>e.component),topScore:m[0]?.score,audience:t})},[m,r,u,h]),{suggestions:m,profile:y}}import*as Ni from"react";function Ri(t){const r=ie(t.recipe)??(t.recipeId?O(t.recipeId):void 0);if(!r)throw Error(`Unknown chart recipe "${t.recipeId??"(missing recipeId)"}". Register it before rendering.`);const n=function(e){return"function"==typeof e.layout?e.layout:U(e.layout)?H(e.layout.id):void 0}(r);if(!n){const e=U(r.layout)?r.layout.id:r.id;throw Error(`No runtime layout registered for chart recipe "${r.id}" (${e}).`)}const a="semiotic-chart-recipe semiotic-chart-recipe-"+r.id.replace(/[^a-zA-Z0-9_-]+/g,"-"),o={...t,chartId:t.chartId??r.id,className:t.className?`${a} ${t.className}`:a,recipeId:r.id,recipe:r,layout:n},i="XYFrame"===r.frameFamily||"XYCustomChart"===r.frameFamily?_e:"OrdinalFrame"===r.frameFamily||"OrdinalCustomChart"===r.frameFamily?Xe:"NetworkFrame"===r.frameFamily||"NetworkCustomChart"===r.frameFamily?ot:"GeoFrame"===r.frameFamily||"GeoCustomChart"===r.frameFamily?e:void 0;if(!i)throw Error(`Chart recipe "${r.id}" uses unsupported frame family "${r.frameFamily}".`);return Ni.createElement(i,o)}function $i(e){const t=e.pointId??e.id??e._transitionKey;return null==t||""===t?void 0:t+""}function Ii(e){return e.accessibility?.tableFields??e.accessibleDatum??e.datum??null}function Mi(e){return"number"==typeof e&&Number.isFinite(e)}function Bi(e){if(Mi(e.x)&&Mi(e.y)&&Mi(e.w)&&Mi(e.h))return{x0:e.x,y0:e.y,x1:e.x+e.w,y1:e.y+e.h};if(Mi(e.x)&&Mi(e.y)&&Mi(e.r))return{x0:e.x-e.r,y0:e.y-e.r,x1:e.x+e.r,y1:e.y+e.r};if(Mi(e.cx)&&Mi(e.cy)&&Mi(e.r))return{x0:e.cx-e.r,y0:e.cy-e.r,x1:e.cx+e.r,y1:e.cy+e.r};if(Mi(e.cx)&&Mi(e.cy)&&Mi(e.outerR))return{x0:e.cx-e.outerR,y0:e.cy-e.outerR,x1:e.cx+e.outerR,y1:e.cy+e.outerR};const t=[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat().filter(e=>Array.isArray(e)&&Mi(e[0])&&Mi(e[1]));return t.length>0?{x0:Math.min(...t.map(e=>e[0])),y0:Math.min(...t.map(e=>e[1])),x1:Math.max(...t.map(e=>e[0])),y1:Math.max(...t.map(e=>e[1]))}:null}function Ei(e,t){const r=Math.max(0,Math.min(e.x1,t.x1)-Math.max(e.x0,t.x0))*Math.max(0,Math.min(e.y1,t.y1)-Math.max(e.y0,t.y0)),n=Math.min(Math.max(0,e.x1-e.x0)*Math.max(0,e.y1-e.y0),Math.max(0,t.x1-t.x0)*Math.max(0,t.y1-t.y0));return n>0?r/n:0}function Fi(e,t,r,n,a){if(e===t)return!0;const o=r.dataRoles.map(e=>M(e,n,a)).filter(e=>!!e).filter(r=>null!=e[r]&&null!=t[r]);return o.length>0&&o.every(r=>e[r]+""==t[r]+"")}function Li(e,t,r,n,a,o="warn",i){return{id:e,category:t,status:r?"pass":o,message:r?n:a,...i?{evidence:i}:{}}}function Di(e){const{recipe:t}=e,r=function(e){return Array.isArray(e)?e:e&&"object"==typeof e?[...e.nodes??e.sceneNodes??[],...e.sceneEdges??[]]:[]}(e.scene),n=e.layoutConfig??Q({layoutConfig:e.layoutConfig}),a=e.dimensions.plot??{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},o=a.x??0,i=a.y??0,s=[],c=r.filter(e=>null!=Ii(e)),l=r.filter(e=>!("string"!=typeof e.pathD||!/NaN|Infinity|undefined/.test(e.pathD))||function(e){return[...[e.x,e.y,e.w,e.h,e.r,e.cx,e.cy,e.innerR,e.outerR,e.x1,e.x2,e.y1,e.y2,e.openY,e.closeY,e.highY,e.lowY,e.bodyWidth].filter(e=>void 0!==e),...[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat(2)]}(e).some(e=>"number"!=typeof e||!Number.isFinite(e)));s.push(Li("geometry.finite","geometry",0===l.length,"All emitted geometry is finite.",l.length+" marks contain non-finite geometry.","fail",{count:l.length}));const p=r.map(Bi),u=p.filter(e=>e&&(e.x0>=e.x1||e.y0>=e.y1)).length;s.push(Li("geometry.nonzero-area","geometry",0===u,"All bounded marks have positive area.",u+" marks have zero or negative area.","warn",{count:u}));const d=p.filter(e=>e&&(o>e.x0||i>e.y0||e.x1>o+a.width||e.y1>i+a.height)).length;s.push(Li("geometry.bounds","geometry",0===d,"All bounded marks stay inside the plot.",d+" marks extend outside the plot bounds.","warn",{count:d}));const y=t.audit?.minimumHitTargetSize??t.accessibility.minimumHitTarget??24,m=p.filter(e=>!!e&&(y>e.x1-e.x0||y>e.y1-e.y0)).length;s.push(Li("interaction.target-size","interaction",0===m,`All bounded targets meet the declared ${y}px minimum.`,`${m} targets are smaller than ${y}px in at least one dimension.`,"warn",{count:m,minimumTarget:y}));const h=c.map($i),g=h.filter(e=>!e).length,b=new Set,f=h.filter(e=>!(!e||!b.has(e)&&(b.add(e),1)));s.push(Li("identity.stable-ids","identity",0===g,"Every data-bearing mark exposes a stable id.",g+" data-bearing marks have no pointId, id, or transition key.",t.audit?.requireStableIds?"fail":"warn",{missing:g})),s.push(Li("identity.unique-ids","identity",0===f.length,"Stable mark ids are unique.",f.length+" duplicate stable ids were observed.","fail",{duplicates:[...new Set(f)].slice(0,10)}));const v=h.filter(e=>e&&/^(datum|mark|node|point|rect)-?\d+$/.test(e)).length;v>0&&s.push({id:"identity.index-pattern",category:"identity",status:"warn",message:v+" ids look index-derived and may change when data is reordered.",remediation:"Derive ids from a declared identifier role or stable domain key."});const w=new Set;let x=0;const A=e.inputData;for(const e of c){const r=Ii(e),a=Array.isArray(r)?r:[r];let o=!1;for(const e of a)if(e&&"object"==typeof e)for(let r=0;A.length>r;r+=1)Fi(e,A[r],t,n,A)&&(w.add(r),o=!0);o||(x+=1)}const C=Math.max(0,A.length-w.size);s.push(Li("coverage.input-data","coverage",0===C,"Every input datum is represented by the observed scene.",C+" input data items have no matching scene mark.",t.audit?.requireDatumCoverage?"fail":"warn",{represented:w.size,input:A.length})),s.push(Li("coverage.scene-data","coverage",0===x,"Every data-bearing scene mark maps back to input data.",x+" scene marks do not map back to an input datum.","warn",{count:x}));const k=t.encodings?.some(e=>"count"===e.channel);!k&&c.length>w.size&&w.size>0&&s.push({id:"coverage.duplicate-references",category:"coverage",status:"warn",message:"Input data is referenced by multiple marks, but multiplicity is not declared as an encoding.",remediation:"Declare count/repetition semantics or preserve a one-to-one datum-to-mark mapping."});const S=c.filter(e=>!1===e.interactive).length;s.push(Li("interaction.hit-targets","interaction",0===S&&c.length>0,"Every observed data-bearing scene node participates in hit testing.",0===c.length?"No data-bearing scene nodes were emitted for interaction.":S+" data-bearing marks explicitly disable interaction.","fail"));const P=(e.annotations??[]).map(e=>e.pointId).filter(e=>null!=e).map(String),j=P.filter(e=>!b.has(e));s.push(Li("coverage.annotation-anchors","coverage",0===j.length,P.length?"All pointId annotation anchors resolve to observed scene nodes.":"No pointId annotations require scene resolution.",j.length+" annotations point to missing scene ids.","fail",{unresolved:j}));const T=(e.chart?.selectedIds??[]).filter(e=>!b.has(e));e.chart?.selectedIds&&s.push(Li("interaction.selection-reachability","interaction",0===T.length,"Selected/highlighted states resolve to observed marks.",T.length+" selected ids are not reachable in the scene.","fail",{missing:T}));const N=Dt(r),R=(t.accessibility.tableFields??t.accessibility.tableRoles?.map(e=>({role:e,label:e}))??[]).map(e=>{if(e.field)return e.field;const r=e.role?t.dataRoles.find(t=>t.role===e.role):void 0;return r?M(r,n,A):void 0}).filter(e=>!!e),$=new Set(N.flatMap(e=>Object.keys(e.values))),I=R.filter(e=>!$.has(e));s.push(Li("accessibility.table-fields","accessibility",0===I.length,R.length?"The accessible table preserves all recipe-declared fields.":"The recipe declares no explicit accessible table field projection.",`The accessible table loses declared fields: ${I.join(", ")}.`,"fail",{expectedFields:R,observedFields:[...$]})),new Set(A.flatMap(e=>Object.entries(e).filter(([,e])=>["string","number","boolean"].includes(typeof e)).map(([e])=>e))).size>2&&2>=$.size&&[...$].every(e=>"category"===e||"value"===e)&&s.push({id:"accessibility.generic-table-loss",category:"accessibility",status:"warn",message:"The table exposes only generic category/value fields although richer input data exists.",remediation:"Emit accessibleDatum or accessibility.tableFields on scene nodes."});const B=(t.encodings?.filter(e=>"color"===e.channel)??[]).filter(e=>!e.redundantWith||0===e.redundantWith.length);s.push(Li("accessibility.color-only","accessibility",0===B.length,"Every declared color encoding names a redundant cue.",B.length+" color encodings have no declared redundant cue.","warn"));const E=e.chart;if(E){for(const[e,r]of[["title",t.accessibility.requiresTitle],["summary",t.accessibility.requiresSummary],["description","required"===t.accessibility.description]])r&&s.push(Li("accessibility."+e,"accessibility","string"==typeof E[e]&&E[e].trim().length>0,`A chart ${e} is present.`,`The recipe requires a chart ${e}, but none was supplied.`,"fail"));(t.accessibility.requiresAccessibleTable||"required"===t.accessibility.accessibleTable||t.accessibility.fallbackTable)&&s.push(Li("accessibility.fallback-table","accessibility",!1!==E.accessibleTable,"The accessible fallback table is enabled.","The recipe requires a fallback table, but accessibleTable is disabled.","fail")),E.navigationTree&&s.push(Li("accessibility.navigation-depth","accessibility",(E.navigationTree.children?.length??0)>0,"The navigation tree exposes structure below the root.","The navigation tree is root-only.","fail"))}const F=e.theme?.background??"#ffffff",L=r.filter(e=>{const t=e.style?.fill??e.fill;if("string"!=typeof t||!t.startsWith("#")||!F.startsWith("#"))return!1;const r=ur(t,F);return null!=r&&3>r}).length;s.push(Li("visual.contrast","visual",0===L,"All statically checkable mark fills meet 3:1 contrast.",L+" marks have fill contrast below 3:1.","warn",{background:F}));let D=0;const _=p.filter(e=>!!e).slice(0,500);for(let e=0;_.length>e;e+=1)for(let t=e+1;_.length>t;t+=1).8>Ei(_[e],_[t])||(D+=1);D>_.length&&s.push({id:"visual.overlap-density",category:"visual",status:"warn",message:D+" near-total mark overlaps suggest occlusion or excessive density.",remediation:"Aggregate, jitter, layer explicitly, or declare overlap as intentional."});const O=[["manual-at.screen-reader","Verify real screen-reader behavior with the target browser/AT combinations."],["manual-at.cognitive-load","Assess cognitive load and whether the custom metaphor is understood."],["manual-at.keyboard-order","Verify that keyboard order is meaningful, not merely mechanically available."],["manual-at.animation","Verify that animation is not distracting and reduced-motion behavior is sufficient."],["manual-at.reception","Test whether the memorable form is received as intended by the target audience."],["manual-at.overlay-occlusion","Inspect labels, overlays, annotations, and important marks for clipping or occlusion."],["manual-at.observation","Exercise hover, focus, selection, and observation emission in the rendered chart."]].map(([e,t])=>({id:e,category:"manual-at",status:"manual",message:t})),z={dataRoles:t.dataRoles.map(e=>e.role),intents:t.intents.map(J).filter(e=>!!e),accessibilityExpectations:[...t.accessibility.requirements??[],...t.accessibility.tableFields?.map(e=>"table field: "+e.label)??[]],fallbackDeclared:!0===t.accessibility.fallbackTable||"required"===t.accessibility.accessibleTable||!0===t.accessibility.requiresAccessibleTable,designContractDeclared:!!t.designContract?.whyCustom},H=[...s,...O],G=s.filter(e=>"fail"===e.status).length;return{recipeId:t.id,ok:0===G,summary:{marks:r.length,passes:H.filter(e=>"pass"===e.status).length,warnings:H.filter(e=>"warn"===e.status).length,failures:G,manual:H.filter(e=>"manual"===e.status).length},declaredSemantics:z,observedSceneEvidence:s,manualATChecks:O}}var _i=[{id:"trend",label:"Trend over time",description:"How a single metric changes over an ordered sequence (typically time).",familyHint:"time-series"},{id:"compare-series",label:"Compare series",description:"Compare multiple measured series across a shared x domain.",familyHint:"time-series"},{id:"compare-categories",label:"Compare categories",description:"Compare a single measure across discrete categories.",familyHint:"categorical"},{id:"rank",label:"Rank",description:"Show category ordering by a measure (largest to smallest).",familyHint:"categorical"},{id:"part-to-whole",label:"Part to whole",description:"Show how individual categories share a total.",familyHint:"categorical"},{id:"distribution",label:"Distribution",description:"Show the shape, spread, and central tendency of a numeric variable.",familyHint:"distribution"},{id:"correlation",label:"Correlation",description:"Show the relationship between two (or more) numeric variables.",familyHint:"relationship"},{id:"flow",label:"Flow",description:"Show movement, transitions, or transfers between states.",familyHint:"flow"},{id:"hierarchy",label:"Hierarchy",description:"Show parent/child structure or nested totals.",familyHint:"hierarchy"},{id:"geo",label:"Geography",description:"Show values bound to geographic locations or regions.",familyHint:"geo"},{id:"outlier-detection",label:"Outlier detection",description:"Surface individual data points that diverge from the rest.",familyHint:"distribution"},{id:"composition-over-time",label:"Composition over time",description:"Show how the share of categories changes across an ordered sequence.",familyHint:"time-series"},{id:"change-detection",label:"Change detection",description:"Surface where or when a metric shifted meaningfully.",familyHint:"time-series"}],Oi=new Map(_i.map(e=>[e.id,e]));function zi(e){return Oi.get(e)}function Hi(){return Array.from(Oi.values())}function Gi(e){Oi.set(e.id,e)}var qi=new Set(_i.map(e=>e.id)),Vi=new Set;function Wi(e,t,r){return Number.isFinite(e)?Math.max(t,Math.min(r,e)):t}function Ui(e,t){return void 0===e?0:Wi("function"==typeof e?e(t):e,0,5)}function Yi(e){return e?Array.isArray(e)?[...e]:[e]:[]}function Xi(e,t,r){const n={};for(const[r,a]of Object.entries(e.intentScores))n[r]=Ui(a,t);if(r)for(const[e,t]of Object.entries(r))n[e]=Wi((n[e]??0)+t,0,5);return n}function Ki(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 Qi(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 Ji(e,t,r){return e.some(e=>e.props?.[t]===r)}var Zi=new Set(["BarChart","GroupedBarChart","StackedBarChart","DotPlot"]);var es=(e,t,r)=>function(e,t,r){const n=new Map,a=e=>{for(const t of e)t&&t.id&&t.baseComponent&&(n.has(t.id)||n.set(t.id,t))};a(function(e,t,r){const n=r.profile,a=r.existingVariants??t.variants??[],o=Yi(r.intent),i=[];for(const e of a)i.push(Qi(t,e));const s=o.includes("rank")||o.includes("compare-categories");!Zi.has(e)||"categorical"!==t.family||Ji(a,"orientation","horizontal")||!s&&6>(n.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=Ji(a,"normalize",!0)||Ji(a,"type","percent")||a.some(e=>/normal|percent/i.test(`${e.key} ${e.label}`));if(/Stacked/.test(e)&&!c&&(o.includes("part-to-whole")||o.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"]}),o.length>0){const t=Ha().filter(t=>t.component!==e).filter(e=>null===e.fits(n)).map(e=>{const t=Xi(e,n);return{candidate:e,fit:Ki(t,o),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-${o.join("-")}`,baseComponent:e.component,label:e.component+" alternative",buildProps:t=>e.buildProps(t),rationale:`${e.component} is a strong ${o.join(" + ")} alternative (${r.toFixed(1)}/5) for this data shape.`,source:"heuristic",tags:["cross-family",e.family]})}return i}(e,t,r));for(const n of Vi)try{a(n(e,t,r)??[])}catch(e){void 0!==console&&console.warn("[variantDiscovery] proposer threw:",e)}return Array.from(n.values())}(e,t,r),ts=(e,t,r,n={})=>{const a=Ga(e.baseComponent);if(!a)return{proposalId:e.id,fit:0,novelty:1,risk:1,reasons:[`No capability registered for proposed component "${e.baseComponent}".`]};const o=a.fits(t);if(null!==o)return{proposalId:e.id,fit:0,novelty:"manual"===e.source?.2:.7,risk:1,reasons:["Rejected: "+o]};const i=Yi(n.intent),s=Xi(a,t,e.intentDeltas),c=Ki(s,i),l=function(e,t){return t?{familiarity:Math.round(Wi((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(Wi(r.accuracy,1,5)),precision:Math.round(Wi(r.precision,1,5))}:e;var r}(a.rubric,e.rubricDeltas);let p;const u=r?.receptionModality;if(u&&"visual"!==u){const n=e.variantKey?a.variants?.find(t=>t.key===e.variantKey):void 0,o=e.buildProps?e.buildProps(t,r):a.buildProps(t,n);p=Wa(Ur(e.baseComponent,o),u)}const d=Ua(c,l,e.baseComponent,r,p),y=Wi(d.score,0,5);let m="manual"===e.source?.15:"heuristic"===e.source?.45:.75;n.baselineComponent&&n.baselineComponent!==e.baseComponent&&(m+=.2),e.variantKey||(m+=.05),m=Wi(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>y&&(h+=.2),h=Wi(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."),d.appliedReason&&g.push(d.appliedReason),d.receivabilityReason&&g.push(d.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:y,novelty:m,risk:h,reasons:g}};function rs(e){return Vi.add(e),()=>{Vi.delete(e)}}function ns(){return Array.from(Vi)}function as(){Vi.clear()}import{useCallback as os,useEffect as is,useMemo as ss,useState as cs,useSyncExternalStore as ls}from"react";var ps={total:0,byType:{},componentsSeen:[],audiencesSeen:[],startedAt:null,lastAt:null,durationMs:0};function us(e){if(0===e.length)return ps;const t={},r=new Set,n=[];let a;for(const o of e){t[o.type]=(t[o.type]??0)+1,o.arcId&&(a=o.arcId);const e="component"in o&&"string"==typeof o.component?o.component:void 0;if(e&&r.add(e),"from"in o&&"string"==typeof o.from&&r.add(o.from),"to"in o&&"string"==typeof o.to&&r.add(o.to),"components"in o&&Array.isArray(o.components))for(const e of o.components)"string"==typeof e&&r.add(e);"audience-set"===o.type&&"string"==typeof o.audience&&n.push(o.audience)}const o=e[0].timestamp,i=e[e.length-1].timestamp;return{total:e.length,byType:t,componentsSeen:Array.from(r),audiencesSeen:n,latestArcId:a,startedAt:o,lastAt:i,durationMs:Math.max(0,i-o)}}function ds(e={}){const{enableOnMount:t=!0,disableOnUnmount:r=!1,capacity:n,sessionId:a}=e;is(()=>(t&&$({capacity:n,sessionId:a}),()=>{r&&R()}),[t,r,n,a]);const o=os(e=>pe(e),[]),i=os(()=>z().getEvents(),[]),s=ls(o,i,i),[c,l]=cs(()=>z().enabled),[p,u]=cs(()=>z().sessionId);is(()=>(l(z().enabled),u(z().sessionId),pe(()=>{const e=z();l(e.enabled),u(e.sessionId)})),[]);const d=ss(()=>us(s),[s]),y=os(e=>z().record(e),[]),m=os(()=>z().clear(),[]);return{history:s,summary:d,enabled:c,sessionId:p,record:y,clear:m}}export{r as AccessibleNavTree,Se as AreaChart,Vn as AreaChartCapability,Jo as BUILT_IN_AUDIENCES,qi as BUILT_IN_INTENT_IDS,Oe as BarChart,oa as BarChartCapability,t as BigNumber,ze as BoxPlot,fa as BoxPlotCapability,Pe as BubbleChart,Xn as BubbleChartCapability,wi as CANONICAL_FIXTURES,je as CandlestickChart,ea as CandlestickChartCapability,Nt as CategoryColorProvider,n as ChartContainer,a as ChartGrid,Ri as ChartRecipe,rt as ChordDiagram,ka as ChordDiagramCapability,$a as ChoroplethMapCapability,nt as CirclePack,Na as CirclePackCapability,xt as CollisionSwarmChart,Te as ConnectedScatterplot,Yn as ConnectedScatterplotCapability,o as ContextLayout,Rt as DEFAULT_LIFECYCLE_THRESHOLDS,$n as DEFAULT_SCALE_THRESHOLDS,i as DetailsPanel,Re as DifferenceChart,Zn as DifferenceChartCapability,Ba as DistanceCartogramCapability,He as DonutChart,pa as DonutChartCapability,Ge as DotPlot,ca as DotPlotCapability,At as EventDropChart,Ma as FlowMapCapability,at as ForceDirectedGraph,Aa as ForceDirectedGraphCapability,qe as FunnelChart,da as FunnelChartCapability,Ct as GaltonBoardChart,Ve as GaugeChart,ya as GaugeChartCapability,kt as GauntletChart,We as GroupedBarChart,ia as GroupedBarChartCapability,$e as Heatmap,ta as HeatmapCapability,Ue as Histogram,ba as HistogramCapability,s as IntentMark,Ye as LikertChart,ha as LikertChartCapability,Ie as LineChart,qn as LineChartCapability,$t as LinkedCharts,Me as MinimapChart,Jn as MinimapChartCapability,c as MobileAnnotationCalloutList,l as MobileChartContainer,we as MobileStandardControls,Be as MultiAxisLineChart,Qn as MultiAxisLineChartCapability,It as MultiLineTooltip,it as OrbitDiagram,Ra as OrbitDiagramCapability,St as PhysicalFlowChart,Pt as PhysicsCustomChart,jt as PhysicsPileChart,Ke as PieChart,la as PieChartCapability,Tt as ProcessFlowChart,st as ProcessSankey,Sa as ProcessSankeyCapability,Ia as ProportionalSymbolMapCapability,Ee as QuadrantChart,Kn as QuadrantChartCapability,ht as RealtimeHeatmap,gt as RealtimeHistogram,bt as RealtimeLineChart,ft as RealtimeSwarmChart,vt as RealtimeWaterfallChart,Qe as RidgelinePlot,xa as RidgelinePlotCapability,ct as SankeyDiagram,Ca as SankeyDiagramCapability,Fe as Scatterplot,Un as ScatterplotCapability,Le as ScatterplotMatrix,p as SmallMultipleChart,De as StackedAreaChart,Wn as StackedAreaChartCapability,Je as StackedBarChart,sa as StackedBarChartCapability,Ze as SwarmPlot,va as SwarmPlotCapability,et as SwimlaneChart,ga as SwimlaneChartCapability,wt as TemporalHistogram,Kt as ThemeProvider,Zt as TooltipProvider,lt as TreeDiagram,Pa as TreeDiagramCapability,pt as Treemap,Ta as TreemapCapability,tt as ViolinPlot,wa as ViolinPlotCapability,Yr as accessibilityCaveats,Ko as analystPersona,u as annotationFreshnessFor,Et as annotationStableId,d as applyAnnotationLifecycle,y as applyAnnotationStatus,Ua as applyAudienceBias,Hn as applyScaleBias,Ur as auditAccessibility,m as auditMobileVisualization,Di as auditObservedScene,xe as auditVisualizationControls,Lt as bandFromAge,h as buildNavigationTree,fo as buildReaderGrounding,g as buildRecipeNavigationTree,_o as chartGenerationTool,Ae as clampMobileRange,En as classifyCardinalityBand,Fn as classifyFieldBand,Bn as classifyRowBand,as as clearVariantDiscovery,b as communicativeActForIntent,Ln as compareBands,f as computeAnnotationFreshness,On as computeEffectiveScale,v as configToJSX,w as copyConfig,x as countNodes,qo as createChartToolHandler,A as createIndexedDBConversationArcSink,C as createLocalStorageConversationArcSink,k as createWebhookConversationArcSink,S as currentTimestamp,No as dataQualityToAnnotations,Qo as dataScientistPersona,P as defineChartRecipe,j as describeChart,T as describeRecipeChart,N as deserializeSelections,Or as diagnoseConfig,ir as diagnoseTokenEncoding,ui as diffProfile,R as disableConversationArc,Ya as effectiveFamiliarity,$ as enableConversationArc,ts as evaluateVariantProposal,Xo as executivePersona,no as explainCapabilityFit,I as exportChart,B as filterAnnotationsByStatus,E as flattenVisible,Qr as formatAccessibilityAudit,F as formatMobileVisualizationAudit,L as fromConfig,Io as fromDbtArtifacts,Eo as fromGreatExpectations,D as fromURL,_ as fromVegaLite,Ha as getCapabilities,Ga as getCapability,O as getChartRecipe,z as getConversationArcStore,zi as getIntent,H as getRecipeLayout,ns as getRegisteredVariantDiscovery,ni as getStreamCapabilities,Wo as inferIntent,V as intentManifestFromRecipe,W as isJsonSafe,U as isRegisteredRecipeLayout,Y as listChartRecipes,Hi as listIntents,X as loadConversationArc,K as mobileVisualizationCaveats,or as normalizeTokenEncoding,Do as prepareChart,Rn as profileData,es as proposeVariant,Wa as receivabilityBias,Z as recipeToChartCapability,ee as recordAnnotationStatusChange,te as recordAudienceChange,Oa as registerChartCapability,re as registerChartRecipe,ne as registerConversationArcSink,Gi as registerIntent,ae as registerRecipeLayout,ti as registerStreamChartCapability,rs as registerVariantDiscovery,Fo as repairChartConfig,oe as replayConversationArc,_n as resolveCardinalityToNumber,ie as resolveChartRecipe,se as resolveCommunicativeAct,ce as resolveRecipeRoleField,Ot as resolveResponsiveRules,Dn as resolveRowsToNumber,zt as responsiveRuleMatches,di as runQualityScorecard,Gn as scaleHints,ao as scoreChart,le as serializeSelections,Xa as stretchFamiliarityCeiling,pe as subscribeToConversationArcChange,ro as suggestCharts,oo as suggestChartsGrouped,Yo as suggestDashboard,si as suggestStreamCharts,Uo as suggestStretchCharts,lr as suggestTokenEncoding,us as summarizeArc,cn as summarizeData,ue as summarizeIntentManifest,Oo as toAnthropicTool,de as toConfig,Go as toOpenAIResponsesTool,zo as toOpenAITool,ye as toURL,cr as tokenTaskIntentToCapabilityIntents,za as unregisterChartCapability,me as unregisterChartRecipe,he as unregisterRecipeLayout,ri as unregisterStreamChartCapability,Ht as useBrushSelection,Gt as useCategoryColors,Co as useChartFocus,wo as useChartInterrogation,qt as useChartObserver,Ti as useChartSuggestions,ds as useConversationArc,Vt as useFilteredData,Wt as useLinkedChartsActive,Ut as useLinkedHover,Ce as useMobileRangeControls,ge as useNavigationSync,Yt as useSelection,Xt as useSelectionActions,Jt as useTheme,be as validateChartRecipe,nr as validateProps,fe as withCurrentProvenance,ve as withProvenance,ke as zoomMobileRange};
|
|
2
|
+
import{GeoCustomChart as e}from"./chunk-chunk-OBQRFTIL.module.min.js";import{BigNumber as t}from"./chunk-chunk-FYY2ACNJ.module.min.js";import{AccessibleNavTree as r,ChartContainer as n,ChartGrid as a,ContextLayout as o,DetailsPanel as i,IntentMark as s,MobileAnnotationCalloutList as c,MobileChartContainer as l,SmallMultipleChart as p,annotationFreshnessFor as u,applyAnnotationLifecycle as d,applyAnnotationStatus as y,auditMobileVisualization as m,buildNavigationTree as h,buildRecipeNavigationTree as g,communicativeActForIntent as b,computeAnnotationFreshness as f,configToJSX as v,copyConfig as w,countNodes as x,createIndexedDBConversationArcSink as A,createLocalStorageConversationArcSink as C,createWebhookConversationArcSink as k,currentTimestamp as S,defineChartRecipe as P,describeChart as j,describeRecipeChart as T,deserializeSelections as R,disableConversationArc as N,enableConversationArc as $,exportChart as I,fieldForRole as M,filterAnnotationsByStatus as B,flattenVisible as E,formatMobileVisualizationAudit as L,fromConfig as F,fromURL as D,fromVegaLite as _,getChartRecipe as O,getConversationArcStore as z,getRecipeLayout as H,getRegisteredRecipeCapabilities as G,hasRegisteredRecipeCapabilities as q,intentManifestFromRecipe as V,isJsonSafe as W,isRegisteredRecipeLayout as U,listChartRecipes as Y,loadConversationArc as X,mobileVisualizationCaveats as K,recipeConfig as Q,recipeIntentId as J,recipeToChartCapability as Z,recordAnnotationStatusChange as ee,recordAudienceChange as te,registerChartRecipe as re,registerConversationArcSink as ne,registerRecipeLayout as ae,replayConversationArc as oe,resolveChartRecipe as ie,resolveCommunicativeAct as se,resolveRecipeRoleField as ce,serializeSelections as le,subscribeToConversationArcChange as pe,summarizeIntentManifest as ue,toConfig as de,toURL as ye,unregisterChartRecipe as me,unregisterRecipeLayout as he,useNavigationSync as ge,validateChartRecipe as be,withCurrentProvenance as fe,withProvenance as ve}from"./chunk-chunk-2CCFBTQC.module.min.js";import{MobileStandardControls as we,auditVisualizationControls as xe,clampMobileRange as Ae,useMobileRangeControls as Ce,zoomMobileRange as ke}from"./chunk-chunk-RCF52Z42.module.min.js";import{AreaChart as Se,BubbleChart as Pe,CandlestickChart as je,ConnectedScatterplot as Te,DEFAULT_QUADRANTS as Re,DifferenceChart as Ne,Heatmap as $e,LineChart as Ie,MinimapChart as Me,MultiAxisLineChart as Be,QuadrantChart as Ee,Scatterplot as Le,ScatterplotMatrix as Fe,StackedAreaChart as De,XYCustomChart as _e}from"./chunk-chunk-MC35ILYP.module.min.js";import{BarChart as Oe,BoxPlot as ze,DonutChart as He,DotPlot as Ge,FunnelChart as qe,GaugeChart as Ve,GroupedBarChart as We,Histogram as Ue,LikertChart as Ye,OrdinalCustomChart as Xe,PieChart as Ke,RidgelinePlot as Qe,StackedBarChart as Je,SwarmPlot as Ze,SwimlaneChart as et,ViolinPlot as tt}from"./chunk-chunk-B6V35LMY.module.min.js";import"./chunk-chunk-YCQYG6J5.module.min.js";import{ChordDiagram as rt,CirclePack as nt,ForceDirectedGraph as at,NetworkCustomChart as ot,OrbitDiagram as it,ProcessSankey as st,SankeyDiagram as ct,TreeDiagram as lt,Treemap as pt}from"./chunk-chunk-BOSVL645.module.min.js";import{closestMatch as ut,validateArrayData as dt,validateNetworkData as yt,validateObjectData as mt}from"./chunk-chunk-JCG72SGW.module.min.js";import"./chunk-chunk-I6C3KR5H.module.min.js";import{RealtimeHeatmap as ht,RealtimeHistogram as gt,RealtimeLineChart as bt,RealtimeSwarmChart as ft,RealtimeWaterfallChart as vt,TemporalHistogram as wt}from"./chunk-chunk-JNCHKRIR.module.min.js";import"./chunk-chunk-J5RL6GXU.module.min.js";import"./chunk-chunk-XQYVEKEJ.module.min.js";import"./chunk-chunk-AZJUDQRM.module.min.js";import"./chunk-chunk-M7VYYHCE.module.min.js";import"./chunk-chunk-SA3D43RA.module.min.js";import"./chunk-chunk-OQTLSTGI.module.min.js";import"./chunk-chunk-A63CTACR.module.min.js";import"./chunk-chunk-5UKL5W76.module.min.js";import{CollisionSwarmChart as xt,EventDropChart as At,GaltonBoardChart as Ct,GauntletChart as kt,PhysicalFlowChart as St,PhysicsCustomChart as Pt,PhysicsPileChart as jt,ProcessFlowChart as Tt}from"./chunk-chunk-L3H6DQCR.module.min.js";import"./chunk-chunk-SIRIJ3DY.module.min.js";import"./chunk-chunk-EMO5NUGE.module.min.js";import"./chunk-chunk-SV4XAZ3Q.module.min.js";import"./chunk-chunk-SANERMIZ.module.min.js";import{CategoryColorProvider as Rt,DEFAULT_LIFECYCLE_THRESHOLDS as Nt,LinkedCharts as $t,MultiLineTooltip as It,annotationBudget as Mt,annotationDrawsConnector as Bt,annotationStableId as Et,annotationType as Lt,bandFromAge as Ft,extractAllRows as Dt,isNoteAnnotation as _t,resolveResponsiveRules as Ot,responsiveRuleMatches as zt,useBrushSelection as Ht,useCategoryColors as Gt,useChartObserver as qt,useFilteredData as Vt,useLinkedChartsActive as Wt,useLinkedHover as Ut,useSelection as Yt,useSelectionActions as Xt}from"./chunk-chunk-6HSGDMTA.module.min.js";import"./chunk-chunk-JJ2OOIET.module.min.js";import{ThemeProviderWrapper as Kt,createStore as Qt,useTheme as Jt}from"./chunk-chunk-WCX6U47H.module.min.js";import"./chunk-chunk-KTWEBFMX.module.min.js";import"./chunk-chunk-ZCNBUZPL.module.min.js";import"./chunk-chunk-YHNZCPOZ.module.min.js";var[Zt,er]=Qt(e=>({tooltip:null,changeTooltip(t){e(()=>({tooltip:t}))}})),tr={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 rr(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}function nr(e,t){const r=[];null!=t&&"object"==typeof t||(t={});const n=tr[e];if(!n)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(tr).join(", ")}`]};for(const a of n.required)null==t[a]&&r.push(`"${a}" is required for ${e}.`);"array"!==n.dataShape||!Object.prototype.hasOwnProperty.call(n.props,"data")||n.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=n.props[e];if(t){if(!rr(a,t.type)){const n=Array.isArray(t.type)?t.type.join(" | "):t.type;r.push(`"${e}" should be ${n}, 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(n.props),o=new Set(a);for(const n of Object.keys(t))if(void 0!==t[n]&&!o.has(n)){const t=ut(n,a),o=t?`Unknown prop "${n}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${n}" for ${e}. Valid props: ${a.join(", ")}.`;r.push(o)}if("array"===n.dataShape){const a=t.data,o={};for(const e of n.dataAccessors){const r=t[e];"string"==typeof r&&(o[e]=r)}const i=dt({componentName:e,data:a,accessors:Object.keys(o).length>0?o:void 0});i&&r.push(i)}else if("object"===n.dataShape){const n=mt({componentName:e,data:t.data});n&&r.push(n)}else if("network"===n.dataShape){const a=yt({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:n.required.includes("nodes"),edgesRequired:n.required.includes("edges")});a&&r.push(a)}return{valid:0===r.length,errors:r}}import{interpolateLab as ar}from"d3-interpolate";function or(e){const t=e.unitValue??e.unit,r=e.icon??e.token;return{...e,...null!=t&&{unitValue:t},...null!=r&&{icon:r}}}function ir(e,t={}){const r=[],n=e.tokenSemantics,a=e.countStrategy,o=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 n||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>o&&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"!==n||"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"===n&&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"===n&&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"!==n&&"posterior-sample"!==n&&"hypothetical-case"!==n||!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"===n&&"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"!==n||"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 sr(e){return"measure"===e?"precise-comparison":"estimate probability"===e?"probability-estimation":"understand risk"===e?"risk-communication":"remember"===e?"memory":"decide"===e?"support-decision":e}function cr(e){const t=sr(e);return"precise-comparison"===t?["compare-categories","rank"]:"probability-estimation"===t?["distribution"]:"risk-communication"===t?["part-to-whole","distribution"]:"frequency-reasoning"===t?["distribution","compare-categories"]:"memory"===t||"editorial-engagement"===t?["compare-categories"]:"public-explanation"===t||"support-decision"===t?["distribution","compare-categories"]:["compare-categories"]}function lr(e){const t=sr(e.taskIntent),r="small"===(n=e.availableSpace)?25:"large"===n?100:50;var n;if("precise-comparison"===t)return{recommendedEncoding:"bar-or-line",rationale:"Use continuous position/length encodings when precise magnitude comparison is the primary task.",warnings:[],alternatives:["hybrid-bar-token","unitized-measure"]};if("probability-estimation"===t){const e={tokenType:"dot",tokenSemantics:"possible-outcome",countStrategy:"quantile",tokenCount:r,layout:"dotplot",labelPolicy:"text-plus-token"};return{recommendedEncoding:"quantile-dotplot",tokenEncoding:e,rationale:"This task asks readers to estimate probability from a distribution. Quantile tokens turn probability mass into countable possible outcomes.",warnings:ir(e),alternatives:["cdf-with-threshold","density-with-threshold"]}}if("risk-communication"===t){const t={tokenType:e.concreteEntity?"icon":"dot",icon:e.concreteEntity,tokenSemantics:"risk-case",countStrategy:"fixed-denominator",denominator:100,layout:"waffle",labelPolicy:"text-plus-token"};return{recommendedEncoding:"fixed-denominator-icon-array",tokenEncoding:t,rationale:"Risk is often clearer as natural frequency: highlighted cases out of a fixed denominator.",warnings:ir(t,{visibleTokens:100,maxRecommendedTokens:100}),alternatives:["labeled-percent","bar-with-risk-threshold"]}}if("memory"===t||"editorial-engagement"===t){const t={tokenType:e.concreteEntity?"glyph":"icon",icon:e.concreteEntity,tokenSemantics:"unitized-measure",countStrategy:"unitized",unitValue:1,layout:"grid",labelPolicy:"text-plus-token",unitMeaning:e.concreteEntity?"one token represents a unit of "+e.concreteEntity:"one token represents one unit"};return{recommendedEncoding:"semantic-isotype",tokenEncoding:t,rationale:"Semantic tokens are useful when the chart needs to make a topic concrete and memorable.",warnings:ir(t),alternatives:["labeled-bar","hybrid-bar-token"]}}if("frequency-reasoning"===t||"public-explanation"===t||"support-decision"===t){const t={tokenType:e.concreteEntity?"icon":"dot",icon:e.concreteEntity,tokenSemantics:"distribution"===e.dataType?"possible-outcome":"unitized-measure",countStrategy:"distribution"===e.dataType?"quantile":"unitized",unitValue:"distribution"===e.dataType?void 0:1,tokenCount:r,layout:"distribution"===e.dataType?"dotplot":"bar-segment",labelPolicy:"text-plus-token",unitMeaning:"distribution"===e.dataType?void 0:"one token represents one unit interval"};return{recommendedEncoding:"hybrid-continuous-token",tokenEncoding:t,rationale:"A hybrid view preserves measurement while adding countable tokens for explanation and decisions.",warnings:ir(t),alternatives:["bar-or-line","quantile-dotplot","fixed-denominator-icon-array"]}}return{recommendedEncoding:"bar-or-line",rationale:"Use continuous encodings unless the task needs frequency, risk, memory, or outcome reasoning.",warnings:[],alternatives:["unitized-measure","quantile-dotplot","fixed-denominator-icon-array"]}}function pr(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[n,a,o]=[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(n)+.7152*i(a)+.0722*i(o)}function ur(e,t){const r=pr(e),n=pr(t);return null===r||null===n?null:(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var dr=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),yr=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),mr=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),hr=new Set(["LineChart","AreaChart","StackedAreaChart"]),gr=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),br=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),fr=new Set(["PieChart","DonutChart"]),vr={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},wr=new Set(Object.keys(vr)),xr={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},Ar=new Set(["BigNumber"]),Cr=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),kr=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]),Sr=new Set(["OrbitDiagram",...kr]),Pr=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart"]),jr=new Set(["GaltonBoardChart","EventDropChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","GauntletChart","PhysicsCustomChart"]),Tr=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),Rr=new Set(["MultiAxisLineChart"]),Nr=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),$r={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"},Ir=["xExtent","yExtent","rExtent"];function Mr(e){const t=e instanceof Date?e.getTime():Number(e);return Number.isFinite(t)?t:null}function Br(e,t,r){if("function"==typeof t)return t(e);const n="string"==typeof t?t:r;return e?.[n]}var Er=new Set(["category10","tableau10","set3","blues","reds","greens","oranges","purples","greys","viridis","plasma","inferno","magma","cividis","turbo"]),Lr=["xAccessor","yAccessor","timeAccessor","valueAccessor","categoryAccessor","colorBy","sizeBy","lineBy","areaBy","stackBy","groupBy","orderAccessor","y0Accessor","sourceAccessor","targetAccessor","nodeIDAccessor","childrenAccessor","costAccessor"];function Fr(e){return"object"==typeof e&&null!==e&&("tokenType"in e||"tokenSemantics"in e||"countStrategy"in e||"unitValue"in e||"unit"in e)}function Dr(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:void 0}function _r(e,t){const r=Dr(e.visibleTokens);if(null!=r)return r;const n=Dr(t.denominator);if("fixed-denominator"===t.countStrategy&&null!=n)return n;const a=Dr(t.tokenCount),o=Dr(t.maxTokens);return null!=a&&null!=o?Math.min(a,o):a??n??o}function Or(e,t){const r=[],n=nr(e,function(e){const t={...e};return delete t.tokenEncoding,delete t.visibleTokens,Fr(t.encoding)&&delete t.encoding,t}(t));for(const e of n.errors)r.push({severity:"error",code:"VALIDATION",message:e,fix:""});return tr[e]?(function(e,t,r){const n=tr[e];if(n){if("array"===n.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"===n.dataShape&&t.edges&&Array.isArray(t.edges)&&0===t.edges.length&&r.push({severity:"error",code:"EMPTY_EDGES",message:"edges is an empty array — network chart will render blank.",fix:'Provide at least one edge: edges={[{ source: "A", target: "B" }]}.'})}}(e,t,r),function(e,t,r){const n=t.width,a=t.height;if(void 0===n||"number"==typeof n&&n>0||r.push({severity:"error",code:"BAD_WIDTH",message:`width=${JSON.stringify(n)} — 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,n]=t.size;(null!=e&&0>=e||null!=n&&0>=n)&&r.push({severity:"error",code:"BAD_SIZE",message:`size=[${e}, ${n}] — both dimensions must be positive.`,fix:"Set size={[600, 400]}."})}}(0,t,r),function(e,t,r){const n=tr[e];if(!n||"array"!==n.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=a[0];if(!o||"object"!=typeof o)return;const i=Object.keys(o);for(const e of n.dataAccessors){const n=t[e];"string"==typeof n&&(n in o||r.push({severity:"error",code:"ACCESSOR_MISSING",message:`${e}="${n}" not found in data. Available fields: ${i.join(", ")}.`,fix:`Change ${e} to one of: ${i.map(e=>`"${e}"`).join(", ")}.`}))}}(e,t,r),function(e,t,r){dr.has(e)&&Array.isArray(t.data)&&r.push({severity:"error",code:"HIERARCHY_FLAT_ARRAY",message:e+" expects hierarchical data but received a flat array.",fix:'Pass a root object: data={{ name: "root", children: [...] }}. For flat data, use BarChart or LineChart.'})}(e,t,r),function(e,t,r){yr.has(e)&&(t.edges||t.data||r.push({severity:"error",code:"NETWORK_NO_EDGES",message:e+" requires an edges prop.",fix:'Provide edges={[{ source: "A", target: "B", value: 10 }]}.'}))}(e,t,r),function(e,t,r){const n=tr[e];if(!n||"array"!==n.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=a[0];if(!o||"object"!=typeof o)return;const i=t.xAccessor;"string"==typeof i&&o[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."})}(e,t,r),function(e,t,r){t.linkedHover&&!t.selection&&r.push({severity:"warning",code:"LINKED_HOVER_NO_SELECTION",message:"linkedHover is set but selection is not — this chart emits hover events but won't highlight from others.",fix:`Add selection={{ name: "${"object"==typeof t.linkedHover&&t.linkedHover.name||"hl"}" }} to receive cross-highlights.`})}(0,t,r),function(e,t,r){if(!mr.has(e))return;const n=t.rExtent||t.yExtent||t.valueExtent;n&&Array.isArray(n)&&n.length>=1&&null!=n[0]&&0!==n[0]&&r.push({severity:"warning",code:"NON_ZERO_BASELINE",message:`${e} has a non-zero baseline (${n[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, ${n[1]??"auto"}]}. For trend-focused charts, use LineChart instead.`})}(e,t,r),function(e,t,r){if(!hr.has(e))return;if(t.gapStrategy)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=t.yAccessor||"y";"string"==typeof a&&n.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.'})}(e,t,r),function(e,t,r){const n=t.width??600,a=t.height??400,o=t.margin;if(!o||"object"!=typeof o)return;const i=(o.left||0)+(o.right||0),s=(o.top||0)+(o.bottom||0);n>i||r.push({severity:"error",code:"MARGIN_OVERFLOW_H",message:`Horizontal margins (${i}px) >= width (${n}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,t,r),function(e,t,r){const n=tr[e];if(!n||"array"!==n.dataShape)return;const a=t.data;if(!a||!Array.isArray(a)||0===a.length)return;const o=[];t.xAccessor&&"string"==typeof t.xAccessor&&o.push({prop:"xAccessor",name:t.xAccessor}),t.yAccessor&&"string"==typeof t.yAccessor&&o.push({prop:"yAccessor",name:t.yAccessor}),t.valueAccessor&&"string"==typeof t.valueAccessor&&o.push({prop:"valueAccessor",name:t.valueAccessor});const i=Math.min(a.length,5);for(const e of o){let t=!0;for(let r=0;i>r;r++){const n=a[r]?.[e.name];if("number"==typeof n&&Number.isFinite(n)){t=!1;break}}t&&r.push({severity:"error",code:"DEGENERATE_EXTENT",message:`${e.prop}="${e.name}" produces NaN or non-finite values for all sampled data points — chart extents will be invalid.`,fix:`Ensure data[].${e.name} contains finite numbers, or use a function accessor to transform values.`})}}(e,t,r),function(e,t,r){if(!gr.has(e))return;const n=t.barPadding;"number"==typeof n&&10>n&&r.push({severity:"warning",code:"BAR_PADDING_INVISIBLE",message:`barPadding=${n} is very small — bars may appear to have no spacing between them.`,fix:"Increase barPadding to at least 10 for visible gaps, e.g. barPadding={12}."})}(e,t,r),function(e,t,r){if("bottom"!==t.legendPosition)return;const n=t.margin;if(!n||"object"!=typeof n)return;const a=n.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,t,r),function(e,t,r){if(!t.showLegend)return;if("right"!==(t.legendPosition??"right"))return;const n=t.margin;if(!n||"object"!=typeof n)return;const a=n.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,t,r),function(e,t,r){if("Heatmap"!==e)return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=n[0];if(a&&"object"==typeof a)for(const e of["xAccessor","yAccessor"]){const n=t[e];if("string"!=typeof n)continue;const o=a[n];"string"==typeof o&&r.push({severity:"warning",code:"HEATMAP_STRING_ACCESSOR",message:`${e}="${n}" resolves to string values (e.g. "${o}"). Heatmap will use categorical axis handling which may produce unexpected cell layout.`,fix:"If you intend categorical axes this is fine. Otherwise, convert values to numbers before passing data."})}}(e,t,r),function(e,t,r){const n=t.colorScheme;if(!n||!Array.isArray(n))return;const a="string"==typeof t.background?t.background:"#ffffff";if(!a.startsWith("#"))return;const o=[];for(const e of n){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ur(e,a);null!==t&&3>t&&o.push(`${e} (${t.toFixed(1)}:1)`)}o.length>0&&r.push({severity:"warning",code:"LOW_COLOR_CONTRAST",message:`${o.length} color(s) in colorScheme have < 3:1 contrast against background "${a}": ${o.join(", ")}. Data marks may be hard to see.`,fix:'Use darker colors on light backgrounds or lighter colors on dark backgrounds. Import COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for an accessible preset.'})}(0,t,r),function(e,t,r){const n=t.colorScheme;if(!n||!Array.isArray(n)||2>n.length)return;const a=n.filter(e=>"string"==typeof e&&e.startsWith("#"));if(2>a.length)return;const o=[];for(let e=0;a.length-1>e;e++){const t=ur(a[e],a[e+1]);null!==t&&1.5>t&&o.push(`${a[e]} / ${a[e+1]} (${t.toFixed(1)}:1)`)}o.length>0&&r.push({severity:"warning",code:"LOW_ADJACENT_CONTRAST",message:`${o.length} adjacent color pair(s) in colorScheme have very similar luminance: ${o.join("; ")}. Categories may be hard to distinguish.`,fix:'Alternate light and dark colors in the scheme, or use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic" for a pre-tested palette.'})}(0,t,r),function(e,t,r){const n=t.colorScheme;if("string"!=typeof n)return;const a=tr[e];a?.props?.colorScheme?.enum||Er.has(n)||r.push({severity:"warning",code:"UNKNOWN_COLOR_SCHEME",message:`colorScheme "${n}" is not a recognized named scheme — the chart will fall back to the default palette.`,fix:`Use a known scheme name (${[...Er].join(", ")}) or pass an explicit color array, e.g. colorScheme={["#1f77b4", "#ff7f0e"]}.`})}(e,t,r),function(e,t,r){const n=tr[e]?.props,a=e=>!!n?.[e]&&"string"==typeof t[e]&&t[e].trim().length>0,o=a("title"),i=a("description"),s=a("summary");o||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.'})}(e,t,r),function(e,t,r){const n=[];for(const e of Lr)"function"==typeof t[e]&&n.push(e);n.length>0&&r.push({severity:"warning",code:"FUNCTION_ACCESSOR",message:`Function accessor${n.length>1?"s":""} detected: ${n.join(", ")}. If defined inline (e.g. \`xAccessor={d => d.value}\`), every parent re-render creates a new reference; closures over changing values can force unnecessary scene rebuilds on resize/rotation.`,fix:'Use string accessors when possible (e.g. xAccessor="value"), or memoize with useCallback / define outside the component.'})}(0,t,r),function(e,t,r){const n=t.hoverRadius;"number"==typeof n&&n>0&&24>n&&!1!==t.enableHover&&(!1!==t.hoverAnnotation||t.tooltip||t.customHoverBehavior||t.customClickBehavior||t.onClick)&&r.push({severity:"warning",code:"TOUCH_TARGET_SMALL",message:`hoverRadius=${n}px is below the ~24px radius needed for reliable 48px touch targets on mobile screens.`,fix:"Use hoverRadius={24} or larger for touch-heavy views. Semiotic floors touch pointer hit testing to 24px, but explicit desktop-only radii should be documented."})}(0,t,r),function(e,t,r){!0===t.responsiveWidth&&!0===t.responsiveHeight&&r.push({severity:"warning",code:"RESPONSIVE_BOTH_AXES",message:"responsiveWidth and responsiveHeight are both true. On mobile this can create resize feedback loops when the parent height depends on chart content.",fix:"Prefer responsiveWidth={true} with a fixed parent height or size={[width, fixedHeight]}; use a ResizeObserver outside the chart if the height must follow aspect ratio."})}(0,t,r),function(e,t,r){if(!0!==t.showParticles)return;const n=t.particleStyle&&"object"==typeof t.particleStyle?t.particleStyle:{},a="number"==typeof n.maxPerLine?n.maxPerLine:void 0,o="number"==typeof n.spawnRate?n.spawnRate:void 0;("number"==typeof a&&a>20||"number"==typeof o&&o>.08)&&r.push({severity:"warning",code:"GEO_PARTICLE_MOBILE_COST",message:"Animated geo particles run a continuous canvas loop that can drain battery and trigger thermal throttling on mobile GPUs.",fix:"Set particleStyle={{ maxPerLine: 12, spawnRate: 0.06 }} for mobile-heavy views, or disable showParticles when reduced-motion or low-power modes are active."})}(0,t,r),function(e,t,r){const n=[];Fr(t.tokenEncoding)&&n.push({source:"tokenEncoding",encoding:t.tokenEncoding}),Fr(t.encoding)&&n.push({source:"encoding",encoding:t.encoding});for(const{source:e,encoding:a}of n){const n=_r(t,a);for(const t of ir(a,{visibleTokens:n}))r.push({severity:"warning",code:"TOKEN_"+t.code,message:t.message,fix:"MISSING_UNIT_VALUE"===t.code?`Set ${e}.unitValue to the value represented by one full token.`:"MISSING_UNIT_MEANING"===t.code?`Set ${e}.unitMeaning so readers know what one full token represents.`:"MISSING_COUNT_STRATEGY"===t.code?`Set ${e}.countStrategy to actual, unitized, fixed-denominator, quantile, sample, posterior-sample, or random-sample.`:"TOKEN_SEMANTICS_UNCLEAR"===t.code?`Set ${e}.tokenSemantics to observed-unit, unitized-measure, risk-case, possible-outcome, posterior-sample, hypothetical-case, topic-anchor, or decorative.`:`Adjust ${e} so its semantics, strategy, labels, and visible token count match the task.`})}}(0,t,r),function(e,t,r){const n=Array.isArray(t.annotations)?t.annotations:null;if(n)for(const e of n){if(!e||"object"!=typeof e)continue;const t=Lt(e);if(!_t(e)||"widget"===t)continue;const n=Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0),a="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:t,o=Bt(e);!o&&n>120?r.push({severity:"warning",code:"ANNOTATION_FAR_NO_CONNECTOR",message:`Annotation "${a}" sits ~${Math.round(n)}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).'}):o&&n>250&&r.push({severity:"warning",code:"ANNOTATION_LONG_CONNECTOR",message:`Annotation "${a}" uses a very long connector (~${Math.round(n)}px); prefer placing the note adjacent to its target when space allows.`,fix:"Reduce dx/dy so the note sits near its target, or keep the long connector only if proximity is genuinely infeasible."})}}(0,t,r),function(e,t,r){const n=Array.isArray(t.annotations)?t.annotations:null;if(!n)return;const a=n.filter(_t).length;if(0===a)return;const o="number"==typeof t.width?t.width:600,i="number"==typeof t.height?t.height:400,s=Mt(o,i);Number.isFinite(s)&&a>s&&r.push({severity:"warning",code:"ANNOTATION_DENSITY",message:`${a} note annotations on a ${o}×${i} chart exceed the ~${s} notes the plot area carries comfortably — the chart may read as cluttered.`,fix:'Mark the essential notes emphasis: "primary" and let density management shed the rest (autoPlaceAnnotations: { density: true }), enable progressive disclosure to reveal secondary notes on hover, or give the chart more room.'})}(0,t,r),function(e,t,r){const n=Array.isArray(t.annotations)?t.annotations:null;if(n)for(const e of n)e&&"object"==typeof e&&"widget"===Lt(e)&&null!=e.content&&!Et(e)&&r.push({severity:"warning",code:"ANNOTATION_INTERACTIVE_ID",message:"An interactive widget annotation has no stable id, so its activation cannot be normalized or replayed reliably.",fix:"Add id, stableId, or provenance.stableId to the widget annotation. Do not identify interactive annotations by array index."})}(0,t,r),function(e,t,r){for(const e of Ir){const n=t[e];if(!Array.isArray(n)||2>n.length)continue;const[a,o]=n;"number"==typeof a&&"number"==typeof o&&a>o&&r.push({severity:"warning",code:"INVERTED_AXIS",message:`${e}=[${a}, ${o}] 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}={[${o}, ${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,t,r),function(e,t,r){if("MultiAxisLineChart"!==e)return;const n=t.series;if(!Array.isArray(n)||2!==n.length)return;const a=n.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.'})}(e,t,r),function(e,t,r){if(!hr.has(e))return;const n=t.xExtent;if(!Array.isArray(n)||2>n.length)return;const[a,o]=n;if("number"!=typeof a||"number"!=typeof o||a>=o)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(o,l)-Math.max(a,c))/p;.7>u&&r.push({severity:"warning",code:"CHERRY_PICKED_WINDOW",message:`xExtent=[${a}, ${o}] shows only ~${Math.round(100*u)}% of the data's x range [${c}, ${l}] — a trend cropped to a favorable window is a classic misleading-design pattern.`,fix:'Widen xExtent to cover the data, filter the data itself so the chart shows what it has, or annotate the visible window ("Q4 only") so the cropping is explicit.'})}(e,t,r),function(e,t,r){const n=vr[e],a=xr[e];if(!n&&!a)return;if(a&&!t.normalize)return;const o=n??a,i=t[o],s="string"==typeof i?i:"yAccessor"===o?"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:n?"error":"warning",code:"PART_TO_WHOLE_NEGATIVE",message:`${l.length} negative value(s) in "${s}" — a part-to-whole encoding cannot represent negative parts${n?"; slice angles/areas for negatives are meaningless":"; normalized shares distort when parts are negative"}.`,fix:n?"Filter or transform negative values first, or switch to a BarChart/WaterfallChart, which encode signed values honestly.":"Drop normalize for signed data, or use a diverging BarChart so negative contributions read as negative."})}(e,t,r),function(e,t,r){br.has(e)&&"basis"===t.curve&&r.push({severity:"warning",code:"NON_PASSING_CURVE",message:'curve="basis" draws a B-spline that does NOT pass through your data points — rendered values differ from actual values everywhere except the endpoints.',fix:'Use curve="monotoneX" or curve="catmullRom" (both interpolate through every point), or keep "basis" only for deliberately schematic, clearly-labeled smoothing.'})}(e,t,r),function(e,t,r){if("LineChart"!==e&&"AreaChart"!==e)return;if("sparkline"===t.mode)return;if(t.responsiveWidth||t.responsiveHeight)return;const n="number"==typeof t.width?t.width:600,a="number"==typeof t.height?t.height:400;if(0>=n||0>=a)return;const o=n/a;if(o>8||.25>o){const e=o>8?"flattens":"exaggerates";r.push({severity:"warning",code:"EXTREME_ASPECT_RATIO",message:`${n}×${a} (${o.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:o>8?'Use a more balanced aspect (e.g. width/height between 1 and 3), or set mode="sparkline" if this is genuinely a sparkline strip.':"Use a more balanced aspect (e.g. width/height between 1 and 3); very tall trend charts overstate every change."})}}(e,t,r),function(e,t,r){if(!fr.has(e))return;const n=t.data;if(!n||!Array.isArray(n)||0===n.length)return;const a=t.categoryAccessor,o="string"==typeof a?a:"category",i=new Set;for(const e of n){const t=e?.[o];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.`})}(e,t,r),function(e,t,r){if(jr.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 n=Mr(t.branchProbability);null!=t.branchProbability&&(null==n||0>n||n>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=Mr(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,n=e&&"object"==typeof e?Mr(e.size):null;null==n||n>0||r.push({severity:"error",code:"PHYSICS_BAD_WINDOW_SIZE",message:`windows.size=${n} 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",n=t.arrivalAccessor||"arrivalTime";a.some(t=>{const r=Mr(Br(t,e,"time")),a=Mr(Br(t,n,"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=Mr(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 n=Mr(t.unitValue??1)??1;if(0>=n)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",o=(Array.isArray(t.data)?t.data:[]).reduce((e,t)=>{const r=Mr(Br(t,a,"value"))??0;return e+Math.max(0,Math.round(r/n))},0);o>1500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`PhysicsPileChart would create about ${o} 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((Mr(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."}),(Mr(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:[],n=Mr(e[0]),a=Mr(e[1]);(2>e.length||null==n||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 n=t.groupAccessor;if(e.length>0&&n){const t=new Set;for(const r of e){const e=Br(r,n,"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 n=e.filter(e=>e?.absorb).length;t.groupBy&&0===n&&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 n=Array.isArray(t.data)?t.data:[],a=Mr(t.mechanicalCount)??0,o=n.length>0?n.length*("PhysicsPileChart"===e?Math.max(1,(Mr(t.unitValue),1)):1):a;o>2500&&r.push({severity:"warning",code:"PHYSICS_BODY_BUDGET",message:`${e} may spawn ~${Math.round(o)} live bodies, which can overwhelm the simulation loop.`,fix:"Lower mechanicalCount / unitize with a larger unitValue, enable sediment/windowSize, or sample the data before spawn."})}}}(e,t,r),{ok:r.every(e=>"warning"===e.severity),diagnoses:r}):{ok:0===r.length,diagnoses:r}}var zr=["title","description","summary"];function Hr(e){return"string"==typeof e&&e.trim().length>0}var Gr=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]);function qr(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 Vr(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 Wr(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function Ur(e,t,r={}){const n=[],a=O(e),o=kr.has(e),i=!!tr[e]||!!a||o,s=!0===r.inChartContainer,c=!0===r.describe,l=!0===r.navigable,p=Ar.has(e),u=dr.has(e),{hasTitle:d,hasDescription:y,hasSummary:m,unsupportedFinding:h}=function(e,t){const r=tr[e]?.props,n=e=>!!r?.[e],a=zr.filter(e=>Hr(t[e])&&!n(e));return{hasTitle:n("title")&&Hr(t.title),hasDescription:n("description")&&Hr(t.description),hasSummary:n("summary")&&Hr(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,t),g=!1!==t.accessibleTable&&!p,b=d||y||m,f=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(t),v=function(e){const t=Wr(e),r=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===r.pause||"function"==typeof r.pause}(t),w=o,x=function(e){const t=Wr(e);return!0===e.settledProjection||!0===t.settledProjection}(t)||Pr.has(e)&&g,A=function(e){const t=Wr(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(t)||w,C=Array.isArray(t.annotations)?t.annotations.filter(e=>!!e&&"object"==typeof e):[],k=i?"pass":"manual",S=i?"":` (unrecognized component "${e}" — verify manually that the built-in applies)`;if(h&&n.push(h),n.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},r=e.colorScheme,n="string"==typeof e.background?e.background:null;if(n&&!n.startsWith("#"))return{...t,status:"manual",message:`Background "${n}" 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=n??"#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 o=[];let i=0;for(const e of r){if("string"!=typeof e||!e.startsWith("#"))continue;const t=ur(e,a);null!=t&&(i++,3>t&&o.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."}:o.length>0?{...t,status:"fail",message:`${o.length} color(s) fall below 3:1 contrast vs ${a}: ${o.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}.`}}(t)),n.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...p?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:g?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:y&&m?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}}),n.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."}),n.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=t.pulse||Sr.has(e)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),null!=t.colorBy){n.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...!0===t.directLabel||!0===t.showLabels?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:"Categories are encoded by color (colorBy) with no redundant channel — Semiotic does not yet ship texture/pattern fills.",fix:"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy), keep categories ≤ ~7, and use a CVD-safe palette."}});const e=Array.isArray(t.colorScheme)?t.colorScheme:null,r=e?e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase()):[],a=r.length>0&&r.every(e=>Gr.has(e));n.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...a?{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.'}}),n.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=C.filter(_t);if(e.length>0){const r=t.autoPlaceAnnotations,a="object"==typeof r&&null!==r&&!0===r.redundantCues,o=e.filter(e=>{if("string"!=typeof e.color)return!1;const t=Lt(e),r=a&&"text"===t;return!(Bt(e)||r)});n.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===o.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:`${o.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."}})}}n.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...i?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${e}".`,fix:"Verify Tab + arrow-key operation."}});{const e=[];null==t.brush&&null==t.onBrush||e.push("brushing"),!0===t.zoomable&&e.push("zoom/pan"),"isolate"!==t.legendInteraction&&"highlight"!==t.legendInteraction||e.push("legend filtering"),e.length>0&&n.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{const r=$r[e];if(r&&f){const e=t[r];"number"==typeof e&&e>0&&24>2*e&&n.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${r}=${e} gives a ~${2*e}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}n.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:k,message:`The chart takes a single tab stop and navigates data with arrow keys${S} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),n.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...f?m||y?{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."}}),n.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:k,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${S}.`}),n.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:k,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${S}.`,fix:i?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),n.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...b?{status:"pass",message:`Provided: ${[d&&"title",y&&"description",m&&"summary"].filter(Boolean).join(", ")}.`}:s?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),n.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...y||m?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:c?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:d?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{const e=[t.description,t.summary].filter(Hr).join(". "),r=e?function(e){const t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),r=e.trim().split(/\s+/).filter(Boolean);if(0===r.length||0===t.length)return null;let n=0;for(const e of r)n+=Vr(e);return r.length/t.length*.39+n/r.length*11.8-15.59}(e):null;n.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==r?{status:"not-applicable",message:"No description/summary text to grade."}:r>9?{status:"warn",message:`Description/summary reads at ~grade ${r.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(r))} (≤ 9).`}})}if(Cr.has(e)){const e=Hr(t.xLabel),r=Hr(t.yLabel);n.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&r?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!r&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(Rr.has(e)&&n.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."}),C.length>1){const e=C.filter(qr).length;n.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===C.length?{status:"pass",message:`All ${C.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:C.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:`${C.length-e} of ${C.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=t.forecast||null!=t.anomaly||null!=t.band||null!=t.regression)&&n.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=t.animate&&!1!==t.animate&&n.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:k,message:`Transitions animate with object constancy and data changes are mirrored to the live region${S}.`,fix:i?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),n.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."}),n.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."}),n.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:k,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${S}.`,fix:i?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),n.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...p?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:g?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}}),p||n.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...s?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),n.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:i?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${i?"":S}.`,fix:i?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),n.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...l?{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:u?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:k,message:`Keyboard navigation steps through points and switches series/groups${S}.`,fix:i?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const r=Array.isArray(t.data)?t.data:null,a=Array.isArray(t.nodes)?t.nodes:null,o={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let i;i=wr.has(e)&&r&&r.length>7?{...o,status:"warn",message:r.length+" slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.",fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:a&&a.length>200?{...o,status:"warn",message:a.length+" nodes. A network this size is hard to navigate non-visually node by node.",fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:r&&r.length>5e3?{...o,status:"warn",message:r.length+" data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.",fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:r?{...o,status:"pass",message:r.length+" data points — a reasonable density for non-visual consumption."}:a?{...o,status:"pass",message:a.length+" nodes — a reasonable density for non-visual consumption."}:{...o,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},n.push(i)}{const e=Array.isArray(t.data)?t.data:null,r=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof t[e]||"string"==typeof t[e]);let a=!1;if(e&&!r)for(const t of e.slice(0,50))if(t&&"object"==typeof t){for(const e of Object.values(t))if("number"==typeof e&&Number.isFinite(e)&&Math.abs(e)>=1e5){a=!0;break}if(a)break}a&&n.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.'})}n.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...c?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:m?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),n.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...p?{status:"not-applicable",message:"Single value — nothing to skip."}:g?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}}),n.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:k,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${S}.`,fix:i?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),n.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...Sr.has(e)||Tr.has(e)?v?{status:"pass",message:e+" animates continuously and declares an in-chart pause/stop control."}:{status:"warn",message:e+" animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.",fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:k,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${S}.`}}),o&&(n.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...v?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),n.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...x?{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."}}),n.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...A?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{const r=!0===t.responsiveWidth||!0===t.responsiveHeight,a=Nr.has(e)&&!0===t.zoomable;n.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...r?{status:"pass",message:`Chart reflows to its container (${[!0===t.responsiveWidth&&"responsiveWidth",!0===t.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:a?{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(a){const e=a.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));e&&n.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:a.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"!==a.accessibility.description||Hr(t.description)||n.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:a.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),a.accessibility.fallbackTable&&!1===t.accessibleTable&&n.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:a.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const P=n.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),j={criticalsPassed:P.filter(e=>"pass"===e.status).length,criticalsEvaluated:P.length,fails:n.filter(e=>"fail"===e.status).length,warnings:n.filter(e=>"warn"===e.status).length,manual:n.filter(e=>"manual"===e.status).length,passes:n.filter(e=>"pass"===e.status).length};return{component:e,ok:!P.some(e=>"fail"===e.status),summary:j,findings:n,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 Yr(e,{onlyCritical:t=!1}={}){const r=[];for(const n of e.findings)"fail"!==n.status&&"warn"!==n.status||t&&!n.critical||r.push(n.message);return r}var Xr={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},Kr=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function Qr(e){const t=[],r=e.summary,n=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(` ${n} · ${r.warnings} warning(s) · ${r.manual} to verify manually`);for(const r of Kr){const n=e.findings.filter(e=>e.principle===r&&"not-applicable"!==e.status);if(0!==n.length){t.push(""),t.push(" "+r.toUpperCase());for(const e of n)t.push(` ${Xr[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")}import{useCallback as Jr,useMemo as Zr,useRef as en,useState as tn}from"react";var rn=/^\d{4}[-/]\d{2}/,nn=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function an(e){return"number"==typeof e?Number.isFinite(e)?"numeric":"unknown":e instanceof Date?"date":"string"==typeof e?rn.test(e)&&!Number.isNaN(Date.parse(e))?"date":nn.test(e)&&Number.isFinite(Number(e))?"numeric":"categorical":"boolean"==typeof e?"categorical":"unknown"}function on(e){let t=1/0,r=-1/0;for(let n=0;e.length>n;n++){const a=e[n];t>a&&(t=a),a>r&&(r=a)}return{min:t,max:r}}function sn(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 cn(e,t={}){const{maxDistinct:r=10,sampleSize:n=5,keyScanRows:a=100}=t;if(!Array.isArray(e)||0===e.length)return{rowCount:0,fields:{},sample:[]};const o=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))o.add(e)}const s={};for(const t of o){const n=[];for(let r=0;e.length>r;r++){const a=e[r]?.[t];null!=a&&n.push(a)}if(0===n.length){s[t]={type:"unknown"};continue}const a=an(n[0]);if("numeric"===a){const e=[];for(let t=0;n.length>t;t++){const r=Number(n[t]);Number.isFinite(r)&&e.push(r)}if(0===e.length){s[t]={type:"unknown"};continue}const{min:r,max:a}=on(e);let o=0;for(let t=0;e.length>t;t++)o+=e[t];const i=[...e].sort((e,t)=>e-t);s[t]={type:"numeric",min:r,max:a,mean:o/e.length,median:sn(i)}}else if("date"===a){const e=[];for(let t=0;n.length>t;t++){const r=n[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}=on(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;n.length>t;t++){const r=n[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,n)}}var ln=/^(x|index|rank|order|step|sequence|year|quarter|qtr|fiscal|month|week|day|date|time|timestamp)$/i,pn=/^(y|value|amount|total|count|revenue|sales|price|score|rate|population|measure)$/i,un=/(size|magnitude|volume|weight|count|amount)/i,dn=/^(category|label|name|type|group|region|segment|kind|class)$/i,yn=/^(series|group|type|category|segment|cohort|product)$/i,mn=new Set(["numeric"]),hn=new Set(["numeric","date"]),gn=new Set(["numeric"]),bn=new Set(["date"]),fn=new Set(["categorical","boolean"]);function vn(e){return"numeric"===e.type?"numeric":"date"===e.type?"date":"categorical"===e.type?"categorical":"unknown"}function wn(e,t){return t.test(e)?.2:0}function xn(e,t){let r=null;for(let n=0;e.length>n;n++){const a=e[n]?.[t];if(null==a)continue;const o=a instanceof Date?a.getTime():Number(a);if(!Number.isFinite(o))return!1;if(null!==r&&r>o)return!1;r=o}return null!==r}function An(e,t,r,n,a={}){const o=[];for(const[i,s]of Object.entries(e)){const e=vn(s);if(!r.has(e))continue;let c,l=.5;l+=wn(i,n),"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=xn(t,i),p.monotonic&&(p.quality=Math.min(1,p.quality+.2))),o.push(p)}return o.sort((e,t)=>t.quality-e.quality),o}function Cn(e,t){const r=new Set;for(let n=0;e.length>n;n++){const a=e[n]?.[t];null!=a&&r.add(a+"")}return r.size}var kn=/^(source|from|origin|stage|currentstage|sourcestage|fromstage)$/i,Sn=/^(target|to|destination|nextstage|next|targetstage|tostage|destinationstage|status)$/i,Pn=/^(starttime|startedat|enteredat|startdate|start|timestamp|date|time)$/i,jn=/^(endtime|endedat|exitedat|completedat|finishtime|enddate|end)$/i,Tn=/^(value|weight|amount|count|magnitude|volume)$/i;function Rn(e,t){return e.find(e=>t.test(e))}function Nn(e,t={}){const r=cn(e??[]),n=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),n=Rn(r,kn),a=Rn(r,Sn);if(!n||!a||n===a)return null;const o=Rn(r,Pn),i=Rn(r,jn),s=Rn(r,Tn),c=[];for(const t of e){if(!t)continue;const e=t[n],r=t[a];if(null==e||null==r)continue;const o=(e+"").trim(),i=(r+"").trim();o&&i&&o!==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[n]+"").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}`,d=s?Number(e[s]):1,y=Number.isFinite(d)?d:1;p.set(c,(p.get(c)??0)+y),u.has(c)||u.set(c,{source:t,target:r,...o?{startTime:e[o]}:{},...i?{endTime:e[i]}:{}})}const d=[];for(const[e,t]of u)d.push({...t,value:p.get(e)??1});return{nodes:Array.from(l.values()),edges:d}}(n);e&&(a.hasNetwork=!0,a.network=e)}const o=An(r.fields,n,hn,ln,{computeMonotonic:!0}),i=An(r.fields,n,gn,pn),s=An(r.fields,n,mn,un),c=An(r.fields,n,fn,dn),l=An(r.fields,n,fn,yn),p=An(r.fields,n,bn,/(date|time|timestamp)/i,{computeMonotonic:!0}),u=p[0]?.field;let d=u,y=u?"time":"none";if(!d){const e=o.find(e=>ln.test(e.field)&&"numeric"===e.kind);e&&(d=e.field,y="named")}const m=i.find(e=>e.field!==d)?.field;if(!d&&m){const e=Object.entries(r.fields).filter(([e,t])=>"numeric"===t.type).map(([e])=>e);2>e.length||(d=e.find(e=>e!==m),d&&(y="scatter"))}const h=s.find(e=>e.field!==d&&e.field!==m)?.field,g="time"===y||"named"===y,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?Cn(n,f):void 0,x=v?Cn(n,v):void 0,A=d?Cn(n,d):void 0,C=!!d&&function(e,t){const r=new Set;for(let n=0;e.length>n;n++){const a=e[n]?.[t];if(null==a)continue;const o=a+"";if(r.has(o))return!0;r.add(o)}return!1}(n,d),k=o.find(e=>e.field===d)?.monotonic??!1,S=p.length>0;return{...r,data:n,candidates:{x:o,y:i,size:s,category:c,series:l,time:p},primary:{x:d,y:m,size:h,category:f,series:v,time:u},categoryCount:w,seriesCount:x,uniqueXCount:A,hasRepeatedX:C,monotonicX:k,hasTimeAxis:S,hasHierarchy:a.hasHierarchy,hasNetwork:a.hasNetwork,hasGeo:a.hasGeo,xProvenance:y,network:a.network,hierarchy:a.hierarchy,geo:a.geo}}var $n={rows:{tiny:3,small:25,medium:250,large:5e3},cardinality:{low:7,medium:25},fields:{narrow:3,typical:10}},In=["tiny","small","medium","large","huge"];function Mn(e){return{rows:{...$n.rows,...e?.rows??{}},cardinality:{...$n.cardinality,...e?.cardinality??{}},fields:{...$n.fields,...e?.fields??{}}}}function Bn(e,t){if(!Number.isFinite(e)||0>e)return"tiny";const r=Mn(t?.thresholds).rows;return e>r.tiny?e>r.small?e>r.medium?e>r.large?"huge":"large":"medium":"small":"tiny"}function En(e,t){if(!Number.isFinite(e)||0>e)return"low";const r=Mn(t?.thresholds).cardinality;return e>r.low?e>r.medium?"high":"medium":"low"}function Ln(e,t){if(!Number.isFinite(e)||0>e)return"narrow";const r=Mn(t?.thresholds).fields;return e>r.narrow?e>r.typical?"wide":"typical":"narrow"}function Fn(e,t){return In.indexOf(e)-In.indexOf(t)}function Dn(e,t,r){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=Mn(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}function _n(e,t,r){if("number"==typeof e&&Number.isFinite(e))return e;if(void 0!==e){const t=Mn(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}function On(e,t){const r=e.rowCount??0,n=t?.rows,a=Dn(n,r,t),o=Bn(a,t),i=Object.keys(e.fields??{}).length,s=t?.fields,c="number"==typeof s?s:"string"==typeof s?function(e,t){const r=Mn(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=Ln(c,t),p=e.primary.category,u=_n((p?t?.cardinality?.[p]:void 0)??t?.typicalCardinality,e.categoryCount,t);return{rows:a,rowBand:o,fields:c,fieldBand:l,typicalCardinality:u,cardinalityBand:void 0!==u?En(u,t):void 0,growth:t?.growth??"static",rowsSource:void 0!==n?"declared":"measured"}}var zn=2.5;function Hn(e,t,r,n,a){const o=[],i=[];let s=0,c=!1;if(e.scaleFit){const a=e.scaleFit(t,r,n);if(a&&(s+=Math.max(-2.5,Math.min(zn,a.delta??0)),a.reason&&o.push(a.reason),a.caveats))for(const e of a.caveats)i.push(e)}const l=n?.charts?.[e.component];if(l&&(l.minBand&&0>Fn(r.rowBand,l.minBand)||l.maxBand&&Fn(r.rowBand,l.maxBand)>0?c=!0:"number"==typeof l.bias?(s+=Math.max(-3,Math.min(3,l.bias)),l.reason&&o.push(`${n?.name?n.name+": ":""}${l.reason}`)):l.reason&&o.push(`${n?.name?n.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&&o.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:o,caveats:i,excluded:c}}function Gn(e){return(t,r)=>{let n=0;const a=[];let o;if(e.rows){const[t,i]=e.rows.sweetSpot;t>r.rows||r.rows>i?t>r.rows?(n-=Math.min(zn,.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`)):(n-=Math.min(zn,.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")):(n+=.6,o=r.rows+" rows is in the sweet spot for this chart")}if(e.cardinality&&void 0!==r.typicalCardinality){const t=r.typicalCardinality,[o,i]=e.cardinality.sweetSpot;o>t||t>i?t>i&&(n-=Math.min(zn,.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")):n+=.4}return 0!==n||0!==a.length||o?{delta:n,reason:o,caveats:a}:null}}var qn={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:Gn({rows:{sweetSpot:[25,2e3],caveatBelow:4,caveatAbove:1e4}})},Vn={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,n=e.primary.y,a=new Map;for(const r of e.data){const e=r[t];if(null==e||""===e)continue;const o=Number(r[n]);a.set(e,(a.get(e)??0)+(Number.isFinite(o)?o:0))}let o,i=-1/0;for(const[e,t]of a)t>i&&(i=t,o=e);null!=o&&a.size>0&&(r=e.data.filter(e=>e[t]===o))}const n={data:r,xAccessor:e.primary.x,yAccessor:e.primary.y,gradientFill:!0,areaOpacity:.55};return e.hasTimeAxis&&e.primary.x===e.primary.time&&(n.xScaleType="time"),{...n,...t?.props??{}}},scaleFit:Gn({rows:{sweetSpot:[6,200],caveatAbove:2e3}})},Wn={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:Gn({rows:{sweetSpot:[30,1500],caveatBelow:12,caveatAbove:1e4}})},Un={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},n="time"===e.xProvenance||"named"===e.xProvenance?e.primary.x:void 0,a=n?e.candidates.y.filter(e=>e.field!==n).map(e=>e.field):[];return n&&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:Gn({rows:{sweetSpot:[50,5e3],caveatBelow:20,caveatAbove:1e4}})},Yn={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,n=r?e.candidates.y.filter(e=>e.field!==r).map(e=>e.field):[];return r&&n.length>=2?(t.xAccessor=n[0],t.yAccessor=n[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}},Xn={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:Gn({rows:{sweetSpot:[10,500],caveatAbove:1500}})},Kn={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,n=e.fields[t],a=e.fields[r],o="numeric"===n?.type?n.median:void 0,i="numeric"===a?.type?a.median:void 0;return{data:e.data,xAccessor:t,yAccessor:r,...void 0!==o?{xCenter:o}:{},...void 0!==i?{yCenter:i}:{},...e.primary.series&&6>=(e.seriesCount??0)?{colorBy:e.primary.series}:{},quadrants:{topLeft:{...Re.topLeft},topRight:{...Re.topRight},bottomLeft:{...Re.bottomLeft},bottomRight:{...Re.bottomRight}}}}},Qn={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}}},Jn={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"}:{}})},Zn={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,n=e.primary.series,a=e=>null!=e&&(e+"").length>0,o=new Map;for(const t of e.data){const e=t[n];if(!a(e))continue;const i=e+"",s=Number(t[r]);o.set(i,(o.get(i)??0)+(Number.isFinite(s)?s:0))}const i=[...o.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 o of e.data){const e=o[n];if(!a(e))continue;const i=e+"";if(i!==s&&i!==c)continue;const u=o[t],d=o[r],y=l(u);let m=p.get(y);m||(m={[t]:u},p.set(y,m)),i===s?m.a=d:i===c&&(m.b=d)}return{data:Array.from(p.values()).filter(e=>null!=e.a&&null!=e.b),xAccessor:t,seriesAAccessor:"a",seriesBAccessor:"b",seriesALabel:s,seriesBLabel:c}}},ea={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"),n=t.has("low");return r&&n?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")}}},ta={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),n=e.primary.time??r[0],a=r.find(e=>e!==n)??r[0]??e.primary.series;return{data:e.data,xAccessor:n,yAccessor:a,valueAccessor:e.primary.y,...t?.props??{}}},scaleFit:Gn({rows:{sweetSpot:[100,1e4],caveatBelow:25,caveatAbove:5e4}})},ra=/(^|[^a-z])(date|time|timestamp|month|week|day|year|quarter|qtr|hour|minute)(?=[^a-z]|$)/i,na=/^(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,aa=/^(\d{4}(-\d{1,2}(-\d{1,2})?)?|q[1-4]|week\s*\d+|wk\s*\d+|\d{1,2}:\d{2})$/i,oa={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(ra.test(r))return!0;const n=e.data;if(!n||0===n.length)return!1;let a=0,o=0;for(const e of n){const r=e[t];if(null==r)continue;o++;const n=(r+"").trim();(na.test(n)||aa.test(n))&&a++}return o>0&&a/o>=.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:Gn({cardinality:{sweetSpot:[3,15],caveatAbove:25},rows:{sweetSpot:[3,200]}})},ia={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})},sa={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??{}})},ca={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:Gn({cardinality:{sweetSpot:[10,30],caveatAbove:40},rows:{sweetSpot:[5,300]}})},la={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:Gn({cardinality:{sweetSpot:[2,5],caveatAbove:6}})},pa={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})},ua=/(stage|step|funnel|status|outcome|phase)/i,da={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=>ua.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=>ua.test(e));return{data:e.data,stepAccessor:t,valueAccessor:e.primary.y,...e.primary.category&&e.primary.category!==t?{categoryAccessor:e.primary.category}:{}}}},ya={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],n=r?Number(r[t]):0,a=e.fields[t],o="numeric"===a?.type?a.max:100;return{value:Number.isFinite(n)?n:0,min:0,max:o}},scaleFit:(e,t)=>"tiny"===t.rowBand?{delta:.6,reason:"designed for single-value displays"}:null},ma=/(rating|score|likert|satisfaction|nps|agree|sentiment|level)/i,ha={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=>ma.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=>ma.test(e));return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:e.primary.y,levelAccessor:t,levels:["Very Low","Low","Neutral","High","Very High"]}}},ga={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})},ba={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??{}})},fa={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})},va={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}:{}})},wa={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??{}})},xa={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})},Aa={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"}}},Ca={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"})},ka={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"})},Sa={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}},Pa={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??{}})};function ja(e){if(!e||"object"!=typeof e)return 0;const t=e.children;return Array.isArray(t)&&t.length>0?t.reduce((e,t)=>e+ja(t),0):1}var Ta={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=ja(e.hierarchy);let n=0;const a=[];let o;return 5>r?(n-=.5,a.push(`only ${r} leaves — treemap needs more cells to show structure`)):r>100?r>500&&(n-=.7,a.push(r+" leaves — most tiles will be sub-pixel; prefer aggregation or zoomable treatment")):(n+=.4,o=r+" leaves is in the legible band for treemap"),"huge"===t.rowBand&&(n-=.5,a.push("at huge declared scale a stacked or matrix view aggregates better than hierarchical browsing")),{delta:n,reason:o,caveats:a}}},Ra={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"})},Na={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"})},$a={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"})},Ia={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"})},Ma={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"})},Ba={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"})};function Ea(e){return Number.isFinite("number"==typeof e?e:Number(e))}function La(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 Fa(e,t){return e.data.some(e=>e&&"object"==typeof e&&t in e)}var Da=[qn,Vn,Wn,Un,Yn,Xn,Kn,Qn,Jn,Zn,ea,ta,oa,ia,sa,ca,la,pa,da,ya,ha,ga,ba,fa,va,wa,xa,Aa,Ca,ka,Sa,Pa,Ta,Ra,Na,$a,Ia,Ma,Ba,{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)):[],n=r.length?Math.max(...r):1;return{data:e.data,categoryAccessor:e.primary.category,valueAccessor:t,unitValue:Math.max(1,Math.ceil(n/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=>Ea(e.x)&&Ea(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:La(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":Fa(e,"stage")||Fa(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=(Fa(e,"stage")?"stage":Fa(e,"status")&&"status")||e.primary.category||"stage",r=Fa(e,"id")?"id":void 0,n=(Fa(e,"featureId")?"featureId":Fa(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 o=a.size>0?Array.from(a):["coding","review","merged"],i=o.map((t,r)=>{const n=r===o.length-1,a=r===Math.floor(o.length/2);return{id:t,label:t,force:n?20:12,capacity:a?{unitsPerSecond:Math.max(2,Math.round(e.rowCount/8))}:void 0,pressure:a||void 0,absorb:n||void 0}});return{data:e.data,...r?{idAccessor:r}:{},stageAccessor:t,...n?{groupBy:n,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,n=r.length>0?r[r.length-1]:null,a=n?Number(n[t]):0,o={value:Number.isFinite(a)?a:0,label:t};if(r.length>=2){const e=Number(r[r.length-2][t]);Number.isFinite(e)&&(o.comparison={value:e,label:"vs previous"})}return o},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}],_a=new Map;function Oa(e){_a.set(e.component,e)}function za(e){_a.delete(e)}function Ha(){if(0===_a.size&&!q())return Da;const e=new Map;for(const t of Da)e.set(t.component,t);for(const t of G())e.set(t.component,t);for(const[t,r]of _a)e.set(t,r);return Array.from(e.values())}function Ga(e){return Ha().find(t=>t.component===e)}var qa=new Set(["perceivable.content-only-visual","perceivable.color-alone","assistive.data-density","assistive.human-readable-numbers","assistive.skippable-navigation","compromising.table","compromising.navigable-structure"]),Va={"screen-reader":"a screen reader",sonified:"sonification",agent:"an AI reader"};function Wa(e,t){if("visual"===t)return{delta:0,caveats:[]};let r=0;const n=[],a=[];for(const t of e.findings){if(!qa.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,n.push(t.heuristic.charAt(0).toLowerCase()+t.heuristic.slice(1)),a.push(t.message))}return 0===n.length?{delta:0,caveats:[]}:{delta:Math.max(-3,r),reason:`Harder to receive via ${Va[t]}: ${n.slice(0,3).join("; ")}`,caveats:a}}function Ua(e,t,r,n,a){if(!n)return{score:e,rubric:t};const o=n.familiarity?.[r],i=o??t.familiarity,s=n.targets?.[r];let c,l,p=0;void 0!==o&&(p+=.5*(o-3)),s&&(p+=1*("increase"===s.direction?1:-1)*Math.max(1,Math.min(3,s.weight??1)),c=s.reason?`${n.name?n.name+": ":""}${s.reason}`:`${n.name?n.name+" ":""}target: ${s.direction} ${r}`);const u=n.receptionModality;return a&&u&&"visual"!==u&&(p+=a.delta,l=a.reason),{score:e+p,rubric:{...t,familiarity:i},appliedReason:c,receivabilityReason:l}}function Ya(e,t,r){return r?r.familiarity?.[e]??t:t}function Xa(e){return e&&2===e.exposureLevel?4:3}function Ka(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 Qa(e,t){if(!t?.intentDeltas)return e;const r={...e};for(const[e,n]of Object.entries(t.intentDeltas))r[e]=Math.max(0,Math.min(5,(r[e]??0)+n));return r}function Ja(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 Za(e,t,r,n){const a=[],o=n.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 o)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 eo(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 n=0;const a=[],o=[],i=t.audience?.name?.trim().toLowerCase();if(i){const e=r.audienceFit?.find(e=>e.audience.trim().toLowerCase()===i);e&&(n+={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)?(n+=.25,a.push(`Designed for ${s} reception`)):r.reception?.channels?.length&&(n-=1,o.push(`Recipe does not declare support for the ${s} reception channel.`));const c=r.reception?.risks??[];return"low"===t.riskTolerance&&c.length>0?(n-=Math.min(1.5,.35*c.length),o.push(...c)):"medium"===t.riskTolerance&&c.length>2&&(n-=.25),"local"===r.portability?o.push("Local-only recipe: cannot be rendered remotely by CLI or MCP."):a.push("Portable registered recipe"),{delta:n,reasons:a,caveats:o}}function to(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 n of t)r+=e[n]??0;return r/t.length}function ro(e,t={}){const r=t.profile??Nn(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),n=t.capabilities??Ha(),a=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],o=!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,d=On(r,t.scale),y=void 0!==t.scale&&d.rows!==r.rowCount?{...r,rowCount:d.rows}:r,m=[];for(const e of n){if(c&&!c.has(e.component))continue;if(l&&l.has(e.component))continue;if(null!==e.fits(y))continue;const n={};for(const[t,r]of Object.entries(e.intentScores))n[t]=Ka(r,y);const s=e.caveats?Array.from(e.caveats(y)):[],h=o&&e.variants&&e.variants.length>0?e.variants:[void 0];for(const o of h){const c=Qa(n,o),l=to(c,a),h=Ja(e.rubric,o),g=e.buildProps(r,o);let b;u&&(b=Wa(Ur(e.component,g),p));const f=Ua(l,h,e.component,t.audience,b),v=Hn(e,y,d,t.scale,t.quality);if(v.excluded)continue;const w=eo(e,t);if(w.excluded)continue;const x=f.score+v.delta+w.delta;if(i>x)continue;const A=Za(e,y,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,...o?.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:o,score:x,intentScores:c,rubric:f.rubric,reasons:A,caveats:C,props:g,...e.whyCustom?{whyCustom:e.whyCustom}:{},scaleRange:{band:d.rowBand,cardinalityBand:d.cardinalityBand,rows:d.rows,rowsSource:d.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 no(e,t={}){const r=t.profile??Nn(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),n=t.capabilities??Ha(),a=t.allow?new Set(t.allow):null,o=t.deny?new Set(t.deny):null,i=On(r,t.scale),s=void 0!==t.scale&&i.rows!==r.rowCount?{...r,rowCount:i.rows}:r,c=[];for(const e of n){if(a&&!a.has(e.component))continue;if(o&&o.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:ro(e,{...t,profile:r}),rejected:c,profile:r}}function ao(e,t,r={}){const n=Ha().find(t=>t.component===e);if(!n)return{reason:`No capability registered for "${e}"`};const a=r.profile??Nn(t??[]),o=n.fits(a);if(null!==o)return{reason:o};const i=r.variantKey?n.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(n.intentScores))c[e]=Ka(t,a);const l=Qa(c,i),p=to(l,s),u=Ja(n.rubric,i),d=Za(n,a,l,s),y=eo(n,r);if(y.excluded)return{reason:y.excluded};d.push(...y.reasons);const m=[...n.caveats?n.caveats(a):[],...i?.caveats??[],...y.caveats];return{component:n.component,displayName:n.displayName??n.component,candidateKind:n.candidateKind??"built-in",...n.recipe?{recipeId:n.recipe.id}:{},family:n.family,importPath:n.importPath,variant:i,score:p+y.delta,intentScores:l,rubric:u,reasons:d,caveats:m,props:n.buildProps(a,i),...n.whyCustom?{whyCustom:n.whyCustom}:{}}}function oo(e,t={}){const r=t.profile??Nn(e??[],{rawInput:t.rawInput,seriesField:t.seriesField}),n=On(r,t.scale),a=t.maxPerBand??t.maxResults??5,o=["tiny","small","medium","large","huge"],i={};for(const n of o){const o={...t.scale??{},rows:n};i[n]=ro(e,{...t,profile:r,scale:o,maxResults:a})}return{tiny:i.tiny??[],small:i.small??[],medium:i.medium??[],large:i.large??[],huge:i.huge??[],effective:n}}var io=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","PhysicsPileChart","CollisionSwarmChart","PhysicalFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function so(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function co(e){return so(e)?e:void 0}function lo(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function po(e){const t=lo(e);return null==t?void 0:Math.max(0,Math.floor(t))}function uo(...e){return e.map(co).find(Boolean)}function yo(...e){return e.find(Array.isArray)}function mo(e){const t={};for(const[r,n]of Object.entries(e))void 0!==n&&(t[r]=n);return t}function ho(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function go(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function bo(e,t,r){const n=e?.filter(e=>!0===co(e)?.sensor).length,a=co(t?.observation),o=co(a?.sensors),i=yo(r?.activeSensors);return Math.max(n??0,o?Object.keys(o).length:0,i?.length??0)||void 0}function fo(e,t,r={}){const{capability:n,audience:a,locale:o}=r,i=r.levels??["l1","l2","l3"],s=!1!==r.includeStructure,c=se(e,n),l=c?[...i,"l4"]:i,p=j(e,t,{levels:l,locale:o,capability:n,audience:a}),{l4:u,...d}=p.levels,y=["l1","l2","l3"].map(e=>p.levels[e]).filter(Boolean).join(" "),m={levels:d,text:p.annotations?`${p.annotations} ${y}`.trim():y,...p.annotations?{annotations:p.annotations}:{}};let g;if(c&&u){const e=(b=n)?"fits"in b||"buildProps"in b?{family:b.family}:{family:b.family,intentScores:b.intentScores}:{};g={act:c,sentence:u,family:e.family,intentScores:e.intentScores}}var b;const f=s?h(e,t,{maxLeaves:r.maxLeaves,locale:o}):void 0,v=function(e,t,r){if(!1===r)return;const n=so(r)?r:void 0,a=co(t.physics),o=uo(n?.snapshot,a?.snapshot,t.physicsSnapshot,function(e){const t=co(e);return!!t&&(so(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),i=uo(n?.evidence,a?.evidence,t.physicsEvidence,t.settledEvidence),s=uo(n?.config,a?.config,o?.config,t.config),c=uo(co(o?.world),co(a?.world)),l=uo(co(s?.kernel),co(c?.options)),p=yo(c?.bodies),u=yo(c?.colliders,s?.colliders),d=yo(o?.queue,a?.queue),y=yo(o?.liveBodyOrder),m=yo(c?.springs),h=yo(o?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const r=co(e);if(!r)return;const n=lo(r.count??r.value??r.total??r.bodies??r.events);if(null==n)return;const a=(r.label??r.id??r.name??"container "+(t+1))+"",o=null==r.id?void 0:r.id+"",i=lo(r.secondary??r.secondaryCount),s=lo(r.observed??r.observedCount);return mo({id:o,label:a,count:n,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),n=t.filter(e=>e.count>0).length,a=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:r,populatedCount:n,...a?{leader:a}:{}}}(function(e,t,r,n){const a=co(e.settledProjection),o=co(t?.settledProjection);return yo(r?.projectionRows,r?.aggregates,e.settledProjectionRows,e.projectionRows,a?.rows,t?.settledProjectionRows,t?.projectionRows,o?.rows,n?.binCounts)}(t,a,n,i)),b=function(e,t){const r=e?.map((e,t)=>{const r=co(e);if(!r)return;const n=lo(r.count)??0,a=lo(r.total),o={label:(r.label??r.id??"sediment "+(t+1))+"",count:n};return null!=r.id&&(o.id=r.id+""),null!=a&&(o.total=a),o}).filter(e=>null!=e),n=po(t?.bins)??r?.length??0,a=lo(t?.count)??r?.reduce((e,t)=>e+t.count,0)??0,o=lo(t?.total)??r?.reduce((e,t)=>e+(t.total??0),0),i=r?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==n||0!==a||o)return{bins:n,count:a,...null!=o&&o>0?{total:o}:{},...i?{leader:i}:{}}}(yo(n?.sediment,a?.sediment,o?.sediment),uo(n?.sedimentTotals,a?.sedimentTotals)),f=y?.length??p?.length??po(i?.bodyCount),v=function(e){if(e)return e.filter(e=>!0===co(e)?.sleeping).length}(p)??po(i?.sleepingCount),w=d?.length,x="string"==typeof o?.simulationState?o.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=co(l?.gravity),k=lo(C?.x),S=lo(C?.y),P=mo({state:x,settled:A,elapsedSeconds:lo(o?.elapsedSeconds),paused:"boolean"==typeof o?.paused?o.paused:void 0,visible:"boolean"==typeof o?.visible?o.visible:void 0,seed:lo(l?.seed),gravity:null!=k&&null!=S?{x:k,y:S}:void 0,fixedDt:lo(s?.fixedDt??l?.fixedDt),timeScale:lo(s?.timeScale),maxSubsteps:po(s?.maxSubsteps),liveBodies:f,sleepingBodies:v,queued:w,bodyLimit:lo(s?.bodyLimit),eviction:"string"==typeof s?.eviction?s.eviction:void 0}),j=mo({colliders:u?.length,sensors:bo(u,s,c),springs:m?.length,activeSensorPairs:h?.length}),T=Object.keys(j).length>0,R=io.has(e);if(!(Object.keys(P).length>0||T||g||b)||!R&&null==r)return;const N={simulation:P,...T?{geometry:j}:{},...g?{aggregates:g}:{},...b?{sediment:b}:{}},$=function(e){const t=[],r=e.simulation,n=[r.state??(r.settled?"settled":void 0),null!=r.liveBodies?`${r.liveBodies} live ${ho(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 "+go(r.seed):void 0,r.gravity?`gravity (${go(r.gravity.x)}, ${go(r.gravity.y)})`:void 0,null!=r.fixedDt?`fixed step ${go(r.fixedDt)}s`:void 0,null!=r.timeScale?go(r.timeScale)+"x time":void 0].filter(Boolean);n.length>0&&t.push(`Physics simulation: ${n.join("; ")}.`);const a=e.geometry;if(a){const e=[null!=a.colliders?`${a.colliders} ${ho(a.colliders,"collider")}`:void 0,null!=a.sensors?`${a.sensors} ${ho(a.sensors,"sensor")}`:void 0,null!=a.springs?`${a.springs} ${ho(a.springs,"spring")}`:void 0,null!=a.activeSensorPairs?`${a.activeSensorPairs} active sensor ${ho(a.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const o=e.aggregates;if(o){const e=o.leader,r=e?` Largest is ${e.label} with ${go(e.count)}.`:"";t.push(`Physics aggregates: ${go(o.totalCount)} settled ${ho(o.totalCount,"body")} across ${o.rows.length} ${ho(o.rows.length,"container")}; ${o.populatedCount} populated.${r}`)}const i=e.sediment;if(i){const e=null!=i.total?", value total "+go(i.total):"",r=i.leader?`; largest sediment bin is ${i.leader.label} with ${go(i.leader.count)}`:"";t.push(`Physics sediment: ${i.count} retained ${ho(i.count,"body")} in ${i.bins} ${ho(i.bins,"bin")}${e}${r}.`)}return t.join(" ")}(N);return{...N,text:$}}(e,t,r.physics),w=[m.text,g?.sentence,v?.text].filter(Boolean).join(" ");return{component:e,description:m,intent:g,structure:f,physics:v,text:w}}function vo(e,t){return null==e?e:e.length>t?e.slice(0,t-1)+"…":e}function wo(e){const{data:t,onQuery:r,initialAnnotations:n,componentName:a,props:o,includeProfile:i,includeSuggestions:s,suggestionsIntent:c,suggestionsMax:l,focus:p,includeGrounding:u}=e,[d,y]=tn([]),[m,h]=tn([]),[g,b]=tn(!1),[f,v]=tn(null),w=Zr(()=>cn(t??[]),[t]),x=i||s,A=Zr(()=>x?Nn(t??[]):void 0,[x,t]),C=Zr(()=>s&&A?ro(t,{profile:A,intent:c,maxResults:l??5}):void 0,[s,A,t,c,l]),k=Zr(()=>{if(u&&a)return fo(a,{data:t??[],...o??{}},"object"==typeof u?u:void 0)},[u,a,o,t]),S=en(r);S.current=r;const P=en(a);P.current=a;const j=en(o);j.current=o;const T=en(t);T.current=t;const R=en(w);R.current=w;const N=en(A);N.current=A;const $=en(C);$.current=C;const I=en(p);I.current=p;const M=en(k);M.current=k;const B=Jr(async e=>{const t=e.trim();if(!t)return;b(!0),v(null),y(e=>[...e,{role:"user",text:t}]);const r="undefined"!=typeof performance?performance.now():Date.now();z().record({type:"interrogation-asked",component:P.current,query:vo(t,500)});try{const e=await S.current(t,{data:T.current??[],summary:R.current,profile:N.current,suggestions:$.current,componentName:P.current,props:j.current,grounding:M.current,focus:I.current??void 0});y(t=>[...t,{role:"assistant",text:e.answer}]),e.annotations&&h(e.annotations);const n="undefined"!=typeof performance?performance.now():Date.now();z().record({type:"interrogation-answered",component:P.current,answer:vo(e.answer,2e3),annotationCount:e.annotations?.length,latencyMs:Math.max(0,Math.round(n-r))})}catch(e){v(e instanceof Error?e:Error(e+"")),y(e=>[...e,{role:"assistant",text:"Sorry, I couldn't process that query."}]);const t="undefined"!=typeof performance?performance.now():Date.now();z().record({type:"interrogation-answered",component:P.current,error:!0,latencyMs:Math.max(0,Math.round(t-r))})}finally{b(!1)}},[]),E=Jr(({text:e,annotations:t})=>{const r=e.trim();r&&(y(e=>[...e,{role:"assistant",text:r}]),t&&t.length>0&&h(e=>[...e,...t]))},[]),L=Jr(()=>{y([]),h([]),v(null)},[]);return{ask:B,announce:E,history:d,summary:w,annotations:Zr(()=>{const e=n??[];return 0===e.length?m:0===m.length?e:[...e,...m]},[n,m]),loading:g,error:f,reset:L}}import{useMemo as xo}from"react";var Ao=["hover","hover-end","click","click-end","selection","selection-end","brush-end"];function Co(e={}){const{chartId:t,types:r=Ao}=e,{latest:n}=qt({chartId:t,types:r,limit:1});return xo(()=>{if(!n)return null;if("hover-end"===n.type||"selection-end"===n.type||"brush-end"===n.type||"click-end"===n.type)return null;let e;if("selection"===n.type)e=n.selection.fields;else{if("hover"!==n.type&&"click"!==n.type)return null;e=n.datum}return e&&"object"==typeof e?{datum:e,x:n.x,y:n.y,source:n.type}:null},[n])}function ko(e){if("number"==typeof e)return e;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function So(e,t){return"pass"===e?t.passColor??"var(--semiotic-success)":"warn"===e?t.warnColor??"var(--semiotic-warning)":t.failColor??"var(--semiotic-danger)"}function Po(e){if(null==e)return;const t="number"==typeof e?e:Date.parse(e);return Number.isNaN(t)?void 0:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function jo(e){const t=e.label??e.name??e.id;return"number"==typeof e.confidence&&1>e.confidence?`${t} · ${Math.round(100*e.confidence)}%`:t}function To(e){return{author:e.name??e.id,authorKind:"system",source:e.source,basis:e.basis??"rule",confidence:e.confidence,createdAt:e.createdAt,dataVersion:e.dataVersion,stableId:e.id}}function Ro(e,t={}){const r=[],n=[],a=t.valueAxis??"y",o={status:t.status??"proposed",anchor:t.anchor??"semantic",...void 0!==t.ttlHint?{ttlHint:t.ttlHint}:{}};for(const i of e){if("pass"===i.status&&!t.includePassed)continue;const e=So(i.status,t),s=jo(i),c={provenance:To(i),lifecycle:o},l=e=>n.push({result:i,reason:e}),p=e=>r.push(ve(e,c));switch(i.kind){case"range":if("number"!=typeof i.min||"number"!=typeof i.max){l("range check is missing numeric min/max bounds");break}p({type:"band",y0:i.min,y1:i.max,fill:e,fillOpacity:.12,color:e,label:s});break;case"min":case"max":case"threshold":{const t=i.value??("min"===i.kind?i.min:i.max);if("number"!=typeof t){l(i.kind+" check is missing a numeric value");break}p({type:"x"===a?"x-threshold":"y-threshold",value:t,label:s,color:e});break}case"freshness":{const t=void 0!==i.at?ko(i.at):void 0;if(void 0===t){l("freshness check has no parseable timestamp (`at`); render as a chart-level status badge");break}p({type:"x-threshold",value:t,label:s,color:e});break}default:l(`${i.kind} check on "${i.column??"?"}" has no single chart coordinate; surface it as a chart-level status badge or a row-level mark in your UI`)}}return{annotations:r,unplaced:n}}function No(e){switch(e){case"pass":return"pass";case"warn":return"warn";case"fail":return"fail";default:return"error"}}function $o(e){if(!e)return"dbt check";const t=e.split(".");return t[t.length-1]||e}function Io(e,t={}){const r=[],n=e.sources;if(n?.results){const e=n.metadata?.generated_at,t=n.metadata?.invocation_id;for(const a of n.results){const n=No(a.status),o=$o(a.unique_id),i=Po(a.max_loaded_at);r.push({id:a.unique_id??o,name:"dbt freshness: "+o,label:"pass"===n?o+" fresh":`${o} stale${i?" since "+i:""}`,status:n,kind:"freshness",at:a.max_loaded_at,message:`freshness ${n}${a.max_loaded_at?" — last load "+a.max_loaded_at:""}`,source:"dbt",basis:"rule",createdAt:e,dataVersion:t})}}const a=e.runResults;if(a?.results){const e=a.metadata?.generated_at,n=a.metadata?.invocation_id;for(const o of a.results){const a=No(o.status);if("pass"===a&&!t.includePassed)continue;const i=$o(o.unique_id);r.push({id:o.unique_id??i,name:"dbt test · "+i,status:a,kind:"custom",message:o.message??void 0,observedCount:"number"==typeof o.failures?o.failures:void 0,source:"dbt",basis:"rule",createdAt:e,dataVersion:n})}}return Ro(r,t)}function Mo(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}function Bo(e){return e.replace(/^expect_/,"").replace(/column_values_to_be_|column_values_to_|column_|to_be_|to_/g," ").replace(/_/g," ").replace(/\s+/g," ").trim()||e}function Eo(e,t={}){const{createdAt:r,dataVersion:n}=function(e){const t=e?.run_id;return t?"string"==typeof t?{dataVersion:t}:{createdAt:t.run_time,dataVersion:t.run_name??t.run_time}:{}}(e.meta),a=[];for(const[t,o]of(e.results??[]).entries()){const e=o.expectation_config??{},i=e.expectation_type??"unknown_expectation",s=e.kwargs??{},c=s.column,l=o.success?"pass":"fail",p=Mo(s.min_value),u=Mo(s.max_value),d=Mo(s.value),y=Mo(o.result?.observed_value),m=c??"value",h=Bo(i),g=void 0!==y?`${m}: ${y} `:"",b={id:`ge:${i}:${c??t}`,name:`GE ${h}${c?` (${c})`:""}`,status:l,column:c,message:void 0!==y?"observed "+y:void 0,observedCount:o.result?.unexpected_count,source:"great-expectations",basis:"statistical-test",createdAt:r,dataVersion:n},f=/_to_be_between$/.test(i);a.push(f&&void 0!==p&&void 0!==u?{...b,kind:"range",min:p,max:u,label:`${g}(expected ${p}–${u})`}:f&&void 0!==p?{...b,kind:"min",value:p,label:`${g}(min ${p})`}:f&&void 0!==u?{...b,kind:"max",value:u,label:`${g}(max ${u})`}:void 0!==d?{...b,kind:"threshold",value:d,label:`${g}(target ${d})`}:{...b,kind:"custom",label:`${m} ${h}`})}return Ro(a,t)}function Lo(e,t,r={}){const n=r.profile??Nn(t??[],{rawInput:r.rawInput}),a=Ga(e),o=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 n=e.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));n&&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:ro(t,{profile:n,intent:r.intent,maxResults:o,includeVariants:!1}),profile:n};const s=a.fits(n);return null===s?{status:"ok",component:e,profile:n,...i.length?{repairs:i}:{}}:{status:"alternative",component:e,reason:s,alternatives:ro(t,{profile:n,intent:r.intent,maxResults:o,deny:[e],includeVariants:!1}),profile:n,...i.length?{repairs:i}:{}}}var Fo={valid:!1,errors:[]};function Do(e,t={}){const r=e.component,n=e.props??{},a=[],o=!!tr[r];o||a.push(`Unknown component "${r}". It is not in the chart registry — pick a known chart.`);const i=o?nr(r,n):{...Fo};if(!i.valid)for(const e of i.errors)a.push(e);const s=!1!==t.diagnose&&o?Or(r,n).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,u,d,y,m;if((t.repair??!!t.data)&&t.data&&(p=Lo(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(", ")}.`)),o&&(u=de(r,n),d=v(u)),t.render&&o){const e=t.render(r,n);m=e.svg,y=e.evidence,y.empty&&a.push("Rendered to an empty scene (no marks) — the data or accessors produce nothing to draw.");for(const e of y.warnings)a.push(e)}const h=o&&i.valid&&(!l||0===c.length)&&(!p||"ok"===p.status)&&(!y||!y.empty);return{ok:h,component:r,props:n,config:u,jsx:d,validation:i,diagnostics:s,repair:p,evidence:y,svg:m,reasons:h?[]:a}}function _o(e={}){const t=e.components??Object.keys(tr).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 Oo(e){return{name:e.name,description:e.description,input_schema:e.inputSchema}}function zo(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.inputSchema}}}function Ho(e,t=!0){if(!e||"object"!=typeof e||Array.isArray(e))return!1;const r=e,n=Array.isArray(r.type)?r.type:[r.type],a=n.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=>Ho(e,!1)))return!1}if(n.includes("array")&&(!r.items||!Ho(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=>Ho(e,!1)))return!1}return!0}function Go(e,t={}){const r=t.strict??!1;if(r&&!Ho(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 qo(e){return t=>Do(t,e?e(t):{})}var Vo=[{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 Wo(e){if("string"!=typeof e||0===e.trim().length)return null;const t=new Map;for(const r of Vo)for(const n of r.patterns)if(n.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),[n,...a]=r;return{intent:n.intent,confidence:n.confidence,alternates:a}}function Uo(e,t={}){const r=t.audience;if(!r)return[];const n=t.profile??Nn(e??[],{rawInput:t.rawInput}),a=Xa(r),o=t.scoreTolerance??1.5,i=t.maxResults??5,s=Ha(),c=new Map;for(const e of s)c.set(e.component,Ya(e.component,e.rubric.familiarity,r));const l=ro(e,{profile:n,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||o>=p.score-e.score)&&u.push({stretch:e,familiar:p});const d=new Set,y=[];for(const{stretch:e,familiar:t}of u){const n=`${e.component}/${e.variant?.key??"base"}`;if(d.has(n))continue;d.add(n);const a=c.get(e.component)??e.rubric.familiarity,o=r.targets?.[e.component],s=o?.reason??("increase"===o?.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(y.push({suggestion:e,replacing:t?.component,rationale:s,familiarity:a}),y.length>=i)break}return y}function Yo(e,t={}){const r=t.profile??Nn(e??[],{rawInput:t.rawInput}),n=t.maxPanels??6,a=!1!==t.diversifyByFamily,o=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 o){if(i.length>=n){c.push(u);continue}const o=ro(e,{profile:r,intent:u,allow:t.allow,deny:t.deny,maxResults:20,includeVariants:!0,minScore:1.5,audience:t.audience});let d;for(const e of o)if(!(p.has(`${e.component}/${e.variant?.key??"base"}`)||a&&l.has(e.family))){d=e;break}if(!d&&a)for(const e of o)if(!p.has(`${e.component}/${e.variant?.key??"base"}`)){d=e;break}d?(i.push({intent:u,suggestion:d}),s.push(u),l.add(d.family),p.add(`${d.component}/${d.variant?.key??"base"}`)):c.push(u)}return{panels:i,intentsCovered:s,intentsMissing:c,stretchPanels:t.audience&&(t.audience.exposureLevel??1)>0?Uo(e,{profile:r,audience:t.audience,deny:Array.from(p).map(e=>e.split("/")[0]),maxResults:t.maxStretchPanels??Math.min(3,n)}):[],profile:r}}var Xo={name:"Executive",familiarity:{BarChart:5,LineChart:5,PieChart:5,DonutChart:4,GaugeChart:5,AreaChart:4,FunnelChart:4,ChoroplethMap:4,Histogram:3,Heatmap:3,StackedBarChart:3,StackedAreaChart:3,Scatterplot:3,BubbleChart:3,GroupedBarChart:3,DotPlot:3,BoxPlot:2,ViolinPlot:1,SwarmPlot:1,RidgelinePlot:1,MultiAxisLineChart:2,CandlestickChart:2,DifferenceChart:2,QuadrantChart:3,LikertChart:3,SwimlaneChart:2,MinimapChart:2,ConnectedScatterplot:1,SankeyDiagram:2,TreeDiagram:3,Treemap:3,CirclePack:2,OrbitDiagram:1,ChordDiagram:1,ProcessSankey:2,ForceDirectedGraph:1,ProportionalSymbolMap:3,FlowMap:2,DistanceCartogram:1},targets:{PieChart:{direction:"decrease",weight:1,reason:"shifting from share-by-angle toward share-by-length for accuracy"},BarChart:{direction:"increase",weight:1}},exposureLevel:1},Ko={name:"Analyst",familiarity:{BarChart:5,LineChart:5,PieChart:4,DonutChart:4,AreaChart:5,StackedAreaChart:4,StackedBarChart:5,GroupedBarChart:5,Histogram:5,Heatmap:5,Scatterplot:5,BubbleChart:4,BoxPlot:4,DotPlot:4,GaugeChart:3,FunnelChart:4,LikertChart:4,QuadrantChart:4,SwimlaneChart:4,MinimapChart:4,DifferenceChart:3,MultiAxisLineChart:4,CandlestickChart:3,ConnectedScatterplot:3,ViolinPlot:3,SwarmPlot:3,RidgelinePlot:2,TreeDiagram:4,Treemap:4,CirclePack:3,SankeyDiagram:4,ProcessSankey:3,ChordDiagram:3,OrbitDiagram:2,ForceDirectedGraph:3,ChoroplethMap:4,ProportionalSymbolMap:4,FlowMap:3,DistanceCartogram:2},targets:{PieChart:{direction:"decrease",weight:1},BoxPlot:{direction:"increase",weight:1,reason:"team is shifting from averages to distribution-aware comparisons"}},exposureLevel:1},Qo={name:"Data scientist",familiarity:{BarChart:5,LineChart:5,PieChart:3,DonutChart:3,AreaChart:5,StackedAreaChart:5,StackedBarChart:5,GroupedBarChart:5,Histogram:5,Heatmap:5,Scatterplot:5,BubbleChart:5,BoxPlot:5,ViolinPlot:5,SwarmPlot:4,RidgelinePlot:4,DotPlot:4,QuadrantChart:4,LikertChart:4,DifferenceChart:4,MultiAxisLineChart:4,ConnectedScatterplot:4,GaugeChart:2,FunnelChart:3,SwimlaneChart:3,MinimapChart:4,CandlestickChart:3,TreeDiagram:4,Treemap:4,CirclePack:4,SankeyDiagram:4,ProcessSankey:3,ChordDiagram:3,OrbitDiagram:2,ForceDirectedGraph:4,ChoroplethMap:4,ProportionalSymbolMap:4,FlowMap:3,DistanceCartogram:3},targets:{PieChart:{direction:"decrease",weight:2,reason:"preferring length-encoded comparisons for precision"},BarChart:{direction:"decrease",weight:1,reason:"promoting distribution-aware charts over single-value bars when raw observations are available"},BoxPlot:{direction:"increase",weight:1},ViolinPlot:{direction:"increase",weight:1}},exposureLevel:2},Jo={executive:Xo,analyst:Ko,"data-scientist":Qo},Zo=[{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,n=e.fields.find(e=>"category"===e.role||"categorical"===e.kind)?.name;return{timeAccessor:t,valueAccessor:r,categoryAccessor:n}}},{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,n=e.fields.find(e=>"category"===e.role||"categorical"===e.kind&&"series"!==e.role)?.name;return{timeAccessor:t,valueAccessor:r,...n?{categoryAccessor:n}:{}}}},{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}}}],ei=new Map;function ti(e){ei.set(e.component,e)}function ri(e){ei.delete(e)}function ni(){if(0===ei.size)return Zo;const e=new Map;for(const t of Zo)e.set(t.component,t);for(const[t,r]of ei)e.set(t,r);return Array.from(e.values())}function ai(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 oi(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 n of t)r+=e[n]??0;return r/t.length}function ii(e,t,r){const n=[],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)n.push(`Strong fit for ${e} (${t}/5)`);return e.throughput&&n.push(`tuned for ${e.throughput} throughput`),n}function si(e,t={}){const r=t.capabilities??ni(),n=t.intent?Array.isArray(t.intent)?t.intent:[t.intent]:[],a=t.minScore??0,o=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[n,a]of Object.entries(t.intentScores))r[n]=ai(a,e);const o=oi(r,n);if(a>o)continue;const l={...t.rubric},p=t.caveats?Array.from(t.caveats(e)):[],u=ii(e,r,n),d=t.buildProps(e);c.push({component:t.component,family:"realtime",importPath:t.importPath,score:o,intentScores:r,rubric:l,reasons:u,caveats:p,props:d})}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,o)}var ci=["x","y","size","category","series","time"];function li(e,t){const r=e.fields[t];return r?"numeric"===r.type?"numeric":"categorical"===r.type?"categorical":"date"===r.type?"date":"unknown":"unknown"}function pi(e){const t=new Set;for(const r of Ha())null===r.fits(e)&&t.add(r.component);return t}function ui(e,t){const r=new Set(Object.keys(e.fields)),n=new Set(Object.keys(t.fields)),a=[],o=[];for(const e of n)r.has(e)||a.push(e);for(const e of r)n.has(e)||o.push(e);a.sort(),o.sort();const i=[];for(const a of n){if(!r.has(a))continue;const n=li(e,a),o=li(t,a);n!==o&&i.push({field:a,from:n,to:o})}i.sort((e,t)=>e.field.localeCompare(t.field));const s=[];for(const r of ci){const n=e.primary[r],a=t.primary[r];n!==a&&s.push({role:r,from:n,to:a})}const c=pi(e),l=pi(t),p=Array.from(c).filter(e=>!l.has(e)).sort(),u=Array.from(l).filter(e=>!c.has(e)).sort();return{rowCountChange:t.rowCount-e.rowCount,added:a,removed:o,typeChanges:i,primaryChanges:s,becameUnfit:p,becameFit:u,unchanged:0===a.length&&0===o.length&&0===i.length&&0===s.length&&0===p.length&&0===u.length&&e.rowCount===t.rowCount}}function di(e,t=Ha()){const r=new Map;for(const e of t)r.set(e.component,{component:e.component,family:e.family,fitsOn:0,rejectedOn:0,inTopThreeOn:0,topPickOn:0,expertAgreementCount:0,averageScore:0,caveatCoverage:0,variantUtilization:0});const n=new Map,a=new Map,o=new Map,i=new Map,s=[];for(const c of e){let e,l;try{e=Nn(c.data,{rawInput:c.rawInput}),l=no(c.data,{profile:e,intent:c.intent,capabilities:t,maxResults:40})}catch{const e=!!c.expected&&c.expected.length>0;s.push({fixture:c.name,shape:c.shape,intent:c.intent,expected:c.expected,topPick:void 0,topThree:[],fittingCount:0,rejectedCount:0,expertAgreement:!e&&null,topPickAgreement:!e&&null,noFitHonored:null});continue}const p=[],u=new Set;for(const e of l.fitting)if(!u.has(e.component)&&(u.add(e.component),p.push({component:e.component,variantKey:e.variant?.key,score:e.score}),3===p.length))break;const d=c.expected&&c.expected.length>0?p.some(e=>c.expected.includes(e.component)):null,y=c.expected&&c.expected.length>0?p.length>0&&c.expected.includes(p[0].component):null;s.push({fixture:c.name,shape:c.shape,intent:c.intent,expected:c.expected,topPick:p[0],topThree:p,fittingCount:l.fitting.length,rejectedCount:l.rejected.length,expertAgreement:d,topPickAgreement:y,noFitHonored:!0===c.expectsNoFit?0===l.fitting.length:null});for(const e of l.fitting){const t=r.get(e.component);t&&(t.fitsOn+=1,n.set(e.component,(n.get(e.component)??0)+e.score),a.set(e.component,(a.get(e.component)??0)+1),e.caveats.length>0&&o.set(e.component,(o.get(e.component)??0)+1),e.variant&&i.set(e.component,(i.get(e.component)??0)+1))}for(const e of l.rejected){const t=r.get(e.component);t&&(t.rejectedOn+=1)}for(const e of p){const t=r.get(e.component);t&&(t.inTopThreeOn+=1)}if(p[0]){const e=r.get(p[0].component);e&&(e.topPickOn+=1)}if(c.expected&&d)for(const e of p)if(c.expected.includes(e.component)){const t=r.get(e.component);t&&(t.expertAgreementCount+=1)}}for(const e of r.values()){const t=a.get(e.component)??0;e.averageScore=0===t?0:(n.get(e.component)??0)/t,e.caveatCoverage=0===t?0:(o.get(e.component)??0)/t,e.variantUtilization=0===t?0:(i.get(e.component)??0)/t}const c=Array.from(r.values()).sort((e,t)=>{const r=e.expertAgreementCount-t.expertAgreementCount;return 0!==r?r:t.fitsOn-e.fitsOn}),l=s.filter(e=>null!==e.expertAgreement),p=0===l.length?0:l.filter(e=>!0===e.expertAgreement).length/l.length,u=0===l.length?0:l.filter(e=>!0===e.topPickAgreement).length/l.length,d=Array.from(a.values()).reduce((e,t)=>e+t,0),y=Array.from(o.values()).reduce((e,t)=>e+t,0),m=Array.from(i.values()).reduce((e,t)=>e+t,0);return{perCapability:c,perFixture:s,summary:{fixtureCount:e.length,capabilityCount:t.length,expertAgreementRate:p,top1AgreementRate:u,overallCaveatCoverage:0===d?0:y/d,overallVariantUtilization:0===d?0:m/d}}}var yi=(()=>{const e=Array.from({length:12},(e,t)=>t+1);return["EU","NA","APAC"].flatMap((t,r)=>e.map(e=>({month:e,revenue:800+e*(200+40*r)+150*Math.sin(e),region:t})))})(),mi=Array.from({length:12},(e,t)=>({month:t+1,revenue:1e3+150*t+100*Math.sin(t/2)})),hi=[{product:"Widget",units:480},{product:"Gadget",units:620},{product:"Sprocket",units:290},{product:"Whatsit",units:740},{product:"Doohickey",units:410}],gi=Array.from({length:150},(e,t)=>({respondent_id:t+1,satisfaction:Math.max(1,Math.min(10,6+2*Math.sin(t/7)+3*Math.random()-1)),cohort:["Beta","GA","Enterprise"][t%3]})),bi=Array.from({length:80},(e,t)=>{const r=Math.max(0,40*Math.random());return{student_id:"s"+(t+1),hours:r,grade:Math.min(100,1.8*r+30+20*(Math.random()-.5))}}),fi=Array.from({length:50},(e,t)=>({observation:50+12*Math.sin(t/4)+6*Math.random()})),vi=[{product:"Widget",region:"EU",units:480},{product:"Widget",region:"NA",units:620},{product:"Widget",region:"APAC",units:290},{product:"Gadget",region:"EU",units:320},{product:"Gadget",region:"NA",units:740},{product:"Gadget",region:"APAC",units:410},{product:"Sprocket",region:"EU",units:200},{product:"Sprocket",region:"NA",units:380},{product:"Sprocket",region:"APAC",units:150},{product:"Whatsit",region:"EU",units:290},{product:"Whatsit",region:"NA",units:550},{product:"Whatsit",region:"APAC",units:180}],wi=[{name:"monthly revenue with regions, intent=trend",shape:"12 months × 3 regions, numeric month, numeric revenue",data:yi,intent:"trend",expected:["LineChart","AreaChart","MinimapChart"]},{name:"monthly revenue with regions, intent=compare-series",shape:"12 months × 3 regions",data:yi,intent:"compare-series",expected:["LineChart","GroupedBarChart"]},{name:"monthly revenue with regions, intent=composition-over-time",shape:"12 months × 3 regions, additive",data:yi,intent:"composition-over-time",expected:["StackedAreaChart","StackedBarChart"]},{name:"monthly revenue single series, intent=trend",shape:"12 months, no series",data:mi,intent:"trend",expected:["LineChart","AreaChart"]},{name:"product sales, intent=rank",shape:"5 products, single numeric measure",data:hi,intent:"rank",expected:["BarChart","DotPlot"]},{name:"product sales, intent=part-to-whole",shape:"5 products, single numeric measure",data:hi,intent:"part-to-whole",expected:["PieChart","DonutChart","BarChart"]},{name:"satisfaction scores, intent=distribution",shape:"150 numeric observations across 3 cohorts",data:gi,intent:"distribution",expected:["Histogram","BoxPlot","ViolinPlot"]},{name:"satisfaction scores, intent=compare-categories",shape:"150 obs × 3 cohorts",data:gi,intent:"compare-categories",expected:["BoxPlot","ViolinPlot","SwarmPlot"]},{name:"hours vs grade, intent=correlation",shape:"80 students, hours + grade",data:bi,intent:"correlation",expected:["Scatterplot"]},{name:"hours vs grade, intent=outlier-detection",shape:"80 students",data:bi,intent:"outlier-detection",expected:["Scatterplot"]},{name:"conversion funnel, intent=flow",shape:"4 stages, descending values",data:[{stage:"Visit",users:1e4},{stage:"Signup",users:2400},{stage:"Trial",users:1100},{stage:"Paid",users:380}],intent:"flow",expected:["FunnelChart"]},{name:"org chart, intent=hierarchy",shape:"3-deep org tree",data:[],rawInput:{name:"Acme",children:[{name:"Engineering",children:[{name:"Platform",value:18},{name:"Product",value:22}]},{name:"Sales",children:[{name:"EMEA",value:12},{name:"AMER",value:26}]},{name:"Ops",value:9}]},intent:"hierarchy",expected:["TreeDiagram","Treemap","CirclePack"]},{name:"approval workflow transitions, intent=flow",shape:"5 nodes / 4 weighted edges",data:[],rawInput:{nodes:[{id:"draft"},{id:"review"},{id:"approved"},{id:"shipped"},{id:"rejected"}],edges:[{source:"draft",target:"review",value:100},{source:"review",target:"approved",value:60},{source:"review",target:"rejected",value:40},{source:"approved",target:"shipped",value:58}]},intent:"flow",expected:["SankeyDiagram","ChordDiagram"]},{name:"US states with values, intent=geo",shape:"3 polygon features with numeric values",data:[],rawInput:{type:"FeatureCollection",features:[{type:"Feature",id:"CA",properties:{name:"California",value:39},geometry:{type:"Polygon",coordinates:[[[-124,32],[-114,32],[-114,42],[-124,42],[-124,32]]]}},{type:"Feature",id:"TX",properties:{name:"Texas",value:29},geometry:{type:"Polygon",coordinates:[[[-106,26],[-93,26],[-93,36],[-106,36],[-106,26]]]}},{type:"Feature",id:"NY",properties:{name:"New York",value:19},geometry:{type:"Polygon",coordinates:[[[-79,40],[-72,40],[-72,45],[-79,45],[-79,40]]]}}]},intent:"geo",expected:["ChoroplethMap","ProportionalSymbolMap"]},{name:"country economies, intent=correlation",shape:"10 countries × 3 numeric measures (gdp, hours, population)",data:[{country:"USA",gdp_per_capita:70,hours_worked:1700,population_size:330},{country:"UK",gdp_per_capita:48,hours_worked:1500,population_size:67},{country:"Germany",gdp_per_capita:53,hours_worked:1330,population_size:84},{country:"Japan",gdp_per_capita:40,hours_worked:1600,population_size:125},{country:"France",gdp_per_capita:45,hours_worked:1480,population_size:67},{country:"Italy",gdp_per_capita:38,hours_worked:1700,population_size:60},{country:"Spain",gdp_per_capita:32,hours_worked:1640,population_size:47},{country:"Canada",gdp_per_capita:52,hours_worked:1690,population_size:38},{country:"Australia",gdp_per_capita:56,hours_worked:1700,population_size:26},{country:"South Korea",gdp_per_capita:35,hours_worked:1900,population_size:52}],intent:"correlation",expected:["Scatterplot","BubbleChart"]},{name:"website metrics with 3 measures, intent=compare-series",shape:"24 months × 3 numeric measures with different ranges",data:Array.from({length:24},(e,t)=>({month:t+1,page_views:Math.round(5e4+1200*t+8e3*Math.sin(t/3)),conversion_rate:2.5+.8*Math.sin(t/4)+.05*t,avg_session_seconds:Math.round(120+2*t+15*Math.cos(t/5))})),intent:"compare-series",expected:["MultiAxisLineChart","LineChart"]},{name:"sales by region and product, intent=compare-series",shape:"12 rows = 4 products × 3 regions",data:vi,intent:"compare-series",expected:["GroupedBarChart","StackedBarChart"]},{name:"sales by region and product, intent=part-to-whole",shape:"12 rows = 4 products × 3 regions",data:vi,intent:"part-to-whole",expected:["StackedBarChart","PieChart"]},{name:"revenue vs expenses, intent=compare-series",shape:"48 rows = 24 months × 2 series",data:[...Array.from({length:24},(e,t)=>({month:t+1,amount:100+8*t+25*Math.sin(t/3),series:"revenue"})),...Array.from({length:24},(e,t)=>({month:t+1,amount:80+6*t+15*Math.cos(t/4),series:"expenses"}))],intent:"compare-series",expected:["DifferenceChart","LineChart","GroupedBarChart"]},{name:"stock OHLC prices, intent=change-detection",shape:"30 days × open/high/low/close",data:Array.from({length:30},(e,t)=>{const r=100+1.2*t+8*Math.sin(t/4),n=r+4*(Math.random()-.5),a=r+4*(Math.random()-.5);return{day:t+1,open:n,high:Math.max(n,a)+3*Math.random(),low:Math.min(n,a)-3*Math.random(),close:a}}),intent:"change-detection",expected:["CandlestickChart","LineChart"]},{name:"unemployment vs inflation by year, intent=correlation",shape:"20 years × 2 measures, ordered by year",data:Array.from({length:20},(e,t)=>({year:2005+t,unemployment:5+2*Math.sin(t/2)+(t>4&&10>t?3:0),inflation:2+1.5*Math.cos(t/3)})),intent:"correlation",expected:["ConnectedScatterplot","Scatterplot"]},{name:"transition events, intent=flow",shape:"11 stage transitions across 3 deals with startTime + value",data:[{case:"deal-001",stage:"Inbound Lead",nextStage:"Qualified",startTime:"2024-04-01T09:00:00",value:18},{case:"deal-001",stage:"Qualified",nextStage:"Discovery",startTime:"2024-04-01T13:00:00",value:16},{case:"deal-001",stage:"Discovery",nextStage:"Proposal",startTime:"2024-04-02T11:00:00",value:14},{case:"deal-001",stage:"Proposal",nextStage:"Closed Won",startTime:"2024-04-04T09:00:00",value:12},{case:"deal-002",stage:"Inbound Lead",nextStage:"Qualified",startTime:"2024-04-01T10:00:00",value:10},{case:"deal-002",stage:"Qualified",nextStage:"Discovery",startTime:"2024-04-02T09:00:00",value:9},{case:"deal-002",stage:"Discovery",nextStage:"Proposal",startTime:"2024-04-03T09:00:00",value:7},{case:"deal-002",stage:"Proposal",nextStage:"Closed Lost",startTime:"2024-04-04T11:00:00",value:5},{case:"deal-003",stage:"Signup",nextStage:"Activated",startTime:"2024-04-01T08:30:00",value:28},{case:"deal-003",stage:"Activated",nextStage:"Trial",startTime:"2024-04-01T10:00:00",value:24},{case:"deal-003",stage:"Trial",nextStage:"Subscribed",startTime:"2024-04-02T10:00:00",value:18}],intent:"flow",expected:["SankeyDiagram","ProcessSankey","ChordDiagram"]},{name:"incidents by service and weekday, intent=compare-categories",shape:"56 cells = 8 services × 7 weekdays, numeric incident count",data:(()=>{const e=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];return["auth","billing","search","ingest","notify","reports","exports","webhooks"].flatMap((t,r)=>e.map((e,n)=>({service:t,day:e,incidents:Math.round(2+9*Math.abs(Math.sin(1.7*r+n))+(5>n?1.5:-1.5))})))})(),intent:"compare-categories",expected:["Heatmap","GroupedBarChart"]},{name:"capacity utilization single value, intent=part-to-whole",shape:"1 row, one numeric value against an implicit 0–100 plan",data:[{metric:"Cluster capacity used",value:78}],intent:"part-to-whole",expected:["GaugeChart","BigNumber"]},{name:"shipping flows between cities, intent=flow",shape:"6 lat/lon nodes, 6 weighted flows, 1 outline feature",data:[],rawInput:{type:"FeatureCollection",features:[{type:"Feature",id:"outline",properties:{name:"Region"},geometry:{type:"Polygon",coordinates:[[[-125,24],[-66,24],[-66,50],[-125,50],[-125,24]]]}}],points:[{id:"SEA",lon:-122.3,lat:47.6},{id:"SFO",lon:-122.4,lat:37.8},{id:"DEN",lon:-104.9,lat:39.7},{id:"ORD",lon:-87.6,lat:41.9},{id:"ATL",lon:-84.4,lat:33.7},{id:"JFK",lon:-73.8,lat:40.6}],flows:[{source:"SEA",target:"ORD",value:320},{source:"SFO",target:"JFK",value:540},{source:"SFO",target:"ATL",value:210},{source:"DEN",target:"ORD",value:180},{source:"ORD",target:"JFK",value:460},{source:"ATL",target:"JFK",value:250}]},intent:"flow",expected:["FlowMap"]},{name:"travel times from HQ, intent=geo",shape:"6 lat/lon points with a cost field measured from a center",data:[],rawInput:{type:"FeatureCollection",features:[{type:"Feature",id:"outline",properties:{name:"Region"},geometry:{type:"Polygon",coordinates:[[[-125,24],[-66,24],[-66,50],[-125,50],[-125,24]]]}}],points:[{id:"HQ",lon:-122.4,lat:37.8,cost:0},{id:"Seattle",lon:-122.3,lat:47.6,cost:95},{id:"Denver",lon:-104.9,lat:39.7,cost:150},{id:"Chicago",lon:-87.6,lat:41.9,cost:245},{id:"Atlanta",lon:-84.4,lat:33.7,cost:280},{id:"New York",lon:-73.8,lat:40.6,cost:330}]},intent:"geo",expected:["DistanceCartogram","ProportionalSymbolMap"]},{name:"flat single column",shape:"50 rows, one numeric column",data:fi,expected:["Histogram"]},{name:"sparse 3-row data, intent=rank",shape:"3 rows total",data:[{name:"A",value:12},{name:"B",value:34},{name:"C",value:8}],intent:"rank",expected:["BarChart","DotPlot"]}];import{useEffect as xi,useMemo as Ai,useRef as Ci,useSyncExternalStore as ki}from"react";var Si=e=>pe(e),Pi=()=>z().enabled,ji=()=>!1;function Ti(e,t={}){const{intent:r,allow:n,deny:a,maxResults:o,includeVariants:i,minScore:s,rawInput:c,seriesField:l,capabilities:p,audience:u,profile:d}=t,y=Ai(()=>d??Nn(e??[],{rawInput:c,seriesField:l}),[d,e,c,l]),m=Ai(()=>ro(e,{intent:r,allow:n,deny:a,maxResults:o,includeVariants:i,minScore:s,capabilities:p,audience:u,profile:y}),[e,r,n,a,o,i,s,p,u,y]),h=ki(Si,Pi,ji),g=Ci(null);return xi(()=>{if(0===m.length)return void(g.current=null);if(!h)return void(g.current=null);const e=z(),t=u?.name??(u?"custom":void 0),n=`${r??""}|${t??""}|${m.map(e=>e.component).join(",")}`;if(n===g.current)return;const a=e.getEvents();for(let e=a.length-1;e>=0;e--){const t=a[e];if("suggestion-shown"===t.type){if(`${Array.isArray(t.intent)?t.intent.join(","):t.intent??""}|${t.audience??""}|${t.components.join(",")}`===n)return void(g.current=n);break}}g.current=n,e.record({type:"suggestion-shown",intent:r,components:m.map(e=>e.component),topScore:m[0]?.score,audience:t})},[m,r,u,h]),{suggestions:m,profile:y}}import*as Ri from"react";function Ni(t){const r=ie(t.recipe)??(t.recipeId?O(t.recipeId):void 0);if(!r)throw Error(`Unknown chart recipe "${t.recipeId??"(missing recipeId)"}". Register it before rendering.`);const n=function(e){return"function"==typeof e.layout?e.layout:U(e.layout)?H(e.layout.id):void 0}(r);if(!n){const e=U(r.layout)?r.layout.id:r.id;throw Error(`No runtime layout registered for chart recipe "${r.id}" (${e}).`)}const a="semiotic-chart-recipe semiotic-chart-recipe-"+r.id.replace(/[^a-zA-Z0-9_-]+/g,"-"),o={...t,chartId:t.chartId??r.id,className:t.className?`${a} ${t.className}`:a,recipeId:r.id,recipe:r,layout:n},i="XYFrame"===r.frameFamily||"XYCustomChart"===r.frameFamily?_e:"OrdinalFrame"===r.frameFamily||"OrdinalCustomChart"===r.frameFamily?Xe:"NetworkFrame"===r.frameFamily||"NetworkCustomChart"===r.frameFamily?ot:"GeoFrame"===r.frameFamily||"GeoCustomChart"===r.frameFamily?e:void 0;if(!i)throw Error(`Chart recipe "${r.id}" uses unsupported frame family "${r.frameFamily}".`);return Ri.createElement(i,o)}function $i(e){const t=e.pointId??e.id??e._transitionKey;return null==t||""===t?void 0:t+""}function Ii(e){return e.accessibility?.tableFields??e.accessibleDatum??e.datum??null}function Mi(e){return"number"==typeof e&&Number.isFinite(e)}function Bi(e){if(Mi(e.x)&&Mi(e.y)&&Mi(e.w)&&Mi(e.h))return{x0:e.x,y0:e.y,x1:e.x+e.w,y1:e.y+e.h};if(Mi(e.x)&&Mi(e.y)&&Mi(e.r))return{x0:e.x-e.r,y0:e.y-e.r,x1:e.x+e.r,y1:e.y+e.r};if(Mi(e.cx)&&Mi(e.cy)&&Mi(e.r))return{x0:e.cx-e.r,y0:e.cy-e.r,x1:e.cx+e.r,y1:e.cy+e.r};if(Mi(e.cx)&&Mi(e.cy)&&Mi(e.outerR))return{x0:e.cx-e.outerR,y0:e.cy-e.outerR,x1:e.cx+e.outerR,y1:e.cy+e.outerR};const t=[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat().filter(e=>Array.isArray(e)&&Mi(e[0])&&Mi(e[1]));return t.length>0?{x0:Math.min(...t.map(e=>e[0])),y0:Math.min(...t.map(e=>e[1])),x1:Math.max(...t.map(e=>e[0])),y1:Math.max(...t.map(e=>e[1]))}:null}function Ei(e,t){const r=Math.max(0,Math.min(e.x1,t.x1)-Math.max(e.x0,t.x0))*Math.max(0,Math.min(e.y1,t.y1)-Math.max(e.y0,t.y0)),n=Math.min(Math.max(0,e.x1-e.x0)*Math.max(0,e.y1-e.y0),Math.max(0,t.x1-t.x0)*Math.max(0,t.y1-t.y0));return n>0?r/n:0}function Li(e,t,r,n,a){if(e===t)return!0;const o=r.dataRoles.map(e=>M(e,n,a)).filter(e=>!!e).filter(r=>null!=e[r]&&null!=t[r]);return o.length>0&&o.every(r=>e[r]+""==t[r]+"")}function Fi(e,t,r,n,a,o="warn",i){return{id:e,category:t,status:r?"pass":o,message:r?n:a,...i?{evidence:i}:{}}}function Di(e){const{recipe:t}=e,r=function(e){return Array.isArray(e)?e:e&&"object"==typeof e?[...e.nodes??e.sceneNodes??[],...e.sceneEdges??[]]:[]}(e.scene),n=e.layoutConfig??Q({layoutConfig:e.layoutConfig}),a=e.dimensions.plot??{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},o=a.x??0,i=a.y??0,s=[],c=r.filter(e=>null!=Ii(e)),l=r.filter(e=>!("string"!=typeof e.pathD||!/NaN|Infinity|undefined/.test(e.pathD))||function(e){return[...[e.x,e.y,e.w,e.h,e.r,e.cx,e.cy,e.innerR,e.outerR,e.x1,e.x2,e.y1,e.y2,e.openY,e.closeY,e.highY,e.lowY,e.bodyWidth].filter(e=>void 0!==e),...[e.path,e.topPath,e.bottomPath].filter(Array.isArray).flat(2)]}(e).some(e=>"number"!=typeof e||!Number.isFinite(e)));s.push(Fi("geometry.finite","geometry",0===l.length,"All emitted geometry is finite.",l.length+" marks contain non-finite geometry.","fail",{count:l.length}));const p=r.map(Bi),u=p.filter(e=>e&&(e.x0>=e.x1||e.y0>=e.y1)).length;s.push(Fi("geometry.nonzero-area","geometry",0===u,"All bounded marks have positive area.",u+" marks have zero or negative area.","warn",{count:u}));const d=p.filter(e=>e&&(o>e.x0||i>e.y0||e.x1>o+a.width||e.y1>i+a.height)).length;s.push(Fi("geometry.bounds","geometry",0===d,"All bounded marks stay inside the plot.",d+" marks extend outside the plot bounds.","warn",{count:d}));const y=t.audit?.minimumHitTargetSize??t.accessibility.minimumHitTarget??24,m=p.filter(e=>!!e&&(y>e.x1-e.x0||y>e.y1-e.y0)).length;s.push(Fi("interaction.target-size","interaction",0===m,`All bounded targets meet the declared ${y}px minimum.`,`${m} targets are smaller than ${y}px in at least one dimension.`,"warn",{count:m,minimumTarget:y}));const h=c.map($i),g=h.filter(e=>!e).length,b=new Set,f=h.filter(e=>!(!e||!b.has(e)&&(b.add(e),1)));s.push(Fi("identity.stable-ids","identity",0===g,"Every data-bearing mark exposes a stable id.",g+" data-bearing marks have no pointId, id, or transition key.",t.audit?.requireStableIds?"fail":"warn",{missing:g})),s.push(Fi("identity.unique-ids","identity",0===f.length,"Stable mark ids are unique.",f.length+" duplicate stable ids were observed.","fail",{duplicates:[...new Set(f)].slice(0,10)}));const v=h.filter(e=>e&&/^(datum|mark|node|point|rect)-?\d+$/.test(e)).length;v>0&&s.push({id:"identity.index-pattern",category:"identity",status:"warn",message:v+" ids look index-derived and may change when data is reordered.",remediation:"Derive ids from a declared identifier role or stable domain key."});const w=new Set;let x=0;const A=e.inputData;for(const e of c){const r=Ii(e),a=Array.isArray(r)?r:[r];let o=!1;for(const e of a)if(e&&"object"==typeof e)for(let r=0;A.length>r;r+=1)Li(e,A[r],t,n,A)&&(w.add(r),o=!0);o||(x+=1)}const C=Math.max(0,A.length-w.size);s.push(Fi("coverage.input-data","coverage",0===C,"Every input datum is represented by the observed scene.",C+" input data items have no matching scene mark.",t.audit?.requireDatumCoverage?"fail":"warn",{represented:w.size,input:A.length})),s.push(Fi("coverage.scene-data","coverage",0===x,"Every data-bearing scene mark maps back to input data.",x+" scene marks do not map back to an input datum.","warn",{count:x}));const k=t.encodings?.some(e=>"count"===e.channel);!k&&c.length>w.size&&w.size>0&&s.push({id:"coverage.duplicate-references",category:"coverage",status:"warn",message:"Input data is referenced by multiple marks, but multiplicity is not declared as an encoding.",remediation:"Declare count/repetition semantics or preserve a one-to-one datum-to-mark mapping."});const S=c.filter(e=>!1===e.interactive).length;s.push(Fi("interaction.hit-targets","interaction",0===S&&c.length>0,"Every observed data-bearing scene node participates in hit testing.",0===c.length?"No data-bearing scene nodes were emitted for interaction.":S+" data-bearing marks explicitly disable interaction.","fail"));const P=(e.annotations??[]).map(e=>e.pointId).filter(e=>null!=e).map(String),j=P.filter(e=>!b.has(e));s.push(Fi("coverage.annotation-anchors","coverage",0===j.length,P.length?"All pointId annotation anchors resolve to observed scene nodes.":"No pointId annotations require scene resolution.",j.length+" annotations point to missing scene ids.","fail",{unresolved:j}));const T=(e.chart?.selectedIds??[]).filter(e=>!b.has(e));e.chart?.selectedIds&&s.push(Fi("interaction.selection-reachability","interaction",0===T.length,"Selected/highlighted states resolve to observed marks.",T.length+" selected ids are not reachable in the scene.","fail",{missing:T}));const R=Dt(r),N=(t.accessibility.tableFields??t.accessibility.tableRoles?.map(e=>({role:e,label:e}))??[]).map(e=>{if(e.field)return e.field;const r=e.role?t.dataRoles.find(t=>t.role===e.role):void 0;return r?M(r,n,A):void 0}).filter(e=>!!e),$=new Set(R.flatMap(e=>Object.keys(e.values))),I=N.filter(e=>!$.has(e));s.push(Fi("accessibility.table-fields","accessibility",0===I.length,N.length?"The accessible table preserves all recipe-declared fields.":"The recipe declares no explicit accessible table field projection.",`The accessible table loses declared fields: ${I.join(", ")}.`,"fail",{expectedFields:N,observedFields:[...$]})),new Set(A.flatMap(e=>Object.entries(e).filter(([,e])=>["string","number","boolean"].includes(typeof e)).map(([e])=>e))).size>2&&2>=$.size&&[...$].every(e=>"category"===e||"value"===e)&&s.push({id:"accessibility.generic-table-loss",category:"accessibility",status:"warn",message:"The table exposes only generic category/value fields although richer input data exists.",remediation:"Emit accessibleDatum or accessibility.tableFields on scene nodes."});const B=(t.encodings?.filter(e=>"color"===e.channel)??[]).filter(e=>!e.redundantWith||0===e.redundantWith.length);s.push(Fi("accessibility.color-only","accessibility",0===B.length,"Every declared color encoding names a redundant cue.",B.length+" color encodings have no declared redundant cue.","warn"));const E=e.chart;if(E){for(const[e,r]of[["title",t.accessibility.requiresTitle],["summary",t.accessibility.requiresSummary],["description","required"===t.accessibility.description]])r&&s.push(Fi("accessibility."+e,"accessibility","string"==typeof E[e]&&E[e].trim().length>0,`A chart ${e} is present.`,`The recipe requires a chart ${e}, but none was supplied.`,"fail"));(t.accessibility.requiresAccessibleTable||"required"===t.accessibility.accessibleTable||t.accessibility.fallbackTable)&&s.push(Fi("accessibility.fallback-table","accessibility",!1!==E.accessibleTable,"The accessible fallback table is enabled.","The recipe requires a fallback table, but accessibleTable is disabled.","fail")),E.navigationTree&&s.push(Fi("accessibility.navigation-depth","accessibility",(E.navigationTree.children?.length??0)>0,"The navigation tree exposes structure below the root.","The navigation tree is root-only.","fail"))}const L=e.theme?.background??"#ffffff",F=r.filter(e=>{const t=e.style?.fill??e.fill;if("string"!=typeof t||!t.startsWith("#")||!L.startsWith("#"))return!1;const r=ur(t,L);return null!=r&&3>r}).length;s.push(Fi("visual.contrast","visual",0===F,"All statically checkable mark fills meet 3:1 contrast.",F+" marks have fill contrast below 3:1.","warn",{background:L}));let D=0;const _=p.filter(e=>!!e).slice(0,500);for(let e=0;_.length>e;e+=1)for(let t=e+1;_.length>t;t+=1).8>Ei(_[e],_[t])||(D+=1);D>_.length&&s.push({id:"visual.overlap-density",category:"visual",status:"warn",message:D+" near-total mark overlaps suggest occlusion or excessive density.",remediation:"Aggregate, jitter, layer explicitly, or declare overlap as intentional."});const O=[["manual-at.screen-reader","Verify real screen-reader behavior with the target browser/AT combinations."],["manual-at.cognitive-load","Assess cognitive load and whether the custom metaphor is understood."],["manual-at.keyboard-order","Verify that keyboard order is meaningful, not merely mechanically available."],["manual-at.animation","Verify that animation is not distracting and reduced-motion behavior is sufficient."],["manual-at.reception","Test whether the memorable form is received as intended by the target audience."],["manual-at.overlay-occlusion","Inspect labels, overlays, annotations, and important marks for clipping or occlusion."],["manual-at.observation","Exercise hover, focus, selection, and observation emission in the rendered chart."]].map(([e,t])=>({id:e,category:"manual-at",status:"manual",message:t})),z={dataRoles:t.dataRoles.map(e=>e.role),intents:t.intents.map(J).filter(e=>!!e),accessibilityExpectations:[...t.accessibility.requirements??[],...t.accessibility.tableFields?.map(e=>"table field: "+e.label)??[]],fallbackDeclared:!0===t.accessibility.fallbackTable||"required"===t.accessibility.accessibleTable||!0===t.accessibility.requiresAccessibleTable,designContractDeclared:!!t.designContract?.whyCustom},H=[...s,...O],G=s.filter(e=>"fail"===e.status).length;return{recipeId:t.id,ok:0===G,summary:{marks:r.length,passes:H.filter(e=>"pass"===e.status).length,warnings:H.filter(e=>"warn"===e.status).length,failures:G,manual:H.filter(e=>"manual"===e.status).length},declaredSemantics:z,observedSceneEvidence:s,manualATChecks:O}}var _i=[{id:"trend",label:"Trend over time",description:"How a single metric changes over an ordered sequence (typically time).",familyHint:"time-series"},{id:"compare-series",label:"Compare series",description:"Compare multiple measured series across a shared x domain.",familyHint:"time-series"},{id:"compare-categories",label:"Compare categories",description:"Compare a single measure across discrete categories.",familyHint:"categorical"},{id:"rank",label:"Rank",description:"Show category ordering by a measure (largest to smallest).",familyHint:"categorical"},{id:"part-to-whole",label:"Part to whole",description:"Show how individual categories share a total.",familyHint:"categorical"},{id:"distribution",label:"Distribution",description:"Show the shape, spread, and central tendency of a numeric variable.",familyHint:"distribution"},{id:"correlation",label:"Correlation",description:"Show the relationship between two (or more) numeric variables.",familyHint:"relationship"},{id:"flow",label:"Flow",description:"Show movement, transitions, or transfers between states.",familyHint:"flow"},{id:"hierarchy",label:"Hierarchy",description:"Show parent/child structure or nested totals.",familyHint:"hierarchy"},{id:"geo",label:"Geography",description:"Show values bound to geographic locations or regions.",familyHint:"geo"},{id:"outlier-detection",label:"Outlier detection",description:"Surface individual data points that diverge from the rest.",familyHint:"distribution"},{id:"composition-over-time",label:"Composition over time",description:"Show how the share of categories changes across an ordered sequence.",familyHint:"time-series"},{id:"change-detection",label:"Change detection",description:"Surface where or when a metric shifted meaningfully.",familyHint:"time-series"}],Oi=new Map(_i.map(e=>[e.id,e]));function zi(e){return Oi.get(e)}function Hi(){return Array.from(Oi.values())}function Gi(e){Oi.set(e.id,e)}var qi=new Set(_i.map(e=>e.id)),Vi=new Set;function Wi(e,t,r){return Number.isFinite(e)?Math.max(t,Math.min(r,e)):t}function Ui(e,t){return void 0===e?0:Wi("function"==typeof e?e(t):e,0,5)}function Yi(e){return e?Array.isArray(e)?[...e]:[e]:[]}function Xi(e,t,r){const n={};for(const[r,a]of Object.entries(e.intentScores))n[r]=Ui(a,t);if(r)for(const[e,t]of Object.entries(r))n[e]=Wi((n[e]??0)+t,0,5);return n}function Ki(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 Qi(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 Ji(e,t,r){return e.some(e=>e.props?.[t]===r)}var Zi=new Set(["BarChart","GroupedBarChart","StackedBarChart","DotPlot"]);var es=(e,t,r)=>function(e,t,r){const n=new Map,a=e=>{for(const t of e)t&&t.id&&t.baseComponent&&(n.has(t.id)||n.set(t.id,t))};a(function(e,t,r){const n=r.profile,a=r.existingVariants??t.variants??[],o=Yi(r.intent),i=[];for(const e of a)i.push(Qi(t,e));const s=o.includes("rank")||o.includes("compare-categories");!Zi.has(e)||"categorical"!==t.family||Ji(a,"orientation","horizontal")||!s&&6>(n.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=Ji(a,"normalize",!0)||Ji(a,"type","percent")||a.some(e=>/normal|percent/i.test(`${e.key} ${e.label}`));if(/Stacked/.test(e)&&!c&&(o.includes("part-to-whole")||o.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"]}),o.length>0){const t=Ha().filter(t=>t.component!==e).filter(e=>null===e.fits(n)).map(e=>{const t=Xi(e,n);return{candidate:e,fit:Ki(t,o),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-${o.join("-")}`,baseComponent:e.component,label:e.component+" alternative",buildProps:t=>e.buildProps(t),rationale:`${e.component} is a strong ${o.join(" + ")} alternative (${r.toFixed(1)}/5) for this data shape.`,source:"heuristic",tags:["cross-family",e.family]})}return i}(e,t,r));for(const n of Vi)try{a(n(e,t,r)??[])}catch(e){void 0!==console&&console.warn("[variantDiscovery] proposer threw:",e)}return Array.from(n.values())}(e,t,r),ts=(e,t,r,n={})=>{const a=Ga(e.baseComponent);if(!a)return{proposalId:e.id,fit:0,novelty:1,risk:1,reasons:[`No capability registered for proposed component "${e.baseComponent}".`]};const o=a.fits(t);if(null!==o)return{proposalId:e.id,fit:0,novelty:"manual"===e.source?.2:.7,risk:1,reasons:["Rejected: "+o]};const i=Yi(n.intent),s=Xi(a,t,e.intentDeltas),c=Ki(s,i),l=function(e,t){return t?{familiarity:Math.round(Wi((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(Wi(r.accuracy,1,5)),precision:Math.round(Wi(r.precision,1,5))}:e;var r}(a.rubric,e.rubricDeltas);let p;const u=r?.receptionModality;if(u&&"visual"!==u){const n=e.variantKey?a.variants?.find(t=>t.key===e.variantKey):void 0,o=e.buildProps?e.buildProps(t,r):a.buildProps(t,n);p=Wa(Ur(e.baseComponent,o),u)}const d=Ua(c,l,e.baseComponent,r,p),y=Wi(d.score,0,5);let m="manual"===e.source?.15:"heuristic"===e.source?.45:.75;n.baselineComponent&&n.baselineComponent!==e.baseComponent&&(m+=.2),e.variantKey||(m+=.05),m=Wi(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>y&&(h+=.2),h=Wi(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."),d.appliedReason&&g.push(d.appliedReason),d.receivabilityReason&&g.push(d.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:y,novelty:m,risk:h,reasons:g}};function rs(e){return Vi.add(e),()=>{Vi.delete(e)}}function ns(){return Array.from(Vi)}function as(){Vi.clear()}import{useCallback as os,useEffect as is,useMemo as ss,useState as cs,useSyncExternalStore as ls}from"react";var ps={total:0,byType:{},componentsSeen:[],audiencesSeen:[],startedAt:null,lastAt:null,durationMs:0};function us(e){if(0===e.length)return ps;const t={},r=new Set,n=[];let a;for(const o of e){t[o.type]=(t[o.type]??0)+1,o.arcId&&(a=o.arcId);const e="component"in o&&"string"==typeof o.component?o.component:void 0;if(e&&r.add(e),"from"in o&&"string"==typeof o.from&&r.add(o.from),"to"in o&&"string"==typeof o.to&&r.add(o.to),"components"in o&&Array.isArray(o.components))for(const e of o.components)"string"==typeof e&&r.add(e);"audience-set"===o.type&&"string"==typeof o.audience&&n.push(o.audience)}const o=e[0].timestamp,i=e[e.length-1].timestamp;return{total:e.length,byType:t,componentsSeen:Array.from(r),audiencesSeen:n,latestArcId:a,startedAt:o,lastAt:i,durationMs:Math.max(0,i-o)}}function ds(e={}){const{enableOnMount:t=!0,disableOnUnmount:r=!1,capacity:n,sessionId:a}=e;is(()=>(t&&$({capacity:n,sessionId:a}),()=>{r&&N()}),[t,r,n,a]);const o=os(e=>pe(e),[]),i=os(()=>z().getEvents(),[]),s=ls(o,i,i),[c,l]=cs(()=>z().enabled),[p,u]=cs(()=>z().sessionId);is(()=>(l(z().enabled),u(z().sessionId),pe(()=>{const e=z();l(e.enabled),u(e.sessionId)})),[]);const d=ss(()=>us(s),[s]),y=os(e=>z().record(e),[]),m=os(()=>z().clear(),[]);return{history:s,summary:d,enabled:c,sessionId:p,record:y,clear:m}}export{r as AccessibleNavTree,Se as AreaChart,Vn as AreaChartCapability,Jo as BUILT_IN_AUDIENCES,qi as BUILT_IN_INTENT_IDS,Oe as BarChart,oa as BarChartCapability,t as BigNumber,ze as BoxPlot,fa as BoxPlotCapability,Pe as BubbleChart,Xn as BubbleChartCapability,wi as CANONICAL_FIXTURES,je as CandlestickChart,ea as CandlestickChartCapability,Rt as CategoryColorProvider,n as ChartContainer,a as ChartGrid,Ni as ChartRecipe,rt as ChordDiagram,ka as ChordDiagramCapability,$a as ChoroplethMapCapability,nt as CirclePack,Ra as CirclePackCapability,xt as CollisionSwarmChart,Te as ConnectedScatterplot,Yn as ConnectedScatterplotCapability,o as ContextLayout,Nt as DEFAULT_LIFECYCLE_THRESHOLDS,$n as DEFAULT_SCALE_THRESHOLDS,i as DetailsPanel,Ne as DifferenceChart,Zn as DifferenceChartCapability,Ba as DistanceCartogramCapability,He as DonutChart,pa as DonutChartCapability,Ge as DotPlot,ca as DotPlotCapability,At as EventDropChart,Ma as FlowMapCapability,at as ForceDirectedGraph,Aa as ForceDirectedGraphCapability,qe as FunnelChart,da as FunnelChartCapability,Ct as GaltonBoardChart,Ve as GaugeChart,ya as GaugeChartCapability,kt as GauntletChart,We as GroupedBarChart,ia as GroupedBarChartCapability,$e as Heatmap,ta as HeatmapCapability,Ue as Histogram,ba as HistogramCapability,s as IntentMark,Ye as LikertChart,ha as LikertChartCapability,Ie as LineChart,qn as LineChartCapability,$t as LinkedCharts,Me as MinimapChart,Jn as MinimapChartCapability,c as MobileAnnotationCalloutList,l as MobileChartContainer,we as MobileStandardControls,Be as MultiAxisLineChart,Qn as MultiAxisLineChartCapability,It as MultiLineTooltip,it as OrbitDiagram,Na as OrbitDiagramCapability,St as PhysicalFlowChart,Pt as PhysicsCustomChart,jt as PhysicsPileChart,Ke as PieChart,la as PieChartCapability,Tt as ProcessFlowChart,st as ProcessSankey,Sa as ProcessSankeyCapability,Ia as ProportionalSymbolMapCapability,Ee as QuadrantChart,Kn as QuadrantChartCapability,ht as RealtimeHeatmap,gt as RealtimeHistogram,bt as RealtimeLineChart,ft as RealtimeSwarmChart,vt as RealtimeWaterfallChart,Qe as RidgelinePlot,xa as RidgelinePlotCapability,ct as SankeyDiagram,Ca as SankeyDiagramCapability,Le as Scatterplot,Un as ScatterplotCapability,Fe as ScatterplotMatrix,p as SmallMultipleChart,De as StackedAreaChart,Wn as StackedAreaChartCapability,Je as StackedBarChart,sa as StackedBarChartCapability,Ze as SwarmPlot,va as SwarmPlotCapability,et as SwimlaneChart,ga as SwimlaneChartCapability,wt as TemporalHistogram,Kt as ThemeProvider,Zt as TooltipProvider,lt as TreeDiagram,Pa as TreeDiagramCapability,pt as Treemap,Ta as TreemapCapability,tt as ViolinPlot,wa as ViolinPlotCapability,Yr as accessibilityCaveats,Ko as analystPersona,u as annotationFreshnessFor,Et as annotationStableId,d as applyAnnotationLifecycle,y as applyAnnotationStatus,Ua as applyAudienceBias,Hn as applyScaleBias,Ur as auditAccessibility,m as auditMobileVisualization,Di as auditObservedScene,xe as auditVisualizationControls,Ft as bandFromAge,h as buildNavigationTree,fo as buildReaderGrounding,g as buildRecipeNavigationTree,_o as chartGenerationTool,Ae as clampMobileRange,En as classifyCardinalityBand,Ln as classifyFieldBand,Bn as classifyRowBand,as as clearVariantDiscovery,b as communicativeActForIntent,Fn as compareBands,f as computeAnnotationFreshness,On as computeEffectiveScale,v as configToJSX,w as copyConfig,x as countNodes,qo as createChartToolHandler,A as createIndexedDBConversationArcSink,C as createLocalStorageConversationArcSink,k as createWebhookConversationArcSink,S as currentTimestamp,Ro as dataQualityToAnnotations,Qo as dataScientistPersona,P as defineChartRecipe,j as describeChart,T as describeRecipeChart,R as deserializeSelections,Or as diagnoseConfig,ir as diagnoseTokenEncoding,ui as diffProfile,N as disableConversationArc,Ya as effectiveFamiliarity,$ as enableConversationArc,ts as evaluateVariantProposal,Xo as executivePersona,no as explainCapabilityFit,I as exportChart,B as filterAnnotationsByStatus,E as flattenVisible,Qr as formatAccessibilityAudit,L as formatMobileVisualizationAudit,F as fromConfig,Io as fromDbtArtifacts,Eo as fromGreatExpectations,D as fromURL,_ as fromVegaLite,Ha as getCapabilities,Ga as getCapability,O as getChartRecipe,z as getConversationArcStore,zi as getIntent,H as getRecipeLayout,ns as getRegisteredVariantDiscovery,ni as getStreamCapabilities,Wo as inferIntent,V as intentManifestFromRecipe,W as isJsonSafe,U as isRegisteredRecipeLayout,Y as listChartRecipes,Hi as listIntents,X as loadConversationArc,K as mobileVisualizationCaveats,or as normalizeTokenEncoding,Do as prepareChart,Nn as profileData,es as proposeVariant,Wa as receivabilityBias,Z as recipeToChartCapability,ee as recordAnnotationStatusChange,te as recordAudienceChange,Oa as registerChartCapability,re as registerChartRecipe,ne as registerConversationArcSink,Gi as registerIntent,ae as registerRecipeLayout,ti as registerStreamChartCapability,rs as registerVariantDiscovery,Lo as repairChartConfig,oe as replayConversationArc,_n as resolveCardinalityToNumber,ie as resolveChartRecipe,se as resolveCommunicativeAct,ce as resolveRecipeRoleField,Ot as resolveResponsiveRules,Dn as resolveRowsToNumber,zt as responsiveRuleMatches,di as runQualityScorecard,Gn as scaleHints,ao as scoreChart,le as serializeSelections,Xa as stretchFamiliarityCeiling,pe as subscribeToConversationArcChange,ro as suggestCharts,oo as suggestChartsGrouped,Yo as suggestDashboard,si as suggestStreamCharts,Uo as suggestStretchCharts,lr as suggestTokenEncoding,us as summarizeArc,cn as summarizeData,ue as summarizeIntentManifest,Oo as toAnthropicTool,de as toConfig,Go as toOpenAIResponsesTool,zo as toOpenAITool,ye as toURL,cr as tokenTaskIntentToCapabilityIntents,za as unregisterChartCapability,me as unregisterChartRecipe,he as unregisterRecipeLayout,ri as unregisterStreamChartCapability,Ht as useBrushSelection,Gt as useCategoryColors,Co as useChartFocus,wo as useChartInterrogation,qt as useChartObserver,Ti as useChartSuggestions,ds as useConversationArc,Vt as useFilteredData,Wt as useLinkedChartsActive,Ut as useLinkedHover,Ce as useMobileRangeControls,ge as useNavigationSync,Yt as useSelection,Xt as useSelectionActions,Jt as useTheme,be as validateChartRecipe,nr as validateProps,fe as withCurrentProvenance,ve as withProvenance,ke as zoomMobileRange};
|