semiotic 3.10.1 → 3.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -63
- package/ai/artifact-surface-inventory.json +4 -1
- package/ai/behaviorContracts.cjs +1 -1
- package/ai/dist/mcp-server.js +25 -24
- package/ai/examples.md +28 -0
- package/ai/reference.md +9 -4
- package/ai/schema.json +121 -5
- package/ai/surface-manifest.json +3 -2
- package/ai/system-prompt.md +1 -1
- package/ai/task-packets/compare-category-totals.json +7 -53
- package/ai/task-packets/compare-category-totals.md +4 -4
- package/ai/task-packets/correct-published-chart.json +7 -53
- package/ai/task-packets/correct-published-chart.md +4 -4
- package/ai/task-packets/index.json +9 -9
- package/ai/task-packets/update-live-chart.json +8 -54
- package/ai/task-packets/update-live-chart.md +4 -4
- package/dist/c-27DCB5T6.min.js +18 -0
- package/dist/c-2MONF2P6.min.js +1 -0
- package/dist/c-3AGX252H.min.js +1 -0
- package/dist/c-3B6JZEZT.min.js +1 -0
- package/dist/c-3BYZXCX3.min.js +4 -0
- package/dist/c-3DIPZJDO.min.js +1 -0
- package/dist/c-3FOUMWLR.min.js +1 -0
- package/dist/c-3NA6I656.min.js +2 -0
- package/dist/c-3OFVBWQY.min.js +1 -0
- package/dist/{c-QA3HMQJP.min.js → c-3PFVJFBK.min.js} +1 -1
- package/dist/c-3PPO7ZJF.min.js +4 -0
- package/dist/c-3YEW2PK6.min.js +1 -0
- package/dist/c-43XNOQNQ.min.js +391 -0
- package/dist/c-4JKDJUYD.min.js +1 -0
- package/dist/c-4LKK5YWB.min.js +1 -0
- package/dist/c-4V3CD337.min.js +1 -0
- package/dist/c-4XLHPQTP.min.js +1 -0
- package/dist/c-5NYONM6V.min.js +5 -0
- package/dist/c-5PIKBUMF.min.js +1 -0
- package/dist/c-6IVBV5NO.min.js +1 -0
- package/dist/c-7APWCEPL.min.js +1 -0
- package/dist/{c-ORLEBW72.min.js → c-7FKPPCGN.min.js} +1 -1
- package/dist/c-ABMGCCLT.min.js +1 -0
- package/dist/c-AINGQGUN.min.js +1 -0
- package/dist/c-AXJ2QI3F.min.js +1 -0
- package/dist/c-BQYD7T4E.min.js +1 -0
- package/dist/{c-V4XMSLC3.min.js → c-BYJJ7EMG.min.js} +1 -1
- package/dist/c-C4SXYFXL.min.js +1 -0
- package/dist/c-CLDCKFBE.min.js +1 -0
- package/dist/c-CLJCJSFU.min.js +1 -0
- package/dist/c-CLLCX3PT.min.js +2 -0
- package/dist/c-CO4NDAD6.min.js +51 -0
- package/dist/c-ECHBKW7U.min.js +1 -0
- package/dist/c-EPJWM2UT.min.js +1 -0
- package/dist/c-FD2BXSRG.min.js +1 -0
- package/dist/c-FHNY57SO.min.js +209 -0
- package/dist/c-FMCUQ6JX.min.js +1 -0
- package/dist/c-FOTTQHOO.min.js +1 -0
- package/dist/c-FU7A5KSY.min.js +1 -0
- package/dist/c-GHN6IR4Y.min.js +1 -0
- package/dist/{c-J6DVC236.min.js → c-GK263BF4.min.js} +1 -1
- package/dist/c-GSCO3FWL.min.js +1 -0
- package/dist/c-GYLOSK7M.min.js +1 -0
- package/dist/c-HK4OSLZA.min.js +1 -0
- package/dist/c-HLGTD5SJ.min.js +1 -0
- package/dist/c-HNHKIMIV.min.js +61 -0
- package/dist/{c-D6HAAPTX.min.js → c-IBRLFKWA.min.js} +1 -1
- package/dist/c-IIV73MUW.min.js +1 -0
- package/dist/c-IJCZGUG6.min.js +31 -0
- package/dist/c-ISA6IJ6V.min.js +41 -0
- package/dist/c-JC76YAHB.min.js +33 -0
- package/dist/c-JJKRER47.min.js +1 -0
- package/dist/c-JO6AYCU4.min.js +1 -0
- package/dist/c-JOPGDP6N.min.js +1 -0
- package/dist/c-JWHPG6S2.min.js +1 -0
- package/dist/c-JXVYIXTV.min.js +1 -0
- package/dist/c-K2ZIYDI3.min.js +1 -0
- package/dist/c-K37JAIWA.min.js +4 -0
- package/dist/c-KXH7LFIL.min.js +26 -0
- package/dist/c-M43PK7K4.min.js +1 -0
- package/dist/c-MTX2AO5S.min.js +1 -0
- package/dist/c-N5WT7TXG.min.js +1 -0
- package/dist/c-NATWERHZ.min.js +1 -0
- package/dist/{c-42PLDTX7.min.js → c-O53GOO7H.min.js} +1 -1
- package/dist/c-OVQB75PE.min.js +1 -0
- package/dist/c-P3SKRNZN.min.js +1 -0
- package/dist/c-P5NXQWIM.min.js +1 -0
- package/dist/c-P7BQMVQQ.min.js +1 -0
- package/dist/{c-GNTXRXRN.min.js → c-PDQHLOKU.min.js} +1 -1
- package/dist/c-PITYSOPK.min.js +1 -0
- package/dist/c-QPO24R7Q.min.js +1 -0
- package/dist/c-QXLDCATV.min.js +1 -0
- package/dist/c-R2HUSWKB.min.js +1 -0
- package/dist/{c-HYW2XA4Q.min.js → c-RHDOOQ4X.min.js} +1 -1
- package/dist/c-RZPP5ERV.min.js +1 -0
- package/dist/c-SAP5KY6R.min.js +9 -0
- package/dist/{c-WUWXGQYA.min.js → c-SJIB5RNI.min.js} +1 -1
- package/dist/c-SQNEVNWT.min.js +1 -0
- package/dist/c-STHZWF3D.min.js +1 -0
- package/dist/c-TIDKVMMZ.min.js +1 -0
- package/dist/c-TIMGODBG.min.js +1 -0
- package/dist/c-TR7OHUAO.min.js +2 -0
- package/dist/c-TVKZC4BY.min.js +1 -0
- package/dist/c-U5XVLSHN.min.js +1 -0
- package/dist/c-U6NLVFN4.min.js +1 -0
- package/dist/{c-VJTDST2R.min.js → c-UBHICVSC.min.js} +1 -1
- package/dist/c-UMGHCBH5.min.js +114 -0
- package/dist/c-UOPPO26M.min.js +1 -0
- package/dist/c-UUDAON4Z.min.js +1 -0
- package/dist/c-V32TPPY2.min.js +1 -0
- package/dist/c-V5KFJWQQ.min.js +1 -0
- package/dist/c-VEMCBQZZ.min.js +100 -0
- package/dist/{c-P65V6HLO.min.js → c-VN557BQE.min.js} +1 -1
- package/dist/c-WD2RL76M.min.js +116 -0
- package/dist/c-Y342FJ6K.min.js +1 -0
- package/dist/c-YL7HJL5J.min.js +1 -0
- package/dist/c-YM6CT4LJ.min.js +1 -0
- package/dist/{c-MVR3RWF3.min.js → c-YMFUIO54.min.js} +1 -1
- package/dist/c-YQVOKPKR.min.js +1 -0
- package/dist/c-YRJ3BJQZ.min.js +1 -0
- package/dist/c-YT5KPVNP.min.js +1 -0
- package/dist/c-Z6GRGS53.min.js +1 -0
- package/dist/c-ZVOFLE2P.min.js +46 -0
- package/dist/components/CategoryColors.d.ts +7 -0
- package/dist/components/LinkedCharts.d.ts +2 -1
- package/dist/components/ai/audienceProfile.d.ts +18 -1
- package/dist/components/ai/describeChart.d.ts +5 -1
- package/dist/components/ai/intentManifest.d.ts +16 -0
- package/dist/components/ai/intentRegistry.d.ts +12 -0
- package/dist/components/ai/intents.d.ts +6 -6
- package/dist/components/ai/streamSchema.d.ts +19 -0
- package/dist/components/ai/streamingTypes.d.ts +57 -11
- package/dist/components/ai/suggestCharts.d.ts +1 -1
- package/dist/components/ai/suggestStreamCharts.d.ts +43 -8
- package/dist/components/ai/suggestStreamDashboard.d.ts +35 -0
- package/dist/components/ai/variantDiscovery.d.ts +1 -1
- package/dist/components/charts/ordinal/BarChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/DonutChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/GroupedBarChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/PieChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/StackedBarChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeAccumulator.d.ts +14 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +6 -5
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -1
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +2 -161
- package/dist/components/charts/realtime/RealtimeLineChart.types.d.ts +175 -0
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +6 -5
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +6 -5
- package/dist/components/charts/realtime/aggregate.d.ts +11 -1
- package/dist/components/charts/realtime/resolveWindowSize.d.ts +1 -1
- package/dist/components/charts/shared/DirectLabelLayer.d.ts +25 -0
- package/dist/components/charts/shared/directLabels.d.ts +12 -0
- package/dist/components/charts/shared/knownChartComponents.d.ts +4 -1
- package/dist/components/charts/shared/lineSeriesSsr.d.ts +0 -12
- package/dist/components/charts/shared/useChartSetup.d.ts +3 -1
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -1
- package/dist/components/charts/value/BigNumber.streamCapability.d.ts +2 -0
- package/dist/components/charts/value/GaugeChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/xy/BubbleChart.d.ts +4 -1
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -1
- package/dist/components/charts/xy/LineChart.d.ts +4 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +7 -0
- package/dist/components/data/transforms.d.ts +1 -0
- package/dist/components/realtime/HyperLogLog.d.ts +19 -0
- package/dist/components/realtime/ReorderBuffer.d.ts +2 -2
- package/dist/components/realtime/TDigest.d.ts +22 -0
- package/dist/components/realtime/WindowAccumulator.d.ts +22 -5
- package/dist/components/realtime/applyChangelog.d.ts +38 -0
- package/dist/components/realtime/minHeap.d.ts +3 -0
- package/dist/components/recipes/atlas/flowCircuitChartProps.d.ts +1 -1
- package/dist/components/recipes/layout1d.d.ts +2 -20
- package/dist/components/recipes/minGapPlacement.d.ts +20 -0
- package/dist/components/semiotic-ai-core.d.ts +8 -3
- package/dist/components/semiotic-ai-stream.d.ts +10 -0
- package/dist/components/semiotic-ai.d.ts +4 -6
- package/dist/components/semiotic-realtime-core.d.ts +6 -2
- package/dist/components/semiotic-stream-types.d.ts +14 -0
- package/dist/components/semiotic-xy.d.ts +1 -0
- package/dist/components/semiotic.d.ts +3 -11
- package/dist/components/server/encodeSvgFramesToGif.d.ts +2 -0
- package/dist/components/server/rasterizeSVG.d.ts +2 -0
- package/dist/components/server/registerServerXYPlugins.d.ts +2 -0
- package/dist/components/server/renderEvidence.d.ts +4 -0
- package/dist/components/server/serverChartConfigs.d.ts +5 -0
- package/dist/components/server/serverChartConfigsRealtime.d.ts +6 -0
- package/dist/components/server/serverRealtimeCategoryColors.d.ts +3 -0
- package/dist/components/server/staticAnnotations.d.ts +9 -0
- package/dist/components/stream/SceneGraph.d.ts +3 -3
- package/dist/components/stream/StalenessBadge.d.ts +5 -2
- package/dist/components/stream/pipelinePathJoin.d.ts +27 -0
- package/dist/components/stream/pipelineTransitionTypes.d.ts +43 -0
- package/dist/components/stream/pipelineTransitions.d.ts +5 -35
- package/dist/components/stream/seriesGeometry.d.ts +2 -1
- package/dist/components/stream/streamEncodingTypes.d.ts +9 -0
- package/dist/components/stream/types.d.ts +25 -2
- package/dist/components/text/axisLabelAssessment.d.ts +15 -0
- package/dist/components/text/browserAxisLabelAssessment.d.ts +1 -0
- package/dist/components/text/browserLabelMeasurement.d.ts +3 -0
- package/dist/components/text/labelMeasurement.d.ts +19 -0
- package/dist/components/text/labelPlacement.d.ts +71 -0
- package/dist/components/text/useAxisLabelAssessment.d.ts +6 -0
- package/dist/components/text/useLabelMeasurer.d.ts +3 -0
- package/dist/controls.module.min.js +71 -1
- package/dist/geo.min.js +231 -1
- package/dist/geo.module.min.js +31 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics-matter.module.min.js +1 -1
- package/dist/physics-rapier.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/rough.min.js +2 -1
- package/dist/rough.module.min.js +2 -1
- package/dist/semiotic-access.module.min.js +1 -1
- package/dist/semiotic-ai-artifact-policy-constants.module.min.js +1 -1
- package/dist/semiotic-ai-core.d.ts +8 -3
- package/dist/semiotic-ai-core.min.js +4 -1
- package/dist/semiotic-ai-core.module.min.js +4 -1
- package/dist/semiotic-ai-hash-primitives.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +4 -6
- package/dist/semiotic-ai.module.min.js +14 -1
- package/dist/semiotic-artifact-react.min.js +269 -1
- package/dist/semiotic-artifact-react.module.min.js +137 -1
- package/dist/semiotic-artifact.min.js +3 -1
- package/dist/semiotic-artifact.module.min.js +3 -1
- package/dist/semiotic-atlas-core.min.js +2 -1
- package/dist/semiotic-atlas-core.module.min.js +1 -1
- package/dist/semiotic-atlas-selection.module.min.js +1 -1
- package/dist/semiotic-atlas.module.min.js +11 -1
- package/dist/semiotic-client-cjs-shared.min.js +1530 -1
- package/dist/semiotic-client-glyph.module.min.js +3 -1
- package/dist/semiotic-client-responsive.module.min.js +1 -1
- package/dist/semiotic-client-shared.module.min.js +1 -1
- package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +2 -1
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-evidence.min.js +3 -1
- package/dist/semiotic-evidence.module.min.js +3 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +8 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +8 -1
- package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-realtime-core.d.ts +6 -2
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +160 -1
- package/dist/semiotic-recipes-core.module.min.js +72 -1
- package/dist/semiotic-recipes-geo-cjs.min.js +1 -1
- package/dist/semiotic-recipes-react.min.js +3 -1
- package/dist/semiotic-server-edge-node.module.min.js +391 -1
- package/dist/semiotic-server-edge.min.js +651 -1
- package/dist/semiotic-server-edge.module.min.js +372 -1
- package/dist/semiotic-server-node.min.js +651 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-text.min.js +1 -1
- package/dist/semiotic-text.module.min.js +1 -1
- package/dist/semiotic-themes-core.min.js +1 -1
- package/dist/semiotic-themes-core.module.min.js +1 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils-core.min.js +11 -1
- package/dist/semiotic-utils-core.module.min.js +8 -1
- package/dist/semiotic-value.module.min.js +15 -1
- package/dist/semiotic-xy.d.ts +1 -0
- package/dist/semiotic.d.ts +3 -11
- package/dist/semiotic.module.min.js +10 -1
- package/dist/server.min.js +651 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +8 -7
- package/dist/c-2N7IU2NY.min.js +0 -1
- package/dist/c-2RL2QPZJ.min.js +0 -1
- package/dist/c-2WK7YJLL.min.js +0 -1
- package/dist/c-45CQWZZ6.min.js +0 -1
- package/dist/c-4BRHKVKV.min.js +0 -1
- package/dist/c-7242NXSG.min.js +0 -1
- package/dist/c-7DVPSB5C.min.js +0 -1
- package/dist/c-7EGHJU2F.min.js +0 -1
- package/dist/c-A7OGOFSL.min.js +0 -1
- package/dist/c-AFBSWT77.min.js +0 -1
- package/dist/c-AH5HWZWS.min.js +0 -1
- package/dist/c-AJ7EC32V.min.js +0 -1
- package/dist/c-AQADQNY7.min.js +0 -1
- package/dist/c-ATM475SA.min.js +0 -1
- package/dist/c-AVO3Q7T7.min.js +0 -1
- package/dist/c-B7GW7IHJ.min.js +0 -1
- package/dist/c-BNFJMDHN.min.js +0 -1
- package/dist/c-BOHCQILI.min.js +0 -1
- package/dist/c-C3TZLTZK.min.js +0 -1
- package/dist/c-CGQAQWBV.min.js +0 -1
- package/dist/c-CPV4N35K.min.js +0 -1
- package/dist/c-DIPEYUOW.min.js +0 -1
- package/dist/c-E4JDJH4I.min.js +0 -1
- package/dist/c-E72OTUZU.min.js +0 -1
- package/dist/c-E7I2L7CU.min.js +0 -1
- package/dist/c-ELDWAO2V.min.js +0 -1
- package/dist/c-EUBTECGM.min.js +0 -1
- package/dist/c-EUMPMDCS.min.js +0 -1
- package/dist/c-EZZT2WAE.min.js +0 -1
- package/dist/c-FHBVFCQB.min.js +0 -1
- package/dist/c-G4HCO2IQ.min.js +0 -1
- package/dist/c-G5VIJEOK.min.js +0 -1
- package/dist/c-GHVOXAYH.min.js +0 -1
- package/dist/c-GXV3C3MO.min.js +0 -1
- package/dist/c-HHTK2R75.min.js +0 -1
- package/dist/c-HLLFJYTY.min.js +0 -1
- package/dist/c-HP4ZFM47.min.js +0 -1
- package/dist/c-HPOYKCCG.min.js +0 -1
- package/dist/c-HYDTS5OP.min.js +0 -1
- package/dist/c-I4QJ6YLM.min.js +0 -1
- package/dist/c-IK33LNZ6.min.js +0 -1
- package/dist/c-IK3PZHRY.min.js +0 -1
- package/dist/c-JIMJF6F6.min.js +0 -1
- package/dist/c-JUKIWTBJ.min.js +0 -1
- package/dist/c-KKPMHAZC.min.js +0 -1
- package/dist/c-L6WNDBHV.min.js +0 -1
- package/dist/c-LDEX5OFW.min.js +0 -1
- package/dist/c-LESEUVC5.min.js +0 -1
- package/dist/c-LYQMZMZQ.min.js +0 -1
- package/dist/c-MB6CV5NC.min.js +0 -1
- package/dist/c-MOKJOIPE.min.js +0 -1
- package/dist/c-N3FXLRNT.min.js +0 -1
- package/dist/c-N5NPTJVJ.min.js +0 -1
- package/dist/c-NHBL4J67.min.js +0 -1
- package/dist/c-ODG6TFSY.min.js +0 -1
- package/dist/c-PRIKOLTE.min.js +0 -1
- package/dist/c-PSKKFZNP.min.js +0 -1
- package/dist/c-PSNI6KAZ.min.js +0 -1
- package/dist/c-QAVFOEUY.min.js +0 -1
- package/dist/c-R2P4RR7Q.min.js +0 -1
- package/dist/c-RFC7UAG7.min.js +0 -1
- package/dist/c-S3AZX5PP.min.js +0 -1
- package/dist/c-SGAURYHG.min.js +0 -1
- package/dist/c-SJMWU6UX.min.js +0 -1
- package/dist/c-STIIGQOD.min.js +0 -1
- package/dist/c-T2ASIJVZ.min.js +0 -1
- package/dist/c-T2V7O2LO.min.js +0 -1
- package/dist/c-TKG2NP7G.min.js +0 -1
- package/dist/c-TX3THUTO.min.js +0 -1
- package/dist/c-TX7XJM3Z.min.js +0 -1
- package/dist/c-UC7SIU2W.min.js +0 -1
- package/dist/c-UMXSJIOV.min.js +0 -1
- package/dist/c-VRSXMLYF.min.js +0 -1
- package/dist/c-VSLWSAN2.min.js +0 -1
- package/dist/c-VXLOLYTO.min.js +0 -1
- package/dist/c-W4ZUKSEQ.min.js +0 -1
- package/dist/c-WCBRPILW.min.js +0 -1
- package/dist/c-WGHT7OCY.min.js +0 -1
- package/dist/c-WWCW3APR.min.js +0 -1
- package/dist/c-XSB27XPS.min.js +0 -1
- package/dist/c-Y6PYUMFU.min.js +0 -1
- package/dist/c-YDECTEUW.min.js +0 -1
- package/dist/c-YF3YKVQI.min.js +0 -1
- package/dist/c-YLZIV3VS.min.js +0 -1
- package/dist/c-ZIVPFTOC.min.js +0 -1
package/dist/c-ODG6TFSY.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t,n={}){return Number.isFinite(t)&&t>0&&!Number.isNaN(e)?e===1/0?"expired":0>e||t*(n.fresh??1)>e?"fresh":t*(n.aging??1.5)>e?"aging":t*(n.stale??3)>e?"stale":"expired":"fresh"}function t(e,t,n){if(null!=e)return"function"==typeof e?e(t,n):"object"==typeof e&&null!==e&&"constant"in e?e.constant:t[e]}function n(e){let{data:n,encoding:i}=e,r=[],o=new Map;return n.forEach((e,n)=>{let l=t(i.id,e,n);if(null==l||""===l)throw Error(`[semiotic] Motion encoding row ${n} resolved an empty id.`);let a=l+"";if(o.has(a))throw Error(`[semiotic] Duplicate motion encoding id "${a}".`);let s=t(i.process?.group,e,n),c=t(i.process?.stage,e,n),u=t(i.accessible?.group,e,n)??(null!=s?s+"":null!=c?c+"":void 0),d={};for(let r of Object.keys(i.evidence??{}))d[r]=t(i.evidence?.[r],e,n);let h={id:a,datum:e,time:{arrival:t(i.time?.arrival,e,n),basis:i.time?.basis,unit:i.time?.unit},placement:{x:t(i.placement?.x,e,n),y:t(i.placement?.y,e,n),lane:t(i.placement?.lane,e,n),space:i.placement?.space},kinematics:{velocityX:t(i.kinematics?.velocityX,e,n),velocityY:t(i.kinematics?.velocityY,e,n),space:i.kinematics?.space},process:{group:s,stage:c,target:t(i.process?.target,e,n),work:t(i.process?.work,e,n)},evidence:d,accessible:{description:t(i.accessible?.description,e,n),group:u,label:t(i.accessible?.label,e,n)??a}};r.push(h),o.set(a,h)}),{rows:r,byId:o}}function i(t){let n=t.now-t.arrival;return{age:n,progress:Number.isFinite(n)&&Number.isFinite(t.ttl)&&t.ttl>0?Math.max(0,n)/t.ttl:n===1/0&&Number.isFinite(t.ttl)&&t.ttl>0?1/0:0,lifecycle:e(n,t.ttl,t.thresholds)}}function r(e){let t=Math.max(0,Math.min(1,e.minOpacity??.1));if(Number.isNaN(e.age))return 1;if(e.age===1/0)return t;if(!Number.isFinite(e.extent)||0>=e.extent)return 1;let n=Math.max(0,e.age);if("step"===e.type)return(e.threshold??.5*e.extent)>n?1:t;if("exponential"===e.type){let i=e.halfLife??e.extent/2;return t+Math.pow(.5,n/(i>0?i:e.extent/2))*(1-t)}return t+Math.max(0,Math.min(1,1-n/e.extent))*(1-t)}function o(e,t){let n=Number.isFinite(e)?e:0,i=Number.isFinite(t)?t:0;return{velocityX:n,velocityY:i,speed:Math.hypot(n,i),direction:Math.atan2(i,n)}}function l(e,t,n){return Number.isFinite(n)&&n>0?o((t.x-e.x)/n,(t.y-e.y)/n):o(0,0)}function a(e,t){return(e+"").length*t*.6}function s(e){let{x:t,y:n,text:i,fill:r,fontSize:o=12,fontWeight:l,fontFamily:s,textAnchor:c="start",dominantBaseline:u,background:d,className:h}=e,f=function(e){return void 0===e||!0===e||"halo"===e?{type:"halo"}:!1===e||"none"===e?null:"box"===e?{type:"box"}:{...e,type:e.type??"halo"}}(d),m=e=>sr("text",{x:t,y:n,textAnchor:c,dominantBaseline:u,fill:r,fontSize:o,fontWeight:l,fontFamily:s,className:h,...e?{style:{stroke:e.stroke,strokeWidth:e.strokeWidth,paintOrder:"stroke"}}:{},children:i});if(!f)return m();if("halo"===f.type)return m({stroke:f.fill??ur,strokeWidth:f.haloWidth??3});let p,y,g=f.padding??{x:6,y:3},b="number"==typeof g?g:g.x,x="number"==typeof g?g:g.y,v=a(i,o),w=o+2*x;return p="middle"===c?t-v/2-b:"end"===c?t-v-b:t-b,y="middle"===u||"central"===u?n-w/2:"hanging"===u||"text-before-edge"===u?n-x:n-.8*o-x,cr("g",{className:h,children:[sr("rect",{x:p,y:y,width:v+2*b,height:w,rx:f.radius??3,ry:f.radius??3,fill:f.fill??ur,fillOpacity:f.opacity??.85,stroke:f.stroke,strokeWidth:f.strokeWidth}),m()]})}function c(e){let t=e.provenance,n=e.id??e.stableId??t?.stableId;return null==n||""===n?void 0:n+""}function u(e){let t=Bi(e=>e.pushObservation),n=dr.useCallback(n=>{e.onObservation?.(n),t?.(n)},[e,t]);return dr.useMemo(()=>({...e,onObservation:n}),[n,e])}function d(e,t={}){let n=c(e);return{"data-semiotic-annotation-widget":"",...n?{"data-semiotic-annotation-id":n}:{},onClickCapture(i){let r=function(e){let t=e.nativeEvent;return"touch"===t.pointerType?"touch":0===t.detail?"keyboard":"pointer"}(i);t.onAnnotationActivate?.({annotation:e,annotationId:n,chartId:t.chartId,inputType:r}),n&&t.onObservation&&t.onObservation({type:"annotation-activate",annotationId:n,inputType:r,timestamp:Date.now(),chartType:t.chartType??"unknown",chartId:t.chartId})}}}function h(e){return e instanceof Element&&null!=e.closest("[data-semiotic-annotation-widget]")}function f({chrome:e="default",className:t="",style:n,children:i,...r}){let o="default"===e?{...mr,...n}:n;return fr("div",{...r,"data-semiotic-tooltip-chrome":!0,className:("semiotic-tooltip "+t).trim(),style:o,children:i})}function m(e){return e.ownsChrome=!0,e}function p(e){if("string"!=typeof e)return null!=e;let t=e.trim().toLowerCase();return!(!t||"transparent"===t||/^rgba\([^)]*,\s*0(?:\.0+)?\s*\)$/.test(t)||/^hsla\([^)]*,\s*0(?:\.0+)?\s*\)$/.test(t))}function y(e){if(!hr.isValidElement(e))return!1;let t=e.type;if("string"!=typeof t&&t&&!0===t.ownsChrome)return!0;let n=e.props,i=n["data-semiotic-tooltip-chrome"];if(null!=i&&!1!==i&&"false"!==i)return!0;let r=n.style;return!(!r||"object"!=typeof r||!p(r.background)&&!p(r.backgroundColor))}function g(e,t){for(let n of t){let t=e.find(e=>e.lower===n);if(t)return t}}function b(e,t={}){if(!e||"object"!=typeof e)return{entries:[]};let n=t.maxEntries??6,i=!1!==t.skipPositional,r=[];for(let[t,n]of Object.entries(e)){if(t.startsWith("_")||"data"===t)continue;let e=t.toLowerCase();if(i&&br.has(e)||null==n)continue;let o=typeof n;"string"!==o&&"number"!==o&&"boolean"!==o&&!(n instanceof Date)||r.push({key:t,lower:e,value:n})}if(0===r.length)return{entries:[]};let o=r.findIndex(e=>pr.includes(e.lower)),l=o>=0;0>o&&(o=r.findIndex(e=>"id"===e.lower)),0>o&&(o=r.findIndex(e=>"string"==typeof e.value));let a=0>o?void 0:r[o],s=r.filter((e,t)=>t!==o&&(!l||"id"!==e.lower)),c=g(s,yr),u=g(s,gr),d=[];c&&d.push({key:c.key,value:c.value}),u&&d.push({key:u.key,value:u.value});for(let e of s){if(d.length>=n)break;yr.includes(e.lower)||gr.includes(e.lower)||d.push({key:e.key,value:e.value})}return{titleKey:a?.key,title:a?.value,entries:d}}function x(e,t){return"touch"===t?Math.max(e,24):e}function v(e){return Array.isArray(e)?e[0]:e}function w(e,t,n,i){return{data:v(e),x:t,y:n,__semioticHoverData:!0,...i}}function k(e,t){return"function"==typeof t?t(e):e[t]}function M(e,t){if(t)return t(e);if(null==e)return"";if("number"==typeof e){if(!Number.isFinite(e))return e+"";let t=Number.isInteger(e)?e:parseFloat(e.toPrecision(6));return Math.abs(t)>9999?t.toLocaleString():t+""}if(e instanceof Date)return e.toLocaleDateString();if("object"==typeof e&&null!==e){if(void 0!==e.id)return e.id+"";if(void 0!==e.name)return e.name+"";try{return JSON.stringify(e)}catch{return Array.isArray(e)?`[Array(${e.length})]`:"[Object]"}}return e+""}function A(e={}){let{fields:t,title:n,format:i,style:r={},className:o=""}=e;return e=>{if(!e||"object"!=typeof e)return null;let l,a=[];if(n){let t=k(e,n);l=M(t,i)}if(t&&t.length>0)t.forEach(t=>{let n,r,o;"string"==typeof t?(n=t,r=t,o=i):(n=t.label,r=t.accessor||t.key||"",o=t.format||i);let l=k(e,r);a.push({label:n,value:M(l,o)})});else if(!n){let t=["value","y","name","id","label"];for(let n of t)if(void 0!==e[n]){l=M(e[n],i);break}if(!l){let t=Object.keys(e).filter(e=>!e.startsWith("_"));t.length>0&&(l=M(e[t[0]],i))}}return vr(f,{className:o,style:r,children:[l&&xr("div",{style:{fontWeight:a.length>0?"bold":"normal"},children:l}),a.map((e,t)=>vr("div",{style:{marginTop:0===t&&l?"4px":0},children:[e.label&&vr("span",{children:[e.label,": "]}),e.value]},t))]})}}function S(e={}){let{fields:t=[],title:n,format:i,style:r={},className:o="",showLabels:l=!0,separator:a=": "}=e;return e=>{if(!e||"object"!=typeof e)return null;let s=[];if(n){let t=k(e,n);s.push({value:M(t,i)})}if(t&&Array.isArray(t)&&t.length>0)t.forEach(t=>{let n,r,o;"string"==typeof t?(n=t,r=t,o=i):(n=t.label,r=t.accessor||t.key||"",o=t.format||i);let a=M(k(e,r),o);s.push({label:l?n:void 0,value:a})});else{let t=b(e,{skipPositional:!1});null!=t.title&&s.push({label:void 0,value:M(t.title,i),bold:!0}),t.entries.forEach(e=>{s.push({label:l?e.key:void 0,value:M(e.value,i)})})}return Array.isArray(s)&&0!==s.length?xr(f,{className:("semiotic-tooltip-multiline "+o).trim(),style:r,children:s.map((e,t)=>vr("div",{style:{marginBottom:s.length-1>t?"4px":0,fontWeight:e.bold?"bold":void 0},children:[e.label&&vr("strong",{children:[e.label,a]}),e.value]},t))}):null}}function C(e){return"multi"===e||$(e)}function $(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&"mode"in e&&"multi"===e.mode}function j(e){let{tooltip:t,defaultTooltipContent:n,multiDefaultContent:i=N(),customFunctionContext:r="datum"}=e,o=t;return!1===t?{tooltipContent:()=>null}:C(o)?{tooltipContent:($(o)&&"function"==typeof o.content?I(o.content):void 0)||i,tooltipMode:"multi"}:"hover"===r&&"function"==typeof t?{tooltipContent:t}:{tooltipContent:I(o)||n}}function L(e){let{tooltip:t,defaultTooltipContent:n,customFunctionContext:i="datum"}=e;return!1===t?{tooltipContent:()=>null}:"hover"===i&&"function"==typeof t?{tooltipContent:t}:{tooltipContent:I(t)||n}}function N(){return e=>{let t=e.allSeries;if(!t||0===t.length)return xr(f,{children:xr("div",{children:M(e.data?.value??e.data?.y)})});let n=e.xValue??e.data?.time??e.data?.x;return vr(f,{children:[null!=n&&xr("div",{style:{fontWeight:600,marginBottom:4,fontSize:"0.9em",borderBottom:"1px solid var(--semiotic-border, #eee)",paddingBottom:4},children:M(n)}),t.map((e,t)=>vr("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"1px 0"},children:[xr("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,flexShrink:0}}),xr("span",{style:{flex:1,fontSize:"0.85em"},children:e.group}),xr("span",{style:{fontWeight:500,fontSize:"0.85em"},children:M(e.value)})]},t))]})}}function I(e){if(!0!==e){if("function"==typeof e){let t=e;return e=>{let n=!0===e?.__semioticHoverData||e&&void 0!==e.data&&"number"==typeof e.x&&"number"==typeof e.y&&e&&("node"===e.type||"edge"===e.type||void 0!==e.nodeOrEdge||void 0!==e.allSeries||void 0!==e.stats||void 0!==e.__chartType),i=v(n?e.data??{}:e);if(!i||(("node"===e?.nodeOrEdge&&"number"==typeof i?.x0&&"number"==typeof i?.x1||"edge"===e?.nodeOrEdge&&"number"==typeof i?.sankeyWidth)&&i.data&&"object"==typeof i.data&&(i=i.data),!i))return null;if(n&&(void 0!==e.allSeries||void 0!==e.xValue)){let t={...i};void 0!==e.allSeries&&void 0===t.allSeries&&(t.allSeries=e.allSeries),void 0!==e.xValue&&void 0===t.xValue&&(t.xValue=e.xValue),i=t}let r=t(i);return null==r?null:y(r)?r:xr(f,{children:r})}}if(!1===e||void 0===e)return!1;if($(e)){if("function"==typeof e.content)return I(e.content);"u">typeof process&&"production"!==process.env?.NODE_ENV&&console.warn('[semiotic] tooltip={{ mode: "multi" }} reached normalizeTooltip without a chart that wires tooltipMode. Use a line/area-family chart with multi support, or pass frameProps.tooltipMode: "multi" to StreamXYFrame.');let t=S();return I(e=>t(e))}if("object"==typeof e&&null!==e&&("fields"in e||"title"in e)){let t=A(e);return I(e=>t(e))}if("multi"===e){"u">typeof process&&"production"!==process.env?.NODE_ENV&&console.warn('[semiotic] tooltip="multi" reached normalizeTooltip on a single-tooltip chart. Rendering multi-field content as a backward-compatible fallback.');let e=S();return I(t=>e(t))}return A()}}function z({componentName:e,message:t,diagnosticHint:n,width:i,height:r}){return kr("div",{role:"alert",style:{width:i,height:Math.max(r,120),display:"flex",alignItems:"center",justifyContent:"center",border:"1px dashed rgba(128, 128, 128, 0.4)",borderRadius:8,background:"rgba(128, 128, 128, 0.04)",padding:24,boxSizing:"border-box"},children:Mr("div",{style:{textAlign:"center",maxWidth:400},children:[kr("div",{style:{fontSize:13,fontWeight:600,color:"rgba(128, 128, 128, 0.7)",marginBottom:6,fontFamily:"monospace"},children:e}),kr("div",{style:{fontSize:14,color:"rgba(128, 128, 128, 0.9)",lineHeight:1.5},children:t}),n&&kr("div",{"data-testid":"semiotic-diagnostic-hint",style:{marginTop:10,padding:"8px 12px",background:"rgba(128, 128, 128, 0.06)",borderRadius:4,fontSize:12,color:"rgba(128, 128, 128, 0.8)",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre-wrap",lineHeight:1.6},children:n})]})})}function T({colors:e,categories:t,colorScheme:n="category10",children:i}){let r=jr(()=>{if(e)return e;if(t){if(n&&"object"==typeof n&&!Array.isArray(n)){let e=n,i=0;return Object.fromEntries(t.map(t=>[t,Ii(e,t)??Ci[i++%Ci.length]]))}let e=Array.isArray(n)?n:Ni(n,void 0);return Object.fromEntries(t.map((t,n)=>[t,e[n%e.length]]))}return{}},[e,t,n]);return Lr(Nr.Provider,{value:r,children:i})}function F(){return $r(Nr)}function O(){for(let e of Rr)e()}function R(e,t){let n=Or.positions.get(e);if(n?.locked||!n||n.sourceId!==t)return;let i=new Map(Or.positions);i.delete(e),Or={positions:i},O()}function W(e,t){let n=Or.positions.get(e);if(!n?.locked||t&&n.sourceId!==t)return;let i=new Map(Or.positions);i.delete(e),Or={positions:i},O()}function D(){return Or}function E(e){return Rr.add(e),()=>Rr.delete(e)}function H(){return()=>{}}function B(){return Wr}function P(e){let t=Fr(e?E:H,e?D:B,e?D:B);return e?t.positions.get(e)??null:null}function G(e){let t=Ir(),n=e.clientId||t,{name:i}=e,r=Gi(e=>e.selections.get(i)),o=Gi(e=>e.setClause),l=Gi(e=>e.clearClause),a=zr(()=>!!r&&r.clauses.size>0,[r]);return{predicate:zr(()=>r&&0!==r.clauses.size?Ei(r,n):()=>!0,[r,n]),isActive:a,selectPoints:Tr(e=>{let t={},r=!1;for(let[n,i]of Object.entries(e))t[n]={type:"point",values:new Set(i)},r=!0;r&&o(i,{clientId:n,type:"point",fields:t})},[n,i,o]),selectInterval:Tr(e=>{let t={},r=!1;for(let[n,i]of Object.entries(e))t[n]={type:"interval",range:i},r=!0;r&&o(i,{clientId:n,type:"interval",fields:t})},[n,i,o]),clear:Tr(()=>{l(i,n)},[l,i,n]),clientId:n}}function V(e,t){let n=Ir(),i=t||n,r=Gi(e=>e.setClause),o=Gi(e=>e.clearClause);return{selectPoints:Tr(t=>{let n={},o=!1;for(let[e,i]of Object.entries(t))n[e]={type:"point",values:new Set(i)},o=!0;o&&r(e,{clientId:i,type:"point",fields:n})},[e,i,r]),clear:Tr(()=>o(e,i),[e,i,o]),clientId:i}}function _(e){let t=e.name||"hover",{fields:n}=e,{predicate:i,isActive:r,selectPoints:o,clear:l}=G({name:t,fields:n});return{onHover:Tr(e=>{if(!e)return void l();let t=qi(e),i={};for(let r of n){let n=t[r];if(void 0!==n)i[r]=[n];else{let t=Yi(e)?.map(e=>qi(e)[r]).filter(e=>void 0!==e);t?.length&&(i[r]=[...new Set(t)])}}Hi(i)?o(i):l()},[n,o,l]),predicate:i,isActive:r}}function U(e){return 2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function Y(e){let{name:t,xField:n,yField:i}=e,{predicate:r,isActive:o,selectInterval:l,clear:a}=G({name:t,fields:[n,i].filter(Boolean)}),s=n&&i?"xyBrush":n?"xBrush":"yBrush",c=Tr(e=>{if(!e)return void a();let t={};"xyBrush"===s&&function(e){return 2===e.length&&Array.isArray(e[0])&&2===e[0].length&&Array.isArray(e[1])&&2===e[1].length}(e)?(n&&(t[n]=[Math.min(e[0][0],e[1][0]),Math.max(e[0][0],e[1][0])]),i&&(t[i]=[Math.min(e[0][1],e[1][1]),Math.max(e[0][1],e[1][1])])):"xBrush"===s&&U(e)?n&&(t[n]=[Math.min(e[0],e[1]),Math.max(e[0],e[1])]):"yBrush"===s&&U(e)&&i&&(t[i]=[Math.min(e[0],e[1]),Math.max(e[0],e[1])]),Hi(t)&&l(t)},[s,n,i,l,a]);return{brushInteraction:zr(()=>({brush:s,during:c,end:c}),[s,c]),predicate:r,isActive:o,clear:a}}function q(e,t,n){let i=Gi(e=>e.selections.get(t));return zr(()=>{if(!i||0===i.clauses.size)return e;let t=Ei(i,n);return e.filter(t)},[e,i,n])}function X(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function K(e,t){let{when:n}=e,i=t.width,r=t.height,o=function(e){if("number"==typeof e.height&&e.height>0)return e.width/e.height}(t),l=function(e){if("number"==typeof e.height&&e.height>0)return e.height>e.width?"portrait":"landscape"}(t);return!("number"==typeof n.minWidth&&n.minWidth>i||"number"==typeof n.maxWidth&&i>n.maxWidth||"number"==typeof n.minHeight&&("number"!=typeof r||n.minHeight>r)||"number"==typeof n.maxHeight&&("number"!=typeof r||r>n.maxHeight)||"number"==typeof n.minAspectRatio&&("number"!=typeof o||n.minAspectRatio>o)||"number"==typeof n.maxAspectRatio&&("number"!=typeof o||o>n.maxAspectRatio)||n.orientation&&l!==n.orientation)}function J(e,t,n=e.responsiveRules){if(!Array.isArray(n)||0===n.length)return{props:e,matches:[]};let i=n.map((e,t)=>({rule:e,index:t})).filter(e=>K(e.rule,t)).sort((e,t)=>("number"==typeof e.rule.priority?e.rule.priority:e.index)-("number"==typeof t.rule.priority?t.rule.priority:t.index));return{props:i.reduce((e,t)=>function(e,t){let n={...e,...t};for(let i of["margin","frameProps","mobileSemantics","style"])X(e[i])&&X(t[i])&&(n[i]={...e[i],...t[i]});return"string"==typeof e.className&&"string"==typeof t.className&&(n.className=`${e.className} ${t.className}`),n}(e,t.rule.transform),e),matches:i}}function Z(e={}){let{limit:t=50,types:n,chartId:i}=e,r=Bi(e=>e.version),o=Bi(e=>e.observations),l=Bi(e=>e.clearObservations),a=Dr(()=>{let e=o;if(n&&n.length>0){let t=new Set(n);e=e.filter(e=>t.has(e.type))}return i&&(e=e.filter(e=>e.chartId===i)),e.length>t&&(e=e.slice(e.length-t)),e},[o,n,i,t,r]);return{observations:a,latest:a.length>0?a[a.length-1]:null,clear:l}}function Q(e,t){let n=e.get(t);if(void 0!==n)return n;if(e.size>=4096)return function(e){let t=2166136261;for(let n=0;e.length>n;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}(t);let i=e.size;return e.set(t,i),i}function ee(e){let t=e?.find(e=>"bottom"===e.orient),n=e?.find(e=>"top"===e.orient),i=e?.find(e=>"left"===e.orient),r=e?.find(e=>"right"===e.orient);return{bottomAxis:t,topAxis:n,leftAxis:i,rightAxis:r,xAxis:t??n,yAxis:i??r,xOrient:t||!n?"bottom":"top",yOrient:i||!r?"left":"right"}}function te(e){let t=6;for(let n=1;e.length>n;n++){let i=Math.abs(e[n]-e[n-1]);i>0&&Number.isFinite(i)&&(t=Math.max(t,Math.ceil(Math.log10(Math.max(Math.abs(e[n]),Math.abs(e[n-1]))/i))+1))}let n=Math.min(17,t);return e=>Number.isInteger(e)?e+"":Number(e.toPrecision(n))+""}function ne(...e){let t;for(let n of e)n&&(t=ie(t)&&ie(n)?{legendGroups:[...t.legendGroups,...n.legendGroups],legendDistance:n.legendDistance??t.legendDistance}:n);return t}function ie(e){return"object"==typeof e&&null!==e&&"legendGroups"in e&&Array.isArray(e.legendGroups)}function re(e){return"object"==typeof e&&null!==e&&"gradient"in e}function oe(e,t,n,i,r=8){let o=i,l="left"===i?"right":"right"===i?"left":"top"===i?"bottom":"top",a=Math.max(t[o],Math.max(0,("left"===i||"right"===i?n[0]:n[1])-r)-e[l]);e[o]>a&&(e[o]=a)}function le(e){return Math.ceil(7*e.length)}function ae(e,t){if(ie(e)){let n=be(t),i=100;for(let t of e.legendGroups){t.label&&(i=Math.max(i,le(t.label)));for(let e of t.items)i=Math.max(i,n.swatchSize+n.labelGap+le(e.label))}return i}if(re(e)){let{gradient:t}=e,n=t.format||te(t.domain),i=Math.max(le(n(t.domain[0])),le(n(t.domain[1]))),r=t.label?le(t.label):0;return Math.max(100,19+i,r)}return 100}function se(e){return(ie(e)||re(e))&&Number.isFinite(e.legendDistance)?Math.max(0,e.legendDistance):10}function ce(e,t){return null!=e?.sideGutter?Math.max(0,e.sideGutter):t?.hasAxis?t.hasAxisLabel?Zr:Jr:0}function ue(e){return Math.max(0,e?.edgeGutter??3)}function de(e,t){return null!=t?.axisGutter?Math.max(0,t.axisGutter):e?.hasAxis?e.hasAxisLabel?e.rotatedTicks?64:46:22:0}function he(e){let{bottomAxis:t,topAxis:n,leftAxis:i,rightAxis:r}=ee(e.axes),o=!(n&&!t||!1===t?.visible),l=!!n&&!t&&!1!==n.visible,a=!(r&&!i||!1===i?.visible),s=!!r&&!1!==r.visible,c=!1!==e.showAxes;return{hasAxis:c&&o,hasAxisLabel:c&&o&&!!(t?.label??e.xLabel),rotatedTicks:c&&o&&(e.rotatedTicks??!!t?.autoRotate),topAxis:l?{hasAxis:c,hasAxisLabel:c&&!!(n?.label??e.xLabel),rotatedTicks:c&&(e.rotatedTicks??!!n?.autoRotate)}:void 0,leftAxis:a?{hasAxis:c,hasAxisLabel:c&&!!(i?.label??e.yLabel)}:void 0,rightAxis:s?{hasAxis:c,hasAxisLabel:c&&!!(r?.label??e.yLabelRight??e.yLabel)}:void 0}}function fe(e,t){return he({showAxes:e.showAxes??t.showAxes,xLabel:e.xLabel??t.xLabel,yLabel:e.yLabel??t.yLabel,yLabelRight:e.yLabelRight??t.yLabelRight,axes:e.axes??t.axes})}function me(e){let t=e.projection??"vertical",n=!1!==e.showAxes&&"radial"!==t;return{hasAxis:n,hasAxisLabel:n&&("horizontal"===t?e.hasValueLabel:e.hasCategoryLabel),leftAxis:{hasAxis:n,hasAxisLabel:n&&("horizontal"===t?e.hasCategoryLabel:e.hasValueLabel)}}}function pe(e,t,n){if(re(e))return e.gradient.label?46:26;if(!ie(e))return 20;let i=be(n),r=Math.max(1,n?.maxWidth??t),o=i.rowHeight;for(let t of e.legendGroups){let e=0,n=0;for(let o of t.items){let t=i.swatchSize+i.labelGap+le(o.label),l=0===n?t:n+i.itemGap+t;n>0&&l>r?(e+=1,n=t):n=l}t.items.length>0&&(e+=1),o=Math.max(o,e*i.rowHeight,t.label?le(t.label):0)}return o+(e.legendGroups.length>1?16:0)}function ye(e,t,n){return ae(e,t)+se(e)+ce(t,n)+ue(t)}function ge(e,t){let{legend:n}=t;if(!n)return;let i=t.position??"right",r=pe(n,Math.max(1,t.size[0]-e.left-e.right),t.legendLayout)+se(n)+de("bottom"===i?t.axisChrome:"top"===i?t.axisChrome?.topAxis:void 0,t.legendLayout)+("top"===i&&t.hasTitle?24:0),o=Math.max(t.minimumMargin??0,"top"===i?t.hasTitle?58:34:0);"right"===i?e.right=Math.max(e.right,o,ye(n,t.legendLayout,t.axisChrome?.rightAxis)):"left"===i?e.left=Math.max(e.left,o,ye(n,t.legendLayout,t.axisChrome?.leftAxis)):"top"===i?e.top=Math.max(e.top,o,r):e.bottom=Math.max(e.bottom,o,r)}function be(e){let t=Math.max(1,e?.swatchSize??16),n=Math.max(t,e?.rowHeight??22);return{swatchSize:t,labelGap:Math.max(0,e?.labelGap??6),itemGap:Math.max(0,e?.itemGap??10),rowHeight:n,align:"left"===e?.align?"start":"right"===e?.align?"end":e?.align??"start",maxWidth:e?.maxWidth}}function xe(e,t,n=!1){let i={...e};for(let e of t??[])!1===e.visible&&("top"!==e.orient||!n)&&(i[e.orient]=0);return i}function ve({config:e,orientation:t="vertical",width:n=100,customClickBehavior:i,customHoverBehavior:r,highlightedCategory:o,isolatedCategories:l,legendInteraction:a}){let{colorFn:s,domain:c,label:u,format:d}=e,h="horizontal"===t,f=d||te(c),m="grad-legend-"+Qr.useId(),p=!(!i&&!r),y="isolate"===a||void 0===a&&null!=l,[g,b]=Qr.useState(0),[x,v]=Qr.useState(null),w=Qr.useRef([]),[k,M]=c,A=Qr.useMemo(()=>Array.from({length:65},(e,t)=>{let n=t/64;return eo("stop",{offset:n,stopColor:s(h?k+n*(M-k):M-n*(M-k))},t)}),[s,k,M,h]),S=h?Math.min(n,200):14,C=h?12:100,$=h?Math.max(0,(n-S)/2):0,j=u?18:0;return to("g",{"aria-label":u||"Gradient legend",role:p?"listbox":void 0,"aria-orientation":p?t:void 0,"aria-multiselectable":!(!p||!y)||void 0,style:Xr,children:[eo("defs",{children:eo("linearGradient",{id:m,x1:"0%",y1:"0%",x2:h?"100%":"0%",y2:h?"0%":"100%",children:A})}),u&&eo("text",{x:h?$+S/2:0,y:12,textAnchor:h?"middle":"start",fontSize:11,fill:"var(--semiotic-text, #333)",children:u}),eo("rect",{x:$,y:j,width:S,height:C,fill:`url(#${m})`,rx:2}),p&&Array.from({length:5},(e,n)=>((e,n,a)=>{let s="string"==typeof e.interactionKey?e.interactionKey:e.label,c=l?.has(s)??!1,u=o===s,d=x===a,h=e=>{let t=(e+5)%5;b(t),w.current[t]?.focus()};return eo("rect",{ref:e=>{w.current[a]=e},className:"semiotic-gradient-legend-bin",...n,fill:l?.size&&!c||null!=o&&!u?"rgba(255,255,255,0.65)":"transparent",stroke:d||c||u?"var(--semiotic-focus, #005fcc)":"transparent",strokeWidth:d?3:2,tabIndex:a===g?0:-1,role:"option","aria-label":e.label,"aria-selected":y?c:void 0,"aria-current":!(y||!u)||void 0,onClick:i?()=>i(e):void 0,onMouseEnter:r?()=>r(e):void 0,onMouseLeave:r?()=>r(null):void 0,onFocus:()=>{b(a),v(a),r?.(e)},onBlur:()=>{v(null),r?.(null)},onKeyDown:n=>{if(("Enter"===n.key||" "===n.key)&&i)return n.preventDefault(),void i(e);let r="horizontal"===t?"ArrowRight":"ArrowDown";n.key===("horizontal"===t?"ArrowLeft":"ArrowUp")||n.key===r?(n.preventDefault(),h(a+(n.key===r?1:-1))):("Home"===n.key||"End"===n.key)&&(n.preventDefault(),h("Home"===n.key?0:4))},style:{cursor:"pointer",pointerEvents:"all"}},"gradient-interaction-"+a)})((e=>{let t=h?e:5-e-1,n=c[0]+t/5*(c[1]-c[0]),i=c[0]+(t+1)/5*(c[1]-c[0]);return{label:`${f(n)} – ${f(i)}`,valueRange:[n,i],interactionKey:`${n}:${i}`}})(n),{x:h?$+n*S/5:0,y:h?j:j+n*C/5,width:h?S/5:S,height:h?C:C/5},n)),[0,1].map(e=>eo("text",{x:h?$+e*S:S+5,y:j+(h?C+12:e?C:10),textAnchor:h?e?"end":"start":void 0,fontSize:10,fill:"var(--semiotic-text-secondary, #666)",children:f(c[h?e:1-e])},e))]})}function we(e,t,n,i,r){if("function"==typeof n)return n(e);let o=i(e,t);return"fill"===n?no("rect",{style:o,width:r,height:r}):no("line",{style:o,x1:0,y1:0,x2:r,y2:r})}function ke({swatchSize:e}){return no("path",{d:`M${.25*e},${.55*e} L${.45*e},${.75*e} L${.8*e},${.3*e}`,fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})}function Me(e,t,n){return n&&n.size>0?n.has(e.label)?1:.3:null!=t?e.label===t?1:.3:1}function Ae(e,t,n,i,r,o){let{legendGroup:{type:l="fill",styleFn:a,items:s},customClickBehavior:c,customHoverBehavior:u,highlightedCategory:d,isolatedCategories:h,focusedGroupIndex:f,focusedItemIndex:m,groupIndex:p,onFocusedIndexChange:y,interactive:g,useIsolateAria:b,metrics:{swatchSize:x,labelGap:v}}=e,w=!!h?.size&&h.has(t.label);return io("g",{transform:i,onClick:c?()=>c(t):void 0,onMouseEnter:u?()=>u(t):void 0,onMouseLeave:u?()=>u(null):void 0,tabIndex:g?p===f&&n===m?0:-1:void 0,role:g?"option":void 0,"aria-selected":g&&b?w:void 0,"aria-current":!(!g||b||null==d||t.label!==d)||void 0,"aria-label":t.label,onKeyDown:g?e=>{if(("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c?.(t)),e.key===r||e.key===o){e.preventDefault();let t=(n+(e.key===o?1:-1)+s.length)%s.length;y(p,t);let i=e.currentTarget.parentElement?.children[t];i instanceof SVGElement&&i.focus()}}:void 0,onFocus:g?e=>{y(p,n),u?.(t),e.currentTarget.querySelector(".semiotic-legend-focus-ring")?.setAttribute("visibility","visible")}:void 0,onBlur:g?e=>{u?.(null),e.currentTarget.querySelector(".semiotic-legend-focus-ring")?.setAttribute("visibility","hidden")}:void 0,style:{cursor:g?"pointer":"default",opacity:Me(t,d,h),transition:"opacity 150ms ease",pointerEvents:"all",outline:"none"},children:[g&&no("rect",{className:"semiotic-legend-focus-ring",x:-2,y:-2,width:x+v+2+7*t.label.length,height:x+4,fill:"none",stroke:"var(--semiotic-focus, #005fcc)",strokeWidth:2,rx:3,visibility:"hidden"}),we(t,n,l,a,x),w&&no(ke,{swatchSize:x}),no("text",{y:x/2,x:x+v,dominantBaseline:"central",fontSize:12,style:Kr,fill:"var(--semiotic-text, #333)",children:t.label})]},"legend-item-"+n)}function Se(e){let{legendGroups:t,customClickBehavior:n,customHoverBehavior:i,highlightedCategory:r,isolatedCategories:o,legendInteraction:l,title:a="Legend",width:s=100,height:c=20,orientation:u="vertical",legendLayout:d}=e,h=be(d),[f,m]=qr.useState(0),[p,y]=qr.useState(0),g=qr.useCallback((e,t)=>{m(e),y(t)},[]),b="vertical"===u?(({legendGroups:e,width:t,customClickBehavior:n,customHoverBehavior:i,highlightedCategory:r,isolatedCategories:o,focusedGroupIndex:l,focusedItemIndex:a,onFocusedIndexChange:s,legendInteraction:c,metrics:u})=>{let d=[],h=function(e,t){let n=24;return e.map(({hasLabel:e,itemCount:i})=>{n+=5;let r,o=n;n+=8,e&&(n+=16,r=n,n+=8);let l=n;return n+=i*t+8,{lineY:o,labelY:r,itemsY:l,endY:n}})}(e.map(e=>({hasLabel:!!e.label,itemCount:e.items.length})),u.rowHeight);return e.forEach((e,f)=>{let m=h[f];d.push(no("line",{stroke:"gray",x1:0,y1:m.lineY,x2:t,y2:m.lineY},"legend-top-line legend-symbol-"+f)),e.label&&null!=m.labelY&&d.push(no("text",{y:m.labelY,className:"legend-group-label",fontSize:12,style:Kr,fill:"var(--semiotic-text, #333)",children:e.label},"legend-text-"+f)),d.push(no("g",{className:"legend-item",transform:`translate(0,${m.itemsY})`,children:ro(e,n,i,r,o,l,a,f,s,c,u)},"legend-group-"+f))}),d})({legendGroups:t||[],width:s,customClickBehavior:n,customHoverBehavior:i,highlightedCategory:r,isolatedCategories:o,focusedGroupIndex:f,focusedItemIndex:p,onFocusedIndexChange:g,legendInteraction:l,metrics:h}):(({legendGroups:e,height:t,width:n,customClickBehavior:i,customHoverBehavior:r,highlightedCategory:o,isolatedCategories:l,focusedGroupIndex:a,focusedItemIndex:s,onFocusedIndexChange:c,legendInteraction:u,metrics:d})=>{let h=0,f=[];e.forEach((e,t)=>{let m=0;e.label&&(m+=16);let p=((e,t,n,i,r,o,l,a,s,c,u,d)=>{let{items:h}=e,f=[],{swatchSize:m,labelGap:p,itemGap:y,rowHeight:g,align:b}=u,x={legendGroup:e,customClickBehavior:t,customHoverBehavior:n,highlightedCategory:i,isolatedCategories:r,focusedGroupIndex:o,focusedItemIndex:l,groupIndex:a,onFocusedIndexChange:s,interactive:!(!t&&!n),useIsolateAria:"isolate"===c||void 0===c&&null!=r,metrics:u},v=h.map(e=>m+p+7*e.label.length),w=[],k=0,M=0;v.forEach((e,t)=>{let n=0===M?e:M+y+e;d&&d>0&&M>0&&n>d?(w.push({start:k,end:t,width:M}),k=t,M=e):M=n}),h.length>0&&w.push({start:k,end:h.length,width:M}),w.forEach((e,t)=>{let n="center"===b?Math.max(0,((d??e.width)-e.width)/2):"end"===b?Math.max(0,(d??e.width)-e.width):0;for(let i=e.start;e.end>i;i++)f.push(Ae(x,h[i],i,`translate(${n},${t*g})`,"ArrowLeft","ArrowRight")),n+=v[i]+y});let A=w.reduce((e,t)=>Math.max(e,t.width),0),S=w.length;return{items:f,offset:A,totalRows:S,totalHeight:S*g}})(e,i,r,o,l,a,s,t,c,u,d,d.maxWidth??n);m+=p.offset+5,f.push({label:e.label,...p,offset:m,totalRows:p.totalRows,totalHeight:p.totalHeight}),h+=m+12});let m=d.maxWidth??n,p=h>m?0:"center"===d.align?Math.max(0,(m-h)/2):"end"===d.align?Math.max(0,m-h):0,y=[];return f.forEach((n,i)=>{let r=e[i];r.label&&(y.push(no("text",{transform:`translate(${p},0) rotate(90)`,textAnchor:"start",className:"legend-group-label",fontSize:12,style:Kr,fill:"var(--semiotic-text, #333)",children:r.label},"legend-text-"+i)),p+=16),y.push(no("g",{className:"legend-item",transform:`translate(${p},0)`,children:n.items},"legend-group-"+i)),p+=n.offset+5,e[i+1]&&y.push(no("line",{stroke:"gray",x1:p,y1:-8,x2:p,y2:(n.totalHeight||t)+0+8},"legend-top-line legend-symbol-"+i)),p+=12}),no("g",{children:y})})({legendGroups:t||[],title:a,height:c,width:s,customClickBehavior:n,customHoverBehavior:i,highlightedCategory:r,isolatedCategories:o,focusedGroupIndex:f,focusedItemIndex:p,onFocusedIndexChange:g,legendInteraction:l,metrics:h}),x=!(!n&&!i);return io("g",{role:x?"listbox":void 0,"aria-multiselectable":!(!x||"isolate"!==l&&(void 0!==l||null==o))||void 0,"aria-label":"Chart legend",style:Xr,children:[void 0!==a&&""!==a&&"vertical"===u&&no("text",{className:"legend-title",y:16,x:s/2,textAnchor:"middle",fontSize:12,style:Kr,fill:"var(--semiotic-text, #333)",children:a}),b]})}function Ce(e,t=0,n=1/0,i=0){let r=Number.isFinite(t)?t:0,o=Number.isFinite(n)?Math.max(r,n):1/0,l=Number.isFinite(e)?Math.floor(e):r,a=Math.max(r,Math.min(o,l));return i>0&&Number.isFinite(i)?Math.max(r,Math.min(o,Math.round(a/i)*i)):a}function $e(e,t,n,i={}){let r=oo(null),[o,l]=lo(null);return co(()=>{if(!t&&!n)return;let e=r.current;if(!e||typeof ResizeObserver>"u")return;let o=(e,t)=>({w:Ce(e,i.minWidth,i.maxWidth,i.widthStep),h:Ce(t,i.minHeight,i.maxHeight,i.heightStep)}),a=e.getBoundingClientRect();(a.width>0||a.height>0)&&l(o(a.width,a.height));let s=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect,i=o(e,n);l(e=>e&&e.w===i.w&&e.h===i.h?e:i)}});return s.observe(e),()=>s.disconnect()},[t,n,i.minWidth,i.maxWidth,i.widthStep,i.minHeight,i.maxHeight,i.heightStep]),[r,[t&&o?o.w:e[0],n&&o?o.h:e[1]]]}function je(){return Hr(mo)}function Le(e){let t=new Set,n=[];for(let i of e)t.has(i)||(t.add(i),n.push(i));return n}function Ne(e,t){if(e.length!==t.length)return!1;for(let n=0;e.length>n;n++)if(e[n]!==t[n])return!1;return!0}function Ie(e){let t=Hr(po),n=Pr(),i=Le(e),r=_r([]);Ne(r.current,i)||(r.current=i);let o=r.current;yo(()=>{if(t)return()=>t.unregisterCategories(n)},[t,n]),yo(()=>{t&&t.registerCategories(n,o)},[t,n,o])}function ze(){return null!==Hr(po)}function Te({categoryColors:e,interaction:t,selectionName:n,field:i}){let r=Object.entries(e),o=r.map(([e])=>e),l=[{styleFn:e=>({fill:e.color||"#333",stroke:e.color||"#333"}),type:"fill",items:r.map(([e,t])=>({label:e,color:t})),label:""}],{selectPoints:a,clear:s}=G({name:n,fields:[i],clientId:go}),{selectPoints:c,clear:u}=G({name:n,fields:[i],clientId:bo}),d=Gi(e=>e.selections.get(n)),{isolatedCategories:h,highlightedCategory:f}=Vr(()=>{let e=new Set,t=null,n=d?.clauses.get(go)?.fields[i];if("point"===n?.type)for(let t of n.values)e.add(t+"");let r=d?.clauses.get(bo)?.fields[i];if("point"===r?.type){let e=r.values.values().next().value;null!=e&&(t=e+"")}return{isolatedCategories:e,highlightedCategory:t}},[d,i]),m=Yr(e=>{"highlight"===t&&(e?c({[i]:[e.label]}):u())},[t,i,c,u]),p=Yr(e=>{if("isolate"!==t)return;let n=new Set(h);n.has(e.label)?n.delete(e.label):n.add(e.label),0===n.size||n.size===o.length?s():a({[i]:Array.from(n)})},[t,i,h,o.length,a,s]),[y,[g]]=$e([0,0],!0,!1),b=Vr(()=>function(e,t){if(!t||0===e.length)return 1;let n=0,i=1;for(let r of e){let e=26+7*r.length;n>0&&n+e>t&&(i++,n=0),n+=e}return i}(r.map(([e])=>e),g),[r,g]);return 0===r.length?null:uo("div",{ref:y,style:{width:"100%",display:"block"},children:uo("svg",{width:"100%",height:Math.max(30,22*b+8),style:{display:"block",overflow:"visible"},children:uo(Se,{legendGroups:l,title:!1,orientation:"horizontal",width:g,height:20,customHoverBehavior:"highlight"===t?m:void 0,customClickBehavior:"isolate"===t?p:void 0,highlightedCategory:f,isolatedCategories:h})})})}function Fe({children:e,selections:t,showLegend:n,legendPosition:i="top",legendInteraction:r="none",legendSelectionName:o="legend",legendField:l="category"}){let a=Vr(()=>{if(!t)return;let e=new Map;for(let[n,i]of Object.entries(t))i.resolution&&e.set(n,{name:n,resolution:i.resolution,clauses:new Map});return e.size>0?{selections:e}:void 0},[t]),s=F(),c=_i(e=>e.theme.colors.categorical),u=c.length>0?c:Ci,[d,h]=Ur({}),f=_r(new Map),m=Vr(()=>({registerCategories:(e,t)=>{let n=Le(t);h(t=>Ne(t[e]??[],n)?t:{...t,[e]:n})},unregisterCategories:e=>{h(t=>{if(!Object.prototype.hasOwnProperty.call(t,e))return t;let n={...t};return delete n[e],n})}}),[]),p=Vr(()=>{let e=[];for(let t of Object.values(d))for(let n of t)e.push(n);return Le(e)},[d]),y=Vr(()=>{let e=s??{},t=new Map(f.current),n=Object.entries(e).filter(e=>"string"==typeof e[1]&&e[1].length>0),i=p.map(n=>{let i=Q(t,n);return[n,Ii(e,n)??u[i%u.length]]});return{categoryIndexes:t,colors:Object.fromEntries([...n,...i])}},[s,p,u]);yo(()=>{f.current=y.categoryIndexes},[y]);let g=y.colors,b=void 0===n||n,x=Object.keys(g).length>0;return uo(Di,{initialState:a,children:uo(Wi,{children:uo(mo.Provider,{value:!0,children:uo(po.Provider,{value:m,children:uo(T,{colors:g,children:ho(fo.Provider,{value:b&&x,children:[b&&"top"===i&&uo(Te,{categoryColors:g,interaction:r,selectionName:o,field:l}),e,b&&"bottom"===i&&uo(Te,{categoryColors:g,interaction:r,selectionName:o,field:l})]})})})})})})}function Oe(e){if(null==e)return()=>{};let t="function"==typeof e?e:t=>t[e];return e=>De(t(e))}function Re(e,t){let n=Oe(e),i=Oe(t);return(e,t)=>{let r=i(e);return{value:r,x:n(e),y:r,category:t}}}function We(e,t){let n=Oe(t??"value"),i=null==e?void 0:"function"==typeof e?e:t=>t[e];return e=>{let t=i?i(e):void 0;return{value:n(e),category:null==t?void 0:t+""}}}function De(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&""!==e.trim()){let t=Number(e);return Number.isFinite(t)?t:void 0}}function Ee(e,t,n){let i=null!=e.axis?n[e.axis]:null!=e.field?t[e.field]:n.value;if(void 0!==e.eq&&i!==e.eq||void 0!==e.ne&&i===e.ne||void 0!==e.in&&!e.in.includes(i))return!1;if(void 0===e.gt&&void 0===e.gte&&void 0===e.lt&&void 0===e.lte&&void 0===e.within&&void 0===e.outside)return!0;let r=De(i);if(void 0===r||void 0!==e.gt&&e.gt>=r||void 0!==e.gte&&e.gte>r||void 0!==e.lt&&r>=e.lt||void 0!==e.lte&&r>e.lte)return!1;if(void 0!==e.within){let[t,n]=e.within;if(t>r||r>n)return!1}if(void 0!==e.outside){let[t,n]=e.outside;if(r>=t&&n>=r)return!1}return!0}function He(e,t,n){let i=e.when;return void 0===i||!0===i||!1!==i&&("function"==typeof i?i(t,n):Ee(i,t,n))}function Be(e,t,n){if(!t||0===t.length)return{};let i={};for(let r of t){if(!He(r,e,n))continue;let t="function"==typeof r.style?r.style(e,n):r.style;t&&(i={...i,...t})}return i}function Pe(e,t,n,i=e=>e){let r=e??(()=>({}));return t&&0!==t.length?(e,o)=>{let l=i(e),a={...r(e,o)};return Object.assign(a,Be(l,t,n(l,o))),a}:r}function Ge(e,t,n){return e&&0!==e.length?(i,r)=>{let o=Be(i,e,t(i,r)),l=n?n(i,r):void 0;return l?{...o,...l}:o}:n}function Ve(e,t,n,i){if(!e||0===e.length)return i;let r=We(t,n);return(t,n)=>{let o=t&&t.data||t,l=Be(o,e,r(o)),a=i?i(t,n):void 0;return a?{...l,...a}:l}}function _e(e,t,n,i){return Ge(e,Re(t,n),i)}function Ue(e,t,n){let i=Oe(t);return Ge(e,(e,t)=>({value:i(e),category:t}),n)}function Ye(e){if(!e)return xo;let t=!1;for(let n=0;e.length>n;n++){let i=e[n];if(null==i||"object"!=typeof i){t=!0;break}}if(!t)return e;let n=[];for(let t of e)null!=t&&"object"==typeof t&&n.push(t);return n}function qe(e,t){let n={...e};for(let e of t)n[wo[e]]++;return n}function Xe(e,t,n){let i=new Set(t);return{changeSet:{...e,...e.keys?{keys:[...e.keys]}:{}},changed:i,revisions:qe(n,i)}}function Ke(e){let{domain:t,layout:n,sceneGeometry:i}=e.revisions;return{domain:t,layout:n,sceneGeometry:i}}function Je(e,t){return{sceneGeometry:Math.max(e.sceneGeometry,t.sceneGeometry),layout:Math.max(e.layout,t.layout),domain:Math.max(e.domain,t.domain)}}function Ze(e){return So(new Lo(e))}function Qe(e,t,n,i=!1,r=!1){let o=e.beforeCompute(t.getLastUpdateResult(),i);n(),e.afterCompute(o,!0,r)}function et(e){let{legend:t,totalWidth:n,totalHeight:i,margin:r,legendPosition:o="right",legendLayout:l,legendHoverBehavior:a,legendClickBehavior:s,legendHighlightedCategory:c,legendIsolatedCategories:u,legendInteraction:d}=e;if(!t)return null;let{x:h,y:f,width:m}=function(e,t){let n=t.position??"right",i="top"===n||"bottom"===n,r=Math.max(0,t.totalWidth-t.margin.left-t.margin.right),o=Math.max(1,i?t.legendLayout?.maxWidth??r:t.reservedWidth??ae(e,t.legendLayout)),l=se(e),a=ce(t.legendLayout,"left"===n?t.axisChrome?.leftAxis:t.axisChrome?.rightAxis),s=ue(t.legendLayout),c=pe(e,r,t.legendLayout),u=de(t.axisChrome,t.legendLayout),d=de(t.axisChrome?.topAxis,t.legendLayout);if("left"===n)return{x:Math.max(s,t.margin.left-a-o-l),y:t.margin.top,width:o,height:c};if("top"===n)return{x:t.margin.left,y:t.margin.top-d-l-c,width:o,height:c};if("bottom"===n){let e=t.totalHeight-t.margin.bottom;return{x:t.margin.left,y:Math.max(e+l,Math.min(e+u+l,t.totalHeight-c)),width:o,height:c}}return{x:Math.min(t.totalWidth-o-s,t.totalWidth-t.margin.right+a+l),y:t.margin.top,width:o,height:c}}(t,{totalWidth:n,totalHeight:i,margin:r,position:o,legendLayout:l,axisChrome:e.axisChrome}),p="top"===o||"bottom"===o;return Io("g",{transform:`translate(${h}, ${f})`,children:re(t)?Io(ve,{config:t.gradient,orientation:p?"horizontal":"vertical",width:m,customHoverBehavior:a,customClickBehavior:s,highlightedCategory:c,isolatedCategories:u,legendInteraction:d}):ie(t)?Io(Se,{legendGroups:t.legendGroups,title:"",width:m,orientation:p?"horizontal":"vertical",legendLayout:l,customHoverBehavior:a,customClickBehavior:s,highlightedCategory:c,isolatedCategories:u,legendInteraction:d}):t})}function tt(e){return!0===e?._annotationDeferred}function nt(e){return"blended"===e?.cohesion||"layer"===e?.cohesion?e.cohesion:null}function it(e){let t=e?.provenance?.confidence;return"number"==typeof t&&Number.isFinite(t)?Math.max(0,Math.min(1,t)):null}function rt(e){return Math.max(.72,.95-.06*e)}function ot(e){let t=e.map((e,t)=>{return{p:e,i:t,emphasis:(n=e.annotation,"primary"===n?.emphasis||"secondary"===n?.emphasis?n.emphasis:null),confidence:it(e.annotation),readingOrder:null,rank:1};var n}),n=t.some(e=>null!=e.emphasis||null!=e.confidence),i=e.some(e=>tt(e.annotation)),r=e.some(e=>null!=nt(e.annotation)),o=e.some(e=>"layer"===nt(e.annotation));if(!n&&!i&&!r)return e.map(e=>e.node);let l=t.filter(e=>null==e.emphasis&&null!=e.confidence).slice().sort((e,t)=>(t.confidence??0)-(e.confidence??0)||e.i-t.i);l.forEach((e,t)=>{e.readingOrder=t,e.rank=2-t/Math.max(1,l.length)});for(let e of t)e.emphasis&&(e.rank=To[e.emphasis]);let a=t.sort((e,t)=>e.rank-t.rank||e.i-t.i).map(e=>{let{p:t,i:n,emphasis:i,readingOrder:r}=e,o=tt(t.annotation),l=t.node;if("primary"===i||"secondary"===i||null!=r){let e=null==i&&null!=r;l=zo("g",{className:e?"annotation-emphasis annotation-emphasis--inferred":"annotation-emphasis annotation-emphasis--"+i,..."secondary"===i?{opacity:.6,fontSize:"0.88em"}:{},...e?{opacity:rt(r),"data-annotation-reading-order":r}:{},children:t.node},"annotation-emphasis-"+n)}let a=nt(t.annotation);return a&&(l=zo("g",{className:"annotation-cohesion--"+a,children:l},"annotation-cohesion-"+n)),o&&(l=zo("g",{className:"annotation-deferred","data-annotation-disclosure":"deferred",children:l},"annotation-deferred-"+n)),l});return i&&a.unshift(zo("style",{children:Fo},"annotation-disclosure-style")),o&&a.unshift(zo("style",{children:".annotation-cohesion--layer text,.annotation-cohesion--layer tspan{fill:var(--semiotic-annotation-color,var(--semiotic-text-secondary,#666));font-style:italic}"},"annotation-cohesion-style")),a}function lt(e,t,n,i){return function(e,t,n,i){let r=[];return e.forEach((e,o)=>{let l;l=n?n(e,o,i)??t(e,o,i):t(e,o,i),l&&r.push({node:l,annotation:e})}),{nodes:ot(r),renderedAnnotations:r.map(e=>e.annotation)}}(e,t,n,i).nodes}function at(e,t,n){if(!e)return null;let i="object"==typeof e?e:{};return Oo("circle",{className:"semiotic-threshold-end-cap",cx:t[0],cy:t[1],r:Math.max(0,i.radius??4),fill:i.fill??n})}function st({ann:e,position:t,vertical:n,width:i,height:r,color:o,fontSize:l=12,fontFamily:a,bold:c,background:u,dash:d="6,3",labelGap:h=4}){let f=e.labelPosition,m=t>.6*i,p=n?t+(m?-4:4):"left"===f?4:"center"===f?i/2:i-4,y=n?"bottom"===f?r-4:"center"===f?r/2:16:20>t?Math.min(r-4,t+16):t-h,g=n?m?"end":"start":"left"===f?"start":"center"===f?"middle":"end",b=n?[t,0]:[0,t],x=n?[t,r]:[i,t];return Wo("g",{opacity:e.opacity,children:[Ro("line",{x1:b[0],y1:b[1],x2:x[0],y2:x[1],stroke:o,strokeWidth:e.strokeWidth??1.5,strokeDasharray:e.strokeDasharray||d}),at(e.endCap,b,o),e.label&&Ro(s,{x:p,y:y,text:e.label,textAnchor:g,fill:o,fontSize:l,fontFamily:a,fontWeight:c?"bold":void 0,background:u??e.labelBackground??"halo"})]})}function ct(e){return{label:e.label,title:e.title,wrap:e.wrap||120,noWrap:"function"==typeof e._noteLayout?e.noWrap:void 0,_noteLayout:e._noteLayout}}function ut(e){return"function"==typeof e._noteLayout?e._noteLayout(e):void 0}function dt(e,t,n){if(!e)return[];let i=Math.max(1,Math.floor(t/n)),r=[],o="";for(let t of e.split(/\s+/))t&&(o&&o.length+1+t.length>i?(r.push(o),o=t):o=o?`${o} ${t}`:t);return o&&r.push(o),r}function ht(e,t,n,i){return"curly"===e?i?`M0,0 C${.6*n},0 ${.4*n},${t/2} ${n},${t/2} C${.4*n},${t/2} ${.6*n},${t} 0,${t}`:`M0,0 C0,${.6*n} ${t/2},${.4*n} ${t/2},${n} C${t/2},${.4*n} ${t},${.6*n} ${t},0`:i?`M0,0 L${n},0 L${n},${t} L0,${t}`:`M0,0 L0,${n} L${t},${n} L${t},0`}function ft(e,t,n,i){if(!e)return Eo("g",{className:"annotation-note"});let{label:r,title:o,orientation:l,align:a,wrap:s=120,noWrap:c}=e;if(!r&&!o)return Eo("g",{className:"annotation-note"});let u=l;u||(u=Math.abs(t)>Math.abs(n)?"leftRight":"topBottom");let d="topBottom"===u,h="leftRight"===u,f=a;(!f||"dynamic"===f)&&(f=d?0>t?"right":"left":0>n?"bottom":"top");let m="start";d?"right"===f?m="end":"middle"===f&&(m="middle"):m=0>t?"end":"start";let p=e.useHTML||e.html,y=p?void 0:ut(e),g=y?.lineHeight??16,b=y?.titleLines??(o?c?[o]:dt(o,s,8):[]),x=y?.labelLines??(r?c?[r]:dt(r,s,8):[]),v=b.length+x.length,w=h?"end"===m?-4:4:0,k=[],M=i||"var(--semiotic-annotation-color, var(--semiotic-text, #333))";if(p)k.push(Eo("foreignObject",{className:"annotation-note-html",x:"end"===m?w-s:"middle"===m?w-s/2:w,y:-g,width:s,height:Math.max(g,v*g+(o&&r?2:0))+g,style:{overflow:"visible"},children:Ho("div",{xmlns:"http://www.w3.org/1999/xhtml",style:{color:M,fontSize:"12px",lineHeight:g+"px",overflow:"visible",textAlign:"end"===m?"right":"middle"===m?"center":"left",whiteSpace:c?"nowrap":"normal",wordBreak:"break-word"},children:[o&&Eo("div",{className:"annotation-note-title",style:{fontWeight:"bold"},children:o}),r&&Eo("div",{className:"annotation-note-label",children:r})]})},"annotation-note-html"));else for(let e of[!0,!1]){let t=e?b:x;if(0===t.length)continue;let n="annotation-note-"+(e?"title":"label");k.push(Eo("text",{className:n,fill:M,textAnchor:m,fontWeight:e?y?.titleFontWeight??"bold":void 0,y:e?void 0:b.length*g,children:t.map((e,t)=>Eo("tspan",{x:w,dy:0===t?0:g,children:e},t))},n))}let A=null;if((o||r)&&(0!==t||0!==n)){let e=d?y?y.width:Math.min(s,120):(b.length+x.length+(x.length>0?1:0))*g,t=d?m:f,n="end"===t||"bottom"===t?-e:"middle"===t?-e/2:0;A=Eo("line",{className:"note-line",x1:d?n:0,x2:d?n+e:0,y1:d?0:n,y2:d?0:n+e,stroke:i||"var(--semiotic-text-secondary, currentColor)"})}let S=Math.max(0,v-1)*g,C=0;(d||h)&&(C=h&&"middle"===f?-(S+g+(x.length>0&&b.length>0?2:0))/2+g/2:0>n||h&&"bottom"===f?-(S+2):2+g);let $=0!==C?`translate(0,${C})`:void 0;return Ho("g",{className:"annotation-note",transform:`translate(${t},${n})`,...y?.textProps,children:[Eo("g",{className:"annotation-note-content",transform:$,children:k}),A]})}function mt(e,t,n,i,r){let o=null,l=n||"var(--semiotic-text-secondary, currentColor)";switch(e){case"callout-circle":{let e=(t?.radius||0)+(t?.radiusPadding||0);e>0&&(o=Eo("circle",{r:e,fill:"none",stroke:l},"subject-circle"));break}case"callout-rect":{let e=t?.width||0,n=t?.height||0;(e>0||n>0)&&(o=Eo("rect",{width:e,height:n,fill:"none",stroke:l},"subject-rect"));break}case"callout-custom":o=t?.custom;break;case"xy-threshold":{let e=i||0,n=r||0,a=0,s=0,c=0,u=0;if(void 0!==t?.x)a=s=(t.x||0)-e,c=(t.y1||0)-n,u=(t.y2||0)-n;else if(void 0!==t?.y)c=u=(t.y||0)-n,a=(t.x1||0)-e,s=(t.x2||0)-e;else if(void 0!==t?.x1||void 0!==t?.x2)a=(t.x1||0)-e,s=(t.x2||0)-e;else{if(void 0===t?.y1&&void 0===t?.y2)break;c=(t.y1||0)-n,u=(t.y2||0)-n}o=Eo("line",{x1:a,y1:c,x2:s,y2:u,stroke:l,strokeDasharray:"5,5"},"threshold-line");break}case"bracket":{let e=t?.type||"curly",n=t?.width??t?.height;void 0!==n&&(o=Eo("path",{d:ht(e,n,t?.depth||30,void 0===t?.width),fill:"none",stroke:l},"bracket-path"));break}}return Eo("g",{className:"annotation-subject",children:o})}function pt(e,t,n,i,r,o){let l,a,s=0,c=0;if("callout-circle"!==r&&"label"!==r||!o?.radius){if("callout-rect"===r&&o){let n=o.width||0,i=o.height||0;if(n>0||i>0){let r=n/2,o=i/2,l=e-r,a=t-o;if(0!==l||0!==a){let e=Math.abs(l),t=Math.abs(a),u=n/2,d=i/2,h=e*d>t*u?u/e:d/t;s=r+l*h,c=o+a*h}}}else if("bracket"===r&&o){let e=o.width,t=o.height,n=o.depth||30;void 0!==e?(s=e/2,c=n):void 0!==t&&(s=n,c=t/2)}}else{let n=(o.radius||0)+(o.radiusPadding||0);if(n>0&&(0!==e||0!==t)){let i=Math.atan2(t,e);s=Math.cos(i)*n,c=Math.sin(i)*n}}let u=e-s,d=t-c,h=Math.hypot(u,d);if(h>.5){let r=i||"var(--semiotic-text-secondary, currentColor)",o="curve"===n?.type,f=Math.atan2(d,u);if(o){let i=(s+e)/2,o=(c+t)/2,a=-d/h,m=u/h,p=(n?.curve??.25)*h,y=i+a*p,g=o+m*p;l=Eo("path",{className:"connector-curve",d:`M${s},${c}Q${y},${g} ${e},${t}`,fill:"none",stroke:r},"connector-line"),f=Math.atan2(g-c,y-s)}else l=Eo("line",{x1:s,y1:c,x2:e,y2:t,stroke:r},"connector-line");if("arrow"===n?.end){let e=.2792526803190927;a=Eo("path",{d:`M${s},${c}L${s+10*Math.cos(f+e)},${c+10*Math.sin(f+e)}L${s+10*Math.cos(f-e)},${c+10*Math.sin(f-e)}Z`,fill:r,stroke:"none"},"connector-arrow")}}return Ho("g",{className:"annotation-connector",children:[l,a]})}function yt(e){let{x:t=0,y:n=0,dx:i,dy:r,nx:o,ny:l,note:a,connector:s,subject:c,type:u,color:d,className:h,disable:f,opacity:m,strokeDasharray:p,events:y={},"data-testid":g}=e,b=Array.isArray(t)?t[0]??0:t,x=Array.isArray(n)?n[0]??0:n,v=Array.isArray(f)?f:[],w=i||0,k=r||0;null!=o&&(w=o-b),null!=l&&(k=l-x);let M="string"==typeof u?u:"label";if("bracket"===M&&c&&0===w&&0===k)if(void 0!==c.width){w=c.width/2;let e=c.depth||30;k=e+(0>e?-5:5)}else if(void 0!==c.height){let e=c.depth||30;w=e+(0>e?-5:5),k=c.height/2}return Ho("g",{className:("annotation "+(h||"")).trim(),transform:`translate(${b},${x})`,"data-testid":g,...null!=m&&{opacity:m},...p&&{strokeDasharray:p},...y,children:[!v.includes("connector")&&pt(w,k,s,d,M,c),!v.includes("subject")&&mt(M,c,d,b,x),!v.includes("note")&&ft(a,w,k,d)]})}function gt(e){let{noteData:t}=e,{screenCoordinates:n}=t,i="string"==typeof t.type?t.type:"label",r=t.eventListeners||t.events||{};if(t.coordinates&&n){let e=t.nx||n[0][0]+(t.dx??0),r=t.ny||n[0][1]+(t.dy??0),o=n.map((n,o)=>{let l=Object.assign({},t,{note:0===o?t.note:{label:""},x:n[0],y:n[1],nx:e,ny:r});return Eo(yt,{"data-testid":"semiotic-annotation",...l,type:i},"multi-annotation-"+o)});return Eo("g",{children:o})}let o=t.note||{title:"none",label:t.label},l=`${o.label}-${o.title}-${t.i}`;return Eo(yt,{"data-testid":"semiotic-annotation",events:r,...t,type:i},l)}function bt(e,t){let n=t.scales?.x??t.scales?.time;return n?null!=e.x?n(e.x):t.xAccessor&&null!=e[t.xAccessor]?n(e[t.xAccessor]):null:null}function xt(e,t){let n=t.scales?.y??t.scales?.value;return n?null!=e.y?n(e.y):t.yAccessor&&null!=e[t.yAccessor]?n(e[t.yAccessor]):null:null}function vt(e){return null==e?null:e+""}function wt(e,t,n){return t.stickyPositionCache?.set(e,n),n}function kt(e,t,n){let i=e.anchor||e.lifecycle?.anchor||"fixed";if("latest"===i){if(null!=e.pointId&&n.pointNodes&&n.pointNodes.length>0)for(let i=n.pointNodes.length-1;i>=0;i--){let r=n.pointNodes[i];if(r.pointId===e.pointId)return wt(t,n,{x:r.x,y:r.y})}let i=function(e){let t=e.data;if(!t||0===t.length)return null;let n=t[t.length-1],i=e.scales?.x??e.scales?.time,r=e.scales?.y??e.scales?.value;if(!i||!r)return null;let o=n[e.xAccessor||"x"],l=n[e.yAccessor||"y"];return null==o||null==l?null:{x:i(o),y:r(l)}}(n);return i?wt(t,n,i):null}if("semantic"===i){let i=function(e,t,n){let i=function(e){return vt(e.provenance?.stableId??e.stableId)}(e);if(!i)return null;let r=n.pointNodes?.find(e=>vt(e.pointId)===i);if(r)return wt(t,n,{x:r.x,y:r.y});let o=n.data?.find(e=>function(e){return vt(e.stableId??e.id??e.provenance?.stableId)}(e)===i);if(!o)return null;let l=bt(o,n),a=xt(o,n);return null==l||null==a?null:wt(t,n,{x:l,y:a})}(e,t,n);if(i)return i}let r=null,o=null;if(null!=e.pointId&&n.pointNodes){let t=n.pointNodes.find(t=>t.pointId===e.pointId);t&&(r=t.x,o=t.y)}if((null==r||null==o)&&(r=bt(e,n),o=xt(e,n)),null!=r&&null!=o)return wt(t,n,{x:r,y:o});if("sticky"===i){let e=n.stickyPositionCache?.get(t);if(e)return e}return null}function Mt(e,t,n,i=50){return!(-i>e||e>(n.width||0)+i||-i>t||t>(n.height||0)+i)}function At(e,t,n,i){let r=rr(e.fill??e.color,t,i);return nr(e.gradient,t,n,"string"==typeof e.fill&&e.fill?e.fill:"string"==typeof e.color&&e.color?e.color:i)??r}function St(e,t,n){let i=e.position,r="string"==typeof i&&Zo.has(i)?i:"bottom-left",o=r.endsWith("left")?"left":r.endsWith("right")?"right":"center",l=r.startsWith("top")?"top":r.startsWith("bottom")?"bottom":"middle",a="top"===l?0:"bottom"===l?n:n/2;return{x:("left"===o?0:"right"===o?t:t/2)+("number"==typeof e.dx&&Number.isFinite(e.dx)?e.dx:0),y:a+("number"==typeof e.dy&&Number.isFinite(e.dy)?e.dy:0),textAnchor:"start"===e.textAnchor||"middle"===e.textAnchor||"end"===e.textAnchor?e.textAnchor:"left"===o?"start":"right"===o?"end":"middle",dominantBaseline:"auto"===e.dominantBaseline||"middle"===e.dominantBaseline||"hanging"===e.dominantBaseline?e.dominantBaseline:"top"===l?"hanging":"bottom"===l?"auto":"middle"}}function Ct(e,t,n,i){return{...St(e,t,n),fill:e.fill??e.color??i.fill,fontSize:e.fontSize??i.fontSize,fontFamily:e.fontFamily??i.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,letterSpacing:e.letterSpacing,opacity:e.opacity,className:e.className,style:{pointerEvents:"none"}}}function $t({annotation:e,width:t,height:n,defaults:i=el}){let r=e.label??e.text;return null==r?null:Qo("text",{...Ct(e,t,n,i),children:r})}function jt(e,t={}){return function(e,n,i){switch(e.type){case"label":case"callout":case"callout-circle":case"callout-rect":{let t=kt(e,n,i);if(!t)return null;let{x:r,y:o}=t;if(!Mt(r,o,i))return null;let l="callout"===e.type?"callout-circle":e.type,a="callout-circle"===l?{radius:e.radius??12,radiusPadding:e.radiusPadding}:"callout-rect"===l?{width:e.width,height:e.height}:void 0;return tl(gt,{noteData:{x:r,y:o,dx:e.dx??30,dy:e.dy??-30,note:ct(e),type:l,...a?{subject:a}:{},connector:e.connector||{end:"arrow"},color:e.color,disable:e.disable,opacity:e.opacity,strokeDasharray:e.strokeDasharray,className:e.className}},"ann-"+n)}case"x-threshold":case"y-threshold":{let t="x-threshold"===e.type,r=null!=e.value?{...e,[t?"x":"y"]:e.value}:e,o=t?bt(r,i):xt(r,i);return null==o?null:tl(st,{ann:e,position:o,vertical:t,width:i.width||0,height:i.height||0,color:e.color||"#f97316",bold:!0},"ann-"+n)}case"enclose":{let t=(e.coordinates||[]).map(e=>({x:bt({...e,type:"point"},i),y:xt({...e,type:"point"},i),r:1})).filter(e=>null!=e.x&&null!=e.y);if(2>t.length)return null;let r=Bo(t),o=e.padding||10;return nl("g",{children:[tl("circle",{cx:r.x,cy:r.y,r:r.r+o,fill:e.fill||"none",fillOpacity:e.fillOpacity??.1,stroke:e.color||"var(--semiotic-text-secondary, #666)",strokeWidth:1.5,strokeDasharray:"4,2"}),e.label&&tl(s,{x:r.x,y:r.y-r.r-o-4,textAnchor:"middle",fill:e.color||"var(--semiotic-text-secondary, #666)",fontSize:12,text:e.label,background:e.labelBackground??"none"})]},"ann-"+n)}case"rect-enclose":{let t=(e.coordinates||[]).map(e=>({x:bt({...e,type:"point"},i),y:xt({...e,type:"point"},i)})).filter(e=>null!=e.x&&null!=e.y);if(2>t.length)return null;let r=e.padding||10,o=t.map(e=>e.x),l=t.map(e=>e.y),[a,c]=Xi(o),[u,d]=Xi(l),h=a-r,f=c+r,m=u-r;return nl("g",{children:[tl("rect",{x:h,y:m,width:f-h,height:d+r-m,fill:e.fill||"none",fillOpacity:e.fillOpacity??.1,stroke:e.color||"var(--semiotic-text-secondary, #666)",strokeWidth:1.5,strokeDasharray:"4,2"}),e.label&&tl(s,{x:(h+f)/2,y:m-4,textAnchor:"middle",fill:e.color||"var(--semiotic-text-secondary, #666)",fontSize:12,text:e.label,background:e.labelBackground??"none"})]},"ann-"+n)}case"highlight":{let t=i.data||[],r="function"==typeof e.filter?t.filter(e.filter):e.field&&null!=e.value?t.filter(t=>t[e.field]===e.value):[],o={stroke:e.color||"#f97316",strokeWidth:2,fill:"none"};return tl("g",{children:r.map((t,n)=>{let r=bt(t,i),l=xt(t,i);if(null==r||null==l)return null;let a="function"==typeof e.r?e.r(t):e.r||6,s="function"==typeof e.style?e.style(t):e.style||o;return tl("circle",{cx:r,cy:l,r:a,...s},"hl-"+n)})},"ann-"+n)}case"bracket":{let t=bt(e,i),r=xt(e,i);return tl(gt,{noteData:{x:t??0,y:r??0,dx:e.dx||0,dy:e.dy||0,note:ct(e),type:"bracket",subject:{type:e.bracketType||"curly",width:e.width,height:e.height,depth:e.depth||30},color:e.color}},"ann-"+n)}case"trend":{let t=i.data||[];if(2>t.length)return null;let r,o=i.xAccessor||"x",l=i.yAccessor||"y",a="ordinal"===i.frameType,s="horizontal"===i.projection,c=a?o:null,u=a?l:null,d=[],h=new Map;if(a&&c&&u){for(let e of t){let t=e[c];if(null==t)continue;let n=t+"";h.has(n)||(h.set(n,d.length),d.push(n))}r=t.map(e=>{let t=e[c],n=e[u];if(null==t||null==n)return null;let i=h.get(t+"");return null!=i?[i,+n]:null}).filter(e=>null!==e)}else r=t.map(e=>[e[o],e[l]]).filter(e=>null!=e[0]&&null!=e[1]);if(2>r.length)return null;let f=i.scales?.x??i.scales?.time,m=i.scales?.y??i.scales?.value;if(!f||!m)return null;let p,y=e=>t=>{let n=Math.max(0,Math.floor(t)),i=Math.min(d.length-1,n+1),r=t-n,o=e(d[n]);return o+(e(d[i])-o)*r},g=f,b=m;if(a)if(s){let e=y(b);p=(t,n)=>[g(n),e(t)]}else{let e=y(g);p=(t,n)=>[e(t),b(n)]}else p=(e,t)=>[g(e),b(t)];let x,v=e.method||"linear";x="loess"===v?function(e,t=.3){let n=e.length;if(2>n)return e.slice();let i=e.slice().sort((e,t)=>e[0]-t[0]),r=i.map(e=>e[0]),o=i.map(e=>e[1]),l=Math.min(n,Math.max(2,Math.ceil(t*n))),a=Number.isFinite(l)&&r.every(Number.isFinite),s=0,c=l-1,u=[];for(let e=0;n>e;e++){let t,i=r[e],d=0,h=n-1;if(a){for(;n-1>c&&Math.abs(r[s]-i)>=Math.abs(r[c+1]-i);)s++,c++;let e=Math.max(Math.abs(r[s]-i),Math.abs(r[c]-i));t=e||1,e>0&&(d=s,h=c)}else t=r.map(e=>Math.abs(e-i)).sort((e,t)=>e-t)[l-1]||1;let f=0,m=0,p=0,y=0,g=0;for(let e=d;h>=e;e++){let n=Math.abs(r[e]-i)/t,l=1>n?Math.pow(1-Math.pow(n,3),3):0;0!==l&&(f+=l,m+=l*r[e],p+=l*o[e],y+=l*r[e]*r[e],g+=l*r[e]*o[e])}if(0===f){u.push([i,o[e]]);continue}let b=f*y-m*m;if(1e-12>Math.abs(b))u.push([i,p/f]);else{let e=(f*g-m*p)/b;u.push([i,(p-e*m)/f+e*i])}}return u}(r,e.bandwidth??.3):("polynomial"===v?Ri(r,e.order||2):Oi(r)).points;let w=x.map(([e,t])=>{let[n,i]=p(e,t);return`${n},${i}`}).join(" "),k=e.color||"#6366f1",M=x[x.length-1],[A,S]=p(M[0],M[1]);return nl("g",{children:[tl("polyline",{points:w,fill:"none",stroke:k,strokeWidth:e.strokeWidth??2,strokeDasharray:e.strokeDasharray||"6,3"}),e.label&&tl("text",{x:A+4,y:S-4,fill:k,fontSize:11,children:e.label})]},"ann-"+n)}case"band":{let t=i.scales?.y??i.scales?.value,l=t?.domain?.(),a=e.y0??l?.[0],c=e.y1??l?.[1],u=null!=a&&t?t(a):0,d=null!=c&&t?t(c):i.height||0,h=At(e,"ann-"+n,"vertical","var(--semiotic-primary, #6366f1)");return nl("g",{opacity:e.opacity,children:[h.def&&tl("defs",{children:h.def}),tl("rect",{x:0,y:Math.min(u,d),width:i.width||0,height:Math.abs(d-u),fill:h.fill,fillOpacity:e.fillOpacity??.1}),e.label&&tl(s,{x:(i.width||0)-4,y:(r=u,o=d,Math.max(Math.min(r,o),0)+16),textAnchor:"end",fill:e.color||"var(--semiotic-primary, #6366f1)",fontSize:11,fontWeight:"bold",text:e.label,background:e.labelBackground??"halo"})]},"ann-"+n)}case"x-band":{let t=i.scales?.x??i.scales?.time,r=t?.domain?.(),o=e.x0??r?.[0],l=e.x1??r?.[1],a=null!=o&&t?t(o):null,c=null!=l&&t?t(l):null;if(null==a||null==c)return null;let u=At(e,"ann-"+n,"horizontal","var(--semiotic-primary, #6366f1)");return nl("g",{opacity:e.opacity,children:[u.def&&tl("defs",{children:u.def}),tl("rect",{x:Math.min(a,c),y:0,width:Math.abs(c-a),height:i.height||0,fill:u.fill,fillOpacity:e.fillOpacity??.1}),e.label&&tl(s,{x:Math.min(a,c)+4,y:16,textAnchor:"start",fill:e.color||"var(--semiotic-primary, #6366f1)",fontSize:11,fontWeight:"bold",text:e.label,background:e.labelBackground??"halo"})]},"ann-"+n)}case"envelope":{let t=i.data||[];if(2>t.length)return null;let r=i.xAccessor||"x",o=i.scales?.x??i.scales?.time,l=i.scales?.y??i.scales?.value;if(!o||!l)return null;let a=e.upperAccessor||"upperBounds",s=e.lowerAccessor||"lowerBounds",c=e.filter,u=t.filter(e=>!(null==e[a]||null==e[s]||c&&!c(e))).sort((e,t)=>e[r]-t[r]);if(2>u.length)return null;let d=il[i.curve||"linear"]||Go,h=Po().x(e=>o(e[r])).y0(e=>l(e[s])).y1(e=>l(e[a])).curve(d)(u);if(!h)return null;let f=e.fill||"#6366f1";return nl("g",{children:[tl("path",{d:h,fill:f,fillOpacity:e.fillOpacity??.15,stroke:"none"}),e.label&&u.length>0&&tl("text",{x:o(u[u.length-1][r])+4,y:l(u[u.length-1][a])-4,fill:f,fontSize:11,children:e.label})]},"ann-"+n)}case"anomaly-band":{let t=i.data||[];if(2>t.length)return null;let r=i.yAccessor||"y",o=i.scales?.x??i.scales?.time,l=i.scales?.y??i.scales?.value;if(!o||!l)return null;let a=t.map(e=>e[r]).filter(e=>null!=e&&isFinite(e));if(2>a.length)return null;let s=a.reduce((e,t)=>e+t,0)/a.length,c=a.reduce((e,t)=>e+(t-s)**2,0)/a.length,u=Math.sqrt(c),d=e.threshold??2,h=s-d*u,f=!1!==e.showBand,m=e.fill||"#6366f1",p=e.fillOpacity??.1,y=e.anomalyColor||"#ef4444",g=e.anomalyRadius??6,b=l(s+d*u),x=l(h),v=t.filter(e=>{let t=e[r];return null!=t&&Math.abs(t-s)>d*u});return nl("g",{children:[f&&tl("rect",{x:0,y:Math.min(b,x),width:i.width||0,height:Math.abs(x-b),fill:m,fillOpacity:p}),v.map((e,t)=>{let n=bt(e,i),r=xt(e,i);return null==n||null==r?null:tl("circle",{cx:n,cy:r,r:g,fill:y,fillOpacity:.7,stroke:y,strokeWidth:1.5},"anomaly-"+t)}),e.label&&tl("text",{x:(i.width||0)-4,y:Math.min(b,x)-4,textAnchor:"end",fill:m,fontSize:11,children:e.label})]},"ann-"+n)}case"forecast":{let t=i.data||[];if(3>t.length)return null;let r=i.xAccessor||"x",o=i.yAccessor||"y",l=i.scales?.x??i.scales?.time,a=i.scales?.y??i.scales?.value;if(!l||!a)return null;let s,c=t.map(e=>[e[r],e[o]]).filter(e=>null!=e[0]&&null!=e[1]&&isFinite(e[0])&&isFinite(e[1])).sort((e,t)=>e[0]-t[0]);if(3>c.length)return null;if("polynomial"===(e.method||"linear")){let t=Ri(c,e.order||2).equation;s=e=>t.reduce((t,n,i)=>t+n*Math.pow(e,i),0)}else{let e=Ti(c);if(!e)return null;s=e}let u=c.length,{se:d,meanX:h,ssX:f}=Fi(c,s),m=zi(e.confidence??.95),p=e.steps??5,y=c[u-1][0],g=(y-c[0][0])/Math.max(u-1,1),b=[];for(let e=1;p>=e;e++)b.push(y+e*g);let x=[];for(let e of b){let t=s(e),n=d*Math.sqrt(1+1/u+(f>0?(e-h)**2/f:0))*m;x.push({x:e,yCenter:t,yUpper:t+n,yLower:t-n})}let v=`M${x.map(e=>`${l(e.x)},${a(e.yUpper)}`).join(" L")} L${x.slice().reverse().map(e=>`${l(e.x)},${a(e.yLower)}`).join(" L")} Z`,w=x.map(e=>`${l(e.x)},${a(e.yCenter)}`).join(" "),k=`${l(y)},${a(s(y))}`,M=e.strokeColor||"#6366f1";return nl("g",{children:[tl("path",{d:v,fill:e.fill||"#6366f1",fillOpacity:e.fillOpacity??.15,stroke:"none"}),tl("polyline",{points:`${k} ${w}`,fill:"none",stroke:M,strokeWidth:e.strokeWidth??2,strokeDasharray:e.strokeDasharray??"6,3"}),e.label&&x.length>0&&tl("text",{x:l(x[x.length-1].x)+4,y:a(x[x.length-1].yCenter)-4,fill:M,fontSize:11,children:e.label})]},"ann-"+n)}case"widget":{let r,o;if(null!=e.px&&null!=e.py)r=e.px,o=e.py;else{let t=kt(e,n,i);if(!t)return null;r=t.x,o=t.y}if(!Mt(r,o,i))return null;let l=e.dx??0,a=e.dy??0,s=e.width??32,c=e.height??32,u=e.content??tl("span",{style:{fontSize:18,cursor:"default"},title:e.label||"Info",children:"ℹ️"});return tl("foreignObject",{x:r+l-s/2,y:o+a-c/2,width:s,height:c,style:{overflow:"visible",pointerEvents:"auto"},children:tl("div",{...d(e,t),style:{width:s,height:c,display:"flex",alignItems:"center",justifyContent:"center"},children:u})},"ann-"+n)}case"text":{let t=kt(e,n,i);if(!t)return null;let{x:r,y:o}=t,l=r+(e.dx||0),a=o+(e.dy||0),s=e.color||"var(--semiotic-text, #333)",c=tl("text",{x:l,y:a,fill:s,fontSize:e.fontSize||11,opacity:e.opacity,strokeDasharray:e.strokeDasharray,dominantBaseline:"middle",style:{fontFamily:"inherit"},children:e.label});return!0!==e._redundantConnector?Do.cloneElement(c,{key:"ann-text-"+n}):nl("g",{opacity:e.opacity,strokeDasharray:e.strokeDasharray,children:[tl("line",{x1:r,y1:o,x2:l,y2:a,stroke:s,strokeWidth:1,strokeOpacity:.5,style:{pointerEvents:"none"}}),Do.cloneElement(c,{opacity:void 0,strokeDasharray:void 0})]},"ann-text-"+n)}case"frame-text":return tl($t,{annotation:e,width:i.width||0,height:i.height||0},"ann-frame-text-"+n);case"category-highlight":{let t=e.category;if(null==t)return null;let r=e=>"function"==typeof e&&"function"==typeof e.bandwidth,o=i.scales?.o,l=i.scales?.x,a=i.scales?.y,c=r(o)?o:r(l)?l:r(a)?a:null;if(!c)return null;let u=c(t+"");if(null==u)return null;let d=c.bandwidth(),h=e.color||"var(--semiotic-primary, #4589ff)",f=e.opacity??.15,m=e.label;return nl("g",(i.projection?"vertical"===i.projection:c===l)?{children:[tl("rect",{x:u,y:0,width:d,height:i.height||0,fill:h,fillOpacity:f}),m&&tl(s,{x:u+d/2,y:16,textAnchor:"middle",fill:h,fontSize:12,fontWeight:"bold",text:m,background:e.labelBackground??"none"})]}:{children:[tl("rect",{x:0,y:u,width:i.width||0,height:d,fill:h,fillOpacity:f}),m&&tl(s,{x:12,y:u+d/2,dominantBaseline:"middle",fill:h,fontSize:12,fontWeight:"bold",text:m,background:e.labelBackground??"none"})]},"ann-"+n)}default:return null}var r,o}}function Lt(e){return"string"==typeof e?.type?e.type:""}function Nt(e){return!!e&&"object"==typeof e&&rl.has(Lt(e))}function It(e){return ol.has(Lt(e))&&!function(e){return Array.isArray(e?.disable)&&e.disable.includes("connector")}(e)}function zt(e){return"primary"===e?.emphasis||!0===e?.defensive}function Tt(e,t,n={}){return"number"==typeof n.maxAnnotations&&Number.isFinite(n.maxAnnotations)?Math.max(0,Math.floor(n.maxAnnotations)):e>0&&t>0?Math.max(1,Math.round(e*t/(n.areaPerAnnotation&&n.areaPerAnnotation>0?n.areaPerAnnotation:2e4))):1/0}function Ft(e){let t,n=e?.emphasis;t="primary"===n?100:"secondary"===n?10:50;let i=e?.provenance?.confidence;switch("number"==typeof i&&Number.isFinite(i)&&(t+=15*Math.max(0,Math.min(1,i))),e?.lifecycle?.freshness){case"fresh":t+=8;break;case"aging":t+=4;break;case"stale":t+=1;break;case"expired":t-=200}return t}function Ot(e){let t=e?.provenance;if(!t||"object"!=typeof t)return e;let n="string"==typeof t.source?Object.prototype.hasOwnProperty.call(dl,t.source)?dl[t.source]:t.source:null,i="number"==typeof t.confidence&&Number.isFinite(t.confidence)?Math.round(100*Math.max(0,Math.min(1,t.confidence)))+"%":null;if(!n&&!i||null!=e.label&&"string"!=typeof e.label)return e;let r=[n,i].filter(Boolean).join(" · "),o="string"==typeof e.label?e.label:"";return o.includes(`(${r})`)?e:{...e,label:o?`${o} (${r})`:`(${r})`}}function Rt(e){if(!Wt(e))return e;let t=("string"==typeof e.mobileText?e.mobileText:void 0)??("string"==typeof e.shortText?e.shortText:void 0);return!t||"string"!=typeof e.label&&null!=e.label?e:{...e,label:t}}function Wt(e){return Nt(e)}function Dt(e,t,n,i,r){let o=e+n,l=t+i;return Math.abs(n)>Math.abs(i)?{x:0>n?o-r.width-4:o+4,y:0>i?l-r.height:l,width:r.width,height:r.height}:{x:0>n?o-r.width:o,y:0>i?l-r.height-4:l+4,width:r.width,height:r.height}}function Et(e,t){return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}function Ht(e,t){return Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y))}function Bt(e,t,n,i,r,o,l,a){let s=Et(e,l),c=.4*Math.hypot(t.dx,t.dy)+80*function(e,t,n,i){let r=Math.max(0,i-e.x),o=Math.max(0,i-e.y);return(r+Math.max(0,e.x+e.width-(t-i)))*e.height+(o+Math.max(0,e.y+e.height-(n-i)))*e.width}(s,r,o,a);for(let e of n)c+=12*Ht(s,e);for(let e of i)c+=4*Ht(s,e);return c}function Pt(e){let{annotations:t,context:n,defaultOffset:i=ll,notePadding:r=al,markPadding:o=sl,edgePadding:l=cl,preserveManualOffsets:a=!0,routeLongConnectors:s=!0,connectorThreshold:c=ul,density:u,progressiveDisclosure:d=!1,redundantCues:h=!1,responsive:f,mobile:m,cohesion:p,audience:y}=e,g=n.width||0,b=n.height||0,x="object"==typeof m?m:{},v=x.breakpoint??480,w=!!m&&v>=g,k=w&&!1!==x.preferShortText?t.map(Rt):t,M=w&&!u?{maxAnnotations:x.maxAnnotations??("callout-list"===x.strategy?1:2),minVisible:x.minVisible??1}:u,A=d||w&&(!1!==x.progressiveDisclosure||"callout-list"===x.strategy),S=w&&!f?x.responsive??{minWidth:v}:f,C=w&&!p?x.cohesion:p;if(0===k.length||0>=g||0>=b)return k.slice();let $=[],j=function(e,t){return(e.pointNodes||[]).map(e=>{let n=Math.max(1,e.r||1)+t;return{x:e.x-n,y:e.y-n,width:2*n,height:2*n}})}(n,o),L=!1,N=k.map((e,t)=>{if(!Wt(e))return e;let o=function(e,t,n){if("widget"===e.type&&"number"==typeof e.px&&"number"==typeof e.py)return{x:e.px,y:e.py};let i=e.pointId??e.nodeId;if(null!=i&&n.pointNodes){let e=n.pointNodes.find(e=>e.pointId===i);if(e)return{x:e.x,y:e.y}}let r=e.coordinates,o=n.scales?.geoProjection;if(Array.isArray(r)&&r.length>=2&&o){let e=r[0],t=r[1];if("number"==typeof e&&"number"==typeof t){let n=o([e,t]);if(n&&"number"==typeof n[0]&&"number"==typeof n[1])return{x:n[0],y:n[1]}}}return n.scales||"number"!=typeof e.x||"number"!=typeof e.y?kt(e,t,n):{x:e.x,y:e.y}}(e,t,n);if(!o)return e;let u=function(e){if("widget"===e.type)return{width:"number"==typeof e.width?e.width:32,height:"number"==typeof e.height?e.height:32};let t=ut(e);if(t)return{width:Math.max(24,t.width+10),height:Math.max(18,t.height+6)};let n="number"==typeof e.wrap?e.wrap:120,i=[...dt("string"==typeof e.title?e.title:void 0,n,7),...dt("string"==typeof e.label?e.label:void 0,n,7)],r=i.reduce((e,t)=>Math.max(e,t.length),0);return{width:Math.max(24,Math.min(n,7*r)+10),height:Math.max(18,16*i.length+6)}}(!0===e.defensive?Ot(e):e);if(a&&("number"==typeof(d=e).dx||"number"==typeof d.dy)){let t=function(e){return"text"===e.type||"widget"===e.type?{dx:0,dy:0}:{dx:30,dy:-30}}(e);return $.push(Et(Dt(o.x,o.y,"number"==typeof e.dx?e.dx:t.dx,"number"==typeof e.dy?e.dy:t.dy,u),r)),e}var d;let h=null,f=1/0;for(let e of function(e){let t=1.6*e;return[{dx:e,dy:-e},{dx:-e,dy:-e},{dx:e,dy:e},{dx:-e,dy:e},{dx:e,dy:0},{dx:-e,dy:0},{dx:0,dy:-e},{dx:0,dy:e},{dx:t,dy:-t},{dx:-t,dy:-t},{dx:t,dy:t},{dx:-t,dy:t}]}(i)){let t=Bt(Dt(o.x,o.y,e.dx,e.dy,u),e,$,j,g,b,r,l);f>t&&(h=e,f=t)}if(!h)return e;let m=Et(Dt(o.x,o.y,h.dx,h.dy,u),r);$.push(m);let p=Math.hypot(h.dx,h.dy),y=s&&p>=c&&"text"!==e.type&&"widget"!==e.type?{...e.connector||{end:"arrow"},type:"curve"}:e.connector;return L=!0,{...e,dx:h.dx,dy:h.dy,...y?{connector:y}:{}}}),I=L?N:k.slice(),z=I;if(h){let e=!1,t=I.map(t=>{let n=function(e){return"text"!==e.type||"string"!=typeof e.color||8>Math.hypot("number"==typeof e.dx?e.dx:0,"number"==typeof e.dy?e.dy:0)?e:{...e,_redundantConnector:!0}}(t);return n!==t&&(e=!0),n});z=e?t:I}{let e=!1,t=z.map(t=>{if(!0!==t?.defensive)return t;let n=Ot(t);return n!==t&&(e=!0),n});z=e?t:z}let T,F=new Set;if(M){let e="object"==typeof M?M:{},t=function(e){if(!e)return 1;let t=function(e){let t=e?.familiarity;if(!t)return 3;let n=Object.values(t).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0===n.length?3:n.reduce((e,t)=>e+t,0)/n.length}(e);return t>2?4>t?1:.6:1.5}(y),n=1===t?e:{...e,maxAnnotations:Math.max(0,Math.round((e.maxAnnotations??Tt(g,b,e))*t))},{deferred:i}=function(e){let{annotations:t,width:n,height:i}=e,r=Math.max(0,e.minVisible??1),o=Tt(n,i,e),l=t.map((e,t)=>{return{annotation:e,index:t,note:(n=e,Nt(n))};var n}),a=l.filter(e=>e.note);if(0===a.length||o>=a.length)return{visible:t.slice(),deferred:[],budget:o};let s=a.filter(e=>zt(e.annotation)),c=a.filter(e=>!zt(e.annotation)).sort((e,t)=>Ft(t.annotation)-Ft(e.annotation)||e.index-t.index),u=Math.min(c.length,Math.max(Math.max(0,o-s.length),Math.max(0,r-s.length))),d=new Set([...s.map(e=>e.index),...c.slice(0,u).map(e=>e.index)]),h=[],f=[];for(let{annotation:e,index:t,note:n}of l)!n||d.has(t)?h.push(e):f.push(e);return{visible:h,deferred:f,budget:o}}({annotations:z,width:g,height:b,...n});for(let e of i)F.add(e)}if(S&&("object"==typeof S&&"number"==typeof S.minWidth?S.minWidth:480)>=g)for(let e of z)Wt(e)&&"secondary"===e.emphasis&&F.add(e);if(F.size>0)for(let e of z)!0===e?.defensive&&F.delete(e);return T=0===F.size?z:A?z.map(e=>F.has(e)?{...e,_annotationDeferred:!0}:e):z.filter(e=>!F.has(e)),C?function(e,t){let n=!1,i=e.map(e=>Wt(e)&&"blended"!==e.cohesion&&"layer"!==e.cohesion?(n=!0,{...e,cohesion:t}):e);return n?i:e}(T,C):T}function Gt({title:e,totalWidth:t,marginTop:n}){return e?"string"!=typeof e?hl("foreignObject",{x:0,y:0,width:t,height:n,children:e}):hl("text",{x:t/2,y:22,textAnchor:"middle",fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontSize:14,className:"semiotic-chart-title",style:{userSelect:"none",fontSize:"var(--semiotic-title-font-size, 14px)",fontFamily:"var(--semiotic-title-font-family, var(--semiotic-font-family, sans-serif))",fontWeight:"var(--semiotic-title-font-weight, bold)"},children:e}):null}function Vt(e){if(!1!==e?.interactive)return e?.style?.cursor}function _t(e){if(!e)return!1;for(let t of e)if(Vt(t))return!0;return!1}function Ut(e,t){if(!e)return;let n=t??"";e.style.cursor!==n&&(e.style.cursor=n)}function Yt(e,t){return Ut(e),_t(t)}function qt(e,t,n){if(e){if(!t.inside||"touch"===t.pointerType)return void Ut(e);Ut(e,n(t))}}function Xt(e){let t=fl.useRef(null);fl.useEffect(()=>{e.current&&(t.current=e.current)}),fl.useEffect(()=>()=>Ut(t.current),[])}function Kt(e,t,n){let i=Vt(t);return i&&null!=e&&!1!==e?ml("g",{style:{cursor:i},"data-semiotic-mark-cursor":i,children:e},n):e}function Jt(){let[e,t]=bl(!1);return vl(()=>{t(!0)},[]),e}function Zt(){let e=xl(wl,kl,Ml);return gl(e).current}function Qt({children:e}){let[t,n]=Al.useState(!1),i=Al.useCallback(()=>n(e=>!e),[]),r=Al.useMemo(()=>({visible:t,setVisible:n,toggle:i}),[t,i]);return Sl(Cl.Provider,{value:r,children:e})}function en(){return Al.useContext(Cl)}function tn(){let e=Al.useContext(Cl);return e?e.toggle:null}function nn({hoverPoint:e}){let t="";if(e){let n=e.data||e;t="object"==typeof n?"Data point: "+Object.entries(n).filter(([,e])=>"object"!=typeof e&&"function"!=typeof e).map(([e,t])=>`${e}: ${t}`).join(", "):"Data point: "+n}return $l("div",{"aria-live":"polite","aria-atomic":"true",style:jl,children:t})}function rn(e){let t={};if(null==e||"object"!=typeof e)return t;for(let[n,i]of Object.entries(e))n.startsWith("_")||null==i||""===i||("number"==typeof i?Number.isFinite(i)&&(t[n]=i):"string"==typeof i?t[n]=i:"boolean"==typeof i?t[n]=i+"":i instanceof Date&&(t[n]=i.toISOString().slice(0,10)));return t}function on(e){return e&&"object"==typeof e?e:{}}function ln(e){return on(e.accessibility).tableFields??e.accessibleDatum??e.datum}function an(e,t){let n=on(e.accessibility);return{label:"string"==typeof n.label&&n.label.length>0?n.label:"string"==typeof e.label&&e.label.length>0?e.label:t,values:rn(ln(e))}}function sn(e){let t=[];if(!Array.isArray(e))return t;let n=e.some(e=>e&&("line"===e.type||"area"===e.type));for(let i of e)if(i&&"object"==typeof i&&null!==i.datum)try{switch(i.type){case"point":if(n)break;t.push({label:"Point",values:rn(ln(i))});break;case"line":case"area":{let e=ln(i),n=Array.isArray(e)?e:[],r="line"===i.type?"Line point":"Area point";for(let e of n)t.push({label:r,values:rn(e)});break}case"rect":{let e=ln(i),n=null!=e&&"object"==typeof e?e:{},r=n.category??i.group??"",o=n.value??n.__aggregateValue??n.total,l=rn(n);null==l.category&&""!==r&&(l.category=r+""),null==l.value&&null!=o&&(l.value="number"==typeof o||"string"==typeof o?o:o+""),t.push({label:"Bar",values:l});break}case"heatcell":{let e=rn(ln(i));null==e.value&&"number"==typeof i.value&&Number.isFinite(i.value)&&(e.value=i.value),t.push({label:"Cell",values:e});break}case"wedge":{let e=ln(i),n=rn(e);if(null==n.category){let t=on(e),i=t.category??t.label;null!=i&&(n.category=i+"")}t.push({label:"Wedge",values:n});break}case"circle":t.push({label:"Node",values:rn(ln(i))});break;case"arc":t.push({label:"Arc",values:rn(ln(i))});break;case"candlestick":t.push({label:"Candlestick",values:rn(ln(i))});break;case"geoarea":{let e=on(ln(i)),n=rn(e);if(null==n.name){let t=on(e.properties).name??e.name;null!=t&&(n.name=t+"")}t.push({label:"Region",values:n});break}}}catch{}return t}function cn(e){return null==e||""===e?"—":"number"==typeof e?Number.isNaN(e)?"—":Nl(e):"boolean"==typeof e?e?"true":"false":"object"==typeof e?"—":e+""}function un(e){return null==e||"object"!=typeof e||Array.isArray(e)?{}:e}function dn(e){return null!=e&&"object"==typeof e?un(e).id:e}function hn(e){let t=un(e.datum);return{source:dn(t.source??e.source),target:dn(t.target??e.target)}}function fn({accessibleTable:e,children:t}){return"object"!=typeof e?t:typeof document>"u"?null:Il(Ll.Suspense,{fallback:null,children:Il(Tl,{target:e.portalTarget,children:t})})}function mn(e,t){if(!e||0===e.length)return t+", empty";let n={};for(let t of e){if(null===t?.datum)continue;let e=t.type+"";n[e]=(n[e]||0)+1}if(0===Object.keys(n).length)return t+", empty";let i=[],r={point:"points",line:"lines",area:"areas",rect:"bars",heatcell:"cells",circle:"nodes",candlestick:"candlesticks",wedge:"wedges",arc:"arcs",geoarea:"regions"},o=["point","line","area","rect","heatcell","circle","candlestick","wedge","arc","geoarea"],l=Object.keys(n).sort((e,t)=>{let n=o.indexOf(e),i=o.indexOf(t);return(-1===n?999:n)-(-1===i?999:i)});for(let e of l)i.push(`${n[e]} ${r[e]||e}`);return`${t}, ${i.join(", ")}`}function pn(e,t,n){let i=[];return e>0&&i.push(e+" nodes"),t>0&&i.push(t+" edges"),0===i.length?n+", empty":`${n}, ${i.join(", ")}`}function yn({scene:e,chartType:t,tableId:n,chartTitle:i}){let[r,o]=Ll.useState(!1),[l,a]=Ll.useState(5),s=en(),c=s?.visible??!1,u=r||c,d=Ll.useRef(null),h=i?"Data summary for "+i:n?`Data summary for ${t} ${n}`:"Data summary for "+t;Ll.useEffect(()=>{u||a(5)},[u]);let f=Ll.useCallback(e=>{e.target===e.currentTarget&&!r&&!c&&o(!0)},[r,c]),m=Ll.useCallback(e=>{c||d.current?.contains(e.relatedTarget)||o(!1)},[c]);if(!e||0===e.length)return n?Il("span",{id:n,tabIndex:-1,style:jl}):null;if(!u)return Il("div",{id:n,className:Rl,tabIndex:-1,onFocus:f,style:jl,role:"region","aria-label":h,children:zl("button",{type:"button",onClick:()=>o(!0),style:El,children:["View data summary (",e.length," elements)"]})});let p=sn(e),y=function(e){let t=new Map;for(let n of e??[])for(let[e,i]of Object.entries(n?.values??{})){if(null==i||""===i)continue;let n=t.get(e);if(n||(n={count:0,min:1/0,max:-1/0,sum:0,strings:new Set},t.set(e,n)),"number"==typeof i){if(!Number.isFinite(i))continue;n.count++,n.sum+=i,n.min>i&&(n.min=i),i>n.max&&(n.max=i)}else"object"!=typeof i&&"function"!=typeof i&&n.strings.add(i+"")}return Array.from(t,([e,t])=>{if(t.count)return{name:e,count:t.count,numeric:!0,min:t.min,max:t.max,mean:t.sum/t.count};let n=Array.from(t.strings);return{name:e,count:n.length,numeric:!1,uniqueValues:n.slice(0,5)}}).filter(e=>e.count>0)}(p),g=function(e,t){let n=[e+" data points."];for(let e of t)if(e.numeric)n.push(`${e.name}: ${Nl(e.min)} to ${Nl(e.max)}, mean ${Nl(e.mean)}.`);else{let t=e.uniqueValues,i=t.length>3?`${t.slice(0,3).join(", ")}… (${e.count} unique)`:t.join(", ");n.push(`${e.name}: ${i}.`)}return n.join(" ")}(p.length,y),b=Math.min(l,p.length),x=p.slice(0,b),v=p.length-b,w=new Set;for(let e of x)for(let t of Object.keys(e.values))w.add(t);let k=Array.from(w);return zl("div",{ref:d,id:n,className:Wl,tabIndex:-1,onBlur:m,style:Hl,role:"region","aria-label":h,children:[Il("button",{type:"button",className:"semiotic-accessible-data-table-close",onClick:()=>{c&&s&&s.setVisible(!1),o(!1)},"aria-label":"Close data summary",style:Pl,children:"×"}),Il("div",{className:"semiotic-accessible-data-table-summary",role:"note",style:Bl,children:g}),zl("table",{className:"semiotic-accessible-data-table-table",role:"table","aria-label":"Sample data for "+t,style:Gl,children:[Il("caption",{className:"semiotic-accessible-data-table-caption",style:Ul,children:v>0?`First ${b} of ${p.length} data points`:`All ${p.length} data points`}),Il("thead",{children:zl("tr",{children:[Il("th",{style:Vl,children:"type"}),k.map(e=>Il("th",{style:Vl,children:e},e))]})}),Il("tbody",{children:x.map((e,t)=>zl("tr",{children:[Il("td",{style:_l,children:e.label}),k.map(t=>Il("td",{style:_l,children:cn(e.values[t])},t))]},t))})]}),v>0&&zl("button",{type:"button",className:"semiotic-accessible-data-table-show-more",onClick:()=>a(e=>e+Fl),style:Yl,children:["Show ",Math.min(Fl,v)," more"," ",1===v?"row":"rows"," (",v," remaining)"]})]})}function gn({nodes:e,edges:t,chartType:n,tableId:i,chartTitle:r}){let[o,l]=Ll.useState(!1),[a,s]=Ll.useState(5),[c,u]=Ll.useState(5),d=en(),h=d?.visible??!1,f=o||h,m=r?"Data summary for "+r:i?`Data summary for ${n} ${i}`:"Data summary for "+n,p=Ll.useRef(null);Ll.useEffect(()=>{f||(s(5),u(5))},[f]);let y=Ll.useCallback(e=>{e.target===e.currentTarget&&!o&&!h&&l(!0)},[o,h]),g=Ll.useCallback(e=>{h||p.current?.contains(e.relatedTarget)||l(!1)},[h]),b=e.filter(e=>null!==e.datum);if(0===b.length&&0===t.length)return i?Il("span",{id:i,tabIndex:-1,style:jl}):null;if(!f)return Il("div",{id:i,className:Rl,tabIndex:-1,onFocus:y,style:jl,role:"region","aria-label":m,children:zl("button",{type:"button",onClick:()=>l(!0),style:El,children:["View data summary (",b.length," nodes, ",t.length," edges)"]})});let{nodeRows:x,edgeRows:v,hasWeights:w,summary:k}=function(e,t){let n=new Map,i=[],r=!1;for(let e=0;t.length>e;e++){let o=t[e];if(!o||"object"!=typeof o)continue;let l=un(o.datum),{source:a,target:s}=hn(o),c="number"==typeof l.value&&Number.isFinite(l.value),u=c?l.value:0;r||(r=c);for(let[e,t,i]of[[a,1,3],[s,0,2]]){if(null==e||""===e)continue;let r=e+"",o=n.get(r)??[0,0,0,0];o[t]++,o[i]+=u,n.set(r,o)}i.push(an(o,null!=a||null!=s?`${null==a?"?":a+""} → ${null==s?"?":s+""}`:"Edge "+(e+1)))}let o=[],l=0,a=0;for(let t=0;e.length>t;t++){let i=e[t];if(!i||"object"!=typeof i||null===i.datum)continue;let r=un(i.datum).id??i.id,s=null!=r?r+"":"node-"+t,[c,u,d,h]=n.get(s)??[0,0,0,0],f=c+u;l+=f,f>a&&(a=f),o.push({id:s,degree:f,inDeg:c,outDeg:u,wDegree:d+h,wInDeg:d,wOutDeg:h,semantic:an(i,s)})}o.sort((e,t)=>t.degree-e.degree);let s=[`${o.length} nodes, ${t.length} edges.`];return o.length>0&&s.push(`Mean degree: ${Nl(l/o.length)}, max degree: ${a}.`),{nodeRows:o,edgeRows:i,hasWeights:r,summary:s.join(" ")}}(b,t),M=Math.min(a,x.length),A=x.slice(0,M),S=x.length-M,C=Math.min(c,v.length),$=v.slice(0,C),j=v.length-C,L=new Set;for(let e of A)for(let t of Object.keys(e.semantic.values))L.add(t);let N=Array.from(L),I=new Set;for(let e of $)for(let t of Object.keys(e.values))I.add(t);let z=Array.from(I);return zl("div",{ref:p,id:i,className:Dl,tabIndex:-1,onBlur:g,style:Hl,role:"region","aria-label":m,children:[Il("button",{type:"button",className:"semiotic-accessible-data-table-close",onClick:()=>{h&&d&&d.setVisible(!1),l(!1)},"aria-label":"Close data summary",style:Pl,children:"×"}),Il("div",{className:"semiotic-accessible-data-table-summary",role:"note",style:Bl,children:k}),x.length>0&&zl("table",{className:"semiotic-accessible-data-table-table",role:"table","aria-label":"Node data and degree summary for "+n,style:Gl,children:[Il("caption",{className:"semiotic-accessible-data-table-caption",style:Ul,children:S>0?`Top ${M} of ${x.length} nodes by degree`:`All ${x.length} nodes by degree`}),Il("thead",{children:zl("tr",{children:[Il("th",{style:Vl,children:"node"}),N.map(e=>Il("th",{style:Vl,children:e},e)),Il("th",{style:Vl,children:"degree"}),Il("th",{style:Vl,children:"in"}),Il("th",{style:Vl,children:"out"}),w&&Il("th",{style:Vl,children:"w. degree"}),w&&Il("th",{style:Vl,children:"w. in"}),w&&Il("th",{style:Vl,children:"w. out"})]})}),Il("tbody",{children:A.map((e,t)=>zl("tr",{"aria-label":e.semantic.label,children:[Il("td",{style:_l,children:e.semantic.label}),N.map(t=>Il("td",{style:_l,children:cn(e.semantic.values[t])},t)),Il("td",{style:_l,children:e.degree}),Il("td",{style:_l,children:e.inDeg}),Il("td",{style:_l,children:e.outDeg}),w&&Il("td",{style:_l,children:Nl(e.wDegree)}),w&&Il("td",{style:_l,children:Nl(e.wInDeg)}),w&&Il("td",{style:_l,children:Nl(e.wOutDeg)})]},t))})]}),S>0&&zl("button",{type:"button",className:"semiotic-accessible-data-table-show-more",onClick:()=>s(e=>e+Fl),style:Yl,children:["Show ",Math.min(Fl,S)," more"," ",1===S?"node":"nodes"," (",S," remaining)"]}),v.length>0&&zl("table",{className:"semiotic-accessible-data-table-table semiotic-accessible-data-table-edges",role:"table","aria-label":"Edge data for "+n,style:{...Gl,marginTop:12},children:[Il("caption",{className:"semiotic-accessible-data-table-caption",style:Ul,children:j>0?`First ${C} of ${v.length} edges`:`All ${v.length} edges`}),Il("thead",{children:zl("tr",{children:[Il("th",{style:Vl,children:"edge"}),z.map(e=>Il("th",{style:Vl,children:e},e))]})}),Il("tbody",{children:$.map((e,t)=>zl("tr",{"aria-label":e.label,children:[Il("td",{style:_l,children:e.label}),z.map(t=>Il("td",{style:_l,children:cn(e.values[t])},t))]},t))})]}),j>0&&zl("button",{type:"button",className:"semiotic-accessible-data-table-show-more",onClick:()=>u(e=>e+Fl),style:Yl,children:["Show ",Math.min(Fl,j)," more"," ",1===j?"edge":"edges"," (",j," remaining)"]})]})}function bn({summary:e}){return e?Il("div",{role:"note",style:jl,children:e}):null}function xn({tableId:e}){return Il("a",{href:"#"+e,style:jl,onClick:t=>{t.preventDefault();let n=document.getElementById(e);n&&requestAnimationFrame(()=>n.focus())},onFocus:e=>{Object.assign(e.currentTarget.style,{position:"absolute",width:"auto",height:"auto",overflow:"visible",clip:"auto",whiteSpace:"normal",padding:"4px 8px",background:"var(--semiotic-bg, #fff)",color:"var(--semiotic-text, #000)",border:"2px solid var(--semiotic-focus, #005fcc)",borderRadius:"4px",zIndex:"10",fontSize:"12px",top:"4px",left:"4px"})},onBlur:e=>{let t=e.currentTarget;t.removeAttribute("style"),Object.assign(t.style,jl)},children:"Skip to data table"})}function vn({active:e,hoverPoint:t,margin:n,size:i,shape:r="circle",width:o,height:l,pathData:a}){if(!e||!t)return null;let s,c=t.x+n.left,u=t.y+n.top;if("geoarea"!==r&&"path"!==r||!a)if("rect"===r&&null!=o&&null!=l){let e=Math.max(o,4),t=Math.max(l,4);s=ql("rect",{x:c-e/2-3,y:u-t/2-3,width:e+6,height:t+6,rx:3,fill:"none",stroke:Xl,strokeWidth:2,strokeDasharray:"4,2"})}else s=ql("circle","wedge"===r?{cx:c,cy:u,r:12,fill:"none",stroke:Xl,strokeWidth:2.5,strokeDasharray:"6,3"}:{cx:c,cy:u,r:8,fill:"none",stroke:Xl,strokeWidth:2,strokeDasharray:"4,2"});else s=ql("g",{transform:`translate(${n.left},${n.top})`,children:ql("path",{d:a,fill:"none",stroke:Xl,strokeWidth:2.5,strokeDasharray:"6,3"})});return ql("svg",{style:{position:"absolute",left:0,top:0,width:i[0],height:i[1],pointerEvents:"none",zIndex:2},"aria-hidden":"true",children:s})}function wn({x:e,y:t,containerWidth:n,containerHeight:i,margin:r,children:o,className:l="stream-frame-tooltip",zIndex:a=1}){let s=Number.isFinite(e)&&Number.isFinite(t),c=Kl.useRef(null),[u,d]=Kl.useState(null);Kl.useLayoutEffect(()=>{let e=c.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();!Number.isFinite(t.width)||!Number.isFinite(t.height)||d(e=>e&&.5>Math.abs(e.width-t.width)&&.5>Math.abs(e.height-t.height)?e:{width:t.width,height:t.height})};if(t(),typeof ResizeObserver>"u")return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[l,n,i,s]);let h;h=u?`translate(${u.width+12>n-e?"calc(-100% - 12px)":"12px"}, ${u.height+12>i-t?"calc(-100% - 4px)":"4px"})`:`translate(${e>.7*n?"calc(-100% - 12px)":"12px"}, ${.3*i>t?"4px":"calc(-100% - 4px)"})`;let f=y(o),m=f?null:mr;return s?Jl("div",{ref:c,className:f?l:(l+" semiotic-tooltip").trim(),style:{...m||{},position:"absolute",left:r.left+e,top:r.top+t,transform:h,pointerEvents:"none",zIndex:a,width:"max-content"},children:o}):null}function kn(e,t="ease-out-cubic"){return"linear"===t?e:1-Math.pow(1-e,3)}function Mn(e,t){return Math.min((e-t.startTime)/t.duration,1)}function An(e,t,n){return e+(t-e)*n}function Sn(){return"u">typeof performance?performance.now():Date.now()}function Cn(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}function $n(e,t){let n=e();return Number.isFinite(n)?n:t}function jn(e,t,n){return"function"==typeof e?e({size:t,margin:n}):e}function Ln(e){let t=Pi(),n=ia(t);n.current=t;let[i,r]=$e(e.sizeProp,e.responsiveWidth,e.responsiveHeight),o=r[0],l=r[1],a=na(()=>[o,l],[o,l]),s=!!e.title,c=!!e.legend&&"top"===e.legendPosition,u=na(()=>{let t=function(e,t,n=!1){let i=n?t?58:34:t?36:0;return i>e.top?{...e,top:i}:e}({...e.marginDefault,...e.userMargin},s,c);if(e.legend&&!e.legendMarginReserved){let n={...t},i=e.legendPosition??"right";ge(t,{legend:e.legend,position:i,size:a,hasTitle:s,legendLayout:e.legendLayout,axisChrome:e.axisChrome}),oe(t,n,a,i)}return t},[e.marginDefault,e.userMargin,e.legend,e.legendPosition,e.legendLayout,e.axisChrome,e.legendMarginReserved,s,c,a]),d=r[0]-u.left-u.right,h=r[1]-u.top-u.bottom,f=jn(e.foregroundGraphics,r,u),m=jn(e.backgroundGraphics,r,u),p=_i(e=>e.theme),{transition:y,introEnabled:g}=function(e,t){if(!1===e)return{transition:void 0,introEnabled:!1};let n="u">typeof window&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;return{transition:e?!0===e?{duration:300}:{duration:e.duration??300,easing:"linear"===e.easing?"linear":"ease-out"}:t,introEnabled:!(n||!e||!0!==e&&!1===e.intro)}}(e.animate,e.transitionProp),b="semiotic-table-"+Zl.useId(),x=ia(null);if(!x.current){let t=!e.suspendWhenHidden||typeof document>"u"||!document.hidden;x.current=new oa({clock:e.clock,random:e.random,seed:e.seed,paused:e.paused,visible:t})}let v=x.current;v.configure({clock:e.clock,random:e.random,seed:e.seed});let w=ia(null),k=ia(e.frameScheduler??aa);k.current=e.frameScheduler??aa;let M=ia(null),A=ia(!1),S=ia(()=>{}),C=Ql(()=>{if(null!==w.current||A.current)return;let e=k.current,t=!1,n=!1,i=e.requestAnimationFrame(()=>{t=!0;let e=!n;e&&(A.current=!0),w.current=null,M.current=null;try{S.current()}finally{e&&(A.current=!1)}});n=!0,t||(w.current=i,M.current=e)},[]),$=Ql(()=>{null!==w.current&&((M.current??k.current).cancelAnimationFrame(w.current),w.current=null,M.current=null)},[]);la(()=>{v.setPaused(!0===e.paused)},[v,e.paused]),ea(()=>{if(!e.suspendWhenHidden||typeof document>"u")return void v.setVisible(!0);let t=()=>v.setVisible(!document.hidden);return t(),document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[v,e.suspendWhenHidden]),ea(()=>()=>{$()},[$]);let j=ia(()=>{}),L=ia(()=>{}),N=ia({inside:!1,clientX:0,clientY:0,pointerType:void 0}),I=ia(null),z=ia(null),T=ia(null),F=Ql(()=>{let e=I.current;I.current=null,e&&j.current(e)},[]),O=Ql(e=>{let t=N.current;if(t.inside=!0,t.clientX=e.clientX,t.clientY=e.clientY,t.pointerType=e.pointerType,I.current={clientX:e.clientX,clientY:e.clientY,pointerType:e.pointerType},null===z.current){let e=k.current,t=!1,n=e.requestAnimationFrame(()=>{t=!0,z.current=null,T.current=null,F()});t||(z.current=n,T.current=e)}},[F]),R=Ql(()=>{N.current.inside=!1,I.current=null,null!==z.current&&((T.current??k.current).cancelAnimationFrame(z.current),z.current=null,T.current=null),L.current()},[]);ea(()=>()=>{I.current=null,null!==z.current&&((T.current??k.current).cancelAnimationFrame(z.current),z.current=null,T.current=null)},[]);let W=e.themeDirtyRef,D=ia(!1);return la(()=>{if(!W)return;let t=!D.current;D.current=!0,(!t||!e.skipInitialThemeInvalidation)&&(Ji(),W.current=!0,C())},[p,e.skipInitialThemeInvalidation,C,W]),ea(()=>{if(W)return or(()=>i.current,()=>{W.current=!0,C()})},[i,C,W]),{reducedMotion:t,reducedMotionRef:n,responsiveRef:i,size:r,margin:u,adjustedWidth:d,adjustedHeight:h,resolvedForeground:f,resolvedBackground:m,currentTheme:p,transition:y,introEnabled:g,tableId:b,frameRuntime:v,rafRef:w,renderFnRef:S,scheduleRender:C,cancelRender:$,hoverHandlerRef:j,hoverLeaveRef:L,onPointerMove:O,onPointerLeave:R,pointerStateRef:N}}function Nn(e,t,n){let i=Math.round(t[0]*n),r=Math.round(t[1]*n),o=0===t[0]?n:i/t[0],l=0===t[1]?n:r/t[1],a=t[0]+"px",s=t[1]+"px";return e.style.width!==a&&(e.style.width=a),e.style.height!==s&&(e.style.height=s),e.width!==i&&(e.width=i),e.height!==r&&(e.height=r),{effectiveDprX:o,effectiveDprY:l}}function In(e,t,n,i){let r=e.getContext("2d");if(!r)return null;let{effectiveDprX:o,effectiveDprY:l}=Nn(e,t,i);return r.setTransform(o,0,0,l,0,0),r.translate(n.left,n.top),r}function zn(e,t){if(typeof window>"u")return 1;let n=window.devicePixelRatio||1,i="u">=typeof window&&("function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches||768>Math.min(window.innerWidth||1/0,window.innerHeight||1/0))?2:3,r="number"==typeof e&&e>0?e:i;if(!t)return Math.max(1,Math.min(n,r));let[o,l]=t,a=Math.min(Math.sqrt(8388608/(o*l)),16384/Math.max(o,l));return Math.max(1>a?0:1,Math.min(n,r,a))}function Tn(e){let{cancelRender:t,dirtyRef:n,frameRuntime:i,manageFrameRuntime:r,maxDevicePixelRatio:o,scheduleRender:l}=e,a=ua(null),s=ua(null),c=ua(!1),u=ua(!1),d=ua(!1);return fa(()=>{!u.current&&(u.current=!0,e.skipInitialCanvasPaintInvalidation)||(e.canvasPaintInvalidator?e.canvasPaintInvalidator():e.dirtyRef.current=!0,e.scheduleRender())},e.canvasPaintDependencies),function(e){let{hydrated:t,wasHydratingFromSSR:n,storeRef:i,dirtyRef:r,renderFnRef:o,cancelRender:l,cleanup:a}=e;vl(()=>{if(!t)return;let e=i.current;t&&n&&e?.cancelIntroAnimation?.(),!n&&e?.sceneNodes&&e.sceneNodes.length>0&&e?.markStylePaintPending?e.markStylePaintPending():r.current=!0,l?.(),o.current()},[t,n]);let s=gl(a);s.current=a,pl(()=>()=>s.current?.(),[])}({hydrated:e.hydrated,wasHydratingFromSSR:e.wasHydratingFromSSR,storeRef:e.storeRef,dirtyRef:e.dirtyRef,renderFnRef:e.renderFnRef,cancelRender:e.cancelRender,cleanup:e.cleanup}),sa(()=>{if(!1!==r)return i.subscribe(()=>{i.isActive?(n.current=!0,l()):t()})},[t,n,i,r,l]),sa(()=>function(){function e(){n||(i(),t=null,c.current=!0,l(),queueMicrotask(()=>{n||r()}))}if(typeof window>"u"||"function"!=typeof window.matchMedia)return()=>{};let t=null,n=!1,i=()=>{t&&("function"==typeof t.removeEventListener?t.removeEventListener("change",e):"function"==typeof t.removeListener&&t.removeListener(e))},r=()=>{let n=`(resolution: ${window.devicePixelRatio||1}dppx)`;t=window.matchMedia(n),t.media.includes("resolution")?"function"==typeof t.addEventListener?t.addEventListener("change",e):"function"==typeof t.addListener&&t.addListener(e):t=null};return r(),()=>{n=!0,i(),t=null}}(),[l]),sa(()=>{d.current?(c.current=!0,l()):d.current=!0},[o,l]),{canvasRef:a,interactionCanvasRef:s,resolutionDirtyRef:c}}function Fn(e,t){return Tn({...t,renderFnRef:e.renderFnRef,scheduleRender:e.scheduleRender,cancelRender:e.cancelRender,frameRuntime:e.frameRuntime})}function On({children:e,size:t,margin:n,backdropFill:i,overflowVisible:r=!1}){return e||i?ha("svg",{style:{position:"absolute",left:0,top:0,width:t[0],height:t[1],pointerEvents:"none",overflow:r?"visible":void 0},children:[i&&"transparent"!==i?da("rect",{className:"stream-frame-background__backdrop",x:0,y:0,width:t[0],height:t[1],fill:i}):null,da("g",{transform:`translate(${n.left},${n.top})`,children:e})]}):null}function Rn(e){return"touch"===e?"touch":"pointer"}function Wn(e){let t=e.target;return t instanceof Element&&t!==e.currentTarget&&null!=t.closest("button, a[href], input, select, textarea, summary, [contenteditable='true'], [role='button'], [role='link'], [role='checkbox'], [role='radio'], [role='switch']")}function Dn(e){let{onObservation:t,datum:n,x:i=0,y:r=0,chartType:o,chartId:l,context:a,timestamp:s=Date.now()}=e;if(t){if(!n)return void t({type:"hover-end",timestamp:s,chartType:o,chartId:l});t({type:"hover",datum:n,x:i,y:r,timestamp:s,chartType:o,chartId:l}),"focus"===a?.type&&t({type:"focus",datum:n,inputType:"touch"===a.inputType?"pointer":a.inputType,timestamp:s,chartType:o,chartId:l})}}function En(e){let{onObservation:t,datum:n,x:i=0,y:r=0,chartType:o,chartId:l,context:a,timestamp:s=Date.now()}=e;if(t){if(!n)return void t({type:"click-end",timestamp:s,chartType:o,chartId:l});t({type:"click",datum:n,x:i,y:r,timestamp:s,chartType:o,chartId:l}),"activate"===a?.type&&t({type:"activate",datum:n,inputType:a.inputType,timestamp:s,chartType:o,chartId:l})}}function Hn({componentName:e,width:t,height:n,children:i}){return ma(Sr,{fallback:i=>ma(z,{componentName:e,message:i.message,width:t,height:n}),children:i})}function Bn(e,t,n,i){return!1===i||null==e||Array.isArray(e)&&e.length>0||!Array.isArray(e)?null:ma("div",{style:{...ya,width:t,height:n},children:i||"No data available"})}function Pn(e,t,n,i){if(!e||!1===i)return null;if(null!=i)return ma("div",{style:{width:t,height:n,display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:i});let r=Math.min(5,Math.floor(n/40)),o=Math.max(8,Math.floor(n/(3*r))),l=Math.max(6,Math.floor(n/(2.5*r))),a=Math.floor((n-(r*(o+l)-l))/2);return ma("div",{style:{width:t,height:n,position:"relative",overflow:"hidden",border:"1px solid var(--semiotic-border, #e0e0e0)",borderRadius:4,boxSizing:"border-box"},children:Array.from({length:r},(e,n)=>ma("div",{className:"semiotic-loading-bar",style:{...ga,position:"absolute",top:a+n*(o+l),left:Math.floor(.1*t),width:30+(37*n+13)%50+"%",height:o,opacity:.5+n%2*.2}},n))})}function Gn(e,t,n,i){if(!pa||!t||0===t.length||"string"!=typeof i)return;let r=t[0];if(!r||"object"!=typeof r||i in r)return;let o=Object.keys(r).join(", ");console.warn(`[semiotic] ${e}: ${n} "${i}" not found in data. Available keys: ${o}`)}function Vn(e,t){return e?!0===e?{name:"hover",fields:t||[]}:"string"==typeof e?{name:e,fields:t||[]}:{name:e.name||"hover",fields:e.fields||t||[],mode:e.mode,xField:e.xField,seriesField:e.seriesField}:null}function _n(e){return e?"string"==typeof e?{name:e}:e:null}function Un(e,t,n,i){if(!t)return e;let r=(r,...o)=>{let l={...e(r,...o)};if(t.isActive)if(t.predicate(i?i(r):r))n?.selectedStyle&&Object.assign(l,n.selectedStyle);else{let e=n?.unselectedOpacity??.5;l.opacity=e,l.fillOpacity=e,l.strokeOpacity=e,n?.unselectedStyle&&Object.assign(l,n.unselectedStyle)}return l};return Ui(r,[r])}function Yn(e,t={}){let n=t.mobileSemantics?.interaction,i="number"==typeof n?.targetSize?n.targetSize:"number"==typeof t.mobileSemantics?.minimumHitTarget?t.mobileSemantics.minimumHitTarget:void 0,r="mobile"===t.mode||"number"==typeof t.width&&480>=t.width,o=!!n||void 0!==i,l=e&&"object"==typeof e?e:void 0;if(!1===e||!1===l?.enabled||void 0===e&&!r&&!o)return xa;let a=l??{};return{enabled:!0,tapToSelect:a.tapToSelect??!0,tapToLockTooltip:a.tapToLockTooltip??!0,clearSelection:a.clearSelection??"backgroundTap",targetSize:a.targetSize??i??44,snap:a.snap??"nearestDatum",brushHandleSize:a.brushHandleSize??44,standardControls:a.standardControls??!1}}function qn(e){return e.compactMode?e.marginDefaults:wa}function Xn(e,t,n){if(!1!==t)return e;let i={...e};return"horizontal"===n?i.left=Math.min(i.left,15):i.bottom=Math.min(i.bottom,15),i}function Kn({data:e,colorBy:t,colorScale:n,getColor:i,strokeColor:r,strokeWidth:o,categories:l}){return{legendGroups:[{styleFn:e=>{let t=e.color||"#333",n={fill:t,stroke:t};return void 0!==r&&(n.stroke=r),void 0!==o&&(n.strokeWidth=o),n},type:"fill",items:(void 0!==l?l:Array.from(new Set(e.map(e=>"function"==typeof t?t(e):e[t])))).map((r,o)=>{let l=e.find("function"==typeof t?e=>t(e)===r:e=>e[t]===r),a=l?i(l,t,n):n?n(r):$i[o%$i.length];return{label:r+"",color:a,__semioticCategory:!0}}),label:""}]}}function Jn(e,t){if(!t)return[];let n=new Set;for(let i of e){let e="function"==typeof t?t(i):i[t];null!=e&&n.add(e+"")}return Array.from(n)}function Zn(e,t){return null!=e&&Object.hasOwn(e,t)}function Qn({data:e,colorBy:t,colorScale:n,showLegend:i,legendPosition:r,userMargin:o,defaults:l={top:50,bottom:60,left:70,right:40},categories:a,additionalLegend:s,chartWidth:c,chartHeight:u,legendLayout:d,frameLegend:h,hasTitle:f=!1,axisChrome:m}){let{legendPosition:p,legendLayout:y}=function(e,t,n){let i=Zn(n,"legendPosition"),r=Zn(n,"legendLayout");return{legendPosition:i?n?.legendPosition??"right":e??"right",legendLayout:r?n?.legendLayout:t}}(r,d,h),g=Zn(h,"legend"),b=Hr(fo),x=ze(),v=void 0!==i?i:!b&&!!t,w=!!t&&(v||x),k=ka(()=>w?void 0!==a?a:Jn(e,t):[],[a,t,e,w]);Ie(x&&t?k:[]);let M=ka(()=>{if(!v||!t)return;let i=Kn({data:e,colorBy:t,colorScale:n,getColor:Li,categories:k});return 0!==i.legendGroups.reduce((e,t)=>e+t.items.length,0)?i:void 0},[v,t,e,n,k]),A=ka(()=>g?h?.legend:ne(M,s),[M,s,h?.legend,g]),{hasAxis:S,hasAxisLabel:C,rotatedTicks:$,topAxis:j,leftAxis:L,rightAxis:N}=m??{},I=void 0!==j,z=void 0!==L,T=void 0!==N,{hasAxis:F,hasAxisLabel:O,rotatedTicks:R}=j??{},{hasAxis:W,hasAxisLabel:D}=L??{},{hasAxis:E,hasAxisLabel:H}=N??{},B=ka(()=>{let e="number"==typeof o?{top:o,bottom:o,left:o,right:o}:o??{},t=xe(l,h?.axes,f),n=n=>{let i=e[n];return"number"==typeof i?i:t[n]},i={top:n("top"),right:n("right"),bottom:n("bottom"),left:n("left")},r={...i};return A&&(ge(i,{legend:A,position:p,size:[c??600,u??400],hasTitle:f,legendLayout:y,minimumMargin:"bottom"===p?80:"top"===p?50:0,axisChrome:void 0===S?{hasAxis:!0,hasAxisLabel:!0}:{hasAxis:S,hasAxisLabel:C,rotatedTicks:$,topAxis:I?{hasAxis:F,hasAxisLabel:O,rotatedTicks:R}:void 0,leftAxis:z?{hasAxis:W,hasAxisLabel:D}:void 0,rightAxis:T?{hasAxis:E,hasAxisLabel:H}:void 0}}),null!=c&&null!=u&&oe(i,r,[c,u],p)),i},[l,h?.axes,o,A,p,c,u,y,f,S,C,$,I,F,O,R,z,W,D,T,E,H]);return{legend:A,margin:B,legendPosition:p,legendLayout:y,legendMarginReserved:void 0!==A&&!Zn(h,"margin"),hasAutomaticLegend:void 0!==M}}function ei(e){let t=e.valueRange;return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]?[t[0],t[1]]:null}function ti(e,t){return"string"==typeof e.interactionKey?e.interactionKey:`${t[0]}:${t[1]}`}function ni(e,t,n,i=!0,r=!1){let[o,l]=Sa(null),[a,s]=Sa(new Set),c=ka(()=>new Set,[]),u=ka(()=>new Set(n),[n]),d=null!=o&&u.has(o)?o:null,h=ka(()=>{if(0===a.size)return a;let e=new Set(Array.from(a).filter(e=>u.has(e)));return 0===e.size||e.size===u.size?c:e.size===a.size?a:e},[u,c,a]);Aa(()=>{(!i||!t||!e||"none"===e)&&(l(null),s(e=>0===e.size?e:new Set))},[t,i,e]),Aa(()=>{l(e=>null==e||u.has(e)?e:null),s(e=>{if(0===e.size)return e;let t=new Set(Array.from(e).filter(e=>u.has(e)));return 0===t.size||t.size===u.size?new Set:t.size===e.size?e:t})},[u]);let f=Ma(t=>{!i||"highlight"!==e||l(!t||!u.has(t.label)||r&&!0!==t.__semioticCategory?null:t.label)},[u,i,e,r]),m=Ma(t=>{!i||"isolate"!==e||!u.has(t.label)||r&&!0!==t.__semioticCategory||s(e=>{let n=new Set(Array.from(e).filter(e=>u.has(e)));return n.has(t.label)?n.delete(t.label):n.add(t.label),n.size===u.size?new Set:n})},[u,i,e,r]),p=ka(()=>{if(!i||!e||"none"===e||!t)return null;let n=e=>{let n="function"==typeof t?t(e):e[t];return"string"==typeof n?n:n+""};return"highlight"===e&&null!=d?{isActive:!0,predicate:e=>n(e)===d}:"isolate"===e&&h.size>0?{isActive:!0,predicate:e=>h.has(n(e))}:null},[t,i,e,d,h]);return{highlightedCategory:i&&"highlight"===e?d:null,isolatedCategories:i&&"isolate"===e?h:c,onLegendHover:f,onLegendClick:m,legendSelectionHook:p}}function ii(e,t,n,i=5){let[r,o]=n,[l,a]=Sa(null),[s,c]=Sa(new Map),u=ka(()=>new Set,[]);Aa(()=>{a(null),c(new Map)},[r,o,i,e]);let d=Ma(t=>{if("highlight"!==e||!t)return void("highlight"===e&&a(null));let n=ei(t);n&&a({key:ti(t,n),range:n})},[e]),h=Ma(t=>{if("isolate"!==e)return;let n=ei(t);n&&c(e=>{let r=new Map(e),o=ti(t,n);return r.has(o)?r.delete(o):r.set(o,n),r.size===i?new Map:r})},[i,e]),f=ka(()=>{let n="highlight"===e&&l?[l.range]:"isolate"===e?[...s.values()]:[];return 0===n.length?null:{isActive:!0,predicate:e=>{let i=t(e);return Number.isFinite(i)&&n.some(([e,t])=>i>=Math.min(e,t)&&Math.max(e,t)>=i)}}},[l,s,e,t]);return{highlightedCategory:"highlight"===e?l?.key??null:null,isolatedCategories:"isolate"===e?new Set(s.keys()):u,onLegendHover:d,onLegendClick:h,legendSelectionHook:f}}function ri(e,t,n){let i=e.xValue??t?.[n];if(null==i)return null;let r=Number(i);return Number.isFinite(r)?r:null}function oi(e){let t=e.data||e.datum||e;return Array.isArray(t)&&(t=t[0]),null!=e.xValue&&t&&"object"==typeof t&&!Array.isArray(t)&&null==t.xValue?{...t,xValue:e.xValue}:t||{}}function li(e){if(!e)return!1;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function ai(){let e=Vi()?.colors?.categorical;return e&&e.length>0?e:void 0}function si(){return Vi()?.colors?.sequential||void 0}function ci(){return Vi()?.colors?.diverging||void 0}function ui(e,t,n,i,r){if(e)return e;if(n&&"object"==typeof n&&!Array.isArray(n)){let e=Ii(n,i);if(e)return e}let o;if(Array.isArray(n))o=n;else if(t&&t.length>0)o=t;else if("string"==typeof n){let e=Ai[n];Array.isArray(e)&&(o=e)}return o&&0!==o.length?null!=i?(r.has(i)||r.set(i,r.size),o[r.get(i)%o.length]):o[0]:Si}function di(e,t,n){let i=F(),r=ai();return Ca(()=>{if(!t)return;let o=i??void 0,l=n??(r&&r.length>0?r:void 0)??"category10";if(0!==e.length){if("function"==typeof t){let n=Array.from(new Set(e.map(e=>t(e)+"")));if(o&&li(o)){let e=n.map(e=>({_cat:e})),t=ji(e,"_cat",l);return e=>Ii(o,e)??t(e)}let i=n.map(e=>({_cat:e}));return ji(i,"_cat",l)}if(o&&li(o)){let n=ji(e,t,l);return e=>Ii(o,e)??n(e)}return ji(e,t,l)}if(o&&li(o)){let e=ji([{_:"a"}],"_",l);return t=>Ii(o,t)??e(t)}},[e,t,n,i,r])}function hi(e,t,n){return Ca(()=>{if(!t||"auto"===t||"function"==typeof t)return e;let i=[...e],r="function"==typeof(o=n)?o:e=>e[o];var o;return i.sort("asc"===t?(e,t)=>r(e)-r(t):(e,t)=>r(t)-r(e))},[e,t,n])}function fi({selection:e,linkedHover:t,fallbackFields:n=za,unwrapData:i=!1,onObservation:r,chartType:o,chartId:l,onClick:a,hoverHighlight:s,colorByField:c,mobileInteraction:u,emitObservations:d=!0}){let h=La(),f=Ca(()=>Vn(t,n),[t,n]),m=Ca(()=>"series"===f?.mode?[f.seriesField||c||n[0]].filter(e=>!!e):f?.fields||n,[f,c,n]),p=G({name:e?.name||"__unused__",fields:m}),y=_({name:f?.name||"hover",fields:m}),g=Bi(e=>e.pushObservation),b=$a(e=>{r?.(e),g?.(e)},[r,g]),x=e?{isActive:p.isActive,predicate:p.predicate}:null,[v,w]=ja(null),k=Ia(!1),M=c||n[0],A=Ca(()=>{if(!s||null==v||!M)return null;let e=v,t=M;return{isActive:!0,predicate:n=>("string"==typeof n[t]?n[t]:(n[t]??"")+"")===e}},[s,v,M]),S=$a((e,n)=>{let i=!e&&k.current&&!!u?.enabled&&u.tapToLockTooltip;if(t)if(e){let t=e.data||e.datum||e;if(Array.isArray(t)&&(t=t[0]),"x-position"===f?.mode&&f.xField){let n=ri(e,t,f.xField);null!=n&&function(e,t,n){let i=Or.positions.get(e);i?.locked||i&&i.xValue===t&&i.sourceId===n||(Or={positions:new Map(Or.positions).set(e,{xValue:t,sourceId:n})},O())}(f.name||"hover",n,h)}"x-position"!==f?.mode&&y.onHover(t)}else"x-position"===f?.mode&&!i&&R(f.name||"hover",h),"x-position"!==f?.mode&&!i&&y.onHover(null);if(s&&M)if(e){let t=e.data||e.datum||e;Array.isArray(t)&&(t=t[0]);let n=t?.[M];w(null!=n?n+"":null)}else i||w(null);d&&(r||g)&&Dn({onObservation:b,datum:e?oi(e):null,x:e?.x,y:e?.y,chartType:o||"unknown",chartId:l,context:n})},[t,y,f,h,r,o,l,g,b,d,s,M,u]),C=$a((n=!0)=>{k.current=!1,t&&"x-position"!==f?.mode&&y.onHover(null),e&&u?.tapToSelect&&p.clear(),n&&s&&w(null),"x-position"===f?.mode&&(W(f.name||"hover",h),R(f.name||"hover",h))},[t,f,y,e,u,p,s,h]),$=$a((n,i)=>{let c=!!u?.enabled&&(u.tapToLockTooltip||u.tapToSelect),x=!!u?.enabled&&"backgroundTap"===u.clearSelection;if("x-position"===f?.mode&&f.xField&&n){let e=n.data||n.datum||n;Array.isArray(e)&&(e=e[0]);let t=ri(n,e,f.xField);null!=t&&function(e,t,n){if(Or.positions.get(e)?.locked){let t=new Map(Or.positions);return t.delete(e),Or={positions:t},O(),!1}Or={positions:new Map(Or.positions).set(e,{xValue:t,sourceId:n,locked:!0})},O()}(f.name||"hover",t,h)}if(c)if(n){k.current=!0;let i=oi(n);if(t&&"x-position"!==f?.mode&&y.onHover(i),e&&u?.tapToSelect&&m.length>0){let e={};for(let t of m){let n=i[t];void 0!==n&&(e[t]=[n])}li(e)&&p.selectPoints(e)}if(s&&M){let e=i?.[M];w(null!=e?e+"":null)}}else x&&C();if(n||x){if(n&&a){let e=n.data||n.datum||n;Array.isArray(e)&&(e=e[0]),a(e,{x:n.x??0,y:n.y??0})}d&&(r||g)&&En({onObservation:b,datum:n?oi(n):null,x:n?.x,y:n?.y,chartType:o||"unknown",chartId:l,context:i})}},[a,d,r,g,b,o,l,f,h,u,t,y,e,p,m,s,M,C]);return Na(()=>{if(!u?.enabled||typeof document>"u")return;let e=e=>{"Escape"===e.key&&k.current&&C()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[u?.enabled,C]),Na(()=>()=>{k.current&&C(!1)},[C]),Na(()=>{if("x-position"!==f?.mode)return;let e=f.name||"hover";return()=>{W(e,h),R(e,h)}},[f?.mode,f?.name,h]),{activeSelectionHook:x,hoverSelectionHook:A,customHoverBehavior:S,customClickBehavior:$,crosshairSourceId:h}}function mi(e,t){let n="object"==typeof e&&null!==e?e:void 0;if("x-position"===n?.mode)return{linkedCrosshairName:n.name||"hover",linkedCrosshairSourceId:t}}function pi(e,t,n){return function(e,t,n){let i=va[e||"primary"],r=e&&"primary"!==e||!n?.width?i.width:n.width,o=e&&"primary"!==e||!n?.height?i.height:n.height,l=J({...t,mode:e},{width:t.width??r,height:t.height??o}).props,a=l.mode||e||"primary",s=va[a],c="context"===a||"sparkline"===a,u="primary"===a&&n?.width?n.width:s.width;return{mode:a,width:l.width??u,height:l.height??("primary"===a&&n?.height?n.height:s.height),showAxes:l.showAxes??s.showAxes,showGrid:l.showGrid??s.showGrid,enableHover:l.enableHover??(!!l.linkedHover||s.enableHover),showLegend:l.showLegend??s.showLegend,showLabels:l.showLabels??s.showLabels,title:c?void 0:l.title,description:l.description,summary:l.summary,accessibleTable:l.accessibleTable,xLabel:c?void 0:l.xLabel,yLabel:c?void 0:l.yLabel,categoryLabel:c?void 0:l.categoryLabel,valueLabel:c?void 0:l.valueLabel,marginDefaults:Xn(s.marginDefaults,l.showCategoryTicks,l.orientation),compactMode:c,mobileInteraction:Yn(l.mobileInteraction,{mode:a,width:l.width??u,mobileSemantics:l.mobileSemantics}),mobileSemantics:l.mobileSemantics}}(e,t,n)}function yi(e,t="#4e79a7"){return tr(e)?e.background&&"transparent"!==e.background?e.background:t:e&&"string"==typeof e?e:t}function gi(e){let t=e.replace(/[^A-Za-z0-9_-]/g,"_");return!t||/^\d/.test(t)?"s_"+t:t}function bi(e,t,n,i){let r=e.glyph;if(!r?.parts?.length||0>=e.size)return null;let o=Qi(r,e.size);if(0>=o.scale)return null;let l=`translate(${t},${n})${e.rotation?` rotate(${180*e.rotation/Math.PI})`:""} translate(${o.offsetX},${o.offsetY}) scale(${o.scale})`,a=e.color??("string"==typeof e.style.fill?e.style.fill:void 0),s=Zi(r,e.fraction??1,e.fractionStart??0,e.fractionDirection??"horizontal"),c=s?gi(i+"-clip"):void 0,u=(e.style.opacity??1)*(e._decayOpacity??1)*(e.style.fillOpacity??1),d=t=>r.parts.map((n,i)=>{let r=t?"none"===n.fill?void 0:t:ir(n.fill,a,e.accent),o=t?n.stroke&&"none"!==n.stroke?t:void 0:ir(n.stroke??"none",a,e.accent);return r||o?Fa("path",{d:n.d,fill:r??"none",stroke:o,strokeWidth:o?n.strokeWidth??1:void 0,strokeLinecap:n.strokeLinecap,strokeLinejoin:n.strokeLinejoin,opacity:n.opacity},i):null});return Oa("g",{transform:l,opacity:1===u?void 0:u,children:[s&&c&&Fa("clipPath",{id:c,children:Fa("rect",{x:s.x,y:s.y,width:s.width,height:s.height})}),s&&e.ghostColor?Fa("g",{children:d(e.ghostColor)}):null,s&&c?Fa("g",{clipPath:`url(#${c})`,children:d()}):d()]},i)}function xi(e,t){let n=e.filter(e=>Number.isFinite(e.offset)&&(null==e.opacity||Number.isFinite(e.opacity))).map(e=>({offset:Math.max(0,Math.min(1,e.offset)),color:e.color??t,opacity:null==e.opacity?void 0:Math.max(0,Math.min(1,e.opacity))}));return 2>n.length?null:n.map((e,t)=>Fa("stop",{offset:e.offset,stopColor:e.color,stopOpacity:e.opacity},t))}function vi(e,t){let n=e.fillGradient;if(!n||"object"!=typeof n)return null;let i=e.x,r=e.y,o=e.x,l=e.y+e.h;"bottom"===e.roundedEdge?(r=e.y+e.h,l=e.y):"right"===e.roundedEdge?(i=e.x+e.w,r=e.y,o=e.x,l=e.y):"left"===e.roundedEdge&&(i=e.x,r=e.y,o=e.x+e.w,l=e.y);let a=xi(n.stops,yi(e.style.fill));return a?Fa("linearGradient",{id:t,gradientUnits:"userSpaceOnUse",x1:i,y1:r,x2:o,y2:l,children:a}):null}function wi(e){let{x:t,y:n,w:i,h:r}=e,{tl:o,tr:l,br:a,bl:s}=Ki(e),c=`M${t+o},${n}`;return c+=` L${t+i-l},${n}`,l>0&&(c+=` A${l},${l} 0 0 1 ${t+i},${n+l}`),c+=` L${t+i},${n+r-a}`,a>0&&(c+=` A${a},${a} 0 0 1 ${t+i-a},${n+r}`),c+=` L${t+s},${n+r}`,s>0&&(c+=` A${s},${s} 0 0 1 ${t},${n+r-s}`),c+=` L${t},${n+o}`,o>0&&(c+=` A${o},${o} 0 0 1 ${t+o},${n}`),c+=" Z",c}function ki(e,t,n){let i=lr(e.symbolType,e.size,e.path);return Fa("path",{d:i,transform:e.rotation?`translate(${e.x},${e.y}) rotate(${180*e.rotation/Math.PI})`:`translate(${e.x},${e.y})`,fill:e.style.fill?yi(e.style.fill):"none",fillOpacity:e.style.fillOpacity,opacity:e.style.opacity,stroke:e.style.stroke,strokeWidth:e.style.strokeWidth},`${n??""}symbol-${t}`)}function Mi(e,t,n){let i="point"===e.type,r=i?"circle":"rect",o=i?{cx:e.x,cy:e.y,r:e.r}:{x:e.x,y:e.y,width:e.w,height:e.h},l=`${n?n+"-":""}${i?"point":"xyrect"}-${t}-hatch`,a=tr(e.style.fill)?er(e.style.fill,l):void 0;return Oa(Ta.Fragment,{children:[a&&Fa("defs",{children:a}),Ta.createElement(r,{...o,fill:a?`url(#${l})`:yi(e.style.fill),opacity:i?e.style.opacity??e.style.fillOpacity??.8:e.style.opacity,stroke:e.style.stroke,strokeWidth:e.style.strokeWidth})]},`${e.type}-${t}`)}import{COLOR_SCHEMES as Ai,DEFAULT_COLOR as Si,DEFAULT_COLORS as Ci,STREAMING_PALETTE as $i,createColorScale as ji,getColor as Li,resolveCategoricalPalette as Ni,resolveExplicitColor as Ii}from"./c-CPV4N35K.min.js";import{confidenceZScore as zi,fitLinearForForecast as Ti,forecastIntervalStats as Fi,linearRegression as Oi,polynomialRegression as Ri}from"./c-ELDWAO2V.min.js";import{ObservationProvider as Wi,SelectionProvider as Di,buildPredicate as Ei,hasOwnEnumerableKey as Hi,useObservationSelector as Bi,useReducedMotion as Pi,useSelectionSelector as Gi,useTheme as Vi,useThemeSelector as _i}from"./c-JUKIWTBJ.min.js";import{attachSelectionProvenance as Ui,getSelectionProvenance as Yi,selectionDatumWithParent as qi}from"./c-T2V7O2LO.min.js";import{getMinMax as Xi}from"./c-QA3HMQJP.min.js";import{clampCornerRadii as Ki,clearCSSColorCache as Ji,glyphFractionClipRect as Zi,glyphPlacement as Qi,hatchPatternDef as er,isHatchFill as tr,resolveAnnotationGradient as nr,resolveGlyphPaint as ir,resolveSvgFill as rr,subscribeToCSSColorInvalidation as or,symbolPathString as lr}from"./c-MB6CV5NC.min.js";var ar={fresh:1,aging:1.5,stale:3};import{jsx as sr,jsxs as cr}from"react/jsx-runtime";var ur="var(--semiotic-bg, #ffffff)";import*as dr from"react";import*as hr from"react";import{jsx as fr}from"react/jsx-runtime";var mr={background:"var(--semiotic-tooltip-bg, rgba(0, 0, 0, 0.85))",color:"var(--semiotic-tooltip-text, white)",padding:"8px 12px",borderRadius:"var(--semiotic-tooltip-radius, 6px)",fontSize:"var(--semiotic-tooltip-font-size, 14px)",fontFamily:"var(--semiotic-font-family, inherit)",lineHeight:"1.5",boxShadow:"var(--semiotic-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, 0.15))",pointerEvents:"none",maxWidth:"300px",wordWrap:"break-word"};m(f);var pr=["name","label","title"],yr=["type","kind","category","group","class","status","role","shape"],gr=["value","amount","total","count","weight","score"],br=new Set(["x","y","z","x0","x1","y0","y1","r","cx","cy","radius","layer","row","rowindex","col","column","depth","index","order","sankeywidth","coincidentpoints","sourcelinks","targetlinks","parent","children","fx","fy","vx","vy"]);import{jsx as xr,jsxs as vr}from"react/jsx-runtime";import*as wr from"react";import{jsx as kr,jsxs as Mr}from"react/jsx-runtime";import{jsx as Ar}from"react/jsx-runtime";var Sr=class extends wr.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?.(e,t)}render(){if(this.state.error){let{fallback:e}=this.props,t=this.state.error;return"function"==typeof e?e(t):void 0!==e?e:Ar(z,{componentName:"ChartErrorBoundary",message:t.message||"An unexpected error occurred while rendering this chart.",width:600,height:400})}return this.props.children}};import{createContext as Cr,useContext as $r,useMemo as jr}from"react";import{jsx as Lr}from"react/jsx-runtime";var Nr=Cr(null);T.displayName="CategoryColorProvider";import{useId as Ir,useMemo as zr,useCallback as Tr}from"react";import{useSyncExternalStore as Fr}from"react";var Or={positions:new Map},Rr=new Set,Wr={positions:new Map};import{useMemo as Dr}from"react";import{createContext as Er,useContext as Hr,useEffect as Br,useId as Pr,useLayoutEffect as Gr,useMemo as Vr,useRef as _r,useState as Ur,useCallback as Yr}from"react";import*as qr from"react";var Xr={fontFamily:"var(--semiotic-legend-font-family, var(--semiotic-font-family, sans-serif))",fontWeight:"var(--semiotic-legend-font-weight, normal)"},Kr={fontSize:"var(--semiotic-legend-font-size, 12px)"},Jr=34,Zr=70;import*as Qr from"react";import{jsx as eo,jsxs as to}from"react/jsx-runtime";import{jsx as no,jsxs as io}from"react/jsx-runtime";var ro=(e,t,n,i,r,o,l,a,s,c,u)=>{let{items:d}=e,h=[],f=0,m={legendGroup:e,customClickBehavior:t,customHoverBehavior:n,highlightedCategory:i,isolatedCategories:r,focusedGroupIndex:o,focusedItemIndex:l,groupIndex:a,onFocusedIndexChange:s,interactive:!(!t&&!n),useIsolateAria:"isolate"===c||void 0===c&&null!=r,metrics:u};return d.forEach((e,t)=>{h.push(Ae(m,e,t,`translate(0,${f})`,"ArrowUp","ArrowDown")),f+=u.rowHeight}),h};import{useRef as oo,useState as lo,useEffect as ao,useLayoutEffect as so}from"react";var co=typeof window>"u"?ao:so;import{jsx as uo,jsxs as ho}from"react/jsx-runtime";var fo=Er(!1),mo=Er(!1),po=Er(null),yo=typeof window>"u"?Br:Gr,go="__linked-legend-isolate__",bo="__linked-legend-highlight__",xo=Object.freeze([]),vo=typeof window>"u"||typeof document>"u",wo={data:"data",domain:"domain",layout:"layout","scene-geometry":"sceneGeometry","scene-style":"sceneStyle","data-paint":"dataPaint","interaction-paint":"interactionPaint",overlay:"overlay",accessibility:"accessibility",evidence:"evidence"},ko=class{constructor(){this.revisions={data:0,domain:0,layout:0,sceneGeometry:0,sceneStyle:0,dataPaint:0,interactionPaint:0,overlay:0,accessibility:0,evidence:0},this.latest=Xe({kind:"initialize"},[],this.revisions),this.listeners=new Set}get last(){return this.latest}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}record(e,t){let n=Xe(e,t,this.revisions);this.revisions=n.revisions,this.latest=n;for(let e of[...this.listeners])e();return n}};import{memo as Mo,useEffect as Ao,useRef as So}from"react";var Co={sceneGeometry:0,layout:0,domain:0},$o="production"!==process.env.NODE_ENV,jo={revisions:Co,signature:"",sawSignals:!1,wasUnconsumed:!1,warnUnconsumed:!1},Lo=class{constructor(e="scene host"){this.hostName=e,this.lastConsumed=Co,this.lastObserved=Co,this.lastDuplicateWarning="",this.lastUnconsumedWarning=""}observeUpdateResult(e){$o&&(this.lastObserved=Je(this.lastObserved,Ke(e)))}beforeCompute(e,t){if(!$o)return jo;let n=Je(Ke(e),this.lastObserved),i=function(e){return`${e.sceneGeometry}|${e.layout}|${e.domain}`}(n),r=!((o=n).sceneGeometry===(l=this.lastConsumed).sceneGeometry&&o.layout===l.layout&&o.domain===l.domain);var o,l;return{revisions:n,signature:i,sawSignals:e.changed.has("scene-geometry")||e.changed.has("layout")||e.changed.has("domain"),wasUnconsumed:r,warnUnconsumed:!t&&r&&this.lastUnconsumedWarning!==i}}afterCompute(e,t,n){if($o){if(t&&e.wasUnconsumed&&(this.lastConsumed=e.revisions),e.warnUnconsumed&&!t)return console.warn(`[semiotic] ${this.hostName} observed scene-affecting revisions without a scene rebuild: ${e.signature}.`),void(this.lastUnconsumedWarning=e.signature);t&&e.sawSignals&&!e.wasUnconsumed&&!n&&this.lastDuplicateWarning!==e.signature?(console.warn(`[semiotic] ${this.hostName} performed scene rebuild with unchanged scene revisions: ${e.signature}.`),this.lastDuplicateWarning=e.signature):t&&!e.sawSignals&&(this.lastDuplicateWarning="")}}},No=Mo(function({store:e,diagnostics:t}){return Ao(()=>{let n=()=>t.observeUpdateResult(e.getUpdateSnapshot());return n(),e.subscribeUpdateResult(n)},[t,e]),null});import{jsx as Io}from"react/jsx-runtime";import{jsx as zo}from"react/jsx-runtime";var To={secondary:0,primary:3},Fo=".annotation-deferred{opacity:0;pointer-events:none;transition:opacity .12s ease}.stream-xy-frame:hover .annotation-deferred,.stream-ordinal-frame:hover .annotation-deferred,.stream-network-frame:hover .annotation-deferred,.stream-geo-frame:hover .annotation-deferred,.stream-xy-frame:focus-within .annotation-deferred,.stream-ordinal-frame:focus-within .annotation-deferred,.stream-network-frame:focus-within .annotation-deferred,.stream-geo-frame:focus-within .annotation-deferred{opacity:1;pointer-events:auto}@media (prefers-reduced-motion:reduce){.annotation-deferred{transition:none}}";import{jsx as Oo}from"react/jsx-runtime";import{jsx as Ro,jsxs as Wo}from"react/jsx-runtime";import*as Do from"react";import{jsx as Eo,jsxs as Ho}from"react/jsx-runtime";import{packEnclose as Bo}from"d3-hierarchy";import{area as Po,curveLinear as Go,curveMonotoneX as Vo,curveMonotoneY as _o,curveStep as Uo,curveStepAfter as Yo,curveStepBefore as qo,curveBasis as Xo,curveCardinal as Ko,curveCatmullRom as Jo}from"d3-shape";var Zo=new Set(["top-left","top-center","top-right","middle-left","center","middle-right","bottom-left","bottom-center","bottom-right"]);import{jsx as Qo}from"react/jsx-runtime";var el={fill:"var(--semiotic-text, #333)",fontSize:11,fontFamily:"inherit"};import{jsx as tl,jsxs as nl}from"react/jsx-runtime";var il={linear:Go,monotoneX:Vo,monotoneY:_o,step:Uo,stepAfter:Yo,stepBefore:qo,basis:Xo,cardinal:Ko,catmullRom:Jo},rl=new Set(["label","callout","callout-circle","callout-rect","text","widget"]),ol=new Set(["label","callout","callout-circle","callout-rect"]),ll=32,al=6,sl=4,cl=8,ul=72,dl={ai:"AI",agent:"agent",watcher:"watcher",system:"system",import:"imported",computed:"computed",user:"you"};import{jsx as hl}from"react/jsx-runtime";import*as fl from"react";import{jsx as ml}from"react/jsx-runtime";import{useEffect as pl,useLayoutEffect as yl,useRef as gl,useState as bl,useSyncExternalStore as xl}from"react";var vl="u">typeof window?yl:pl,wl=()=>()=>{},kl=()=>!1,Ml=()=>!0;import*as Al from"react";import{jsx as Sl}from"react/jsx-runtime";var Cl=Al.createContext(null);import{jsx as $l}from"react/jsx-runtime";var jl={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0};import*as Ll from"react";var Nl=e=>{if(null==e)return"";let t=Math.round(100*e)/100;return Number.isNaN(t)?"":t+""};import{jsx as Il,jsxs as zl}from"react/jsx-runtime";var Tl=Ll.lazy(()=>import("./c-E4JDJH4I.min.js")),Fl=25,Ol="semiotic-accessible-data-table",Rl=Ol+" semiotic-accessible-data-table-hidden",Wl=Ol+" semiotic-accessible-data-table-visible",Dl=Wl+" semiotic-accessible-data-table-network",El={boxSizing:"border-box",maxWidth:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Hl={position:"absolute",top:0,left:0,right:0,zIndex:"var(--semiotic-data-table-z-index, var(--semiotic-overlay-z-index, 20))",padding:"14px 16px 12px",borderBottom:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",fontFamily:"var(--semiotic-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",fontSize:13,lineHeight:1.5,color:"var(--semiotic-data-table-text, var(--semiotic-text, #333))",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",borderRadius:"var(--semiotic-border-radius, 0px) var(--semiotic-border-radius, 0px) 0 0"},Bl={marginBottom:8,paddingRight:28,color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",fontSize:12,letterSpacing:"0.01em"},Pl={position:"absolute",top:10,right:10,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",cursor:"pointer",color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",fontSize:13,lineHeight:1,padding:0,borderRadius:"var(--semiotic-border-radius, 4px)"},Gl={width:"100%",borderCollapse:"collapse",fontSize:12,marginTop:4,fontVariantNumeric:"tabular-nums"},Vl={textAlign:"left",padding:"5px 10px",borderBottom:"2px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))"},_l={padding:"4px 10px",borderBottom:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))"},Ul={textAlign:"left",fontSize:11,color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",marginBottom:4,fontStyle:"italic"},Yl={marginTop:8,padding:"4px 10px",fontSize:12,cursor:"pointer",border:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",borderRadius:"var(--semiotic-border-radius, 4px)",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",color:"var(--semiotic-data-table-text, var(--semiotic-text, #333))",fontFamily:"inherit"};import{jsx as ql}from"react/jsx-runtime";var Xl="var(--semiotic-focus, #005fcc)";import*as Kl from"react";import{jsx as Jl}from"react/jsx-runtime";import*as Zl from"react";import{useCallback as Ql,useEffect as ea,useLayoutEffect as ta,useMemo as na,useRef as ia}from"react";var ra=()=>"u">typeof performance?performance.now():Date.now(),oa=class{constructor(e={}){this.randomSource=Math.random,this.subscribers=new Set,this.now=()=>this.advance(),this.random=()=>this.randomSource(),this.clock=e.clock??ra,this.lastWallTime=$n(this.clock,0),this.logicalTime=this.lastWallTime,this.pausedValue=!0===e.paused,this.visibleValue=!1!==e.visible,this.setRandomSource(e.random,e.seed)}get isActive(){return!this.pausedValue&&this.visibleValue}get paused(){return this.pausedValue}get seed(){return this.seedValue}get visible(){return this.visibleValue}configure(e){this.setClock(e.clock),this.setRandomSource(e.random,e.seed)}setPaused(e){this.pausedValue!==e&&(this.advance(),this.pausedValue=e,this.emit())}setVisible(e){this.visibleValue!==e&&(this.advance(),this.visibleValue=e,this.emit())}snapshot(){return{now:this.now(),paused:this.pausedValue,seed:this.seedValue,visible:this.visibleValue}}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}advance(){let e=$n(this.clock,this.lastWallTime),t=Math.max(0,e-this.lastWallTime);return this.lastWallTime=e,this.isActive&&(this.logicalTime+=t),this.logicalTime}emit(){for(let e of this.subscribers)e()}setClock(e){let t=e??ra;t!==this.clock&&(this.advance(),this.clock=t,this.lastWallTime=$n(t,this.lastWallTime))}setRandomSource(e,t){let n=function(e){return"number"==typeof e&&Number.isFinite(e)?Math.trunc(e):void 0}(t);e===this.randomInput&&n===this.seedValue||(this.randomInput=e,this.seedValue=n,this.randomSource=e??(void 0===n?Math.random:Cn(n)))}},la=typeof window>"u"?ea:ta,aa={requestAnimationFrame:e=>(typeof window>"u"?globalThis:window).requestAnimationFrame(e),cancelAnimationFrame:e=>(typeof window>"u"?globalThis:window).cancelAnimationFrame(e)};import{useEffect as sa,useLayoutEffect as ca,useRef as ua}from"react";import{jsx as da,jsxs as ha}from"react/jsx-runtime";var fa=typeof window>"u"?sa:ca;import{jsx as ma}from"react/jsx-runtime";var pa="u">typeof process&&"production"!==process.env?.NODE_ENV,ya={display:"flex",alignItems:"center",justifyContent:"center",color:"var(--semiotic-text-secondary, #666)",fontSize:13,fontFamily:"inherit",border:"1px dashed var(--semiotic-border, #ddd)",borderRadius:4,boxSizing:"border-box"},ga={background:"var(--semiotic-border, #e0e0e0)",borderRadius:2},ba=.5,xa={enabled:!0,tapToSelect:!0,tapToLockTooltip:!0,clearSelection:"backgroundTap",targetSize:44,snap:"nearestDatum",brushHandleSize:44,standardControls:!1,enabled:!1,tapToSelect:!1,tapToLockTooltip:!1},va={primary:{width:600,height:400,showAxes:!0,showGrid:!1,enableHover:!0,showLegend:void 0,showLabels:void 0,marginDefaults:{top:50,bottom:60,left:70,right:40}},context:{width:400,height:250,showAxes:!1,showGrid:!1,enableHover:!1,showLegend:!1,showLabels:!1,marginDefaults:{top:10,bottom:10,left:10,right:10}},sparkline:{width:120,height:24,showAxes:!1,showGrid:!1,enableHover:!1,showLegend:!1,showLabels:!1,marginDefaults:{top:2,bottom:2,left:0,right:0}},mobile:{width:390,height:300,showAxes:!0,showGrid:!1,enableHover:!0,showLegend:!1,showLabels:!0,marginDefaults:{top:28,bottom:42,left:44,right:16}}},wa={top:10,bottom:10,left:10,right:10};import{useMemo as ka,useCallback as Ma,useEffect as Aa,useState as Sa}from"react";import{useMemo as Ca,useCallback as $a,useState as ja,useId as La,useEffect as Na,useRef as Ia}from"react";var za=[];import*as Ta from"react";import{jsx as Fa,jsxs as Oa}from"react/jsx-runtime";var Ra={innerRadius:0,outerRadius:0,startAngle:0,endAngle:0};export{xo as EMPTY_ARRAY,Ye as filterSparseArray,kn as computeEasing,Mn as computeRawProgress,An as lerp,Sn as now,ar as DEFAULT_LIFECYCLE_THRESHOLDS,e as bandFromAge,t as resolveMotionAccessor,n as compileMotionEncoding,i as resolveMotionAge,r as opacityFromAge,o as resolveMotionVector,l as deriveMotionVector,vo as isServerEnvironment,ko as UpdateResultTracker,Ze as useSceneRevisionDiagnostics,Qe as runSceneBuild,No as SceneRevisionDiagnosticsObserver,ee as resolveXYAxes,te as numericTickFormatter,ne as composeLegendConfigs,oe as clampLegendReservation,ce as resolveLegendSideGutter,he as resolveXYAxisChrome,fe as resolveXYFramePropsAxisChrome,me as resolveOrdinalAxisChrome,ge as reserveLegendMargin,xe as resolveHiddenAxisMargins,et as renderLegendFromConfig,a as estimateLabelWidth,s as AnnotationLabel,c as annotationStableId,u as useAnnotationActivationOptions,d as annotationActivationProps,h as isAnnotationActivationTarget,Fo as ANNOTATION_DISCLOSURE_REVEAL_CSS,lt as renderAnnotationPass,jt as createDefaultAnnotationRules,Lt as annotationType,Nt as isNoteAnnotation,It as annotationDrawsConnector,Tt as annotationBudget,Pt as annotationLayout,W as unlockCrosshair,P as useCrosshairPosition,Gt as SVGChartTitle,Ra as ARC_NOOP,yi as svgFill,gi as safeSvgId,bi as glyphNodeToSVG,xi as colorStopElements,vi as buildRectSVGGradient,wi as perCornerSvgPath,ki as symbolSceneNodeToSVG,Mi as pointOrRectSceneNodeToSVG,Vt as sceneMarkCursor,_t as sceneHasAuthoredCursor,Ut as setCanvasMarkCursor,Yt as syncCanvasMarkCursor,qt as rehitCanvasMarkCursor,Xt as useCanvasMarkCursorCleanup,Kt as withSceneMarkCursor,Jt as useHydration,Zt as useWasHydratingFromSSR,Qt as DataSummaryProvider,en as useDataSummary,tn as useDataSummaryToggle,nn as AriaLiveTooltip,sn as extractAllRows,fn as AccessibleTablePortal,mn as computeCanvasAriaLabel,pn as computeNetworkAriaLabel,yn as AccessibleDataTable,gn as NetworkAccessibleDataTable,bn as ScreenReaderSummary,xn as SkipToTableLink,vn as FocusRing,mr as defaultTooltipStyle,f as TooltipRoot,m as markTooltipChrome,y as hasOwnTooltipChrome,wn as FlippingTooltip,$e as useResponsiveSize,Cn as createSeededFrameRandom,Ln as useFrame,Nn as syncCanvasSize,In as prepareCanvas,zn as getDevicePixelRatio,Fn as useFrameCanvasHost,On as CanvasFrameBackground,x as getPointerHitRadius,w as buildHoverData,b as smartTooltipEntries,A as Tooltip,S as MultiLineTooltip,C as isMultiTooltip,$ as isMultiTooltipConfig,j as resolveMultiCapableTooltip,L as resolveTooltipContent,N as MultiPointTooltip,I as normalizeTooltip,Rn as observationInputType,Wn as isInteractiveKeyboardTarget,Dn as emitHoverObservations,En as emitClickObservations,z as ChartError,Sr as ChartErrorBoundary,Hn as SafeRender,Bn as renderEmptyState,Pn as renderLoadingState,Gn as warnMissingField,T as CategoryColorProvider,F as useCategoryColors,Vn as normalizeLinkedHover,_n as normalizeLinkedBrush,ba as DEFAULT_SELECTION_OPACITY,Un as wrapStyleWithSelection,G as useSelection,V as useSelectionActions,_ as useLinkedHover,Y as useBrushSelection,q as useFilteredData,K as responsiveRuleMatches,J as resolveResponsiveRules,Yn as resolveMobileInteraction,qn as resolveAxisFreeMarginDefaults,Q as resolveBoundedCategoryIndex,Z as useChartObserver,je as useLinkedChartsActive,Ie as useLinkedChartCategories,ze as useLinkedChartCategoryRegistryActive,Fe as LinkedCharts,Kn as createLegend,Jn as distinctCategories,Qn as useChartLegendAndMargin,ni as useLegendInteraction,ii as useGradientLegendInteraction,ai as useThemeCategorical,si as useThemeSequential,ci as useThemeDiverging,ui as resolveDefaultFill,di as useColorScale,hi as useSortedData,fi as useChartSelection,mi as getCrosshairProps,pi as useChartMode,Oe as makeRuleValueResolver,Re as makeXYRuleContext,We as makeNodeRuleContext,Ee as matchesThreshold,He as ruleMatches,Be as resolveStyleRules,Pe as composeStyleRules,Ge as makeStyleRuleStyleFn,Ve as styleRulesToNodeStyle,_e as styleRulesToXYStyle,Ue as styleRulesToPieceStyle};
|
package/dist/c-PRIKOLTE.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{MarginalGraphics as m}from"./c-VXLOLYTO.min.js";import{normalizeMarginalConfig as i}from"./c-QAVFOEUY.min.js";import"./c-QA3HMQJP.min.js";export{m as MarginalGraphics,i as normalizeMarginalConfig};
|
package/dist/c-PSKKFZNP.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,l,i,y,n,f){if(0>=l.size)return;let p=function(t,l,o){try{if(o)return e(o);let r=`${t??"circle"}:${l}`,i=s.get(r);return i||(i=new Path2D(a(t,l)),s.size>256&&s.clear(),s.set(r,i)),i}catch{return null}}(l.symbolType,l.size,l.path);if(!p)return;t.save(),t.translate(i,y),l.rotation&&t.rotate(l.rotation);let c=(l.style.opacity??1)*(l._decayOpacity??1);l.style.fill&&(t.globalAlpha=n*c*(l.style.fillOpacity??1),t.fillStyle=r(t,l.style.fill,f),t.fill(p)),l.style.stroke&&"none"!==l.style.stroke&&(t.globalAlpha=n*c,t.strokeStyle=o(t,l.style.stroke)||l.style.stroke,t.lineWidth=l.style.strokeWidth??1,t.stroke(p)),t.restore()}function l(l,e){let o=l.globalAlpha;for(let r of e)"symbol"===r.type&&t(l,r,r.cx,r.cy,o,"#007bff");l.globalAlpha=o}import{getGlyphPath2D as e,resolveCSSColor as o,resolveCanvasFill as r,symbolPathString as a}from"./c-MB6CV5NC.min.js";var s=new Map,i=(l,e)=>{let o=l.globalAlpha;for(let r of e)"symbol"===r.type&&t(l,r,r.x,r.y,o,"#4e79a7");l.globalAlpha=o};export{i as symbolCanvasRenderer,l as networkSymbolRenderer};
|
package/dist/c-PSNI6KAZ.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t,o){let r={numbers:o?[]:void 0,finite:0,min:1/0,max:-1/0,missing:0,nonFinite:0,nonNumeric:0,zero:0,negative:0,fractional:0};for(let o of e){let e,s=o?.[t];if(null!=s&&""!==s){if("number"==typeof s)e=s;else if("string"==typeof s){let t=s.trim();if(""===t){r.missing++;continue}let o=Number(t);Number.isNaN(o)?/^[+-]?nan$/i.test(t)&&(e=o):e=o}void 0!==e?Number.isFinite(e)?(r.numbers?.push(e),r.finite++,r.min>e&&(r.min=e),e>r.max&&(r.max=e),0===e&&r.zero++,0>e&&r.negative++,Number.isInteger(e)||r.fractional++):r.nonFinite++:r.nonNumeric++}else r.missing++}return r}function t(e,t){if(0===e.length)return;let o=(e.length-1)*t,r=Math.floor(o),s=Math.ceil(o);if(r===s)return e[r];let n=o-r;return e[r]*(1-n)+e[s]*n}function o(o,r={}){if(!Array.isArray(o)||0===o.length)return{};let s=new Set;for(let e of o)if(e&&"object"==typeof e)for(let t of Object.keys(e))s.add(t);let n={};for(let i of s){let s=e(o,i,!1!==r.quantiles),a=s.numbers?.sort((e,t)=>e-t);n[i]={field:i,observedCount:o.length-s.missing,finiteCount:s.finite,missingCount:s.missing,nonFiniteCount:s.nonFinite,nonNumericCount:s.nonNumeric,zeroCount:s.zero,negativeCount:s.negative,fractionalCount:s.fractional,...s.finite>0?{min:s.min,...a?{q1:t(a,.25),median:t(a,.5),q3:t(a,.75)}:{},max:s.max}:{}}}return n}function r(e){let t=[`${e.component}: ${e.ok?"✓ numerically safe":"✗ numeric hazards found"}`,`${e.rowCount} rows · ${e.summary.fieldsChecked} numeric fields · ${e.summary.errors} errors · ${e.summary.warnings} warnings`];for(let o of e.diagnoses)t.push(`${"error"===o.severity?"ERROR":"WARN"} ${o.code}${o.field?` [${o.field}]`:""}: ${o.message}`),o.fix&&t.push(" Fix: "+o.fix);return t.join("\n")}function s(e){return e.code.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function n(e,t={}){let o=Number.isFinite(t.max)?Math.max(0,Math.floor(t.max)):6,r=e.diagnoses.map((e,t)=>({item:e,diagnosisIndex:t})).filter(({item:e})=>!t.errorsOnly||"error"===e.severity),n=r.slice(0,o).map(({item:e,diagnosisIndex:t})=>({id:`data-audit:${e.code}:${e.role??"chart"}:${e.field??"chart"}:${t}`,level:e.severity,title:e.field?`${s(e)} · ${e.field}`:s(e),message:e.fix?`${e.message} ${e.fix}`:e.message,source:"Semiotic data audit",dismissible:!0}));return r.length>o&&n.push({id:"data-audit:overflow:chart",level:r.slice(o).some(({item:e})=>"error"===e.severity)?"error":"warning",title:`${r.length-o} more numeric finding${r.length-o===1?"":"s"}`,message:"Run auditData() or diagnoseConfig() to inspect the complete report.",source:"Semiotic data audit",dismissible:!0}),n}function i(e,t){let o=e.nestedDataAccessorProp?t[e.nestedDataAccessorProp]:void 0;return"string"==typeof o?o:e.defaultNestedDataAccessor}function a(e,t,o){let r=e.dataProp??"data",s=t[r],n=o??(Array.isArray(s)?s:[]),a=i(e,t);if(!a)return{dataProp:r,rows:n};let l=[],c=!1;for(let e of n){let t=e?.[a];if(Array.isArray(t)){c=!0;for(let e of t)e&&"object"==typeof e&&l.push(e)}}return{dataProp:r,rows:c?l:n}}function l(){let e=globalThis;return e[D]??(e[D]={contracts:new Map}),e[D]}function c(e,t){t?l().contracts.set(e,t):l().contracts.delete(e)}function u(e){l().contracts.delete(e)}function f(e,t,o){return"function"==typeof e?e(t,o):t[e]}function g(e,t){if("number"==typeof e)return Number.isFinite(e)?e:null;if(e instanceof Date){let o=e.getTime();return t&&Number.isFinite(o)?o:null}if("string"==typeof e){let o=e.trim(),r=Number(o);if(o&&Number.isFinite(r))return r;if("date-like"===t){let e=$(o);return Number.isFinite(e)?e:null}}return null}function d(e){return"number"==typeof e&&!Number.isFinite(e)}function m(e,t,o,r,s){let n={field:o,numbers:[],finiteRows:[],missingRows:[],nonFiniteRows:[],nonNumericRows:[],accessorErrorRows:[],zeroRows:[],negativeRows:[],fractionalRows:[]};for(let o=0;e.length>o;o++){let i;try{i=f(t,e[o],o)}catch{n.accessorErrorRows.push(o);continue}if(null==i||""===i){if(void 0!==s){n.numbers.push(s),n.finiteRows.push(o),0===s&&n.zeroRows.push(o),0>s&&n.negativeRows.push(o),Number.isInteger(s)||n.fractionalRows.push(o);continue}n.missingRows.push(o);continue}let a=g(i,r);null!=a?(n.numbers.push(a),n.finiteRows.push(o),0===a&&n.zeroRows.push(o),0>a&&n.negativeRows.push(o),Number.isInteger(a)||n.fractionalRows.push(o)):d(i)?n.nonFiniteRows.push(o):n.nonNumericRows.push(o)}return n}function h(e,t){let o=new Set(e.requirements??["finite"]);return o.add("finite"),("x"===e.role&&"log"===t.xScaleType||"y"===e.role&&"log"===t.yScaleType)&&o.add("positive"),[...o]}function p(e){return e.slice(0,5)}function v(e){return{domain:"data",...e}}function w(e,o){let r=[],{observation:s,contract:n,accessorLabel:i,requirements:a}=e,l={field:i,role:n.role},c=[...s.nonFiniteRows,...s.nonNumericRows,...s.accessorErrorRows].sort((e,t)=>e-t);if(0===s.numbers.length)return r.push(v({severity:"error",code:"DEGENERATE_EXTENT",message:`${n.accessor}="${i}" produces no finite numeric values; the chart cannot resolve its ${n.role} input.`,fix:`Ensure ${i} contains finite numbers${"x"===n.role?" (or valid dates for a time scale)":""}.`,...l,...c.length>0?{rows:p(c),count:c.length}:{}})),r;s.nonFiniteRows.length>0&&r.push(v({severity:"error",code:"NON_FINITE_VALUE",message:`${i} contains ${s.nonFiniteRows.length} NaN or infinite value${1===s.nonFiniteRows.length?"":"s"}; scale and layout math require finite numbers.`,fix:`Filter or replace NaN/Infinity in ${i} before rendering.`,...l,rows:p(s.nonFiniteRows),count:s.nonFiniteRows.length})),!n.allowMissing&&s.missingRows.length>0&&r.push(v({severity:"error",code:"MISSING_NUMERIC_VALUE",message:`${i} is missing for ${s.missingRows.length} row${1===s.missingRows.length?"":"s"}; the ${n.role} role requires an explicit numeric value.`,fix:`Fill or filter missing ${i} values before rendering.`,...l,rows:p(s.missingRows),count:s.missingRows.length}));let u=[...s.nonNumericRows,...s.accessorErrorRows].sort((e,t)=>e-t);if(u.length>0&&r.push(v({severity:"error",code:"NON_NUMERIC_VALUE",message:`${i} produces ${u.length} non-numeric value${1===u.length?"":"s"} for the ${n.role} role.`,fix:`Bind ${n.accessor} to a numeric field or return finite numbers from the accessor.`,...l,rows:p(u),count:u.length})),n.domain&&s.numbers.length>=2){let[e,t]=function(e){let t=1/0,o=-1/0;for(let r of e)t>r&&(t=r),r>o&&(o=r);return[t,o]}(s.numbers);e===t&&r.push(v({severity:"warning",code:"ZERO_SPAN_DOMAIN",message:`${i} is constant at ${e}; its ${n.role} scale has a zero-span data domain.`,fix:`Provide varying ${n.role} values, set an explicit extent around ${e}, or use a single-value display.`,...l,rows:p(s.finiteRows),count:s.finiteRows.length}))}if(a.includes("positive")){let t=s.numbers.map((e,t)=>({number:e,row:s.finiteRows[t]})).filter(({number:e})=>0>=e).map(({row:e})=>e);if(t.length>0){let o=e.logScale;r.push(v({severity:"error",code:o?"LOG_NON_POSITIVE":"NON_POSITIVE_VALUE",message:`${i} contains ${t.length} non-positive value${1===t.length?"":"s"}, which ${o?"cannot be represented on a log scale":"violate the positive-value contract"}.`,fix:o?"Remove or transform values ≤ 0, or use a linear/symlog scale.":"Provide values greater than zero.",...l,rows:p(t),count:t.length}))}}if(a.includes("non-negative")&&s.negativeRows.length>0&&r.push(v({severity:"error",code:"size"===n.role?"NEGATIVE_SIZE":"NEGATIVE_VALUE",message:`${i} contains ${s.negativeRows.length} negative ${n.role} value${1===s.negativeRows.length?"":"s"}; the chart maps this role to non-negative geometry.`,fix:"Use a non-negative measure, clamp intentionally, or encode sign with position/color instead.",...l,rows:p(s.negativeRows),count:s.negativeRows.length})),a.includes("integer")){let e=[...new Set([...s.negativeRows,...s.zeroRows,...s.fractionalRows])].sort((e,t)=>e-t);e.length>0&&r.push(v({severity:"error",code:"INVALID_COUNT",message:`${i} contains ${e.length} value${1===e.length?"":"s"} that are not positive integers.`,fix:"Counts must be integers ≥ 1; aggregate, round intentionally, or use a continuous-value encoding.",...l,rows:p(e),count:e.length}))}if(a.includes("unit-interval")){let e=s.numbers.map((e,t)=>({number:e,row:s.finiteRows[t]})).filter(({number:e})=>0>e||e>1).map(({row:e})=>e);e.length>0&&r.push(v({severity:"error",code:"OUTSIDE_UNIT_INTERVAL",message:`${i} contains ${e.length} value${1===e.length?"":"s"} outside [0, 1].`,fix:`Normalize ${i} to [0, 1] before using it as ${n.role}.`,...l,rows:p(e),count:e.length}))}if(o&&n.domain){let o=function(e){let o=e.observation.numbers.map((t,o)=>({value:t,row:e.observation.finiteRows[o]})).sort((e,t)=>e.value-t.value);if(8>o.length)return[];let r=o.map(e=>e.value),s=t(r,.25),n=t(r,.75),i=t(r,.5),a=n-s;if(a>0){let e=s-10*a,t=n+10*a;return o.filter(o=>e>o.value||o.value>t).map(e=>e.row)}let l=100*Math.max(1,Math.abs(i));return o.filter(e=>Math.abs(e.value-i)>l).map(e=>e.row)}(e);o.length>0&&r.push(v({severity:"warning",code:"OUTLIER_DOMINATED_DOMAIN",message:`${i} has ${o.length} extreme value${1===o.length?"":"s"} beyond the 10×IQR guardrail; the main distribution may collapse visually.`,fix:"Verify the extreme values, then consider a log scale, robust extent, inset, or explicit annotation rather than silently clipping them.",...l,rows:p(o),count:o.length}))}return r}function y(e,t,o){if(!e)return"__all__";try{return f(e,t,o)+""}catch{return"__accessor_error__"}}function A(e,t,o){if(e.whenProp&&!0!==o[e.whenProp])return[];let r=t.find(t=>t.contract.role===e.role);if(!r||0===r.observation.numbers.length)return[];let s=e.groupAccessor?o[e.groupAccessor]:void 0,n="string"==typeof s||"function"==typeof s?s:e.defaultGroupAccessor,i=new Map;for(let e=0;r.rows.length>e;e++){let t;try{t=f(r.accessor,r.rows[e],e)}catch{continue}let o=g(t,void 0);if(null==o)continue;let s=y(n,r.rows[e],e),a=i.get(s)??{sum:0,magnitude:0,positive:!1,negative:!1,rows:[],negativeRows:[]};a.sum+=o,a.magnitude+=Math.abs(o),a.positive||(a.positive=o>0),a.negative||(a.negative=0>o),a.rows.push(e),0>o&&a.negativeRows.push(e),i.set(s,a)}let a=[],l=[],c=[],u=[],d=[],m=[];for(let[t,o]of i)("positive-total"===e.kind&&0>=o.sum||"normalized-total"===e.kind&&Number.EPSILON*Math.max(1,o.magnitude)*10>=Math.abs(o.sum))&&(a.push(t),u.push(...o.rows)),"normalized-total"===e.kind&&o.positive&&o.negative&&(l.push(t),d.push(...o.rows)),"normalized-total"===e.kind&&o.negative&&(c.push(t),m.push(...o.negativeRows));let h=[];return a.length>0&&h.push(v({severity:"error",code:"normalized-total"===e.kind?"ZERO_NORMALIZED_TOTAL":"NON_POSITIVE_TOTAL",message:"normalized-total"===e.kind?`${a.length} normalization group${1===a.length?" has":"s have"} a zero total, so division would be undefined.`:"The part-to-whole total is not positive, so meaningful shares cannot be computed.",fix:"normalized-total"===e.kind?"Remove empty/zero-sum groups or disable normalization.":"Provide at least one positive value and ensure the total is greater than zero.",field:r.accessorLabel,role:e.role,rows:p([...new Set(u)].sort((e,t)=>e-t)),count:a.length})),c.length>0&&h.push(v({severity:"error",code:"NEGATIVE_NORMALIZED_VALUE",message:`${c.length} normalization group${1===c.length?" contains":"s contain"} negative contributions, so conventional percentage shares are not defined.`,fix:"Use non-negative contributions, a diverging stack, or disable normalization.",field:r.accessorLabel,role:e.role,rows:p([...new Set(m)].sort((e,t)=>e-t)),count:m.length})),l.length>0&&h.push(v({severity:"warning",code:"MIXED_SIGN_NORMALIZATION",message:`${l.length} normalization group${1===l.length?" mixes":"s mix"} positive and negative contributions; percentage shares may be unstable or misleading.`,fix:"Separate positive and negative contributions, use diverging stacks, or disable normalization.",field:r.accessorLabel,role:e.role,rows:p([...new Set(d)].sort((e,t)=>e-t)),count:l.length})),h}function b(e,t,o,r={}){let s=r.contracts??function(e){return l().contracts.get(e)??k[e]}(e)??function(e){let t=[];for(let[o,r]of Object.entries(L))"string"!=typeof e[o]&&"function"!=typeof e[o]||t.push({role:r,accessor:o,..."size"===r?{requirements:["finite","non-negative"]}:{},..."x"===r||"y"===r?{domain:!0}:{}});return t.length>0?{fields:t}:void 0}(t);if(!s)return{component:e,ok:!0,rowCount:o?.length??(Array.isArray(t.data)?t.data.length:0),summary:{fieldsChecked:0,errors:0,warnings:0},contracts:[],diagnoses:[]};let n=function(e,t,o){let r=[],s=new Set;for(let n of e.fields){if(n.whenProps?.some(e=>null==t[e]))continue;let e=t[n.accessor],i="string"==typeof e||"function"==typeof e?e:n.defaultAccessor;if("string"!=typeof i&&"function"!=typeof i)continue;let{dataProp:l,rows:c}=a(n,t,o);if(0===c.length)continue;let u="string"==typeof i?i:n.accessor+"()",f=`${l}:${n.role}:${u}`;if(s.has(f))continue;s.add(f);let g=n.temporalValues??("time"===n.role||"x"===n.role&&"time"===t.xScaleType?"date-like":void 0),d="x"===n.role&&"log"===t.xScaleType||"y"===n.role&&"log"===t.yScaleType,p=h(n,t);r.push({contract:n,accessor:i,accessorLabel:u,dataProp:l,rows:c,requirements:p,logScale:d,observation:m(c,i,u,g,n.missingValue)})}return r}(s,t,o),c=[],u=!1!==r.checkOutliers;for(let e of function(e,t,o){let r=new Set;for(let s of e.fields){let e=s.dataProp??"data",n=o??t[e];if(!Array.isArray(n))continue;if(0===n.length){r.add(e);continue}let a=i(s,t);if(!a)continue;let l=n.map(e=>e?.[a]).filter(Array.isArray);l.length>0&&l.every(e=>0===e.length)&&r.add(`${e}.${a}`)}return[...r]}(s,t,o))c.push(v({severity:"error",code:"EMPTY_DATA",message:e+" is an explicitly empty array; there are no numeric inputs to render.",fix:`Provide at least one valid row, render an intentional empty state, or omit ${e} when using the ref push API.`,count:0,rows:[]}));let f=new Set(n.filter(e=>e.contract.domain&&1===e.rows.length).map(e=>e.dataProp));for(let e of f)c.push(v({severity:"warning",code:"SINGLE_ROW_DOMAIN",message:e+" has one row; a quantitative scale cannot establish variation from a single observation.",fix:"Provide at least two observations or use a single-value display such as BigNumber.",count:1,rows:[0]}));for(let e of n)c.push(...w(e,u));for(let e of s.aggregates??[])c.push(...A(e,n,t));let g=c.filter(e=>"error"===e.severity).length,d=c.length-g;return{component:e,ok:0===g,rowCount:n.reduce((e,t)=>Math.max(e,t.rows.length),o?.length??(Array.isArray(t.data)?t.data.length:0)),summary:{fieldsChecked:n.length,errors:g,warnings:d},contracts:n.map(e=>({role:e.contract.role,accessor:e.accessorLabel,dataProp:e.dataProp,requirements:e.requirements,allowMissing:!0===e.contract.allowMissing,...void 0!==e.contract.missingValue?{missingValue:e.contract.missingValue}:{},domain:!0===e.contract.domain})),diagnoses:c}}import{parseDateLikeString as $}from"./c-P65V6HLO.min.js";var R=[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"y",accessor:"yAccessor",defaultAccessor:"y",domain:!0}],N={fields:R},x=[{...R[0],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates"},{...R[1],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates",allowMissing:!0}],z={fields:x},P={role:"value",accessor:"valueAccessor",defaultAccessor:"value"},E={...P,domain:!0},I={fields:[{...P,requirements:["finite","non-negative"]}],aggregates:[{kind:"positive-total",role:"value"}]},C={fields:[P],aggregates:[{kind:"normalized-total",role:"value",groupAccessor:"categoryAccessor",defaultGroupAccessor:"category",whenProp:"normalize"}]},_={fields:x,aggregates:[{kind:"normalized-total",role:"y",groupAccessor:"xAccessor",defaultGroupAccessor:"x",whenProp:"normalize"}]},S={fields:[...R,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},O={fields:[...R,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},M={fields:[P]},T={fields:[{...P,dataProp:"edges",requirements:["finite","non-negative"],missingValue:1}]},k={LineChart:z,AreaChart:z,BumpChart:z,Scatterplot:O,ConnectedScatterplot:N,QuadrantChart:O,MinimapChart:z,BubbleChart:S,StackedAreaChart:_,DifferenceChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date",domain:!0},{role:"value",accessor:"seriesAAccessor",defaultAccessor:"a"},{role:"value",accessor:"seriesBAccessor",defaultAccessor:"b"}]},WaterfallChart:{fields:[{role:"y",accessor:"yAccessor",defaultAccessor:"y"}]},CandlestickChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"high",accessor:"highAccessor",defaultAccessor:"high",requirements:["finite"]},{role:"low",accessor:"lowAccessor",defaultAccessor:"low",requirements:["finite"]},{role:"open",accessor:"openAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]},{role:"close",accessor:"closeAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]}]},Heatmap:M,BarChart:{fields:[P]},GroupedBarChart:{fields:[P]},StackedBarChart:C,DotPlot:{fields:[E]},Histogram:{fields:[E]},BoxPlot:{fields:[E]},SwarmPlot:{fields:[E,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},ViolinPlot:{fields:[E]},RidgelinePlot:{fields:[E]},PieChart:I,DonutChart:I,FunnelChart:I,SankeyDiagram:T,ChordDiagram:T,ProportionalSymbolMap:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"lon",dataProp:"points",requirements:["finite"]},{role:"y",accessor:"yAccessor",defaultAccessor:"lat",dataProp:"points",requirements:["finite"]},{role:"size",accessor:"sizeBy",dataProp:"points",requirements:["finite","non-negative"]}]}},D=Symbol.for("semiotic.numericContractRegistry"),L={xAccessor:"x",yAccessor:"y",valueAccessor:"value",sizeBy:"size",sizeAccessor:"size",radiusAccessor:"size",countAccessor:"count",amountAccessor:"value",highAccessor:"high",lowAccessor:"low",openAccessor:"open",closeAccessor:"close",lowerAccessor:"lower",upperAccessor:"upper",positiveAccessor:"value",negativeAccessor:"value",progressAccessor:"value",confidenceAccessor:"value",costAccessor:"value",throughputAccessor:"value"};export{k as BUILT_IN_NUMERIC_CONTRACTS,c as registerNumericContracts,u as unregisterNumericContracts,o as profileNumericFields,r as formatDataAudit,n as toDataAuditNotifications,b as auditData};
|
package/dist/c-QAVFOEUY.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t){return"string"==typeof t?{type:t}:t}export{t as normalizeMarginalConfig};
|
package/dist/c-R2P4RR7Q.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,e,l){let h=l;for(let l of e)"lesser"===l.thresholdType?l.value>t&&(h=l.color):t>l.value&&(h=l.color);return h}function e(e,l,h,a){if(2>e.length||l.length!==e.length||0===h.length)return[];let o=[],i=(t,e,l)=>{let h=o[o.length-1];h?.color===t?h.path.push(l):o.push({color:t,path:[e,l]})};for(let o=1;e.length>o;o++){let[n,r]=e[o-1],[p,s]=e[o],f=l[o-1],g=l[o]-f,y=[0,...0===g?[]:h.map(({value:t})=>(t-f)/g).filter(t=>t>0&&1>t&&Number.isFinite(t)).sort((t,e)=>t-e).filter((t,e,l)=>0===e||t!==l[e-1]),1];for(let e=1;y.length>e;e++){let l=y[e-1],o=y[e];i(t(f+g*((l+o)/2),h,a),[n+(p-n)*l,r+(s-r)*l],[n+(p-n)*o,r+(s-r)*o])}}return o}function l(t,e,l,h,a,o){if(2>e.length)return;let i=[0];for(let t=1;e.length>t;t++){let l=e[t][0]-e[t-1][0],h=e[t][1]-e[t-1][1];i.push(i[t-1]+Math.sqrt(l*l+h*h))}let n=i[i.length-1];if(0===n)return;let r=Math.min(.2*n,40);t.strokeStyle=l,t.lineWidth=h,t.lineCap=o;for(let l=0;e.length-1>l;l++){let h=(i[l]+i[l+1])/2,o=a;r>h&&(o*=h/r),r>n-h&&(o*=(n-h)/r),t.globalAlpha=Math.max(0,o),t.beginPath(),t.moveTo(e[l][0],e[l][1]),t.lineTo(e[l+1][0],e[l+1][1]),t.stroke()}}import{buildLinearFillGradient as h,resolveCSSColor as a,resolveCanvasFill as o,resolveCurveFactory as i}from"./c-MB6CV5NC.min.js";import{line as n}from"d3-shape";var r=(t,r,p,s)=>{let f=r.filter(t=>"line"===t.type);for(let r of f){if(2>r.path.length)continue;let p=r._introClipFraction;void 0!==p&&1>p&&(t.save(),t.beginPath(),t.rect(0,0,s.width*p,s.height),t.clip());let f=r.style.stroke||"#007bff",g=a(t,f)||f,y=r.style.strokeWidth??2,c=r.colorThresholds,u=r.rawValues;if(t.setLineDash(r.style.strokeDasharray?r.style.strokeDasharray.split(/[\s,]+/).map(Number):[]),null!=r.style.opacity&&(t.globalAlpha=r.style.opacity),y>0&&(t.lineWidth=y),t.lineCap=r.style.strokeLinecap||"butt",r.style._edgeFade&&y>0){l(t,r.path,g,y,r.style.opacity??1,r.style.strokeLinecap||"butt"),t.globalAlpha=1,t.setLineDash([]),t.lineCap="butt";continue}let b=i(r.curve),k=c&&c.length>0&&u&&u.length===r.path.length,m=r._decayOpacities;if(y>0&&m&&m.length===r.path.length&&!k){t.strokeStyle=g;let e=r.style.opacity??1;for(let l=0;r.path.length-1>l;l++)t.globalAlpha=.5*(m[l]+m[l+1])*e,t.beginPath(),t.moveTo(r.path[l][0],r.path[l][1]),t.lineTo(r.path[l+1][0],r.path[l+1][1]),t.stroke()}else if(y>0&&!k){t.beginPath();let e=r.strokeGradient&&r.path.length>=2?h(t,r.strokeGradient,g,r.path[0][0],0,r.path[r.path.length-1][0],0):null;if(t.strokeStyle=e||g,b)n().x(t=>t[0]).y(t=>t[1]).curve(b).context(t)(r.path);else{let[e,l]=r.path[0];t.moveTo(e,l);for(let e=1;r.path.length>e;e++)t.lineTo(r.path[e][0],r.path[e][1])}t.stroke()}else if(y>0){let l=e(r.path,u,c,g);for(let e of l){t.beginPath(),t.strokeStyle=a(t,e.color)||e.color,t.moveTo(e.path[0][0],e.path[0][1]);for(let l=1;e.path.length>l;l++)t.lineTo(e.path[l][0],e.path[l][1]);t.stroke()}}if(r.style.fill&&r.style.fillOpacity&&r.style.fillOpacity>0){if(t.beginPath(),t.globalAlpha=r.style.fillOpacity,t.fillStyle=o(t,r.style.fill,r.style.fill),b&&!k)n().x(t=>t[0]).y(t=>t[1]).curve(b).context(t)(r.path);else{let[e,l]=r.path[0];t.moveTo(e,l);for(let e=1;r.path.length>e;e++)t.lineTo(r.path[e][0],r.path[e][1])}let e=r.path[0][0];t.lineTo(r.path[r.path.length-1][0],s.height),t.lineTo(e,s.height),t.closePath(),t.fill()}void 0!==p&&1>p&&t.restore(),t.globalAlpha=1,t.setLineDash([]),t.lineCap="butt"}};export{e as buildThresholdLineSegments,r as lineCanvasRenderer};
|
package/dist/c-RFC7UAG7.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let t=v(e=>e.theme.colors.selectionOpacity);return L(()=>{if(void 0!==e||void 0!==t)return{name:e?.name??"",...e,unselectedOpacity:e?.unselectedOpacity??t}},[e,t])}function t(t){let{data:r,rawData:v,colorBy:L,colorScheme:S,legendInteraction:M,legendPosition:F,selection:B,linkedHover:D,fallbackFields:P,unwrapData:b=!1,onObservation:w,chartType:A,chartId:I,showLegend:T,legend:O,legendLayout:R,frameLegend:x,userMargin:_,marginDefaults:j,onClick:N,hoverHighlight:J,mobileInteraction:K,mobileSemantics:W,loading:G,loadingContent:U,emptyContent:V,width:Y,height:q,hasTitle:z,axisChrome:E}=t,Q=void 0===v,X=k(()=>o(r),[r]),[Z,$]=H([]),ee=C(e=>{$(t=>t.length===e.length&&t.every((t,r)=>t===e[r])?t:e)},[]),te="string"==typeof L?L:void 0,re=k(()=>u(K,{width:Y,mobileSemantics:W}),[K,Y,W]),{activeSelectionHook:ne,hoverSelectionHook:oe,customHoverBehavior:ae,customClickBehavior:le,crosshairSourceId:ie}=s({selection:B,linkedHover:D,fallbackFields:P,unwrapData:b,onObservation:w,chartType:A,chartId:I,onClick:N,hoverHighlight:J,colorByField:te,mobileInteraction:re}),ue=a(D,ie),ce=d(X,L,S),ge=k(()=>n(X,L),[X,L]),se=k(()=>Q&&Z.length>0?Z:ge,[Q,Z,ge]),de=h(M,L,se),he=k(()=>oe||(de.legendSelectionHook?de.legendSelectionHook:ne),[oe,de.legendSelectionHook,ne]),me=e(B),ye=m(),pe=c(),fe=k(()=>{if(ce)return ce;if(!L||0===se.length)return;let e=Array.isArray(S)&&S.length>0||"string"==typeof S&&S.length>0?S:ye&&ye.length>0?ye:y,t="__streamCat",r=se.map(e=>({[t]:e})),n=p(r,t,e);return e=>(pe?f(pe,e):void 0)??n(e)??"#999"},[ce,L,se,S,ye,pe]),{legend:ve,margin:Le,legendPosition:Ce,legendLayout:ke,legendMarginReserved:He}=g({data:X,colorBy:L,colorScale:fe,showLegend:T,legendPosition:F,userMargin:_,defaults:j,categories:se,additionalLegend:O,chartWidth:Y,chartHeight:q,legendLayout:R,frameLegend:x,hasTitle:z,axisChrome:E}),Se=k(()=>{let e={};return ve&&(e.legend=ve,e.legendPosition=Ce,He&&(e.__legendMarginReservedFor=ve),ke&&(e.legendLayout=ke)),M&&"none"!==M&&(e.legendHoverBehavior=de.onLegendHover,e.legendClickBehavior=de.onLegendClick,e.legendHighlightedCategory=de.highlightedCategory,e.legendIsolatedCategories=de.isolatedCategories),Q&&L&&(e.legendCategoryAccessor=L,e.onCategoriesChange=ee),e},[ve,Ce,ke,He,M,de.onLegendHover,de.onLegendClick,de.highlightedCategory,de.isolatedCategories,Q,L,ee]),Me=Array.isArray(v)?o(v):v,Fe=i(G,Y,q,U),Be=Fe?null:l(Me,Y,q,V);return{data:X,colorScale:ce,allCategories:se,legendState:de,effectiveSelectionHook:he,activeSelectionHook:ne,customHoverBehavior:ae,customClickBehavior:le,mobileInteraction:re,legend:ve,margin:Le,legendPosition:Ce,earlyReturn:Fe||Be||null,legendBehaviorProps:Se,crosshairProps:ue,resolvedSelection:me}}function r(e,t){let{variant:r,frameRef:n,overrides:o}=t,a=M(o);a.current=o,S(e,()=>{let e=function(e,t){if("xy"===e){let e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.remove(t)??[],update:(t,r)=>e.current?.update(t,r)??[],replace:t=>e.current?.replace?.(t),clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getScales:()=>e.current?.getScales()??null,getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("network"===e){let e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>{let r=Array.isArray(t)?t:[t],n=e.current?.getTopology()?.nodes??[],o=[];for(let t of r){let r=n.find(e=>e.id===t);r&&o.push({...r.data??{},id:t}),e.current?.removeNode(t)}return o},update:(t,r)=>(Array.isArray(t)?t:[t]).flatMap(t=>{let n=e.current?.updateNode(t,r);return n?[{...n,id:t}]:[]}),clear:()=>e.current?.clear(),getData:()=>e.current?.getTopology()?.nodes?.map(e=>e.data)??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("geo-points"===e){let e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.removePoint(t)??[],update:(t,r)=>{let n=e.current?.removePoint(t)??[];for(let t of n)e.current?.push(r(t));return n},clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}let r=t;return{push:e=>r.current?.pushLine(e),pushMany:e=>r.current?.pushManyLines(e),remove:e=>r.current?.removeLine(e)??[],update:(e,t)=>{let n=r.current?.removeLine(e)??[];for(let e of n)r.current?.pushLine(t(e));return n},clear:()=>r.current?.clear(),getData:()=>r.current?.getLines()??[],getCustomLayout:()=>r.current?.getCustomLayout?.()??null,getLayoutFailure:()=>r.current?.getLayoutFailure?.()??null}}(r,n);return new Proxy(e,{get(e,t,r){if("string"==typeof t){let e=a.current?.[t];if("function"==typeof e)return e}return Reflect.get(e,t,r)},has:(e,t)=>!("string"!=typeof t||!a.current||!(t in a.current))||Reflect.has(e,t)})},[])}import{distinctCategories as n,filterSparseArray as o,getCrosshairProps as a,renderEmptyState as l,renderLoadingState as i,resolveMobileInteraction as u,useCategoryColors as c,useChartLegendAndMargin as g,useChartSelection as s,useColorScale as d,useLegendInteraction as h,useThemeCategorical as m}from"./c-ODG6TFSY.min.js";import{STREAMING_PALETTE as y,createColorScale as p,resolveExplicitColor as f}from"./c-CPV4N35K.min.js";import{useThemeSelector as v}from"./c-JUKIWTBJ.min.js";import{useMemo as L}from"react";import{useCallback as C,useMemo as k,useState as H}from"react";import{useImperativeHandle as S,useRef as M}from"react";export{e as useResolvedSelection,t as useChartSetup,r as useFrameImperativeHandle};
|
package/dist/c-S3AZX5PP.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let r=e.trim(),i=/^(\d{4})-(\d{2})-(\d{2})/.exec(r);if(i){let e=Number(i[1]),r=Number(i[2]),t=Number(i[3]),n=new Date(Date.UTC(e,r,0)).getUTCDate();if(1>r||r>12||1>t||t>n)return NaN}return/^\d{4}-\d{2}-\d{2}$/.test(r)?Date.parse(r+"T00:00:00Z"):/(?:z|[+-]\d{2}:\d{2})$/i.test(r)?Date.parse(r):NaN}function r(r){if(!r)return;let i=e(r);return Number.isFinite(i)?i:void 0}function i(e,i){let t=e.presentation?.label?.trim();if(!t||!u.test(t)||d.test(t)||c.test(t))return;let n=r(e.eventTime?.value);if(void 0===n)return;let o=[i,e.observedAt,e.ingestedAt,e.processedAt,e.publishedAt,e.snapshotAt].map(r).filter(e=>void 0!==e);return 0!==o.length&&n<Math.max(...o)?{id:"time.presentation.event-time-as-now",relation:"time",status:"fail",path:"time.presentation.label",message:"The presentation describes older event-time data as current wall-clock state.",repair:"State the exact event time or use bounded language such as ‘as of’ or ‘through’."}:void 0}function t(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function n(e){throw new TypeError("Invalid custom artifact policy: "+e)}function o(e){for(let r of Object.values(e))Object.freeze(r.rules),Object.freeze(r.requiredRelations),Object.freeze(r);return Object.freeze(e)}function s(e){return{...e,rules:{...e.rules},requiredRelations:[...e.requiredRelations]}}function a(e){if(void 0===e)return s(y.exploratory);if("string"!=typeof e)return function(e){if(!t(e))return n("expected an object.");let r=Object.keys(e).filter(e=>!b.has(e));if(r.length>0)return n(`unexpected field${1===r.length?"":"s"}: ${r.join(", ")}.`);for(let r of["id","version","label","description"])if("string"!=typeof e[r]||!e[r].trim())return n(r+" must be a non-empty string.");let i=e.id,o=Object.prototype.hasOwnProperty.call(y,i)?y[i]:void 0;if(!o&&!Object.prototype.hasOwnProperty.call(e,"minimumStakes")||Object.prototype.hasOwnProperty.call(e,"minimumStakes")&&("string"!=typeof e.minimumStakes||!h.has(e.minimumStakes)))return n("minimumStakes is required and must be exploratory, informational, operational, or high.");if(!t(e.rules))return n("rules must be an object.");let a=new Set(f),l=Object.keys(e.rules).filter(e=>!a.has(e));if(l.length>0)return n(`unexpected rule${1===l.length?"":"s"}: ${l.join(", ")}.`);for(let r of f)if(!Object.prototype.hasOwnProperty.call(e.rules,r)||"boolean"!=typeof e.rules[r])return n(`rule "${r}" must be a boolean.`);if(!Array.isArray(e.requiredRelations)||0===e.requiredRelations.length)return n("requiredRelations must be a non-empty array of recognized relations.");let u=[];for(let r of e.requiredRelations){if("string"!=typeof r||!v.has(r))return n(`requiredRelations contains an unrecognized relation: ${r+""}.`);u.push(r)}if(new Set(u).size!==u.length)return n("requiredRelations must not contain duplicates.");let d={id:i,version:e.version,label:e.label,description:e.description,...void 0!==e.minimumStakes?{minimumStakes:e.minimumStakes}:{},rules:{...e.rules},requiredRelations:u};return!o||(c=d).id===(p=o).id&&c.version===p.version&&c.label===p.label&&c.description===p.description&&c.minimumStakes===p.minimumStakes&&f.every(e=>c.rules[e]===p.rules[e])&&c.requiredRelations.length===p.requiredRelations.length&&c.requiredRelations.every((e,r)=>e===p.requiredRelations[r])?o?s(o):d:n(`built-in policy id "${d.id}" cannot be redefined; use a distinct id for an extension.`);var c,p}(e);let r=Object.prototype.hasOwnProperty.call(y,e)?y[e]:void 0;if(!r)throw Error(`Unknown artifact policy "${e}".`);return s(r)}function l(r,i=[],t){let n={...r.rules},o=[],s=[],a=t?e(t):NaN;for(let t of i){let i=t.rule,l=Object.prototype.hasOwnProperty.call(n,i),u=[t.expiresAt,t.reviewAt],d=u.some(e=>void 0!==e&&("string"!=typeof e||0===e.trim().length)),c=u.filter(e=>"string"==typeof e&&e.trim().length>0),p=c.map(e),m="string"==typeof t.rationale&&t.rationale.trim().length>0&&"string"==typeof t.owner&&t.owner.trim().length>0,f=Number.isFinite(a)&&!d&&c.length>0&&p.every(e=>Number.isFinite(e)&&e>a);r.rules.allowExceptions&&l&&!0===n[i]&&"allowExceptions"!==i&&"allowManualChecks"!==i&&m&&f?(n[i]=!1,o.push(t)):s.push(t)}return{rules:n,appliedExceptions:o,rejectedExceptions:s}}var u=/\b(?:now|current(?:ly)?|latest|live|real[ -]?time|up[ -]?to[ -]?date)\b/i,d=/\b(?:as of|through|up to(?!\s+date\b)|event time|observed (?:at|through)|data (?:from|through|as of))\b/i,c=/\b(?:not|isn['’]?t|is not|no longer|never)\b(?:\s+[a-z'-]+){0,3}\s+(?:now|current|latest|live|real[ -]?time|up[ -]?to[ -]?date)\b/i,p={requireClaims:!0,requireEvidenceIdentity:!1,requireReviewForModelClaims:!1,requireRenderEvidence:!1,requireSettledTime:!1,requireFreshnessForLive:!1,refuseUnsupportedClaims:!1,refuseUnknownClaims:!1,refuseCriticalAccessibilityFailures:!0,refuseChartErrors:!0,refuseUnknownTime:!1,allowManualChecks:!0,allowExceptions:!0},m=["claim-support","representation-fit","reception","time","abstention"],f=Object.keys(p),b=new Set(["id","version","label","description","minimumStakes","rules","requiredRelations"]),v=new Set(["claim-support","representation-fit","reception","time","challenge-and-correction","accountability","abstention","preservation"]),h=new Set(["exploratory","informational","operational","high"]),y=o({exploratory:{id:"exploratory",version:"0.1",label:"Exploratory",description:"Keeps uncertainty visible while allowing incomplete work to remain inspectable.",rules:{...p,requireClaims:!1,refuseCriticalAccessibilityFailures:!1,refuseChartErrors:!1},requiredRelations:["claim-support","representation-fit"]},"operational-streaming":{id:"operational-streaming",version:"0.1",label:"Operational streaming",description:"Blocks action when render proof, live freshness, completeness, evidence identity, or model review is unresolved.",minimumStakes:"operational",rules:{...p,requireEvidenceIdentity:!0,requireReviewForModelClaims:!0,requireRenderEvidence:!0,requireSettledTime:!0,requireFreshnessForLive:!0,refuseUnsupportedClaims:!0,refuseUnknownClaims:!0,refuseUnknownTime:!0},requiredRelations:[...m,"accountability","challenge-and-correction"]},editorial:{id:"editorial",version:"0.1",label:"Editorial",description:"Requires render proof, attributable evidence, settled publication language, and visible correction history.",minimumStakes:"informational",rules:{...p,requireEvidenceIdentity:!0,requireReviewForModelClaims:!0,requireRenderEvidence:!0,requireSettledTime:!0,refuseUnsupportedClaims:!0,refuseUnknownClaims:!0,refuseUnknownTime:!0},requiredRelations:[...m,"challenge-and-correction","accountability","preservation"]},"public-civic":{id:"public-civic",version:"0.1",label:"Public information",description:"Prioritizes render proof, accessible reception, source answerability, uncertainty, privacy, and correction paths.",minimumStakes:"informational",rules:{...p,requireEvidenceIdentity:!0,requireReviewForModelClaims:!0,requireRenderEvidence:!0,refuseUnsupportedClaims:!0,refuseUnknownClaims:!1,refuseUnknownTime:!1},requiredRelations:[...m,"challenge-and-correction","preservation"]},"agent-generated":{id:"agent-generated",version:"0.1",label:"Agent generated",description:"Requires render proof, independent evidence, explicit review state, safe grounding, and refusal when support is absent.",rules:{...p,requireEvidenceIdentity:!0,requireReviewForModelClaims:!0,requireRenderEvidence:!0,requireSettledTime:!0,refuseUnsupportedClaims:!0,refuseUnknownClaims:!0},requiredRelations:[...m,"accountability","preservation"]}});export{e as parseAbsoluteTime,i as eventTimePresentationFinding,y as ARTIFACT_POLICIES,a as resolveArtifactPolicy,l as activePolicyRules};
|
package/dist/c-SGAURYHG.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t={}){let r=!0===t.showRetractedAnnotations,n=!0===t.showSupersededAnnotations,a=new Set;for(let t of e){let e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&a.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!r)return!1;let t=e?.provenance?.stableId;return!(t&&a.has(t)&&!n)})}function t(e){return"string"==typeof e?e:"value"}function r(e){return null==e?"–":"number"==typeof e?Math.abs(e)>9999?e.toLocaleString():e+"":e instanceof Date?e.toLocaleDateString():e+""}function n(e,t){if(!t)return r(e);try{return t(e)??r(e)}catch{return r(e)}}function a(e,t){return"function"==typeof t?t(e):e[t]}function o(e,t){if(!e)return[];let r=[];return(Array.isArray(e)?e:[e]).forEach((e,n)=>{let a="string"==typeof e?.y0Accessor?e.y0Accessor:"low",o="string"==typeof e?.y1Accessor?e.y1Accessor:"high";r.push({label:a,accessor:e=>e.bands?.[n]?.y0??(0===n?e.band?.y0:void 0),format:t}),r.push({label:o,accessor:e=>e.bands?.[n]?.y1??(0===n?e.band?.y1:void 0),format:t})}),r}function l(e){let t=e.find(e=>"title"===e.role),r=e.filter(e=>"title"!==e.role);return e=>{let o=e.data;if(!o)return null;let l=t?n(a(o,t.accessor),t.format):null;return Oe("div",{className:"semiotic-tooltip",style:ve,children:[null!=l&&Se("div",{style:{fontWeight:"bold",marginBottom:r.length>0?4:0},children:l}),r.map((e,t)=>{let r=n("y"===e.role&&null!=o.__aggregateValue?o.__aggregateValue:a(o,e.accessor),e.format);return Oe("div",{style:t>0?{marginTop:2}:void 0,children:[Oe("span",{style:{opacity:.7},children:[e.label,": "]}),Se("span",{children:r})]},t)})]})}}function i({categoryAccessor:e,valueAccessor:o,groupAccessor:l,groupLabel:i,pieData:u=!1,valueFormat:c}){return s=>{let f=u?s.data?.[0]||s.data||s:s.data||s,d=a(f,e),h=a(f,o),p=l?a(f,l):void 0;return Oe("div",{className:"semiotic-tooltip",style:ve,children:[Se("div",{style:{fontWeight:"bold"},children:r(d)}),Se("div",{style:{marginTop:4},children:n(h,c)}),null!=p&&Oe("div",{style:{marginTop:2,opacity:.8},children:[i||t(l),": ",r(p)]})]})}}function u(...e){let t=e.filter(e=>null!=e);return 0===t.length?null:1===t.length?t[0]:Ee.createElement(Ee.Fragment,null,...t)}function c(e,t,r,n){De(()=>{e.current?.updateConfig(t),r.current=!0,n()},[t,n,e,r])}function s(e,t,r,n){let a=Re(null);De(()=>{let o=e.current;if(!o)return;let l=t??null;a.current!==l&&(a.current=l,o.setLayoutSelection(l),o.hasCustomRestyle?o.restyleScene(l):r.current=!0,n())},[t,n,e,r])}function f(e,t){if(!e||0>=t)return Pe;let r=null!=e.threshold&&e.threshold>0?e.threshold:5e3,n=e.graded;if(n){let e="object"==typeof n?n:{},a=be(t,r,e.thresholds);return{alpha:{...Be,...e.opacities??{}}[a],band:a,isStale:"fresh"!==a}}return t>r?{alpha:e.dimOpacity??.5,band:"stale",isStale:!0}:Pe}function d(e,t,r,n,a,o,l){let i=je("fresh");Le(()=>{if(!e)return void(i.current="fresh");let u=setInterval(()=>{let u=t.current;if(!u||0===u.lastIngestTime)return;let c=f(e,a()-u.lastIngestTime);(c.band!==i.current||c.isStale!==o)&&(i.current=c.band,c.isStale!==o&&l(c.isStale),r.current=!0,n())},1e3);return()=>clearInterval(u)},[e,o,n,a,t,l,r])}function h({isStale:e,position:t}){return Ce("div",{className:"stream-staleness-badge",style:{position:"absolute",..."top-left"===t?{top:4,left:4}:"bottom-left"===t?{bottom:4,left:4}:"bottom-right"===t?{bottom:4,right:4}:{top:4,right:4},padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,pointerEvents:"none",zIndex:3,background:e?"#dc3545":"#28a745",color:"white"},children:e?"STALE":"LIVE"})}function p(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return g(e,t);if(!m(e)||!m(t))return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;let r=e[n],a=t[n];if(!Object.is(r,a)){if(Array.isArray(r)&&Array.isArray(a)){if(!g(r,a))return!1;continue}if(!m(r)||!m(a)||!y(r,a))return!1}}return!0}function y(e,t){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}function g(e,t){if(e.length!==t.length)return!1;for(let r=0;e.length>r;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function m(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function x(e){let t=Te(e);return p(t.current,e)||(t.current=e),t.current}function b(e){let{background:t,hasBackgroundGraphics:r=!1,themeBackground:n=""}=e;return"transparent"===t?null:r?t||null:t||(n&&"transparent"!==n?n:"")||null}function v(e){let{background:t,hasBackgroundGraphics:r=!1,themeBackground:n=""}=e;return"transparent"===t||r?null:t||(n&&"transparent"!==n?n:"")||null}function w(e,t){let{background:r,hasBackgroundGraphics:n=!1,themeBackground:a="",x:o=0,y:l=0,width:i,height:u}=t,c=v({background:r,hasBackgroundGraphics:n,themeBackground:a});if(!c)return!1;let s=Ie(e,c);return!(!s||"transparent"===s.trim().toLowerCase()||(e.fillStyle=s,e.fillRect(o,l,i,u),0))}function k(e,t,r,n){return"function"==typeof e?e({size:t,margin:r,scales:n}):e}function A({foregroundGraphics:e,backgroundGraphics:t,size:r,margin:n,scales:a,background:o,themeBackgroundColor:l,resolveScaleAwareGraphics:i=!0}){let u=`var(--semiotic-bg, ${l})`;return{resolvedForeground:i||"function"!=typeof e?k(e,r,n,a):null,resolvedBackground:i||"function"!=typeof t?k(t,r,n,a):null,themeBackground:u,surfaceBackground:b({background:o,hasBackgroundGraphics:!!t,themeBackground:u})}}function M(e,t){if(!t)return[];let r=new Set,n=[];for(let a of e){if(!a||"object"!=typeof a)continue;let e=("function"==typeof t?t(a):a[t])+"";r.has(e)||(r.add(e),n.push(e))}return n}function _(e,t,r,n){let a=ze({accessor:t,onChange:r,readData:n}),o=ze([]);a.current={accessor:t,onChange:r,readData:n};let l=Ge(()=>{let{accessor:t,onChange:r,readData:n}=a.current;if(!r||!t)return;let l=M(e.current?n(e.current):[],t);(function(e,t){if(e.length!==t.length)return!1;for(let r=0;e.length>r;r++)if(e[r]!==t[r])return!1;return!0})(l,o.current)||(o.current=l,r(l))},[e]);return $e(()=>{o.current=[],l()},[t,l,r]),l}function I(e,t){let r="function"==typeof e?e(t.datum??null,t):e;return(n=r)&&"object"==typeof n&&"string"==typeof n.id&&"function"==typeof n.cacheKey&&"function"==typeof n.drawCanvas&&"function"==typeof n.renderStaticSVG?r:void 0;var n}function S(e,t){if("u">typeof process&&"production"===process.env?.NODE_ENV)return;let r=`${e}:${t}`;Ne.has(r)||(Ne.add(r),console.warn(`[Semiotic] Render backend "${e}" does not support scene node "${t}"; using the built-in renderer.`))}function O(e){let{context:t,nodes:r,renderMode:n,pixelRatio:a,paintBuiltIn:o}=e;if(!n||"sketchy"===n)return void o(r);let l=[],i=()=>{l.length&&(o(l),l=[])};for(let e of r){let r,u=I(n,e);if(u){i(),t.save();try{r=u.drawCanvas({context:t,node:e,style:e.style??{},pixelRatio:a})}finally{t.restore()}r||(S(u.id,e.type??"unknown"),o([e]))}else l.push(e)}i()}function E(e){let{node:t,index:r,renderMode:n,fallback:a}=e,o=I(n,t);if(!o)return{element:a(),renderedByBackend:!1};let l=o.renderStaticSVG({node:t,style:t.style??{},key:`${o.id}-${r}`});return null!=l?{element:Me(l,t,`${o.id}-${r}-cursor`),renderedByBackend:!0}:(S(o.id,t.type??"unknown"),{element:a(),renderedByBackend:!1})}function D(e){return E(e).element}function R(e){let t=[];return e.nodes.forEach((r,n)=>{let a=E({node:r,index:n,renderMode:e.renderMode,fallback:()=>e.fallback(r,n)});null!=a.element&&!1!==a.element&&t.push({node:r,index:n,...a})}),t}function B(e){let t=new Map;for(let r of e){let e=r.group??"_default",n=t.get(e);n||(n=[],t.set(e,n)),n.push(r)}for(let e of t.values()){e.sort((e,t)=>e.x-t.x||e.y-t.y);for(let t=0;e.length>t;t++)e[t]._groupIndex=t}let r=Array.from(t.keys()).sort((e,r)=>{let n=t.get(e),a=t.get(r);return(n.length>0?n[0].y:0)-(a.length>0?a[0].y:0)}),n=Array.from(t.values()).flat();n.sort((e,t)=>e.x-t.x||e.y-t.y);let a=new Map;for(let e=0;n.length>e;e++){n[e]._flatIndex=e;let t=n[e].datum?.id;null!=t&&a.set(t+"",e)}return{flat:n,groups:r,byGroup:t,idToIdx:a}}function P(e,t){if(0===e.flat.length)return{flatIndex:-1,group:"_default",indexInGroup:-1};let r=Math.max(0,Math.min(t,e.flat.length-1)),n=e.flat[r];return{flatIndex:r,group:n.group??"_default",indexInGroup:n._groupIndex??0}}function L(e,t,r){let{group:n,indexInGroup:a}=t,o=r.byGroup.get(n);switch(e){case"ArrowRight":return o.length-1>a?o[a+1]._flatIndex:t.flatIndex;case"ArrowLeft":return a>0?o[a-1]._flatIndex:t.flatIndex;case"ArrowDown":{let e=r.groups.indexOf(n);return r.groups.length-1>e?j(r,r.groups[e+1],o[a]):t.flatIndex}case"ArrowUp":{let e=r.groups.indexOf(n);return e>0?j(r,r.groups[e-1],o[a]):t.flatIndex}case"PageDown":return Math.min(t.flatIndex+Math.max(1,Math.floor(.1*r.flat.length)),r.flat.length-1);case"PageUp":return Math.max(t.flatIndex-Math.max(1,Math.floor(.1*r.flat.length)),0);case"Home":return 0;case"End":return r.flat.length-1;case"Escape":return-1;default:return null}}function j(e,t,r){let n=e.byGroup.get(t),a=0,o=Math.abs(n[0].x-r.x);for(let e=1;n.length>e;e++){let t=Math.abs(n[e].x-r.x);o>t&&(o=t,a=e)}return n[a]._flatIndex}function C(e){let t=[];for(let r of e)switch(r.type){case"point":if(!1===r.interactive)break;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"});break;case"symbol":if(0>=r.size)break;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"});break;case"glyph":{if(0>=r.size||null==r.datum)break;let e=_e(r.glyph,r.size);t.push({x:r.x+e.centerDx,y:r.y+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight,group:"_default"});break}case"line":{let e=r,n=Array.isArray(e.datum)?e.datum:[],a=e.group??"_default";for(let r=0;e.path.length>r&&n.length>r;r++)t.push({x:e.path[r][0],y:e.path[r][1],datum:n[r],shape:"circle",group:a});break}case"area":{if(!1===r.interactive)break;let e=r,n=Array.isArray(e.datum)?e.datum:[],a=e.group??"_default";for(let r=0;e.topPath.length>r&&n.length>r;r++)t.push({x:e.topPath[r][0],y:e.topPath[r][1],datum:n[r],shape:"circle",group:a});break}case"rect":t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:r.group??"_default"});break;case"heatcell":t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:"_default"})}return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function T(e){let t=[];for(let r of e)if("rect"===r.type&&null!=r.x){if(null==r.datum)continue;t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:r.group??r.datum?.category??""})}else if("point"===r.type){if(!1===r.interactive)continue;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"})}else if("symbol"===r.type){if(0>=r.size)continue;t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle",group:"_default"})}else if("glyph"===r.type){if(0>=r.size||null==r.datum)continue;let e=_e(r.glyph,r.size);t.push({x:r.x+e.centerDx,y:r.y+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight,group:"_default"})}else if("wedge"===r.type&&null!=r.cx){if(null===r.datum)continue;let e=((r.startAngle||0)+(r.endAngle||0))/2,n=((r.innerRadius||0)+(r.outerRadius||50))/2;t.push({x:r.cx+Math.cos(e)*n,y:r.cy+Math.sin(e)*n,datum:r.datum,shape:"wedge",group:"_default"})}return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function G(e){let t=[];for(let r of e)if(r.datum)if("circle"===r.type&&null!=r.cx){if(0>=r.r)continue;t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"})}else if("rect"===r.type&&null!=r.x){if(0>=r.w||0>=r.h)continue;t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:r.datum.id??"_default"})}else if("arc"===r.type&&null!=r.cx)t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"});else if("symbol"===r.type&&null!=r.cx){if(0>=r.size)continue;t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"})}else if("glyph"===r.type&&null!=r.cx){if(0>=r.size)continue;let e=_e(r.glyph,r.size);t.push({x:r.cx+e.centerDx,y:r.cy+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight,group:r.datum.id??"_default"})}return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function $(e,t,r,n,a){let o=r.flat[t.flatIndex];if(!o)return L(e,t,r);let l=o.datum?.id;switch(e){case"ArrowRight":case"ArrowLeft":case"ArrowDown":case"ArrowUp":{let n=function(e,t,r){let n=null,a=1/0;for(let o=0;e.flat.length>o;o++){let l=e.flat[o];if(l===t)continue;let i=l.x-t.x,u=l.y-t.y,c=!1;switch(r){case"right":c=i>0&&Math.abs(i)>=Math.abs(u);break;case"left":c=0>i&&Math.abs(i)>=Math.abs(u);break;case"down":c=u>0&&Math.abs(u)>=Math.abs(i);break;case"up":c=0>u&&Math.abs(u)>=Math.abs(i)}if(!c)continue;let s=i*i+u*u;a>s&&(a=s,n=o)}return n}(r,o,"ArrowRight"===e?"right":"ArrowLeft"===e?"left":"ArrowDown"===e?"down":"up")??t.flatIndex;return n!==t.flatIndex&&(a.current=-1),n}case"Enter":{if(null==l)return t.flatIndex;let e=function(e,t){let r=e+"",n=[];for(let e of t){let t=e.datum??e,a=z(t.source),o=z(t.target),l=null!=a,i=null!=o;l&&a+""===r&&i?n.push(o+""):i&&o+""===r&&l&&n.push(a+"")}return n}(l,n);if(0===e.length)return t.flatIndex;let o=r.idToIdx.get(e[(a.current+1)%e.length])??-1;return 0>o?t.flatIndex:(a.current=-1,o)}default:{let n=L(e,t,r);return null!==n&&n!==t.flatIndex&&(a.current=-1),n}}}function z(e){return"object"==typeof e&&null!==e&&"id"in e?e.id:e}function N(e){let t=[];for(let r of e)if("point"===r.type&&null!=r.x&&!1!==r.interactive)t.push({x:r.x,y:r.y,datum:r.datum,shape:"circle"});else if("glyph"===r.type){if(0>=r.size||null==r.datum)continue;let e=_e(r.glyph,r.size);t.push({x:r.x+e.centerDx,y:r.y+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight})}else"geoarea"===r.type&&r.centroid&&!1!==r.interactive&&t.push({x:r.centroid[0],y:r.centroid[1],datum:r.datum,shape:"geoarea",pathData:r.pathData});return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function H(e,t,r){switch(e){case"ArrowRight":case"ArrowDown":return r-1>t?t+1:t;case"ArrowLeft":case"ArrowUp":return t>0?t-1:t;case"PageDown":return Math.min(t+Math.max(1,Math.floor(.1*r)),r-1);case"PageUp":return Math.max(t-Math.max(1,Math.floor(.1*r)),0);case"Home":return 0;case"End":return r-1;case"Escape":return-1;default:return null}}function W(e){return{data:e.datum||{},x:e.x,y:e.y,__semioticHoverData:!0}}function U(e,t,r,n,a,o){return function(e,t,r){let n=e.current;n.inside=!0,n.clientX=t.clientX,n.clientY=t.clientY,n.pointerType=t.pointerType??r}(e,t,o),!(!r&&!n||!r&&"touch"===e.current.pointerType&&(Ae(a),1))}function V(e){let{title:t,description:r,summary:n,accessibleTable:a,className:o,animate:l,maxDevicePixelRatio:i,axisExtent:u,autoPlaceAnnotations:c}=e,s={};return t&&(s.title=t),r&&(s.description=r),n&&(s.summary=n),void 0!==a&&(s.accessibleTable=a),o&&(s.className=o),null!=l&&(s.animate=l),void 0!==i&&(s.maxDevicePixelRatio=i),void 0!==u&&(s.axisExtent=u),void 0!==c&&(s.autoPlaceAnnotations=c),s}function F(e){let{linkedHover:t,selection:r,onObservation:n,onClick:a,hoverRadius:o,hoverHighlight:l,forceHoverBehavior:i,forceClickBehavior:u,mobileInteraction:c,customHoverBehavior:s,customClickBehavior:f,linkedHoverInClickPredicate:d=!0}=e,h={};n&&(h.annotationObservationCallback=n);let p=c?.enabled?Math.max(o??30,Math.ceil((c.targetSize||44)/2),24):o;return(i||t||n||a||l)&&(h.customHoverBehavior=s),f&&(u||(d?n||a||t:n||a)||c?.enabled&&(c.tapToSelect||c.tapToLockTooltip)&&(t||l||r))&&(h.customClickBehavior=f),null!=p&&(h.hoverRadius=p),h}function Y(e){let{tooltip:t,defaultTooltipContent:r}=e;return{tooltipContent:!1===t?()=>null:we(t)||r}}function q(e,t){if(!function(e){return void 0!==e.stroke||void 0!==e.strokeWidth||void 0!==e.opacity}(t))return e??((...e)=>({}));let r={};return void 0!==t.stroke&&(r.stroke=t.stroke),void 0!==t.strokeWidth&&(r.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(r.opacity=t.opacity),e?(...t)=>({...e(...t)||{},...r}):(...e)=>({...r})}function X(e,t,r){if(1>=r)return 1;let n=r-1;return ke({age:n-t,extent:n,type:e.type,halfLife:e.halfLife??r/2,threshold:e.stepThreshold??.5*r,minOpacity:e.minOpacity??.1})}function Z(e){let t=new Map;for(let r=0;e.length>r;r++)t.set(e[r],r);return t}function K(e,t,r,n=Z(r)){let a=r.length;if(a>1)for(let r of t){if("line"===r.type){let t=Array.isArray(r.datum)?r.datum:[];if(2>t.length)continue;let o=Array(t.length),l=!1;for(let r=0;t.length>r;r++){let i=n.get(t[r]);null!=i?(o[r]=X(e,i,a),1>o[r]&&(l=!0)):o[r]=1}l&&(r._decayOpacities=o);continue}if("area"===r.type){let t=Array.isArray(r.datum)?r.datum:[],o=r.topPath?r.topPath.length:t.length;if(2>o)continue;if(t.length===o){let l=Array(o),i=!1;for(let r=0;t.length>r;r++){let o=n.get(t[r]);null!=o?(l[r]=X(e,o,a),1>l[r]&&(i=!0)):l[r]=1}i&&(r._decayOpacities=l)}else{let l=1;for(let r of t){let t=n.get(r);if(null!=t){let r=X(e,t,a);l>r&&(l=r)}}if(1>l){let e=Array(o);e.fill(l),r._decayOpacities=e}}continue}let t=n.get(r.datum);if(null==t)continue;let o=X(e,t,a);"candlestick"===r.type?r._decayOpacity=o:r.style={...r.style,opacity:(r.style?.opacity??1)*o}}}function J(e){if("production"===process.env.NODE_ENV)return;let{label:t,nodes:r,overlays:n,warned:a}=e;Q(n)&&0===r.length&&ee(a,"overlay-only",`[semiotic] ${t} returned overlays but no data-bearing scene nodes. Overlays do not participate in hover, selection, transitions, SSR evidence, or accessibility tables. Emit at least one scene node with a datum, or mark the overlay-only chart as intentionally decorative.`),r.length>0&&r.every(e=>null==e.datum)&&ee(a,"null-datums",`[semiotic] ${t} returned scene nodes, but every scene-node datum is null. Hover, callbacks, selection, and tooltip helpers need data-bearing nodes. Attach a user-facing datum to each interactive node, or set interactive overlays outside the chart.`)}function Q(e){return null!=e&&!1!==e&&""!==e&&(!Array.isArray(e)||e.some(Q))}function ee(e,t,r){e.has(t)||(e.add(t),console.warn(r))}function te(e){try{return{kind:"success",result:e.run()}}catch(t){let r=e.hasPreviousResult,n=function(e,t,r,n){let a=function(e){if(e instanceof Error)return{name:e.name||"Error",message:e.message||"Custom layout threw."};if("string"==typeof e)return{name:"Error",message:e};if(null==e)return{name:"Error",message:"Custom layout threw a nullish value."};try{return{name:"Error",message:e+""}}catch{return{name:"Error",message:"Custom layout threw a non-stringifiable value."}}}(t),o="network"===e?"customNetworkLayout":"customLayout";return{code:"CUSTOM_LAYOUT_ERROR",severity:"error",phase:"layout",component:e,source:o,message:`Semiotic ${e} ${o} failed: ${a.message}`,error:a,recovery:r?"preserved-last-good-scene":"empty-scene",preservedLastGoodScene:r,affectedRevision:n}}(e.family,t,r,e.revision);"production"!==process.env.NODE_ENV&&console.error(`[semiotic] ${e.logLabel} threw:`,t);try{e.onLayoutError?.(n)}catch(e){"production"!==process.env.NODE_ENV&&console.error("[semiotic] onLayoutError threw:",e)}return{kind:"failure",diagnostic:n,preservedLastGoodScene:r}}}function re(){return this.updateResults.last}function ne(){return this.updateResults.last}function ae(e){return this.updateResults.subscribe(e)}function oe(e){this.config.layoutSelection=e}function le(){He.set(this,!0)}function ie(){let e=!0===He.get(this);return He.delete(this),e}function ue(e){Object.assign(e.prototype,{getLastUpdateResult:re,getUpdateSnapshot:ne,subscribeUpdateResult:ae,setLayoutSelection:oe,markStylePaintPending:le,consumeStylePaintPending:ie})}function ce(e,t,r,n,a,o){let l=a-r,i=o-n,u=l*l+i*i;if(0===u)return Math.sqrt((e-r)**2+(t-n)**2);let c=((e-r)*l+(t-n)*i)/u;return c=Math.max(0,Math.min(1,c)),Math.sqrt((e-(r+c*l))**2+(t-(n+c*i))**2)}function se(e,t,r){return r.x>e||e>r.x+r.w||r.y>t||t>r.y+r.h?{hit:!1,cx:0,cy:0}:{hit:!0,cx:r.x+r.w/2,cy:r.y+r.h/2}}function fe(e,t=30){return Math.max((e??4)+5,12,t)}function de(e){return e instanceof Date?e:"number"==typeof e&&e>1e9?new Date(e):null}function he(e,t){let r=de(e);if(!r)return!1;let n=de(t);return!n||r.getFullYear()!==n.getFullYear()||r.getMonth()!==n.getMonth()}function pe(e){let t=e%(2*Math.PI);return 0>t&&(t+=2*Math.PI),t}function ye(e,t,r,n,a,o=e=>e.x,l=e=>e.y,i=e=>e.r){let u=Math.max(n,a+5,12),c=t-u,s=t+u,f=r-u,d=r+u,h=null,p=1/0;return e.visit((e,a,u,y,g)=>{if(a>s||c>y||u>d||f>g)return!0;if(!e.length){let a=e;do{let e=a.data,u=o(e)-t,c=l(e)-r,s=Math.sqrt(u*u+c*c);fe(i(e),n)>=s&&p>s&&(h=e,p=s),a=a.next}while(a)}return!1}),h?{node:h,distance:p}:null}function ge(e,t){return"string"==typeof e&&e.length>0?e:t}function me(e,t,r){return"string"==typeof t&&t.length>0?t:"string"==typeof e&&e.length>0?`${e} (${r.familyPhrase})`:r.fallback}function xe(e){let t=(e+"").replace(/[^a-zA-Z0-9_-]/g,"_"),r=/^[A-Za-z_]/.test(t)?t:"c"+t,n=r+"-semiotic-title",a=r+"-semiotic-desc";return{titleId:n,descId:a,labelledBy:`${n} ${a}`}}import{bandFromAge as be,defaultTooltipStyle as ve,normalizeTooltip as we,opacityFromAge as ke,setCanvasMarkCursor as Ae,withSceneMarkCursor as Me}from"./c-ODG6TFSY.min.js";import{glyphHitGeometry as _e,resolveCSSColor as Ie}from"./c-MB6CV5NC.min.js";import{jsx as Se,jsxs as Oe}from"react/jsx-runtime";import*as Ee from"react";import{useEffect as De,useRef as Re}from"react";var Be={fresh:1,aging:.7,stale:.45,expired:.25},Pe={alpha:1,band:"fresh",isStale:!1};import{useEffect as Le,useRef as je}from"react";import{jsx as Ce}from"react/jsx-runtime";import{useRef as Te}from"react";import{useCallback as Ge,useEffect as $e,useRef as ze}from"react";var Ne=new Set,He=new WeakMap;export{X as computeDecayOpacity,Z as buildDatumIndexMap,K as applyDecay,J as warnCustomLayoutDiagnostics,te as runCustomLayoutAttempt,ue as attachUpdateResultStore,u as composeOverlays,c as useConfigSync,s as useLayoutSelectionSync,ce as pointToSegmentDistance,se as hitTestRect,fe as getHitRadius,he as isTimeLandmark,pe as normalizeAngle,ye as findHitPointInQuadtree,f as resolveStaleness,d as useStalenessCheck,h as StalenessBadge,e as filterAnnotationsByStatus,ge as overlayAccessibleTitle,me as overlayAccessibleDescription,xe as overlayAccessibleIds,p as shallowEqualTwoLevel,x as useStableShallow,v as resolveCanvasBackground,w as paintCanvasBackground,k as resolveFrameGraphics,A as resolveFrameLayers,M as extractCategoryDomain,_ as useLegendCategoryEmission,O as paintSceneWithBackend,D as renderSceneWithBackend,R as renderSceneListWithBackend,t as accessorName,r as formatVal,o as bandTooltipFields,l as buildDefaultTooltip,i as buildOrdinalTooltip,B as buildNavGraph,P as resolvePosition,L as nextGraphIndex,C as extractXYNavPoints,T as extractOrdinalNavPoints,G as extractNetworkNavPoints,$ as nextNetworkIndex,N as extractGeoNavPoints,H as nextIndex,W as navPointToHover,U as shouldHandleFramePointer,V as buildBaseMetadataProps,F as buildCustomBehaviorProps,Y as buildTooltipProps,q as mergeShapeStyle};
|
package/dist/c-SJMWU6UX.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){let{x:o,y:l,w:r,h:i}=t,{tl:a,tr:y,br:c,bl:s}=n(t);e.beginPath(),e.moveTo(o+a,l),e.lineTo(o+r-y,l),y>0&&e.arcTo(o+r,l,o+r,l+y,y),e.lineTo(o+r,l+i-c),c>0&&e.arcTo(o+r,l+i,o+r-c,l+i,c),e.lineTo(o+s,l+i),s>0&&e.arcTo(o,l+i,o,l+i-s,s),e.lineTo(o,l+a),a>0&&e.arcTo(o,l,o+a,l,a),e.closePath()}function t(e,t){let o=c(e,t.style.fill,y(e,"var(--semiotic-primary, #007bff)")),l=function(e){switch(e.roundedEdge){case"bottom":return{x0:e.x,y0:e.y+e.h,x1:e.x,y1:e.y};case"right":return{x0:e.x+e.w,y0:e.y,x1:e.x,y1:e.y};case"left":return{x0:e.x,y0:e.y,x1:e.x+e.w,y1:e.y};default:return{x0:e.x,y0:e.y,x1:e.x,y1:e.y+e.h}}}(t);return(t.fillGradient&&"string"==typeof o?i(e,t.fillGradient,o,l.x0,l.y0,l.x1,l.y1):null)||o}function o(e,t){if(!t.style.stroke||"none"===t.style.stroke)return!1;let o=t.style.strokeWidth??1;return o>0&&(e.strokeStyle=y(e,t.style.stroke)||t.style.stroke,e.lineWidth=o,!0)}function l(e,t){let o=t.style.icon,l=t.style.iconPadding||2,r=Math.min(t.w,t.h)-l;if(0>=r)return;let i=t.h>t.w;if(e.save(),e.beginPath(),e.rect(t.x,t.y,t.w,t.h),e.clip(),i){let i=r+l,n=t.x+(t.w-r)/2;for(let l=t.y+t.h-r;l>=t.y-r;l-=i)e.drawImage(o,n,l,r,r)}else{let i=r+l,n=t.y+(t.h-r)/2;for(let l=t.x;t.x+t.w>l;l+=i)e.drawImage(o,l,n,r,r)}e.restore()}import{renderRectPulse as r}from"./c-W4ZUKSEQ.min.js";import{buildLinearFillGradient as i,clampCornerRadii as n,hasAnyCornerRadius as a,resolveCSSColor as y,resolveCanvasFill as c}from"./c-MB6CV5NC.min.js";var s=(i,n,y,c)=>{let s=n.filter(e=>"rect"===e.type);for(let n of s){if(null!=n.style.opacity&&(i.globalAlpha=n.style.opacity),n.style.icon)l(i,n);else if(n.cornerRadii&&a(n.cornerRadii))i.fillStyle=t(i,n),e(i,n),i.fill(),o(i,n)&&i.stroke();else if(n.roundedTop&&n.roundedTop>0){i.fillStyle=t(i,n);let e=Math.min(n.roundedTop,n.w/2,n.h/2);i.beginPath();let{x:l,y:r,w:a,h:y}=n;switch(n.roundedEdge){case"right":i.moveTo(l,r),i.lineTo(l+a-e,r),i.arcTo(l+a,r,l+a,r+e,e),i.lineTo(l+a,r+y-e),i.arcTo(l+a,r+y,l+a-e,r+y,e),i.lineTo(l,r+y);break;case"left":i.moveTo(l+a,r),i.lineTo(l+e,r),i.arcTo(l,r,l,r+e,e),i.lineTo(l,r+y-e),i.arcTo(l,r+y,l+e,r+y,e),i.lineTo(l+a,r+y);break;case"bottom":i.moveTo(l,r),i.lineTo(l+a,r),i.lineTo(l+a,r+y-e),i.arcTo(l+a,r+y,l+a-e,r+y,e),i.lineTo(l+e,r+y),i.arcTo(l,r+y,l,r+y-e,e);break;default:i.moveTo(l,r+y),i.lineTo(l,r+e),i.arcTo(l,r,l+e,r,e),i.lineTo(l+a-e,r),i.arcTo(l+a,r,l+a,r+e,e),i.lineTo(l+a,r+y)}i.closePath(),i.fill(),o(i,n)&&i.stroke()}else i.fillStyle=t(i,n),i.fillRect(n.x,n.y,n.w,n.h),o(i,n)&&i.strokeRect(n.x,n.y,n.w,n.h);r(i,n),i.globalAlpha=1}};export{s as barCanvasRenderer};
|
package/dist/c-STIIGQOD.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function n(n){return 0!==n.fontfaces?.length}export{n as hasLoadedFontFaces};
|
package/dist/c-T2ASIJVZ.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t){let e=t.roles.occurrence;return"string"==typeof e?[e]:t.entityIds}function e(t,e={}){let o=e.templates??["repeated-state-episode"],n="ordinal"===t.spec.coordinate.kind?t.spec.coordinate.sectionIds:[],i=void 0!==e.partition?s(t,e.partition)??0:t.spec.comparison?t.comparison?.rows.reduce((t,e)=>t+e.assigned,0)??0:t.ledger.entries.find(e=>"global"===e.subjectKind&&e.measureId===t.spec.motifs.denominatorRef)?.value??0,r=o=>p(o,t.source.occurrences,e.partition??t.spec.comparison?.partitions),a=[],d=t.motifs.incompleteCandidates.length>0;for(let s of o)for(let o of n){let n=t.motifs.matches.filter(t=>t.template===s),p=r(n.filter(t=>t.completionSectionId===o)),u=r(n.filter(t=>t.intersectSectionIds.includes(o)));a.push({template:s,sectionId:o,partition:e.partition,completionCount:p,intersectionCount:u,denominator:i,status:d?"incomplete":"exact"})}return{templates:o,sections:n,cells:a}}function o(t){return t.entityCount??1}function n(t){if(!t.missingPrehistory)return{id:"group:"+t.id,occurrenceId:t.id,partition:t.partition,nodePath:t.nodePath,entityCount:o(t),...t.stepEntityCounts&&{stepEntityCounts:[...t.stepEntityCounts]},signature:u(t.nodePath,t.nodePath.length-1)}}function i(o){let i=o.prefixForest;if(!i)return{atlas:o,groups:[],signatureOrder:[],ribbons:[],capsules:[],profile:e(o),differences:[],prefixForest:{kind:"observed-prefix",rootIds:[],nodes:[],order:[]},sceneSeeds:{nodes:[],edges:[]}};let r=(o.source.occurrences??[]).map(n).filter(t=>!!t),s=new Map;for(let t of r){let e=i.order.indexOf(t.signature),o=s.get(t.signature),n=-1===e?i.order.length:e;(null==o||o>n)&&s.set(t.signature,n)}let d=[...new Set(r.map(t=>t.signature))].sort((t,e)=>{let o=(s.get(t)??0)-(s.get(e)??0);return 0!==o?o:t.localeCompare(e)}),p=[];for(let t of r)for(let e=0;t.nodePath.length-1>e;e++){let o=u(t.nodePath,e),n=u(t.nodePath,e+1);p.push({id:`ribbon:${t.id}:${e}`,groupId:t.id,partition:t.partition,fromPrefixId:o,toPrefixId:n,fromState:t.nodePath[e],toState:t.nodePath[e+1],entityCount:t.stepEntityCounts?.[e]??t.entityCount,...t.stepEntityCounts&&{toEntityCount:t.stepEntityCounts[e+1]}})}let l=function(e,o={}){let n=new Set(o.templates??["repeated-state-episode"]),i=e.filter(t=>n.has(t.template)).map(e=>({id:"capsule:"+e.id,matchId:e.id,template:e.template,entryState:"string"==typeof e.roles.state?e.roles.state:e.nodePath[0],exitState:e.nodePath[e.nodePath.length-1],entityCount:e.entityCount,occurrenceIds:t(e),selected:!1})).sort((t,e)=>e.entityCount!==t.entityCount?e.entityCount-t.entityCount:t.id.localeCompare(e.id)),r=new Set;for(let t of i)if(!t.occurrenceIds.some(t=>r.has(t))){t.selected=!0;for(let e of t.occurrenceIds)r.add(e)}return i}(o.motifs.matches),f=o.comparison??a(o),m=[];if(f&&f.partitions.length>=2){let t=f.rows[0],e=f.rows[1],o=Math.min(t.assigned,e.assigned)||t.assigned,n=t.motifUsers["repeated-state-episode"]??0,i=e.motifUsers["repeated-state-episode"]??0;m.push({motif:"repeated-state-episode",leftPartition:t.partition,rightPartition:e.partition,leftCount:n,rightCount:i,deltaCount:i-n,deltaBps:c(n,i,o),denominator:o}),m.push({motif:"purchases",leftPartition:t.partition,rightPartition:e.partition,leftCount:t.outcomes.purchases??0,rightCount:e.outcomes.purchases??0,deltaCount:(e.outcomes.purchases??0)-(t.outcomes.purchases??0),deltaBps:c(t.outcomes.purchases??0,e.outcomes.purchases??0,o),denominator:o})}let h={nodes:r.map(t=>({id:t.id,partition:t.partition,signature:t.signature})),edges:p.map(t=>({id:t.id,source:t.fromPrefixId,target:t.toPrefixId}))};return{atlas:o,groups:r,signatureOrder:d,ribbons:p,capsules:l,profile:e(o),differences:m,prefixForest:i,sceneSeeds:h}}function r(t,e){return t.groups.some(t=>d(t.nodePath,e))}import{assignedDenominator as s,buildComparison as a,containsRoute as d,countMotifEntities as p,prefixIdFor as u,signedDifferenceBps as c}from"./c-FHBVFCQB.min.js";export{e as buildMotifProfile,i as prepareMotifBraid,r as ribbonSupportsRoute};
|
package/dist/c-T2V7O2LO.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function n(n,e){return e?.length&&Object.defineProperty(n,i,{configurable:!0,enumerable:!1,value:e}),n}function e(n){return n?.[i]}function t(t){return t.parentLine?n({...t.parentLine,...t},e(t)):t}function r(e){return n({...e[0]},e.map(t))}function u(n){return!!n&&e(n)?.[0]===n}var i="__semioticSelectionData";export{n as attachSelectionProvenance,e as getSelectionProvenance,t as selectionDatumWithParent,r as seriesSelectionDatum,u as requestsSelectionProvenance};
|
package/dist/c-TKG2NP7G.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,e,r,n,i){let o=[];for(let u of t){let t=r(u),l=n(u),a=i?i(u):0;if(!Number.isFinite(t)||!Number.isFinite(l)||!Number.isFinite(a))continue;let s=e.x(t),f=e.y(l),g=i?e.y(a):0;!Number.isFinite(s)||!Number.isFinite(f)||!Number.isFinite(g)||o.push({x:s,y:f,bottom:g,raw:l,datum:u})}o.sort((t,e)=>t.x-e.x);let u=Array(o.length),l=i?Array(o.length):[],a=Array(o.length),s=Array(o.length);for(let t=0;o.length>t;t++){let e=o[t];u[t]=[e.x,e.y],i&&(l[t]=[e.x,e.bottom]),a[t]=e.raw,s[t]=e.datum}return{topPath:u,bottomPath:l,rawValues:a,datum:s}}function e(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 r(r,n,i,o){if(!r.scales)return null;let{topPath:u,bottomPath:a,datum:s}=t(n,r.scales,r.getX,o.getTop,o.getBottom);return 2>u.length?null:{type:"area",topPath:u,bottomPath:a,...r.config.curve&&"linear"!==r.config.curve&&{curve:r.config.curve},style:e(r,o,i,l(n)),datum:s,group:i,interactive:o.interactive}}function n(t){let e=[],r=[];if(!t)return{perSeries:e,aggregate:r};for(let n of t)n.perSeries?e.push(n):r.push(n);return{perSeries:e,aggregate:r}}function i(t,e,n){let i=[];for(let o of n){let n=r(t,e,"__ribbon_aggregate",o);n&&i.push(n)}return i}function o(t,e,n,i){let o=[];for(let u of i){let i=r(t,e,n,u);i&&o.push(i)}return o}function u(t,e){if(!t)return{};if(!e||0===e.length)return t;let r=[];for(let n of e){if("band"!==n.kind)continue;let 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}}import{seriesSelectionDatum as l}from"./c-T2V7O2LO.min.js";export{t as buildSeriesGeometry,n as partitionRibbons,i as buildAggregateRibbons,o as buildPerSeriesRibbons,u as enrichDatumWithBand};
|