@mechane-ai/elements 0.47.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/README.md +288 -5
  2. package/bin/mechane-elements-catalog.mjs +104 -12
  3. package/dist/ai.js +5 -5
  4. package/dist/article-yyNPg6VU.js +1904 -0
  5. package/dist/article.js +1 -0
  6. package/dist/catalog.json +1691 -163
  7. package/dist/{categorical-values-DdfGIowV.js → categorical-values-DCznViFp.js} +1 -1
  8. package/dist/{cells--Bd1fQFR.js → cells-CNZE4us2.js} +2 -2
  9. package/dist/charts/cartesian.js +1 -1
  10. package/dist/charts/cells.js +1 -1
  11. package/dist/charts/comparison.js +1 -1
  12. package/dist/charts/distribution.js +1 -1
  13. package/dist/charts/figure.js +12 -12
  14. package/dist/charts/graph.js +1 -1
  15. package/dist/charts/hierarchy.js +1 -1
  16. package/dist/charts/image.js +1 -1
  17. package/dist/charts/matrix.js +3 -2
  18. package/dist/charts/plot.js +6 -6
  19. package/dist/charts/relationship.js +1 -1
  20. package/dist/charts/text.js +1 -1
  21. package/dist/charts/timeline.js +1 -1
  22. package/dist/charts/trend.js +1 -1
  23. package/dist/charts.js +2 -2
  24. package/dist/clock-DSm5lkNE.js +16 -0
  25. package/dist/{code-block-DioAM2bZ.js → code-block-BZsY2sh3.js} +1 -1
  26. package/dist/collections.js +1 -1
  27. package/dist/content/code.js +1 -1
  28. package/dist/content/diff.js +3 -3
  29. package/dist/content/link.js +1 -1
  30. package/dist/content/markdown.js +2 -2
  31. package/dist/content/tree.js +1 -1
  32. package/dist/{content-link-NWuHp5rC.js → content-link-PnpcnTCx.js} +1 -1
  33. package/dist/content.js +1 -1
  34. package/dist/{dates-Cww8UR_n.js → dates-ckJdYF7t.js} +1 -1
  35. package/dist/describe-lesson-BmREzDpt.js +175 -0
  36. package/dist/{dumbbell-plot-B2ZTgQaI.js → dumbbell-plot-CMv9llfd.js} +9 -7
  37. package/dist/{embedding-map-CGM_k6lC.js → embedding-map-DC-lgzCq.js} +8 -8
  38. package/dist/feedback.js +1 -1
  39. package/dist/{figure-frame-wRkIEAwe.js → figure-frame-BjFzbl3m.js} +3 -3
  40. package/dist/forms/dates.js +1 -1
  41. package/dist/forms.js +3 -3
  42. package/dist/{image-grid-CVA4SOy_.js → image-grid-DHqtj_zs.js} +4 -4
  43. package/dist/index.js +1 -1
  44. package/dist/kits/evaluation.js +5 -5
  45. package/dist/kits/interpretability.js +320 -302
  46. package/dist/kits/operations.js +6 -6
  47. package/dist/kits/research.js +558 -0
  48. package/dist/kits/training.js +6 -6
  49. package/dist/layout.js +205 -110
  50. package/dist/lesson/agent.js +811 -0
  51. package/dist/lesson/spec.js +661 -0
  52. package/dist/lesson.js +5 -0
  53. package/dist/mdx.js +227 -0
  54. package/dist/navigation.js +2 -2
  55. package/dist/packages/charts/src/cartesian/index.d.ts +1 -1
  56. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +18 -0
  57. package/dist/packages/charts/src/chart-theme.d.ts +1 -1
  58. package/dist/packages/charts/src/matrix/index.d.ts +1 -0
  59. package/dist/packages/charts/src/plot/plot-marks.d.ts +7 -3
  60. package/dist/packages/charts/src/plot/plot-surface.d.ts +3 -1
  61. package/dist/packages/collections/src/index.d.ts +1 -1
  62. package/dist/packages/collections/src/metrics.d.ts +9 -1
  63. package/dist/packages/content/src/index.d.ts +2 -0
  64. package/dist/packages/content/src/text-match.d.ts +22 -0
  65. package/dist/packages/core/src/index.d.ts +1 -0
  66. package/dist/packages/core/src/surfaces.d.ts +12 -2
  67. package/dist/packages/forms/src/index.d.ts +2 -0
  68. package/dist/packages/forms/src/token-input.d.ts +24 -0
  69. package/dist/packages/kits/src/interpretability/index.d.ts +1 -1
  70. package/dist/packages/kits/src/interpretability/logit-lens.d.ts +10 -1
  71. package/dist/packages/kits/src/research/finding-card.d.ts +43 -0
  72. package/dist/packages/kits/src/research/index.d.ts +8 -0
  73. package/dist/packages/kits/src/research/milestone-path.d.ts +36 -0
  74. package/dist/packages/kits/src/research/specimen-diff.d.ts +41 -0
  75. package/dist/packages/kits/src/research/work-heartbeat.d.ts +34 -0
  76. package/dist/packages/layout/src/figure-grid.d.ts +8 -0
  77. package/dist/packages/layout/src/index.d.ts +4 -1
  78. package/dist/packages/layout/src/sidebar.d.ts +7 -0
  79. package/dist/packages/layout/src/workbench.d.ts +4 -1
  80. package/dist/packages/teaching/src/agent/index.d.ts +11 -0
  81. package/dist/packages/teaching/src/agent/learner-trace.d.ts +84 -0
  82. package/dist/packages/teaching/src/agent/lesson-bridge.d.ts +59 -0
  83. package/dist/packages/teaching/src/agent/lesson-tour.d.ts +63 -0
  84. package/dist/packages/teaching/src/agent/tutor-tools.d.ts +86 -0
  85. package/dist/packages/teaching/src/article/article-checks.d.ts +9 -0
  86. package/dist/packages/teaching/src/article/article-context.d.ts +49 -0
  87. package/dist/packages/teaching/src/article/article-error.d.ts +12 -0
  88. package/dist/packages/teaching/src/article/article-labels.d.ts +54 -0
  89. package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +14 -0
  90. package/dist/packages/teaching/src/article/article-outline.d.ts +9 -0
  91. package/dist/packages/teaching/src/article/article.d.ts +42 -0
  92. package/dist/packages/teaching/src/article/beat-steps.d.ts +18 -0
  93. package/dist/packages/teaching/src/article/beat.d.ts +16 -0
  94. package/dist/packages/teaching/src/article/challenge.d.ts +29 -0
  95. package/dist/packages/teaching/src/article/exercise-styles.d.ts +76 -0
  96. package/dist/packages/teaching/src/article/figure.d.ts +51 -0
  97. package/dist/packages/teaching/src/article/index.d.ts +31 -0
  98. package/dist/packages/teaching/src/article/lesson-values.d.ts +5 -0
  99. package/dist/packages/teaching/src/article/notes.d.ts +36 -0
  100. package/dist/packages/teaching/src/article/outline-types.d.ts +73 -0
  101. package/dist/packages/teaching/src/article/predict.d.ts +58 -0
  102. package/dist/packages/teaching/src/article/progress-store.d.ts +64 -0
  103. package/dist/packages/teaching/src/article/scrolly.d.ts +26 -0
  104. package/dist/packages/{kits/src/explainers → teaching/src/article}/term.d.ts +8 -2
  105. package/dist/packages/teaching/src/article/tex.d.ts +12 -0
  106. package/dist/packages/teaching/src/article/view-essay.d.ts +13 -0
  107. package/dist/packages/teaching/src/article/view-present.d.ts +8 -0
  108. package/dist/packages/teaching/src/article/view-sheet.d.ts +7 -0
  109. package/dist/packages/teaching/src/article/view-static.d.ts +7 -0
  110. package/dist/packages/teaching/src/article/walk.d.ts +34 -0
  111. package/dist/packages/teaching/src/lesson/define-lesson.d.ts +136 -0
  112. package/dist/packages/teaching/src/lesson/index.d.ts +24 -0
  113. package/dist/packages/teaching/src/lesson/inline-choice.d.ts +12 -0
  114. package/dist/packages/teaching/src/lesson/lesson-context.d.ts +18 -0
  115. package/dist/packages/teaching/src/lesson/lesson-error.d.ts +12 -0
  116. package/dist/packages/teaching/src/lesson/lesson-locale.d.ts +4 -0
  117. package/dist/packages/teaching/src/lesson/lesson-persistence.d.ts +17 -0
  118. package/dist/packages/teaching/src/lesson/lesson-player.d.ts +51 -0
  119. package/dist/packages/teaching/src/lesson/lesson-store.d.ts +84 -0
  120. package/dist/packages/teaching/src/lesson/lesson.d.ts +39 -0
  121. package/dist/packages/teaching/src/lesson/param-controls.d.ts +14 -0
  122. package/dist/packages/teaching/src/lesson/param.d.ts +34 -0
  123. package/dist/packages/teaching/src/lesson/playback.d.ts +42 -0
  124. package/dist/packages/teaching/src/lesson/transport.d.ts +19 -0
  125. package/dist/packages/teaching/src/lesson/use-lesson.d.ts +36 -0
  126. package/dist/packages/teaching/src/mdx/essay-components.d.ts +79 -0
  127. package/dist/packages/teaching/src/mdx/essay-markdown.d.ts +41 -0
  128. package/dist/packages/teaching/src/mdx/essay.d.ts +32 -0
  129. package/dist/packages/teaching/src/mdx/index.d.ts +9 -0
  130. package/dist/packages/teaching/src/mdx/requested-view.d.ts +6 -0
  131. package/dist/packages/teaching/src/scene/flow/flow-layout.d.ts +38 -0
  132. package/dist/packages/teaching/src/scene/flow/flow-pulse.d.ts +16 -0
  133. package/dist/packages/teaching/src/scene/flow/scene-flow.d.ts +81 -0
  134. package/dist/packages/teaching/src/scene/index.d.ts +77 -0
  135. package/dist/packages/teaching/src/scene/morph/morph-scope.d.ts +28 -0
  136. package/dist/packages/teaching/src/scene/plane/plane-hit.d.ts +22 -0
  137. package/dist/packages/teaching/src/scene/plane/plane-label.d.ts +23 -0
  138. package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +42 -0
  139. package/dist/packages/teaching/src/scene/plane/plane-math.d.ts +45 -0
  140. package/dist/packages/teaching/src/scene/plane/scene-axes.d.ts +30 -0
  141. package/dist/packages/teaching/src/scene/plane/scene-curve.d.ts +42 -0
  142. package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +59 -0
  143. package/dist/packages/teaching/src/scene/plane/scene-projection.d.ts +27 -0
  144. package/dist/packages/teaching/src/scene/plane/scene-region.d.ts +38 -0
  145. package/dist/packages/teaching/src/scene/plane/scene-rule.d.ts +35 -0
  146. package/dist/packages/teaching/src/scene/plane/scene-vector.d.ts +39 -0
  147. package/dist/packages/teaching/src/scene/scene-bracket.d.ts +24 -0
  148. package/dist/packages/teaching/src/scene/scene-callout.d.ts +26 -0
  149. package/dist/packages/teaching/src/scene/scene-context.d.ts +179 -0
  150. package/dist/packages/teaching/src/scene/scene-custom.d.ts +31 -0
  151. package/dist/packages/teaching/src/scene/scene-geometry.d.ts +181 -0
  152. package/dist/packages/teaching/src/scene/scene-group.d.ts +28 -0
  153. package/dist/packages/teaching/src/scene/scene-highlight.d.ts +19 -0
  154. package/dist/packages/teaching/src/scene/scene-layer.d.ts +16 -0
  155. package/dist/packages/teaching/src/scene/scene-node.d.ts +67 -0
  156. package/dist/packages/teaching/src/scene/scene-obstacles.d.ts +27 -0
  157. package/dist/packages/teaching/src/scene/scene-registry.d.ts +79 -0
  158. package/dist/packages/teaching/src/scene/scene-stagger.d.ts +43 -0
  159. package/dist/packages/teaching/src/scene/scene-style.d.ts +14 -0
  160. package/dist/packages/teaching/src/scene/scene-validate.d.ts +65 -0
  161. package/dist/packages/teaching/src/scene/scene-wire.d.ts +45 -0
  162. package/dist/packages/teaching/src/scene/scene.d.ts +36 -0
  163. package/dist/packages/teaching/src/scene/shapes/cell-color.d.ts +11 -0
  164. package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +69 -0
  165. package/dist/packages/teaching/src/scene/shapes/scene-card.d.ts +114 -0
  166. package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +84 -0
  167. package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +37 -0
  168. package/dist/packages/teaching/src/scene/shapes/scene-stack.d.ts +46 -0
  169. package/dist/packages/teaching/src/scene/shapes/scene-token.d.ts +63 -0
  170. package/dist/packages/teaching/src/scene/shapes/scene-tokens.d.ts +40 -0
  171. package/dist/packages/teaching/src/scene/shapes/stack-book.d.ts +35 -0
  172. package/dist/packages/teaching/src/scene/shapes/stack-layout.d.ts +63 -0
  173. package/dist/packages/teaching/src/scene/shapes/token-layout.d.ts +39 -0
  174. package/dist/packages/teaching/src/spec/advice.d.ts +23 -0
  175. package/dist/packages/teaching/src/spec/chart-names.d.ts +2 -0
  176. package/dist/packages/teaching/src/spec/describe-lesson.d.ts +85 -0
  177. package/dist/packages/teaching/src/spec/explainer-guide.d.ts +21 -0
  178. package/dist/packages/teaching/src/spec/findings.d.ts +39 -0
  179. package/dist/packages/teaching/src/spec/index.d.ts +14 -0
  180. package/dist/packages/teaching/src/spec/lesson-plan.d.ts +43 -0
  181. package/dist/packages/teaching/src/spec/validate-plan.d.ts +11 -0
  182. package/dist/packages/teaching/src/time/clock.d.ts +7 -0
  183. package/dist/packages/teaching/src/time/tween.d.ts +19 -0
  184. package/dist/packages/teaching/src/time/use-tween.d.ts +6 -0
  185. package/dist/param-BE3VMSkH.js +450 -0
  186. package/dist/{pierre-diff-DlvjyuJn.js → pierre-diff-aGyQK5xK.js} +1 -1
  187. package/dist/{plot-axes-DJkLW4wk.js → plot-axes-D5S9BnBa.js} +1 -1
  188. package/dist/{plot-layout-BEuoOHbs.js → plot-layout-Bqe4-0qZ.js} +4 -3
  189. package/dist/{plot-marks-A64v7aTw.js → plot-marks-FVsbFkUs.js} +18 -15
  190. package/dist/{plot-surface-CJTIqtck.js → plot-surface-DON6WUmk.js} +11 -11
  191. package/dist/{plot-width-DcqtSgzb.js → plot-width-D3hTycYX.js} +1 -1
  192. package/dist/{reference-lines-CWA8VeUR.js → reference-lines-hjuD1rRZ.js} +2 -2
  193. package/dist/scene-BP0Ue0R5.js +4938 -0
  194. package/dist/scene.js +1 -0
  195. package/dist/{slope-chart-DT22h_ym.js → slope-chart-C8eeSgL4.js} +7 -7
  196. package/dist/{src-CpdJlDhO.js → src-9EJskqB_.js} +73 -31
  197. package/dist/{src-D5NXRJZe.js → src-B2rgpWap.js} +48 -14
  198. package/dist/{src-BPTDJqt0.js → src-Ci8DeY8J.js} +1 -1
  199. package/dist/{src-CGc_hjxJ.js → src-DFW49IAs.js} +143 -111
  200. package/dist/{src-1EHkSFS-.js → src-Dxs3Buo_.js} +205 -139
  201. package/dist/{src-CExIrXPC.js → src-npqwq3Sa.js} +1 -1
  202. package/dist/styles2.css +542 -21
  203. package/dist/{time-series-IB3CB93O.js → time-series-BL933QyA.js} +787 -715
  204. package/dist/{token-heatmap-C00DnoNO.js → token-heatmap-BB65awva.js} +4 -4
  205. package/dist/{token-predictions-Cxx29iDr.js → token-predictions-Pa8eUGan.js} +6 -6
  206. package/dist/transport-DzyxVXbL.js +715 -0
  207. package/dist/{tree-diagram-DsckNKaW.js → tree-diagram-DJhKBiia.js} +6 -6
  208. package/dist/{treemap-9_DpLCW9.js → treemap-CxxgABUg.js} +5 -5
  209. package/dist/use-tween-5HZ55_9d.js +72 -0
  210. package/dist/{violin-plot-BhPHKXsN.js → violin-plot-CoAEF_7Z.js} +7 -6
  211. package/dist/{waterfall-CGksuTy5.js → waterfall-DdoEXEkT.js} +7 -7
  212. package/package.json +30 -5
  213. package/recipes/counting-cards.tsx +656 -0
  214. package/recipes/explorable-essay.tsx +172 -0
  215. package/skills/extend-elements/SKILL.md +21 -0
  216. package/skills/plan-lesson/SKILL.md +86 -0
  217. package/skills/plan-lesson/references/plan-format.md +114 -0
  218. package/skills/plan-lesson/references/worked-plan.md +171 -0
  219. package/skills/review-elements/SKILL.md +4 -2
  220. package/skills/review-explainer/SKILL.md +97 -0
  221. package/skills/upgrade-elements/references/releases.md +65 -0
  222. package/skills/use-elements/SKILL.md +18 -16
  223. package/skills/use-elements/references/kits.md +9 -26
  224. package/skills/use-elements/references/teaching.md +36 -0
  225. package/skills/write-explainer/SKILL.md +112 -0
  226. package/skills/write-explainer/references/article.md +164 -0
  227. package/skills/write-explainer/references/lesson.md +148 -0
  228. package/skills/write-explainer/references/mdx.md +78 -0
  229. package/skills/write-explainer/references/scene-parts.md +273 -0
  230. package/skills/write-explainer/references/scene.md +168 -0
  231. package/skills/write-explainer/references/tutor.md +104 -0
  232. package/skills/write-explainer/references/worked-essay.md +459 -0
  233. package/templates/essay/AGENTS.md +14 -0
  234. package/templates/essay/README.md +59 -0
  235. package/templates/essay/index.html +17 -0
  236. package/templates/essay/package.template.json +21 -0
  237. package/templates/essay/plan.json +96 -0
  238. package/templates/essay/src/essay.mdx +97 -0
  239. package/templates/essay/src/figures.tsx +92 -0
  240. package/templates/essay/src/lesson.ts +83 -0
  241. package/templates/essay/src/main.tsx +53 -0
  242. package/templates/essay/src/mdx.d.ts +7 -0
  243. package/templates/essay/tsconfig.template.json +15 -0
  244. package/templates/essay/vite.config.template.txt +8 -0
  245. package/dist/kits/explainers.js +0 -452
  246. package/dist/packages/kits/src/explainers/figures.d.ts +0 -31
  247. package/dist/packages/kits/src/explainers/index.d.ts +0 -8
  248. package/dist/packages/kits/src/explainers/story-steps.d.ts +0 -46
  249. /package/dist/packages/{kits/src/explainers → teaching/src/article}/linked-target.d.ts +0 -0
  250. /package/dist/packages/{kits/src/explainers → teaching/src/lesson}/bound-value.d.ts +0 -0
@@ -1,28 +1,29 @@
1
- import { k as e } from "./src-CpdJlDhO.js";
2
- import { g as t } from "./src-1EHkSFS-.js";
3
- import { d as n, u as r } from "./src-CExIrXPC.js";
1
+ import { k as e } from "./src-9EJskqB_.js";
2
+ import { x as t } from "./src-Dxs3Buo_.js";
3
+ import { d as n, u as r } from "./src-npqwq3Sa.js";
4
4
  import { n as i, t as a } from "./chart-tones-ei3BC2AL.js";
5
- import { A as o, O as s, S as c, T as l, a as u, b as d, c as f, i as p, k as m, m as h, n as g, o as _, p as v, w as ee } from "./plot-layout-BEuoOHbs.js";
6
- import { i as y, n as b, r as x, t as S } from "./categorical-values-DdfGIowV.js";
7
- import { a as C } from "./tone-scope-DKiSw-JR.js";
8
- import { n as w, r as te, t as T } from "./figure-format-B8kRZMlo.js";
5
+ import { A as o, O as s, S as c, T as l, a as u, b as d, c as f, i as p, k as m, m as h, n as g, o as _, p as v, w as ee } from "./plot-layout-Bqe4-0qZ.js";
6
+ import { i as y, n as b, r as x, t as S } from "./categorical-values-DCznViFp.js";
7
+ import { i as C } from "./chart-link-AE_xuxiP.js";
8
+ import { a as te } from "./tone-scope-DKiSw-JR.js";
9
+ import { n as w, r as ne, t as T } from "./figure-format-B8kRZMlo.js";
9
10
  import { a as E, i as D, o as O, r as k, t as A } from "./scale-C2xgZyZN.js";
10
- import { t as ne } from "./chart-cursor-1mFd48Jc.js";
11
- import { c as re, i as ie, l as ae, n as j, o as M, r as oe, s as N, t as se } from "./figure-frame-wRkIEAwe.js";
12
- import { n as P, t as F } from "./plot-width-DcqtSgzb.js";
13
- import { t as ce } from "./plot-axes-DJkLW4wk.js";
14
- import { a as I, c as L, d as R, f as le, i as z, l as ue, n as B, o as de, r as V, s as fe, t as pe } from "./plot-marks-A64v7aTw.js";
15
- import { n as me, r as he, t as ge } from "./plot-surface-CJTIqtck.js";
16
- import { n as _e, t as ve } from "./reference-lines-CWA8VeUR.js";
17
- import { n as ye, r as be, t as xe } from "./path-BglsXpnO.js";
18
- import { t as Se } from "./locate-Bcg3QcP4.js";
11
+ import { t as re } from "./chart-cursor-1mFd48Jc.js";
12
+ import { c as ie, i as ae, l as oe, n as j, o as se, r as ce, s as M, t as le } from "./figure-frame-BjFzbl3m.js";
13
+ import { n as N, t as P } from "./plot-width-D3hTycYX.js";
14
+ import { t as ue } from "./plot-axes-D5S9BnBa.js";
15
+ import { a as de, c as F, d as I, f as fe, i as L, l as pe, n as R, o as z, r as me, s as B, t as he } from "./plot-marks-FVsbFkUs.js";
16
+ import { n as ge, r as _e, t as ve } from "./plot-surface-DON6WUmk.js";
17
+ import { n as ye, t as be } from "./reference-lines-hjuD1rRZ.js";
18
+ import { n as xe, r as Se, t as Ce } from "./path-BglsXpnO.js";
19
+ import { t as V } from "./locate-Bcg3QcP4.js";
19
20
  import * as H from "@stylexjs/stylex";
20
- import { createParts as U } from "@ui-sdk/react/primitive";
21
- import { useEffect as Ce, useId as W, useRef as we, useState as G } from "react";
22
- import { bindDrag as K, createChange as q, createSpans as Te, definePrimitive as Ee, dispatch as De } from "@ui-sdk/core";
23
- import { Fragment as Oe, jsx as J, jsxs as Y } from "react/jsx-runtime";
21
+ import { createParts as we } from "@ui-sdk/react/primitive";
22
+ import { useEffect as Te, useId as U, useRef as W, useState as G } from "react";
23
+ import { bindDrag as K, createChange as Ee, createSpans as De, definePrimitive as Oe, dispatch as ke } from "@ui-sdk/core";
24
+ import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
24
25
  // packages/charts/src/cartesian/bar-data.ts
25
- function ke({ composition: e, series: t, categoryIds: n, domain: r }) {
26
+ function X({ composition: e, series: t, categoryIds: n, domain: r }) {
26
27
  if (e === void 0) return;
27
28
  if (e.buckets.length !== n.length) return "Composition requires one explicit bucket per category.";
28
29
  let i = e.annotation;
@@ -39,26 +40,26 @@ function ke({ composition: e, series: t, categoryIds: n, domain: r }) {
39
40
  }
40
41
  }
41
42
  }
42
- var X = 6;
43
- function Z(e, t) {
43
+ var Z = 6;
44
+ function Q(e, t) {
44
45
  return e === null ? !0 : e === void 0 || !Number.isFinite(e) ? !1 : e >= t[0] && e <= t[1];
45
46
  }
46
- function Q({ marker: e, categoryCount: t, domain: n }) {
47
+ function Ae({ marker: e, categoryCount: t, domain: n }) {
47
48
  let r = e.kind === "tick" ? [e.values] : [e.lower, e.upper];
48
49
  if (r.some((e) => e.length !== t)) return "Every bar marker requires one explicit value per category.";
49
- if (r.some((e) => e.some((e) => !Z(e, n)))) return "Bar marker values must be finite and within the supplied domain.";
50
+ if (r.some((e) => e.some((e) => !Q(e, n)))) return "Bar marker values must be finite and within the supplied domain.";
50
51
  if (e.kind === "range") for (let [t, n] of e.lower.entries()) {
51
52
  let r = e.upper[t] ?? null;
52
53
  if (n === null != (r === null) || n !== null && r !== null && n > r) return "A range marker needs both bounds, with the lower bound at most the upper bound, or neither.";
53
54
  }
54
55
  }
55
- function Ae({ markers: e, annotations: t, emphasizedCategoryIds: n, seriesIds: r, categoryIds: i, domain: a }) {
56
- if (e.length > X) return `Supply at most ${X} bar markers.`;
56
+ function je({ markers: e, annotations: t, emphasizedCategoryIds: n, seriesIds: r, categoryIds: i, domain: a }) {
57
+ if (e.length > Z) return `Supply at most ${Z} bar markers.`;
57
58
  let o = [...e, ...t];
58
59
  if (new Set(o.map((e) => e.id)).size !== o.length || r.some((e) => o.some((t) => t.id === e))) return "Bar series, markers, and annotations require distinct identifiers.";
59
60
  for (let t of e) {
60
61
  if (!r.includes(t.seriesId)) return "Each bar marker must refer to a supplied series.";
61
- let e = Q({
62
+ let e = Ae({
62
63
  marker: t,
63
64
  categoryCount: i.length,
64
65
  domain: a
@@ -72,25 +73,25 @@ function Ae({ markers: e, annotations: t, emphasizedCategoryIds: n, seriesIds: r
72
73
  if (new Set(t.map((e) => JSON.stringify([e.categoryId, e.seriesId ?? null]))).size !== t.length) return "Each bar can hold one annotation.";
73
74
  if (new Set(n).size !== n.length || n.some((e) => !i.includes(e))) return "Emphasized categories must be unique supplied categories.";
74
75
  }
75
- function je({ marker: e, index: t, valueText: n }) {
76
+ function Me({ marker: e, index: t, valueText: n }) {
76
77
  if (e.kind === "tick") return n(e.values[t] ?? null);
77
78
  let r = e.lower[t] ?? null, i = e.upper[t] ?? null;
78
79
  return r === null || i === null ? n(null) : `${n(r)} – ${n(i)}`;
79
80
  }
80
- function Me(e, t) {
81
+ function Ne(e, t) {
81
82
  return e.kind === "tick" ? e.values[t] ?? null : e.upper[t] ?? null;
82
83
  }
83
84
  // packages/charts/src/cartesian/value-labels.ts
84
- var Ne = 6.5, Pe = 14, Fe = 6, Ie = .5;
85
- function Le(e, t) {
86
- let n = (e.text.length + t.text.length) * Ne * Ie + Fe;
87
- return Math.abs(e.x - t.x) < n && Math.abs(e.y - t.y) < Pe;
85
+ var Pe = 6.5, Fe = 14, Ie = 6, Le = .5;
86
+ function Re(e, t) {
87
+ let n = (e.text.length + t.text.length) * Pe * Le + Ie;
88
+ return Math.abs(e.x - t.x) < n && Math.abs(e.y - t.y) < Fe;
88
89
  }
89
- function Re(e) {
90
- return e.filter((t, n) => e.slice(0, n).every((e) => !Le(t, e)));
90
+ function ze(e) {
91
+ return e.filter((t, n) => e.slice(0, n).every((e) => !Re(t, e)));
91
92
  }
92
- function ze({ x: e, text: t, left: n, right: r }) {
93
- let i = t.length * Ne * Ie;
93
+ function Be({ x: e, text: t, left: n, right: r }) {
94
+ let i = t.length * Pe * Le;
94
95
  return e - i < n ? {
95
96
  x: n,
96
97
  anchor: "start"
@@ -103,16 +104,16 @@ function ze({ x: e, text: t, left: n, right: r }) {
103
104
  };
104
105
  }
105
106
  // packages/charts/src/cartesian/bar-overlays.tsx
106
- var Be = 3, Ve = 14, He = .6, Ue = .5;
107
- function We({ marker: e, index: t, span: n, base: r, y: i }) {
108
- let a = n.x + n.width * Ue;
107
+ var Ve = 3, He = 14, Ue = .6, We = .5;
108
+ function Ge({ marker: e, index: t, span: n, base: r, y: i }) {
109
+ let a = n.x + n.width * We;
109
110
  if (e.kind === "tick") {
110
111
  let o = e.values[t] ?? null;
111
112
  if (o === null) return [];
112
113
  let s = {
113
114
  key: "tick",
114
- x1: n.x - Be,
115
- x2: n.x + n.width + Be,
115
+ x1: n.x - Ve,
116
+ x2: n.x + n.width + Ve,
116
117
  y1: i(o),
117
118
  y2: i(o)
118
119
  };
@@ -126,7 +127,7 @@ function We({ marker: e, index: t, span: n, base: r, y: i }) {
126
127
  }
127
128
  let o = e.lower[t] ?? null, s = e.upper[t] ?? null;
128
129
  if (o === null || s === null) return [];
129
- let c = Math.min(Ve, n.width * He) * Ue;
130
+ let c = Math.min(He, n.width * Ue) * We;
130
131
  return [
131
132
  {
132
133
  key: "whisker",
@@ -151,9 +152,9 @@ function We({ marker: e, index: t, span: n, base: r, y: i }) {
151
152
  }
152
153
  ];
153
154
  }
154
- function Ge({ markers: e, categoryIds: t, span: n, barTop: r, y: i, isReceded: a }) {
155
+ function Ke({ markers: e, categoryIds: t, span: n, barTop: r, y: i, isReceded: a }) {
155
156
  return /* @__PURE__ */ J("g", { children: e.map((e) => /* @__PURE__ */ J("g", { children: t.map((t, o) => {
156
- let s = We({
157
+ let s = Ge({
157
158
  marker: e,
158
159
  index: o,
159
160
  span: n(t, e.seriesId),
@@ -161,27 +162,27 @@ function Ge({ markers: e, categoryIds: t, span: n, barTop: r, y: i, isReceded: a
161
162
  y: i
162
163
  });
163
164
  return /* @__PURE__ */ J("g", {
164
- ...H.props(P.emphasis, a(t) && P.receded),
165
- children: s.map(({ key: t, ...n }) => /* @__PURE__ */ J(fe, {
165
+ ...H.props(N.emphasis, a(t) && N.receded),
166
+ children: s.map(({ key: t, ...n }) => /* @__PURE__ */ J(B, {
166
167
  ...n,
167
168
  tone: e.tone ?? "neutral"
168
169
  }, t))
169
170
  }, t);
170
171
  }) }, e.id)) });
171
172
  }
172
- function Ke({ annotations: e, left: t, right: n }) {
173
+ function qe({ annotations: e, left: t, right: n }) {
173
174
  return /* @__PURE__ */ J("g", {
174
175
  "aria-hidden": !0,
175
- children: Re(e).map((e) => {
176
- let r = ze({
176
+ children: ze(e).map((e) => {
177
+ let r = Be({
177
178
  x: e.x,
178
179
  text: e.text,
179
180
  left: t,
180
181
  right: n
181
182
  });
182
183
  return /* @__PURE__ */ J("g", {
183
- ...H.props(P.emphasis, e.isReceded && P.receded),
184
- children: /* @__PURE__ */ J(L, {
184
+ ...H.props(N.emphasis, e.isReceded && N.receded),
185
+ children: /* @__PURE__ */ J(F, {
185
186
  x: r.x,
186
187
  y: e.y,
187
188
  anchor: r.anchor,
@@ -192,7 +193,7 @@ function Ke({ annotations: e, left: t, right: n }) {
192
193
  });
193
194
  }
194
195
  // packages/charts/src/cartesian/composition-bars.tsx
195
- var qe = {
196
+ var Je = {
196
197
  mark: {
197
198
  k3nNDw: "x1hj3fc7",
198
199
  k1ekBW: "xwcsmn1",
@@ -208,17 +209,17 @@ var qe = {
208
209
  "--x-transform": e ?? void 0,
209
210
  "--x-opacity": t ?? void 0
210
211
  }]
211
- }, Je = .18, Ye = .3;
212
- function Xe({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a, y: o, isSelected: s, isInspected: c, highlighted: l, toneOf: u }) {
212
+ }, Ye = .18, Xe = .3;
213
+ function Ze({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a, y: o, isSelected: s, isInspected: c, highlighted: l, toneOf: u }) {
213
214
  let d = n !== void 0, f = n !== void 0 && !t.some((e) => e.id === n.id) ? [...t, n] : t;
214
215
  function p(e, t) {
215
216
  let n = o(t), r = o(t + e);
216
- return `translateY(${Math.min(n, r)}px) scaleY(${Math.max(+(e === 0), Math.abs(r - n))})`;
217
+ return `translateY(${Math.min(n, r)}px) scaleY(${Math.max(+(e === 0 && t === 0), Math.abs(r - n))})`;
217
218
  }
218
- let m = d ? Je : +(e.kind === "total");
219
- return /* @__PURE__ */ Y(Oe, { children: [e.kind !== "gap" && /* @__PURE__ */ J("g", {
220
- ...H.props(qe.mark, qe.geometry(p(e.total, 0), m)),
221
- children: /* @__PURE__ */ J(V, {
219
+ let m = d ? Ye : +(e.kind === "total");
220
+ return /* @__PURE__ */ Y(q, { children: [e.kind !== "gap" && /* @__PURE__ */ J("g", {
221
+ ...H.props(Je.mark, Je.geometry(p(e.total, 0), m)),
222
+ children: /* @__PURE__ */ J(me, {
222
223
  x: i,
223
224
  y: 0,
224
225
  width: a,
@@ -230,10 +231,10 @@ function Xe({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a,
230
231
  }), f.map((o, f) => {
231
232
  let m = o.values[r];
232
233
  if (m == null) return null;
233
- let h = d ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0), g = d ? n.id === o.id : e.kind === "parts", _ = l != null && l !== o.id, v = g ? !d && _ ? Ye : 1 : 0;
234
+ let h = d ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0), g = d ? n.id === o.id : e.kind === "parts", _ = l != null && l !== o.id, v = g ? !d && _ ? Xe : 1 : 0;
234
235
  return /* @__PURE__ */ J("g", {
235
- ...H.props(qe.mark, qe.geometry(p(m, h), v)),
236
- children: /* @__PURE__ */ J(V, {
236
+ ...H.props(Je.mark, Je.geometry(p(m, h), v)),
237
+ children: /* @__PURE__ */ J(me, {
237
238
  x: i,
238
239
  y: 0,
239
240
  width: a,
@@ -246,16 +247,16 @@ function Xe({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a,
246
247
  })] });
247
248
  }
248
249
  // packages/charts/src/cartesian/bar-chart.tsx
249
- var Ze = { placeholder: {
250
+ var Qe = { placeholder: {
250
251
  kqGvvJ: "x1we84gm",
251
252
  $$css: !0
252
- } }, Qe = 18, $e = 8, et = 14, tt = .08, nt = 8, rt = 8, it = .5;
253
- function at({ legend: e, layoutLegend: t, notes: n, children: r, inspectionId: i, label: a, summary: o, rows: s = [], x: c = 0, width: l = 0, offset: u, data: d, isLoading: f = !1, ...p }) {
253
+ } }, $e = 18, et = 8, tt = 14, nt = .08, rt = 8, it = 8, at = .5;
254
+ function ot({ legend: e, layoutLegend: t, notes: n, children: r, inspectionId: i, label: a, summary: o, rows: s = [], x: c = 0, width: l = 0, offset: u, data: d, isLoading: f = !1, ...p }) {
254
255
  let m = f && e.length === 0 && p.report?.seriesValues === void 0;
255
256
  return /* @__PURE__ */ Y(j, {
256
257
  ...p,
257
258
  series: e,
258
- seriesLegend: m ? /* @__PURE__ */ J(N, {}) : /* @__PURE__ */ J(M, {
259
+ seriesLegend: m ? /* @__PURE__ */ J(M, {}) : /* @__PURE__ */ J(se, {
259
260
  id: i,
260
261
  label: a,
261
262
  summary: o,
@@ -268,11 +269,11 @@ function at({ legend: e, layoutLegend: t, notes: n, children: r, inspectionId: i
268
269
  width: l,
269
270
  offset: u
270
271
  }),
271
- children: [d !== void 0 && /* @__PURE__ */ J(ae, { ...d }), r]
272
+ children: [d !== void 0 && /* @__PURE__ */ J(oe, { ...d }), r]
272
273
  });
273
274
  }
274
- function ot() {
275
- let e = C();
275
+ function st() {
276
+ let e = te();
276
277
  return (t) => t.map((t, n) => ({
277
278
  id: t.id,
278
279
  label: t.label,
@@ -283,12 +284,12 @@ function ot() {
283
284
  })
284
285
  }));
285
286
  }
286
- function st({ title: e = "Loading chart", series: t = [], height: n = "compact", ...i }) {
287
- let a = W(), o = ot()(t);
287
+ function ct({ title: e = "Loading chart", series: t = [], height: n = "compact", ...i }) {
288
+ let a = U(), o = st()(t);
288
289
  return /* @__PURE__ */ J("div", {
289
290
  "aria-hidden": !0,
290
291
  inert: !0,
291
- children: /* @__PURE__ */ J(at, {
292
+ children: /* @__PURE__ */ J(ot, {
292
293
  ...i,
293
294
  title: e,
294
295
  status: "loading",
@@ -296,16 +297,16 @@ function st({ title: e = "Loading chart", series: t = [], height: n = "compact",
296
297
  inspectionId: a,
297
298
  isLoading: !0,
298
299
  children: /* @__PURE__ */ J("div", {
299
- ...H.props(P.plot, Ze.placeholder),
300
+ ...H.props(N.plot, Qe.placeholder),
300
301
  children: /* @__PURE__ */ J(r, { height: f[n] })
301
302
  })
302
303
  })
303
304
  });
304
305
  }
305
- function ct(e, t) {
306
+ function lt(e, t) {
306
307
  return Array.from({ length: t }, (t, n) => e.reduce((e, t) => e + Math.max(0, t.values[n] ?? 0), 0));
307
308
  }
308
- function lt({ categories: e, series: t, domain: n, mode: r }) {
309
+ function ut({ categories: e, series: t, domain: n, mode: r }) {
309
310
  if (e.length > x.items || t.length > x.series) return `Choose a window with at most ${x.items} categories and ${x.series} series.`;
310
311
  if (O(n) !== void 0 || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
311
312
  if (!o(e) || !o(t)) return "Bar categories and series require unique identifiers.";
@@ -314,10 +315,10 @@ function lt({ categories: e, series: t, domain: n, mode: r }) {
314
315
  if (i.values.some((e) => e !== null && E(e, n))) return "Bar values must be finite and within the supplied domain.";
315
316
  if (r === "stacked" && i.values.some((e) => e === null || e < 0)) return "Stacked bars require present nonnegative values.";
316
317
  }
317
- if (r === "stacked" && ct(t, e.length).some((e) => e > n[1])) return "Stacked bar totals must fit the supplied domain.";
318
+ if (r === "stacked" && lt(t, e.length).some((e) => e > n[1])) return "Stacked bar totals must fit the supplied domain.";
318
319
  }
319
- function ut({ categories: e, series: t, mode: n, composition: r, referenceLines: i, markers: a }) {
320
- let o = n === "stacked" || r !== void 0, s = t.flatMap((e) => e.values), c = o ? ct(t, e.length) : [], l = r?.focusedSeries?.values ?? [], u = r?.buckets.map((e) => e.kind === "gap" ? null : e.total) ?? [], d = a.flatMap((e) => e.kind === "tick" ? e.values : [...e.lower, ...e.upper]);
320
+ function dt({ categories: e, series: t, mode: n, composition: r, referenceLines: i, markers: a }) {
321
+ let o = n === "stacked" || r !== void 0, s = t.flatMap((e) => e.values), c = o ? lt(t, e.length) : [], l = r?.focusedSeries?.values ?? [], u = r?.buckets.map((e) => e.kind === "gap" ? null : e.total) ?? [], d = a.flatMap((e) => e.kind === "tick" ? e.values : [...e.lower, ...e.upper]);
321
322
  return [
322
323
  ...s,
323
324
  ...c,
@@ -328,15 +329,15 @@ function ut({ categories: e, series: t, mode: n, composition: r, referenceLines:
328
329
  ...r?.annotation === void 0 ? [] : [r.annotation.value]
329
330
  ];
330
331
  }
331
- function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFormat: i, tickFormat: a, valueLabel: o, highlighted: s, selected: c, onSelectedChange: l, height: d = "compact", composition: f, referenceLines: h = [], markers: g = [], annotations: _ = [], emphasizedCategoryIds: v = [], ...y }) {
332
- let { emptyLabel: b = "No categories", ...x } = y, { locale: S, title: w } = x, T = f?.focusedSeries, E = W(), D = W(), { ref: O, width: k, height: ie } = he(d), ae = C(), j = ot();
333
- if (x.status === "loading") return /* @__PURE__ */ J(st, {
332
+ function ft({ categories: e, series: t, domain: n, mode: r = "grouped", valueFormat: i, tickFormat: a, valueLabel: o, highlighted: s, selected: c, onSelectedChange: l, height: d = "compact", composition: f, referenceLines: h = [], markers: g = [], annotations: _ = [], emphasizedCategoryIds: v = [], ...y }) {
333
+ let { emptyLabel: b = "No categories", ...x } = y, { locale: S, title: C } = x, w = f?.focusedSeries, T = U(), E = U(), { ref: D, width: O, height: k } = _e(d), ae = te(), oe = st();
334
+ if (x.status === "loading") return /* @__PURE__ */ J(ct, {
334
335
  ...x,
335
336
  series: t,
336
337
  height: d
337
338
  });
338
- let M = n ?? u({
339
- values: ut({
339
+ let j = n ?? u({
340
+ values: dt({
340
341
  categories: e,
341
342
  series: t,
342
343
  mode: r,
@@ -345,88 +346,88 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
345
346
  markers: g
346
347
  }),
347
348
  isZeroBased: !0
348
- }), N = T === void 0 ? void 0 : lt({
349
+ }), se = w === void 0 ? void 0 : ut({
349
350
  categories: e,
350
- series: [T],
351
- domain: M,
351
+ series: [w],
352
+ domain: j,
352
353
  mode: "grouped"
353
- }), F = lt({
354
+ }), M = ut({
354
355
  categories: e,
355
356
  series: t,
356
- domain: M,
357
+ domain: j,
357
358
  mode: r
358
- }) ?? N, I = e.map((e) => e.id), L = Ae({
359
+ }) ?? se, P = e.map((e) => e.id), de = je({
359
360
  markers: g,
360
361
  annotations: _,
361
362
  emphasizedCategoryIds: v,
362
- seriesIds: [...t, ...T === void 0 ? [] : [T]].map((e) => e.id),
363
- categoryIds: I,
364
- domain: M
365
- }) ?? _e({
363
+ seriesIds: [...t, ...w === void 0 ? [] : [w]].map((e) => e.id),
364
+ categoryIds: P,
365
+ domain: j
366
+ }) ?? ye({
366
367
  lines: h,
367
- domain: M
368
- }), R = F ?? ke({
368
+ domain: j
369
+ }), F = M ?? X({
369
370
  composition: f,
370
371
  series: t,
371
- categoryIds: I,
372
- domain: M
373
- }) ?? L;
374
- if (R !== void 0) return /* @__PURE__ */ J(oe, {
372
+ categoryIds: P,
373
+ domain: j
374
+ }) ?? de;
375
+ if (F !== void 0) return /* @__PURE__ */ J(ce, {
375
376
  ...x,
376
- message: R
377
+ message: F
377
378
  });
378
- function z(e) {
379
- return te({
379
+ function I(e) {
380
+ return ne({
380
381
  value: e,
381
382
  locale: S,
382
383
  format: i
383
384
  });
384
385
  }
385
- let ue = T !== void 0 && !t.some((e) => e.id === T.id), B = [...t, ...ue ? [T] : []], de = new Map(B.map((e, t) => [e.id, ae({
386
+ let L = w !== void 0 && !t.some((e) => e.id === w.id), pe = [...t, ...L ? [w] : []], R = new Map(pe.map((e, t) => [e.id, ae({
386
387
  id: e.id,
387
388
  tone: e.tone,
388
389
  index: t
389
390
  })]));
390
- function fe(e) {
391
- return de.get(e) ?? "neutral";
391
+ function z(e) {
392
+ return R.get(e) ?? "neutral";
392
393
  }
393
- let pe = f === void 0 ? void 0 : {
394
- id: E,
394
+ let B = f === void 0 ? void 0 : {
395
+ id: T,
395
396
  label: f.contextLabel,
396
397
  tone: "neutral",
397
398
  values: f.buckets.map((e) => e.kind === "gap" ? null : e.total)
398
- }, ye = pe === void 0 ? t : [pe, ...B], be = (T !== void 0 && pe !== void 0 ? [T, pe] : t).map((e) => ({
399
+ }, he = B === void 0 ? t : [B, ...pe], xe = (w !== void 0 && B !== void 0 ? [w, B] : t).map((e) => ({
399
400
  id: e.id,
400
401
  label: e.label,
401
- tone: e.id === E ? "neutral" : fe(e.id)
402
- })), xe = g.map((e) => ({
402
+ tone: e.id === T ? "neutral" : z(e.id)
403
+ })), Se = g.map((e) => ({
403
404
  id: e.id,
404
405
  label: e.label,
405
406
  tone: e.tone ?? "neutral",
406
407
  shape: e.kind
407
408
  }));
408
- function Se(n) {
409
- let r = e[n], i = f?.buckets[n], a = T !== void 0 && pe !== void 0 ? [T, pe] : pe === void 0 || i?.kind === "parts" ? t : [], o = i === void 0 ? void 0 : i.kind === "gap" ? "No reported value" : z(i.total), s = a.map((e) => ({
409
+ function Ce(n) {
410
+ let r = e[n], i = f?.buckets[n], a = w !== void 0 && B !== void 0 ? [w, B] : B === void 0 || i?.kind === "parts" ? t : [], o = i === void 0 ? void 0 : i.kind === "gap" ? "No reported value" : I(i.total), s = a.map((e) => ({
410
411
  id: e.id,
411
412
  label: e.label,
412
- tone: e.id === E ? "neutral" : fe(e.id),
413
- value: z(e.values[n] ?? null)
413
+ tone: e.id === T ? "neutral" : z(e.id),
414
+ value: I(e.values[n] ?? null)
414
415
  })), c = g.map((e) => ({
415
416
  id: e.id,
416
417
  label: e.label,
417
418
  tone: e.tone ?? "neutral",
418
419
  shape: e.kind,
419
- value: je({
420
+ value: Me({
420
421
  marker: e,
421
422
  index: n,
422
- valueText: z
423
+ valueText: I
423
424
  })
424
425
  })), l = h.map((e) => ({
425
426
  id: e.id,
426
427
  label: e.label,
427
428
  tone: e.tone ?? "neutral",
428
429
  shape: "dashed",
429
- value: z(e.value)
430
+ value: I(e.value)
430
431
  }));
431
432
  return {
432
433
  category: r,
@@ -440,9 +441,9 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
440
441
  notes: _.filter((e) => e.categoryId === r?.id).map((e) => e.label)
441
442
  };
442
443
  }
443
- let U = f?.annotation, Ce = _.length > 0 || U !== void 0, we = p({
444
- width: k,
445
- height: ie,
444
+ let V = f?.annotation, we = _.length > 0 || V !== void 0, Te = p({
445
+ width: O,
446
+ height: k,
446
447
  direction: "columns",
447
448
  categories: e.map((e) => ({
448
449
  id: e.id,
@@ -453,45 +454,45 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
453
454
  format: i,
454
455
  tickFormat: a
455
456
  },
456
- valueDomain: M,
457
+ valueDomain: j,
457
458
  locale: S,
458
- topInset: Ce ? Qe : 0,
459
+ topInset: we ? $e : 0,
459
460
  hasValueTitle: o !== void 0
460
- }), { box: G, band: K } = we, q = we.value.position, Te = A({
461
+ }), { box: W, band: G } = Te, K = Te.value.position, Ee = A({
461
462
  ids: t.map((e) => e.id),
462
- range: [0, K.bandwidth],
463
- padding: tt
464
- }), Ee = r === "stacked" || f !== void 0;
465
- function De(e) {
466
- return K.start(e) ?? G.left;
467
- }
463
+ range: [0, G.bandwidth],
464
+ padding: nt
465
+ }), De = r === "stacked" || f !== void 0;
468
466
  function Oe(e) {
469
- return De(e) + K.bandwidth * it;
467
+ return G.start(e) ?? W.left;
468
+ }
469
+ function ke(e) {
470
+ return Oe(e) + G.bandwidth * at;
470
471
  }
471
- function X(e, t) {
472
- let n = De(e);
473
- return Ee ? {
472
+ function q(e, t) {
473
+ let n = Oe(e);
474
+ return De ? {
474
475
  x: n,
475
- width: K.bandwidth
476
+ width: G.bandwidth
476
477
  } : {
477
- x: n + (Te.start(t) ?? 0),
478
- width: Te.bandwidth
478
+ x: n + (Ee.start(t) ?? 0),
479
+ width: Ee.bandwidth
479
480
  };
480
481
  }
481
482
  function Z(e, n) {
482
- if (!Ee) return t.find((e) => e.id === n)?.values[e] ?? null;
483
+ if (!De) return t.find((e) => e.id === n)?.values[e] ?? null;
483
484
  let r = t.flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null));
484
485
  return r.length === 0 ? null : r.reduce((e, t) => e + t, 0);
485
486
  }
486
487
  function Q(e, n) {
487
- let r = (n === void 0 ? t : t.filter((e) => e.id === n)).flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null)), i = Ee ? r.reduce((e, t) => e + Math.max(0, t), 0) : Math.max(0, ...r), a = f?.buckets[e], o = a === void 0 || a.kind === "gap" ? 0 : a.total, s = g.filter((e) => n === void 0 || e.seriesId === n).flatMap((t) => [Me(t, e)].filter((e) => e !== null));
488
+ let r = (n === void 0 ? t : t.filter((e) => e.id === n)).flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null)), i = De ? r.reduce((e, t) => e + Math.max(0, t), 0) : Math.max(0, ...r), a = f?.buckets[e], o = a === void 0 || a.kind === "gap" ? 0 : a.total, s = g.filter((e) => n === void 0 || e.seriesId === n).flatMap((t) => [Ne(t, e)].filter((e) => e !== null));
488
489
  return Math.max(0, i, o, ...s);
489
490
  }
490
- function Ne(e) {
491
- return Math.max(et, q(e) - $e);
491
+ function Ae(e) {
492
+ return Math.max(tt, K(e) - et);
492
493
  }
493
494
  let Pe = {
494
- label: `${w} observations`,
495
+ label: `${C} observations`,
495
496
  columns: [{
496
497
  id: "category",
497
498
  label: "Category"
@@ -502,83 +503,83 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
502
503
  rows: [...e.map((e, t) => ({
503
504
  id: e.id,
504
505
  values: [e.label, [
505
- ...ye.map((e) => `${e.label}: ${z(e.values[t] ?? null)}`),
506
- ...g.map((e) => `${e.label}: ${je({
506
+ ...he.map((e) => `${e.label}: ${I(e.values[t] ?? null)}`),
507
+ ...g.map((e) => `${e.label}: ${Me({
507
508
  marker: e,
508
509
  index: t,
509
- valueText: z
510
+ valueText: I
510
511
  })}`),
511
512
  ..._.filter((t) => t.categoryId === e.id).map((e) => e.label)
512
513
  ].join(" · ")]
513
514
  })), ...h.map((e) => ({
514
515
  id: `reference:${e.id}`,
515
- values: [e.label, z(e.value)]
516
+ values: [e.label, I(e.value)]
516
517
  }))]
517
518
  };
518
519
  return /* @__PURE__ */ J(ee, {
519
520
  items: e,
520
- readout: (e) => re(Se(I.indexOf(e))),
521
- locate: (e) => K.idAt(e.x / e.width * G.width),
521
+ readout: (e) => ie(Ce(P.indexOf(e))),
522
+ locate: (e) => G.idAt(e.x / e.width * W.width),
522
523
  selected: c ?? null,
523
524
  onSelect: l,
524
525
  render: (n, { inspected: i, cursor: a }) => {
525
- let u = Se(I.indexOf(i ?? ""));
526
+ let u = Ce(P.indexOf(i ?? ""));
526
527
  function d(e) {
527
528
  let t = v.includes(e);
528
529
  return v.length > 0 && !t && i !== e;
529
530
  }
530
- let p = U === void 0 || !I.includes(U.categoryId) ? [] : [{
531
- id: `composition:${U.categoryId}`,
532
- text: U.label,
533
- x: Oe(U.categoryId),
534
- y: Ne(U.value),
535
- isReceded: d(U.categoryId)
531
+ let p = V === void 0 || !P.includes(V.categoryId) ? [] : [{
532
+ id: `composition:${V.categoryId}`,
533
+ text: V.label,
534
+ x: ke(V.categoryId),
535
+ y: Ae(V.value),
536
+ isReceded: d(V.categoryId)
536
537
  }], ee = _.map((e) => {
537
538
  let t = e.seriesId === void 0 ? {
538
- x: De(e.categoryId),
539
- width: K.bandwidth
540
- } : X(e.categoryId, e.seriesId);
539
+ x: Oe(e.categoryId),
540
+ width: G.bandwidth
541
+ } : q(e.categoryId, e.seriesId);
541
542
  return {
542
543
  id: e.id,
543
544
  text: e.label,
544
- x: t.x + t.width * it,
545
- y: Ne(Q(I.indexOf(e.categoryId), e.seriesId)),
545
+ x: t.x + t.width * at,
546
+ y: Ae(Q(P.indexOf(e.categoryId), e.seriesId)),
546
547
  isReceded: d(e.categoryId)
547
548
  };
548
549
  }), y = [...p, ...ee];
549
- return /* @__PURE__ */ J(at, {
550
+ return /* @__PURE__ */ J(ot, {
550
551
  ...x,
551
552
  figure: n,
552
- legend: [...be, ...xe],
553
- layoutLegend: [...j(t), ...xe],
553
+ legend: [...xe, ...Se],
554
+ layoutLegend: [...oe(t), ...Se],
554
555
  notes: u.notes,
555
- inspectionId: D,
556
+ inspectionId: E,
556
557
  label: u.label,
557
558
  titleDetail: u.category === void 0 ? void 0 : [u.category.axisLabel ?? u.category.label, u.summary].filter(Boolean).join(" · "),
558
559
  summary: u.summary,
559
560
  rows: u.rows,
560
- x: Oe(i ?? ""),
561
- width: k,
562
- offset: K.bandwidth * it + rt,
561
+ x: ke(i ?? ""),
562
+ width: O,
563
+ offset: G.bandwidth * at + it,
563
564
  data: Pe,
564
- children: e.length === 0 || t.length === 0 && f === void 0 ? /* @__PURE__ */ J(se, { children: b }) : /* @__PURE__ */ Y(me, {
565
- plotRef: O,
566
- box: G,
565
+ children: e.length === 0 || t.length === 0 && f === void 0 ? /* @__PURE__ */ J(le, { children: b }) : /* @__PURE__ */ Y(ge, {
566
+ plotRef: D,
567
+ box: W,
567
568
  label: m({
568
- title: w,
569
+ title: C,
569
570
  marks: "categories",
570
571
  isSelectable: l !== void 0
571
572
  }),
572
- readoutId: D,
573
+ readoutId: E,
573
574
  children: [
574
- /* @__PURE__ */ J(ce, {
575
- box: G,
576
- xTicks: we.bandTicks,
577
- yTicks: we.valueTicks,
575
+ /* @__PURE__ */ J(ue, {
576
+ box: W,
577
+ xTicks: Te.bandTicks,
578
+ yTicks: Te.valueTicks,
578
579
  yTitle: o
579
580
  }),
580
- /* @__PURE__ */ Y(ge, {
581
- box: G,
581
+ /* @__PURE__ */ Y(ve, {
582
+ box: W,
582
583
  children: [
583
584
  e.map((e, n) => {
584
585
  let a = f?.buckets[n], o = {
@@ -587,66 +588,67 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
587
588
  };
588
589
  return a === void 0 ? t.map((i, a) => {
589
590
  let c = i.values[n];
590
- if (c == null) return null;
591
- let l = r === "stacked" ? t.slice(0, a).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u = q(l), f = q(l + c), p = s != null && s !== i.id, m = X(e.id, i.id);
592
- return /* @__PURE__ */ J(V, {
591
+ if (c == null || r === "stacked" && c === 0) return null;
592
+ let l = r === "stacked" ? t.slice(0, a).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u = K(l), f = K(l + c), p = s != null && s !== i.id, m = q(e.id, i.id);
593
+ return /* @__PURE__ */ J(me, {
593
594
  ...o,
594
595
  x: m.x,
595
596
  y: Math.min(u, f),
596
597
  width: m.width,
597
598
  height: Math.max(+(c === 0), Math.abs(f - u)),
598
- tone: fe(i.id),
599
- emphasis: p || d(e.id) ? "receded" : "normal"
599
+ tone: z(i.id),
600
+ emphasis: p || d(e.id) ? "receded" : "normal",
601
+ mark: t.length === 1 ? e.id : `${e.id}:${i.id}`
600
602
  }, `${e.id}:${i.id}`);
601
603
  }) : /* @__PURE__ */ J("g", {
602
- ...H.props(P.emphasis, d(e.id) && P.receded),
603
- children: /* @__PURE__ */ J(Xe, {
604
+ ...H.props(N.emphasis, d(e.id) && N.receded),
605
+ children: /* @__PURE__ */ J(Ze, {
604
606
  ...o,
605
607
  bucket: a,
606
608
  series: t,
607
- focusedSeries: T,
609
+ focusedSeries: w,
608
610
  index: n,
609
- x: De(e.id),
610
- width: K.bandwidth,
611
- y: q,
611
+ x: Oe(e.id),
612
+ width: G.bandwidth,
613
+ y: K,
612
614
  highlighted: s,
613
- toneOf: fe
615
+ toneOf: z
614
616
  })
615
617
  }, e.id);
616
618
  }),
617
- /* @__PURE__ */ J(le, {
618
- x1: G.left,
619
- x2: G.right,
620
- y1: q(0),
621
- y2: q(0)
619
+ /* @__PURE__ */ J(fe, {
620
+ x1: W.left,
621
+ x2: W.right,
622
+ y1: K(0),
623
+ y2: K(0)
622
624
  }),
623
- /* @__PURE__ */ J(Ge, {
625
+ /* @__PURE__ */ J(Ke, {
624
626
  markers: g,
625
- categoryIds: I,
626
- span: X,
627
+ categoryIds: P,
628
+ span: q,
627
629
  barTop: Z,
628
- y: q,
630
+ y: K,
629
631
  isReceded: d
630
632
  })
631
633
  ]
632
634
  }),
633
- /* @__PURE__ */ J(ve, {
635
+ /* @__PURE__ */ J(be, {
634
636
  lines: h,
635
- box: G,
636
- position: q,
637
- valueText: z,
638
- avoid: Re(y)
637
+ box: W,
638
+ position: K,
639
+ valueText: I,
640
+ avoid: ze(y)
639
641
  }),
640
- /* @__PURE__ */ J(Ke, {
642
+ /* @__PURE__ */ J(qe, {
641
643
  annotations: y,
642
- left: G.left,
643
- right: G.right
644
+ left: W.left,
645
+ right: W.right
644
646
  }),
645
- a !== null && /* @__PURE__ */ J(ne, {
646
- x: Oe(a),
647
- top: G.top,
648
- bottom: G.bottom,
649
- width: Math.max(nt, K.bandwidth)
647
+ a !== null && /* @__PURE__ */ J(re, {
648
+ x: ke(a),
649
+ top: W.top,
650
+ bottom: W.bottom,
651
+ width: Math.max(rt, G.bandwidth)
650
652
  })
651
653
  ]
652
654
  })
@@ -655,13 +657,13 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
655
657
  });
656
658
  }
657
659
  // packages/charts/src/cartesian/breakdown-bar.tsx
658
- var ft = {
660
+ var pt = {
659
661
  kzqmXN: "x5lhr3w",
660
662
  kGVxlE: "x1iotiob",
661
663
  kZKoxP: "x5yr21d",
662
664
  $$css: !0
663
- }, pt = { segment: (e, t, n) => [
664
- ft,
665
+ }, mt = { segment: (e, t, n) => [
666
+ pt,
665
667
  {
666
668
  kWkggS: t == null ? t : "xl8spv7",
667
669
  $$css: !0
@@ -671,24 +673,24 @@ var ft = {
671
673
  "--x-backgroundColor": t ?? void 0,
672
674
  "--x-boxShadow": `inset 0 0 0 1px ${n}` == null ? void 0 : `inset 0 0 0 1px ${n}`
673
675
  }
674
- ] }, mt = 100;
675
- function ht({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange: o, ...s }) {
676
- let { emptyLabel: c = "No values", ...l } = s, { locale: u, title: d } = l, f = C();
677
- if (l.status === "loading") return /* @__PURE__ */ J(ie, {
676
+ ] }, ht = 100;
677
+ function gt({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange: o, ...s }) {
678
+ let { emptyLabel: c = "No values", ...l } = s, { locale: u, title: d } = l, f = te();
679
+ if (l.status === "loading") return /* @__PURE__ */ J(ae, {
678
680
  ...l,
679
681
  height: "compact"
680
682
  });
681
683
  let p = y(e), m = e.reduce((e, t) => e + (t.value ?? 0), 0), h = 2 ** -52 * Math.max(m, t, 1) * e.length;
682
- if (p !== void 0) return /* @__PURE__ */ J(oe, {
684
+ if (p !== void 0) return /* @__PURE__ */ J(ce, {
683
685
  ...l,
684
686
  message: p
685
687
  });
686
- if (!Number.isFinite(t) || t < 0 || m - t > h) return /* @__PURE__ */ J(oe, {
688
+ if (!Number.isFinite(t) || t < 0 || m - t > h) return /* @__PURE__ */ J(ce, {
687
689
  ...l,
688
690
  message: "The total must be finite and at least the sum of recorded values."
689
691
  });
690
692
  function g(e) {
691
- return te({
693
+ return ne({
692
694
  value: e,
693
695
  locale: u,
694
696
  format: n
@@ -712,13 +714,13 @@ function ht({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange:
712
714
  render: (n, r) => /* @__PURE__ */ J(j, {
713
715
  ...l,
714
716
  figure: n,
715
- children: e.length === 0 ? /* @__PURE__ */ J(se, { children: c }) : /* @__PURE__ */ Y(Oe, { children: [
717
+ children: e.length === 0 ? /* @__PURE__ */ J(le, { children: c }) : /* @__PURE__ */ Y(q, { children: [
716
718
  /* @__PURE__ */ J("div", {
717
719
  "aria-hidden": !0,
718
720
  className: "x78zum5 x170jfvy xb3r6kr x1r7kqkb xmkeg23 x1y0btm7 x1ey3b81 x1jfksii",
719
721
  children: e.map((e, n) => {
720
722
  let r = _[n]?.tone ?? "neutral";
721
- return e.value === null ? null : /* @__PURE__ */ J("span", { ...H.props(pt.segment(t === 0 ? 0 : e.value / t * mt, a[r], i[r])) }, e.id);
723
+ return e.value === null ? null : /* @__PURE__ */ J("span", { ...H.props(mt.segment(t === 0 ? 0 : e.value / t * ht, a[r], i[r])) }, e.id);
722
724
  })
723
725
  }),
724
726
  /* @__PURE__ */ J(S, {
@@ -740,15 +742,15 @@ function ht({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange:
740
742
  });
741
743
  }
742
744
  // packages/charts/src/cartesian/bridge-data.ts
743
- function gt(e) {
745
+ function _t(e) {
744
746
  return e.kind !== "change" || e.value === null ? "neutral" : e.value < 0 ? "negative" : "positive";
745
747
  }
746
- function _t(e) {
748
+ function vt(e) {
747
749
  let t = e.map((e) => e.kind === "total" ? 0 : e.value);
748
750
  return e[0]?.kind !== "start" || t.includes(null) ? null : t.reduce((e, t) => e + (t ?? 0), 0);
749
751
  }
750
- function vt({ step: e, before: t, after: n }) {
751
- let r = e.tone ?? gt(e);
752
+ function yt({ step: e, before: t, after: n }) {
753
+ let r = e.tone ?? _t(e);
752
754
  switch (e.kind) {
753
755
  case "start": return {
754
756
  step: e,
@@ -770,18 +772,18 @@ function vt({ step: e, before: t, after: n }) {
770
772
  };
771
773
  }
772
774
  }
773
- function yt(e) {
774
- return e.map((t, n) => vt({
775
+ function bt(e) {
776
+ return e.map((t, n) => yt({
775
777
  step: t,
776
- before: _t(e.slice(0, n)),
777
- after: _t(e.slice(0, n + 1))
778
+ before: vt(e.slice(0, n)),
779
+ after: vt(e.slice(0, n + 1))
778
780
  }));
779
781
  }
780
- function bt(e) {
782
+ function xt(e) {
781
783
  let t = e.flatMap((e) => [e.from, e.to].filter((e) => e !== null)), n = Math.min(0, ...t), r = Math.max(0, ...t);
782
784
  return n === r ? [n, n + 1] : [n, r];
783
785
  }
784
- function xt({ steps: e, domain: t }) {
786
+ function St({ steps: e, domain: t }) {
785
787
  if (e.length > x.items) return `Choose a bridge with at most ${x.items} steps.`;
786
788
  if (!o(e)) return "Bridge steps require unique identifiers.";
787
789
  if (e.length > 0 && e[0]?.kind !== "start") return "A bridge begins with one start step.";
@@ -790,36 +792,36 @@ function xt({ steps: e, domain: t }) {
790
792
  let t = e.kind === "total" ? null : e.value;
791
793
  return t !== null && !Number.isFinite(t);
792
794
  })) return "Bridge values must be finite numbers or explicit missing changes.";
793
- let n = bt(yt(e));
795
+ let n = xt(bt(e));
794
796
  if (t === void 0) return Number.isFinite(n[0]) && Number.isFinite(n[1]) ? void 0 : "Running totals must stay finite.";
795
797
  let r = t[0] <= n[0] && t[1] >= n[1];
796
798
  if (!D(t) || !r) return "The bridge domain must be finite, increasing, and contain zero and every running total.";
797
799
  }
798
800
  // packages/charts/src/cartesian/bridge-chart.tsx
799
- var St = 12, Ct = 6, wt = 14, Tt = 12, Et = 8, Dt = 8, Ot = .5;
800
- function kt(e) {
801
+ var Ct = 12, wt = 6, Tt = 14, Et = 12, Dt = 8, Ot = 8, kt = .5;
802
+ function At(e) {
801
803
  return typeof e == "function" ? (t) => t === 0 ? e(0) : `${t > 0 ? "+" : "−"}${e(Math.abs(t))}` : {
802
804
  ...e,
803
805
  signDisplay: "exceptZero"
804
806
  };
805
807
  }
806
- function At({ level: e, valueText: t, changeText: n }) {
808
+ function jt({ level: e, valueText: t, changeText: n }) {
807
809
  return e.step.kind === "change" && e.step.value !== null ? n(e.step.value) : e.to === null ? "—" : t(e.to);
808
810
  }
809
- function jt({ level: e, valueText: t, changeText: n }) {
811
+ function Mt({ level: e, valueText: t, changeText: n }) {
810
812
  return e.step.kind === "change" ? e.step.value === null ? T : n(e.step.value) : e.to === null ? T : t(e.to);
811
813
  }
812
- function Mt({ level: e, valueText: t }) {
814
+ function Nt({ level: e, valueText: t }) {
813
815
  return e.from === null || e.to === null ? T : `${t(e.from)} → ${t(e.to)}`;
814
816
  }
815
- function Nt(e, t, n) {
817
+ function Pt(e, t, n) {
816
818
  if (e.from === null || e.to === null) {
817
- let r = Math.min(n - Tt, t(e.from ?? 0) - Tt * Ot);
819
+ let r = Math.min(n - Et, t(e.from ?? 0) - Et * kt);
818
820
  return {
819
821
  isKnown: !1,
820
822
  top: r,
821
- height: Tt,
822
- labelY: r - Ct
823
+ height: Et,
824
+ labelY: r - wt
823
825
  };
824
826
  }
825
827
  let r = Math.max(e.from, e.to), i = Math.min(e.from, e.to), a = t(r), o = r <= 0 && i < 0;
@@ -827,41 +829,41 @@ function Nt(e, t, n) {
827
829
  isKnown: !0,
828
830
  top: a,
829
831
  height: Math.max(1, t(i) - a),
830
- labelY: o ? t(i) + wt : a - Ct
832
+ labelY: o ? t(i) + Tt : a - wt
831
833
  };
832
834
  }
833
- function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r, valueLabel: i, domain: a, referenceLines: o = [], selected: s, onSelectedChange: c, height: l = "regular", ...d }) {
834
- let { emptyLabel: f = "No steps", ...h } = d, { locale: g, title: _ } = h, v = he(l), y = W();
835
- if (h.status === "loading") return /* @__PURE__ */ J(ie, {
835
+ function Ft({ steps: e, valueFormat: t, changeFormat: n = At(t), tickFormat: r, valueLabel: i, domain: a, referenceLines: o = [], selected: s, onSelectedChange: c, height: l = "regular", ...d }) {
836
+ let { emptyLabel: f = "No steps", ...h } = d, { locale: g, title: _ } = h, v = _e(l), y = U();
837
+ if (h.status === "loading") return /* @__PURE__ */ J(ae, {
836
838
  ...h,
837
839
  height: l
838
840
  });
839
- let b = yt(e), x = bt(b), S = a ?? u({ values: [...x, ...o.map((e) => e.value)] }), C = xt({
841
+ let b = bt(e), x = xt(b), S = a ?? u({ values: [...x, ...o.map((e) => e.value)] }), C = St({
840
842
  steps: e,
841
843
  domain: a
842
- }) ?? _e({
844
+ }) ?? ye({
843
845
  lines: o,
844
846
  domain: S
845
847
  });
846
- if (C !== void 0) return /* @__PURE__ */ J(oe, {
848
+ if (C !== void 0) return /* @__PURE__ */ J(ce, {
847
849
  ...h,
848
850
  message: C
849
851
  });
850
- function w(e) {
851
- return (t) => te({
852
+ function te(e) {
853
+ return (t) => ne({
852
854
  value: t,
853
855
  locale: g,
854
856
  format: e
855
857
  });
856
858
  }
857
- let T = w(t), E = w(n), D = o.map((e) => ({
859
+ let w = te(t), T = te(n), E = o.map((e) => ({
858
860
  id: e.id,
859
861
  label: e.label,
860
862
  tone: e.tone ?? "neutral",
861
863
  shape: "dashed",
862
- value: T(e.value)
864
+ value: w(e.value)
863
865
  }));
864
- function O(e) {
866
+ function D(e) {
865
867
  let t = b.find((t) => t.step.id === e);
866
868
  if (t === void 0) return {
867
869
  level: t,
@@ -873,23 +875,23 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
873
875
  id: "running",
874
876
  label: "Running total",
875
877
  tone: "neutral",
876
- value: Mt({
878
+ value: Nt({
877
879
  level: t,
878
- valueText: T
880
+ valueText: w
879
881
  })
880
882
  }] : [];
881
883
  return {
882
884
  level: t,
883
885
  label: t.step.label,
884
- summary: jt({
886
+ summary: Mt({
885
887
  level: t,
886
- valueText: T,
887
- changeText: E
888
+ valueText: w,
889
+ changeText: T
888
890
  }),
889
- rows: [...n, ...D]
891
+ rows: [...n, ...E]
890
892
  };
891
893
  }
892
- let k = p({
894
+ let O = p({
893
895
  width: v.width,
894
896
  height: v.height,
895
897
  direction: "columns",
@@ -904,43 +906,43 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
904
906
  },
905
907
  valueDomain: S,
906
908
  locale: g,
907
- topInset: St,
909
+ topInset: Ct,
908
910
  hasValueTitle: i !== void 0
909
- }), { box: A, band: N } = k, P = k.value.position, F = b.map((e) => ({
911
+ }), { box: k, band: A } = O, M = O.value.position, N = b.map((e) => ({
910
912
  id: e.step.id,
911
913
  label: e.step.label
912
914
  }));
913
- function I(e) {
914
- return N.start(e) ?? A.left;
915
+ function P(e) {
916
+ return A.start(e) ?? k.left;
915
917
  }
916
- function R(e) {
917
- return I(e) + N.bandwidth * Ot;
918
+ function de(e) {
919
+ return P(e) + A.bandwidth * kt;
918
920
  }
919
- let ue = Re([...b.filter((e) => e.step.kind !== "change"), ...b.filter((e) => e.step.kind === "change")].map((e) => ({
921
+ let I = ze([...b.filter((e) => e.step.kind !== "change"), ...b.filter((e) => e.step.kind === "change")].map((e) => ({
920
922
  id: e.step.id,
921
923
  isTotal: e.step.kind !== "change",
922
- text: At({
924
+ text: jt({
923
925
  level: e,
924
- valueText: T,
925
- changeText: E
926
+ valueText: w,
927
+ changeText: T
926
928
  }),
927
- x: R(e.step.id),
928
- y: Nt(e, P, A.bottom).labelY
929
+ x: de(e.step.id),
930
+ y: Pt(e, M, k.bottom).labelY
929
931
  })));
930
932
  return /* @__PURE__ */ J(ee, {
931
- items: F,
932
- readout: (e) => re(O(e)),
933
- locate: (e) => N.idAt(e.x / e.width * A.width),
933
+ items: N,
934
+ readout: (e) => ie(D(e)),
935
+ locate: (e) => A.idAt(e.x / e.width * k.width),
934
936
  selected: s ?? null,
935
937
  onSelect: c,
936
938
  render: (e, { inspected: t, cursor: n }) => {
937
- let r = O(t);
939
+ let r = D(t);
938
940
  return /* @__PURE__ */ Y(j, {
939
941
  ...h,
940
942
  figure: e,
941
943
  titleDetail: r.level === void 0 ? void 0 : `${r.label} · ${r.summary}`,
942
944
  children: [
943
- /* @__PURE__ */ J(ae, {
945
+ /* @__PURE__ */ J(oe, {
944
946
  label: `${_} steps`,
945
947
  columns: [
946
948
  {
@@ -960,43 +962,43 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
960
962
  id: e.step.id,
961
963
  values: [
962
964
  e.step.label,
963
- jt({
965
+ Mt({
964
966
  level: e,
965
- valueText: T,
966
- changeText: E
967
+ valueText: w,
968
+ changeText: T
967
969
  }),
968
- e.step.kind === "change" ? Mt({
970
+ e.step.kind === "change" ? Nt({
969
971
  level: e,
970
- valueText: T
971
- }) : jt({
972
+ valueText: w
973
+ }) : Mt({
972
974
  level: e,
973
- valueText: T,
974
- changeText: E
975
+ valueText: w,
976
+ changeText: T
975
977
  })
976
978
  ]
977
979
  })), ...o.map((e) => ({
978
980
  id: `reference:${e.id}`,
979
981
  values: [
980
982
  e.label,
981
- T(e.value),
983
+ w(e.value),
982
984
  ""
983
985
  ]
984
986
  }))]
985
987
  }),
986
- /* @__PURE__ */ J(M, {
988
+ /* @__PURE__ */ J(se, {
987
989
  id: y,
988
990
  label: r.label,
989
991
  summary: r.summary,
990
992
  legend: [],
991
993
  hasLegend: !1,
992
994
  rows: r.rows,
993
- x: R(t ?? ""),
995
+ x: de(t ?? ""),
994
996
  width: v.width,
995
- offset: N.bandwidth * Ot + Dt
997
+ offset: A.bandwidth * kt + Ot
996
998
  }),
997
- b.length === 0 ? /* @__PURE__ */ J(se, { children: f }) : /* @__PURE__ */ Y(me, {
999
+ b.length === 0 ? /* @__PURE__ */ J(le, { children: f }) : /* @__PURE__ */ Y(ge, {
998
1000
  plotRef: v.ref,
999
- box: A,
1001
+ box: k,
1000
1002
  label: m({
1001
1003
  title: _,
1002
1004
  marks: "steps",
@@ -1004,30 +1006,30 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1004
1006
  }),
1005
1007
  readoutId: y,
1006
1008
  children: [
1007
- /* @__PURE__ */ J(ce, {
1008
- box: A,
1009
- xTicks: k.bandTicks,
1010
- yTicks: k.valueTicks,
1009
+ /* @__PURE__ */ J(ue, {
1010
+ box: k,
1011
+ xTicks: O.bandTicks,
1012
+ yTicks: O.valueTicks,
1011
1013
  yTitle: i
1012
1014
  }),
1013
- /* @__PURE__ */ Y(ge, {
1014
- box: A,
1015
+ /* @__PURE__ */ Y(ve, {
1016
+ box: k,
1015
1017
  children: [
1016
1018
  b.map((e, t) => {
1017
1019
  let n = b[t + 1];
1018
- return n === void 0 || e.to === null || n.from === null ? null : /* @__PURE__ */ J(z, {
1019
- x1: I(e.step.id) + N.bandwidth,
1020
- x2: I(n.step.id),
1021
- y1: P(e.to),
1022
- y2: P(e.to)
1020
+ return n === void 0 || e.to === null || n.from === null ? null : /* @__PURE__ */ J(L, {
1021
+ x1: P(e.step.id) + A.bandwidth,
1022
+ x2: P(n.step.id),
1023
+ y1: M(e.to),
1024
+ y2: M(e.to)
1023
1025
  }, `connector:${e.step.id}`);
1024
1026
  }),
1025
1027
  b.map((e) => {
1026
- let n = Nt(e, P, A.bottom);
1027
- return /* @__PURE__ */ J(V, {
1028
- x: I(e.step.id),
1028
+ let n = Pt(e, M, k.bottom);
1029
+ return /* @__PURE__ */ J(me, {
1030
+ x: P(e.step.id),
1029
1031
  y: n.top,
1030
- width: N.bandwidth,
1032
+ width: A.bandwidth,
1031
1033
  height: n.height,
1032
1034
  tone: n.isKnown ? e.tone : "neutral",
1033
1035
  isHollow: !n.isKnown,
@@ -1035,25 +1037,25 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1035
1037
  isInspected: t === e.step.id
1036
1038
  }, e.step.id);
1037
1039
  }),
1038
- /* @__PURE__ */ J(le, {
1039
- x1: A.left,
1040
- x2: A.right,
1041
- y1: P(0),
1042
- y2: P(0)
1040
+ /* @__PURE__ */ J(fe, {
1041
+ x1: k.left,
1042
+ x2: k.right,
1043
+ y1: M(0),
1044
+ y2: M(0)
1043
1045
  })
1044
1046
  ]
1045
1047
  }),
1046
- /* @__PURE__ */ J(ve, {
1048
+ /* @__PURE__ */ J(be, {
1047
1049
  lines: o,
1048
- box: A,
1049
- position: P,
1050
- valueText: T,
1051
- avoid: ue,
1050
+ box: k,
1051
+ position: M,
1052
+ valueText: w,
1053
+ avoid: I,
1052
1054
  marks: b.map((e) => {
1053
- let t = Nt(e, P, A.bottom);
1055
+ let t = Pt(e, M, k.bottom);
1054
1056
  return {
1055
- left: I(e.step.id),
1056
- right: I(e.step.id) + N.bandwidth,
1057
+ left: P(e.step.id),
1058
+ right: P(e.step.id) + A.bandwidth,
1057
1059
  top: t.top,
1058
1060
  bottom: t.top + t.height
1059
1061
  };
@@ -1061,7 +1063,7 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1061
1063
  }),
1062
1064
  /* @__PURE__ */ J("g", {
1063
1065
  "aria-hidden": !0,
1064
- children: ue.map((e) => /* @__PURE__ */ J(L, {
1066
+ children: I.map((e) => /* @__PURE__ */ J(F, {
1065
1067
  x: e.x,
1066
1068
  y: e.y,
1067
1069
  anchor: "middle",
@@ -1069,11 +1071,11 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1069
1071
  children: e.text
1070
1072
  }, e.id))
1071
1073
  }),
1072
- n !== null && /* @__PURE__ */ J(ne, {
1073
- x: R(n),
1074
- top: A.top,
1075
- bottom: A.bottom,
1076
- width: Math.max(Et, N.bandwidth)
1074
+ n !== null && /* @__PURE__ */ J(re, {
1075
+ x: de(n),
1076
+ top: k.top,
1077
+ bottom: k.bottom,
1078
+ width: Math.max(Dt, A.bandwidth)
1077
1079
  })
1078
1080
  ]
1079
1081
  })
@@ -1083,7 +1085,7 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1083
1085
  });
1084
1086
  }
1085
1087
  // packages/charts/src/cartesian/scatter-plot.tsx
1086
- var Ft = { points: 1e3 }, It = {
1088
+ var It = { points: 1e3 }, Lt = {
1087
1089
  target: {
1088
1090
  kVAEAm: "x10l6tqk",
1089
1091
  k1xSpc: "xrvj5dj",
@@ -1122,211 +1124,250 @@ var Ft = { points: 1e3 }, It = {
1122
1124
  $$css: !0
1123
1125
  }
1124
1126
  };
1125
- function Lt(e, t) {
1127
+ function Rt(e, t) {
1126
1128
  return !e.every(Number.isFinite) || e[0] > e[1] ? !1 : e[0] >= t[0] && e[1] <= t[1];
1127
1129
  }
1128
- function Rt(e, t) {
1130
+ function zt(e, t) {
1129
1131
  return Number.isFinite(e) && e > 0 && e <= t[1] - t[0];
1130
1132
  }
1131
- function zt({ points: e, x: t, y: n, xDomain: r, yDomain: i, range: a, onRangeChange: s, rangeStep: c }) {
1133
+ function Bt({ points: e, x: t, y: n, xDomain: r, yDomain: i, range: a, onRangeChange: s, rangeStep: c }) {
1132
1134
  let l = O(r, t.scale) ?? O(i, n.scale);
1133
1135
  if (l !== void 0) return l;
1134
- if (e.length > Ft.points) return `This plot exceeds the ${Ft.points}-point render limit. Supply a smaller, labelled sample.`;
1136
+ if (e.length > It.points) return `This plot exceeds the ${It.points}-point render limit. Supply a smaller, labelled sample.`;
1135
1137
  if (!o(e)) return "Scatter points must have unique identifiers.";
1136
1138
  if (e.some((e) => !Number.isFinite(e.x) || !Number.isFinite(e.y))) return "Scatter coordinates must be finite.";
1137
1139
  if (e.some((e) => E(e.x, r) || E(e.y, i))) return "Scatter coordinates fall outside the declared domain. Widen the domain or supply a labelled window of points.";
1138
1140
  if (s !== void 0) {
1139
- if (c === void 0 || !Rt(c.x, r) || !Rt(c.y, i)) return "Range selection steps must be finite, positive, and no larger than their domain span.";
1140
- if (a != null && (!Lt(a.x, r) || !Lt(a.y, i))) return "The selected range must have finite, ordered bounds inside the declared domain.";
1141
+ if (c === void 0 || !zt(c.x, r) || !zt(c.y, i)) return "Range selection steps must be finite, positive, and no larger than their domain span.";
1142
+ if (a != null && (!Rt(a.x, r) || !Rt(a.y, i))) return "The selected range must have finite, ordered bounds inside the declared domain.";
1141
1143
  }
1142
1144
  }
1143
- function Bt(e, t) {
1145
+ function Vt(e, t) {
1144
1146
  return [Math.min(e, t), Math.max(e, t)];
1145
1147
  }
1146
- function Vt(e) {
1147
- let { points: t, x: n, y: r, range: i, onRangeChange: a, rangeStep: o, selected: d, onSelectedChange: f, height: p = "regular", ...h } = e, { emptyLabel: v = "No points were supplied.", ...y } = h, { locale: b, title: x } = y, S = W(), w = he(p), T = C(), [E, D] = G(null), O = we(null);
1148
- if (Ce(() => () => O.current?.(), []), y.status === "loading") return /* @__PURE__ */ J(ie, {
1149
- ...y,
1150
- height: p
1148
+ function Ht(e) {
1149
+ let { points: t, x: n, y: r, referenceDiagonal: i, referenceLines: a = [], frontier: o = [], labeledIds: d = [], range: f, onRangeChange: p, rangeStep: h, selected: v, onSelectedChange: y, height: b = "regular", ...x } = e, { emptyLabel: S = "No points were supplied.", ...w } = x, { locale: T, title: E } = w, D = U(), O = _e(b), k = te(), A = C(), [re, ie] = G(null), se = W(null);
1150
+ if (Te(() => () => se.current?.(), []), w.status === "loading") return /* @__PURE__ */ J(ae, {
1151
+ ...w,
1152
+ height: b
1151
1153
  });
1152
- let k = n.domain ?? u({
1154
+ let M = n.domain ?? u({
1153
1155
  values: t.map((e) => e.x),
1154
1156
  scale: n.scale
1155
- }), A = r.domain ?? u({
1157
+ }), P = r.domain ?? u({
1156
1158
  values: t.map((e) => e.y),
1157
1159
  scale: r.scale
1158
- }), ne = zt({
1160
+ }), I = Bt({
1159
1161
  points: t,
1160
1162
  x: n,
1161
1163
  y: r,
1162
- xDomain: k,
1163
- yDomain: A,
1164
- range: i,
1165
- onRangeChange: a,
1166
- rangeStep: o
1167
- }), re = i ?? null;
1168
- if (ne !== void 0) return /* @__PURE__ */ J(oe, {
1169
- ...y,
1170
- message: ne
1164
+ xDomain: M,
1165
+ yDomain: P,
1166
+ range: f,
1167
+ onRangeChange: p,
1168
+ rangeStep: h
1169
+ }) ?? (a.length > 0 ? ye({
1170
+ lines: a,
1171
+ domain: P
1172
+ }) : void 0), fe = f ?? null;
1173
+ if (I !== void 0) return /* @__PURE__ */ J(ce, {
1174
+ ...w,
1175
+ message: I
1171
1176
  });
1172
- let M = _({
1173
- width: w.width,
1174
- height: w.height,
1177
+ let L = _({
1178
+ width: O.width,
1179
+ height: O.height,
1175
1180
  x: n,
1176
1181
  y: r,
1177
- xDomain: k,
1178
- yDomain: A,
1179
- locale: b
1180
- }), { box: N } = M;
1181
- function F(e) {
1182
- return te({
1182
+ xDomain: M,
1183
+ yDomain: P,
1184
+ locale: T
1185
+ }), { box: R } = L;
1186
+ function z(e) {
1187
+ return ne({
1183
1188
  value: e,
1184
- locale: b,
1189
+ locale: T,
1185
1190
  format: n.format
1186
1191
  });
1187
1192
  }
1188
- function L(e) {
1189
- return te({
1193
+ function me(e) {
1194
+ return ne({
1190
1195
  value: e,
1191
- locale: b,
1196
+ locale: T,
1192
1197
  format: r.format
1193
1198
  });
1194
1199
  }
1195
- let R = t.map((e) => ({
1200
+ let B = t.map((e) => ({
1196
1201
  id: e.id,
1197
- label: `${e.label}, ${n.label}: ${F(e.x)}, ${r.label}: ${L(e.y)}`
1198
- })), le = t.map((e, t) => ({
1202
+ label: `${e.label}, ${n.label}: ${z(e.x)}, ${r.label}: ${me(e.y)}`
1203
+ })), he = t.map((e, t) => ({
1199
1204
  ...e,
1200
- tone: T({
1205
+ tone: k({
1201
1206
  id: e.id,
1202
1207
  tone: e.tone,
1203
1208
  index: t
1204
1209
  }),
1205
- left: M.x.position(e.x),
1206
- top: M.y.position(e.y)
1207
- })), z = new Map(le.map((e) => [e.id, {
1210
+ left: L.x.position(e.x),
1211
+ top: L.y.position(e.y)
1212
+ })), xe = new Map(he.map((e) => [e.id, {
1208
1213
  left: e.left,
1209
1214
  top: e.top,
1210
1215
  right: e.left,
1211
1216
  bottom: e.top
1212
- }])), ue = E === null ? i : {
1213
- x: Bt(E.start.x, E.end.x),
1214
- y: Bt(E.start.y, E.end.y)
1217
+ }])), Ce = re === null ? f : {
1218
+ x: Vt(re.start.x, re.end.x),
1219
+ y: Vt(re.start.y, re.end.y)
1215
1220
  };
1216
- function B(e, t, n) {
1217
- let r = e.getBoundingClientRect(), i = (t - r.left) / r.width * N.width, a = (n - r.top) / r.height * N.height;
1221
+ function V(e, t, n) {
1222
+ let r = e.getBoundingClientRect(), i = (t - r.left) / r.width * R.width, a = (n - r.top) / r.height * R.height;
1218
1223
  return {
1219
- x: M.x.valueAt(Math.min(N.right, Math.max(N.left, i))),
1220
- y: M.y.valueAt(Math.min(N.bottom, Math.max(N.top, a)))
1224
+ x: L.x.valueAt(Math.min(R.right, Math.max(R.left, i))),
1225
+ y: L.y.valueAt(Math.min(R.bottom, Math.max(R.top, a)))
1221
1226
  };
1222
1227
  }
1223
- function de(t) {
1224
- let n = t.button === 0 && t.pointerType !== "touch", r = t.currentTarget, i = r.parentElement, o = t.target instanceof Element && t.target.closest("[data-brush]") !== null, s = n && o;
1225
- if (a === void 0 || O.current !== null || !s || i === null) return;
1226
- let c = B(r, t.clientX, t.clientY);
1227
- D({
1228
- start: c,
1229
- end: c
1230
- }), O.current = K(i, t.nativeEvent, {
1228
+ function we(t) {
1229
+ let n = t.button === 0 && t.pointerType !== "touch", r = t.currentTarget, i = r.parentElement, a = t.target instanceof Element && t.target.closest("[data-brush]") !== null, o = n && a;
1230
+ if (p === void 0 || se.current !== null || !o || i === null) return;
1231
+ let s = V(r, t.clientX, t.clientY);
1232
+ ie({
1233
+ start: s,
1234
+ end: s
1235
+ }), se.current = K(i, t.nativeEvent, {
1231
1236
  cancelOnEscape: !0,
1232
- onMove: ({ x: e, y: t }) => D({
1233
- start: c,
1234
- end: B(r, e, t)
1237
+ onMove: ({ x: e, y: t }) => ie({
1238
+ start: s,
1239
+ end: V(r, e, t)
1235
1240
  }),
1236
1241
  onEnd: (t, n) => {
1237
- if (O.current = null, D(null), n) return;
1238
- let i = B(r, t.clientX, t.clientY), a = {
1239
- x: Bt(c.x, i.x),
1240
- y: Bt(c.y, i.y)
1242
+ if (se.current = null, ie(null), n) return;
1243
+ let i = V(r, t.clientX, t.clientY), a = {
1244
+ x: Vt(s.x, i.x),
1245
+ y: Vt(s.y, i.y)
1241
1246
  };
1242
- De({ options: () => e }, "onRangeChange", a, {
1247
+ ke({ options: () => e }, "onRangeChange", a, {
1243
1248
  reason: "drag",
1244
1249
  event: t
1245
1250
  });
1246
1251
  }
1247
1252
  });
1248
1253
  }
1254
+ let Ee = new Map(he.map((e) => [e.id, e])), De = o.map((e) => Ee.get(e)).filter((e) => e !== void 0), Oe = De.length >= 2 ? Se(De.map((e) => ({
1255
+ x: e.left,
1256
+ y: e.top
1257
+ }))) : "", q = new Set(d), X = i === !0 ? { label: "y = x" } : i === !1 || i === void 0 ? null : i, Z = Math.max(M[0], P[0]), Q = Math.min(M[1], P[1]), Ae = X !== null && Q > Z;
1249
1258
  return /* @__PURE__ */ J(ee, {
1250
- items: R,
1251
- place: (e) => z.get(e),
1252
- selected: d ?? null,
1253
- onSelect: f,
1254
- render: (e, { inspected: i, cursor: u }) => /* @__PURE__ */ Y(j, {
1255
- ...y,
1259
+ ...A,
1260
+ items: B,
1261
+ place: (e) => xe.get(e),
1262
+ selected: v ?? null,
1263
+ onSelect: y,
1264
+ render: (e, { inspected: i, cursor: o }) => /* @__PURE__ */ Y(j, {
1265
+ ...w,
1256
1266
  figure: e,
1257
1267
  footer: /* @__PURE__ */ J(c, {
1258
- id: S,
1259
- children: s(R, i)
1268
+ id: D,
1269
+ children: s(B, i)
1260
1270
  }),
1261
1271
  children: [
1262
- t.length === 0 ? /* @__PURE__ */ J(se, { children: v }) : /* @__PURE__ */ Y(me, {
1263
- plotRef: w.ref,
1264
- box: N,
1272
+ t.length === 0 ? /* @__PURE__ */ J(le, { children: S }) : /* @__PURE__ */ Y(ge, {
1273
+ plotRef: O.ref,
1274
+ box: R,
1265
1275
  label: m({
1266
- title: x,
1267
- isSelectable: f !== void 0
1276
+ title: E,
1277
+ isSelectable: y !== void 0
1268
1278
  }),
1269
- readoutId: S,
1270
- onPointerDown: de,
1271
- overlay: le.map((e, t) => /* @__PURE__ */ J(l, {
1279
+ readoutId: D,
1280
+ onPointerDown: we,
1281
+ overlay: he.map((e, t) => /* @__PURE__ */ J(l, {
1272
1282
  value: e.id,
1273
1283
  render: /* @__PURE__ */ J("button", {
1274
1284
  type: "button",
1275
1285
  tabIndex: -1,
1276
1286
  title: e.label,
1277
- "aria-label": R[t]?.label,
1278
- "aria-pressed": f === void 0 ? void 0 : d === e.id
1287
+ "aria-label": B[t]?.label,
1288
+ "aria-pressed": y === void 0 ? void 0 : v === e.id
1279
1289
  }),
1280
- ...H.props(It.target, It.location(e.left, e.top)),
1290
+ ...H.props(Lt.target, Lt.location(e.left, e.top)),
1281
1291
  children: /* @__PURE__ */ J("span", {
1282
1292
  "aria-hidden": !0,
1283
- ...H.props(It.ring, u === e.id && P.cursor)
1293
+ ...H.props(Lt.ring, o === e.id && N.cursor)
1284
1294
  })
1285
1295
  }, e.id)),
1286
1296
  children: [
1287
- /* @__PURE__ */ J(ce, {
1288
- box: N,
1289
- xTicks: M.xTicks,
1290
- yTicks: M.yTicks,
1297
+ /* @__PURE__ */ J(ue, {
1298
+ box: R,
1299
+ xTicks: L.xTicks,
1300
+ yTicks: L.yTicks,
1291
1301
  xTitle: g(n),
1292
1302
  yTitle: g(r),
1293
1303
  grid: "both"
1294
1304
  }),
1295
- a !== void 0 && /* @__PURE__ */ J("rect", {
1305
+ p !== void 0 && /* @__PURE__ */ J("rect", {
1296
1306
  "data-brush": "",
1297
- x: N.left,
1298
- y: N.top,
1299
- width: N.innerWidth,
1300
- height: N.innerHeight,
1307
+ x: R.left,
1308
+ y: R.top,
1309
+ width: R.innerWidth,
1310
+ height: R.innerHeight,
1301
1311
  className: "xsid9ct xy6m8k3"
1302
1312
  }),
1303
- /* @__PURE__ */ Y(ge, {
1304
- box: N,
1305
- children: [ue != null && /* @__PURE__ */ J(Ht, {
1306
- range: ue,
1307
- plot: M
1308
- }), le.map((e) => /* @__PURE__ */ J(I, {
1309
- x: e.left,
1310
- y: e.top,
1311
- tone: e.tone,
1312
- isInspected: i === e.id,
1313
- isSelected: d === e.id
1314
- }, e.id))]
1313
+ /* @__PURE__ */ Y(ve, {
1314
+ box: R,
1315
+ pad: 6,
1316
+ children: [
1317
+ Ae && /* @__PURE__ */ J(Ut, {
1318
+ spec: X,
1319
+ low: Z,
1320
+ high: Q,
1321
+ plot: L
1322
+ }),
1323
+ a.length > 0 && /* @__PURE__ */ J(be, {
1324
+ lines: a,
1325
+ box: R,
1326
+ position: L.y.position,
1327
+ valueText: me
1328
+ }),
1329
+ Oe !== "" && /* @__PURE__ */ J(pe, {
1330
+ d: Oe,
1331
+ tone: "series1",
1332
+ stroke: "dashed"
1333
+ }),
1334
+ Ce != null && /* @__PURE__ */ J(Wt, {
1335
+ range: Ce,
1336
+ plot: L
1337
+ }),
1338
+ he.map((e) => /* @__PURE__ */ J(de, {
1339
+ mark: e.id,
1340
+ x: e.left,
1341
+ y: e.top,
1342
+ tone: e.tone,
1343
+ isInspected: i === e.id,
1344
+ isSelected: v === e.id
1345
+ }, e.id)),
1346
+ he.filter((e) => q.has(e.id)).map((e) => {
1347
+ let t = e.left > R.right - 90, n = e.top < R.top + 18;
1348
+ return /* @__PURE__ */ J(F, {
1349
+ x: e.left + (t ? -8 : 8),
1350
+ y: e.top + (n ? 14 : -6),
1351
+ anchor: t ? "end" : "start",
1352
+ children: e.label
1353
+ }, `label-${e.id}`);
1354
+ })
1355
+ ]
1315
1356
  })
1316
1357
  ]
1317
1358
  }),
1318
- a !== void 0 && o !== void 0 && /* @__PURE__ */ J(Wt, {
1359
+ p !== void 0 && h !== void 0 && /* @__PURE__ */ J(Kt, {
1319
1360
  x: n,
1320
1361
  y: r,
1321
- xDomain: k,
1322
- yDomain: A,
1323
- range: re,
1324
- rangeStep: o,
1325
- locale: b,
1326
- onRangeChange: a
1362
+ xDomain: M,
1363
+ yDomain: P,
1364
+ range: fe,
1365
+ rangeStep: h,
1366
+ locale: T,
1367
+ onRangeChange: p
1327
1368
  }),
1328
- /* @__PURE__ */ J(ae, {
1329
- label: `${x} points`,
1369
+ /* @__PURE__ */ J(oe, {
1370
+ label: `${E} points`,
1330
1371
  columns: [
1331
1372
  {
1332
1373
  id: "point",
@@ -1345,8 +1386,8 @@ function Vt(e) {
1345
1386
  id: e.id,
1346
1387
  values: [
1347
1388
  e.label,
1348
- F(e.x),
1349
- L(e.y)
1389
+ z(e.x),
1390
+ me(e.y)
1350
1391
  ]
1351
1392
  }))
1352
1393
  })
@@ -1354,7 +1395,38 @@ function Vt(e) {
1354
1395
  })
1355
1396
  });
1356
1397
  }
1357
- function Ht({ range: e, plot: t }) {
1398
+ function Ut({ spec: e, low: t, high: n, plot: r }) {
1399
+ let { box: i } = r, a = r.x.position(n), o = r.y.position(n);
1400
+ return /* @__PURE__ */ Y("g", { children: [
1401
+ /* @__PURE__ */ J("line", {
1402
+ x1: r.x.position(t),
1403
+ y1: r.y.position(t),
1404
+ x2: a,
1405
+ y2: o,
1406
+ className: "xhq4mlf xnpr05h xlz5em3 x47corl x13efnbd"
1407
+ }),
1408
+ e.label !== void 0 && /* @__PURE__ */ J(F, {
1409
+ x: a - 6,
1410
+ y: o + 14,
1411
+ anchor: "end",
1412
+ children: e.label
1413
+ }),
1414
+ e.aboveLabel !== void 0 && /* @__PURE__ */ J("text", {
1415
+ x: i.left + 8,
1416
+ y: i.top + 14,
1417
+ className: "x1q7gtio x1hz01jw xy8obcc x47corl",
1418
+ children: e.aboveLabel
1419
+ }),
1420
+ e.belowLabel !== void 0 && /* @__PURE__ */ J("text", {
1421
+ x: i.right - 8,
1422
+ y: i.bottom - 8,
1423
+ textAnchor: "end",
1424
+ className: "x1q7gtio x1hz01jw xy8obcc x47corl",
1425
+ children: e.belowLabel
1426
+ })
1427
+ ] });
1428
+ }
1429
+ function Wt({ range: e, plot: t }) {
1358
1430
  let n = t.x.position(e.x[0]), r = t.y.position(e.y[1]);
1359
1431
  return /* @__PURE__ */ J("rect", {
1360
1432
  x: n,
@@ -1364,9 +1436,9 @@ function Ht({ range: e, plot: t }) {
1364
1436
  className: "x1e0kj8g xv7c1pl x1tg5nk6 xnpr05h x15lqr97 x47corl"
1365
1437
  });
1366
1438
  }
1367
- function Ut({ axis: e, domain: n, value: r, step: i, locale: a, onChange: o }) {
1439
+ function Gt({ axis: e, domain: n, value: r, step: i, locale: a, onChange: o }) {
1368
1440
  function s(t) {
1369
- return te({
1441
+ return ne({
1370
1442
  value: t,
1371
1443
  locale: a,
1372
1444
  format: e.format
@@ -1400,7 +1472,7 @@ function Ut({ axis: e, domain: n, value: r, step: i, locale: a, onChange: o }) {
1400
1472
  ] }) })]
1401
1473
  });
1402
1474
  }
1403
- function Wt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale: s, onRangeChange: c }) {
1475
+ function Kt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale: s, onRangeChange: c }) {
1404
1476
  let l = a ?? {
1405
1477
  x: r,
1406
1478
  y: i
@@ -1412,7 +1484,7 @@ function Wt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale
1412
1484
  className: "x153jb6y xy8obcc x1jfksii",
1413
1485
  children: "Drag with a mouse, or adjust these bounds to select a coordinate range."
1414
1486
  }),
1415
- /* @__PURE__ */ J(Ut, {
1487
+ /* @__PURE__ */ J(Gt, {
1416
1488
  axis: t,
1417
1489
  domain: r,
1418
1490
  value: l.x,
@@ -1423,7 +1495,7 @@ function Wt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale
1423
1495
  y: l.y
1424
1496
  }, t)
1425
1497
  }),
1426
- /* @__PURE__ */ J(Ut, {
1498
+ /* @__PURE__ */ J(Gt, {
1427
1499
  axis: n,
1428
1500
  domain: i,
1429
1501
  value: l.y,
@@ -1438,7 +1510,7 @@ function Wt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale
1438
1510
  type: "button",
1439
1511
  disabled: a === null,
1440
1512
  onClick: (e) => {
1441
- De({ options: () => ({ onRangeChange: c }) }, "onRangeChange", null, {
1513
+ ke({ options: () => ({ onRangeChange: c }) }, "onRangeChange", null, {
1442
1514
  reason: "clear-press",
1443
1515
  event: e.nativeEvent
1444
1516
  });
@@ -1454,14 +1526,14 @@ var $ = {
1454
1526
  pointsPerSeries: 2e3,
1455
1527
  markers: 200,
1456
1528
  panels: 12
1457
- }, Gt = .01;
1458
- function Kt({ series: e, isStacked: t, markers: n, timeline: r = [] }) {
1529
+ }, qt = .01;
1530
+ function Jt({ series: e, isStacked: t, markers: n, timeline: r = [] }) {
1459
1531
  let i = e[0]?.points.map((e) => e.timestamp) ?? r;
1460
1532
  if (e.length > $.series || i.length > $.pointsPerSeries || n.length > $.markers) return `Choose a window with at most ${$.series} series, ${$.pointsPerSeries} observations per series, and ${$.markers} markers.`;
1461
1533
  if (!o(e) || !o(n)) return "Series and markers require unique identifiers.";
1462
1534
  for (let n of e) {
1463
1535
  if (n.points.length !== i.length) return "Every series must supply the same observation timestamps.";
1464
- let e = Zt({
1536
+ let e = $t({
1465
1537
  points: n.points,
1466
1538
  timestamps: i,
1467
1539
  isStacked: t
@@ -1469,7 +1541,7 @@ function Kt({ series: e, isStacked: t, markers: n, timeline: r = [] }) {
1469
1541
  if (e !== void 0) return e;
1470
1542
  }
1471
1543
  for (let t of n) {
1472
- let n = qt({
1544
+ let n = Yt({
1473
1545
  marker: t,
1474
1546
  series: e,
1475
1547
  timestamps: i
@@ -1480,7 +1552,7 @@ function Kt({ series: e, isStacked: t, markers: n, timeline: r = [] }) {
1480
1552
  if (!Number.isFinite(s) || !Number.isFinite(c)) return "The elapsed-time and value ranges must be finite.";
1481
1553
  if (t && i.some((t, n) => !Number.isFinite(e.reduce((e, t) => e + (t.points[n]?.value ?? 0), 0)))) return "Stacked observation totals must be finite.";
1482
1554
  }
1483
- function qt({ marker: e, series: t, timestamps: n }) {
1555
+ function Yt({ marker: e, series: t, timestamps: n }) {
1484
1556
  if (e.kind === "event") {
1485
1557
  let t = n[0] ?? 0, r = n.at(-1) ?? t, i = e.timestamp >= t && e.timestamp <= r;
1486
1558
  return Number.isFinite(e.timestamp) && i ? void 0 : "Every event marker must fall inside the observed time range.";
@@ -1488,7 +1560,7 @@ function qt({ marker: e, series: t, timestamps: n }) {
1488
1560
  if (!n.includes(e.timestamp)) return "Every time and point marker must align with an observation timestamp.";
1489
1561
  if (e.kind !== "time") return t.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.value === e.value ? void 0 : "Point markers must reference the recorded series value.";
1490
1562
  }
1491
- function Jt({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1563
+ function Xt({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1492
1564
  return JSON.stringify([
1493
1565
  n,
1494
1566
  r,
@@ -1508,12 +1580,12 @@ function Jt({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1508
1580
  ])
1509
1581
  ]);
1510
1582
  }
1511
- function Yt(e, t) {
1583
+ function Zt(e, t) {
1512
1584
  if (e !== t) return [e, t];
1513
- let n = Math.max(1, Math.abs(e) * Gt), r = e - n, i = t + n;
1585
+ let n = Math.max(1, Math.abs(e) * qt), r = e - n, i = t + n;
1514
1586
  return [Number.isFinite(r) ? r : e, Number.isFinite(i) ? i : t];
1515
1587
  }
1516
- function Xt({ series: e, isStacked: t, tones: n }) {
1588
+ function Qt({ series: e, isStacked: t, tones: n }) {
1517
1589
  let r = e.filter((e) => e.tone === void 0);
1518
1590
  return e.map((i, a) => {
1519
1591
  let o = r.findIndex((e) => e.id === i.id), s = n({
@@ -1535,7 +1607,7 @@ function Xt({ series: e, isStacked: t, tones: n }) {
1535
1607
  };
1536
1608
  });
1537
1609
  }
1538
- function Zt({ points: e, timestamps: t, isStacked: n }) {
1610
+ function $t({ points: e, timestamps: t, isStacked: n }) {
1539
1611
  for (let [r, i] of e.entries()) {
1540
1612
  let a = e[r - 1], o = a !== void 0 && i.timestamp <= a.timestamp;
1541
1613
  if (!Number.isFinite(i.timestamp) || i.timestamp !== t[r] || o) return "Observation timestamps must be finite, aligned, and strictly increasing.";
@@ -1544,16 +1616,16 @@ function Zt({ points: e, timestamps: t, isStacked: n }) {
1544
1616
  }
1545
1617
  }
1546
1618
  // packages/charts/src/cartesian/time-series-line.tsx
1547
- function Qt({ series: e, x: t, y: n, pointRadius: r = 3 }) {
1619
+ function en({ series: e, x: t, y: n, pointRadius: r = 3 }) {
1548
1620
  let i = e.points.findLastIndex((e) => e.value !== null);
1549
- return /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J("path", {
1550
- d: be(e.points.map((e) => ({
1621
+ return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("path", {
1622
+ d: Se(e.points.map((e) => ({
1551
1623
  x: t(e.timestamp),
1552
1624
  y: e.value === null ? null : n(e.value + e.base)
1553
1625
  }))),
1554
1626
  fill: "none",
1555
1627
  stroke: a[e.tone],
1556
- ...H.props(P.mark)
1628
+ ...H.props(N.mark)
1557
1629
  }), e.points.filter((t, n) => {
1558
1630
  if (t.value === null) return !1;
1559
1631
  let r = e.points[n - 1]?.value === null || e.points[n + 1]?.value === null;
@@ -1566,18 +1638,18 @@ function Qt({ series: e, x: t, y: n, pointRadius: r = 3 }) {
1566
1638
  }, i.timestamp))] });
1567
1639
  }
1568
1640
  // packages/charts/src/cartesian/sparkline.tsx
1569
- var $t = {
1641
+ var tn = {
1570
1642
  minimum: "Lowest",
1571
1643
  maximum: "Highest",
1572
1644
  last: "Latest"
1573
- }, en = 2.5, tn = 3, nn = {
1645
+ }, nn = 2.5, rn = 3, an = {
1574
1646
  inline: {
1575
1647
  width: 128,
1576
1648
  height: 32
1577
1649
  },
1578
1650
  figure: { height: 48 }
1579
1651
  };
1580
- function rn({ points: e, marked: t }) {
1652
+ function on({ points: e, marked: t }) {
1581
1653
  let n = e.flatMap((e) => e.value === null ? [] : [{
1582
1654
  ...e,
1583
1655
  value: e.value
@@ -1594,8 +1666,8 @@ function rn({ points: e, marked: t }) {
1594
1666
  }];
1595
1667
  });
1596
1668
  }
1597
- function an({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: o, markedPoints: s = [], baseline: c, layout: l = "inline" }) {
1598
- let u = W(), f = F(), p = l === "figure", m = p ? f.width : nn.inline.width, h = p ? nn.figure.height : nn.inline.height, g = W(), _ = C(), v = on({
1669
+ function sn({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: o, markedPoints: s = [], baseline: c, layout: l = "inline" }) {
1670
+ let u = U(), f = P(), p = l === "figure", m = p ? f.width : an.inline.width, h = p ? an.figure.height : an.inline.height, g = U(), _ = te(), v = cn({
1599
1671
  title: e,
1600
1672
  summary: t,
1601
1673
  unit: n,
@@ -1612,19 +1684,19 @@ function an({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1612
1684
  children: v === void 0 ? "No data" : "Invalid trend"
1613
1685
  });
1614
1686
  let y = i.points[0]?.timestamp ?? 0, b = i.points.at(-1)?.timestamp ?? y, x = k({
1615
- domain: Yt(y, b),
1616
- range: [tn, m - tn]
1687
+ domain: Zt(y, b),
1688
+ range: [rn, m - rn]
1617
1689
  }).position, S = k({
1618
1690
  domain: o,
1619
- range: [h - tn, tn]
1620
- }).position, w = Xt({
1691
+ range: [h - rn, rn]
1692
+ }).position, C = Qt({
1621
1693
  series: [i],
1622
1694
  isStacked: !1,
1623
1695
  tones: _
1624
- })[0], te = a[w?.tone ?? "series1"], T = rn({
1696
+ })[0], w = a[C?.tone ?? "series1"], ne = on({
1625
1697
  points: i.points,
1626
1698
  marked: s
1627
- }), E = T.map(({ kind: e, point: t }) => `${$t[e]}: ${t.value} ${n}.`).join(" "), D = c === void 0 ? "" : `Reference: ${c} ${n}.`, O = /* @__PURE__ */ Y("svg", {
1699
+ }), T = ne.map(({ kind: e, point: t }) => `${tn[e]}: ${t.value} ${n}.`).join(" "), E = c === void 0 ? "" : `Reference: ${c} ${n}.`, D = /* @__PURE__ */ Y("svg", {
1628
1700
  role: "img",
1629
1701
  "aria-labelledby": u,
1630
1702
  "aria-describedby": g,
@@ -1657,34 +1729,34 @@ function an({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1657
1729
  " ",
1658
1730
  n,
1659
1731
  ". ",
1660
- E,
1732
+ T,
1661
1733
  " ",
1662
- D
1734
+ E
1663
1735
  ]
1664
1736
  }),
1665
1737
  c !== void 0 && /* @__PURE__ */ J("line", {
1666
- x1: tn,
1667
- x2: m - tn,
1738
+ x1: rn,
1739
+ x2: m - rn,
1668
1740
  y1: S(c),
1669
1741
  y2: S(c),
1670
1742
  className: "x1crw9hw xnpr05h xbw2l0c x13efnbd"
1671
1743
  }),
1672
- w !== void 0 && /* @__PURE__ */ J(Qt, {
1673
- series: w,
1744
+ C !== void 0 && /* @__PURE__ */ J(en, {
1745
+ series: C,
1674
1746
  x,
1675
1747
  y: S,
1676
1748
  pointRadius: 2
1677
1749
  }),
1678
- T.map(({ kind: e, point: t }) => e === "last" ? /* @__PURE__ */ J("circle", {
1750
+ ne.map(({ kind: e, point: t }) => e === "last" ? /* @__PURE__ */ J("circle", {
1679
1751
  cx: x(t.timestamp),
1680
1752
  cy: S(t.value),
1681
- r: en,
1682
- fill: te
1753
+ r: nn,
1754
+ fill: w
1683
1755
  }, e) : /* @__PURE__ */ J("circle", {
1684
1756
  cx: x(t.timestamp),
1685
1757
  cy: S(t.value),
1686
- r: en,
1687
- stroke: te,
1758
+ r: nn,
1759
+ stroke: w,
1688
1760
  className: "x1fytgo2 x1r6sdyr x13efnbd"
1689
1761
  }, e))
1690
1762
  ]
@@ -1695,14 +1767,14 @@ function an({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1695
1767
  children: /* @__PURE__ */ J("div", {
1696
1768
  ref: f.ref,
1697
1769
  className: "x1lliihq xeuugli",
1698
- children: O
1770
+ children: D
1699
1771
  })
1700
- }) : O;
1772
+ }) : D;
1701
1773
  }
1702
- function on({ title: e, summary: t, unit: n, series: r, valueDomain: i, markedPoints: a, baseline: o }) {
1774
+ function cn({ title: e, summary: t, unit: n, series: r, valueDomain: i, markedPoints: a, baseline: o }) {
1703
1775
  if (e.trim() === "" || t.trim() === "" || n.trim() === "") return "A trend requires a title, a readable summary, and a value unit.";
1704
1776
  if (!D(i)) return "The displayed value domain must have finite, increasing bounds.";
1705
- let s = Kt({
1777
+ let s = Jt({
1706
1778
  series: [r],
1707
1779
  isStacked: !1,
1708
1780
  markers: []
@@ -1713,11 +1785,11 @@ function on({ title: e, summary: t, unit: n, series: r, valueDomain: i, markedPo
1713
1785
  if (!(o === void 0 || o >= i[0] && o <= i[1])) return "The reference value must be inside the declared value domain.";
1714
1786
  }
1715
1787
  // packages/charts/src/cartesian/time-series-bands.ts
1716
- var sn = {
1788
+ var ln = {
1717
1789
  bands: 4,
1718
1790
  crossings: 4
1719
1791
  };
1720
- function cn(e) {
1792
+ function un(e) {
1721
1793
  let t = [
1722
1794
  e.lower,
1723
1795
  e.center,
@@ -1725,18 +1797,18 @@ function cn(e) {
1725
1797
  ].filter((e) => e !== null);
1726
1798
  return t.some((e) => !Number.isFinite(e)) ? "Band values must be finite numbers or explicit missing values." : e.lower === null == (e.upper === null) ? t.every((e, n) => n === 0 || (t[n - 1] ?? e) <= e) ? void 0 : "Band values must satisfy lower ≤ center ≤ upper." : "A band observation needs both bounds or neither.";
1727
1799
  }
1728
- function ln({ bands: e, crossings: t, series: n, timestamps: r }) {
1729
- if (e.length > sn.bands || t.length > sn.crossings) return `Supply at most ${sn.bands} bands and ${sn.crossings} crossings.`;
1800
+ function dn({ bands: e, crossings: t, series: n, timestamps: r }) {
1801
+ if (e.length > ln.bands || t.length > ln.crossings) return `Supply at most ${ln.bands} bands and ${ln.crossings} crossings.`;
1730
1802
  if (!o([...n, ...e]) || !o(t)) return "Series, bands, and crossings require unique identifiers.";
1731
1803
  for (let t of e) {
1732
1804
  if (t.points.length !== r.length || t.points.some((e, t) => e.timestamp !== r[t])) return "Every band must supply the same observation timestamps as the series.";
1733
- let e = t.points.map(cn).find((e) => e !== void 0);
1805
+ let e = t.points.map(un).find((e) => e !== void 0);
1734
1806
  if (e !== void 0) return e;
1735
1807
  }
1736
1808
  let i = new Set([...n, ...e].map((e) => e.id));
1737
1809
  for (let e of t) if (!(i.has(e.seriesId) && e.label.trim() !== "") || !Number.isFinite(e.value)) return "Each crossing needs a label, a finite value, and a supplied series or band.";
1738
1810
  }
1739
- function un({ series: e, bands: t, tones: n }) {
1811
+ function fn({ series: e, bands: t, tones: n }) {
1740
1812
  let r = e.filter((e) => e.tone === void 0).length, i = t.filter((e) => e.tone === void 0);
1741
1813
  return t.map((e) => {
1742
1814
  let t = r + i.findIndex((t) => t.id === e.id);
@@ -1750,7 +1822,7 @@ function un({ series: e, bands: t, tones: n }) {
1750
1822
  };
1751
1823
  });
1752
1824
  }
1753
- function dn({ start: e, end: t, value: n, direction: r }) {
1825
+ function pn({ start: e, end: t, value: n, direction: r }) {
1754
1826
  let i = e > n && t <= n, a = e < n && t >= n;
1755
1827
  switch (r) {
1756
1828
  case "falling": return i;
@@ -1758,7 +1830,7 @@ function dn({ start: e, end: t, value: n, direction: r }) {
1758
1830
  case void 0: return i || a;
1759
1831
  }
1760
1832
  }
1761
- function fn({ points: e, crossing: t }) {
1833
+ function mn({ points: e, crossing: t }) {
1762
1834
  let n = e.flatMap((t, n) => {
1763
1835
  let r = e[n + 1];
1764
1836
  return t.value === null || r === void 0 || r.value === null ? [] : [{
@@ -1767,7 +1839,7 @@ function fn({ points: e, crossing: t }) {
1767
1839
  from: t.value,
1768
1840
  to: r.value
1769
1841
  }];
1770
- }).find(({ from: e, to: n }) => dn({
1842
+ }).find(({ from: e, to: n }) => pn({
1771
1843
  start: e,
1772
1844
  end: n,
1773
1845
  value: t.value,
@@ -1777,10 +1849,10 @@ function fn({ points: e, crossing: t }) {
1777
1849
  let r = (t.value - n.from) / (n.to - n.from);
1778
1850
  return n.start + r * (n.end - n.start);
1779
1851
  }
1780
- function pn({ crossings: e, series: t, bands: n }) {
1852
+ function hn({ crossings: e, series: t, bands: n }) {
1781
1853
  return e.map((e) => ({
1782
1854
  crossing: e,
1783
- timestamp: fn({
1855
+ timestamp: mn({
1784
1856
  points: t.find((t) => t.id === e.seriesId)?.points ?? n.find((t) => t.id === e.seriesId)?.points.map((e) => ({
1785
1857
  timestamp: e.timestamp,
1786
1858
  value: e.center
@@ -1789,11 +1861,11 @@ function pn({ crossings: e, series: t, bands: n }) {
1789
1861
  })
1790
1862
  }));
1791
1863
  }
1792
- function mn(e, t) {
1864
+ function gn(e, t) {
1793
1865
  let n = Math.min(...e.map((e) => Math.abs(e - t)));
1794
1866
  return e.find((e) => Math.abs(e - t) === n);
1795
1867
  }
1796
- function hn(e) {
1868
+ function _n(e) {
1797
1869
  return e.flatMap((e) => e.points.flatMap((e) => [
1798
1870
  e.lower,
1799
1871
  e.center,
@@ -1801,23 +1873,23 @@ function hn(e) {
1801
1873
  ].filter((e) => e !== null)));
1802
1874
  }
1803
1875
  // packages/charts/src/chart-range.tsx
1804
- var gn = "axis", _n = "selected", vn = "drawn";
1805
- function yn({ value: e }) {
1876
+ var vn = "axis", yn = "selected", bn = "drawn";
1877
+ function xn({ value: e }) {
1806
1878
  return {
1807
1879
  value: e,
1808
1880
  spans: e === null ? [] : [{
1809
- id: _n,
1810
- track: gn,
1881
+ id: yn,
1882
+ track: vn,
1811
1883
  start: e[0],
1812
1884
  end: e[1]
1813
1885
  }]
1814
1886
  };
1815
1887
  }
1816
- function bn(e, t) {
1888
+ function Sn(e, t) {
1817
1889
  let { draft: n } = e;
1818
1890
  return n?.action === "draw" ? t.filter((e) => e.id === n.id) : t;
1819
1891
  }
1820
- var xn = Ee({
1892
+ var Cn = Oe({
1821
1893
  name: "chart-range",
1822
1894
  options: {
1823
1895
  value: "value",
@@ -1829,12 +1901,12 @@ var xn = Ee({
1829
1901
  },
1830
1902
  controlled: ["value"],
1831
1903
  state: (e) => ({
1832
- ...yn(e),
1904
+ ...xn(e),
1833
1905
  draft: null
1834
1906
  }),
1835
- sync: yn,
1907
+ sync: xn,
1836
1908
  api: (e) => {
1837
- let t = q(e);
1909
+ let t = Ee(e);
1838
1910
  function n(n, { id: r, action: i, reason: a, event: o }) {
1839
1911
  let s = i === "delete" ? void 0 : n.find((e) => e.id === r), c = s === void 0 ? null : [s.start, s.end], l = t("value", c, o === void 0 ? { reason: a } : {
1840
1912
  reason: a,
@@ -1842,7 +1914,7 @@ var xn = Ee({
1842
1914
  });
1843
1915
  return l && i === "delete" && e.element("root")?.querySelector("[tabindex=\"0\"]:not([data-span-id])")?.focus(), l;
1844
1916
  }
1845
- let r = Te(e, {
1917
+ let r = De(e, {
1846
1918
  key: "spans",
1847
1919
  draft: "draft",
1848
1920
  axis: "x",
@@ -1851,7 +1923,7 @@ var xn = Ee({
1851
1923
  step: () => e.options().step,
1852
1924
  create: (e) => ({
1853
1925
  ...e,
1854
- id: vn
1926
+ id: bn
1855
1927
  }),
1856
1928
  label: (t) => e.options().describe([t.start, t.end]),
1857
1929
  createAutoScroll: !1,
@@ -1860,13 +1932,13 @@ var xn = Ee({
1860
1932
  return {
1861
1933
  spans: r,
1862
1934
  shown(t) {
1863
- return bn(t, r.spans(t)).map((t) => ({
1935
+ return Sn(t, r.spans(t)).map((t) => ({
1864
1936
  id: t.id,
1865
1937
  label: e.options().describe([t.start, t.end])
1866
1938
  }));
1867
1939
  },
1868
1940
  draw(e) {
1869
- e.button === 0 && e.pointerType !== "touch" && r.trackPointerdown(e, gn);
1941
+ e.button === 0 && e.pointerType !== "touch" && r.trackPointerdown(e, vn);
1870
1942
  },
1871
1943
  setRange(n, r) {
1872
1944
  let { min: i, max: a, step: o } = e.options(), s = [Number(n), Number(r)].map((e) => i + Math.round((e - i) / o) * o), c = Math.max(i, Math.min(...s)), l = Math.min(a, Math.max(...s));
@@ -1884,7 +1956,7 @@ var xn = Ee({
1884
1956
  state: (e, { api: t }) => ({ spans: t.shown(e) }),
1885
1957
  on: { pointerdown: (e, { api: t }) => t.draw(e) }
1886
1958
  }),
1887
- track: e({ bind: (e, { api: t }) => t.spans.bindTrack(e, gn) }),
1959
+ track: e({ bind: (e, { api: t }) => t.spans.bindTrack(e, vn) }),
1888
1960
  span: e({
1889
1961
  role: "group",
1890
1962
  props: { value: "string" },
@@ -1906,17 +1978,17 @@ var xn = Ee({
1906
1978
  })
1907
1979
  }),
1908
1980
  agent: { actions: ["setRange", "clear"] }
1909
- }), Sn = U(xn, {
1981
+ }), wn = we(Cn, {
1910
1982
  root: "div",
1911
1983
  track: "div",
1912
1984
  span: "div"
1913
- }), Cn = Sn.Root, wn = Sn.Track, Tn = Sn.Span, En = {
1985
+ }), Tn = wn.Root, En = wn.Track, Dn = wn.Span, On = {
1914
1986
  kVAEAm: "x10l6tqk",
1915
1987
  k87sOh: "x13vifvy",
1916
1988
  kfzvcC: "x47corl",
1917
1989
  $$css: !0
1918
- }, Dn = { track: (e, t, n) => [
1919
- En,
1990
+ }, kn = { track: (e, t, n) => [
1991
+ On,
1920
1992
  {
1921
1993
  kbCHJM: e == null ? e : "xgq9j65",
1922
1994
  kzqmXN: t == null ? t : "x5lhr3w",
@@ -1929,16 +2001,16 @@ var xn = Ee({
1929
2001
  "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(n)
1930
2002
  }
1931
2003
  ] };
1932
- function On({ left: e, width: t, height: n, label: r, children: i, ...a }) {
1933
- return /* @__PURE__ */ J(Cn, {
2004
+ function An({ left: e, width: t, height: n, label: r, children: i, ...a }) {
2005
+ return /* @__PURE__ */ J(Tn, {
1934
2006
  ...a,
1935
2007
  "aria-label": r,
1936
2008
  className: "x1n2onr6 xeuugli",
1937
2009
  render: (r, { spans: a }) => /* @__PURE__ */ Y("div", {
1938
2010
  ...r,
1939
- children: [i, /* @__PURE__ */ J(wn, {
1940
- ...H.props(Dn.track(e, t, n)),
1941
- children: a.map((e) => /* @__PURE__ */ Y(Tn, {
2011
+ children: [i, /* @__PURE__ */ J(En, {
2012
+ ...H.props(kn.track(e, t, n)),
2013
+ children: a.map((e) => /* @__PURE__ */ Y(Dn, {
1942
2014
  value: e.id,
1943
2015
  "aria-label": `Selected range, ${e.label}. Use arrow keys to move it, Shift and an arrow to move its end, and Delete to clear it.`,
1944
2016
  className: "x10l6tqk x13vifvy x5yr21d x9f619 x1qatu44 x1l0rsgs x1616tdu xbsl7fq xbm8b0d x1n2ykn x1t137rt x19rmrnh x9v5kkp x13qnu6 x1bqaal",
@@ -1959,11 +2031,11 @@ function On({ left: e, width: t, height: n, label: r, children: i, ...a }) {
1959
2031
  });
1960
2032
  }
1961
2033
  // packages/charts/src/cartesian/time-series-overlays.tsx
1962
- var kn = 16, An = 6, jn = 6.5, Mn = 4;
1963
- function Nn({ instants: e, x: t, right: n, ends: r }) {
2034
+ var jn = 16, Mn = 6, Nn = 6.5, Pn = 4;
2035
+ function Fn({ instants: e, x: t, right: n, ends: r }) {
1964
2036
  let [i, ...a] = e;
1965
2037
  if (i === void 0) return [];
1966
- let o = t(i.timestamp), s = i.label.length * jn + An, c = o + s > n ? "end" : "start", l = c === "start" ? o : o - s, u = c === "start" ? o + s : o, d = r.findIndex((e) => l > e), f = d === -1 ? Math.min(r.length, 1) : d, p = [
2038
+ let o = t(i.timestamp), s = i.label.length * Nn + Mn, c = o + s > n ? "end" : "start", l = c === "start" ? o : o - s, u = c === "start" ? o + s : o, d = r.findIndex((e) => l > e), f = d === -1 ? Math.min(r.length, 1) : d, p = [
1967
2039
  ...r.slice(0, f),
1968
2040
  Math.max(u, r[f] ?? u),
1969
2041
  ...r.slice(f + 1)
@@ -1972,25 +2044,25 @@ function Nn({ instants: e, x: t, right: n, ends: r }) {
1972
2044
  ...i,
1973
2045
  lane: f,
1974
2046
  anchor: c
1975
- }, ...Nn({
2047
+ }, ...Fn({
1976
2048
  instants: a,
1977
2049
  x: t,
1978
2050
  right: n,
1979
2051
  ends: p
1980
2052
  })];
1981
2053
  }
1982
- function Pn({ instants: e, x: t, right: n }) {
1983
- return Nn({
2054
+ function In({ instants: e, x: t, right: n }) {
2055
+ return Fn({
1984
2056
  instants: e.toSorted((e, t) => e.timestamp - t.timestamp),
1985
2057
  x: t,
1986
2058
  right: n,
1987
2059
  ends: []
1988
2060
  });
1989
2061
  }
1990
- function Fn(e) {
1991
- return Math.max(0, ...e.map((e) => e.lane + 1)) * kn;
2062
+ function Ln(e) {
2063
+ return Math.max(0, ...e.map((e) => e.lane + 1)) * jn;
1992
2064
  }
1993
- function In({ bands: e, x: t, y: n }) {
2065
+ function Rn({ bands: e, x: t, y: n }) {
1994
2066
  return /* @__PURE__ */ J("g", { children: e.map((e) => {
1995
2067
  function r(t) {
1996
2068
  return e.points.map((e) => {
@@ -1999,15 +2071,15 @@ function In({ bands: e, x: t, y: n }) {
1999
2071
  });
2000
2072
  }
2001
2073
  let i = r((e) => e.lower), a = r((e) => e.upper), o = r((e) => e.center), s = e.points.map((e) => t(e.timestamp));
2002
- return /* @__PURE__ */ Y("g", { children: [/* @__PURE__ */ J(B, {
2003
- d: xe(s.map((e, t) => ({
2074
+ return /* @__PURE__ */ Y("g", { children: [/* @__PURE__ */ J(R, {
2075
+ d: Ce(s.map((e, t) => ({
2004
2076
  x: e,
2005
2077
  y0: i[t] ?? null,
2006
2078
  y1: a[t] ?? null
2007
2079
  }))),
2008
2080
  tone: e.tone
2009
- }), /* @__PURE__ */ J(ue, {
2010
- d: be(s.map((e, t) => ({
2081
+ }), /* @__PURE__ */ J(pe, {
2082
+ d: Se(s.map((e, t) => ({
2011
2083
  x: e,
2012
2084
  y: o[t] ?? null
2013
2085
  }))),
@@ -2015,25 +2087,25 @@ function In({ bands: e, x: t, y: n }) {
2015
2087
  })] }, e.id);
2016
2088
  }) });
2017
2089
  }
2018
- function Ln({ placed: e, x: t, y: n, top: r, bottom: i }) {
2019
- let a = r - Fn(e);
2090
+ function zn({ placed: e, x: t, y: n, top: r, bottom: i }) {
2091
+ let a = r - Ln(e);
2020
2092
  return /* @__PURE__ */ J("g", {
2021
2093
  "aria-hidden": !0,
2022
2094
  children: e.map((e) => {
2023
- let r = t(e.timestamp), o = a + (e.lane + 1 / 2) * kn, s = e.anchor === "start" ? r + An : r - An;
2095
+ let r = t(e.timestamp), o = a + (e.lane + 1 / 2) * jn, s = e.anchor === "start" ? r + Mn : r - Mn;
2024
2096
  return /* @__PURE__ */ Y("g", { children: [
2025
- /* @__PURE__ */ J(de, {
2097
+ /* @__PURE__ */ J(z, {
2026
2098
  x: r,
2027
2099
  top: o,
2028
2100
  bottom: i
2029
2101
  }),
2030
- /* @__PURE__ */ J(L, {
2102
+ /* @__PURE__ */ J(F, {
2031
2103
  x: s,
2032
- y: o + Mn,
2104
+ y: o + Pn,
2033
2105
  anchor: e.anchor,
2034
2106
  children: e.label
2035
2107
  }),
2036
- e.value !== void 0 && /* @__PURE__ */ J(R, {
2108
+ e.value !== void 0 && /* @__PURE__ */ J(I, {
2037
2109
  x: r,
2038
2110
  y: n(e.value)
2039
2111
  })
@@ -2042,35 +2114,35 @@ function Ln({ placed: e, x: t, y: n, top: r, bottom: i }) {
2042
2114
  });
2043
2115
  }
2044
2116
  // packages/charts/src/cartesian/time-series.tsx
2045
- var Rn = {
2117
+ var Bn = {
2046
2118
  seconds: 1e3,
2047
2119
  milliseconds: 1
2048
- }, zn = 24, Bn = 12, Vn = 2.5, Hn = 4, Un = {
2120
+ }, Vn = 24, Hn = 12, Un = 2.5, Wn = 4, Gn = {
2049
2121
  line: "line",
2050
2122
  area: "swatch"
2051
2123
  };
2052
- function Wn(e, t) {
2053
- return e * Rn[t];
2124
+ function Kn(e, t) {
2125
+ return e * Bn[t];
2054
2126
  }
2055
- function Gn({ format: e, tickFormat: t, label: n = "" }) {
2127
+ function qn({ format: e, tickFormat: t, label: n = "" }) {
2056
2128
  return {
2057
2129
  label: n,
2058
2130
  format: e,
2059
2131
  tickFormat: t
2060
2132
  };
2061
2133
  }
2062
- function Kn({ series: e, isStacked: t, isZeroBased: n, bands: r, crossings: i }) {
2134
+ function Jn({ series: e, isStacked: t, isZeroBased: n, bands: r, crossings: i }) {
2063
2135
  let a = (e[0]?.points ?? []).map((t, n) => e.reduce((e, t) => e + (t.points[n]?.value ?? 0), 0)), o = t ? a : e.flatMap((e) => e.points.map((e) => e.value));
2064
2136
  return u({
2065
2137
  values: [
2066
2138
  ...o,
2067
- ...hn(r),
2139
+ ..._n(r),
2068
2140
  ...i.map((e) => e.value)
2069
2141
  ],
2070
2142
  isZeroBased: n
2071
2143
  });
2072
2144
  }
2073
- function qn({ bands: e, crossings: t }) {
2145
+ function Yn({ bands: e, crossings: t }) {
2074
2146
  return JSON.stringify([e.map((e) => [
2075
2147
  e.id,
2076
2148
  e.label,
@@ -2090,7 +2162,7 @@ function qn({ bands: e, crossings: t }) {
2090
2162
  e.direction
2091
2163
  ])]);
2092
2164
  }
2093
- function Jn({ bands: e, timestamp: t, valueText: n }) {
2165
+ function Xn({ bands: e, timestamp: t, valueText: n }) {
2094
2166
  return e.flatMap((e) => {
2095
2167
  let r = e.points.find((e) => e.timestamp === t), i = r?.center ?? null, a = r?.lower !== null && r?.upper !== null && r !== void 0;
2096
2168
  return [{
@@ -2108,28 +2180,28 @@ function Jn({ bands: e, timestamp: t, valueText: n }) {
2108
2180
  }];
2109
2181
  });
2110
2182
  }
2111
- function Yn({ found: e, timeText: t }) {
2183
+ function Zn({ found: e, timeText: t }) {
2112
2184
  return e.timestamp === void 0 ? `${e.crossing.label} · Not reached in this range` : `About ${t(e.timestamp)} · ${e.crossing.label}`;
2113
2185
  }
2114
- function Xn(e) {
2115
- return /* @__PURE__ */ J(nr, {
2186
+ function Qn(e) {
2187
+ return /* @__PURE__ */ J(ir, {
2116
2188
  ...e,
2117
2189
  kind: "line",
2118
2190
  isStacked: !1
2119
2191
  });
2120
2192
  }
2121
- function Zn({ isStacked: e = !1, ...t }) {
2122
- return /* @__PURE__ */ J(nr, {
2193
+ function $n({ isStacked: e = !1, ...t }) {
2194
+ return /* @__PURE__ */ J(ir, {
2123
2195
  ...t,
2124
2196
  kind: "area",
2125
2197
  isStacked: e
2126
2198
  });
2127
2199
  }
2128
- function Qn(e) {
2129
- return /* @__PURE__ */ J($n, { ...e });
2200
+ function er(e) {
2201
+ return /* @__PURE__ */ J(tr, { ...e });
2130
2202
  }
2131
- function $n({ series: e, height: t = "compact", showTimeAxis: i = !0, ...a }) {
2132
- let o = W(), s = C(), c = Xt({
2203
+ function tr({ series: e, height: t = "compact", showTimeAxis: i = !0, ...a }) {
2204
+ let o = U(), s = te(), c = Qt({
2133
2205
  series: e.map((e) => ({
2134
2206
  ...e,
2135
2207
  points: []
@@ -2145,7 +2217,7 @@ function $n({ series: e, height: t = "compact", showTimeAxis: i = !0, ...a }) {
2145
2217
  ...a,
2146
2218
  status: "loading",
2147
2219
  series: c,
2148
- seriesLegend: /* @__PURE__ */ J(M, {
2220
+ seriesLegend: /* @__PURE__ */ J(se, {
2149
2221
  id: o,
2150
2222
  label: void 0,
2151
2223
  legend: c,
@@ -2158,37 +2230,37 @@ function $n({ series: e, height: t = "compact", showTimeAxis: i = !0, ...a }) {
2158
2230
  className: "xrvj5dj x1n8ia3y",
2159
2231
  children: /* @__PURE__ */ Y("div", {
2160
2232
  className: "xeuugli",
2161
- children: [/* @__PURE__ */ J(r, { height: f[t] - zn }), /* @__PURE__ */ J("div", {
2233
+ children: [/* @__PURE__ */ J(r, { height: f[t] - Vn }), /* @__PURE__ */ J("div", {
2162
2234
  className: "x78zum5 x6s0dn4 x1qughib x8zbtdt xxk0z11",
2163
- children: i && /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J(n, { width: "8ch" }), /* @__PURE__ */ J(n, { width: "8ch" })] })
2235
+ children: i && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(n, { width: "8ch" }), /* @__PURE__ */ J(n, { width: "8ch" })] })
2164
2236
  })]
2165
2237
  })
2166
2238
  })
2167
2239
  })
2168
2240
  });
2169
2241
  }
2170
- function er({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact", locale: i, status: a }) {
2171
- let s = we(null), [c, l] = G(), u = JSON.stringify(e.map((e) => [
2242
+ function nr({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact", locale: i, status: a }) {
2243
+ let s = W(null), [c, l] = G(), u = JSON.stringify(e.map((e) => [
2172
2244
  e.id,
2173
2245
  e.title,
2174
- Jt({
2246
+ Xt({
2175
2247
  series: e.series,
2176
2248
  markers: e.markers ?? [],
2177
2249
  timestampUnit: t,
2178
2250
  isStacked: !1
2179
2251
  })
2180
2252
  ])), d = JSON.stringify(e[0]?.series[0]?.points.map((e) => e.timestamp) ?? []), p = e.every((e) => JSON.stringify(e.series[0]?.points.map((e) => e.timestamp) ?? []) === d);
2181
- if (c !== void 0 && c.signature !== u && l(void 0), a === "loading") return /* @__PURE__ */ J(tr, {
2253
+ if (c !== void 0 && c.signature !== u && l(void 0), a === "loading") return /* @__PURE__ */ J(rr, {
2182
2254
  charts: e,
2183
2255
  height: r,
2184
2256
  locale: i
2185
2257
  });
2186
- if (!p || !o(e)) return /* @__PURE__ */ J(oe, {
2258
+ if (!p || !o(e)) return /* @__PURE__ */ J(ce, {
2187
2259
  title: "Small multiples",
2188
2260
  locale: i,
2189
2261
  message: "Charts need unique identifiers and aligned observation timestamps."
2190
2262
  });
2191
- if (e.length > $.panels) return /* @__PURE__ */ J(oe, {
2263
+ if (e.length > $.panels) return /* @__PURE__ */ J(ce, {
2192
2264
  title: "Small multiples",
2193
2265
  locale: i,
2194
2266
  message: `Choose at most ${$.panels} panels.`
@@ -2196,19 +2268,19 @@ function er({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact",
2196
2268
  if (e.length === 0) return /* @__PURE__ */ J(j, {
2197
2269
  title: "Small multiples",
2198
2270
  locale: i,
2199
- children: /* @__PURE__ */ J(se, { children: "No charts" })
2271
+ children: /* @__PURE__ */ J(le, { children: "No charts" })
2200
2272
  });
2201
2273
  let m = h({
2202
2274
  height: f[r],
2203
2275
  locale: i,
2204
2276
  hasValueTitle: e.some((e) => e.valueLabel !== void 0),
2205
2277
  axes: e.map((e) => ({
2206
- axis: Gn({
2278
+ axis: qn({
2207
2279
  format: e.valueFormat,
2208
2280
  tickFormat: e.tickFormat,
2209
2281
  label: e.valueLabel
2210
2282
  }),
2211
- domain: Kn({
2283
+ domain: Jn({
2212
2284
  series: e.series,
2213
2285
  isStacked: !1,
2214
2286
  isZeroBased: !1,
@@ -2228,7 +2300,7 @@ function er({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact",
2228
2300
  0: {},
2229
2301
  1: { className: "x1y332i5" }
2230
2302
  }[!!(g && f > 0) | 0],
2231
- children: /* @__PURE__ */ J(nr, {
2303
+ children: /* @__PURE__ */ J(ir, {
2232
2304
  ...d,
2233
2305
  locale: i,
2234
2306
  status: a,
@@ -2253,8 +2325,8 @@ function er({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact",
2253
2325
  }, o))
2254
2326
  });
2255
2327
  }
2256
- function tr({ charts: e, height: t, locale: n }) {
2257
- if (!o(e) || e.length > $.panels) return /* @__PURE__ */ J(oe, {
2328
+ function rr({ charts: e, height: t, locale: n }) {
2329
+ if (!o(e) || e.length > $.panels) return /* @__PURE__ */ J(ce, {
2258
2330
  title: "Small multiples",
2259
2331
  locale: n,
2260
2332
  message: `Choose at most ${$.panels} panels with unique identifiers.`
@@ -2272,7 +2344,7 @@ function tr({ charts: e, height: t, locale: n }) {
2272
2344
  0: {},
2273
2345
  1: { className: "x1y332i5" }
2274
2346
  }[!!(r && o > 0) | 0],
2275
- children: /* @__PURE__ */ J($n, {
2347
+ children: /* @__PURE__ */ J(tr, {
2276
2348
  ...a,
2277
2349
  locale: n,
2278
2350
  height: t,
@@ -2281,150 +2353,150 @@ function tr({ charts: e, height: t, locale: n }) {
2281
2353
  }, i))
2282
2354
  });
2283
2355
  }
2284
- function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFormat: a, valueLabel: o, markers: s = [], height: c = "compact", kind: l, isStacked: u, sharedInspection: d, gutter: f, showTimeAxis: p = !0, bands: h = [], crossings: g = [], range: _ = null, onRangeChange: y, rangeStep: b, emptyLabel: x = "No observations", ...S }) {
2285
- let { title: T, locale: E, report: D } = S, O = C(), k = he(c), A = W(), ie = h[0]?.points.map((e) => e.timestamp) ?? [], N = t[0]?.points.map((e) => e.timestamp) ?? ie, P = Kt({
2356
+ function ir({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFormat: a, valueLabel: o, markers: s = [], height: c = "compact", kind: l, isStacked: u, sharedInspection: d, gutter: f, showTimeAxis: p = !0, bands: h = [], crossings: g = [], range: _ = null, onRangeChange: y, rangeStep: b, emptyLabel: x = "No observations", ...S }) {
2357
+ let { title: C, locale: T, report: E } = S, D = te(), O = _e(c), k = U(), A = h[0]?.points.map((e) => e.timestamp) ?? [], ae = t[0]?.points.map((e) => e.timestamp) ?? A, M = Jt({
2286
2358
  series: t,
2287
2359
  isStacked: u,
2288
2360
  markers: s,
2289
- timeline: ie
2290
- }) ?? ln({
2361
+ timeline: A
2362
+ }) ?? dn({
2291
2363
  bands: h,
2292
2364
  crossings: g,
2293
2365
  series: t,
2294
- timestamps: N
2295
- }) ?? rr({
2366
+ timestamps: ae
2367
+ }) ?? ar({
2296
2368
  range: _,
2297
2369
  rangeStep: b,
2298
2370
  isSelectable: y !== void 0,
2299
- timeline: N
2300
- }), F = P === void 0 ? Xt({
2371
+ timeline: ae
2372
+ }), N = M === void 0 ? Qt({
2301
2373
  series: t,
2302
2374
  isStacked: u,
2303
- tones: O
2304
- }) : [], L = P === void 0 ? un({
2375
+ tones: D
2376
+ }) : [], P = M === void 0 ? fn({
2305
2377
  series: t,
2306
2378
  bands: h,
2307
- tones: O
2308
- }) : [], z = F[0]?.points ?? L[0]?.points ?? [];
2309
- function B(e) {
2379
+ tones: D
2380
+ }) : [], F = N[0]?.points ?? P[0]?.points ?? [];
2381
+ function L(e) {
2310
2382
  return w({
2311
- timestamp: Wn(e, n),
2312
- locale: E,
2383
+ timestamp: Kn(e, n),
2384
+ locale: T,
2313
2385
  format: r
2314
2386
  });
2315
2387
  }
2316
- function V(e) {
2317
- return te({
2388
+ function R(e) {
2389
+ return ne({
2318
2390
  value: e,
2319
- locale: E,
2391
+ locale: T,
2320
2392
  format: i
2321
2393
  });
2322
2394
  }
2323
- let fe = z.map(({ timestamp: e }) => ({
2395
+ let me = F.map(({ timestamp: e }) => ({
2324
2396
  id: String(e),
2325
- label: B(e)
2326
- })), _e = `${Jt({
2397
+ label: L(e)
2398
+ })), B = `${Xt({
2327
2399
  series: t,
2328
2400
  markers: s,
2329
2401
  timestampUnit: n,
2330
2402
  isStacked: u
2331
- })}${qn({
2403
+ })}${Yn({
2332
2404
  bands: h,
2333
2405
  crossings: g
2334
- })}`, ve = [...F.map(({ id: e, label: t, tone: n }) => ({
2406
+ })}`, ye = [...N.map(({ id: e, label: t, tone: n }) => ({
2335
2407
  id: e,
2336
2408
  label: t,
2337
2409
  tone: n,
2338
- shape: Un[l]
2339
- })), ...L.map(({ id: e, label: t, tone: n }) => ({
2410
+ shape: Gn[l]
2411
+ })), ...P.map(({ id: e, label: t, tone: n }) => ({
2340
2412
  id: e,
2341
2413
  label: t,
2342
2414
  tone: n,
2343
2415
  shape: "band"
2344
- }))], H = D?.seriesValues !== void 0;
2345
- if (S.status === "loading") return /* @__PURE__ */ J($n, {
2416
+ }))], be = E?.seriesValues !== void 0;
2417
+ if (S.status === "loading") return /* @__PURE__ */ J(tr, {
2346
2418
  ...S,
2347
2419
  series: t,
2348
2420
  height: c,
2349
2421
  showTimeAxis: p
2350
2422
  });
2351
- if (P !== void 0) return /* @__PURE__ */ J(oe, {
2423
+ if (M !== void 0) return /* @__PURE__ */ J(ce, {
2352
2424
  ...S,
2353
- message: P
2425
+ message: M
2354
2426
  });
2355
- if (z.length === 0) return /* @__PURE__ */ J(j, {
2427
+ if (F.length === 0) return /* @__PURE__ */ J(j, {
2356
2428
  ...S,
2357
- series: ve,
2358
- children: /* @__PURE__ */ J(se, { children: x })
2429
+ series: ye,
2430
+ children: /* @__PURE__ */ J(le, { children: x })
2359
2431
  });
2360
- let U = z.map((e) => e.timestamp), Ce = pn({
2432
+ let H = F.map((e) => e.timestamp), we = hn({
2361
2433
  crossings: g,
2362
2434
  series: t,
2363
2435
  bands: h
2364
- }), we = [...s.flatMap((e) => e.kind === "event" ? [e] : []), ...Ce.flatMap(({ crossing: e, timestamp: t }) => t === void 0 ? [] : [{
2436
+ }), Te = [...s.flatMap((e) => e.kind === "event" ? [e] : []), ...we.flatMap(({ crossing: e, timestamp: t }) => t === void 0 ? [] : [{
2365
2437
  id: e.id,
2366
2438
  timestamp: t,
2367
2439
  label: e.label,
2368
2440
  value: e.value
2369
2441
  }])];
2370
- function G(e) {
2442
+ function W(e) {
2371
2443
  return {
2372
- label: e === void 0 ? void 0 : B(e),
2373
- rows: [...F.map((t) => {
2444
+ label: e === void 0 ? void 0 : L(e),
2445
+ rows: [...N.map((t) => {
2374
2446
  let n = t.points.find((t) => t.timestamp === e);
2375
2447
  return {
2376
2448
  id: t.id,
2377
2449
  label: t.label,
2378
2450
  tone: t.tone,
2379
- value: V(n?.value ?? null)
2451
+ value: R(n?.value ?? null)
2380
2452
  };
2381
- }), ...Jn({
2382
- bands: L,
2453
+ }), ...Xn({
2454
+ bands: P,
2383
2455
  timestamp: e,
2384
- valueText: V
2456
+ valueText: R
2385
2457
  })],
2386
- notes: [...s.filter((t) => t.kind !== "event" && t.timestamp === e).map((e) => e.label), ...we.filter((t) => mn(U, t.timestamp) === e).map((e) => `${e.label} · ${B(e.timestamp)}`)]
2458
+ notes: [...s.filter((t) => t.kind !== "event" && t.timestamp === e).map((e) => e.label), ...Te.filter((t) => gn(H, t.timestamp) === e).map((e) => `${e.label} · ${L(e.timestamp)}`)]
2387
2459
  };
2388
2460
  }
2389
- let K = U[0] ?? 0, q = U.at(-1) ?? K, Te = {
2390
- width: k.width,
2391
- height: k.height,
2392
- value: Gn({
2461
+ let G = H[0] ?? 0, K = H.at(-1) ?? G, Ee = {
2462
+ width: O.width,
2463
+ height: O.height,
2464
+ value: qn({
2393
2465
  format: i,
2394
2466
  tickFormat: a,
2395
2467
  label: o
2396
2468
  }),
2397
- valueDomain: Kn({
2469
+ valueDomain: Jn({
2398
2470
  series: t,
2399
2471
  isStacked: u,
2400
2472
  isZeroBased: l === "area",
2401
2473
  bands: h,
2402
2474
  crossings: g
2403
2475
  }),
2404
- timeDomain: Yt(Wn(K, n), Wn(q, n)),
2476
+ timeDomain: Zt(Kn(G, n), Kn(K, n)),
2405
2477
  timeFormat: r,
2406
- locale: E,
2478
+ locale: T,
2407
2479
  gutter: f,
2408
2480
  hasValueTitle: o !== void 0
2409
- }, Ee = v(Te), Oe = Pn({
2410
- instants: we,
2411
- x: (e) => Ee.x.position(Wn(e, n)),
2412
- right: Ee.box.right
2413
- }), ke = v({
2414
- ...Te,
2415
- topInset: Fn(Oe)
2416
- }), { box: X } = ke;
2481
+ }, De = v(Ee), Oe = In({
2482
+ instants: Te,
2483
+ x: (e) => De.x.position(Kn(e, n)),
2484
+ right: De.box.right
2485
+ }), q = v({
2486
+ ...Ee,
2487
+ topInset: Ln(Oe)
2488
+ }), { box: X } = q;
2417
2489
  function Z(e) {
2418
- return ke.x.position(Wn(e, n));
2490
+ return q.x.position(Kn(e, n));
2419
2491
  }
2420
- let Q = ke.y.position;
2492
+ let Q = q.y.position;
2421
2493
  function Ae(e) {
2422
- return `${B(e[0])} to ${B(e[1])}`;
2494
+ return `${L(e[0])} to ${L(e[1])}`;
2423
2495
  }
2424
- let je = y !== void 0 && b !== void 0 && q !== K ? {
2496
+ let je = y !== void 0 && b !== void 0 && K !== G ? {
2425
2497
  onRangeChange: y,
2426
2498
  rangeStep: b
2427
- } : void 0, Me = U.map((e) => ({
2499
+ } : void 0, Me = H.map((e) => ({
2428
2500
  id: String(e),
2429
2501
  x: Z(e),
2430
2502
  y: 0
@@ -2432,44 +2504,44 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2432
2504
  return /* @__PURE__ */ J("div", {
2433
2505
  className: "xeuugli",
2434
2506
  children: /* @__PURE__ */ J(ee, {
2435
- items: fe,
2436
- readout: (e) => re(G(Number(e))),
2437
- locate: Se({
2507
+ items: me,
2508
+ readout: (e) => ie(W(Number(e))),
2509
+ locate: V({
2438
2510
  marks: Me,
2439
2511
  width: X.width,
2440
2512
  height: X.height,
2441
2513
  axis: "x"
2442
2514
  }),
2443
- revision: _e,
2515
+ revision: B,
2444
2516
  inspected: d?.id,
2445
2517
  onInspectedChange: d?.onChange,
2446
2518
  within: d?.within,
2447
2519
  render: (t, { inspected: r, cursor: i }) => {
2448
- let a = r === null ? void 0 : Number(r), c = G(d === void 0 || d.isSource ? a : void 0), f = /* @__PURE__ */ Y(me, {
2449
- plotRef: k.ref,
2520
+ let a = r === null ? void 0 : Number(r), c = W(d === void 0 || d.isSource ? a : void 0), f = /* @__PURE__ */ Y(ge, {
2521
+ plotRef: O.ref,
2450
2522
  box: X,
2451
2523
  label: m({
2452
- title: T,
2524
+ title: C,
2453
2525
  marks: "observations",
2454
2526
  isSelectable: !1
2455
2527
  }),
2456
- readoutId: A,
2528
+ readoutId: k,
2457
2529
  children: [
2458
- /* @__PURE__ */ J(ce, {
2530
+ /* @__PURE__ */ J(ue, {
2459
2531
  box: X,
2460
- xTicks: p ? ke.xTicks : [],
2461
- yTicks: ke.yTicks,
2532
+ xTicks: p ? q.xTicks : [],
2533
+ yTicks: q.yTicks,
2462
2534
  yTitle: o
2463
2535
  }),
2464
- /* @__PURE__ */ Y(ge, {
2536
+ /* @__PURE__ */ Y(ve, {
2465
2537
  box: X,
2466
2538
  children: [
2467
- /* @__PURE__ */ J(In, {
2468
- bands: L,
2539
+ /* @__PURE__ */ J(Rn, {
2540
+ bands: P,
2469
2541
  x: Z,
2470
2542
  y: Q
2471
2543
  }),
2472
- F.map((e) => {
2544
+ N.map((e) => {
2473
2545
  let t = e.points.map((e) => ({
2474
2546
  x: Z(e.timestamp),
2475
2547
  y: e.value === null ? null : Q(e.value + e.base)
@@ -2479,49 +2551,49 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2479
2551
  y1: e.value === null ? null : Q(e.value + e.base)
2480
2552
  }));
2481
2553
  return /* @__PURE__ */ Y("g", { children: [
2482
- l === "area" && /* @__PURE__ */ J(pe, {
2483
- d: xe(n),
2554
+ l === "area" && /* @__PURE__ */ J(he, {
2555
+ d: Ce(n),
2484
2556
  tone: e.tone,
2485
2557
  isPale: !u
2486
2558
  }),
2487
- /* @__PURE__ */ J(ue, {
2488
- d: be(t),
2559
+ /* @__PURE__ */ J(pe, {
2560
+ d: Se(t),
2489
2561
  tone: e.tone
2490
2562
  }),
2491
- ye(t).map((t) => /* @__PURE__ */ J(I, {
2563
+ xe(t).map((t) => /* @__PURE__ */ J(de, {
2492
2564
  x: t.x,
2493
2565
  y: t.y,
2494
2566
  tone: e.tone,
2495
- radius: Vn
2567
+ radius: Un
2496
2568
  }, t.x))
2497
2569
  ] }, e.id);
2498
2570
  }),
2499
- g.map((e) => /* @__PURE__ */ J(le, {
2571
+ g.map((e) => /* @__PURE__ */ J(fe, {
2500
2572
  x1: X.left,
2501
2573
  x2: X.right,
2502
2574
  y1: Q(e.value),
2503
2575
  y2: Q(e.value)
2504
2576
  }, e.id)),
2505
2577
  s.map((e) => {
2506
- if (e.kind === "time") return /* @__PURE__ */ J(de, {
2578
+ if (e.kind === "time") return /* @__PURE__ */ J(z, {
2507
2579
  x: Z(e.timestamp),
2508
2580
  top: X.top,
2509
2581
  bottom: X.bottom
2510
2582
  }, e.id);
2511
- let t = F.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base;
2512
- return e.kind === "point" ? /* @__PURE__ */ J(R, {
2583
+ let t = N.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base;
2584
+ return e.kind === "point" ? /* @__PURE__ */ J(I, {
2513
2585
  x: Z(e.timestamp),
2514
2586
  y: Q(e.value + (t ?? 0))
2515
2587
  }, e.id) : void 0;
2516
2588
  }),
2517
- a !== void 0 && /* @__PURE__ */ J(de, {
2589
+ a !== void 0 && /* @__PURE__ */ J(z, {
2518
2590
  x: Z(a),
2519
2591
  top: X.top,
2520
2592
  bottom: X.bottom
2521
2593
  }),
2522
- a !== void 0 && F.flatMap((e) => {
2594
+ a !== void 0 && N.flatMap((e) => {
2523
2595
  let t = e.points.find((e) => e.timestamp === a);
2524
- return t === void 0 || t.value === null ? [] : [/* @__PURE__ */ J(I, {
2596
+ return t === void 0 || t.value === null ? [] : [/* @__PURE__ */ J(de, {
2525
2597
  x: Z(t.timestamp),
2526
2598
  y: Q(t.value + t.base),
2527
2599
  tone: e.tone,
@@ -2530,48 +2602,48 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2530
2602
  })
2531
2603
  ]
2532
2604
  }),
2533
- /* @__PURE__ */ J(Ln, {
2605
+ /* @__PURE__ */ J(zn, {
2534
2606
  placed: Oe,
2535
2607
  x: Z,
2536
2608
  y: Q,
2537
2609
  top: X.top,
2538
2610
  bottom: X.bottom
2539
2611
  }),
2540
- i !== null && /* @__PURE__ */ J(ne, {
2612
+ i !== null && /* @__PURE__ */ J(re, {
2541
2613
  x: Z(Number(i)),
2542
2614
  top: X.top,
2543
2615
  bottom: X.bottom,
2544
- width: Bn
2616
+ width: Hn
2545
2617
  })
2546
2618
  ]
2547
2619
  });
2548
2620
  return /* @__PURE__ */ Y(j, {
2549
2621
  ...S,
2550
2622
  figure: t,
2551
- titleDetail: H ? void 0 : c.label,
2552
- series: ve,
2553
- seriesLegend: /* @__PURE__ */ J(M, {
2554
- id: A,
2623
+ titleDetail: be ? void 0 : c.label,
2624
+ series: ye,
2625
+ seriesLegend: /* @__PURE__ */ J(se, {
2626
+ id: k,
2555
2627
  label: c.label,
2556
- legend: ve,
2628
+ legend: ye,
2557
2629
  rows: c.rows,
2558
- x: Z(a ?? K),
2630
+ x: Z(a ?? G),
2559
2631
  width: X.width,
2560
2632
  notes: c.notes,
2561
- hasSeriesSummary: H
2633
+ hasSeriesSummary: be
2562
2634
  }),
2563
- children: [/* @__PURE__ */ J(ae, {
2564
- label: `${T} observations`,
2635
+ children: [/* @__PURE__ */ J(oe, {
2636
+ label: `${C} observations`,
2565
2637
  columns: [
2566
2638
  {
2567
2639
  id: "time",
2568
2640
  label: `Time (${n})`
2569
2641
  },
2570
- ...F.map((e) => ({
2642
+ ...N.map((e) => ({
2571
2643
  id: `series:${e.id}`,
2572
2644
  label: e.label
2573
2645
  })),
2574
- ...L.flatMap((e) => [{
2646
+ ...P.flatMap((e) => [{
2575
2647
  id: `band:${e.id}`,
2576
2648
  label: e.label
2577
2649
  }, {
@@ -2579,31 +2651,31 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2579
2651
  label: `${e.label}: ${e.rangeLabel}`
2580
2652
  }])
2581
2653
  ],
2582
- rows: z.map((e, t) => ({
2654
+ rows: F.map((e, t) => ({
2583
2655
  id: e.timestamp,
2584
2656
  values: [
2585
- B(e.timestamp),
2586
- ...F.map((e) => V(e.points[t]?.value ?? null)),
2587
- ...Jn({
2588
- bands: L,
2657
+ L(e.timestamp),
2658
+ ...N.map((e) => R(e.points[t]?.value ?? null)),
2659
+ ...Xn({
2660
+ bands: P,
2589
2661
  timestamp: e.timestamp,
2590
- valueText: V
2662
+ valueText: R
2591
2663
  }).map((e) => e.value)
2592
2664
  ]
2593
2665
  }))
2594
2666
  }), /* @__PURE__ */ Y("div", {
2595
2667
  className: "xrvj5dj x1n8ia3y",
2596
2668
  children: [
2597
- je === void 0 ? f : /* @__PURE__ */ J(On, {
2669
+ je === void 0 ? f : /* @__PURE__ */ J(An, {
2598
2670
  value: _,
2599
2671
  onValueChange: je.onRangeChange,
2600
- min: K,
2601
- max: q,
2672
+ min: G,
2673
+ max: K,
2602
2674
  step: je.rangeStep,
2603
2675
  describe: Ae,
2604
- label: `${T} time range`,
2605
- left: Z(K),
2606
- width: Z(q) - Z(K),
2676
+ label: `${C} time range`,
2677
+ left: Z(G),
2678
+ width: Z(K) - Z(G),
2607
2679
  height: X.bottom,
2608
2680
  children: f
2609
2681
  }),
@@ -2612,9 +2684,9 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2612
2684
  children: [/* @__PURE__ */ J("span", { children: _ === null ? "Drag on the plot with a mouse to select a range of time." : `Selected range: ${Ae(_)}` }), _ === null ? /* @__PURE__ */ J(e, {
2613
2685
  type: "button",
2614
2686
  onClick: (e) => {
2615
- De({ options: () => je }, "onRangeChange", ir({
2616
- first: K,
2617
- last: q,
2687
+ ke({ options: () => je }, "onRangeChange", or({
2688
+ first: G,
2689
+ last: K,
2618
2690
  step: je.rangeStep
2619
2691
  }), {
2620
2692
  reason: "trigger-press",
@@ -2625,7 +2697,7 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2625
2697
  }) : /* @__PURE__ */ J(e, {
2626
2698
  type: "button",
2627
2699
  onClick: (e) => {
2628
- De({ options: () => je }, "onRangeChange", null, {
2700
+ ke({ options: () => je }, "onRangeChange", null, {
2629
2701
  reason: "clear-press",
2630
2702
  event: e.nativeEvent
2631
2703
  });
@@ -2633,16 +2705,16 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2633
2705
  children: "Clear range"
2634
2706
  })]
2635
2707
  }),
2636
- s.length + Ce.length > 0 && /* @__PURE__ */ Y("ul", {
2708
+ s.length + we.length > 0 && /* @__PURE__ */ Y("ul", {
2637
2709
  className: "x78zum5 x1a02dak x1n8ia3y x1ghz6dp x1717udv xe8uvvx xy8obcc x153jb6y xj0a0fe",
2638
2710
  children: [s.map((e) => /* @__PURE__ */ Y("li", { children: [
2639
- B(e.timestamp),
2711
+ L(e.timestamp),
2640
2712
  " · ",
2641
2713
  e.label,
2642
- e.kind === "point" && ` · ${V(e.value)}`
2643
- ] }, e.id)), Ce.map((e) => /* @__PURE__ */ J("li", { children: Yn({
2714
+ e.kind === "point" && ` · ${R(e.value)}`
2715
+ ] }, e.id)), we.map((e) => /* @__PURE__ */ J("li", { children: Zn({
2644
2716
  found: e,
2645
- timeText: B
2717
+ timeText: L
2646
2718
  }) }, e.crossing.id))]
2647
2719
  })
2648
2720
  ]
@@ -2652,7 +2724,7 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2652
2724
  })
2653
2725
  });
2654
2726
  }
2655
- function rr({ range: e, rangeStep: t, isSelectable: n, timeline: r }) {
2727
+ function ar({ range: e, rangeStep: t, isSelectable: n, timeline: r }) {
2656
2728
  let i = r[0], a = r.at(-1);
2657
2729
  if (!n || i === void 0 || a === void 0) return;
2658
2730
  let o = a - i;
@@ -2661,8 +2733,8 @@ function rr({ range: e, rangeStep: t, isSelectable: n, timeline: r }) {
2661
2733
  if (e !== null && (!(e[0] >= i && e[1] <= a) || e[0] >= e[1])) return "The selected range must have ordered ends inside the observed time.";
2662
2734
  }
2663
2735
  }
2664
- function ir({ first: e, last: t, step: n }) {
2665
- let r = Math.max(1, Math.round((t - e) / Hn / n)) * n, i = Math.min(e + r, t - n);
2736
+ function or({ first: e, last: t, step: n }) {
2737
+ let r = Math.max(1, Math.round((t - e) / Wn / n)) * n, i = Math.min(e + r, t - n);
2666
2738
  return [i, Math.min(t, Math.max(i + n, t - r))];
2667
2739
  }
2668
- export { Qn as a, $ as c, Pt as d, ht as f, tr as i, Vt as l, st as m, Xn as n, sn as o, dt as p, er as r, an as s, Zn as t, Ft as u };
2740
+ export { er as a, $ as c, Ft as d, gt as f, rr as i, Ht as l, ct as m, Qn as n, ln as o, ft as p, nr as r, sn as s, $n as t, It as u };