semiotic 3.8.5 → 3.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/CLAUDE.md +37 -10
  2. package/README.md +83 -56
  3. package/ai/behaviorContracts.cjs +88 -3
  4. package/ai/componentMetadata.cjs +5 -10
  5. package/ai/dist/mcp-server.js +99 -10
  6. package/ai/examples.md +198 -9
  7. package/ai/schema.json +2002 -165
  8. package/ai/surface-manifest.json +14 -10
  9. package/ai/system-prompt.md +9 -3
  10. package/dist/{chunk-chartContainerDataAudit-74TLKIP6.module.min.js → chunk-chartContainerDataAudit-JDSVSKGM.module.min.js} +1 -1
  11. package/dist/chunk-chunk-2JGJ5GUG.module.min.js +1 -0
  12. package/dist/chunk-chunk-2YAZHXL4.module.min.js +2 -0
  13. package/dist/chunk-chunk-3NGIKFD6.module.min.js +1 -0
  14. package/dist/{chunk-chunk-G7WFWHAD.module.min.js → chunk-chunk-4ITOQRXM.module.min.js} +1 -1
  15. package/dist/chunk-chunk-5SD6BHVW.module.min.js +2 -0
  16. package/dist/chunk-chunk-6V5VQVCT.module.min.js +2 -0
  17. package/dist/chunk-chunk-7TTBHSAG.module.min.js +2 -0
  18. package/dist/chunk-chunk-7ZDJSYKI.module.min.js +2 -0
  19. package/dist/chunk-chunk-BGHPD3RA.module.min.js +1 -0
  20. package/dist/chunk-chunk-BMRZ2SPU.module.min.js +2 -0
  21. package/dist/chunk-chunk-BNGBEY7N.module.min.js +2 -0
  22. package/dist/chunk-chunk-C7APLVQD.module.min.js +2 -0
  23. package/dist/chunk-chunk-DGWFBOGB.module.min.js +1 -0
  24. package/dist/chunk-chunk-DIVE2DRA.module.min.js +2 -0
  25. package/dist/chunk-chunk-FBUNUIPV.module.min.js +2 -0
  26. package/dist/chunk-chunk-FQPKOAIH.module.min.js +2 -0
  27. package/dist/chunk-chunk-FRO4TRXK.module.min.js +2 -0
  28. package/dist/chunk-chunk-G7QVPZUD.module.min.js +2 -0
  29. package/dist/chunk-chunk-GBPYV4FP.module.min.js +2 -0
  30. package/dist/chunk-chunk-GU2EJIDJ.module.min.js +2 -0
  31. package/dist/chunk-chunk-J5QD4RAM.module.min.js +2 -0
  32. package/dist/{chunk-chunk-LJLS6DY7.module.min.js → chunk-chunk-JWXLNZSM.module.min.js} +1 -1
  33. package/dist/chunk-chunk-KXAFCCDB.module.min.js +2 -0
  34. package/dist/chunk-chunk-LG7YKJAK.module.min.js +2 -0
  35. package/dist/{chunk-chunk-I36PJ4OC.module.min.js → chunk-chunk-LVHDZAT3.module.min.js} +1 -1
  36. package/dist/chunk-chunk-LWITSR2O.module.min.js +2 -0
  37. package/dist/chunk-chunk-MX35T6RX.module.min.js +2 -0
  38. package/dist/chunk-chunk-NH4MEAKP.module.min.js +2 -0
  39. package/dist/chunk-chunk-NJETWX42.module.min.js +2 -0
  40. package/dist/chunk-chunk-NW25WGLS.module.min.js +2 -0
  41. package/dist/{chunk-chunk-TMWIZL3K.module.min.js → chunk-chunk-OI7R7EJB.module.min.js} +1 -1
  42. package/dist/chunk-chunk-ONMLEXHR.module.min.js +2 -0
  43. package/dist/chunk-chunk-OY66GCE6.module.min.js +1 -0
  44. package/dist/chunk-chunk-PZFT457G.module.min.js +1 -0
  45. package/dist/chunk-chunk-Q3WW6JGR.module.min.js +1 -0
  46. package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +1 -0
  47. package/dist/chunk-chunk-RJRM2E6P.module.min.js +1 -0
  48. package/dist/chunk-chunk-RPL7WYXI.module.min.js +1 -0
  49. package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
  50. package/dist/chunk-chunk-TSCFL235.module.min.js +1 -0
  51. package/dist/chunk-chunk-UOQRPGPK.module.min.js +2 -0
  52. package/dist/chunk-chunk-V3OAKG32.module.min.js +1 -0
  53. package/dist/chunk-chunk-WLOIUMWG.module.min.js +2 -0
  54. package/dist/chunk-chunk-XEGXX4F7.module.min.js +1 -0
  55. package/dist/chunk-chunk-XFRBLXYM.module.min.js +1 -0
  56. package/dist/chunk-chunk-Z2AJERX5.module.min.js +2 -0
  57. package/dist/chunk-chunk-ZXYDYAB7.module.min.js +2 -0
  58. package/dist/components/ai/SemioticVACPBridge.d.ts +22 -0
  59. package/dist/components/ai/chartCapabilities.d.ts +5 -3
  60. package/dist/components/ai/conversationArc.d.ts +2 -176
  61. package/dist/components/ai/conversationArcTypes.d.ts +202 -0
  62. package/dist/components/ai/readerGrounding.d.ts +12 -0
  63. package/dist/components/ai/vacpAdapter.d.ts +13 -0
  64. package/dist/components/ai/vacpAdapterActions.d.ts +2 -0
  65. package/dist/components/ai/vacpAdapterModel.d.ts +7 -0
  66. package/dist/components/ai/vacpAdapterRuntime.d.ts +26 -0
  67. package/dist/components/ai/vacpAdapterState.d.ts +3 -0
  68. package/dist/components/ai/vacpAdapterTypes.d.ts +169 -0
  69. package/dist/components/ai/vacpTypes.d.ts +160 -0
  70. package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
  71. package/dist/components/charts/geo/DistanceCartogram.d.ts +1 -1
  72. package/dist/components/charts/index.d.ts +7 -4
  73. package/dist/components/charts/ordinal/BarChart.d.ts +7 -14
  74. package/dist/components/charts/ordinal/GaugeChart.d.ts +3 -0
  75. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -0
  76. package/dist/components/charts/ordinal/StackedBarChart.d.ts +3 -0
  77. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -14
  78. package/dist/components/charts/physics/ChainReactionChart.capability.d.ts +9 -0
  79. package/dist/components/charts/physics/ChainReactionChart.d.ts +29 -0
  80. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
  81. package/dist/components/charts/physics/EventDropChart.d.ts +7 -2
  82. package/dist/components/charts/physics/GaltonBoardChart.d.ts +1 -1
  83. package/dist/components/charts/physics/{PhysicsPileChart.capability.d.ts → PacketFlowChart.capability.d.ts} +1 -1
  84. package/dist/components/charts/physics/{PhysicalFlowChart.d.ts → PacketFlowChart.d.ts} +22 -6
  85. package/dist/components/charts/physics/PhysicsCustomChart.d.ts +1 -1
  86. package/dist/components/charts/physics/ProcessFlowChart.d.ts +7 -4
  87. package/dist/components/charts/physics/{PhysicalFlowChart.capability.d.ts → UnitPileChart.capability.d.ts} +1 -1
  88. package/dist/components/charts/physics/{PhysicsPileChart.d.ts → UnitPileChart.d.ts} +19 -6
  89. package/dist/components/charts/physics/crucibleChartProps.d.ts +1 -1
  90. package/dist/components/charts/physics/crucibleChartUtils.d.ts +9 -0
  91. package/dist/components/charts/physics/gauntletChartProps.d.ts +6 -1
  92. package/dist/components/charts/physics/gauntletTerminal.d.ts +61 -0
  93. package/dist/components/charts/physics/packetFlowSemantics.d.ts +6 -0
  94. package/dist/components/charts/physics/physicsHocUtils.d.ts +45 -2
  95. package/dist/components/charts/shared/auditAccessibilityStyles.d.ts +9 -0
  96. package/dist/components/charts/shared/chartSpecCore.d.ts +2 -4
  97. package/dist/components/charts/shared/gaugeGradient.d.ts +4 -8
  98. package/dist/components/charts/shared/gradient.d.ts +35 -0
  99. package/dist/components/charts/shared/hatchFill.d.ts +3 -10
  100. package/dist/components/charts/shared/hooks.d.ts +2 -50
  101. package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
  102. package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -2
  103. package/dist/components/charts/shared/useChartLegend.d.ts +65 -0
  104. package/dist/components/charts/shared/useChartSetup.d.ts +12 -0
  105. package/dist/components/charts/shared/useCustomChartSetup.d.ts +6 -1
  106. package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -0
  107. package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
  108. package/dist/components/charts/xy/AreaChart.d.ts +25 -42
  109. package/dist/components/charts/xy/BumpChart.capability.d.ts +11 -0
  110. package/dist/components/charts/xy/BumpChart.d.ts +161 -0
  111. package/dist/components/charts/xy/DifferenceChart.d.ts +3 -10
  112. package/dist/components/charts/xy/Heatmap.d.ts +3 -0
  113. package/dist/components/charts/xy/LineChart.d.ts +6 -8
  114. package/dist/components/data/portability/capabilityBinding.d.ts +41 -0
  115. package/dist/components/data/portability/index.d.ts +2 -0
  116. package/dist/components/geometry/bumpRibbonGeometry.d.ts +36 -0
  117. package/dist/components/legendLayout.d.ts +75 -1
  118. package/dist/components/recipes/geographicDotGrid.d.ts +82 -0
  119. package/dist/components/recipes/geographicGrid.d.ts +100 -0
  120. package/dist/components/recipes/physics.d.ts +2 -0
  121. package/dist/components/recipes/physicsStageGeography.d.ts +137 -0
  122. package/dist/components/semiotic-ai.d.ts +6 -4
  123. package/dist/components/semiotic-experimental-vacp.d.ts +11 -0
  124. package/dist/components/semiotic-experimental.d.ts +6 -3
  125. package/dist/components/semiotic-geo.d.ts +5 -0
  126. package/dist/components/semiotic-network.d.ts +1 -0
  127. package/dist/components/semiotic-ordinal.d.ts +2 -0
  128. package/dist/components/semiotic-physics.d.ts +10 -6
  129. package/dist/components/semiotic-realtime-core.d.ts +1 -0
  130. package/dist/components/semiotic-recipes-core.d.ts +6 -1
  131. package/dist/components/semiotic-server-edge.d.ts +1 -1
  132. package/dist/components/semiotic-server.d.ts +1 -1
  133. package/dist/components/semiotic-xy.d.ts +4 -0
  134. package/dist/components/semiotic.d.ts +4 -4
  135. package/dist/components/server/renderEvidence.d.ts +1 -1
  136. package/dist/components/server/renderToStaticSVG.d.ts +2 -1
  137. package/dist/components/server/serverChartConfigHeatmap.d.ts +6 -0
  138. package/dist/components/server/serverChartConfigNetworkStyles.d.ts +12 -0
  139. package/dist/components/server/serverChartConfigShared.d.ts +16 -0
  140. package/dist/components/server/serverChartConfigs.d.ts +3 -2
  141. package/dist/components/server/serverChartConfigsPhysics.d.ts +2 -2
  142. package/dist/components/server/serverChartConfigsXY.d.ts +1 -1
  143. package/dist/components/server/staticLegend.d.ts +10 -2
  144. package/dist/components/server/staticSVGChrome.d.ts +14 -6
  145. package/dist/components/server/staticValue.d.ts +8 -0
  146. package/dist/components/stream/GeoSVGOverlay.d.ts +4 -10
  147. package/dist/components/stream/NetworkSVGOverlay.d.ts +2 -6
  148. package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -6
  149. package/dist/components/stream/SVGOverlay.d.ts +2 -6
  150. package/dist/components/stream/StalenessBadge.d.ts +2 -6
  151. package/dist/components/stream/geoPipelineConfig.d.ts +10 -0
  152. package/dist/components/stream/geoTypes.d.ts +3 -6
  153. package/dist/components/stream/legendRenderer.d.ts +10 -6
  154. package/dist/components/stream/ordinalTypes.d.ts +7 -31
  155. package/dist/components/stream/physics/PhysicsEvidence.d.ts +37 -0
  156. package/dist/components/stream/physics/PhysicsKernel.d.ts +1 -0
  157. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +9 -0
  158. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +2 -6
  159. package/dist/components/stream/physics/PhysicsSettledScene.d.ts +5 -0
  160. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -6
  161. package/dist/components/stream/physics/physicsFramePipelineConfig.d.ts +19 -0
  162. package/dist/components/stream/physics/physicsPipelineSettle.d.ts +52 -0
  163. package/dist/components/stream/physics/physicsRegionRuntime.d.ts +23 -0
  164. package/dist/components/stream/pipelineConfig.d.ts +7 -15
  165. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +9 -69
  166. package/dist/components/stream/renderers/cornerRadii.d.ts +2 -9
  167. package/dist/components/stream/renderers/thresholdLineSegments.d.ts +12 -0
  168. package/dist/components/stream/sceneToSVGShared.d.ts +3 -5
  169. package/dist/components/stream/types.d.ts +34 -56
  170. package/dist/components/stream/xySceneBuilders/areaGradient.d.ts +4 -20
  171. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -6
  172. package/dist/components/types/legendTypes.d.ts +31 -6
  173. package/dist/controls.min.js +1 -1
  174. package/dist/controls.module.min.js +1 -1
  175. package/dist/geo.min.js +1 -1
  176. package/dist/geo.module.min.js +1 -1
  177. package/dist/network.min.js +1 -1
  178. package/dist/network.module.min.js +1 -1
  179. package/dist/ordinal.min.js +1 -1
  180. package/dist/ordinal.module.min.js +1 -1
  181. package/dist/physics.min.js +1 -1
  182. package/dist/physics.module.min.js +1 -1
  183. package/dist/physicsWorker.js +1 -1
  184. package/dist/realtime.min.js +1 -1
  185. package/dist/realtime.module.min.js +1 -1
  186. package/dist/semiotic-ai-core.min.js +1 -1
  187. package/dist/semiotic-ai-core.module.min.js +1 -1
  188. package/dist/semiotic-ai.d.ts +6 -4
  189. package/dist/semiotic-ai.min.js +1 -1
  190. package/dist/semiotic-ai.module.min.js +1 -1
  191. package/dist/semiotic-data.module.min.js +1 -1
  192. package/dist/semiotic-experimental-vacp.d.ts +11 -0
  193. package/dist/semiotic-experimental-vacp.min.js +1 -0
  194. package/dist/semiotic-experimental-vacp.module.min.js +1 -0
  195. package/dist/semiotic-experimental.d.ts +6 -3
  196. package/dist/semiotic-experimental.min.js +2 -1
  197. package/dist/semiotic-experimental.module.min.js +2 -1
  198. package/dist/semiotic-geo.d.ts +5 -0
  199. package/dist/semiotic-network.d.ts +1 -0
  200. package/dist/semiotic-ordinal.d.ts +2 -0
  201. package/dist/semiotic-physics.d.ts +10 -6
  202. package/dist/semiotic-realtime-core.d.ts +1 -0
  203. package/dist/semiotic-realtime-core.min.js +1 -1
  204. package/dist/semiotic-realtime-core.module.min.js +1 -1
  205. package/dist/semiotic-recipes-core.d.ts +6 -1
  206. package/dist/semiotic-recipes-core.min.js +1 -1
  207. package/dist/semiotic-recipes-core.module.min.js +1 -1
  208. package/dist/semiotic-recipes.min.js +1 -1
  209. package/dist/semiotic-recipes.module.min.js +1 -1
  210. package/dist/semiotic-server-edge.d.ts +1 -1
  211. package/dist/semiotic-server-edge.min.js +1 -1
  212. package/dist/semiotic-server-edge.module.min.js +1 -1
  213. package/dist/semiotic-server-node.min.js +1 -1
  214. package/dist/semiotic-server-node.module.min.js +1 -1
  215. package/dist/semiotic-server.d.ts +1 -1
  216. package/dist/semiotic-utils-core.min.js +1 -1
  217. package/dist/semiotic-utils-core.module.min.js +1 -1
  218. package/dist/semiotic-utils.min.js +1 -1
  219. package/dist/semiotic-utils.module.min.js +1 -1
  220. package/dist/semiotic-xy.d.ts +4 -0
  221. package/dist/semiotic.d.ts +4 -4
  222. package/dist/semiotic.min.js +1 -1
  223. package/dist/semiotic.module.min.js +1 -1
  224. package/dist/server.min.js +1 -1
  225. package/dist/server.module.min.js +1 -1
  226. package/dist/xy.min.js +1 -1
  227. package/dist/xy.module.min.js +1 -1
  228. package/package.json +18 -2
  229. package/spec/README.md +94 -2
  230. package/spec/bindings/README.md +14 -3
  231. package/spec/v0.1/examples/annotation-provenance-reviewed-revision.json +27 -0
  232. package/spec/v0.1/examples/annotation-provenance-watcher-threshold.json +21 -0
  233. package/spec/v0.1/examples/audience-profile-executive-review.json +24 -0
  234. package/spec/v0.1/examples/audience-profile-incident-operators.json +42 -0
  235. package/spec/v0.1/examples/chart-capability-bar-comparison.json +48 -0
  236. package/spec/v0.1/examples/chart-capability-service-flow.json +54 -0
  237. package/dist/chunk-chunk-4AANPFOX.module.min.js +0 -2
  238. package/dist/chunk-chunk-5I3UZV4Q.module.min.js +0 -2
  239. package/dist/chunk-chunk-5RKXZQ2P.module.min.js +0 -1
  240. package/dist/chunk-chunk-74CCPVXB.module.min.js +0 -1
  241. package/dist/chunk-chunk-7ALTGHK6.module.min.js +0 -1
  242. package/dist/chunk-chunk-ANYDWOZF.module.min.js +0 -1
  243. package/dist/chunk-chunk-AVBI6GDT.module.min.js +0 -1
  244. package/dist/chunk-chunk-BANTPINB.module.min.js +0 -2
  245. package/dist/chunk-chunk-C4YA6TDR.module.min.js +0 -1
  246. package/dist/chunk-chunk-C57LR3YG.module.min.js +0 -1
  247. package/dist/chunk-chunk-CKMD5NV3.module.min.js +0 -2
  248. package/dist/chunk-chunk-CO5KQMGH.module.min.js +0 -1
  249. package/dist/chunk-chunk-CWQ5YIHX.module.min.js +0 -2
  250. package/dist/chunk-chunk-E6TXX6MI.module.min.js +0 -1
  251. package/dist/chunk-chunk-GMQ5AYTD.module.min.js +0 -1
  252. package/dist/chunk-chunk-JCG72SGW.module.min.js +0 -2
  253. package/dist/chunk-chunk-K3DMEW22.module.min.js +0 -1
  254. package/dist/chunk-chunk-KT2VAZMZ.module.min.js +0 -1
  255. package/dist/chunk-chunk-L6EA5V3G.module.min.js +0 -2
  256. package/dist/chunk-chunk-LJPCLYSC.module.min.js +0 -2
  257. package/dist/chunk-chunk-LRIFN2HK.module.min.js +0 -1
  258. package/dist/chunk-chunk-N5DDKCCF.module.min.js +0 -1
  259. package/dist/chunk-chunk-NEVE562N.module.min.js +0 -1
  260. package/dist/chunk-chunk-NLO44TOS.module.min.js +0 -2
  261. package/dist/chunk-chunk-PZJ2SBLL.module.min.js +0 -2
  262. package/dist/chunk-chunk-QSQVBIJA.module.min.js +0 -1
  263. package/dist/chunk-chunk-QUJ6TTLY.module.min.js +0 -1
  264. package/dist/chunk-chunk-RBIDBUT4.module.min.js +0 -2
  265. package/dist/chunk-chunk-RCF52Z42.module.min.js +0 -2
  266. package/dist/chunk-chunk-RFLAG356.module.min.js +0 -1
  267. package/dist/chunk-chunk-RPU4IZAV.module.min.js +0 -2
  268. package/dist/chunk-chunk-SKMBCFIL.module.min.js +0 -2
  269. package/dist/chunk-chunk-TAE7W424.module.min.js +0 -2
  270. package/dist/chunk-chunk-TUBMTZMU.module.min.js +0 -2
  271. package/dist/chunk-chunk-UFFEXJQY.module.min.js +0 -1
  272. package/dist/chunk-chunk-XSCHTS4D.module.min.js +0 -2
  273. package/dist/chunk-chunk-XXWSHGPL.module.min.js +0 -2
  274. package/dist/chunk-chunk-ZOAQDIJO.module.min.js +0 -1
  275. package/dist/chunk-chunk-ZXIXAPRE.module.min.js +0 -2
  276. package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +0 -1
  277. package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +0 -1
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{useChartSetup as t,useCustomChartScaffold as e}from"./chunk-chunk-SKMBCFIL.module.min.js";import{lineCanvasRenderer as n,resolveNodeColor as i}from"./chunk-chunk-BANTPINB.module.min.js";import{RingBuffer as o,compactTimestampBufferForRemoval as r,computePulseIntensity as s,hasActivePulses as a,pointCanvasRenderer as c,pushWithTimestamp as l,refreshIdlePulse as u,setPulseState as h,useGeoKeyboardNavigation as d,useLegendCategoryEmission as p,useSemanticFrameInteractions as f}from"./chunk-chunk-PZJ2SBLL.module.min.js";import{needsDataCanvasPaint as m,needsInteractionCanvasPaint as g,paintCanvasBackground as y}from"./chunk-chunk-TMWIZL3K.module.min.js";import{StalenessBadge as v,attachUpdateResultStore as b,buildBaseMetadataProps as w,buildCustomBehaviorProps as P,composeOverlays as x,computeDecayOpacity as L,createCustomLayoutFailureDiagnostic as R,filterAnnotationsByStatus as S,findHitPointInQuadtree as A,formatVal as k,getHitRadius as C,glyphCanvasRenderer as j,paintSceneWithBackend as D,renderPathPulse as M,renderSceneWithBackend as T,useConfigSync as B,useLayoutSelectionSync as I,useStableShallow as _,useStalenessCheck as E,warnCustomLayoutDiagnostics as N}from"./chunk-chunk-XXWSHGPL.module.min.js";import{wrapWithCustomLayoutSelection as W}from"./chunk-chunk-5UKL5W76.module.min.js";import{buildResolveColor as O,resolveCustomLayoutPalette as F}from"./chunk-chunk-LJLS6DY7.module.min.js";import{AccessibleDataTable as H,AriaLiveTooltip as z,CanvasFrameBackground as G,FlippingTooltip as q,FocusRing as Z,STREAMING_PALETTE as X,SceneRevisionDiagnosticsObserver as Y,ScreenReaderSummary as U,SkipToTableLink as Q,TITLE_BASELINE as $,UpdateResultTracker as V,annotationLayout as K,coerceCanvasFill as J,computeCanvasAriaLabel as tt,computeEasing as et,computeRawProgress as nt,createDefaultAnnotationRules as it,defaultTooltipStyle as ot,filterSparseArray as rt,geoSceneNodeToSVG as st,getDevicePixelRatio as at,getPointerHitRadius as ct,isAnnotationActivationTarget as lt,isServerEnvironment as ut,lerp as ht,normalizeTooltip as dt,now as pt,observationInputType as ft,prepareCanvas as mt,renderAnnotationPass as gt,renderLegendFromConfig as yt,resolveCSSColor as vt,smartTooltipEntries as bt,useAnnotationActivationOptions as wt,useFrame as Pt,useFrameCanvasHost as xt,useSceneRevisionDiagnostics as Lt}from"./chunk-chunk-CWQ5YIHX.module.min.js";import{getMax as Rt}from"./chunk-chunk-JJ2OOIET.module.min.js";import{resolveThemeSemanticColors as St}from"./chunk-chunk-WCX6U47H.module.min.js";import{glyphHitGeometry as At}from"./chunk-chunk-KTWEBFMX.module.min.js";import{SafeRender as kt,useHydration as Ct,useWasHydratingFromSSR as jt}from"./chunk-chunk-ACLDBMRH.module.min.js";import{useRef as Dt,useState as Mt,useEffect as Tt,useMemo as Bt,useCallback as It,useImperativeHandle as _t,forwardRef as Et,memo as Nt}from"react";import{geoPath as Wt}from"d3-geo";import{quadtree as Ot}from"d3-quadtree";import{geoMercator as Ft,geoEqualEarth as Ht,geoAlbersUsa as zt,geoOrthographic as Gt,geoNaturalEarth1 as qt,geoEquirectangular as Zt}from"d3-geo";var Xt={mercator:Ft,equalEarth:Ht,albersUsa:zt,orthographic:Gt,naturalEarth:qt,equirectangular:Zt};function Yt(t,e){return t?"function"==typeof t?t:e=>e[t]:t=>t[e]}function Ut(t){return t?"function"==typeof t?t:e=>e[t]:t=>t.coordinates||t.data||[]}function Qt(t,e,n){return t?"function"==typeof t?{...n,...t(e)}:{...n,...t}:{...n}}function $t(t,e){if(2>t.length)return[t];const n=.4*e,i=[];let o=[t[0]];for(let e=1;t.length>e;e++){const r=t[e];Math.abs(r[0]-t[e-1][0])>n?(2>o.length||i.push(o),o=[r]):o.push(r)}return 2>o.length||i.push(o),i}function Vt(t,e,n=24){const i=e[0]-t[0],o=e[1]-t[1],r=Math.sqrt(i*i+o*o);if(0===r)return[t,e];const s=-o/r,a=i/r,c=Math.min(.3*r,80),l=(t[0]+e[0])/2+s*c,u=(t[1]+e[1])/2+a*c,h=[];for(let i=0;n>=i;i++){const o=i/n,r=1-o;h.push([r*r*t[0]+2*r*o*l+o*o*e[0],r*r*t[1]+2*r*o*u+o*o*e[1]])}return h}function Kt(t,e){if(2>t.length)return t;const n=e/2+1,i=[];for(let e=0;t.length>e;e++){const o=t[e];let r,s;0===e?(r=t[1][0]-o[0],s=t[1][1]-o[1]):e===t.length-1?(r=o[0]-t[e-1][0],s=o[1]-t[e-1][1]):(r=t[e+1][0]-t[e-1][0],s=t[e+1][1]-t[e-1][1]);const a=Math.sqrt(r*r+s*s)||1;i.push([o[0]+s/a*n,o[1]+-r/a*n])}return i}function Jt(t,e,n,i,o){const r=e[0]-t[0],s=e[1]-t[1],a=Math.sqrt(r*r+s*s);if(0===a)return[t,e];const c=s/a,l=-r/a,u=o/2+1;return[[t[0]+c*u,t[1]+l*u],[e[0]+c*u,e[1]+l*u]]}import{scaleLinear as te}from"d3-scale";var ee=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],ne=["scene-style","data-paint","accessibility","evidence"],ie=(t,e)=>({retainedData:t,invalidations:e}),oe=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],re=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],se=["scene-geometry","data-paint","accessibility","evidence"],ae=["scene-style","data-paint","accessibility","evidence"],ce=["overlay","accessibility","evidence"],le=[],ue={xAccessor:ie("rebuild",oe),yAccessor:ie("rebuild",oe),lineDataAccessor:ie("rebuild",oe),pointIdAccessor:ie("rebuild",se),lineIdAccessor:ie("rebuild",se),windowSize:ie("rebuild",oe),projection:ie("preserve",re),projectionExtent:ie("preserve",re),fitPadding:ie("preserve",re),lineType:ie("preserve",re),flowStyle:ie("preserve",re),graticule:ie("preserve",re),projectionTransform:ie("preserve",re),customLayout:ie("preserve",re),layoutConfig:ie("preserve",re),layoutMargin:ie("preserve",re),areaStyle:ie("preserve",ae),pointStyle:ie("preserve",["scene-geometry","scene-style","data-paint","accessibility","evidence"]),lineStyle:ie("preserve",ae),colorScheme:ie("preserve",ae),themeCategorical:ie("preserve",ae),themeDiverging:ie("preserve",ae),themeSemantic:ie("preserve",ae),themeSequential:ie("preserve",ae),decay:ie("preserve",ae),pulse:ie("preserve",ae),layoutSelection:ie("preserve",ae),annotations:ie("preserve",ce),autoPlaceAnnotations:ie("preserve",ce),clock:ie("preserve",le),transition:ie("preserve",le),introAnimation:ie("preserve",le),onLayoutError:ie("preserve",le)},he=ie("preserve",re),de=class{constructor(){this.tracker=new V}get last(){return this.tracker.last}subscribe(t){return this.tracker.subscribe(t)}recordData(t,e){return this.tracker.record({kind:t,...void 0===e?{}:{count:e}},ee)}recordNoop(t){return this.tracker.record({kind:t,..."restyle"===t?{}:{count:0}},[])}recordRestyle(t){return t?this.tracker.record({kind:"restyle"},ne):this.recordNoop("restyle")}recordConfig(t,e={}){const n=function(t){let e="preserve";const n=new Set;for(const i of t){const t=ue[i]??he;"rebuild"===t.retainedData&&(e="rebuild");for(const e of t.invalidations)n.add(e)}return{retainedData:e,invalidations:n}}(t),i=new Set(n.invalidations);return e.retainedDataChanged&&i.add("data"),this.tracker.record({kind:"config",keys:t},i)}};import{geoDistance as pe,geoGraticule as fe,geoInterpolate as me}from"d3-geo";function ge(t){if(null==t)return 0;if("number"==typeof t&&Number.isFinite(t)&&t>=0&&.5>t)return t;throw new RangeError(`[semiotic] fitPadding must be a finite fraction in [0, 0.5); received ${t+""}.`)}var ye=class t{constructor(t){this.updateResults=new de,this.scene=[],this.scales=null,this.version=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customLayoutDiagnosticsWarned=new Set,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._customLayoutFailedThisBuild=!1,this._quadtree=null,this._maxPointRadius=0,this.projection=null,this.geoPath=null,this.baseScale=0,this.baseTranslate=[0,0],this.baseRotation=[0,0,0],this.currentZoom=1,this.cartogramLayout=null,this.areas=[],this.pointData=[],this.lineData=[],this.pointBuffer=null,this.streaming=!1,this.lastIngestTime=0,this.timestampBuffer=null,this.activeTransition=null,this.prevPositions=null,this._hasRenderedOnce=!1,this.config=function(t){return{...t,fitPadding:ge(t.fitPadding)}}(t)}currentTime(){return this.config.clock?.()??pt()}getConfiguredWindowSize(){const t=this.config.windowSize??500;if(!Number.isInteger(t)||1>t)throw Error("GeoPipelineStore windowSize must be a positive integer");return t}retainNewestLines(t=this.getConfiguredWindowSize()){this.lineData.length>t&&(this.lineData=this.lineData.slice(-t))}resizeStreamingWindow(t){if(this.pointBuffer){const e=this.pointBuffer.toArray(),n=this.timestampBuffer?.toArray()??[],i=e.slice(-t),r=n.slice(-i.length),s=this.currentTime();this.pointBuffer=new o(t),this.timestampBuffer=new o(t),i.forEach((t,e)=>{this.pointBuffer.push(t),this.timestampBuffer.push(r[e]??s)})}this.retainNewestLines(t)}updateConfig(t){const e=function(t){return"fitPadding"in t?{...t,fitPadding:ge(t.fitPadding)}:t}(t),n=this.config,i=this.getConfiguredWindowSize(),o=Object.keys(e).filter(t=>e[t]!==n[t]);this.config={...this.config,...e};const r=this.getConfiguredWindowSize(),s=this.streaming&&r!==i;s&&(this.resizeStreamingWindow(r),this.version++),"customLayout"in e&&!e.customLayout&&(this.lastCustomLayoutFailure=null),this.updateResults.recordConfig(o,{retainedDataChanged:s})}updateConfigWithResult(t){return this.updateConfig(t),this.updateResults.last}setAreas(t){this.areas=t,this.updateResults.recordData("replace",t.length)}setAreasWithResult(t){return this.setAreas(t),this.updateResults.last}setPoints(t){this.pointData=t.slice(),this.pointBuffer=null,this.timestampBuffer=null,this.streaming=!1,this.updateResults.recordData("replace",t.length)}setPointsWithResult(t){return this.setPoints(t),this.updateResults.last}setLines(t){this.lineData=t.slice(),this.streaming&&this.retainNewestLines(),this.updateResults.recordData("replace",t.length)}setLinesWithResult(t){return this.setLines(t),this.updateResults.last}initStreaming(t){void 0!==t&&t!==this.config.windowSize&&(this.config={...this.config,windowSize:t});const e=this.getConfiguredWindowSize(),n=this.pointBuffer?this.pointBuffer.toArray():this.pointData,i=this.timestampBuffer?.toArray()??[],r=n.slice(-e),s=i.slice(-r.length),a=this.currentTime();this.pointBuffer=new o(e),this.timestampBuffer=new o(e),r.forEach((t,e)=>{this.pointBuffer.push(t),this.timestampBuffer.push(s[e]??a)}),this.pointData=[],this.retainNewestLines(e),this.streaming=!0}pushPoint(t){this.pointBuffer||this.initStreaming();const e=this.currentTime();l(this.pointBuffer,t,this.timestampBuffer,e),this.lastIngestTime=e,this.updateResults.recordData("ingest",1)}pushPointWithResult(t){return this.pushPoint(t),this.updateResults.last}pushMany(t){this.pointBuffer||this.initStreaming();const e=this.currentTime();for(const n of t)l(this.pointBuffer,n,this.timestampBuffer,e);this.lastIngestTime=e,this.updateResults.recordData("ingest",t.length)}pushManyWithResult(t){return this.pushMany(t),this.updateResults.last}pushLine(t){null!=t&&"object"==typeof t?(this.streaming||this.initStreaming(),this.lineData.push(t),this.retainNewestLines(),this.version++,this.updateResults.recordData("ingest",1)):this.updateResults.recordNoop("ingest")}pushManyLines(t){if(!Array.isArray(t)||0===t.length)return void this.updateResults.recordNoop("ingest");const e=t.filter(t=>null!=t&&"object"==typeof t);if(0!==e.length){this.streaming||this.initStreaming();for(const t of e)this.lineData.push(t);this.retainNewestLines(),this.version++,this.updateResults.recordData("ingest",e.length)}else this.updateResults.recordNoop("ingest")}removeLine(t){const{lineIdAccessor:e}=this.config;if(!e)throw Error("removeLine() requires lineIdAccessor to be configured");const n="function"==typeof e?e:t=>t[e],i=new Set(Array.isArray(t)?t:[t]),o=[];return this.lineData=this.lineData.filter(t=>!i.has(n(t)+"")||(o.push(t),!1)),o.length>0?(this.version++,this.updateResults.recordData("remove",o.length)):this.updateResults.recordNoop("remove"),o}getLines(){return this.lineData.slice()}removePoint(t){const{pointIdAccessor:e}=this.config;if(!e)throw Error("removePoint() requires pointIdAccessor to be configured");const n="function"==typeof e?e:t=>t[e],i=new Set(Array.isArray(t)?t:[t]);if(this.streaming&&this.pointBuffer){const t=t=>i.has(n(t)+"");r(this.pointBuffer,this.timestampBuffer,t);const e=this.pointBuffer.remove(t);return e.length>0?(this.version++,this.updateResults.recordData("remove",e.length)):this.updateResults.recordNoop("remove"),e}{const t=[];return this.pointData=this.pointData.filter(e=>!i.has(n(e)+"")||(t.push(e),!1)),t.length>0?(this.version++,this.updateResults.recordData("remove",t.length)):this.updateResults.recordNoop("remove"),t}}clear(){this.areas=[],this.pointData=[],this.lineData=[],this.pointBuffer=null,this.timestampBuffer=null,this.streaming=!1,this.scene=[],this.scales=null,this._hasRenderedOnce=!1,this.activeTransition=null,this.prevPositions=null,this._quadtree=null,this._maxPointRadius=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._customLayoutFailedThisBuild=!1,this.version++,this.updateResults.recordData("clear")}restyleScene(t){const e=this._customRestyle;if(e){for(const n of this.scene){const i=this._baseStyles.get(n)??n.style,o=e(n,t);n.style=o?{...i,...o}:i}this.markStylePaintPending(),this.updateResults.recordRestyle(!0)}else this.updateResults.recordRestyle(!1)}computeScene(t){const{config:e}=this,n=this.projection,i=this.geoPath,o=this.scales,r=this.baseScale,s=[...this.baseTranslate],a=[...this.baseRotation],c=this.scene;this.projection=function(t){if(!t)return Ht();if("string"==typeof t){const e=Xt[t];return e?e():("production"!==process.env.NODE_ENV&&console.warn(`GeoFrame: Unknown projection "${t}", falling back to equalEarth`),Ht())}if("object"==typeof t&&"type"in t){const e=Xt[t.type],n=e?e():Ht();return t.rotate&&"rotate"in n&&n.rotate(t.rotate),t.center&&"center"in n&&n.center(t.center),n}return t}(e.projection),this.geoPath=Wt(this.projection),this.fitProjection(t),this.geoPath=Wt(this.projection);const l=this.projection;this.scales={projection:l,geoPath:this.geoPath,projectedPoint:(t,e)=>l([t,e]),invertedPoint:(t,e)=>l.invert?l.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const u=this.buildSceneNodes(t);if(this._customLayoutFailedThisBuild)!0===this.lastCustomLayoutFailure?.preservedLastGoodScene?(this.projection=n,this.geoPath=i,this.scales=o,this.baseScale=r,this.baseTranslate=s,this.baseRotation=a):(this.scene=[],this.rebuildQuadtree());else{if(this.scene=u,this.rebuildQuadtree(),e.projectionTransform&&this.applyCartogramTransform(e.projectionTransform,t),e.decay&&this.streaming&&this.applyDecay(),e.pulse&&this.streaming&&this.applyPulse(),e.transition&&!this._hasRenderedOnce&&this.scene.length>0&&e.introAnimation){const e=t.width/2,n=t.height/2,i=this.scene.filter(t=>"point"===t.type).map(t=>({...t,x:e,y:n}));i.length>0&&this.startTransition(i)}this._hasRenderedOnce=!0,e.transition&&c.length>0&&this.startTransition(c),this.version++}}fitProjection(t){const e=this.projection,n=this.config,i=[...this.areas],o=Yt(n.xAccessor,"lon"),r=Yt(n.yAccessor,"lat"),s=this.getPoints();if(s.length>0){const t=s.map(t=>[o(t),r(t)]);i.push({type:"Feature",properties:{},geometry:{type:"MultiPoint",coordinates:t}})}const a=Ut(n.lineDataAccessor);for(const t of this.lineData){const e=a(t);if(e&&e.length>0){const t=e.map(t=>[o(t),r(t)]);i.push({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}})}}if(0!==i.length){if(n.projectionExtent){const[[i,o],[r,s]]=n.projectionExtent;e.fitExtent([[0,0],[t.width,t.height]],{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[i,o],[i,s],[r,s],[r,o],[i,o]]]}})}else if(e.clipAngle&&(e.clipAngle()??0)>0){const i=n.fitPadding??0,o=Math.min(t.width,t.height);e.scale(o/2-o*i),e.translate([t.width/2,t.height/2])}else{const o=n.fitPadding??0,r=t.width*o,s=t.height*o;e.fitExtent([[r,s],[t.width-r,t.height-s]],{type:"FeatureCollection",features:i})}this.baseScale=e.scale(),this.baseTranslate=e.translate(),this.baseRotation=e.rotate?.()??[0,0,0]}}applyZoomTransform(t,e){const n=this.projection;if(!n)return;const i=this.geoPath,o=this.scales,r=n.scale(),s=[...n.translate()],a=this.currentZoom;n.scale(this.baseScale*t.k),n.translate([this.baseTranslate[0]*t.k+t.x,this.baseTranslate[1]*t.k+t.y]),this.currentZoom=t.k,this.geoPath=Wt(n),this.scales={projection:n,geoPath:this.geoPath,projectedPoint:(t,e)=>n([t,e]),invertedPoint:(t,e)=>n.invert?n.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const c=this.buildSceneNodes(e);this._customLayoutFailedThisBuild?this.lastCustomLayoutFailure?.preservedLastGoodScene?(n.scale(r),n.translate(s),this.currentZoom=a,this.geoPath=i,this.scales=o):(this.scene=[],this.rebuildQuadtree()):(this.scene=c,this.rebuildQuadtree(),this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,e),this.version++)}applyZoomScale(t,e){const n=this.projection;if(!n)return;const i=this.geoPath,o=this.scales,r=n.scale(),s=[...n.translate()],a=this.currentZoom;n.scale(this.baseScale*t),n.translate(this.baseTranslate),this.currentZoom=t,this.geoPath=Wt(n),this.scales={projection:n,geoPath:this.geoPath,projectedPoint:(t,e)=>n([t,e]),invertedPoint:(t,e)=>n.invert?n.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const c=this.buildSceneNodes(e);this._customLayoutFailedThisBuild?this.lastCustomLayoutFailure?.preservedLastGoodScene?(n.scale(r),n.translate(s),this.currentZoom=a,this.geoPath=i,this.scales=o):(this.scene=[],this.rebuildQuadtree()):(this.scene=c,this.rebuildQuadtree(),this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,e),this.version++)}applyRotation(t,e){const n=this.projection;if(!n||!n.rotate)return;const i=this.geoPath,o=this.scales,r=[...n.rotate()];n.rotate(t),this.geoPath=Wt(n),this.scales={projection:n,geoPath:this.geoPath,projectedPoint:(t,e)=>n([t,e]),invertedPoint:(t,e)=>n.invert?n.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const s=this.buildSceneNodes(e);this._customLayoutFailedThisBuild?this.lastCustomLayoutFailure?.preservedLastGoodScene?(n.rotate(r),this.geoPath=i,this.scales=o):(this.scene=[],this.rebuildQuadtree()):(this.scene=s,this.rebuildQuadtree(),this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,e),this.version++)}setRotation(t){const e=this.projection;e&&e.rotate&&e.rotate(t)}hasProjection(){return null!=this.projection}getRotation(){return this.projection?.rotate?.()??this.baseRotation}getBaseProjectionState(){return{scale:this.baseScale,translate:[...this.baseTranslate]}}getPoints(){return this.streaming&&this.pointBuffer?this.pointBuffer.toArray():this.pointData}rebuildQuadtree(){let e=0,n=0;for(const t of this.scene)"point"===t.type&&(n++,t.r>e&&(e=t.r));if(this._maxPointRadius=e,t.QUADTREE_THRESHOLD>=n)return void(this._quadtree=null);const i=Array(n);let o=0;for(const t of this.scene)"point"===t.type&&(i[o++]=t);this._quadtree=Ot().x(t=>t.x).y(t=>t.y).addAll(i)}get quadtree(){return this._quadtree}get maxPointRadius(){return this._maxPointRadius}buildSceneNodes(t){this._customLayoutFailedThisBuild=!1;const{config:e}=this,n=this.projection,i=this.geoPath;if(e.customLayout&&this.scales){const n=e.layoutMargin??{top:0,right:0,bottom:0,left:0},i=F(e.colorScheme,e.themeCategorical,X),o={areas:this.areas.slice(),points:this.getPoints().slice(),lines:this.lineData.slice(),scales:this.scales,dimensions:{width:t.width,height:t.height,margin:n,plot:{x:0,y:0,width:t.width,height:t.height}},theme:{semantic:e.themeSemantic??{},categorical:[...i]},resolveColor:O(i,e.colorScheme),config:e.layoutConfig??{},selection:e.layoutSelection??null};let r;try{r=e.customLayout(o)}catch(t){const n=null!==this.lastCustomLayoutResult,i=R("geo",t,n,this.version);this.lastCustomLayoutFailure=i,this._customLayoutFailedThisBuild=!0,"production"!==process.env.NODE_ENV&&console.error("[semiotic] geo customLayout threw:",t);try{e.onLayoutError?.(i)}catch(t){"production"!==process.env.NODE_ENV&&console.error("[semiotic] onLayoutError threw:",t)}return n?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[])}const s=r.nodes??[];if(this.customLayoutOverlays=r.overlays??null,this.lastCustomLayoutResult=r,this.lastCustomLayoutFailure=null,this._customRestyle=r.restyle,this.hasCustomRestyle=!!r.restyle,this._baseStyles=new WeakMap,this.hasCustomRestyle){for(const t of s)this._baseStyles.set(t,t.style);this.restyleScene(e.layoutSelection??null)}return N({label:"geo customLayout",nodes:s,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),s}return this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,function({config:t,projection:e,path:n,areas:i,points:o,lines:r,layout:s}){const a=Yt(t.xAccessor,"lon"),c=Yt(t.yAccessor,"lat"),l=[],u=function(t){return{fill:t.themeSemantic?.surface||"#e0e0e0",stroke:t.themeSemantic?.border||"#999",strokeWidth:.5,fillOpacity:1}}(t),h=function(t){return{stroke:t.themeSemantic?.primary||"#4e79a7",strokeWidth:1.5,fill:"none"}}(t),d=function(t){return{fill:t.themeSemantic?.primary||"#4e79a7",r:4,fillOpacity:.8}}(t);if(t.graticule){const e=!0===t.graticule?{}:t.graticule,i=fe();e.step&&i.step(e.step);const o=n(i())||"";o&&l.push({type:"geoarea",pathData:o,centroid:[s.width/2,s.height/2],bounds:[[0,0],[s.width,s.height]],screenArea:0,style:{fill:"none",stroke:e.stroke||"#e0e0e0",strokeWidth:e.strokeWidth||.5,strokeDasharray:e.strokeDasharray||"2,2"},datum:null,interactive:!1})}for(const e of i){const i=n(e);if(!i)continue;const o=n.centroid(e),r=n.bounds(e),s=n.area(e);l.push({type:"geoarea",pathData:i,centroid:o,bounds:r,screenArea:s,style:Qt(t.areaStyle,e,u),datum:e,interactive:!0})}const p=Ut(t.lineDataAccessor);for(const n of r){const i=p(n);if(!i||2>i.length)continue;let o=[];if("geo"===t.lineType){const t=Array(i.length);for(let e=0;i.length>e;e++)t[e]=[a(i[e]),c(i[e])];for(let n=0;t.length-1>n;n++){const i=t[n],r=t[n+1],s=pe(i,r)||0,a=Math.max(2,Math.ceil(s/(Math.PI/180))),c=me(i,r);for(let t=0;a>=t;t++){if(n>0&&0===t)continue;const i=e(c(t/a));null!=i&&o.push(i)}}}else for(let t=0;i.length>t;t++){const n=i[t],r=e([a(n),c(n)]);null!=r&&o.push(r)}if(2>o.length)continue;const r=Qt(t.lineStyle,n,h),u="number"==typeof r.strokeWidth?r.strokeWidth:1;2!==i.length||2>o.length||"arc"!==t.flowStyle?2!==i.length||2>o.length||"offset"!==t.flowStyle||(o="geo"===t.lineType?Kt(o,u):Jt(o[0],o[o.length-1],0,0,u)):o=Vt(o[0],o[o.length-1]);const d=$t(o,s.width);if(d.length>1)for(const t of d)2>t.length||l.push({type:"line",path:t,style:{...r,_edgeFade:!0},datum:n});else l.push({type:"line",path:2>o.length&&d[0]||o,style:r,datum:n})}const f=t.pointIdAccessor?"function"==typeof t.pointIdAccessor?t.pointIdAccessor:e=>e[t.pointIdAccessor]:null,m=e.clipAngle?e.clipAngle()??0:0,g=m>0?m*Math.PI/180:null,y=e.rotate?e.rotate():[0,0,0],v="function"==typeof e.center?e.center():[0,0],b=[(v[0]??0)-y[0],(v[1]??0)-y[1]];for(const n of o){const i=a(n),o=c(n);if(null!=g&&pe([i,o],b)>g)continue;const r=e([i,o]);if(!r)continue;const s=t.pointStyle?t.pointStyle(n):{...d},u={type:"point",x:r[0],y:r[1],r:s.r||4,style:s,datum:n,pointId:f?f(n)+"":void 0};l.push(u)}return l}({config:e,projection:n,path:i,areas:this.areas,points:this.getPoints(),lines:this.lineData,layout:t})}applyCartogramTransform(t,e){const n=function(t,e,n,i){const o=t.filter(t=>"point"===t.type);if(2>o.length)return null;const r=e.strength??1,s="strip"===e.layout?"strip":"radial";if("radial"===s&&0===r)return null;const a=e.centerAccessor?"function"==typeof e.centerAccessor?e.centerAccessor:t=>t[e.centerAccessor]:t=>t.id,c="function"==typeof e.costAccessor?e.costAccessor:t=>t[e.costAccessor],l=o.find(t=>t.datum&&a(t.datum)+""==e.center+"");if(!l)return"production"!==process.env.NODE_ENV&&console.warn(`GeoFrame: Distance cartogram center "${e.center}" not found in point data`),null;const u=o.map(t=>t.datum?Number(c(t.datum)):NaN).filter(t=>isFinite(t)&&t>=0),h=Rt(u,1);i>0&&"production"!==process.env.NODE_ENV&&console.warn("GeoFrame: Distance cartogram does not support area rendering. Areas will be ignored. Remove areas or set projectionTransform to null to render them.");for(let e=t.length-1;e>=0;e--){const n=t[e];"geoarea"===n.type&&n.interactive&&t.splice(e,1)}const d="strip"===s?function(t,e,n,i,o){const r=Math.max(3,Math.min(8,.35*o.height)),s=Math.max(1,o.width-2*r),a=o.height/2,c=te().domain([0,i]).range([0,s]);e.x=r,e.y=a;const l=[];for(const i of t){if(i===e)continue;if(!i.datum){i.x=r,i.y=a;continue}const t=Number(n(i.datum)),o=r+(isFinite(t)&&t>=0?c(t):0);i.x=o,i.y=a,l.push({node:i,x:o})}l.sort((t,e)=>t.x-e.x);const u=Math.max(0,Math.min(o.height/2-1,6));let h=0;for(;l.length>h;){let t=h+1;for(;l.length>t&&3>Math.abs(l[t].x-l[h].x);)t++;const e=t-h;if(e>1&&u>0)for(let t=0;e>t;t++)l[h+t].node.y=a+(t-(e-1)/2)*Math.min(2.5,2*u/Math.max(1,e-1));h=t}return{cx:r,cy:a,maxCost:i,availableRadius:s,layout:"strip"}}(o,l,c,h,n):function(t,e,n,i,o,r){const s=e.x,a=e.y,c=Math.min(r.width,r.height)/2,l=te().domain([0,i]).range([0,c]);for(const i of t){if(i===e)continue;if(!i.datum)continue;const t=Math.atan2(i.y-a,i.x-s),r=Math.sqrt((i.x-s)**2+(i.y-a)**2),c=Number(n(i.datum)),u=r+((isFinite(c)?l(c):r)-r)*o;i.x=s+Math.cos(t)*u,i.y=a+Math.sin(t)*u}const u=r.width/2,h=r.height/2,d=u-e.x,p=h-e.y;if(Math.abs(d)>.5||Math.abs(p)>.5)for(const e of t)e.x+=d,e.y+=p;return{cx:u,cy:h,maxCost:i,availableRadius:c,layout:"radial"}}(o,l,c,h,r,n),p=t.filter(t=>"line"===t.type);if(p.length>0&&"fractional"!==e.lineMode){const t=new Map;for(const e of o)e.pointId&&t.set(e.pointId,[e.x,e.y]);for(const e of p){const n=e.datum?.source,i=e.datum?.target;if(n&&i){const o=t.get(n+""),r=t.get(i+"");o&&r&&(e.path=[o,r])}}}return d}(this.scene,t,e,this.areas.length);n&&(this.cartogramLayout=n)}applyDecay(){const t=this.config.decay;if(!t||!this.pointBuffer)return;const e=this.pointBuffer.size;if(0===e)return;const n=this.scene.filter(t=>"point"===t.type);for(let i=0;n.length>i;i++){const o=L(t,i,e);n[i]._decayOpacity=o,n[i].style={...n[i].style,opacity:o}}}applyPulse(t=this.currentTime()){const e=this.config.pulse;if(!e||!this.timestampBuffer)return!1;const n=this.scene.filter(t=>"point"===t.type),i=this.timestampBuffer.toArray(),o=e.color||"rgba(255,255,255,0.6)",r=e.glowRadius??4;let a=!1;for(let c=0;n.length>c&&i.length>c;c++){const l=s(e,i[c],t);a=h(n[c],l,o,r)||a}return a}refreshPulse(t){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(t)}hasActivePulsesAt(t){return!!this.config.pulse&&a(this.config.pulse,this.timestampBuffer,t)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}startTransition(t){const e=this.config.transition?.duration??300;if(0>=e)return;const n=new Map;for(const e of t)"point"===e.type&&e.pointId&&n.set(e.pointId,[e.x,e.y]);const i=this.scene.filter(t=>"point"===t.type);let o=!1;for(const t of i)if(t.pointId){const e=n.get(t.pointId);e&&(t._targetX=t.x,t._targetY=t.y,t.x=e[0],t.y=e[1],(Math.abs(e[0]-t._targetX)>.5||Math.abs(e[1]-t._targetY)>.5)&&(o=!0))}for(const t of i)t.pointId&&!n.has(t.pointId)&&(t._targetOpacity=t.style?.opacity??1,t.style={...t.style,opacity:0},o=!0);o&&(this.activeTransition={startTime:this.currentTime(),duration:e})}cancelIntroAnimation(){this.activeTransition=null}advanceTransition(t){if(!this.activeTransition)return!1;const e=nt(t,this.activeTransition),n=et(e),i=this.scene.filter(t=>"point"===t.type);for(const t of i){if(null!=t._targetX&&null!=t._targetY){const e=t.y;t.x=ht(t.x,t._targetX,n),t.y=ht(e,t._targetY,n)}null!=t._targetOpacity&&(t.style={...t.style,opacity:t._targetOpacity*n})}if(e>=1){for(const t of i)null!=t._targetX&&(t.x=t._targetX,t.y=t._targetY,t._targetX=void 0,t._targetY=void 0),null!=t._targetOpacity&&(t.style={...t.style,opacity:t._targetOpacity},t._targetOpacity=void 0);return this.activeTransition=null,!1}return!0}};ye.QUADTREE_THRESHOLD=500;var ve=ye;function be(t,e,n,i,o,r,s=0,a=i){if(r){const t=A(r,e,n,i,s);if(t)return t}else{let o=null,r=i;for(const s of t){if("point"!==s.type)continue;const t=s.x-e,a=s.y-n,c=Math.sqrt(t*t+a*a);C(s.r,i)>=c&&r>c&&(o=s,r=c)}if(o)return{node:o,distance:r}}let c=null,l=i;for(const o of t){if("glyph"!==o.type)continue;if(null==o.datum)continue;const t=At(o.glyph,o.size),r=o.x+t.centerDx-e,s=o.y+t.centerDy-n,a=Math.sqrt(r*r+s*s);C(t.radius,i)>=a&&l>a&&(c=o,l=a)}if(c)return{node:c,distance:l};for(let i=t.length-1;i>=0;i--){const r=t[i];if("geoarea"!==r.type)continue;const s=r;if(!1===s.interactive)continue;const[[a,c],[l,u]]=s.bounds;if(!(a>e||e>l||c>n||n>u)&&(s._cachedPath2D||(s._cachedPath2D=new Path2D(s.pathData)),o.isPointInPath(s._cachedPath2D,e,n)))return{node:s,distance:0}}let u=null,h=a;for(const i of t){if("line"!==i.type)continue;const t=i,{path:o}=t,r=Math.max((t.style.strokeWidth||2)+4,5,a);for(let i=0;o.length-1>i;i++){const[s,a]=o[i],[c,l]=o[i+1],d=we(e,n,s,a,c,l);r>=d&&h>d&&(u=t,h=d)}}return u?{node:u,distance:h}:null}function we(t,e,n,i,o,r){const s=o-n,a=r-i,c=s*s+a*a;if(0===c)return Math.sqrt((t-n)**2+(e-i)**2);let l=((t-n)*s+(e-i)*a)/c;return l=Math.max(0,Math.min(1,l)),Math.sqrt((t-(n+l*s))**2+(e-(i+l*a))**2)}b(ve);import{useMemo as Pe,useRef as xe}from"react";import{jsx as Le,jsxs as Re}from"react/jsx-runtime";function Se(t){const{width:e,height:n,totalWidth:i,totalHeight:o,margin:r,showAxes:s,title:a,legend:c,legendHoverBehavior:l,legendClickBehavior:u,legendHighlightedCategory:h,legendIsolatedCategories:d,legendPosition:p,legendLayout:f,foregroundGraphics:m,annotations:g,onAnnotationActivate:y,onObservation:v,chartId:b,chartType:w,autoPlaceAnnotations:P,svgAnnotationRules:x,pointNodes:L,geoProjection:R}=t,A=wt({onAnnotationActivate:y,onObservation:v,chartId:b,chartType:w}),k=xe([g?.length??0,new Map]),C=g?.length??0;k.current[0]!==C&&(k.current=[C,new Map]);const j=Pe(()=>{if(!g||0===g.length)return null;const t=S(g),i=R?t.map(t=>{if(!Array.isArray(t.coordinates)||2>t.coordinates.length)return t;const e=R(Number(t.coordinates[0]),Number(t.coordinates[1]));return e?{...t,x:e[0],y:e[1]}:t}):t,o={scales:{x:t=>Number(t),y:t=>Number(t)},timeAxis:"x",width:e,height:n,frameType:"xy",pointNodes:L,stickyPositionCache:k.current[1]},r=P?K({annotations:i,context:o,..."object"==typeof P?P:{}}):i;return gt(r,it("xy",A),x,o)},[g,P,x,e,n,L,A,R]);return s||a||c||m||j&&j.length>0?Re("svg",{role:"img",width:i,height:o,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[Le("title",{children:"string"==typeof a?a:"XY Chart"}),Le("desc",{children:"string"==typeof a?a+" (XY data visualization)":"XY data visualization"}),Re("g",{transform:"translate("+r.left+","+r.top+")",children:[j,m]}),a&&"string"==typeof a?Le("text",{x:i/2,y:$,textAnchor:"middle",fontWeight:"bold",fill:"var(--semiotic-text, #333)",className:"semiotic-chart-title",style:{userSelect:"none",fontSize:"var(--semiotic-title-font-size, 14px)"},children:a}):a?Le("foreignObject",{x:0,y:0,width:i,height:r.top,children:a}):null,yt({legend:c,totalWidth:i,totalHeight:o,margin:r,legendPosition:p,title:a,legendLayout:f,legendHoverBehavior:l,legendClickBehavior:u,legendHighlightedCategory:h,legendIsolatedCategories:d})]}):null}import{zoom as Ae,zoomIdentity as ke}from"d3-zoom";import{select as Ce}from"d3-selection";function je([t,e,n]){const i=1<<n;return[t-Math.floor(t/i)*i,e,n]}function De(t,e,n,i,o){return"function"==typeof t?t(e,n,i,o):t.replace("{z}",e+"").replace("{x}",n+"").replace("{y}",i+"").replace("{r}",o>1?"@2x":"")}var Me=class{constructor(t=256){this.cache=new Map,this.limit=t}get(t){const e=this.cache.get(t);return e&&(e.lastUsed=performance.now()),e}set(t,e){this.cache.set(t,e),this.cache.size>this.limit&&this.evict()}evict(){for(;this.cache.size>this.limit;){let t,e=1/0;for(const[n,i]of this.cache)e>i.lastUsed&&(e=i.lastUsed,t=n);if(!t)break;{const e=this.cache.get(t);e&&(e.img.onload=null,e.img.onerror=null,e.img.src=""),this.cache.delete(t)}}}clear(){for(const t of this.cache.values())t.img.onload=null,t.img.onerror=null,t.img.src="";this.cache.clear()}};var Te=class{constructor(t){this.capacity=t,this.particles=Array(t);for(let e=0;t>e;e++)this.particles[e]={t:0,offset:0,lineIndex:0,active:!1,x:0,y:0}}spawn(t,e=Math.random){for(let n=0;this.capacity>n;n++){const i=this.particles[n];if(!i.active)return i.active=!0,i.t=0,i.offset=.6*(e()-.5),i.lineIndex=t,i.x=0,i.y=0,i}return null}step(t,e,n,i){for(let o=0;this.capacity>o;o++){const r=this.particles[o];if(!r.active)continue;const s=n[r.lineIndex];if(!s||2>s.length){r.active=!1;continue}if(r.t+=t*e,r.t>=1){r.active=!1;continue}const a=Be(s),c=Ie(s,r.t*a),l=(i[r.lineIndex]||2)/2;r.x=c.x+c.nx*r.offset*l*2,r.y=c.y+c.ny*r.offset*l*2}}countForLine(t){let e=0;for(let n=0;this.capacity>n;n++)this.particles[n].active&&this.particles[n].lineIndex===t&&e++;return e}clear(){for(let t=0;this.capacity>t;t++)this.particles[t].active=!1}};function Be(t){let e=0;for(let n=1;t.length>n;n++){const i=t[n][0]-t[n-1][0],o=t[n][1]-t[n-1][1];e+=Math.sqrt(i*i+o*o)}return e}function Ie(t,e){let n=0;for(let i=1;t.length>i;i++){const o=t[i][0]-t[i-1][0],r=t[i][1]-t[i-1][1],s=Math.sqrt(o*o+r*r);if(n+s>=e||i===t.length-1){const a=s>0?(e-n)/s:0,c=s>.001?s:1;return{x:t[i-1][0]+o*a,y:t[i-1][1]+r*a,nx:-r/c,ny:o/c}}n+=s}const i=t[t.length-1];return{x:i[0],y:i[1],nx:0,ny:0}}function _e(t){if(!t)return;const e=[];for(const n of t)if("point"===n.type)e.push(n);else if("glyph"===n.type){const t=n,i=At(t.glyph,t.size);e.push({pointId:t.pointId,x:t.x+i.centerDx,y:t.y+i.centerDy,r:i.radius})}return e}import{jsx as Ee,jsxs as Ne}from"react/jsx-runtime";function We({data:t}){if(!t)return null;if(t.properties)return Ee("div",{className:"semiotic-tooltip",style:ot,children:Ee("div",{style:{fontWeight:600},children:t.properties.name||t.properties.NAME||t.properties.id||"Feature"})});const e=null!=t.data?t.data:t;if(!e||"object"!=typeof e)return null;const n=bt(e),i=null!=n.title?n.title+"":null;return null==i&&0===n.entries.length?null:Ne("div",{className:"semiotic-tooltip",style:ot,children:[null!=i&&Ee("div",{style:{fontWeight:600,marginBottom:n.entries.length?2:0},children:i}),n.entries.map(t=>Ne("div",{children:[Ne("span",{style:{opacity:.7},children:[t.key,": "]}),Ee("span",{style:{fontWeight:600},children:k(t.value)})]},t.key))]})}We.ownsChrome=!0;var Oe={top:10,right:10,bottom:10,left:10},Fe=null;function He(){if(null!==Fe)return Fe;if("undefined"==typeof window)return!1;const t="function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,e="undefined"!=typeof navigator&&"number"==typeof navigator.hardwareConcurrency&&4>=navigator.hardwareConcurrency,n="undefined"!=typeof navigator&&"number"==typeof navigator.deviceMemory&&4>=navigator.deviceMemory;return Fe=t||e||n}function ze(){return He()?12:30}var Ge={width:28,height:28,border:"1px solid rgba(0,0,0,0.2)",borderRadius:4,background:"rgba(255,255,255,0.9)",color:"#333",fontSize:16,fontWeight:600,lineHeight:1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:0,boxShadow:"0 1px 3px rgba(0,0,0,0.1)"};function qe(t){return"string"==typeof t?t:"object"==typeof t&&t&&"type"in t?t.type:null}function Ze(t){return t?t.getContext("2d"):null}import{jsx as Xe,jsxs as Ye}from"react/jsx-runtime";var Ue=Nt(Et(function(t,e){const{projection:o,projectionExtent:r,fitPadding:s,projectionTransform:a,areas:l,points:h,lines:b,customLayout:w,layoutConfig:P,layoutSelection:L,onLayoutError:R,xAccessor:S,yAccessor:A,lineDataAccessor:k,pointIdAccessor:C,lineIdAccessor:N,lineType:O="geo",flowStyle:F="basic",graticule:X,zoomable:$,zoomExtent:V,onZoom:K,dragRotate:et,showParticles:nt,particleStyle:it,tileURL:ot,tileAttribution:ht,tileCacheSize:dt,size:pt,width:gt,height:yt,responsiveWidth:bt,responsiveHeight:wt,margin:Rt,className:At,background:kt,windowSize:Et=500,renderMode:Nt,areaStyle:Wt,pointStyle:Ot,lineStyle:Ft,colorScheme:Ht,enableHover:zt=!0,hoverAnnotation:Gt,tooltipContent:qt,allowTooltipOverflow:Zt=!1,customClickBehavior:Xt,customHoverBehavior:Yt,onObservation:Ut,annotationObservationCallback:Qt,chartId:$t,annotations:Vt,onAnnotationActivate:Kt,autoPlaceAnnotations:Jt,svgAnnotationRules:te,decay:ee,pulse:ne,transition:ie,animate:oe,staleness:re,frameScheduler:se,clock:ae,random:ce,seed:le,paused:ue=!1,suspendWhenHidden:he=!0,backgroundGraphics:de,foregroundGraphics:pe,title:fe,legend:me,legendPosition:ge,legendLayout:ye,legendHoverBehavior:we,legendClickBehavior:Pe,legendHighlightedCategory:xe,legendIsolatedCategories:Le,legendCategoryAccessor:Re,onCategoriesChange:Be,showAxes:Ie,accessibleTable:Ee=!0,description:Ne,summary:Fe}=t,{customHoverBehavior:Ue,customClickBehavior:Qe,hasClickBehavior:$e}=f({customHoverBehavior:Yt,customClickBehavior:Xt,onObservation:Ut,chartId:$t,chartType:"StreamGeoFrame"}),Ve=pt||[gt||600,yt||400],Ke=Dt(!0),Je=Pt({sizeProp:Ve,responsiveWidth:bt,responsiveHeight:wt,userMargin:Rt,marginDefault:Oe,title:fe,legend:me,legendPosition:ge,foregroundGraphics:pe,backgroundGraphics:de,animate:oe,transitionProp:ie,frameScheduler:se,clock:ae,random:ce,seed:le,paused:ue,suspendWhenHidden:he,themeDirtyRef:Ke}),{reducedMotionRef:tn,responsiveRef:en,size:nn,margin:on,adjustedWidth:rn,adjustedHeight:sn,resolvedForeground:an,resolvedBackground:cn,transition:ln,introEnabled:un,tableId:hn,frameRuntime:dn,rafRef:pn,renderFnRef:fn,scheduleRender:mn,currentTheme:gn}=Je,yn=Ct(),vn=jt(),bn=Bt(()=>Array.isArray(l)?rt(l):l,[l]),wn=Bt(()=>rt(h),[h]),Pn=Bt(()=>rt(b),[b]),xn=Bt(()=>null!=et?et:"orthographic"===qe(o),[et,o]),Ln=Bt(()=>({projection:o,projectionExtent:r,fitPadding:s,xAccessor:S,yAccessor:A,lineDataAccessor:k,lineType:O,flowStyle:F,areaStyle:Wt,pointStyle:Ot,lineStyle:Ft,colorScheme:Ht,themeSemantic:St(gn),themeSequential:gn?.colors?.sequential,themeDiverging:gn?.colors?.diverging,themeCategorical:gn?.colors?.categorical,graticule:X,projectionTransform:a,windowSize:Et,clock:dn.now,decay:ee,pulse:ne,transition:ln,introAnimation:un,annotations:Vt,pointIdAccessor:C,lineIdAccessor:N,customLayout:w,layoutConfig:P,onLayoutError:R,layoutMargin:on}),[o,r,s,S,A,k,O,F,Wt,Ot,Ft,Ht,gn,X,a,Et,dn.now,ee,ne,ln,un,Vt,C,N,w,P,R,on]),Rn=_(Ln),Sn=Dt(null);Sn.current||(Sn.current=new ve(Rn));const An=Dt(null),kn=Dt(null),Cn=Dt(null);ot&&!Cn.current&&(Cn.current=new Me(dt||256));const jn=Dt(Vt),Dn=Dt(null),Mn=Dt(ke),Tn=Dt(!1),Bn=Dt(null),In=It(t=>{Bn.current=t,en&&"object"==typeof en&&(en.current=t)},[en]),_n=Dt(null),En=Dt(null),Nn=Dt(null),Wn=Dt(0);if(nt&&!Nn.current){const t=it?.maxPerLine??ze();Nn.current=new Te(50*t)}const On=Dt(null),Fn=Dt(null),Hn=Dt(!1),zn=Dt(!1),Gn=Lt("StreamGeoFrame"),qn=Dt(void 0),[Zn,Xn]=Mt(null),[,Yn]=Mt(0),Un=Dt(0),[Qn,$n]=Mt(!1),Vn=p(Sn,Re,Be,t=>t.getPoints());B(Sn,Rn,Ke,mn),I(Sn,L,Ke,mn),Tt(()=>{const t=Sn.current;t&&(bn&&t.setAreas(bn),h&&t.setPoints(wn),b&&t.setLines(Pn),Ke.current=!0,mn())},[bn,h,wn,b,Pn,mn]);const Kn=It(t=>{null!=t&&"object"==typeof t&&(Sn.current?.pushPoint(t),Ke.current=!0,mn())},[mn]),Jn=It(t=>{const e=rt(t);0!==e.length&&(Sn.current?.pushMany(e),Ke.current=!0,mn())},[mn]),ti=It(t=>{null!=t&&"object"==typeof t&&(Sn.current?.pushLine(t),Ke.current=!0,mn())},[mn]),ei=It(t=>{const e=rt(t);0!==e.length&&(Sn.current?.pushManyLines(e),Ke.current=!0,mn())},[mn]),ni=It(()=>{Sn.current?.clear(),Ke.current=!0,mn()},[mn]);_t(e,()=>({push:Kn,pushMany:Jn,removePoint:t=>{const e=Sn.current?.removePoint(t)??[];return e.length>0&&(Ke.current=!0,mn()),e},pushLine:ti,pushManyLines:ei,removeLine:t=>{const e=Sn.current?.removeLine(t)??[];return e.length>0&&(Ke.current=!0,mn()),e},getLines:()=>Sn.current?.getLines()??[],clear:ni,getProjection:()=>Sn.current?.scales?.projection??null,getGeoPath:()=>Sn.current?.scales?.geoPath??null,getCartogramLayout:()=>Sn.current?.cartogramLayout??null,getCustomLayout:()=>Sn.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>Sn.current?.lastCustomLayoutFailure??null,getZoom:()=>Mn.current.k,resetZoom:()=>{const t=Bn.current;t&&Dn.current&&Ce(t).call(Dn.current.transform,ke)},getData:()=>Sn.current?.getPoints()??[]}),[Kn,Jn,ti,ei,ni,mn]);const{hoverHandlerRef:ii,onPointerMove:oi,onPointerLeave:ri}=Je,{canvasRef:si,interactionCanvasRef:ai}=xt(Je,{hydrated:yn,wasHydratingFromSSR:vn,storeRef:Sn,dirtyRef:Ke,cleanup:()=>Cn.current?.clear(),canvasPaintDependencies:[rn,sn,kt,de,Nt,mn]});Tt(()=>{ii.current=t=>{if(!zt)return;const e=Sn.current;if(!e||!e.scene.length)return;const n=si.current;if(!n)return;const i=n.getBoundingClientRect(),o=t.clientX-i.left-on.left,r=t.clientY-i.top-on.top;if(0>o||o>rn||0>r||r>sn)return On.current=null,Fn.current=null,Xn(null),Ue?.(null),void mn();kn.current||(kn.current="undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"));const s=Ze(kn.current);if(!s)return;const a=ct(30,t.pointerType),c=ct(6,t.pointerType),l=be(e.scene,o,r,a,s,e.quadtree,e.maxPointRadius,c);if(l){const t=l.node,e=t.datum,n=Array.isArray(e)?null:e?.properties?e:e?.data||e;let i,s;"point"===t.type?(i=t.x,s=t.y):"geoarea"===t.type?(i=t.centroid[0],s=t.centroid[1]):(i=o,s=r);const a={...n,...n?.properties||{},data:n,properties:n?.properties,__semioticHoverData:!0,x:i,y:s};On.current=a,Fn.current=t,Xn(a),Ue?.(a),mn()}else On.current&&(On.current=null,Fn.current=null,Xn(null),Ue?.(null),mn())}},[zt,rn,sn,on,Ue,mn,ii,si]),Je.hoverLeaveRef.current=()=>{On.current=null,Fn.current=null,Xn(null),Ue?.(null),mn()};const ci=It(t=>{if(lt(t.target))return;if(!Qe)return;const e=Sn.current;if(!e||!e.scene.length)return void Qe(null);const n=t.currentTarget.getBoundingClientRect(),i=t.clientX-n.left-on.left,o=t.clientY-n.top-on.top;if(0>i||i>rn||0>o||o>sn)return void Qe(null);kn.current||(kn.current="undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"));const r=Ze(kn.current);if(!r)return void Qe(null);const s=ct(30,qn.current),a=ct(6,qn.current),c=be(e.scene,i,o,s,r,e.quadtree,e.maxPointRadius,a);if(c){const t=c.node.datum,e=Array.isArray(t)?null:t?.properties?t:t?.data||t,n=e?.properties?{...e,...e.properties}:e;return void Qe({...n,data:e,properties:e?.properties,__semioticHoverData:!0,x:i,y:o,time:i,value:o},{type:"activate",inputType:ft(qn.current)})}Qe(null)},[sn,rn,Qe,on]),{kbFocusIndexRef:li,focusedNavPointRef:ui,onKeyDown:hi}=d({storeRef:Sn,hoverRef:On,hoveredNodeRef:Fn,setHoverPoint:Xn,customHoverBehavior:Ue,customClickBehavior:Qe,scheduleRender:mn}),di=It(t=>{qn.current=t.pointerType,li.current=-1,ui.current=null,oi(t)},[ui,li,oi]),pi=It(t=>{qn.current=t.pointerType},[]);fn.current=()=>{if(pn.current=null,!dn.isActive)return;const t=si.current,e=Sn.current;if(!t||!e)return;const o=dn.now();let r=!1;const s=En.current;let a=!1;s&&(En.current=null,e.applyRotation(s,{width:rn,height:sn}),a=!0);const l=e.advanceTransition(tn.current?o+1e6:o),h=!tn.current&&l,d=Gn.current.beforeCompute(e.getLastUpdateResult(),h);let p=!1;if(Ke.current&&!l){const n={width:rn,height:sn},i=e.hasProjection(),o=xn&&i?e.getRotation():null;e.computeScene(n);const r=Mn.current,s=1!==r.k||0!==r.x||0!==r.y;xn&&o?s?(e.setRotation(o),e.applyZoomScale(r.k,n)):e.applyRotation(o,n):s&&e.applyZoomTransform(r,n),Ke.current=!1,p=!0,t.setAttribute("aria-label",tt(e.scene,"Geographic chart")),Vn()}Gn.current.afterCompute(d,p,!1);const f=at(),v=nt&&!tn.current&&!!Nn.current,b=e.consumeStylePaintPending(),w=u(e,o,p,zn),P=m({dirtyOrRebuilt:p,transitioning:h,continuous:v,liveEncoding:w.changed,forced:a||b});if(ot&&Cn.current){const t=An.current;if(t&&e.scales?.projection){const n=mt(t,nn,on,f);if(n){n.clearRect(-on.left,-on.top,nn[0],nn[1]),n.save(),n.beginPath(),n.rect(0,0,rn,sn),n.clip();const t=function(t,e){const{tileURL:n,projection:i,width:o,height:r,tileCache:s,onTileLoad:a}=e,c=i.scale(),l=i.translate(),u=function(t){const{size:e,scale:n,translate:i,clampX:o=!0,clampY:r=!0}=t,s=Math.max(Math.log(n)/Math.LN2-8,0),a=Math.round(s),c=1<<a,l=Math.pow(2,s-a+8),u=i[0]-n/2,h=i[1]-n/2,d=Math.max(o?0:-1/0,Math.floor((0-u)/l)),p=Math.min(o?c:1/0,Math.ceil((e[0]-u)/l)),f=Math.max(r?0:-1/0,Math.floor((0-h)/l)),m=Math.min(r?c:1/0,Math.ceil((e[1]-h)/l)),g=[];for(let t=f;m>t;++t)for(let e=d;p>e;++e)g.push([e,t,a]);return{tiles:g,translate:[u/l,h/l],scale:l}}({size:[o,r],scale:2*c*Math.PI,translate:l}),h=at();let d=!0;for(const e of u.tiles){const[i,o,r]=je(e),c=`${r}/${i}/${o}`;let l=s.get(c);if(!l){const t=new Image;t.crossOrigin="anonymous";const e={img:t,loaded:!1,key:c,lastUsed:performance.now()};s.set(c,e),t.onload=()=>{e.loaded=!0,a?.()},t.onerror=()=>{e.loaded=!0},t.src=De(n,r,i,o,h),l=e}if(!l.loaded){d=!1;continue}const p=u.scale;t.drawImage(l.img,(e[0]+u.translate[0])*p-.5,(e[1]+u.translate[1])*p-.5,p+1,p+1)}return d}(n,{tileURL:ot,projection:e.scales.projection,width:rn,height:sn,tileCache:Cn.current,onTileLoad:()=>mn()});n.restore(),t||(r=!0)}}}if(P){const i=mt(t,nn,on,f);if(!i)return;i.clearRect(-on.left,-on.top,nn[0],nn[1]),ot||y(i,{background:kt,hasBackgroundGraphics:!!de,width:rn,height:sn}),i.save(),i.beginPath(),i.rect(0,0,rn,sn),i.clip();const s=e.scene,a=e.scales,l={width:rn,height:sn};if(D({context:i,nodes:s,renderMode:Nt,pixelRatio:f,paintBuiltIn:t=>{!function(t,e){const n=e.filter(t=>"geoarea"===t.type);for(const e of n){if(!e.pathData)continue;e._cachedPath2D||(e._cachedPath2D=new Path2D(e.pathData));const n=e._cachedPath2D,i=J(t,e.style.fill)||"#e0e0e0";if("none"!==i&&(t.fillStyle=i,t.globalAlpha=(e._decayOpacity??1)*(e.style.fillOpacity??1),t.fill(n)),e.style.stroke&&"none"!==e.style.stroke){if(t.strokeStyle=vt(t,e.style.stroke)||e.style.stroke,t.lineWidth=e.style.strokeWidth||.5,t.globalAlpha=e._decayOpacity??1,e.style.strokeDasharray){const n=e.style.strokeDasharray.split(",").map(Number);t.setLineDash(n)}else t.setLineDash([]);t.stroke(n)}M(t,e,n),t.globalAlpha=1,t.setLineDash([])}}(i,t),n(i,t,a,l),c(i,t,a,l),j(i,t,a,l)}}),v&&Nn.current){const t=Nn.current,e=s.filter(t=>"line"===t.type);if(e.length>0){const n=it||{},s=.3*(n.speedMultiplier??1),a=n.maxPerLine??ze(),c=n.spawnRate??(He()?.06:.15),l=n.radius??2,u=n.opacity??.7,h=o/1e3,d=Wn.current>0?Math.min(h-Wn.current,.1):.016;Wn.current=h;const p=e.map(t=>t.path),f=e.map(t=>t.style.strokeWidth||2);for(let n=0;e.length>n;n++)dn.random()<c&&t.countForLine(n)<a&&t.spawn(n,dn.random);t.step(d,s,p,f),i.globalAlpha=u;for(let o=0;t.particles.length>o;o++){const r=t.particles[o];if(!r.active)continue;const s=e[r.lineIndex],a="function"==typeof n.color?n.color(s?.datum??{}):"source"!==n.color&&n.color?n.color:s?.style.stroke||"#fff";i.beginPath(),i.arc(r.x,r.y,l,0,2*Math.PI),i.fillStyle=a,i.fill()}i.globalAlpha=1,r=!0}}i.restore()}const x=Fn.current,L=!(!x||"geoarea"!==x.type&&"point"!==x.type),R=g(L,Hn.current),S=ai.current;if(S&&R){const t=mt(S,nn,on,f);if(t){if(t.clearRect(-on.left,-on.top,nn[0],nn[1]),x&&"geoarea"===x.type){const e=new Path2D(x.pathData);t.fillStyle="rgba(255, 255, 255, 0.3)",t.fill(e),t.strokeStyle="rgba(0, 0, 0, 0.5)",t.lineWidth=2,t.stroke(e)}if(x&&"point"===x.type){const e=x,n="object"==typeof Gt?Gt:void 0,o=n?.pointColor||i(x);t.beginPath(),t.arc(e.x,e.y,e.r+3,0,2*Math.PI),o?(t.save(),t.globalAlpha=.4,t.fillStyle=o,t.fill(),t.restore()):(t.fillStyle="rgba(255, 255, 255, 0.4)",t.fill()),t.strokeStyle=o||"rgba(0, 0, 0, 0.5)",t.lineWidth=2,t.stroke()}}Hn.current=L}const A=Vt!==jn.current;A&&(jn.current=Vt),(p||A||h&&Vt&&Vt.length>0)&&(p||A||o-Un.current>=33)&&(Yn(t=>t+1),Un.current=o),(h||null!=e.activeTransition||w.pending||r)&&mn()},E(re,Sn,Ke,mn,Qn,$n),Tt(()=>{if("production"!==process.env.NODE_ENV&&ot){const t=qe(o);t&&"mercator"!==t&&console.warn(`[StreamGeoFrame] tileURL is set but projection is "${t}". Raster tiles use Web Mercator and will not align with other projections.`)}},[ot,o]),Tt(()=>{const t=Bn.current;if(!$||!t)return Dn.current&&t&&(Ce(t).on(".zoom",null),Dn.current=null),void(t&&Ce(t).on("mousedown.rotate",null).on("touchstart.rotate",null));const[e,n]=V||[1,8],i={width:rn,height:sn};if(xn){let o=Mn.current.k;const r=t=>{o=Math.max(e,Math.min(n,t)),Mn.current=ke.scale(o);const r=Sn.current;r&&(r.applyZoomScale(o,i),Ke.current=!1,mn(),r.scales?.projection&&K?.({projection:r.scales.projection,zoom:r.currentZoom}))};Dn.current={scaleBy:(t,e)=>r(o*e),transform:(t,e)=>r(e?.k??1)};const s=t=>{t.preventDefault(),r(o*(0>t.deltaY?1.1:1/1.1))},a=t=>{const e=t.target;e&&(e.closest("button")||e.closest(".stream-geo-zoom-controls"))||(t.preventDefault(),r(1.5*o))};t.addEventListener("wheel",s,{passive:!1}),t.addEventListener("dblclick",a);const c=.4,l=e=>{if(0!==e.button)return;const n=e.target;if(n.closest("button")||n.closest(".stream-geo-zoom-controls"))return;const i=Sn.current;if(!i)return;const o=i.getRotation();_n.current={x:e.clientX,y:e.clientY,rotation:[...o]},t.setPointerCapture(e.pointerId),e.preventDefault()},u=t=>{const e=_n.current;e&&(En.current=[e.rotation[0]+(t.clientX-e.x)*c,Math.max(-90,Math.min(90,e.rotation[1]-(t.clientY-e.y)*c)),e.rotation[2]],mn())},h=e=>{if(!_n.current)return;_n.current=null,t.releasePointerCapture(e.pointerId);const n=En.current;if(n){En.current=null;const t=Sn.current;t&&(t.applyRotation(n,i),mn())}const o=Sn.current;o?.scales?.projection&&K?.({projection:o.scales.projection,zoom:o.currentZoom})};return t.addEventListener("pointerdown",l),t.addEventListener("pointermove",u),t.addEventListener("pointerup",h),t.addEventListener("pointercancel",h),()=>{t.removeEventListener("wheel",s),t.removeEventListener("dblclick",a),t.removeEventListener("pointerdown",l),t.removeEventListener("pointermove",u),t.removeEventListener("pointerup",h),t.removeEventListener("pointercancel",h),Dn.current=null}}const o=Ae().scaleExtent([e,n]).extent([[0,0],[nn[0],nn[1]]]).translateExtent([[-1/0,-1/0],[1/0,1/0]]).on("zoom",t=>{const e=t.transform;Mn.current=e,Tn.current=!0;const n=Sn.current;n&&(n.applyZoomTransform(e,i),Ke.current=!1,mn())}).on("end",t=>{Mn.current=t.transform,Tn.current=!1;const e=Sn.current;e?.scales?.projection&&K?.({projection:e.scales.projection,zoom:e.currentZoom})});return Dn.current=o,Ce(t).call(o),()=>{Ce(t).on(".zoom",null)}},[$,V,xn,nn,rn,sn,on,K,mn]);const fi=zt&&!1!==Gt,mi=fi&&Zn?qt?qt(Zn):Xe(We,{data:Zn}):null,gi=mi?Xe(q,{x:Zn.x,y:Zn.y,containerWidth:rn,containerHeight:sn,margin:on,className:"stream-frame-tooltip",zIndex:10,children:mi}):null;if(ut||!yn&&vn){const t=Sn.current;t&&(bn||h||b)&&(bn&&t.setAreas(bn),h&&t.setPoints(wn),b&&t.setLines(Pn),t.computeScene({width:rn,height:sn}));const e=t?.scene??[];return Ye("div",{ref:In,className:"stream-geo-frame"+(At?" "+At:""),role:"img","aria-label":Ne||("string"==typeof fe?fe:"Geographic chart"),style:{position:"relative",width:bt?"100%":nn[0],height:wt?"100%":nn[1]},children:[Xe(U,{summary:Fe}),Ye("svg",{xmlns:"http://www.w3.org/2000/svg",width:nn[0],height:nn[1],style:{position:"absolute",left:0,top:0},children:[Xe("g",{transform:`translate(${on.left},${on.top})`,children:cn}),Ye("g",{transform:`translate(${on.left},${on.top})`,children:[kt&&Xe("rect",{x:0,y:0,width:rn,height:sn,fill:kt}),e.map((t,e)=>T({node:t,index:e,renderMode:Nt,fallback:()=>st(t,e)}))]})]}),Xe(Se,{width:rn,height:sn,totalWidth:nn[0],totalHeight:nn[1],margin:on,showAxes:!1,title:fe,legend:me,legendPosition:ge,legendLayout:ye,legendHoverBehavior:we,legendClickBehavior:Pe,legendHighlightedCategory:xe,legendIsolatedCategories:Le,foregroundGraphics:x(an,W(Sn.current?.customLayoutOverlays,L??null)),annotations:Vt,onAnnotationActivate:Kt,onObservation:Qt??Ut,chartId:$t,chartType:"StreamGeoFrame",autoPlaceAnnotations:Jt,svgAnnotationRules:te,pointNodes:_e(e),geoProjection:Sn.current?.scales?.projectedPoint})]})}return Ye("div",{ref:In,className:"stream-geo-frame"+(At?" "+At:""),role:"group","aria-label":Ne||("string"==typeof fe?fe:"Geographic chart"),tabIndex:0,style:{position:"relative",width:bt?"100%":nn[0],height:wt?"100%":nn[1],overflow:Zt?"visible":"hidden",...$?{touchAction:"none"}:{}},onKeyDown:hi,children:["production"!==process.env.NODE_ENV&&Sn.current&&Xe(Y,{store:Sn.current,diagnostics:Gn.current}),Ee&&Xe(Q,{tableId:hn}),Ee&&Xe(H,{scene:Sn.current?.scene??[],chartType:"Geographic chart",tableId:hn,chartTitle:"string"==typeof fe?fe:void 0}),Xe(U,{summary:Fe}),Xe(z,{hoverPoint:Zn}),Ye("div",{role:"img","aria-label":Ne||("string"==typeof fe?fe:"Geographic chart"),style:{position:"relative",width:"100%",height:"100%"},onPointerMove:fi?di:void 0,onPointerLeave:fi?ri:void 0,onPointerDown:fi||$e?pi:void 0,onClick:$e?ci:void 0,children:[Xe(G,{size:nn,margin:on,children:cn}),ot&&Xe("canvas",{ref:An,style:{position:"absolute",left:0,top:0,pointerEvents:"none"}}),Xe("canvas",{ref:si,"aria-label":tt(Sn.current?.scene??[],"Geographic chart"),style:{position:"absolute",left:0,top:0}}),Xe("canvas",{ref:ai,style:{position:"absolute",left:0,top:0,pointerEvents:"none"}}),Xe(Se,{width:rn,height:sn,totalWidth:nn[0],totalHeight:nn[1],margin:on,showAxes:Ie,title:fe,legend:me,legendPosition:ge,legendLayout:ye,legendHoverBehavior:we,legendClickBehavior:Pe,legendHighlightedCategory:xe,legendIsolatedCategories:Le,foregroundGraphics:x(an,W(Sn.current?.customLayoutOverlays,L??null)),annotations:Vt,onAnnotationActivate:Kt,onObservation:Qt??Ut,chartId:$t,chartType:"StreamGeoFrame",autoPlaceAnnotations:Jt,svgAnnotationRules:te,pointNodes:_e(Sn.current?.scene),geoProjection:Sn.current?.scales?.projectedPoint}),re?.showBadge&&Xe(v,{isStale:Qn,position:re.badgePosition}),$&&Ye("div",{className:"stream-geo-zoom-controls",style:{position:"absolute",bottom:on.bottom+8,left:on.left+8,display:"flex",flexDirection:"column",gap:2,zIndex:2},children:[Xe("button",{type:"button","aria-label":"Zoom in",onClick:t=>{t.stopPropagation();const e=Bn.current,n=Dn.current;e&&n?.scaleBy&&n.scaleBy(Ce(e),1.5)},style:Ge,children:"+"}),Xe("button",{type:"button","aria-label":"Zoom out",onClick:t=>{t.stopPropagation();const e=Bn.current,n=Dn.current;e&&n?.scaleBy&&n.scaleBy(Ce(e),1/1.5)},style:Ge,children:"−"})]}),ht&&Xe("div",{className:"stream-geo-tile-attribution",style:{position:"absolute",bottom:on.bottom+2,right:on.right+4,fontSize:10,color:"rgba(0,0,0,0.6)",background:"rgba(255,255,255,0.7)",padding:"1px 4px",borderRadius:2,pointerEvents:"none",zIndex:2},children:ht}),Xe(Z,{active:li.current>=0,hoverPoint:Zn,margin:on,size:nn,shape:ui.current?.shape,width:ui.current?.w,height:ui.current?.h,pathData:ui.current?.pathData}),gi]})]})}));Ue.displayName="StreamGeoFrame";var Qe=Ue;import{forwardRef as $e,useMemo as Ve}from"react";import{jsx as Ke}from"react/jsx-runtime";var Je=$e(function(n,i){const{points:o,areas:r,lines:s,layout:a,layoutConfig:c,onLayoutError:l,projection:u="equirectangular",xAccessor:h="lon",yAccessor:d="lat",lineDataAccessor:p,colorBy:f,colorScheme:m,tooltip:g,annotations:y,margin:v,selection:b,linkedHover:x,onObservation:L,onClick:R,chartId:S,loading:A,loadingContent:k,emptyContent:C,className:j,frameProps:D={}}=n,{frameRef:M,resolved:T,normalizedMargin:B}=e({imperativeRef:i,imperativeVariant:"geo-points",margin:v,width:n.width,height:n.height,enableHover:n.enableHover,title:n.title,description:n.description,summary:n.summary,accessibleTable:n.accessibleTable,mode:n.mode,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,responsiveRules:n.responsiveRules}),I=Ve(()=>rt(o),[o]),_=Ve(()=>rt(r),[r]),E=Ve(()=>rt(s),[s]),N=Ve(()=>[...I,...E,..._],[I,E,_]),W=t({data:N,rawData:void 0!==o||void 0!==s||void 0!==r?N:void 0,colorBy:f,colorScheme:m,legendInteraction:void 0,selection:b,linkedHover:x,fallbackFields:"string"==typeof f?[f]:[],unwrapData:!1,onObservation:L,onClick:R,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,chartType:"GeoCustomChart",chartId:S,showLegend:!1,userMargin:B,marginDefaults:T.marginDefaults,loading:A,loadingContent:k,emptyContent:C,width:T.width,height:T.height}),O=W.effectiveSelectionHook,F=Ve(()=>O?.isActive?{isActive:!0,predicate:O.predicate}:null,[O?.isActive,O?.predicate]);if(W.earlyReturn)return W.earlyReturn;const{width:H,height:z,enableHover:G,title:q,description:Z,summary:X,accessibleTable:Y}=T,U=dt(g),Q={projection:u,...null!=o&&{points:I},...null!=r&&{areas:_},...null!=s&&{lines:E},xAccessor:h,yAccessor:d,...null!=p&&{lineDataAccessor:p},customLayout:a,layoutConfig:c,onLayoutError:l,layoutSelection:F,colorBy:f,colorScheme:m,size:[H,z],responsiveWidth:n.responsiveWidth,responsiveHeight:n.responsiveHeight,margin:W.margin,enableHover:G,...w({title:q,description:Z,summary:X,accessibleTable:Y,className:j,animate:n.animate,autoPlaceAnnotations:n.autoPlaceAnnotations}),...!1===g?{tooltipContent:()=>null}:U?{tooltipContent:U}:{},...P({linkedHover:x,selection:b,onObservation:L,onClick:R,hoverHighlight:!1,mobileInteraction:W.mobileInteraction,customHoverBehavior:W.customHoverBehavior,customClickBehavior:W.customClickBehavior,linkedHoverInClickPredicate:!1}),...y&&y.length>0&&{annotations:y},...D};return Ke(kt,{componentName:"GeoCustomChart",width:H,height:z,children:Ke(Qe,{ref:M,...Q})})});Je.displayName="GeoCustomChart";export{Qe as StreamGeoFrame_default,Je as GeoCustomChart};
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{buildNavGraph as t,extractGeoNavPoints as e,extractOrdinalNavPoints as r,extractXYNavPoints as n,navPointToHover as i,nextGraphIndex as s,nextIndex as o,renderCirclePulse as c,resolvePosition as u}from"./chunk-chunk-XXWSHGPL.module.min.js";import{emitClickObservations as a,emitHoverObservations as f,isInteractiveKeyboardTarget as l,resolveCanvasFill as h}from"./chunk-chunk-CWQ5YIHX.module.min.js";var p=class{constructor(t){if(this._capacity=t,this.head=0,this._size=0,1>t)throw Error("RingBuffer capacity must be at least 1");this.buffer=Array(t)}push(t){let e;return this._size===this._capacity?e=this.buffer[this.head]:this._size++,this.buffer[this.head]=t,this.head=(this.head+1)%this._capacity,e}pushMany(t){const e=[];for(const r of t){const t=this.push(r);void 0!==t&&e.push(t)}return e}get(t){if(t>=0&&this._size>t)return this.buffer[(this.head-this._size+t+this._capacity)%this._capacity]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let t=0;return{next:()=>this._size>t?{done:!1,value:this.get(t++)}:{done:!0,value:void 0}}}forEach(t){const e=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;this._size>r;r++)t(this.buffer[(e+r)%this._capacity],r)}toArray(){const t=Array(this._size),e=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;this._size>r;r++)t[r]=this.buffer[(e+r)%this._capacity];return t}resize(t){if(1>t)throw Error("RingBuffer capacity must be at least 1");const e=this.toArray();let r=0,n=[];e.length>t&&(r=e.length-t,n=e.slice(0,r)),this._capacity=t,this.buffer=Array(t),this.head=0,this._size=0;for(let t=r;e.length>t;t++)this.push(e[t]);return n}update(t,e){const r=[],n=(this.head-this._size+this._capacity)%this._capacity;for(let i=0;this._size>i;i++){const s=(n+i)%this._capacity,o=this.buffer[s];if(t(o)){let t;t="object"!=typeof o||null===o?o:Array.isArray(o)?[...o]:{...o},r.push(t),this.buffer[s]=e(o)}}return r}remove(t){const e=[],r=[];if(this.forEach(n=>{t(n)?r.push(n):e.push(n)}),0===r.length)return r;this.buffer=Array(this._capacity),this.head=0,this._size=0;for(const t of e)this.push(t);return r}clear(){this.buffer=Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}};function y(t,e,r,n){return"function"==typeof e.style?e.style(n||{},r):e.style&&"object"==typeof e.style?e.style:t.resolveBoundsStyle(r,n)}function d(t,e,r,n){if(!t.scales)return null;const i=[],s=[];for(const r of e){const e=t.getX(r);if(!Number.isFinite(e))continue;const o=n.getTop(r),c=n.getBottom(r);if(!Number.isFinite(o)||!Number.isFinite(c))continue;const u=t.scales.x(e),a=t.scales.y(o),f=t.scales.y(c);Number.isFinite(u)&&Number.isFinite(a)&&Number.isFinite(f)&&(i.push([u,a]),s.push([u,f]))}return 2>i.length?null:{type:"area",topPath:i,bottomPath:s,...t.config.curve&&"linear"!==t.config.curve&&{curve:t.config.curve},style:y(t,n,r,e[0]),datum:e,group:r,interactive:n.interactive}}function v(t){const e=[],r=[];if(!t)return{perSeries:e,aggregate:r};for(const n of t)n.perSeries?e.push(n):r.push(n);return{perSeries:e,aggregate:r}}function _(t,e,r){const n=[];for(const i of r){const r=d(t,e,"__ribbon_aggregate",i);r&&n.push(r)}return n}function g(t,e,r,n){const i=[];for(const s of n){const n=d(t,e,r,s);n&&i.push(n)}return i}function m(t,e){if(!t)return{};if(!e||0===e.length)return t;const r=[];for(const n of e){if("band"!==n.kind)continue;const e=n.getTop(t),i=n.getBottom(t);Number.isFinite(i)&&Number.isFinite(e)&&r.push({y0:i,y1:e})}return 0===r.length?t:{...t,band:r[0],bands:r}}function b(t,e,r,n){const i=n.current,s=!0===t.lastCustomLayoutFailure?.preservedLastGoodScene,o=!s&&t.hasActivePulsesAt(e),c=!(r||s||!o&&!i)&&t.refreshPulse(e);return n.current=o,{changed:c,pending:o}}import{useCallback as k,useRef as z}from"react";function A(t,e,r,n){const i=z({accessor:e,onChange:r,readData:n}),s=z([]);return i.current={accessor:e,onChange:r,readData:n},k(()=>{const{accessor:e,onChange:r,readData:n}=i.current;if(!r||!e)return;const o=function(t,e){if(!e)return[];const r=new Set,n=[];for(const i of t){if(!i||"object"!=typeof i)continue;const t="function"==typeof e?e(i):i[e];if(null==t)continue;const s=t+"";r.has(s)||(r.add(s),n.push(s))}return n}(t.current?n(t.current):[],e);(function(t,e){if(t.length!==e.length)return!1;for(let r=0;t.length>r;r++)if(t[r]!==e[r])return!1;return!0})(o,s.current)||(s.current=o,r(o))},[t])}var w=(t,e,r,n)=>{const i=e.filter(t=>"point"===t.type);if(0!==i.length){t.save();try{const e=t.globalAlpha;for(const r of i)t.beginPath(),t.arc(r.x,r.y,r.r,0,2*Math.PI),t.globalAlpha=e*(r.style.opacity??r.style.fillOpacity??1),t.fillStyle=h(t,r.style.fill,"#4e79a7"),t.fill(),r.style.stroke&&(t.strokeStyle=h(t,r.style.stroke,r.style.stroke),t.lineWidth=r.style.strokeWidth||1,t.stroke()),c(t,r)}finally{t.restore()}}};import{useCallback as R}from"react";function x({customHoverBehavior:t,customClickBehavior:e,onObservation:r,chartId:n,chartType:i}){return{customHoverBehavior:R((e,s)=>{t?.(e,s),f({onObservation:r,datum:e?e.data||e:null,x:e?.x,y:e?.y,chartType:i,chartId:n,context:s})},[n,i,t,r]),customClickBehavior:R((t,s)=>{e?.(t,s),a({onObservation:r,datum:t?t.data||t:null,x:t?.x,y:t?.y,chartType:i,chartId:n,context:s})},[n,i,e,r]),hasClickBehavior:!(!e&&!r)}}import{useCallback as C,useRef as P}from"react";function D({storeRef:e,hoverRef:r,hoveredNodeRef:n,setHoverPoint:i,customHoverBehavior:o,customClickBehavior:c,scheduleRender:a,extractPoints:f,toHover:h}){const p=P(-1),y=P(null),d=P(null),v=C(v=>{if(l(v))return;const _=e.current;if(!_)return;const g=()=>{p.current=-1,y.current=null,r.current=null,n&&(n.current=null),i(null),o(null),a()};if(0===_.scene.length)return void(0>p.current||g());let m;if(d.current?.version===_.version)m=d.current.graph;else{const e=f(_.scene);if(0===e.length)return void(0>p.current||g());m=t(e),d.current={version:_.version,graph:m}}let b=p.current;if(m.flat.length>b||(g(),b=-1),("Enter"===v.key||" "===v.key)&&b>=0)return v.preventDefault(),void c(h(m.flat[b],_),{type:"activate",inputType:"keyboard"});if(0>b){if("Escape"===v.key)return;if(!["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(v.key))return;v.preventDefault(),p.current=0;const t=m.flat[0];y.current=t;const e=h(t,_);return r.current=e,i(e),o(e,{type:"focus",inputType:"keyboard"}),void a()}const k=s(v.key,u(m,b),m);if(null===k)return;if(v.preventDefault(),0>k)return void g();p.current=k;const z=m.flat[k];y.current=z;const A=h(z,_);r.current=A,i(A),o(A,{type:"focus",inputType:"keyboard"}),a()},[c,o,f,r,n,a,i,e,h]);return{kbFocusIndexRef:p,focusedNavPointRef:y,onKeyDown:v}}function B(t){return D({...t,extractPoints:n,toHover:(t,e)=>i({...t,datum:m(t.datum,e.resolvedRibbons)})})}function H({chartType:t,oAccessor:e,rAccessor:n,...s}){return D({...s,extractPoints:r,toHover:r=>({...i(r),__oAccessor:"string"==typeof e?e:void 0,__rAccessor:"string"==typeof n?n:void 0,__chartType:t})})}function N(t){const e=t.datum;return{...e||{},...e?.properties||{},data:e,properties:e?.properties,x:t.x,y:t.y,__semioticHoverData:!0}}function T({storeRef:t,hoverRef:r,hoveredNodeRef:n,setHoverPoint:i,customHoverBehavior:s,customClickBehavior:c,scheduleRender:u}){const a=P(-1),f=P(null),h=C(h=>{if(l(h))return;const p=t.current;if(!p)return;const y=()=>{a.current=-1,f.current=null,r.current=null,n&&(n.current=null),i(null),s(null),u()};if(0===p.scene.length)return void(0>a.current||y());const d=e(p.scene);if(0===d.length)return void(0>a.current||y());let v=a.current;if(d.length>v||(y(),v=-1),("Enter"===h.key||" "===h.key)&&v>=0)return h.preventDefault(),void c(N(d[v]),{type:"activate",inputType:"keyboard"});const _=o(h.key,0>v?-1:v,d.length);if(null===_)return;if(h.preventDefault(),0>_)return void y();const g=0>v?0:_;a.current=g;const m=d[g];f.current=m;const b=N(m);r.current=b,i(b),s(b,{type:"focus",inputType:"keyboard"}),u()},[c,s,r,n,u,i,t]);return{kbFocusIndexRef:a,focusedNavPointRef:f,onKeyDown:h}}function F(t,e,r){const n=t.duration??500,i=r-e;return n>i?1-i/n:0}function I(t,e,r,n,i,s=("undefined"!=typeof performance?performance.now():Date.now())){const o=t.color??"rgba(255,255,255,0.6)",c=t.glowRadius??4;let u=!1;const a=i??(()=>{const t=new Map;for(let e=0;r.length>e;e++)t.set(r[e],e);return t})();for(const r of e){if("line"===r.type)continue;if("area"===r.type){const e=Array.isArray(r.datum)?r.datum:[r.datum];let i=0,c=!1;for(const r of e){const e=a.get(r);if(null==e)continue;c=!0;const o=n.get(e);if(null==o)continue;const u=F(t,o,s);u>i&&(i=u)}c&&(u=S(r,i,o)||u);continue}const e=a.get(r.datum);if(null==e)continue;const i=n.get(e);u=S(r,null==i?0:F(t,i,s),o,c)||u}return u}function S(t,e,r,n){let i=!1;return e>0?(t._pulseIntensity!==e&&(t._pulseIntensity=e,i=!0),t._pulseColor!==r&&(t._pulseColor=r,i=!0),t._pulseGlowRadius!==n&&(t._pulseGlowRadius=n,i=!0),i):(0!==t._pulseIntensity&&(t._pulseIntensity=0,i=!0),void 0!==t._pulseColor&&(t._pulseColor=void 0,i=!0),void 0!==t._pulseGlowRadius&&(t._pulseGlowRadius=void 0,i=!0),i)}function E(t,e,r=("undefined"!=typeof performance?performance.now():Date.now())){if(!e||0===e.size)return!1;const n=t.duration??500,i=e.peek();return null!=i&&n>r-i}function G(t,e,r){e>t.capacity&&(t.resize(e),r&&e>r.capacity&&r.resize(e))}function j(t,e){const r=new p(t.capacity);return t.forEach(()=>r.push(e)),r}function O(t,e,r,n){const i=t.push(e);return r&&r.push(n),i}function L(t,e,r){if(!e||0===e.size)return;const n=new Set;if(t.forEach((t,e)=>{r(t)&&n.add(e)}),0===n.size)return;const i=e.toArray();e.clear();for(let t=0;i.length>t;t++)n.has(t)||e.push(i[t])}export{p as RingBuffer,F as computePulseIntensity,I as applyPulse,S as setPulseState,E as hasActivePulses,v as partitionRibbons,_ as buildAggregateRibbons,g as buildPerSeriesRibbons,m as enrichDatumWithBand,G as ensureRingBufferCapacity,j as createTimestampBufferForData,O as pushWithTimestamp,L as compactTimestampBufferForRemoval,b as refreshIdlePulse,A as useLegendCategoryEmission,w as pointCanvasRenderer,x as useSemanticFrameInteractions,B as useXYKeyboardNavigation,H as useOrdinalKeyboardNavigation,T as useGeoKeyboardNavigation};
@@ -1 +0,0 @@
1
- import{getMinMax as e}from"./chunk-chunk-JJ2OOIET.module.min.js";function t(t,a){const{field:r,bins:s=10}=a,o=t.map(e=>Number(e[r])).filter(e=>!isNaN(e));if(0===o.length)return[];const[n,c]=e(o),l=a.domain?a.domain[0]:n,d=a.domain?a.domain[1]:c;if(l===d)return[{category:`${l}-${d}`,value:o.length}];const u=(d-l)/s,f=Array(s).fill(0);for(const e of o){let t=Math.floor((e-l)/u);t===s&&(t=s-1),t>=0&&s>t&&f[t]++}return f.map((e,t)=>{const a=l+t*u,r=a+u;return{category:`${i(a)}-${i(r)}`,value:e}})}function a(t,a){const{groupBy:r,value:s,agg:i="sum"}=a,o=new Map;for(const e of t){const t=e[r]+"";o.has(t)||o.set(t,[]),o.get(t).push(Number(e[s]))}const n=[];for(const[t,a]of o){let s;switch(i){case"count":s=a.length;break;case"mean":s=a.reduce((e,t)=>e+t,0)/a.length;break;case"min":s=e(a)[0];break;case"max":s=e(a)[1];break;default:s=a.reduce((e,t)=>e+t,0)}n.push({[r]:t,value:s})}return n}function r(e,t){const{key:a,fields:r}=t,s=new Map;for(const t of e){const e=t[a]+"";if(s.has(e)||s.set(e,[]),r){const a={};for(const e of r)e in t&&(a[e]=t[e]);s.get(e).push(a)}else s.get(e).push({...t})}const i=[];for(const[e,t]of s)i.push({id:e,coordinates:t});return i}function s(e,t){const{columns:a,nameField:r="name",valueField:s="value"}=t,i=new Set(a),o=[];for(const t of e){const e={};for(const a of Object.keys(t))i.has(a)||(e[a]=t[a]);for(const i of a)o.push({...e,[r]:i,[s]:t[i]})}return o}function i(e){return Math.round(1e3*e)/1e3+""}function o(e){if(!e)return{type:"",markProps:{}};if("string"==typeof e)return{type:e,markProps:{}};const{type:t,...a}=e;return{type:t,markProps:a}}function n(e){return"nominal"===e||"ordinal"===e}function c(e){return"quantitative"===e||"temporal"===e}function l(e){return e.usermeta?.idid}function d(e){if(!l(e)||!Array.isArray(e.layer))return e;const t=e.layer.filter(e=>!function(e){return"annotation-layer"===e.usermeta?.idid?.role}(e));if(1!==t.length)return e;const{layer:a,...r}=e,{usermeta:s,...i}=t[0];return{...r,...i}}var u={category10:"category10",category20:"category20",category20b:"category20",category20c:"category20",accent:"accent",dark2:"dark2",paired:"paired",pastel1:"pastel1",pastel2:"pastel2",set1:"set1",set2:"set2",set3:"set3",tableau10:"category10",tableau20:"category20"},f={linear:"linear","monotone-x":"monotoneX","monotone-y":"monotoneY",monotone:"monotoneX",step:"step","step-after":"stepAfter","step-before":"stepBefore",basis:"basis",cardinal:"cardinal","catmull-rom":"catmullRom"},p={sum:"sum",mean:"mean",average:"mean",count:"count",min:"min",max:"max",median:"mean"};function m(e){e=d(e);const t=[],{type:r,markProps:s}=o(e.mark),i=e.encoding||{},l=i.x,m=i.y,g=i.color,v=i.size,b=i.theta,A=i.opacity;let x;e.data?.values?x=e.data.values:e.data?.url&&t.push("data.url is not supported — only inline data.values can be translated. Provide data manually."),e.transform&&e.transform.length>0&&t.push("Vega-Lite transforms are not supported. Pre-transform your data before passing to fromVegaLite()."),e.layer&&t.push('Layered specs ("layer") are not supported. Only single-mark specs can be translated.'),(e.hconcat||e.vconcat||e.concat)&&t.push('Concatenated views ("hconcat"/"vconcat"/"concat") are not supported. Translate each sub-spec individually.'),(e.facet||i.facet||i.row||i.column)&&t.push("Faceted views are not supported. Use Semiotic's LinkedCharts or render multiple charts manually."),e.repeat&&t.push('Repeated views ("repeat") are not supported. Translate each field combination individually.'),(e.params||e.selection)&&t.push("Selections/params are not supported. Use Semiotic's LinkedCharts and selection props for interactivity.");const k={};e.width&&(k.width=e.width),e.height&&(k.height=e.height);const L=function(e){if(e)return"string"==typeof e?e:e.text}(e.title);if(L&&(k.title=L),g?.field&&(k.colorBy=g.field,g.scale?.scheme)){const e=u[g.scale.scheme];e&&(k.colorScheme=e)}void 0!==A?.value&&(k.pointOpacity=A.value);const S=l?.aggregate,w=m?.aggregate;if(x&&(S||w)){const e=w?m:l,t=w?l:m,r=p[e.aggregate];if(r&&t?.field&&e.field)x=a(x,{groupBy:t.field,value:e.field,agg:r});else if(("count"===r||"count"===e.aggregate)&&t?.field&&x){const e=new Map;for(const a of x){const r=a[t.field]+"";e.set(r,(e.get(r)||0)+1)}x=Array.from(e,([e,a])=>({[t.field]:e,value:a}))}}if(l?.bin||m?.bin){const e="Histogram";x&&(k.data=x),l?.bin?(k.valueAccessor=l.field,m?.field&&(k.categoryAccessor=m.field),l.axis?.title&&(k.valueLabel=l.axis.title)):m?.bin&&(k.valueAccessor=m.field,l?.field&&(k.categoryAccessor=l.field),m.axis?.title&&(k.valueLabel=m.axis.title));const a=l?.bin||m?.bin,r="object"==typeof a?a.maxbins:void 0;return r&&(k.bins=r),h(e,k,t)}let R;switch(r){case"bar":R=function(e,t,a,r,s,i,o){let l;return a?.field&&!1!==e?.stack&&!1!==t?.stack&&null!==e?.stack&&null!==t?.stack?(l="StackedBarChart",r.stackBy=a.field):l="BarChart",n(e?.type)&&c(t?.type)?(r.categoryAccessor=e.field,r.valueAccessor=o?"value":t.field,e?.axis?.title&&(r.categoryLabel=e.axis.title),t?.axis?.title&&(r.valueLabel=t.axis.title)):c(e?.type)&&n(t?.type)?(r.categoryAccessor=t.field,r.valueAccessor=i?"value":e.field,r.orientation="horizontal",t?.axis?.title&&(r.categoryLabel=t.axis.title),e?.axis?.title&&(r.valueLabel=e.axis.title)):(e?.field&&(r.categoryAccessor=e.field),t?.field&&(r.valueAccessor=o?"value":t.field),e?.axis?.title&&(r.categoryLabel=e.axis.title),t?.axis?.title&&(r.valueLabel=t.axis.title)),s&&(r.data=s),l}(l,m,g,k,x,S,w);break;case"line":if(R="LineChart",y(l,m,k,S,w),g?.field&&(k.lineBy=g.field),s.interpolate){const e=f[s.interpolate];e&&(k.curve=e)}!0===s.point&&(k.showPoints=!0),x&&(k.data=x);break;case"area":if(g?.field?(R="StackedAreaChart",k.areaBy=g.field):R="AreaChart",y(l,m,k,S,w),s.interpolate){const e=f[s.interpolate];e&&(k.curve=e)}void 0!==s.opacity&&(k.areaOpacity=s.opacity),x&&(k.data=x);break;case"point":case"circle":case"square":v?.field?(R="BubbleChart",k.sizeBy=v.field,v.scale?.range&&(k.sizeRange=v.scale.range)):R="Scatterplot",y(l,m,k,S,w),x&&(k.data=x);break;case"rect":R="Heatmap",l?.field&&(k.xAccessor=l.field),m?.field&&(k.yAccessor=m.field),g?.field&&(k.valueAccessor=g.field,delete k.colorBy),l?.axis?.title&&(k.xLabel=l.axis.title),m?.axis?.title&&(k.yLabel=m.axis.title),x&&(k.data=x);break;case"arc":s.innerRadius&&s.innerRadius>0?(R="DonutChart",k.innerRadius=s.innerRadius):R="PieChart",b?.field?k.valueAccessor=b.field:m?.field&&(k.valueAccessor=w?"value":m.field),g?.field&&(k.categoryAccessor=g.field),l?.field&&!b?.field&&(k.categoryAccessor=l.field),x&&(k.data=x);break;case"tick":R="DotPlot",n(l?.type)?(k.categoryAccessor=l.field,m?.field&&(k.valueAccessor=w?"value":m.field),l?.axis?.title&&(k.categoryLabel=l.axis.title),m?.axis?.title&&(k.valueLabel=m.axis.title)):n(m?.type)?(k.categoryAccessor=m.field,l?.field&&(k.valueAccessor=S?"value":l.field),k.orientation="horizontal",m?.axis?.title&&(k.categoryLabel=m.axis.title),l?.axis?.title&&(k.valueLabel=l.axis.title)):(l?.field&&(k.categoryAccessor=l.field),m?.field&&(k.valueAccessor=w?"value":m.field)),x&&(k.data=x);break;default:t.push(`Unsupported mark type "${r}". Defaulting to Scatterplot.`),R="Scatterplot",y(l,m,k,S,w),x&&(k.data=x)}return h(R,k,t)}function g(e,t={}){const a=function(e){const t=e,a=d(e),r=a,s=[];if(Array.isArray(t.layer)&&a===e&&s.push({code:"UNSUPPORTED_COMPOSITION",severity:"error",path:"/layer",message:"Only the single base view in an IDID-enriched annotation layer can be imported."}),void 0===r.mark)s.push({code:"MISSING_MARK",severity:"error",path:"/mark",message:"A Vega-Lite spec needs a supported single-view mark."});else{const{type:e}=o(r.mark);new Set(["bar","line","area","point","circle","square","rect","arc","tick"]).has(e)||s.push({code:"UNSUPPORTED_MARK",severity:"error",path:"/mark",message:`Vega-Lite mark "${e||"(missing)"}" has no supported Semiotic translation.`})}Array.isArray(r.transform)&&r.transform.length>0&&s.push({code:"UNSUPPORTED_TRANSFORM",severity:"error",path:"/transform",message:"Vega-Lite transforms must be materialized before strict import."});for(const e of["hconcat","vconcat","concat","facet","repeat","params","selection"])void 0!==r[e]&&s.push({code:"UNSUPPORTED_COMPOSITION",severity:"error",path:"/"+e,message:`Vega-Lite "${e}" is not part of the supported single-view import subset.`});return"string"==typeof r.data?.url&&s.push({code:"UNSUPPORTED_DATA_URL",severity:"error",path:"/data/url",message:"Strict import accepts inline data.values only; load URL data before importing."}),s}(e),r=a.filter(e=>"error"===e.severity),s=l(e),i={adapter:"semiotic/vega-lite",direction:"import",sourceFormat:"vega-lite",targetFormat:"semiotic-chart-config",..."string"==typeof s?.specVersion?{specVersion:s.specVersion}:{},...s?{metadata:{idid:s}}:{}};if(r.length>0&&"lossy"!==t.mode)return{status:"refused",diagnostics:a,lossReport:r.map(({code:e,message:t,path:a})=>({code:e,message:t,path:a})),provenance:i};const n=m(e),c=(n.warnings||[]).map(e=>({code:"LEGACY_TRANSLATION_WARNING",severity:"warning",message:e})),u=r.map(({code:e,message:t,path:a})=>({code:e,message:t,path:a})),f="lossy"===t.mode?a.map(e=>"error"===e.severity?{...e,severity:"warning"}:e):a;return{status:u.length>0?"lossy":"success",config:n,diagnostics:[...f,...c],lossReport:u,provenance:i}}function y(e,t,a,r,s){e?.field&&(a.xAccessor=r?"value":e.field),t?.field&&(a.yAccessor=s?"value":t.field),e?.axis?.title&&(a.xLabel=e.axis.title),t?.axis?.title&&(a.yLabel=t.axis.title)}function h(e,t,a){const r={component:e,props:t,version:"1",createdAt:(new Date).toISOString()};if(a.length>0){r.warnings=a;for(const e of a)console.warn("[semiotic/fromVegaLite] "+e)}return r}export{t as bin,a as rollup,r as groupBy,s as pivot,d as unwrapIDIDEnrichedVegaLiteSpec,m as fromVegaLite,g as fromVegaLiteResult};