boardplot 0.0.0-stage → 0.52.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (817) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE.md +180 -0
  4. package/README.md +208 -2
  5. package/THIRD_PARTY_NOTICES.md +1110 -0
  6. package/dist/DiagnosticDetails-UNYNYCAH.js +69 -0
  7. package/dist/ReaderBox-VUNSFKZY.js +137 -0
  8. package/dist/annotateEngine-H7OW4H3W.js +30 -0
  9. package/dist/build-identity.json +6 -0
  10. package/dist/chunk-24WB3HMB.js +621 -0
  11. package/dist/chunk-263SZKIL.js +8 -0
  12. package/dist/chunk-27QQEWNV.js +18 -0
  13. package/dist/chunk-2AKWCMS4.js +24 -0
  14. package/dist/chunk-2DHJJ2EN.js +24 -0
  15. package/dist/chunk-2EQE4E3I.js +22 -0
  16. package/dist/chunk-2GELJH37.js +88 -0
  17. package/dist/chunk-2JAWQ7VV.js +3874 -0
  18. package/dist/chunk-2LMCD3ZR.js +6 -0
  19. package/dist/chunk-2MTWKMEG.js +841 -0
  20. package/dist/chunk-2SGIHKKU.js +33 -0
  21. package/dist/chunk-2UVTHU7A.js +1146 -0
  22. package/dist/chunk-33CBPK5Q.js +2800 -0
  23. package/dist/chunk-33PLBIMA.js +176 -0
  24. package/dist/chunk-35DZP2R2.js +22 -0
  25. package/dist/chunk-3D3D3D23.js +25 -0
  26. package/dist/chunk-3EZRM4YM.js +92 -0
  27. package/dist/chunk-3GZECHOK.js +802 -0
  28. package/dist/chunk-3HHNQPAH.js +68 -0
  29. package/dist/chunk-3I6RANBJ.js +1058 -0
  30. package/dist/chunk-3SIRPKMP.js +12 -0
  31. package/dist/chunk-3W23F7EY.js +185 -0
  32. package/dist/chunk-3XQ635KD.js +24 -0
  33. package/dist/chunk-3ZCKEANJ.js +24 -0
  34. package/dist/chunk-4DNOEV3Q.js +25857 -0
  35. package/dist/chunk-4GB7TBY7.js +373 -0
  36. package/dist/chunk-4SM2ONUC.js +18 -0
  37. package/dist/chunk-5C7TWNYZ.js +79 -0
  38. package/dist/chunk-5DJXJXDE.js +58 -0
  39. package/dist/chunk-5ENRZX6I.js +687 -0
  40. package/dist/chunk-5KWXRYAT.js +294 -0
  41. package/dist/chunk-5T5YW52S.js +47 -0
  42. package/dist/chunk-627P6T25.js +936 -0
  43. package/dist/chunk-62FR4FYJ.js +23 -0
  44. package/dist/chunk-6JUJ2DU3.js +67 -0
  45. package/dist/chunk-6KWIQ5KF.js +18 -0
  46. package/dist/chunk-6UBEGKIQ.js +25 -0
  47. package/dist/chunk-6XE3GVGU.js +116 -0
  48. package/dist/chunk-76ANFJOI.js +227 -0
  49. package/dist/chunk-7IFLQMJL.js +160 -0
  50. package/dist/chunk-7JVAQX6C.js +28 -0
  51. package/dist/chunk-7QDAHY5M.js +63 -0
  52. package/dist/chunk-7VXZDB45.js +149 -0
  53. package/dist/chunk-7X65ZQN4.js +38 -0
  54. package/dist/chunk-A2FHZH7E.js +1410 -0
  55. package/dist/chunk-A372DLQX.js +54 -0
  56. package/dist/chunk-A3ULWR5N.js +76 -0
  57. package/dist/chunk-A4QZXLXF.js +7 -0
  58. package/dist/chunk-A5JWFZVU.js +1467 -0
  59. package/dist/chunk-A5LZUYK4.js +59 -0
  60. package/dist/chunk-A6XCAQ52.js +89 -0
  61. package/dist/chunk-A7A4PDG5.js +24 -0
  62. package/dist/chunk-A7IEVBYI.js +35 -0
  63. package/dist/chunk-ACXX2JNL.js +6 -0
  64. package/dist/chunk-AFK47A6O.js +25 -0
  65. package/dist/chunk-ALKTNXMR.js +3650 -0
  66. package/dist/chunk-AOQ6VF5H.js +6 -0
  67. package/dist/chunk-ASAON7G4.js +648 -0
  68. package/dist/chunk-ATTE3FYC.js +24 -0
  69. package/dist/chunk-AZOUSKZD.js +728 -0
  70. package/dist/chunk-B2EBEXIS.js +113 -0
  71. package/dist/chunk-B67K5X4M.js +58 -0
  72. package/dist/chunk-BBL3R5YZ.js +186 -0
  73. package/dist/chunk-BIDIGDGH.js +6 -0
  74. package/dist/chunk-BKYMLFUG.js +69 -0
  75. package/dist/chunk-BLFWUMTD.js +12 -0
  76. package/dist/chunk-BM6SFFWF.js +6 -0
  77. package/dist/chunk-BUPLB3EX.js +129 -0
  78. package/dist/chunk-BVWU6GOB.js +47 -0
  79. package/dist/chunk-BW5VLBSZ.js +15 -0
  80. package/dist/chunk-C64FBRJO.js +290 -0
  81. package/dist/chunk-CAE2HK2G.js +295 -0
  82. package/dist/chunk-CCQNL33L.js +446 -0
  83. package/dist/chunk-CDZHNLO6.js +42 -0
  84. package/dist/chunk-COKHNEJP.js +24 -0
  85. package/dist/chunk-COYPDRJK.js +21 -0
  86. package/dist/chunk-CRZKGHZ6.js +1810 -0
  87. package/dist/chunk-CS4DHFNG.js +128 -0
  88. package/dist/chunk-CYDZP5W6.js +1589 -0
  89. package/dist/chunk-D4BIV6WG.js +1072 -0
  90. package/dist/chunk-D4SOADBD.js +19 -0
  91. package/dist/chunk-DCCJRLAJ.js +422 -0
  92. package/dist/chunk-DFKTS6XJ.js +75 -0
  93. package/dist/chunk-DGDOGOTQ.js +25 -0
  94. package/dist/chunk-DLC23CKC.js +53 -0
  95. package/dist/chunk-DRTA6JG5.js +160 -0
  96. package/dist/chunk-DVKBU23L.js +97 -0
  97. package/dist/chunk-E2HEVF23.js +692 -0
  98. package/dist/chunk-EC2NAYPQ.js +24 -0
  99. package/dist/chunk-EKQK5D6G.js +14 -0
  100. package/dist/chunk-EKQMYG2B.js +2353 -0
  101. package/dist/chunk-ELYU6TRQ.js +98 -0
  102. package/dist/chunk-EQT3EPTB.js +203 -0
  103. package/dist/chunk-ERAIVAK5.js +1359 -0
  104. package/dist/chunk-ETHWK2RZ.js +16 -0
  105. package/dist/chunk-EWVKBRLV.js +72 -0
  106. package/dist/chunk-F77BNDAT.js +43 -0
  107. package/dist/chunk-FGAGGPFF.js +566 -0
  108. package/dist/chunk-FIANWJXX.js +19 -0
  109. package/dist/chunk-FIWNDOMO.js +6 -0
  110. package/dist/chunk-FOKEGVPB.js +24 -0
  111. package/dist/chunk-FT3F72C3.js +30 -0
  112. package/dist/chunk-FT47HQ5U.js +47 -0
  113. package/dist/chunk-GDOW2KNP.js +19 -0
  114. package/dist/chunk-GDQ3NGDZ.js +17 -0
  115. package/dist/chunk-GH3ZMBFX.js +563 -0
  116. package/dist/chunk-GQPESFAF.js +3378 -0
  117. package/dist/chunk-GQS46LC3.js +50 -0
  118. package/dist/chunk-GULJ6KVT.js +587 -0
  119. package/dist/chunk-GWQIXU37.js +2774 -0
  120. package/dist/chunk-GZ2VNM4L.js +24 -0
  121. package/dist/chunk-GZ4RHGIW.js +836 -0
  122. package/dist/chunk-H4H4O62O.js +46 -0
  123. package/dist/chunk-H57TJD3B.js +72 -0
  124. package/dist/chunk-H7UZZ7KP.js +24 -0
  125. package/dist/chunk-HAAUJDGB.js +83 -0
  126. package/dist/chunk-HFG76JTS.js +296 -0
  127. package/dist/chunk-HJXXFPOL.js +211 -0
  128. package/dist/chunk-HTYFQHRC.js +24 -0
  129. package/dist/chunk-HUF6TQ2J.js +24 -0
  130. package/dist/chunk-HUFCSX2Y.js +89 -0
  131. package/dist/chunk-HX3MQ3H4.js +26 -0
  132. package/dist/chunk-HZQEQ34U.js +296 -0
  133. package/dist/chunk-I322G5UG.js +888 -0
  134. package/dist/chunk-IDDA5INB.js +60 -0
  135. package/dist/chunk-IDTLHPTK.js +60 -0
  136. package/dist/chunk-II7652VA.js +2918 -0
  137. package/dist/chunk-IN4QT33I.js +38 -0
  138. package/dist/chunk-IV2UXZXX.js +16 -0
  139. package/dist/chunk-IXSZ7OKR.js +133 -0
  140. package/dist/chunk-IYEFEBRN.js +41 -0
  141. package/dist/chunk-IZ35GMGB.js +2543 -0
  142. package/dist/chunk-IZCOG3FS.js +28 -0
  143. package/dist/chunk-JA755JHN.js +379 -0
  144. package/dist/chunk-JETXFF3M.js +33 -0
  145. package/dist/chunk-JFBEAUJ6.js +24 -0
  146. package/dist/chunk-JFG4DHKQ.js +48 -0
  147. package/dist/chunk-JL5BRMDT.js +179 -0
  148. package/dist/chunk-JLCAWQ3H.js +195 -0
  149. package/dist/chunk-JLZM7XMZ.js +525 -0
  150. package/dist/chunk-JMH5MD5A.js +19 -0
  151. package/dist/chunk-JRPI64AQ.js +3066 -0
  152. package/dist/chunk-JSX3C6LL.js +344 -0
  153. package/dist/chunk-JY4R3GML.js +83 -0
  154. package/dist/chunk-JYBT2JNY.js +61 -0
  155. package/dist/chunk-K2HNV4LE.js +2008 -0
  156. package/dist/chunk-KAXJFL7N.js +43 -0
  157. package/dist/chunk-KDMKHR5A.js +32 -0
  158. package/dist/chunk-KFFNCDX6.js +19 -0
  159. package/dist/chunk-KKWZWP67.js +24 -0
  160. package/dist/chunk-KOJ5QETJ.js +8 -0
  161. package/dist/chunk-KPMGGE4W.js +51 -0
  162. package/dist/chunk-KS7DXCXH.js +27 -0
  163. package/dist/chunk-KSYVTEKR.js +24 -0
  164. package/dist/chunk-KU4YS6HN.js +61 -0
  165. package/dist/chunk-KYELSLDJ.js +40 -0
  166. package/dist/chunk-LC3PSQJJ.js +383 -0
  167. package/dist/chunk-LC6DYCTG.js +85 -0
  168. package/dist/chunk-LNKY5Z2X.js +23 -0
  169. package/dist/chunk-LO2DANS6.js +302 -0
  170. package/dist/chunk-M4SPKUZE.js +7 -0
  171. package/dist/chunk-M4YLED7M.js +17 -0
  172. package/dist/chunk-M6KTNAND.js +746 -0
  173. package/dist/chunk-MCOIEWW6.js +54 -0
  174. package/dist/chunk-MDYLOIS2.js +48 -0
  175. package/dist/chunk-MEISCROL.js +24 -0
  176. package/dist/chunk-MFLH5ZDQ.js +69 -0
  177. package/dist/chunk-MIXKQJ64.js +935 -0
  178. package/dist/chunk-MJMJEURO.js +359 -0
  179. package/dist/chunk-MNJ2DHU6.js +526 -0
  180. package/dist/chunk-NEVSQGOI.js +63 -0
  181. package/dist/chunk-NG5IGZXC.js +1179 -0
  182. package/dist/chunk-NLOMCLKI.js +3303 -0
  183. package/dist/chunk-NMCOUVN5.js +24 -0
  184. package/dist/chunk-NT3HAZYT.js +51 -0
  185. package/dist/chunk-NXNQQ3DS.js +382 -0
  186. package/dist/chunk-NYEY6W5R.js +569 -0
  187. package/dist/chunk-OAPCJO6W.js +23 -0
  188. package/dist/chunk-OH7FA4TF.js +251 -0
  189. package/dist/chunk-OLNORNCT.js +331 -0
  190. package/dist/chunk-OQEBOVUO.js +30 -0
  191. package/dist/chunk-ORUJI3VB.js +83 -0
  192. package/dist/chunk-PEN2DK7T.js +49 -0
  193. package/dist/chunk-PGIQMQRU.js +1650 -0
  194. package/dist/chunk-PTVOXB5T.js +39 -0
  195. package/dist/chunk-PUVGWJQ5.js +24 -0
  196. package/dist/chunk-PWROWDZS.js +137 -0
  197. package/dist/chunk-Q6XJOJTY.js +29 -0
  198. package/dist/chunk-QBR6IKIX.js +50 -0
  199. package/dist/chunk-QETGGFH2.js +30 -0
  200. package/dist/chunk-QG6MOQLI.js +2934 -0
  201. package/dist/chunk-QGCEHR6S.js +13 -0
  202. package/dist/chunk-QHFQHQDC.js +43 -0
  203. package/dist/chunk-QHRE2M6V.js +26 -0
  204. package/dist/chunk-QKL7IY42.js +38 -0
  205. package/dist/chunk-QN6JHMGU.js +44 -0
  206. package/dist/chunk-QNHZXFRA.js +347 -0
  207. package/dist/chunk-QPWRHDLZ.js +17 -0
  208. package/dist/chunk-QVABTUDS.js +80 -0
  209. package/dist/chunk-QXILAMAU.js +28 -0
  210. package/dist/chunk-QZAT46PP.js +95 -0
  211. package/dist/chunk-R3WI7ZLE.js +545 -0
  212. package/dist/chunk-R5SWC3EW.js +30 -0
  213. package/dist/chunk-RJQ5YS3Q.js +40 -0
  214. package/dist/chunk-RNOD2UWF.js +613 -0
  215. package/dist/chunk-RNXITK5M.js +24 -0
  216. package/dist/chunk-ROXO4R3J.js +16 -0
  217. package/dist/chunk-RQ5DNYLG.js +10 -0
  218. package/dist/chunk-RSWVH7DB.js +24 -0
  219. package/dist/chunk-RTJXOIIQ.js +12 -0
  220. package/dist/chunk-RZNYW7UP.js +133 -0
  221. package/dist/chunk-S4F27M7N.js +37 -0
  222. package/dist/chunk-S4ONWRJE.js +28 -0
  223. package/dist/chunk-S53OGZL6.js +168 -0
  224. package/dist/chunk-S5ADHIZK.js +2508 -0
  225. package/dist/chunk-S62M63LU.js +19 -0
  226. package/dist/chunk-S7VDRUED.js +62 -0
  227. package/dist/chunk-SGD3ZHID.js +250 -0
  228. package/dist/chunk-SGSPYHFE.js +40 -0
  229. package/dist/chunk-SLTMRTXV.js +597 -0
  230. package/dist/chunk-SXGTRZFN.js +26 -0
  231. package/dist/chunk-SZPTTNW7.js +16 -0
  232. package/dist/chunk-T3IGJARD.js +22 -0
  233. package/dist/chunk-TA3TFKYZ.js +86 -0
  234. package/dist/chunk-TNEHPP3H.js +18 -0
  235. package/dist/chunk-TPYV2FTV.js +25 -0
  236. package/dist/chunk-TPZB2YWR.js +25 -0
  237. package/dist/chunk-TSR5YDPS.js +1266 -0
  238. package/dist/chunk-TTR7EWNH.js +170 -0
  239. package/dist/chunk-TVHLKVUO.js +24 -0
  240. package/dist/chunk-TXINIAFL.js +198 -0
  241. package/dist/chunk-TXZBBZOG.js +58 -0
  242. package/dist/chunk-UEU46Q3D.js +300 -0
  243. package/dist/chunk-UMDEWWXT.js +33 -0
  244. package/dist/chunk-UQSVWO7Z.js +334 -0
  245. package/dist/chunk-UZF3G2FN.js +942 -0
  246. package/dist/chunk-V422EKLW.js +24 -0
  247. package/dist/chunk-V4DYVLOO.js +433 -0
  248. package/dist/chunk-V4VC25UL.js +128 -0
  249. package/dist/chunk-V667FCIJ.js +12 -0
  250. package/dist/chunk-VABRPZVC.js +43 -0
  251. package/dist/chunk-VB2MJLET.js +19 -0
  252. package/dist/chunk-VDAKTZQP.js +18 -0
  253. package/dist/chunk-VDAZPGR2.js +79 -0
  254. package/dist/chunk-VXZFQKBJ.js +21 -0
  255. package/dist/chunk-VYMGZ27S.js +133 -0
  256. package/dist/chunk-W2RGSGRR.js +131 -0
  257. package/dist/chunk-W7UZXD5D.js +1109 -0
  258. package/dist/chunk-WDUNR2VI.js +2718 -0
  259. package/dist/chunk-WHSTEAVP.js +229 -0
  260. package/dist/chunk-WJMUMN3I.js +127 -0
  261. package/dist/chunk-WLZ54FWG.js +120 -0
  262. package/dist/chunk-WMJPFLF3.js +2980 -0
  263. package/dist/chunk-WRHFBCVY.js +24 -0
  264. package/dist/chunk-WVSNSWBJ.js +47 -0
  265. package/dist/chunk-WYJEOMNY.js +31 -0
  266. package/dist/chunk-WYJMV62X.js +24 -0
  267. package/dist/chunk-WZGJSQKN.js +29 -0
  268. package/dist/chunk-WZL4EEBS.js +11 -0
  269. package/dist/chunk-X7TXGKRX.js +272 -0
  270. package/dist/chunk-XB4KZ6WO.js +81 -0
  271. package/dist/chunk-XDLQRSSH.js +266 -0
  272. package/dist/chunk-XDS4UZGR.js +113 -0
  273. package/dist/chunk-XEGRWWNO.js +30 -0
  274. package/dist/chunk-XO5ONLVM.js +420 -0
  275. package/dist/chunk-XPWRD424.js +24 -0
  276. package/dist/chunk-XTNV2YMB.js +50 -0
  277. package/dist/chunk-XW5J5JAX.js +42 -0
  278. package/dist/chunk-XY5O74BH.js +33 -0
  279. package/dist/chunk-XYONCO5Q.js +984 -0
  280. package/dist/chunk-Y4PXIJMD.js +829 -0
  281. package/dist/chunk-YAYRRKC7.js +24 -0
  282. package/dist/chunk-YEDYBMCW.js +210 -0
  283. package/dist/chunk-YFG4E3N2.js +1161 -0
  284. package/dist/chunk-YHTO46W2.js +2670 -0
  285. package/dist/chunk-YI2ZVTCB.js +38 -0
  286. package/dist/chunk-YKO3VCTF.js +24 -0
  287. package/dist/chunk-YP3I6W7T.js +24 -0
  288. package/dist/chunk-YQ2B3YVF.js +687 -0
  289. package/dist/chunk-YS6KMYM4.js +91 -0
  290. package/dist/chunk-YTSSXSZR.js +197 -0
  291. package/dist/chunk-Z256ACGC.js +27 -0
  292. package/dist/chunk-Z2MGTKDR.js +20 -0
  293. package/dist/chunk-Z5VSLLNY.js +23 -0
  294. package/dist/chunk-Z7X3RGGA.js +22 -0
  295. package/dist/chunk-ZF43WRG3.js +29 -0
  296. package/dist/chunk-ZJKOLOVF.js +1754 -0
  297. package/dist/chunk-ZQ4VFQID.js +76 -0
  298. package/dist/chunk-ZSLGN6CO.js +89 -0
  299. package/dist/chunk-ZVTFZF4V.js +542 -0
  300. package/dist/cli/index.js +9 -0
  301. package/dist/core-5Z6UW5DS.js +31 -0
  302. package/dist/core-6ANZ2OWO.js +40 -0
  303. package/dist/core-6LLJNZ4O.js +37 -0
  304. package/dist/core-CPN2HF75.js +33 -0
  305. package/dist/core-CS7AKNME.js +37 -0
  306. package/dist/core-DBRILYNB.js +38 -0
  307. package/dist/core-DU77ZYPR.js +34 -0
  308. package/dist/core-E6YD7VU4.js +32 -0
  309. package/dist/core-EE55P6XK.js +56 -0
  310. package/dist/core-FFLPH5XK.js +41 -0
  311. package/dist/core-IV26EL5C.js +32 -0
  312. package/dist/core-IZVZ2B7Y.js +34 -0
  313. package/dist/core-JQV7STNF.js +34 -0
  314. package/dist/core-KBH3EJZV.js +32 -0
  315. package/dist/core-KFBW5PRT.js +36 -0
  316. package/dist/core-KWGXHBJE.js +37 -0
  317. package/dist/core-MZMR2DF4.js +32 -0
  318. package/dist/core-OK2ZY5OJ.js +29 -0
  319. package/dist/core-OV5MPTZP.js +43 -0
  320. package/dist/core-OW5V74Q4.js +40 -0
  321. package/dist/core-PL64QPOH.js +57 -0
  322. package/dist/core-PVINU5JJ.js +33 -0
  323. package/dist/core-QUYSNTC7.js +34 -0
  324. package/dist/core-RE3L6YCM.js +29 -0
  325. package/dist/core-RUA3EWW3.js +39 -0
  326. package/dist/core-RY6IFRKM.js +35 -0
  327. package/dist/core-SCWEVNUY.js +34 -0
  328. package/dist/core-SE67HHFG.js +55 -0
  329. package/dist/core-T5Q4DSH2.js +32 -0
  330. package/dist/core-TJX3I7KH.js +37 -0
  331. package/dist/core-ULUA5ZB2.js +55 -0
  332. package/dist/core-WLVU2HWX.js +46 -0
  333. package/dist/core-WQPHNVNY.js +51 -0
  334. package/dist/core-XXIOJY2X.js +52 -0
  335. package/dist/core-ZH7XTJTD.js +39 -0
  336. package/dist/core-ZHE7N4NS.js +50 -0
  337. package/dist/core-ZJYLJWZQ.js +38 -0
  338. package/dist/dataTable-IL7HVDHL.js +58 -0
  339. package/dist/engine-MYLZI5VH.js +961 -0
  340. package/dist/fixtures.d.ts +1 -0
  341. package/dist/fixtures.js +40 -0
  342. package/dist/fontTables-ZYBUCJ5N.js +18 -0
  343. package/dist/fonts.d.ts +1 -0
  344. package/dist/fonts.js +19 -0
  345. package/dist/geo/dach.d.ts +1 -0
  346. package/dist/geo/dach.js +14 -0
  347. package/dist/geo/de-states.d.ts +1 -0
  348. package/dist/geo/de-states.js +14 -0
  349. package/dist/geo/eu27.d.ts +1 -0
  350. package/dist/geo/eu27.js +14 -0
  351. package/dist/geo/europe.d.ts +1 -0
  352. package/dist/geo/europe.js +14 -0
  353. package/dist/geo/index.d.ts +1 -0
  354. package/dist/geo/index.js +41 -0
  355. package/dist/geo/us-states.d.ts +1 -0
  356. package/dist/geo/us-states.js +14 -0
  357. package/dist/geo/world.d.ts +1 -0
  358. package/dist/geo/world.js +14 -0
  359. package/dist/index.d.ts +1 -0
  360. package/dist/index.js +363 -0
  361. package/dist/main-ISJ53IS5.js +568 -0
  362. package/dist/mcp/server.js +1023 -0
  363. package/dist/module-SVEW5ZUE.js +137233 -0
  364. package/dist/react/bar.d.ts +1 -0
  365. package/dist/react/bar.js +80 -0
  366. package/dist/react/bartable.d.ts +1 -0
  367. package/dist/react/bartable.js +70 -0
  368. package/dist/react/box.d.ts +1 -0
  369. package/dist/react/box.js +64 -0
  370. package/dist/react/bullet.d.ts +1 -0
  371. package/dist/react/bullet.js +71 -0
  372. package/dist/react/butterfly.d.ts +1 -0
  373. package/dist/react/butterfly.js +65 -0
  374. package/dist/react/choropleth.d.ts +1 -0
  375. package/dist/react/choropleth.js +67 -0
  376. package/dist/react/cohort.d.ts +1 -0
  377. package/dist/react/cohort.js +69 -0
  378. package/dist/react/column.d.ts +1 -0
  379. package/dist/react/column.js +85 -0
  380. package/dist/react/combo.d.ts +1 -0
  381. package/dist/react/combo.js +85 -0
  382. package/dist/react/creative.d.ts +1 -0
  383. package/dist/react/creative.js +61 -0
  384. package/dist/react/diagram.d.ts +1 -0
  385. package/dist/react/diagram.js +60 -0
  386. package/dist/react/dimswitch.d.ts +1 -0
  387. package/dist/react/dimswitch.js +71 -0
  388. package/dist/react/dot.d.ts +1 -0
  389. package/dist/react/dot.js +69 -0
  390. package/dist/react/export.d.ts +1 -0
  391. package/dist/react/export.js +657 -0
  392. package/dist/react/funnel.d.ts +1 -0
  393. package/dist/react/funnel.js +62 -0
  394. package/dist/react/gantt.d.ts +1 -0
  395. package/dist/react/gantt.js +62 -0
  396. package/dist/react/grid.d.ts +1 -0
  397. package/dist/react/grid.js +66 -0
  398. package/dist/react/heatmap.d.ts +1 -0
  399. package/dist/react/heatmap.js +67 -0
  400. package/dist/react/histogram.d.ts +1 -0
  401. package/dist/react/histogram.js +85 -0
  402. package/dist/react/index.d.ts +1 -0
  403. package/dist/react/index.js +503 -0
  404. package/dist/react/kpi.d.ts +1 -0
  405. package/dist/react/kpi.js +67 -0
  406. package/dist/react/likert.d.ts +1 -0
  407. package/dist/react/likert.js +82 -0
  408. package/dist/react/line.d.ts +1 -0
  409. package/dist/react/line.js +80 -0
  410. package/dist/react/mekko.d.ts +1 -0
  411. package/dist/react/mekko.js +70 -0
  412. package/dist/react/pareto.d.ts +1 -0
  413. package/dist/react/pareto.js +89 -0
  414. package/dist/react/pie.d.ts +1 -0
  415. package/dist/react/pie.js +63 -0
  416. package/dist/react/prepare.d.ts +1 -0
  417. package/dist/react/prepare.js +277 -0
  418. package/dist/react/pvm.d.ts +1 -0
  419. package/dist/react/pvm.js +67 -0
  420. package/dist/react/pyramid.d.ts +1 -0
  421. package/dist/react/pyramid.js +66 -0
  422. package/dist/react/sankey.d.ts +1 -0
  423. package/dist/react/sankey.js +59 -0
  424. package/dist/react/scatter.d.ts +1 -0
  425. package/dist/react/scatter.js +62 -0
  426. package/dist/react/slope.d.ts +1 -0
  427. package/dist/react/slope.js +63 -0
  428. package/dist/react/sparkline.d.ts +1 -0
  429. package/dist/react/sparkline.js +59 -0
  430. package/dist/react/spec.d.ts +1 -0
  431. package/dist/react/spec.js +370 -0
  432. package/dist/react/status.d.ts +1 -0
  433. package/dist/react/status.js +64 -0
  434. package/dist/react/story.d.ts +1 -0
  435. package/dist/react/story.js +140 -0
  436. package/dist/react/table.d.ts +1 -0
  437. package/dist/react/table.js +68 -0
  438. package/dist/react/theme.d.ts +1 -0
  439. package/dist/react/theme.js +53 -0
  440. package/dist/react/tilemap.d.ts +1 -0
  441. package/dist/react/tilemap.js +66 -0
  442. package/dist/react/treemap.d.ts +1 -0
  443. package/dist/react/treemap.js +61 -0
  444. package/dist/react/variance.d.ts +1 -0
  445. package/dist/react/variance.js +64 -0
  446. package/dist/react/waffle.d.ts +1 -0
  447. package/dist/react/waffle.js +62 -0
  448. package/dist/react/waterfall.d.ts +1 -0
  449. package/dist/react/waterfall.js +67 -0
  450. package/dist/resvg-ZOVDIZTV.js +23 -0
  451. package/dist/rows.d.ts +1 -0
  452. package/dist/rows.js +23 -0
  453. package/dist/rowsModule-3Y4I3M3E.js +27 -0
  454. package/dist/schema-2BMZOHXI.js +22 -0
  455. package/dist/schema-2GUBWOBC.js +26 -0
  456. package/dist/schema-34ZELWRQ.js +25 -0
  457. package/dist/schema-3BHL2B76.js +22 -0
  458. package/dist/schema-4735XAZX.js +29 -0
  459. package/dist/schema-5YTNQ6JY.js +22 -0
  460. package/dist/schema-7J3NAIN2.js +27 -0
  461. package/dist/schema-AOJJ7JZB.js +22 -0
  462. package/dist/schema-CVMV4LRA.js +22 -0
  463. package/dist/schema-D3RCMN3T.js +22 -0
  464. package/dist/schema-E2ISJ65D.js +23 -0
  465. package/dist/schema-E6YOSOWB.js +28 -0
  466. package/dist/schema-EQQB43AY.js +22 -0
  467. package/dist/schema-EVLLL5UF.js +22 -0
  468. package/dist/schema-EYQ5IBLF.js +23 -0
  469. package/dist/schema-EYZVD73N.js +22 -0
  470. package/dist/schema-G4KFMQBL.js +22 -0
  471. package/dist/schema-GH7IKSOU.js +23 -0
  472. package/dist/schema-IF5N3J56.js +42 -0
  473. package/dist/schema-IG7JIR4H.js +23 -0
  474. package/dist/schema-JJYJOQTT.js +23 -0
  475. package/dist/schema-KFC4WYH4.js +32 -0
  476. package/dist/schema-L7263JMT.js +25 -0
  477. package/dist/schema-MEAFRXVH.js +53 -0
  478. package/dist/schema-P63S63GE.js +23 -0
  479. package/dist/schema-P7LJFJAJ.js +22 -0
  480. package/dist/schema-PA2MXYY4.js +23 -0
  481. package/dist/schema-PDZ6256H.js +23 -0
  482. package/dist/schema-PNC3Z7AH.js +25 -0
  483. package/dist/schema-QEVSIMGO.js +22 -0
  484. package/dist/schema-QJJPRRE7.js +22 -0
  485. package/dist/schema-S3EQKVOT.js +23 -0
  486. package/dist/schema-STGL44TL.js +22 -0
  487. package/dist/schema-T4NE2EAO.js +22 -0
  488. package/dist/schema-TQYTESG3.js +22 -0
  489. package/dist/schema-W376PAJG.js +22 -0
  490. package/dist/schema-XYYDUUHS.js +26 -0
  491. package/dist/specValidation-NVBIZMEE.js +48 -0
  492. package/dist/theme.d.ts +1 -0
  493. package/dist/theme.js +24 -0
  494. package/dist/themeShapeRules-5C2463YH.js +11 -0
  495. package/dist/types/core/a11y/accessibility.d.ts +43 -0
  496. package/dist/types/core/a11y/recordsShared.d.ts +44 -0
  497. package/dist/types/core/a11y/structuralRecords.d.ts +6 -0
  498. package/dist/types/core/a11y/types.d.ts +116 -0
  499. package/dist/types/core/annotate.d.ts +300 -0
  500. package/dist/types/core/annotateArms.d.ts +37 -0
  501. package/dist/types/core/annotateFields.d.ts +30 -0
  502. package/dist/types/core/annotateGapBracket.d.ts +66 -0
  503. package/dist/types/core/annotateLinks.d.ts +47 -0
  504. package/dist/types/core/annotateTargets.d.ts +90 -0
  505. package/dist/types/core/axis.d.ts +179 -0
  506. package/dist/types/core/bandSelect.d.ts +10 -0
  507. package/dist/types/core/bands.d.ts +14 -0
  508. package/dist/types/core/calendarLabels.d.ts +101 -0
  509. package/dist/types/core/charts/band/stacks.d.ts +155 -0
  510. package/dist/types/core/charts/bar/fixtures.d.ts +9 -0
  511. package/dist/types/core/charts/bar/layout.d.ts +95 -0
  512. package/dist/types/core/charts/bartable/fixtures.d.ts +4 -0
  513. package/dist/types/core/charts/bartable/types.d.ts +192 -0
  514. package/dist/types/core/charts/box/fixtures.d.ts +12 -0
  515. package/dist/types/core/charts/box/types.d.ts +110 -0
  516. package/dist/types/core/charts/bullet/fixtures.d.ts +11 -0
  517. package/dist/types/core/charts/butterfly/fixtures.d.ts +9 -0
  518. package/dist/types/core/charts/choropleth/fixtures.d.ts +3 -0
  519. package/dist/types/core/charts/choropleth/overlayTypes.d.ts +68 -0
  520. package/dist/types/core/charts/choropleth/types.d.ts +117 -0
  521. package/dist/types/core/charts/cohort/fixtures.d.ts +12 -0
  522. package/dist/types/core/charts/cohort/types.d.ts +165 -0
  523. package/dist/types/core/charts/column/anomaly.d.ts +204 -0
  524. package/dist/types/core/charts/column/fixtures.d.ts +12 -0
  525. package/dist/types/core/charts/column/layout.d.ts +116 -0
  526. package/dist/types/core/charts/column/model.d.ts +295 -0
  527. package/dist/types/core/charts/column/types.d.ts +56 -0
  528. package/dist/types/core/charts/combo/endpoints.d.ts +165 -0
  529. package/dist/types/core/charts/combo/fixtures.d.ts +12 -0
  530. package/dist/types/core/charts/combo/layout.d.ts +48 -0
  531. package/dist/types/core/charts/creative/fixtures.d.ts +4 -0
  532. package/dist/types/core/charts/creative/types.d.ts +73 -0
  533. package/dist/types/core/charts/diagram/fixtures.d.ts +3 -0
  534. package/dist/types/core/charts/dimswitch/compile.d.ts +20 -0
  535. package/dist/types/core/charts/dimswitch/fixtures.d.ts +3 -0
  536. package/dist/types/core/charts/dimswitch/types.d.ts +152 -0
  537. package/dist/types/core/charts/dot/fixtures.d.ts +11 -0
  538. package/dist/types/core/charts/funnel/fixtures.d.ts +11 -0
  539. package/dist/types/core/charts/gantt/fixtures.d.ts +9 -0
  540. package/dist/types/core/charts/gantt/layout.d.ts +56 -0
  541. package/dist/types/core/charts/grid/fixtures.d.ts +3 -0
  542. package/dist/types/core/charts/grid/metricStack.d.ts +108 -0
  543. package/dist/types/core/charts/grid/metricStackSchema.d.ts +74 -0
  544. package/dist/types/core/charts/grid/normalize.d.ts +99 -0
  545. package/dist/types/core/charts/grid/schema.d.ts +168 -0
  546. package/dist/types/core/charts/heatmap/fixtures.d.ts +11 -0
  547. package/dist/types/core/charts/histogram/fixtures.d.ts +15 -0
  548. package/dist/types/core/charts/histogram/types.d.ts +98 -0
  549. package/dist/types/core/charts/kpi/fixtures.d.ts +9 -0
  550. package/dist/types/core/charts/likert/fixtures.d.ts +11 -0
  551. package/dist/types/core/charts/likert/layout.d.ts +111 -0
  552. package/dist/types/core/charts/line/fixtures.d.ts +16 -0
  553. package/dist/types/core/charts/line/types.d.ts +6 -0
  554. package/dist/types/core/charts/mekko/fixtures.d.ts +13 -0
  555. package/dist/types/core/charts/pareto/fixtures.d.ts +5 -0
  556. package/dist/types/core/charts/pareto/layout.d.ts +68 -0
  557. package/dist/types/core/charts/pie/fixtures.d.ts +14 -0
  558. package/dist/types/core/charts/pvm/fixtures.d.ts +13 -0
  559. package/dist/types/core/charts/pvm/types.d.ts +118 -0
  560. package/dist/types/core/charts/pyramid/fixtures.d.ts +4 -0
  561. package/dist/types/core/charts/pyramid/types.d.ts +92 -0
  562. package/dist/types/core/charts/sankey/fixtures.d.ts +4 -0
  563. package/dist/types/core/charts/sankey/types.d.ts +116 -0
  564. package/dist/types/core/charts/scatter/fixtures.d.ts +12 -0
  565. package/dist/types/core/charts/scatter/types.d.ts +58 -0
  566. package/dist/types/core/charts/slope/fixtures.d.ts +13 -0
  567. package/dist/types/core/charts/sparkline/fixtures.d.ts +9 -0
  568. package/dist/types/core/charts/status/fixtures.d.ts +8 -0
  569. package/dist/types/core/charts/status/layout.d.ts +71 -0
  570. package/dist/types/core/charts/table/fitFormats.d.ts +67 -0
  571. package/dist/types/core/charts/table/fixtures.d.ts +7 -0
  572. package/dist/types/core/charts/table/resolve.d.ts +72 -0
  573. package/dist/types/core/charts/table/view.d.ts +156 -0
  574. package/dist/types/core/charts/tilemap/fixtures.d.ts +3 -0
  575. package/dist/types/core/charts/tilemap/types.d.ts +94 -0
  576. package/dist/types/core/charts/treemap/fixtures.d.ts +4 -0
  577. package/dist/types/core/charts/treemap/types.d.ts +78 -0
  578. package/dist/types/core/charts/variance/fixtures.d.ts +12 -0
  579. package/dist/types/core/charts/waffle/fixtures.d.ts +5 -0
  580. package/dist/types/core/charts/waffle/types.d.ts +117 -0
  581. package/dist/types/core/charts/waterfall/fixtures.d.ts +9 -0
  582. package/dist/types/core/claims/browser.d.ts +49 -0
  583. package/dist/types/core/claims/manifest.d.ts +22 -0
  584. package/dist/types/core/dateFormat.d.ts +39 -0
  585. package/dist/types/core/deferred.d.ts +121 -0
  586. package/dist/types/core/diagnostics/describe.d.ts +149 -0
  587. package/dist/types/core/diagnostics/jsonPatch.d.ts +36 -0
  588. package/dist/types/core/doc/bareChart.d.ts +2 -0
  589. package/dist/types/core/doc/diagnostics.d.ts +124 -0
  590. package/dist/types/core/doc/docExpand.d.ts +39 -0
  591. package/dist/types/core/doc/document.d.ts +43 -0
  592. package/dist/types/core/doc/ownedDocumentCopy.d.ts +5 -0
  593. package/dist/types/core/doc/specError.d.ts +6 -0
  594. package/dist/types/core/emptyData.d.ts +27 -0
  595. package/dist/types/core/eventLane.d.ts +208 -0
  596. package/dist/types/core/fontMetrics/index.d.ts +47 -0
  597. package/dist/types/core/fontMetrics/injected.d.ts +40 -0
  598. package/dist/types/core/fontMetrics/tableDocument.d.ts +73 -0
  599. package/dist/types/core/fontMetrics/tables.generated.d.ts +17 -0
  600. package/dist/types/core/footer.d.ts +59 -0
  601. package/dist/types/core/format.d.ts +149 -0
  602. package/dist/types/core/formatPrecision.d.ts +136 -0
  603. package/dist/types/core/formatSpec.d.ts +302 -0
  604. package/dist/types/core/frame.d.ts +583 -0
  605. package/dist/types/core/geo/packs/all.d.ts +7 -0
  606. package/dist/types/core/geo/packs/dach.d.ts +16 -0
  607. package/dist/types/core/geo/packs/de-states.d.ts +16 -0
  608. package/dist/types/core/geo/packs/eu27.d.ts +16 -0
  609. package/dist/types/core/geo/packs/europe.d.ts +16 -0
  610. package/dist/types/core/geo/packs/index.d.ts +22 -0
  611. package/dist/types/core/geo/packs/registry.d.ts +37 -0
  612. package/dist/types/core/geo/packs/us-states.d.ts +16 -0
  613. package/dist/types/core/geo/packs/world.d.ts +16 -0
  614. package/dist/types/core/geo/tiles/eu27.generated.d.ts +412 -0
  615. package/dist/types/core/geo/tiles/europe.generated.d.ts +842 -0
  616. package/dist/types/core/geo/tiles/index.d.ts +8 -0
  617. package/dist/types/core/geo/tiles/types.d.ts +36 -0
  618. package/dist/types/core/geo/tiles/us-states.generated.d.ts +952 -0
  619. package/dist/types/core/geo/tiles/world.generated.d.ts +968 -0
  620. package/dist/types/core/geo/types.d.ts +146 -0
  621. package/dist/types/core/geometry.d.ts +102 -0
  622. package/dist/types/core/grid/sharedScale.d.ts +82 -0
  623. package/dist/types/core/icons.d.ts +227 -0
  624. package/dist/types/core/inputError.d.ts +14 -0
  625. package/dist/types/core/isoDate.d.ts +2 -0
  626. package/dist/types/core/isoTime.d.ts +7 -0
  627. package/dist/types/core/label/categoryRow.d.ts +332 -0
  628. package/dist/types/core/label/occupied.d.ts +41 -0
  629. package/dist/types/core/label/ownership.d.ts +83 -0
  630. package/dist/types/core/label/solver.d.ts +380 -0
  631. package/dist/types/core/label/tickRow.d.ts +78 -0
  632. package/dist/types/core/live/types.d.ts +50 -0
  633. package/dist/types/core/normalize/shared.d.ts +56 -0
  634. package/dist/types/core/notes.d.ts +174 -0
  635. package/dist/types/core/othersShade.d.ts +9 -0
  636. package/dist/types/core/periodYears.d.ts +9 -0
  637. package/dist/types/core/polyline.d.ts +11 -0
  638. package/dist/types/core/rangeRules.d.ts +19 -0
  639. package/dist/types/core/ratioTier.d.ts +120 -0
  640. package/dist/types/core/readerStrings.d.ts +13 -0
  641. package/dist/types/core/reading.d.ts +120 -0
  642. package/dist/types/core/registry.d.ts +178 -0
  643. package/dist/types/core/repaintGeometry.d.ts +19 -0
  644. package/dist/types/core/request.d.ts +124 -0
  645. package/dist/types/core/rows.d.ts +45 -0
  646. package/dist/types/core/scale.d.ts +106 -0
  647. package/dist/types/core/schema/capability.d.ts +229 -0
  648. package/dist/types/core/schema/namedColumns.d.ts +45 -0
  649. package/dist/types/core/schema/reference.d.ts +31 -0
  650. package/dist/types/core/schema/refusals.d.ts +45 -0
  651. package/dist/types/core/schema/unknownKeys.d.ts +45 -0
  652. package/dist/types/core/seriesIdentity.d.ts +120 -0
  653. package/dist/types/core/shareRounding.d.ts +49 -0
  654. package/dist/types/core/sizing.d.ts +330 -0
  655. package/dist/types/core/staticFooter.d.ts +6 -0
  656. package/dist/types/core/story.d.ts +41 -0
  657. package/dist/types/core/structureCounts.d.ts +10 -0
  658. package/dist/types/core/svg/renderSvg.d.ts +51 -0
  659. package/dist/types/core/target.d.ts +89 -0
  660. package/dist/types/core/text.d.ts +113 -0
  661. package/dist/types/core/theme.d.ts +478 -0
  662. package/dist/types/core/themeFields.d.ts +11 -0
  663. package/dist/types/core/themeRules.d.ts +111 -0
  664. package/dist/types/core/themeShape.d.ts +87 -0
  665. package/dist/types/core/themeValidate.d.ts +15 -0
  666. package/dist/types/core/timeAxis.d.ts +106 -0
  667. package/dist/types/core/types/annotations.d.ts +223 -0
  668. package/dist/types/core/types/cell.d.ts +82 -0
  669. package/dist/types/core/types/data.d.ts +309 -0
  670. package/dist/types/core/types/diagram.d.ts +234 -0
  671. package/dist/types/core/types/index.d.ts +8 -0
  672. package/dist/types/core/types/options.d.ts +1583 -0
  673. package/dist/types/core/types/scene.d.ts +990 -0
  674. package/dist/types/core/types/sizing.d.ts +51 -0
  675. package/dist/types/core/types/table.d.ts +873 -0
  676. package/dist/types/core/types/theme.d.ts +806 -0
  677. package/dist/types/core/zoom.d.ts +106 -0
  678. package/dist/types/fixtures/index.d.ts +40 -0
  679. package/dist/types/fixtures/registry.d.ts +15 -0
  680. package/dist/types/fonts.d.ts +10 -0
  681. package/dist/types/index.d.ts +70 -0
  682. package/dist/types/react/BoardplotTheme.d.ts +9 -0
  683. package/dist/types/react/DimSwitchChart.d.ts +36 -0
  684. package/dist/types/react/ScaleGroup.d.ts +31 -0
  685. package/dist/types/react/SceneRenderer.d.ts +23 -0
  686. package/dist/types/react/SizePlaceholder.d.ts +51 -0
  687. package/dist/types/react/StoryFrame.d.ts +42 -0
  688. package/dist/types/react/TableChart.d.ts +220 -0
  689. package/dist/types/react/a11ySurface.d.ts +20 -0
  690. package/dist/types/react/barrelCharts.d.ts +1023 -0
  691. package/dist/types/react/charts/bar.d.ts +28 -0
  692. package/dist/types/react/charts/bartable.d.ts +27 -0
  693. package/dist/types/react/charts/box.d.ts +27 -0
  694. package/dist/types/react/charts/bullet.d.ts +28 -0
  695. package/dist/types/react/charts/butterfly.d.ts +28 -0
  696. package/dist/types/react/charts/choropleth.d.ts +27 -0
  697. package/dist/types/react/charts/cohort.d.ts +52 -0
  698. package/dist/types/react/charts/column.d.ts +27 -0
  699. package/dist/types/react/charts/combo.d.ts +7 -0
  700. package/dist/types/react/charts/creative.d.ts +27 -0
  701. package/dist/types/react/charts/diagram.d.ts +162 -0
  702. package/dist/types/react/charts/dimswitch.d.ts +6 -0
  703. package/dist/types/react/charts/dot.d.ts +28 -0
  704. package/dist/types/react/charts/funnel.d.ts +28 -0
  705. package/dist/types/react/charts/gantt.d.ts +28 -0
  706. package/dist/types/react/charts/grid.d.ts +29 -0
  707. package/dist/types/react/charts/heatmap.d.ts +28 -0
  708. package/dist/types/react/charts/histogram.d.ts +27 -0
  709. package/dist/types/react/charts/kpi.d.ts +28 -0
  710. package/dist/types/react/charts/likert.d.ts +27 -0
  711. package/dist/types/react/charts/line.d.ts +28 -0
  712. package/dist/types/react/charts/mekko.d.ts +28 -0
  713. package/dist/types/react/charts/pareto.d.ts +28 -0
  714. package/dist/types/react/charts/pie.d.ts +28 -0
  715. package/dist/types/react/charts/pvm.d.ts +27 -0
  716. package/dist/types/react/charts/pyramid.d.ts +27 -0
  717. package/dist/types/react/charts/sankey.d.ts +27 -0
  718. package/dist/types/react/charts/scatter.d.ts +28 -0
  719. package/dist/types/react/charts/slope.d.ts +28 -0
  720. package/dist/types/react/charts/sparkline.d.ts +28 -0
  721. package/dist/types/react/charts/status.d.ts +27 -0
  722. package/dist/types/react/charts/table.d.ts +6 -0
  723. package/dist/types/react/charts/tilemap.d.ts +27 -0
  724. package/dist/types/react/charts/treemap.d.ts +27 -0
  725. package/dist/types/react/charts/variance.d.ts +28 -0
  726. package/dist/types/react/charts/waffle.d.ts +28 -0
  727. package/dist/types/react/charts/waterfall.d.ts +28 -0
  728. package/dist/types/react/createChartComponent.d.ts +135 -0
  729. package/dist/types/react/export/clipboard.d.ts +8 -0
  730. package/dist/types/react/export/csv.d.ts +2 -0
  731. package/dist/types/react/export/frame.d.ts +35 -0
  732. package/dist/types/react/export/index.d.ts +7 -0
  733. package/dist/types/react/export/png.d.ts +14 -0
  734. package/dist/types/react/export/svg.d.ts +5 -0
  735. package/dist/types/react/export/types.d.ts +69 -0
  736. package/dist/types/react/export/useExport.d.ts +17 -0
  737. package/dist/types/react/exportLink.d.ts +49 -0
  738. package/dist/types/react/footerFrame.d.ts +25 -0
  739. package/dist/types/react/hover/dataTable.d.ts +13 -0
  740. package/dist/types/react/hover/engine.d.ts +210 -0
  741. package/dist/types/react/hover/keyboard.d.ts +44 -0
  742. package/dist/types/react/hover/labelCard.d.ts +170 -0
  743. package/dist/types/react/hover/placement.d.ts +49 -0
  744. package/dist/types/react/index.d.ts +16 -0
  745. package/dist/types/react/parseChartSpec.d.ts +16 -0
  746. package/dist/types/react/prepare.d.ts +32 -0
  747. package/dist/types/react/prepared.d.ts +53 -0
  748. package/dist/types/react/preparedTable.d.ts +15 -0
  749. package/dist/types/react/rowsInput.d.ts +55 -0
  750. package/dist/types/react/rowsModule.d.ts +18 -0
  751. package/dist/types/react/rowsStore.d.ts +50 -0
  752. package/dist/types/react/scale-group.d.ts +2 -0
  753. package/dist/types/react/scaleGroupContext.d.ts +22 -0
  754. package/dist/types/react/scenePaint.d.ts +10 -0
  755. package/dist/types/react/scrollState.d.ts +26 -0
  756. package/dist/types/react/spec.d.ts +65 -0
  757. package/dist/types/react/specValidation.d.ts +45 -0
  758. package/dist/types/react/story.d.ts +15 -0
  759. package/dist/types/react/theme.d.ts +9 -0
  760. package/dist/types/react/themeContext.d.ts +44 -0
  761. package/dist/types/react/useChartLayout.d.ts +22 -0
  762. package/dist/types/react/useContainerSize.d.ts +57 -0
  763. package/dist/types/react/useHover.d.ts +100 -0
  764. package/dist/types/react/useZoom.d.ts +50 -0
  765. package/dist/types/rows.d.ts +58 -0
  766. package/dist/types/tableLooks.d.ts +6 -0
  767. package/dist/types/theme.d.ts +3 -0
  768. package/dist/types/validate.d.ts +3 -0
  769. package/dist/validate.d.ts +1 -0
  770. package/dist/validate.js +222 -0
  771. package/docs/FONTS.md +68 -0
  772. package/docs/TELEMETRY.md +94 -0
  773. package/docs/manual.md +838 -0
  774. package/docs/reference/bar.md +222 -0
  775. package/docs/reference/bartable.md +143 -0
  776. package/docs/reference/box.md +93 -0
  777. package/docs/reference/bullet.md +118 -0
  778. package/docs/reference/butterfly.md +117 -0
  779. package/docs/reference/choropleth.md +148 -0
  780. package/docs/reference/cohort.md +149 -0
  781. package/docs/reference/column.md +275 -0
  782. package/docs/reference/combo.md +219 -0
  783. package/docs/reference/creative.md +147 -0
  784. package/docs/reference/diagram.md +191 -0
  785. package/docs/reference/dimswitch.md +1395 -0
  786. package/docs/reference/dot.md +117 -0
  787. package/docs/reference/fixtures.md +1088 -0
  788. package/docs/reference/funnel.md +121 -0
  789. package/docs/reference/gantt.md +132 -0
  790. package/docs/reference/grid.md +302 -0
  791. package/docs/reference/heatmap.md +127 -0
  792. package/docs/reference/histogram.md +77 -0
  793. package/docs/reference/kpi.md +115 -0
  794. package/docs/reference/likert.md +113 -0
  795. package/docs/reference/line.md +436 -0
  796. package/docs/reference/mekko.md +114 -0
  797. package/docs/reference/options.md +313 -0
  798. package/docs/reference/pareto.md +102 -0
  799. package/docs/reference/pie.md +114 -0
  800. package/docs/reference/pvm.md +114 -0
  801. package/docs/reference/pyramid.md +99 -0
  802. package/docs/reference/react.md +703 -0
  803. package/docs/reference/reading.md +28 -0
  804. package/docs/reference/sankey.md +110 -0
  805. package/docs/reference/scatter.md +211 -0
  806. package/docs/reference/slope.md +126 -0
  807. package/docs/reference/sparkline.md +74 -0
  808. package/docs/reference/status.md +107 -0
  809. package/docs/reference/table.md +673 -0
  810. package/docs/reference/theme.md +361 -0
  811. package/docs/reference/tilemap.md +121 -0
  812. package/docs/reference/treemap.md +86 -0
  813. package/docs/reference/variance.md +126 -0
  814. package/docs/reference/waffle.md +106 -0
  815. package/docs/reference/waterfall.md +164 -0
  816. package/llms.txt +57 -0
  817. package/package.json +437 -4
@@ -0,0 +1,1810 @@
1
+ import {
2
+ resolveChartRequest
3
+ } from "./chunk-M6KTNAND.js";
4
+ import {
5
+ calcPreservesScale
6
+ } from "./chunk-T3IGJARD.js";
7
+ import {
8
+ chartString
9
+ } from "./chunk-FT3F72C3.js";
10
+ import {
11
+ normalizeGridData
12
+ } from "./chunk-JL5BRMDT.js";
13
+ import {
14
+ creativeMetrics
15
+ } from "./chunk-CCQNL33L.js";
16
+ import {
17
+ sharedEndLabelId
18
+ } from "./chunk-3W23F7EY.js";
19
+ import {
20
+ withUnit
21
+ } from "./chunk-JETXFF3M.js";
22
+ import {
23
+ eventHeading
24
+ } from "./chunk-IN4QT33I.js";
25
+ import {
26
+ poolMekkoAmounts
27
+ } from "./chunk-KDMKHR5A.js";
28
+ import {
29
+ stackAdds
30
+ } from "./chunk-6KWIQ5KF.js";
31
+ import {
32
+ SPARKLINE_RING_RADIUS,
33
+ kpiSparkSeries,
34
+ lastObservedIndex,
35
+ sparklinePointId
36
+ } from "./chunk-NYEY6W5R.js";
37
+ import {
38
+ calendarNames
39
+ } from "./chunk-GQPESFAF.js";
40
+ import {
41
+ datePatternFromExample,
42
+ formatDate,
43
+ rectCenter,
44
+ textRole
45
+ } from "./chunk-2JAWQ7VV.js";
46
+ import {
47
+ differenceExample,
48
+ exampleSpec,
49
+ formatNonzeroWithSpec,
50
+ formatWithSpec,
51
+ parseFormatExample,
52
+ parseISODate,
53
+ specUnitKind,
54
+ unitOfSpec
55
+ } from "./chunk-ASAON7G4.js";
56
+ import {
57
+ NOT_AVAILABLE,
58
+ NOT_MEANINGFUL,
59
+ changePercentText,
60
+ chartStrings,
61
+ chartWording,
62
+ currencyWholeNumbers,
63
+ defaultNumberDecimals,
64
+ formatExactNumber,
65
+ formatNumber,
66
+ intervalText,
67
+ isPercentagePointUnit,
68
+ nonzeroDecimals,
69
+ wholeCurrencyValue,
70
+ withLocaleStrings,
71
+ withSmallValues
72
+ } from "./chunk-YQ2B3YVF.js";
73
+ import {
74
+ cellMeta,
75
+ cellValue,
76
+ isDateCell,
77
+ isPctCell
78
+ } from "./chunk-OAPCJO6W.js";
79
+ import {
80
+ normalizeCategory,
81
+ normalizeCell,
82
+ normalizeScenario,
83
+ normalizeSeriesValues
84
+ } from "./chunk-SGD3ZHID.js";
85
+ import {
86
+ pushAll
87
+ } from "./chunk-WYJEOMNY.js";
88
+
89
+ // src/core/strings/reasons.ts
90
+ var EN = {
91
+ // reader-facing wording linked only by its consumers.
92
+ reasonSegmentOperandsNotRetained: "Segment operands not retained",
93
+ reasonReferenceIsNonpositive: "Reference is nonpositive",
94
+ reasonValueOrTargetMissing: "Value or target missing",
95
+ reasonPositiveReferenceAndValueRequired: "Positive reference and value required",
96
+ reasonNonzeroCompositionBasisRequired: "Nonzero composition basis required",
97
+ reasonNoSourceCategoryForThisMark: "No source category for this mark",
98
+ reasonASignedCompositionHasNoShareOfANonnegativeTotal: "A signed composition has no share of a nonnegative total",
99
+ reasonShareRequiresAPositiveTotal: "Share requires a positive total",
100
+ reasonTheObservationIsUnavailable: "The observation is unavailable",
101
+ reasonCurrentTotalCombinesIncompatibleUnits: "Current total combines incompatible units",
102
+ reasonRelativeChangeRequiresAPositiveReference: "Relative change requires a positive reference",
103
+ reasonNoObservation: "No observation",
104
+ reasonNoObservationDrawnAsZeroInTheStack: "No observation; drawn as 0 in the stack",
105
+ reasonNonfiniteValue: "Non-finite value",
106
+ reasonIncompatibleUnits: "Incompatible units",
107
+ reasonAComparisonOperandIsUnavailable: "A comparison operand is unavailable",
108
+ reasonComparisonRequiresNumericValues: "Comparison requires numeric values",
109
+ reasonRelativeChangeIsNotMeaningfulForANonpositiveReference: "Relative change is not meaningful for a nonpositive reference"
110
+ }, DE = {
111
+ // reader-facing wording linked only by its consumers.
112
+ reasonSegmentOperandsNotRetained: "Segmentwerte nicht gespeichert",
113
+ reasonReferenceIsNonpositive: "Referenz ist nicht positiv",
114
+ reasonValueOrTargetMissing: "Wert oder Ziel fehlt",
115
+ reasonPositiveReferenceAndValueRequired: "Positive Referenz und positiver Wert erforderlich",
116
+ reasonNonzeroCompositionBasisRequired: "Basis der Zusammensetzung darf nicht null sein",
117
+ reasonNoSourceCategoryForThisMark: "Keine Quellkategorie f\xFCr diese Marke",
118
+ reasonASignedCompositionHasNoShareOfANonnegativeTotal: "Eine Zusammensetzung mit Vorzeichen hat keinen Anteil an einer nichtnegativen Summe",
119
+ reasonShareRequiresAPositiveTotal: "Anteil braucht eine positive Summe",
120
+ reasonTheObservationIsUnavailable: "Beobachtung nicht verf\xFCgbar",
121
+ reasonCurrentTotalCombinesIncompatibleUnits: "Aktuelle Summe enth\xE4lt unvereinbare Einheiten",
122
+ reasonRelativeChangeRequiresAPositiveReference: "Relative \xC4nderung braucht eine positive Referenz",
123
+ reasonNoObservation: "Keine Beobachtung",
124
+ reasonNoObservationDrawnAsZeroInTheStack: "Keine Beobachtung; im Stapel als 0 gezeichnet",
125
+ reasonNonfiniteValue: "Nichtendlicher Wert",
126
+ reasonIncompatibleUnits: "Unvereinbare Einheiten",
127
+ reasonAComparisonOperandIsUnavailable: "Ein Vergleichswert ist nicht verf\xFCgbar",
128
+ reasonComparisonRequiresNumericValues: "Vergleich braucht Zahlenwerte",
129
+ reasonRelativeChangeIsNotMeaningfulForANonpositiveReference: "Relative \xC4nderung bei einer nichtpositiven Referenz nicht aussagekr\xE4ftig"
130
+ }, { chartString: chartString2 } = chartStrings(EN, DE), reasonKeys = ["reasonSegmentOperandsNotRetained", "reasonReferenceIsNonpositive", "reasonValueOrTargetMissing", "reasonPositiveReferenceAndValueRequired", "reasonNonzeroCompositionBasisRequired", "reasonNoSourceCategoryForThisMark", "reasonASignedCompositionHasNoShareOfANonnegativeTotal", "reasonShareRequiresAPositiveTotal", "reasonTheObservationIsUnavailable", "reasonCurrentTotalCombinesIncompatibleUnits", "reasonRelativeChangeRequiresAPositiveReference", "reasonNoObservation", "reasonNoObservationDrawnAsZeroInTheStack", "reasonNonfiniteValue", "reasonIncompatibleUnits", "reasonAComparisonOperandIsUnavailable", "reasonComparisonRequiresNumericValues", "reasonRelativeChangeIsNotMeaningfulForANonpositiveReference"], reasonByEnglish;
131
+ function localizedRecordReason(reason, language) {
132
+ let key = (reasonByEnglish ??= new Map(reasonKeys.map((key2) => [EN[key2], key2]))).get(reason);
133
+ return key === void 0 ? reason : chartString2({ locale: { language } }, key);
134
+ }
135
+
136
+ // src/core/strings/a11y-valueText.ts
137
+ var EN2 = {
138
+ // reader-facing wording linked only by its consumers.
139
+ valueWithheld: "Value withheld",
140
+ valueUnavailable: "Unavailable ({v1})",
141
+ observationUnavailable: "Unavailable (no observation)"
142
+ }, DE2 = {
143
+ // reader-facing wording linked only by its consumers.
144
+ valueWithheld: "Wert zur\xFCckgehalten",
145
+ valueUnavailable: "Nicht verf\xFCgbar ({v1})",
146
+ observationUnavailable: "Nicht verf\xFCgbar (keine Beobachtung)"
147
+ }, { chartString: chartString3 } = chartStrings(EN2, DE2);
148
+
149
+ // src/core/a11y/valueText.ts
150
+ function decimalPrecision(raw) {
151
+ if (typeof raw != "number") return 0;
152
+ let [mantissa, exponent = "0"] = String(raw).split("e");
153
+ return Math.max(0, (mantissa.split(".")[1]?.length ?? 0) - Number(exponent));
154
+ }
155
+ var DERIVED_PERCENT_FORMAT = "12.34%", DERIVED_NUMBER_DECIMALS = 2;
156
+ function percentDecimals(value, percent) {
157
+ return nonzeroDecimals(percent, value.format ? parseFormatExample(value.format).decimals : 2);
158
+ }
159
+ function derivedPercentText(value, locale) {
160
+ if (value.derived !== "percent" || value.state !== "value" || typeof value.raw != "number") return;
161
+ let percent = value.unit === "fraction" ? value.raw * 100 : value.raw;
162
+ return derivedValueText({ ...value, raw: percent, unit: "%" }, percentDecimals(value, percent), !1, locale, !0);
163
+ }
164
+ function percentExample(decimals) {
165
+ return decimals > 0 ? `12.${"3".padEnd(decimals, "4")}%` : "12%";
166
+ }
167
+ function unscaledUnit(unit) {
168
+ let magnitude = /(?<![\p{L}\p{N}/])(?:k|K|M|mm|mn|B|bn|T|tn|Bn|Md|Mio\.?|Mrd\.?|Bio\.?|Tsd\.?)(?![\p{L}\p{N}/²³])|(?<=(?:\p{Sc}|\b[A-Z]{3})\s?)(?:k|K|M|m|mm|mn|B|bn|T|tn)(?![\p{L}\p{N}/²³])|(?<![\p{L}\p{N}/])(?:k|K|M|m|mm|mn|B|bn|T|tn)(?=\s?(?:\p{Sc}|[A-Z]{3}\b))/u;
169
+ return unit.replace(magnitude, "").trim() || void 0;
170
+ }
171
+ function rawUnit(value) {
172
+ return value.scaledUnit && value.unit !== void 0 ? unscaledUnit(value.unit) : value.unit;
173
+ }
174
+ function valueUnit(value) {
175
+ let spec = value.format ? parseFormatExample(value.format) : void 0;
176
+ return (value.unit === void 0 ? void 0 : rawUnit(value) ?? "") ?? (spec ? `${spec.prefix.trim()}${spec.suffix.trim()}` : "");
177
+ }
178
+ function derivedValueText(value, decimals, signed, locale, percent = !1) {
179
+ if (value.state !== "value" || typeof value.raw != "number") return interactionValueText(value, locale);
180
+ let text = decimals > 20 && !percent ? `${signed && value.raw > 0 ? "+" : ""}${formatExactNumber(value.raw, locale)}` : formatNumber(value.raw, { decimals: defaultNumberDecimals(value.raw, Math.min(20, decimals), value.format ? void 0 : value.unit, value.renderTarget), signed, magnitude: "none", locale, automatic: value.format === void 0 });
181
+ return percent ? `${text}${isPercentagePointUnit(value.unit) ? "pp" : "%"}` : withUnit(text, valueUnit(value));
182
+ }
183
+ function deltaValueText(delta, decimals, locale) {
184
+ if (delta.state !== "value" || typeof delta.raw != "number" || !delta.format) return derivedValueText(delta, decimals, !0, locale);
185
+ let spec = {
186
+ ...exampleSpec(isPercentagePointUnit(delta.unit) ? differenceExample(delta.format) : delta.format, locale, delta.unit),
187
+ signed: !0,
188
+ currencyWhole: currencyWholeNumbers(delta.unit, delta.renderTarget)
189
+ }, text = formatNonzeroWithSpec(delta.raw, spec);
190
+ return spec.prefix || spec.suffix || spec.magnitude !== "none" ? text : withUnit(text, delta.unit);
191
+ }
192
+ function signedPercentText(percent, locale) {
193
+ let decimals = typeof percent.raw == "number" ? percentDecimals(percent, percent.raw) : 2;
194
+ return percent.state === "value" && typeof percent.raw == "number" && !isPercentagePointUnit(percent.unit) ? changePercentText(percent.raw, Math.min(20, decimals), locale) : derivedValueText(percent, decimals, !0, locale, !0);
195
+ }
196
+ var BARE_NUMBER = /^[\s\u00a0\u202f\u2009()+\-\u2212\p{Nd}.,'\u066b\u066c]+$/u, ONE_NUMBER_LABEL = /^[^\p{Nd}]*(\p{Nd}[\p{Nd}.,'\s\u00a0\u202f\u066b\u066c]*)[^\p{Nd}]*$/u;
197
+ function digitValue(digit) {
198
+ let code = digit.codePointAt(0), value = 0;
199
+ for (; /\p{Nd}/u.test(String.fromCodePoint(--code)); ) value++;
200
+ return value % 10;
201
+ }
202
+ function printsZero(label) {
203
+ let number2 = ONE_NUMBER_LABEL.exec(label)?.[1];
204
+ return number2 !== void 0 && [...number2].every((char) => !/\p{Nd}/u.test(char) || digitValue(char) === 0);
205
+ }
206
+ function sourceNumberText(raw, locale, derived2 = !1, unit, target) {
207
+ derived2 && !Number.isInteger(raw) && (raw = Number(raw.toPrecision(15)));
208
+ let decimals = derived2 ? nonzeroDecimals(raw, Math.min(decimalPrecision(raw), DERIVED_NUMBER_DECIMALS)) : decimalPrecision(raw);
209
+ return decimals > 20 ? formatExactNumber(raw, locale) : formatNumber(raw, { decimals: defaultNumberDecimals(raw, decimals, unit, target), magnitude: "none", locale, automatic: derived2 });
210
+ }
211
+ function displayedValueText(value, locale) {
212
+ if (value.state !== "value" || value.kind !== "number" || typeof value.raw != "number") return interactionValueText(value, locale);
213
+ let drawn = value.displayed?.trim();
214
+ if (drawn && !(value.raw !== 0 && printsZero(drawn)))
215
+ return BARE_NUMBER.test(drawn) ? withUnit(drawn, value.unit) : drawn;
216
+ let derived2 = derivedPercentText(value, locale);
217
+ if (derived2 !== void 0) return derived2;
218
+ if (value.format) {
219
+ let spec = { ...exampleSpec(value.format, locale, value.unit), currencyWhole: currencyWholeNumbers(value.unit, value.renderTarget) }, styled = spec.prefix || spec.suffix || spec.magnitude !== "none";
220
+ if (styled || spec.currencyWhole || !drawn) {
221
+ let text = spec.currencyWhole ? formatWithSpec(value.raw, spec) : formatNonzeroWithSpec(value.raw, spec);
222
+ return styled ? text : withUnit(text, rawUnit(value));
223
+ }
224
+ }
225
+ return withUnit(sourceNumberText(value.raw, locale, value.derived === "number", value.format ? void 0 : value.unit, value.renderTarget), rawUnit(value));
226
+ }
227
+ function interactionValueText(value, locale) {
228
+ if (value.state === "suppressed") return chartString3({ locale: { language: locale } }, "valueWithheld");
229
+ if (value.state === "na") return (value.reason ? localizedRecordReason(value.reason, locale) : void 0) || NOT_AVAILABLE;
230
+ if (value.state === "nm") return (value.reason ? localizedRecordReason(value.reason, locale) : void 0) || NOT_MEANINGFUL;
231
+ if (value.state !== "value") return (value.reason ? localizedRecordReason(value.reason, locale) : void 0) || chartString3({ locale: { language: locale } }, "valueUnavailable", { v1: value.state });
232
+ if (value.raw === null) return chartString3({ locale: { language: locale } }, "observationUnavailable");
233
+ if (value.kind === "date") {
234
+ if (typeof value.raw != "string") return String(value.raw);
235
+ let parsed = parseISODate(value.raw);
236
+ return !parsed || !value.format ? value.raw : formatDate(parsed, datePatternFromExample(value.format), locale);
237
+ }
238
+ if (typeof value.raw != "number") return String(value.raw);
239
+ if (value.format && wholeCurrencyValue(value.raw, value.unit, value.renderTarget)) return displayedValueText(value, locale);
240
+ let derived2 = derivedPercentText(value, locale);
241
+ if (derived2 !== void 0) return derived2;
242
+ let text = sourceNumberText(value.raw, locale, value.derived === "number", value.format ? void 0 : value.unit, value.renderTarget);
243
+ return isPercentagePointUnit(value.unit) ? `${text}pp` : withUnit(text, valueUnit(value));
244
+ }
245
+
246
+ // src/core/a11y/recordsShared.ts
247
+ function ownerKey(owner) {
248
+ return JSON.stringify(Object.keys(owner).sort().map((key) => [key, owner[key]]));
249
+ }
250
+ function targetId(target) {
251
+ return JSON.stringify([target.chart, target.panel ?? null, ownerKey(target.owner)]);
252
+ }
253
+ function numericValue(raw, unit, format) {
254
+ return {
255
+ kind: "number",
256
+ raw: typeof raw == "number" && Number.isFinite(raw) ? raw : null,
257
+ state: raw == null ? "missing" : Number.isFinite(raw) ? "value" : "nm",
258
+ ...unit === void 0 ? {} : { unit },
259
+ ...format === void 0 ? {} : { format },
260
+ ...raw == null ? { reason: "No observation" } : Number.isFinite(raw) ? {} : { reason: "Non-finite value" }
261
+ };
262
+ }
263
+ function withoutResidue(raw) {
264
+ return Number.isFinite(raw) && !Number.isInteger(raw) ? Number(raw.toPrecision(15)) : raw;
265
+ }
266
+ function derivedValue(raw, unit, format) {
267
+ return { ...numericValue(typeof raw == "number" ? withoutResidue(raw) : raw, unit, format), derived: "number" };
268
+ }
269
+ function derivedPercent(raw, unit = "%") {
270
+ return { ...numericValue(raw, unit, DERIVED_PERCENT_FORMAT), derived: "percent" };
271
+ }
272
+ function textValue(raw, kind = "text") {
273
+ return {
274
+ kind,
275
+ raw: raw ?? null,
276
+ state: raw == null ? "missing" : "value",
277
+ ...raw == null ? { reason: "No observation" } : {}
278
+ };
279
+ }
280
+ function cellRecordValue(cell, unit, format) {
281
+ return isDateCell(cell) ? textValue(cell.date, "date") : numericValue(cellValue(cell), isPctCell(cell) ? "%" : unit, cellMeta(cell)?.format ?? format);
282
+ }
283
+ function ownerContains(owner, required) {
284
+ let keys = Object.keys(required);
285
+ for (let key of keys) if (required[key] !== owner[key]) return !1;
286
+ return keys.length > 0;
287
+ }
288
+ function matchesAnchor(owner, anchor) {
289
+ if (typeof anchor == "string") return [owner.categoryId, owner.pointId, owner.rowId].includes(anchor);
290
+ let { edge: _edge, ...keys } = anchor;
291
+ return ownerContains(owner, keys);
292
+ }
293
+ function annotationMatches(owner, annotation) {
294
+ return "at" in annotation ? annotation.at !== void 0 && matchesAnchor(owner, annotation.at) : "from" in annotation && annotation.from && matchesAnchor(owner, annotation.from) ? !0 : "to" in annotation && !!(annotation.to && matchesAnchor(owner, annotation.to));
295
+ }
296
+ function indexNodes(ctx) {
297
+ if (ctx.nodeIdsByOwner) return ctx.nodeIdsByOwner;
298
+ let index = /* @__PURE__ */ new Map();
299
+ for (let node of ctx.geometry.scene) {
300
+ if (node.t === "text") continue;
301
+ let keys = Object.keys(node.owner);
302
+ for (let mask = 1; mask < 2 ** keys.length; mask++) {
303
+ let subset = {};
304
+ for (let i = 0; i < keys.length; i++) mask & 2 ** i && (subset[keys[i]] = node.owner[keys[i]]);
305
+ let key = ownerKey(subset), matches = index.get(key);
306
+ matches ? matches.push(node.id) : index.set(key, [node.id]);
307
+ }
308
+ }
309
+ return ctx.nodeIdsByOwner = index, index;
310
+ }
311
+ function indexValueTexts(ctx) {
312
+ if (ctx.valueTextByOwner) return ctx.valueTextByOwner;
313
+ let index = /* @__PURE__ */ new Map(), seen = /* @__PURE__ */ new Set();
314
+ for (let node of ctx.geometry.scene) {
315
+ if (node.t !== "text" || node.part === "interaction-label" || textRole(node) !== "value") continue;
316
+ let key = ownerKey(node.owner);
317
+ seen.has(key) ? index.delete(key) : index.set(key, node.lines.join(" ")), seen.add(key);
318
+ }
319
+ return ctx.valueTextByOwner = index, index;
320
+ }
321
+ function readsAsValue(drawn, raw) {
322
+ let text = drawn.replace(/[\s\u00a0\u202f\u2009']/g, ""), sign = 1;
323
+ /^\(.*\)$/.test(text) && (sign = -1, text = text.slice(1, -1)), /^[\u2212-]/.test(text) ? (sign = -sign, text = text.slice(1)) : text.startsWith("+") && (text = text.slice(1)), text = text.replace(/^[$\u20ac\u00a3\u00a5]+/, "").replace(/%$/, "");
324
+ let magnitude = /(tn|t|bn|b|mn|mm|m|k)$/i.exec(text), scale = 1;
325
+ if (magnitude) {
326
+ let letter = magnitude[1].toLowerCase();
327
+ scale = letter === "k" ? 1e3 : letter === "bn" || letter === "b" ? 1e9 : letter === "tn" || letter === "t" ? 1e12 : 1e6, text = text.slice(0, -magnitude[1].length);
328
+ }
329
+ if (!/^\d[\d.,]*$/.test(text)) return !1;
330
+ let lastDot = text.lastIndexOf("."), lastComma = text.lastIndexOf(","), decimalMark = "";
331
+ if (lastDot >= 0 && lastComma >= 0) decimalMark = lastDot > lastComma ? "." : ",";
332
+ else if (lastDot >= 0 || lastComma >= 0) {
333
+ let mark = lastDot >= 0 ? "." : ",", parts = text.split(mark);
334
+ parts.length === 2 && parts[1].length > 0 && parts[1].length !== 3 ? decimalMark = mark : mark === "." && parts.length === 2 && (decimalMark = ".");
335
+ }
336
+ let grouping = decimalMark === "." ? "," : decimalMark === "," ? "." : /[.,]/, normalized = text.split(grouping).join("");
337
+ decimalMark === "," && (normalized = normalized.replace(",", "."));
338
+ let decimals = decimalMark ? normalized.split(".")[1]?.length ?? 0 : 0, value = Number(normalized);
339
+ if (!Number.isFinite(value)) return !1;
340
+ let tolerance2 = 0.5 * Math.pow(10, -decimals) * scale + 1e-9 * Math.max(1, Math.abs(raw));
341
+ return Math.abs(sign * value * scale - raw) <= tolerance2;
342
+ }
343
+ function claimIdsFor(ctx, nodeIds) {
344
+ if (!ctx.claimsByNode) {
345
+ ctx.claimsByNode = /* @__PURE__ */ new Map();
346
+ for (let claim of ctx.claims) if (claim.nodeId) {
347
+ let matches = ctx.claimsByNode.get(claim.nodeId);
348
+ matches ? matches.push(claim.id) : ctx.claimsByNode.set(claim.nodeId, [claim.id]);
349
+ }
350
+ }
351
+ return [...new Set(nodeIds.flatMap((id) => ctx.claimsByNode.get(id) ?? []))];
352
+ }
353
+ function printsInFull(ctx, placed, text) {
354
+ let nodeId = placed?.labelNodeId ?? (placed?.labelId === void 0 ? void 0 : `label:${placed.labelId}`), node = nodeId === void 0 ? void 0 : ctx.geometry.scene.find((item) => item.id === nodeId), words = (value) => value.replace(/\s+/g, " ").trim();
355
+ return node?.t === "text" && words(node.lines.join(" ")) === words(text);
356
+ }
357
+ function makeRecord(ctx, owner, value, details = {}) {
358
+ let target = { ...ctx.scope, owner }, nodeIds = details.nodeIds ?? indexNodes(ctx).get(ownerKey(owner)) ?? [], annotations = ctx.request.annotations.flatMap((annotation, index) => {
359
+ if (!annotationMatches(owner, annotation)) return [];
360
+ let id = annotation.id ?? `${annotation.kind}-${index + 1}`, placed = ctx.geometry.annotations.find((item) => item.id === id), text = placed?.computedText ?? annotation.text ?? ("label" in annotation && annotation.label || "");
361
+ return printsInFull(ctx, placed, text) ? [] : [{ id, text }];
362
+ }), candidate = value.kind === "number" && value.state === "value" && value.displayed === void 0 ? indexValueTexts(ctx).get(ownerKey(owner)) : void 0, drawn = candidate !== void 0 && typeof value.raw == "number" && readsAsValue(candidate, value.raw) ? candidate : void 0;
363
+ return {
364
+ id: targetId(target),
365
+ target,
366
+ value: drawn === void 0 ? value : { ...value, displayed: drawn },
367
+ label: Object.values(owner).join(" / "),
368
+ fields: [],
369
+ comparisons: [],
370
+ annotations,
371
+ claimIds: claimIdsFor(ctx, nodeIds),
372
+ nodeIds,
373
+ ...details
374
+ };
375
+ }
376
+ var PROSE_ROLES = /* @__PURE__ */ new Set(["title", "subtitle", "source", "note", "axis"]);
377
+ function exhibitPercentDecimals(scene) {
378
+ let decimals;
379
+ for (let node of scene)
380
+ if (!(node.t !== "text" || node.part === "interaction-label" || PROSE_ROLES.has(textRole(node))))
381
+ for (let match of node.lines.join(" ").matchAll(/\d(?:[.,](\d+))?[\s\u00a0\u202f]?%/g))
382
+ decimals = Math.max(decimals ?? 0, match[1]?.length ?? 0);
383
+ return decimals ?? 1;
384
+ }
385
+ function withExhibitPercentFormat(records, scene) {
386
+ let format = percentExample(exhibitPercentDecimals(scene)), derived2 = (value) => value.derived === "percent" && value.format === DERIVED_PERCENT_FORMAT ? { ...value, format } : value, share2 = (value) => value.unit === "%" && value.derived === void 0 && value.format === void 0 && value.state === "value" ? { ...value, format } : derived2(value);
387
+ for (let record of records)
388
+ record.value = derived2(record.value), record.fields = record.fields.map((entry) => ({ ...entry, value: derived2(entry.value) })), record.comparisons = record.comparisons.map((comparison) => ({ ...comparison, percent: derived2(comparison.percent) })), record.share && (record.share = { ...record.share, percent: share2(record.share.percent) });
389
+ return records;
390
+ }
391
+
392
+ // src/core/strings/a11y-structuralRecords.ts
393
+ var EN3 = {
394
+ // reader-facing wording linked only by its consumers.
395
+ valueWithheld: "Value withheld",
396
+ openPeriod: "Open period",
397
+ band: "Band",
398
+ state: "State",
399
+ rowMissing: "A row is missing",
400
+ low: "Low",
401
+ high: "High",
402
+ anchoredDateUnavailable: "Resolved anchored date is unavailable",
403
+ start: "Start",
404
+ end: "End",
405
+ description: "Description",
406
+ caption: "Caption",
407
+ recordSource: "Source",
408
+ recordTarget: "Target",
409
+ maturingHidden: "Maturing value not shown",
410
+ categoryState: "Category state"
411
+ }, DE3 = {
412
+ // reader-facing wording linked only by its consumers.
413
+ valueWithheld: "Wert zur\xFCckgehalten",
414
+ openPeriod: "Offene Periode",
415
+ band: "Band",
416
+ state: "Zustand",
417
+ rowMissing: "Eine Zeile fehlt",
418
+ low: "Niedrig",
419
+ high: "Hoch",
420
+ anchoredDateUnavailable: "Aufgel\xF6stes Ankerdatum nicht verf\xFCgbar",
421
+ start: "Start",
422
+ end: "Ende",
423
+ description: "Beschreibung",
424
+ caption: "Bildunterschrift",
425
+ recordSource: "Quelle",
426
+ recordTarget: "Ziel",
427
+ maturingHidden: "Noch nicht ausgereifter Wert nicht gezeigt",
428
+ categoryState: "Zustand der Kategorie"
429
+ }, { chartString: chartString4 } = chartStrings(EN3, DE3);
430
+
431
+ // src/core/a11y/structuralRecords.ts
432
+ function tableValue(options, cell, column, row = {}, columnFormatAuthored = !1) {
433
+ let kind = cell.kind === "date" ? "date" : cell.kind === "value" || cell.kind === "computed" ? "number" : "text", rowFormat = row.calc !== void 0 || !columnFormatAuthored ? row.format : void 0, own = cell.format ?? rowFormat, format = own ?? column.format, unit = column.unitLabel && own === void 0 ? column.unitLabel : void 0, computed = cell.kind === "computed" || kind === "number" && (row.calc !== void 0 || row.rollUp === !0), derivedPct = computed && (unit === "%" || format !== void 0 && unit === void 0 && specUnitKind(parseFormatExample(format)) === "percent");
434
+ return {
435
+ // An open period has no value yet: unavailable, and it says why.
436
+ kind,
437
+ raw: cell.state === "value" ? cell.raw : null,
438
+ state: cell.state === "open" ? "unavailable" : cell.state,
439
+ displayed: cell.displayed,
440
+ // A cell that names its own format reads through it ("2.7 pp", not
441
+ // "2.7 %"), and the unit the column hoists is not its unit.
442
+ ...derivedPct ? { format: DERIVED_PERCENT_FORMAT, unit: "%", derived: "percent" } : {
443
+ ...format ? { format } : {},
444
+ ...unit ? { unit } : {},
445
+ // The head's "M" or "$k" scales the printed figure; the raw value is in units. Resolve says whether
446
+ // it does: a literal suffix ('1,234 EURk') prints the raw figure, so its unit stays whole.
447
+ ...unit && column.unitScaled && unscaledUnit(unit) !== unit ? { scaledUnit: !0 } : {},
448
+ ...computed ? { derived: "number" } : {}
449
+ },
450
+ ...cell.state !== "value" ? { reason: cell.state === "suppressed" ? chartString4(options, "valueWithheld") : cell.state === "open" ? chartString4(options, "openPeriod") : cell.state } : {}
451
+ };
452
+ }
453
+ function suppressedTableCells(data) {
454
+ let withheld = /* @__PURE__ */ new Set(), visit = (row) => {
455
+ for (let [column, cell] of Object.entries(row.cells ?? {}))
456
+ typeof cell == "object" && cell?.state === "suppressed" && withheld.add(JSON.stringify([row.id, column]));
457
+ row.children?.forEach(visit);
458
+ };
459
+ return data.rows.forEach(visit), withheld;
460
+ }
461
+ function authoredRowSpecs(data) {
462
+ let specs = /* @__PURE__ */ new Map(), visit = (row) => {
463
+ specs.set(row.id, { ...row.format === void 0 ? {} : { format: row.format }, ...row.calc === void 0 ? {} : { calc: row.calc }, cells: row.cells }), row.children?.forEach(visit);
464
+ };
465
+ return data.rows.forEach(visit), specs;
466
+ }
467
+ function tableRecordCells(table, data, options = {}) {
468
+ let withheld = suppressedTableCells(data), rowSpecs = authoredRowSpecs(data), authoredFormat = new Set(data.columns.filter((column) => "format" in column && column.format !== void 0).map((column) => column.id));
469
+ return table.rows.flatMap((row) => table.columns.flatMap((column) => {
470
+ let resolved = row.cells[column.id], cell = resolved && withheld.has(JSON.stringify([row.id, column.id])) ? { ...resolved, raw: null, state: "suppressed", displayed: resolved.state === "suppressed" ? resolved.displayed : "\u2014*", note: void 0, href: void 0 } : resolved;
471
+ if (!cell || column.kind === "rowLabel") return [];
472
+ let spec = rowSpecs.get(row.id), rollUp = row.hasChildren && spec?.cells?.[column.id] === void 0, value = tableValue(options, cell, column, { ...spec, rollUp }, authoredFormat.has(column.id)), sourceColumn = data.columns.find((item) => item.id === column.id);
473
+ if (!cell.format && !spec?.format && !authoredFormat.has(column.id) && !options.format && typeof value.raw == "number" && wholeCurrencyValue(value.raw, options.unit, options.target) && (sourceColumn?.kind === "value" || sourceColumn?.kind === "computed" && calcPreservesScale(sourceColumn.calc)) && (!value.format || specUnitKind(parseFormatExample(value.format)) === "number")) {
474
+ let scaleUnit = value.format && !column.magnitudeInCells ? unitOfSpec(parseFormatExample(value.format)) : void 0;
475
+ value.unit = [options.unit, scaleUnit].filter(Boolean).join(" "), value.renderTarget = options.target;
476
+ }
477
+ return [{ row, column, cell, value }];
478
+ }));
479
+ }
480
+ function bandFields(options, cell) {
481
+ return cell.band?.label === void 0 || cell.state !== "value" ? [] : [{ key: "band", label: chartString4(options, "band"), value: textValue(cell.band.label) }];
482
+ }
483
+ function preparedTableRecords(table, data, scope, options = {}) {
484
+ return tableRecordCells(table, data, options).map(({ row, column, cell, value }) => {
485
+ let owner = { rowId: row.id, colId: column.id }, target = { ...scope, owner };
486
+ return {
487
+ id: targetId(target),
488
+ target,
489
+ value,
490
+ label: `${row.label} / ${column.label}`,
491
+ ...cell.scenario ? { scenario: cell.scenario } : {},
492
+ fields: bandFields(options, cell),
493
+ comparisons: [],
494
+ annotations: [],
495
+ claimIds: [],
496
+ nodeIds: []
497
+ };
498
+ });
499
+ }
500
+ function tableRecords(ctx) {
501
+ let { table } = ctx.geometry.derived;
502
+ return tableRecordCells(table, ctx.request.data, ctx.request.options).map(({ row, column, cell, value }) => makeRecord(ctx, { rowId: row.id, colId: column.id }, value, {
503
+ label: `${row.label} / ${column.label}`,
504
+ ...cell.scenario ? { scenario: cell.scenario } : {},
505
+ fields: bandFields(ctx.request.options, cell),
506
+ // Withheld cells must not disclose operands or authored notes.
507
+ ...cell.state === "suppressed" ? { annotations: [], claimIds: [] } : {}
508
+ }));
509
+ }
510
+ function statusRecords(ctx) {
511
+ let data = ctx.request.data, options = ctx.request.options;
512
+ return ctx.geometry.marks.cells.map((mark) => {
513
+ let state = options.states.find((item) => item.id === mark.state), row = data.rows.find((item) => item.id === mark.row), col = data.columns.find((item) => item.id === mark.col);
514
+ return makeRecord(
515
+ ctx,
516
+ { seriesId: mark.row, categoryId: mark.col },
517
+ textValue(mark.sourceState ?? (mark.missing ? null : mark.state)),
518
+ {
519
+ label: `${row?.label ?? mark.row} / ${col?.label ?? mark.col}`,
520
+ fields: state ? [{ key: "stateLabel", label: chartString4(ctx.request.options, "state"), value: textValue(state.label) }] : [],
521
+ nodeIds: [mark.nodeId],
522
+ anchor: mark.rect
523
+ }
524
+ );
525
+ });
526
+ }
527
+ var BARTABLE_TOTAL_ROW = "__total";
528
+ function bartableRecords(ctx) {
529
+ let data = ctx.request.data, marks = ctx.geometry.marks, options = ctx.request.options, tracks = [
530
+ ...(data.columns ?? []).map((column) => ({ id: column.id, name: column.label ?? column.id, format: column.format })),
531
+ ...data.panels.flatMap((panel) => [
532
+ { id: panel.id, name: panel.label ?? panel.id, unit: panel.unit, format: panel.format ?? options.format },
533
+ // Under cascade: the computed share column of each panel.
534
+ ...options.variant === "cascade" ? [{ id: `share:${panel.id}`, name: `${panel.label ?? panel.id} share`, unit: "%", computed: !0 }] : []
535
+ ]),
536
+ ...options.variant === "cascade" && options.cascade?.growth ? [{ id: "growth", name: options.cascade.growth.label ?? (options.cascade.growth.measure === "cagr" ? "CAGR" : "Share change"), unit: options.cascade.growth.measure === "cagr" ? "%" : "pp", computed: !0 }] : []
537
+ ], derived2 = ctx.geometry.derived, rows = [
538
+ ...derived2.rowOrder.map((id) => data.categories.find((row) => row.id === id)).map((row) => ({ id: row.id, label: row.label ?? row.id })),
539
+ { id: BARTABLE_TOTAL_ROW, label: options.strings?.total ?? "Total" }
540
+ ], number2 = (raw, text, track) => {
541
+ let value = track.computed ? derivedValue(raw, track.unit, track.format) : numericValue(raw, track.unit, track.format);
542
+ return raw === null ? value : { ...value, displayed: text };
543
+ }, perRow = rows.flatMap((row) => tracks.flatMap((track) => {
544
+ let at = (seriesLabel, owner, value, anchor, fields = []) => makeRecord(ctx, owner, value, { label: `${row.label} / ${seriesLabel}`, categoryLabel: row.label, seriesLabel, anchor, fields }), segments = marks.segments.filter((mark) => mark.rowId === row.id && mark.panelId === track.id).map((mark) => at(
545
+ `${track.name} / ${data.series.find((s) => s.id === mark.seriesId)?.label ?? mark.seriesId}`,
546
+ { categoryId: row.id, seriesId: mark.seriesId, colId: track.id },
547
+ number2(mark.value, mark.text, track),
548
+ mark.rect
549
+ )), cells = marks.cells.filter((mark) => !mark.combined && (mark.rowId ?? BARTABLE_TOTAL_ROW) === row.id && mark.colId === track.id).map((mark) => {
550
+ let owner = { categoryId: row.id, colId: track.id };
551
+ if (mark.value === null && mark.kind === "total") return at(track.name, owner, { ...number2(null, mark.text, track), reason: chartString4(ctx.request.options, "rowMissing") }, mark.rect);
552
+ if (!mark.range) return at(track.name, owner, number2(mark.value, mark.text, mark.kind === "total" ? { ...track, computed: !0 } : track), mark.rect);
553
+ let range = { kind: "text", raw: mark.text, state: "value", ...track.unit === void 0 ? {} : { unit: track.unit } };
554
+ return at(track.name, owner, range, mark.rect, [
555
+ { key: "low", label: chartString4(ctx.request.options, "low"), value: numericValue(mark.range.low, track.unit, track.format) },
556
+ { key: "high", label: chartString4(ctx.request.options, "high"), value: numericValue(mark.range.high, track.unit, track.format) }
557
+ ]);
558
+ });
559
+ return [...segments, ...cells];
560
+ })), together = derived2.combinedLabel ?? "", combined = marks.cells.filter((mark) => mark.combined).flatMap((mark) => {
561
+ let track = tracks.find((item) => item.id === mark.colId);
562
+ return track ? [makeRecord(ctx, { segmentId: "combined", colId: track.id }, number2(mark.value, mark.text, track), {
563
+ label: `${together} / ${track.name}`,
564
+ categoryLabel: together,
565
+ seriesLabel: track.name,
566
+ anchor: mark.rect
567
+ })] : [];
568
+ });
569
+ return [...perRow, ...combined];
570
+ }
571
+ function ganttItemRecord(ctx, rowId, rowLabel, item) {
572
+ let mark = ctx.geometry.marks.rows.find((row) => row.id === rowId)?.itemNodes.find((node) => node.id === item.id), start = mark ? textValue(mark.start, "date") : item.anchor ? { kind: "date", raw: null, state: "unavailable", reason: chartString4(ctx.request.options, "anchoredDateUnavailable") } : textValue(item.start, "date");
573
+ return makeRecord(ctx, { categoryId: rowId, segmentId: item.id }, textValue(item.label ?? item.kind), {
574
+ label: `${rowLabel} / ${item.label ?? item.id}`,
575
+ fields: [
576
+ { key: "start", label: chartString4(ctx.request.options, "start"), value: start },
577
+ ...mark || item.end ? [{ key: "end", label: chartString4(ctx.request.options, "end"), value: textValue(mark?.end ?? item.end, "date") }] : []
578
+ ],
579
+ ...mark ? { nodeIds: [mark.nodeId], anchor: mark.rect } : {}
580
+ });
581
+ }
582
+ function ganttRecords(ctx) {
583
+ return ctx.request.data.rows.flatMap((row) => row.kind === "cadence" ? row.events.map((event) => makeRecord(
584
+ ctx,
585
+ { categoryId: row.id, segmentId: event.id },
586
+ textValue(event.date, "date"),
587
+ { label: row.label }
588
+ )) : row.items.map((item) => ganttItemRecord(ctx, row.id, row.label, item)));
589
+ }
590
+ function diagramRecords(ctx) {
591
+ let data = ctx.request.data, marks = ctx.geometry.marks, unprinted = (labelId) => {
592
+ let label = ctx.geometry.labels.find((item) => item.id === labelId);
593
+ return !label || label.hidden !== void 0 || label.title !== void 0;
594
+ }, nodes = marks.nodes.map((mark) => {
595
+ let node = data.nodes.find((item) => item.id === mark.id), fields = [
596
+ ...node.secondaryLabel ? [{ key: "secondaryLabel", label: chartString4(ctx.request.options, "description"), value: textValue(node.secondaryLabel), labelId: `secondary-label:${node.id}` }] : [],
597
+ ...node.caption ? [{ key: "caption", label: chartString4(ctx.request.options, "caption"), value: textValue(node.caption), labelId: `caption-label:${node.id}` }] : []
598
+ ];
599
+ return makeRecord(ctx, { pointId: mark.id }, textValue(node.label), {
600
+ label: node.label,
601
+ nodeIds: mark.sceneNodeIds,
602
+ anchor: mark.rect,
603
+ fields: fields.map(({ key, label, value }) => ({ key, label, value })),
604
+ cardFields: fields.filter((field3) => unprinted(field3.labelId)).map((field3) => field3.key)
605
+ });
606
+ }), edges = marks.edges.map((mark) => {
607
+ let edge = data.edges?.find((item) => item.id === mark.id);
608
+ return makeRecord(ctx, { segmentId: mark.id }, textValue(edge?.label), {
609
+ label: edge?.label ?? `${mark.source.nodeId} / ${mark.target.nodeId}`,
610
+ nodeIds: mark.sceneNodeIds,
611
+ anchor: mark.route.bounds,
612
+ fields: [
613
+ { key: "source", label: chartString4(ctx.request.options, "recordSource"), value: textValue(mark.source.nodeId) },
614
+ { key: "target", label: chartString4(ctx.request.options, "recordTarget"), value: textValue(mark.target.nodeId) }
615
+ ],
616
+ cardFields: []
617
+ });
618
+ });
619
+ return [...nodes, ...edges];
620
+ }
621
+ function gridRecords(ctx, childRecords) {
622
+ let stack = ctx.geometry.derived.metricStack;
623
+ if (stack) {
624
+ let data = ctx.request.data;
625
+ return stack.panels.flatMap((panel) => panel.values.map((raw, i) => {
626
+ let source = data.panels.find((p) => p.id === panel.id), category = data.categories[i], target = { ...ctx.scope, panel: panel.id, owner: { seriesId: panel.id, categoryId: category.id } }, hidden = panel.displayed[i] === "Not shown";
627
+ return {
628
+ id: targetId(target),
629
+ target,
630
+ label: `${source.title} / ${category.label}`,
631
+ seriesLabel: source.title,
632
+ categoryLabel: category.label,
633
+ // Every stack figure is an expression over the measures: computed, so it reads without float residue.
634
+ value: { ...hidden ? numericValue(null, source.unit) : derivedValue(raw, source.unit), displayed: panel.displayed[i], ...hidden ? { state: "unavailable", reason: chartString4(ctx.request.options, "maturingHidden") } : {} },
635
+ fields: [{ key: "state", label: chartString4(ctx.request.options, "categoryState"), value: { kind: "text", state: "value", raw: panel.states[i] } }],
636
+ comparisons: [],
637
+ annotations: [],
638
+ claimIds: [],
639
+ nodeIds: panel.nodeIds[i]
640
+ };
641
+ }));
642
+ }
643
+ let marks = ctx.geometry.marks, inputs = normalizeGridData(ctx.request.data).panels;
644
+ return marks.panels.flatMap((panel) => {
645
+ let prepared = panel.chart, input = inputs.find((candidate) => candidate.id === panel.id);
646
+ if (!prepared || !input || !childRecords) return [];
647
+ let prefix = `${panel.id}/`, scope = { chart: ctx.scope.chart, panel: ctx.scope.panel ? `${ctx.scope.panel}/${panel.id}` : panel.id };
648
+ return childRecords({ request: resolveChartRequest({ type: panel.type, data: input.data, options: prepared.options, fontMetrics: ctx.request.fontMetrics }), geometry: prepared.geometry, scope, claims: [] }).map((record) => {
649
+ let nodeIds = record.nodeIds.map((id) => prefix + id);
650
+ return {
651
+ ...record,
652
+ nodeIds,
653
+ claimIds: record.value.state === "suppressed" ? [] : ctx.claims.filter((claim) => claim.nodeId && nodeIds.includes(claim.nodeId)).map((claim) => claim.id),
654
+ annotations: record.annotations.map((annotation) => ({ ...annotation, id: prefix + annotation.id })),
655
+ ...record.anchor ? { anchor: { ...record.anchor, x: record.anchor.x + prepared.offset.x, y: record.anchor.y + prepared.offset.y } } : {}
656
+ };
657
+ });
658
+ });
659
+ }
660
+ function structuralRecords(ctx, recordsForChild) {
661
+ switch (ctx.request.type) {
662
+ case "dimswitch": {
663
+ let compiled = ctx.geometry.derived.compiled;
664
+ return tableRecords({ ...ctx, request: { ...ctx.request, data: compiled.data, options: compiled.options } }).map((record) => record.value.kind === "number" && record.value.derived === void 0 ? { ...record, value: { ...record.value, derived: "number" } } : record);
665
+ }
666
+ case "table":
667
+ return tableRecords(ctx);
668
+ case "status":
669
+ return statusRecords(ctx);
670
+ case "bartable":
671
+ return bartableRecords(ctx);
672
+ case "gantt":
673
+ return ganttRecords(ctx);
674
+ case "diagram":
675
+ return diagramRecords(ctx);
676
+ case "grid":
677
+ return gridRecords(ctx, recordsForChild);
678
+ default:
679
+ return;
680
+ }
681
+ }
682
+
683
+ // src/core/strings/a11y-creativeRecords.ts
684
+ var EN4 = {
685
+ // reader-facing wording linked only by its consumers.
686
+ accountMedian: "Account median",
687
+ medianPopulation: "Median population",
688
+ medianWindow: "Median window",
689
+ spendToDate: "Spend to date",
690
+ fatigueRule: "Authored fatigue rule",
691
+ dailyMeanChange: "Change of unweighted daily means",
692
+ baselineObservations: "Baseline observations",
693
+ currentObservations: "Current observations",
694
+ dailyMetric: "Daily {v1}"
695
+ }, DE4 = {
696
+ // reader-facing wording linked only by its consumers.
697
+ accountMedian: "Kontomedian",
698
+ medianPopulation: "Grundgesamtheit des Medians",
699
+ medianWindow: "Zeitraum des Medians",
700
+ spendToDate: "Ausgaben bis heute",
701
+ fatigueRule: "Angegebene Erm\xFCdungsregel",
702
+ dailyMeanChange: "\xC4nderung der ungewichteten Tagesmittel",
703
+ baselineObservations: "Beobachtungen im Basiszeitraum",
704
+ currentObservations: "Beobachtungen im aktuellen Zeitraum",
705
+ dailyMetric: "T\xE4glich {v1}"
706
+ }, { chartString: chartString5 } = chartStrings(EN4, DE4);
707
+
708
+ // src/core/a11y/creativeRecords.ts
709
+ function creativeRecords(ctx) {
710
+ if (ctx.request.type !== "creative") return;
711
+ let data = ctx.request.data, marks = ctx.geometry.marks, fatigue = ctx.geometry.derived.fatigue, records = creativeMetrics.map(([key, label, suffix]) => {
712
+ let unit = suffix === "currency" ? data.facts.currency : suffix, owner = { seriesId: key, categoryId: data.id };
713
+ return makeRecord(ctx, owner, numericValue(data.metrics[key].value, unit), {
714
+ label,
715
+ seriesLabel: label,
716
+ categoryLabel: data.facts.name,
717
+ anchor: marks.metrics[key],
718
+ nodeIds: [`creative:row:${key}`, `label:creative:metric:${key}`, `label:creative:value:${key}`, `label:creative:median:${key}`],
719
+ fields: [
720
+ { key: "accountMedian", label: chartString5(ctx.request.options, "accountMedian"), value: numericValue(data.metrics[key].accountMedian, unit) },
721
+ { key: "population", label: chartString5(ctx.request.options, "medianPopulation"), value: textValue(data.comparison.population) },
722
+ { key: "window", label: chartString5(ctx.request.options, "medianWindow"), value: textValue(`${data.comparison.startDate} to ${data.comparison.endDate}`) }
723
+ ]
724
+ });
725
+ });
726
+ records.push(makeRecord(ctx, { pointId: data.id }, textValue(data.media.alt), {
727
+ label: data.facts.name,
728
+ anchor: marks.media,
729
+ fields: [{ key: "spendToDate", label: chartString5(ctx.request.options, "spendToDate"), value: numericValue(data.facts.spendToDate, data.facts.currency) }]
730
+ })), records.push(makeRecord(ctx, { seriesId: "fatigue", categoryId: data.id }, fatigue.status === "unavailable" ? { kind: "text", raw: null, state: "unavailable", reason: fatigue.reason } : textValue(fatigue.status), {
731
+ label: chartString5(ctx.request.options, "fatigueRule"),
732
+ nodeIds: ["label:creative:fatigue:0"],
733
+ claimIds: ctx.claims.filter((claim) => claim.id.startsWith("creative:fatigue:")).map((claim) => claim.id),
734
+ fields: [
735
+ { key: "changePct", label: chartString5(ctx.request.options, "dailyMeanChange"), value: derivedPercent(fatigue.changePct) },
736
+ { key: "baselineN", label: chartString5(ctx.request.options, "baselineObservations"), value: numericValue(fatigue.baseline.inputs.length) },
737
+ { key: "currentN", label: chartString5(ctx.request.options, "currentObservations"), value: numericValue(fatigue.current.inputs.length) }
738
+ ]
739
+ }));
740
+ for (let row of data.observations) for (let key of ["spend", "cpa", "ctr"]) records.push(makeRecord(
741
+ ctx,
742
+ { seriesId: `daily:${key}`, categoryId: row.date },
743
+ numericValue(row[key], key === "ctr" ? "%" : data.facts.currency),
744
+ { label: `${row.date} ${key.toUpperCase()}`, categoryLabel: row.date, seriesLabel: chartString5(ctx.request.options, "dailyMetric", { v1: key.toUpperCase() }) }
745
+ ));
746
+ return records;
747
+ }
748
+
749
+ // src/core/strings/a11y-businessRecords.ts
750
+ var EN5 = {
751
+ // reader-facing wording linked only by its consumers.
752
+ band: "Band",
753
+ start: "Start",
754
+ end: "End",
755
+ group: "Group",
756
+ attainment: "Attainment",
757
+ referenceNonpositive: "Reference is nonpositive",
758
+ latest: "latest",
759
+ position: "Position",
760
+ stageTotal: "Stage total",
761
+ stageConversion: "Stage conversion",
762
+ noPrecedingStage: "No preceding stage",
763
+ cumulativeShare: "Cumulative share",
764
+ cumulativeAmount: "Cumulative amount",
765
+ cells: "Cells",
766
+ responseShare: "Response share",
767
+ sampleSize: "Sample size",
768
+ sampleSizeMissing: "Sample size not supplied",
769
+ inflow: "Inflow",
770
+ outflow: "Outflow",
771
+ stage: "Stage",
772
+ includes: "Includes",
773
+ shareOfSource: "Share of source outflow",
774
+ shareOfTarget: "Share of target inflow"
775
+ }, DE5 = {
776
+ // reader-facing wording linked only by its consumers.
777
+ band: "Band",
778
+ start: "Start",
779
+ end: "Ende",
780
+ group: "Gruppe",
781
+ attainment: "Zielerreichung",
782
+ referenceNonpositive: "Referenz ist nicht positiv",
783
+ latest: "Zuletzt",
784
+ position: "Position",
785
+ stageTotal: "Summe der Stufe",
786
+ stageConversion: "Umwandlung der Stufe",
787
+ noPrecedingStage: "Keine vorherige Stufe",
788
+ cumulativeShare: "Kumulierter Anteil",
789
+ cumulativeAmount: "Kumulierter Betrag",
790
+ cells: "Zellen",
791
+ responseShare: "Antwortanteil",
792
+ sampleSize: "Stichprobengr\xF6\xDFe",
793
+ sampleSizeMissing: "Stichprobengr\xF6\xDFe nicht angegeben",
794
+ inflow: "Zufluss",
795
+ outflow: "Abfluss",
796
+ stage: "Stufe",
797
+ includes: "Umfasst",
798
+ shareOfSource: "Anteil am Abfluss der Quelle",
799
+ shareOfTarget: "Anteil am Zufluss des Ziels"
800
+ }, { chartString: chartString6 } = chartStrings(EN5, DE5);
801
+
802
+ // src/core/a11y/details.ts
803
+ function detailRecordFields(options, cell) {
804
+ let details = cell !== null && typeof cell == "object" && !isDateCell(cell) ? cell.details : void 0;
805
+ if (!details) return [];
806
+ let declared = options.detailFields ?? [];
807
+ return [
808
+ ...declared.map((field3) => field3.key).filter((key) => Object.hasOwn(details, key)),
809
+ ...Object.keys(details).filter((key) => !declared.some((field3) => field3.key === key))
810
+ ].map((key) => {
811
+ let field3 = declared.find((entry) => entry.key === key), raw = details[key];
812
+ return {
813
+ key: `detail:${key}`,
814
+ label: field3?.label ?? key,
815
+ value: typeof raw == "string" ? textValue(raw) : numericValue(raw, field3?.unit, field3?.format)
816
+ };
817
+ });
818
+ }
819
+
820
+ // src/core/a11y/businessRecords.ts
821
+ var unavailable = (reason) => ({ kind: "number", raw: null, state: "unavailable", reason }), field = (key, label, value) => ({ key, label, value }), share = (value, denominator2, percent) => ({
822
+ numerator: value,
823
+ denominator: derivedValue(denominator2, value.unit, value.format),
824
+ percent: derivedPercent(percent)
825
+ }), geometry = (ctx) => ctx.geometry, number = (ctx, value) => numericValue(value, ctx.request.options.unit, ctx.request.options.format), derived = (ctx, value) => derivedValue(value, ctx.request.options.unit, ctx.request.options.format);
826
+ function waterfallMembership(data, derived2) {
827
+ let totals = /* @__PURE__ */ new Map(), levels = /* @__PURE__ */ new Map(), hiddenAfter = new Set(data.connectors?.filter((connector) => connector.hidden).map((connector) => connector.from)), inbound = new Map(data.connectors?.filter((connector) => !connector.hidden).map((connector) => [connector.to, connector])), running = [];
828
+ for (let item of data.items) {
829
+ let connector = inbound.get(item.id), origin = connector && levels.get(connector.from);
830
+ origin && (running = origin.anchors.get(connector.anchor ?? "sum") ?? origin.end);
831
+ let anchors = /* @__PURE__ */ new Map(), basis = derived2.totalBasis[item.id];
832
+ if (basis)
833
+ running = basis.authored ? [{ categoryId: item.id }] : running, totals.set(item.id, running), anchors.set("__total", []);
834
+ else if (item.toBaseline && (running = []), item.segments?.length)
835
+ for (let segment of item.segments)
836
+ running = [...running, { categoryId: item.id, segmentId: segment.id }], anchors.set(segment.id, running);
837
+ else
838
+ running = [...running, { categoryId: item.id }], anchors.set("__value", running);
839
+ anchors.set("sum", running), levels.set(item.id, { end: running, anchors }), hiddenAfter.has(item.id) && (running = []);
840
+ }
841
+ return new Map([...totals].map(([id, members]) => [id, members.filter((member, index) => members.findIndex((other) => other.categoryId === member.categoryId && other.segmentId === member.segmentId) === index)]));
842
+ }
843
+ function segmentOrder(data) {
844
+ return [...new Set(data.items.flatMap((item) => item.segments?.map((segment) => segment.id) ?? []))];
845
+ }
846
+ function waterfall(ctx) {
847
+ let data = ctx.request.data, geo = geometry(ctx);
848
+ if (data.cases?.length) return waterfallCases(ctx, data, geo);
849
+ let membership = waterfallMembership(data, geo.derived), order = segmentOrder(data), segmentValue = (member) => cellValue(normalizeCell(data.items.find((item) => item.id === member.categoryId)?.segments?.find((part) => part.id === member.segmentId)?.value, "value")) ?? 0;
850
+ return geo.marks.bars.flatMap((bar) => {
851
+ let item = data.items.find((item2) => item2.id === bar.id), basis = geo.derived.totalBasis[bar.id];
852
+ return bar.segments.map((segment) => {
853
+ let source = item.segments?.find((source2) => source2.id === segment.id), total = geo.derived.totals[bar.id], members = membership.get(bar.id) ?? [], segmentedTotal = total !== void 0 && segment.id !== "__value" && segment.id !== "__total", operands = members.filter((member) => member.segmentId === segment.id), segmentTotal = operands.reduce((sum, member) => sum + segmentValue(member), 0), value = segmentedTotal ? operands.length ? derived(ctx, segmentTotal) : unavailable("Segment operands not retained") : total === void 0 ? cellRecordValue(normalizeCell(source?.value ?? item.value, "value"), ctx.request.options.unit, ctx.request.options.format) : derived(ctx, total);
854
+ return makeRecord(ctx, { categoryId: bar.id, ...source || segmentedTotal ? { segmentId: segment.id } : {} }, value, {
855
+ label: source?.label ?? item.label ?? item.id,
856
+ anchor: segment.rect,
857
+ scenario: source?.scenario ?? item.scenario,
858
+ ...basis && !basis.authored ? { members: segmentedTotal ? operands : members } : {},
859
+ fields: segmentSpan(
860
+ ctx,
861
+ geo.derived.levels[bar.id]?.start,
862
+ source ? item.segments.map((part) => ({ id: part.id, value: cellValue(normalizeCell(part.value, "value")) ?? 0 })) : segmentedTotal ? order.filter((id) => bar.segments.some((part) => part.id === id)).map((id) => ({ id, value: members.filter((member) => member.segmentId === id).reduce((sum, member) => sum + segmentValue(member), 0) })) : void 0,
863
+ segment.id,
864
+ geo.derived.levels[bar.id]?.end
865
+ )
866
+ });
867
+ });
868
+ });
869
+ }
870
+ function segmentSpan(ctx, start, parts, id, end) {
871
+ let index = parts?.findIndex((part) => part.id === id) ?? -1;
872
+ if (parts && index >= 0 && start !== void 0) {
873
+ let from = parts.slice(0, index).reduce((sum, part) => sum + part.value, start);
874
+ start = from, end = from + parts[index].value;
875
+ }
876
+ return [field("start", chartString6(ctx.request.options, "start"), derived(ctx, start)), field("end", chartString6(ctx.request.options, "end"), derived(ctx, end))];
877
+ }
878
+ function waterfallCases(ctx, data, geo) {
879
+ let cases = data.cases;
880
+ return data.items.flatMap((item) => cases.flatMap((c, k) => {
881
+ let key = `${item.id}:${c.id}`, bar = geo.marks.bars.find((candidate) => candidate.id === key);
882
+ if (!bar) return [];
883
+ let total = geo.derived.totals[key], cell = normalizeCell(item.values?.[k], "value"), value = total === void 0 || geo.derived.totalBasis[key]?.authored ? cellRecordValue(cell, ctx.request.options.unit, ctx.request.options.format) : derived(ctx, total), scenario = (typeof cell == "object" && cell !== null && "scenario" in cell ? cell.scenario : void 0) ?? item.scenario;
884
+ return [makeRecord(ctx, { categoryId: item.id, seriesId: c.id }, value, {
885
+ label: `${item.label ?? item.id}, ${c.label ?? c.id}`,
886
+ anchor: bar.rect,
887
+ scenario,
888
+ fields: [
889
+ field("start", chartString6(ctx.request.options, "start"), derived(ctx, geo.derived.levels[key]?.start)),
890
+ field("end", chartString6(ctx.request.options, "end"), derived(ctx, geo.derived.levels[key]?.end))
891
+ ]
892
+ })];
893
+ }));
894
+ }
895
+ function kpi(ctx) {
896
+ let data = ctx.request.data, geo = geometry(ctx), value = numericValue(data.value, ctx.request.options.unit, data.format ?? ctx.request.options.format), nodeIds = [
897
+ geo.marks.valueNodeId,
898
+ ...geo.marks.comparisonNodeIds ?? [],
899
+ geo.marks.deltaNodeId,
900
+ geo.marks.attainmentNodeId
901
+ ].filter((id) => !!id), comparisons2 = (geo.derived.comparisons ?? []).map((comparison) => ({
902
+ label: comparison.label,
903
+ ...comparison.source === "delta" ? { scenario: data.delta?.scenario } : {},
904
+ current: value,
905
+ reference: numericValue(comparison.vs, value.unit, value.format),
906
+ delta: numericValue(comparison.deltaAbs, value.unit, value.format),
907
+ percent: comparison.deltaPct === null ? unavailable("Reference is nonpositive") : derivedPercent(comparison.deltaPct)
908
+ })), attainment = geo.derived.attainment, card = makeRecord(ctx, { categoryId: "kpi" }, value, {
909
+ label: data.label,
910
+ nodeIds,
911
+ comparisons: comparisons2,
912
+ fields: [
913
+ ...geo.derived.band?.label ? [field("band", chartString6(ctx.request.options, "band"), textValue(geo.derived.band.label))] : [],
914
+ ...attainment ? [
915
+ field("target", attainment.label, numericValue(attainment.vs, value.unit, value.format)),
916
+ field("attainment", chartString6(ctx.request.options, "attainment"), attainment.pct === null ? unavailable(chartString6(ctx.request.options, "referenceNonpositive")) : derivedPercent(attainment.pct))
917
+ ] : []
918
+ ]
919
+ });
920
+ if (!data.spark || !geo.scene.some((node) => node.id === "label:spark:last")) return [card];
921
+ let { cells, values } = kpiSparkSeries(data.spark), index = lastObservedIndex(values), dot = geo.scene.find((node) => node.id === "mark:spark:dot" || node.id === "mark:sparkColLast");
922
+ return [card, makeRecord(ctx, { seriesId: "spark", segmentId: "sparkLast" }, cellRecordValue(cells[index], value.unit, value.format), {
923
+ label: `${data.label}, ${data.spark.labels?.[index] ?? chartString6(ctx.request.options, "latest")}`,
924
+ nodeIds: dot ? [dot.id] : []
925
+ })];
926
+ }
927
+ function sparkline(ctx) {
928
+ let data = ctx.request.data, geo = geometry(ctx), cells = data.values.map((cell, index) => normalizeCell(cell, `values[${index}]`)), gaps = geo.scene.flatMap((node) => node.t === "circle" && node.part === "sparkGap" ? [node] : []).map((node) => {
929
+ let index = Number(node.id.slice(node.id.lastIndexOf(":") + 1)), label = data.labels?.[index];
930
+ return { id: sparklinePointId(index), index, x: node.cx, y: node.cy, ...label === void 0 ? {} : { label } };
931
+ });
932
+ return [...geo.marks.points, ...gaps].sort((a, b) => a.index - b.index).map((point) => {
933
+ let value = cellRecordValue(cells[point.index], ctx.request.options.unit, ctx.request.options.format);
934
+ return makeRecord(ctx, { categoryId: point.id }, value, {
935
+ label: point.label ?? point.id,
936
+ ...point.label === void 0 ? {} : { categoryLabel: point.label },
937
+ anchor: { x: point.x - SPARKLINE_RING_RADIUS, y: point.y - SPARKLINE_RING_RADIUS, w: 2 * SPARKLINE_RING_RADIUS, h: 2 * SPARKLINE_RING_RADIUS },
938
+ fields: [field("position", chartString6(ctx.request.options, "position"), numericValue(point.index + 1))]
939
+ });
940
+ });
941
+ }
942
+ function bullet(ctx) {
943
+ let data = ctx.request.data;
944
+ return geometry(ctx).marks.rows.map((mark) => {
945
+ let row = data.rows.find((row2) => row2.id === mark.id), value = cellRecordValue(normalizeCell(row.value, "value"), ctx.request.options.unit, ctx.request.options.format), target = cellRecordValue(normalizeCell(row.target, "target"), value.unit, value.format), word = ctx.request.options.strings?.target ?? "target", name = word[0].toUpperCase() + word.slice(1);
946
+ return makeRecord(ctx, { categoryId: row.id }, value, {
947
+ label: row.label ?? row.id,
948
+ anchor: mark.rect,
949
+ fields: [field("target", name, target)],
950
+ comparisons: [{
951
+ label: name,
952
+ current: value,
953
+ reference: target,
954
+ delta: typeof value.raw == "number" && typeof target.raw == "number" ? numericValue(value.raw - target.raw, value.unit, value.format) : unavailable("Value or target missing"),
955
+ percent: typeof value.raw == "number" && typeof target.raw == "number" && target.raw > 0 ? derivedPercent((value.raw - target.raw) / target.raw * 100) : unavailable("Positive reference and value required")
956
+ }]
957
+ });
958
+ });
959
+ }
960
+ function seriesSource(ctx) {
961
+ let data = ctx.request.data, categories = data.categories.map(normalizeCategory), series = data.series.map((series2, index) => ({ ...series2, values: normalizeSeriesValues(series2, categories, index) }));
962
+ return { categories, series, cell: (categoryId, seriesId) => {
963
+ let source = series.find((series2) => series2.id === seriesId);
964
+ return cellRecordValue(
965
+ source?.values[categories.findIndex((category) => category.id === categoryId)] ?? null,
966
+ source?.unit ?? ctx.request.options.unit,
967
+ source?.format ?? ctx.request.options.format
968
+ );
969
+ }, isPercent: (categoryId, seriesId) => isPctCell(series.find((series2) => series2.id === seriesId)?.values[categories.findIndex((category) => category.id === categoryId)] ?? null), details: (categoryId, seriesId) => detailRecordFields(
970
+ ctx.request.options,
971
+ series.find((series2) => series2.id === seriesId)?.values[categories.findIndex((category) => category.id === categoryId)]
972
+ ) };
973
+ }
974
+ function funnel(ctx) {
975
+ let source = seriesSource(ctx), geo = geometry(ctx);
976
+ return geo.marks.rows.flatMap((row) => row.segments.map((segment) => {
977
+ let value = source.cell(row.categoryId, segment.id), conversion = geo.derived.conversions.find((conversion2) => conversion2.toId === row.categoryId);
978
+ return makeRecord(ctx, { categoryId: row.categoryId, seriesId: segment.id }, value, {
979
+ label: source.categories.find((category) => category.id === row.categoryId)?.label ?? row.categoryId,
980
+ anchor: segment.rect,
981
+ scenario: source.series.find((series) => series.id === segment.id)?.scenario,
982
+ fields: [
983
+ field("stageTotal", chartString6(ctx.request.options, "stageTotal"), derived(ctx, geo.derived.stageTotals[row.categoryId] ?? void 0)),
984
+ field("conversion", chartString6(ctx.request.options, "stageConversion"), conversion ? derivedPercent(conversion.rate * 100) : unavailable(chartString6(ctx.request.options, "noPrecedingStage"))),
985
+ ...source.details(row.categoryId, segment.id)
986
+ ]
987
+ });
988
+ }));
989
+ }
990
+ function pie(ctx) {
991
+ let source = seriesSource(ctx), geo = geometry(ctx), series = source.series[0], shown = new Set(geo.marks.slices.map((slice) => slice.categoryId));
992
+ return geo.marks.slices.map((slice) => {
993
+ let category = source.categories.find((category2) => category2.id === slice.categoryId), value = category ? source.cell(slice.categoryId, series.id) : derivedValue(slice.value, series.unit ?? ctx.request.options.unit, series.format ?? ctx.request.options.format);
994
+ return makeRecord(ctx, { categoryId: slice.categoryId }, value, {
995
+ label: category?.label ?? ctx.request.options.topN?.restLabel ?? ctx.request.options.strings?.others ?? "Others",
996
+ nodeIds: [slice.nodeId],
997
+ scenario: series.scenario,
998
+ fields: category ? source.details(slice.categoryId, series.id) : [],
999
+ share: share(value, geo.marks.slices.reduce((sum, slice2) => sum + slice2.value, 0), slice.value / geo.marks.slices.reduce((sum, slice2) => sum + slice2.value, 0) * 100),
1000
+ ...category ? {} : { members: source.categories.filter((category2) => !shown.has(category2.id)).map((category2) => ({ categoryId: category2.id, seriesId: series.id })) }
1001
+ });
1002
+ });
1003
+ }
1004
+ function mekkoShare(value, total100, values, mode, isPct) {
1005
+ let basis = total100 ?? values.reduce((sum, item) => sum + (!item.isPct && typeof item.value.raw == "number" ? item.value.raw : 0), 0);
1006
+ if (mode === "percent" && isPct) return {
1007
+ numerator: value,
1008
+ denominator: numericValue(100, "%"),
1009
+ percent: numericValue(typeof value.raw == "number" ? value.raw : null, "%")
1010
+ };
1011
+ let total = mode === "percent" ? basis : values.reduce((sum, item) => sum + (typeof item.value.raw == "number" ? item.value.raw : 0), 0);
1012
+ return { numerator: value, denominator: derivedValue(total, value.unit, value.format), percent: typeof value.raw == "number" && total !== 0 ? derivedPercent(mode === "bar" ? 100 : value.raw / total * 100) : unavailable("Nonzero composition basis required") };
1013
+ }
1014
+ function mekko(ctx) {
1015
+ let source = seriesSource(ctx), geo = geometry(ctx), options = ctx.request.options, variant = options.variant ?? "stacked100", mode = variant === "stacked" && options.valueAxis?.percent ? "percent" : { stacked100: "percent", stacked: "unit", bar: "bar" }[variant], activeSeries = source.series.filter((series) => series.role !== "reference" && series.id !== options.widthSeriesId), plottedSeries = mode === "bar" ? activeSeries.slice(0, 1) : activeSeries, shown = new Set(geo.marks.columns.map((column) => column.categoryId)), pooledCategories = source.categories.filter((category) => !shown.has(category.id)), bases = pooledCategories.map((category) => category.total100 ?? plottedSeries.reduce((sum, series) => {
1016
+ let raw = source.cell(category.id, series.id).raw;
1017
+ return sum + (!source.isPercent(category.id, series.id) && typeof raw == "number" ? raw : 0);
1018
+ }, 0)), pooled = new Map(plottedSeries.map((series) => [series.id, poolMekkoAmounts(pooledCategories.map((category, i) => {
1019
+ let raw = source.cell(category.id, series.id).raw;
1020
+ return { v: typeof raw == "number" ? raw : null, isPct: source.isPercent(category.id, series.id), basis: bases[i] };
1021
+ }), mode === "percent")])), pooledBasis = mode === "percent" && pooledCategories.some((category) => category.total100 !== void 0) ? bases.reduce((sum, basis) => sum + basis, 0) : void 0;
1022
+ return geo.marks.columns.flatMap((column) => column.segments.map((segment) => {
1023
+ let category = source.categories.find((category2) => category2.id === column.categoryId), members = pooledCategories.map((category2) => ({ categoryId: category2.id, seriesId: segment.seriesId })), series = source.series.find((series2) => series2.id === segment.seriesId), value = category ? source.cell(column.categoryId, segment.seriesId) : derivedValue(pooled.get(segment.seriesId), series?.unit ?? ctx.request.options.unit, series?.format ?? ctx.request.options.format), columnLabel = category?.label ?? ctx.request.options.topN?.restLabel ?? ctx.request.options.strings?.others ?? "Others", seriesLabel = series?.label ?? segment.seriesId;
1024
+ return makeRecord(ctx, { categoryId: column.categoryId, seriesId: segment.seriesId }, value, {
1025
+ label: `${columnLabel} / ${seriesLabel}`,
1026
+ categoryLabel: columnLabel,
1027
+ seriesLabel,
1028
+ ...category ? {} : { members },
1029
+ fields: category ? source.details(column.categoryId, segment.seriesId) : [],
1030
+ anchor: segment.rect,
1031
+ scenario: source.series.find((series2) => series2.id === segment.seriesId)?.scenario,
1032
+ share: !category && [...pooled.values()].some((v) => v === null) ? { numerator: value, denominator: unavailable("Incomplete composition"), percent: unavailable("Incomplete composition") } : mekkoShare(value, category ? category.total100 : pooledBasis, plottedSeries.map((series2) => ({ value: category ? source.cell(column.categoryId, series2.id) : numericValue(pooled.get(series2.id)), isPct: !!(category && source.isPercent(column.categoryId, segment.seriesId)) })), mode, !!(category && source.isPercent(column.categoryId, segment.seriesId)))
1033
+ });
1034
+ }));
1035
+ }
1036
+ function pareto(ctx) {
1037
+ let data = ctx.request.data, geo = geometry(ctx), summed = (id) => {
1038
+ let item = data.items.find((item2) => item2.id === id);
1039
+ return !item || item.rest === !0 && (geo.derived.restBucket?.memberIds.length ?? 0) > 0;
1040
+ }, details = (id) => {
1041
+ let item = data.items.find((item2) => item2.id === id);
1042
+ return {
1043
+ label: item?.label ?? item?.id ?? geo.derived.restBucket?.label ?? id,
1044
+ ...summed(id) ? { members: geo.derived.restBucket?.memberIds.map((categoryId) => ({ categoryId })) } : {}
1045
+ };
1046
+ };
1047
+ return [...geo.marks.columns.flatMap((column) => column.segments.map((segment) => {
1048
+ let value = (summed(column.categoryId) ? derived : number)(ctx, geo.derived.values[column.categoryId]);
1049
+ return makeRecord(ctx, { categoryId: column.categoryId, seriesId: segment.seriesId }, value, {
1050
+ ...details(column.categoryId),
1051
+ anchor: segment.rect,
1052
+ share: share(value, geo.derived.total, geo.derived.total > 0 ? geo.derived.values[column.categoryId] / geo.derived.total * 100 : void 0),
1053
+ fields: [field("cumulative", chartString6(ctx.request.options, "cumulativeShare"), derivedPercent(geo.derived.cumulativeShare[column.categoryId]))]
1054
+ });
1055
+ })), ...geo.marks.lines.flatMap((line) => line.points.map((point) => makeRecord(
1056
+ ctx,
1057
+ { categoryId: point.categoryId, seriesId: line.seriesId },
1058
+ derivedPercent(geo.derived.cumulativeShare[point.categoryId]),
1059
+ {
1060
+ ...details(point.categoryId),
1061
+ anchor: { x: point.x, y: point.y },
1062
+ nodeIds: point.markerNodeId ? [point.markerNodeId] : [line.nodeId],
1063
+ fields: [field("cumulative", chartString6(ctx.request.options, "cumulativeAmount"), derived(ctx, geo.derived.cumulative[point.categoryId]))]
1064
+ }
1065
+ )))];
1066
+ }
1067
+ function pvm(ctx) {
1068
+ let data = ctx.request.data, geo = geometry(ctx);
1069
+ return geo.marks.bars.map((bar) => {
1070
+ let effect = geo.derived.effects.find((effect2) => effect2.id === bar.id), value = bar.id === "prior" ? geo.derived.priorRevenue : bar.id === "current" ? geo.derived.currentRevenue : effect?.value, ids = effect ? effect.id === "new" ? geo.derived.new : effect.id === "lost" ? geo.derived.lost : geo.derived.common : data.items.map((item) => item.id);
1071
+ return makeRecord(ctx, { categoryId: bar.id }, derived(ctx, value), {
1072
+ label: effect?.label ?? bar.id,
1073
+ anchor: bar.rect,
1074
+ members: ids.map((categoryId) => ({ categoryId }))
1075
+ });
1076
+ });
1077
+ }
1078
+ function waffle(ctx) {
1079
+ let data = ctx.request.data, geo = geometry(ctx), many = geo.derived.panels[0]?.segments.length !== 1, square = ctx.request.options.variant === "square";
1080
+ return geo.derived.panels.flatMap((panel, index) => panel.segments.map((segment) => {
1081
+ let mark = geo.marks.panels[index], node = mark.segments.find((item) => item.seriesId === segment.seriesId)?.nodeId, series = data.series.find((item) => item.id === segment.seriesId);
1082
+ return makeRecord(ctx, { categoryId: panel.categoryId, seriesId: segment.seriesId }, numericValue(segment.value, "%", series?.format ?? ctx.request.options.format), {
1083
+ label: many ? `${panel.label} / ${series?.label ?? segment.seriesId}` : panel.label,
1084
+ anchor: mark.rect,
1085
+ ...node ? { nodeIds: [node] } : {},
1086
+ fields: square ? [] : [field("cells", chartString6(ctx.request.options, "cells"), textValue(segment.reading))]
1087
+ });
1088
+ }));
1089
+ }
1090
+ function treemap(ctx) {
1091
+ let geo = geometry(ctx), groups = new Map(geo.derived.groups.map((group) => [group.id, group.label]));
1092
+ return geo.derived.items.map((item) => {
1093
+ let value = number(ctx, item.value), group = item.group === void 0 ? void 0 : groups.get(item.group), nodeId = geo.marks.cells.find((cell) => cell.id === item.id)?.nodeId;
1094
+ return makeRecord(ctx, { ...item.group !== void 0 ? { seriesId: item.group } : {}, categoryId: item.id }, value, {
1095
+ label: item.label,
1096
+ ...nodeId ? { nodeIds: [nodeId] } : {},
1097
+ share: share(value, geo.derived.total, item.share),
1098
+ ...group !== void 0 ? { fields: [field("group", chartString6(ctx.request.options, "group"), textValue(group))] } : {}
1099
+ });
1100
+ });
1101
+ }
1102
+ function sankey(chart) {
1103
+ let geo = geometry(chart), ctx = geo.derived.formatsShares ? { ...chart, request: { ...chart.request, options: { ...chart.request.options, format: void 0 } } } : chart, options = ctx.request.options, nodes = new Map(geo.derived.nodes.map((node) => [node.key, node])), rank = new Map(geo.derived.nodes.map((node, index) => [node.key, index])), stageLabel = (column) => geo.derived.stages[column]?.label, name = (key) => {
1104
+ let node = nodes.get(key), stage = node.stage !== void 0 ? stageLabel(node.column) : void 0;
1105
+ return stage !== void 0 ? `${node.label} (${stage})` : node.label;
1106
+ }, percent = (value) => derivedPercent(value);
1107
+ return geo.derived.nodes.flatMap((node) => {
1108
+ let mark = geo.marks.nodes.find((entry) => entry.key === node.key), value = number(ctx, node.value), stage = node.stage !== void 0 ? stageLabel(node.column) : void 0, record = makeRecord(ctx, { categoryId: node.key }, value, {
1109
+ label: node.label,
1110
+ ...mark ? { nodeIds: [mark.nodeId], anchor: mark.rect } : {},
1111
+ share: share(value, geo.derived.stages[node.column]?.total, node.share),
1112
+ fields: [
1113
+ ...stage !== void 0 ? [field("stage", chartString6(options, "stage"), textValue(stage))] : [],
1114
+ ...node.in > 0 && node.out > 0 && node.in !== node.out ? [
1115
+ field("inflow", chartString6(options, "inflow"), derived(ctx, node.in)),
1116
+ field("outflow", chartString6(options, "outflow"), derived(ctx, node.out))
1117
+ ] : [],
1118
+ ...node.members ? [field("includes", chartString6(options, "includes"), textValue(node.members.map((member) => member.label).join(", ")))] : []
1119
+ ]
1120
+ }), outgoing = geo.derived.links.filter((link) => link.source === node.key).sort((a, b) => rank.get(a.target) - rank.get(b.target));
1121
+ return [record, ...outgoing.map((link) => {
1122
+ let linkMark = geo.marks.links.find((entry) => entry.key === link.key);
1123
+ return makeRecord(ctx, { segmentId: link.key }, number(ctx, link.value), {
1124
+ label: `${name(link.source)} \u2192 ${name(link.target)}`,
1125
+ ...linkMark ? { nodeIds: [linkMark.nodeId], anchor: linkMark.at } : {},
1126
+ fields: [
1127
+ field("shareOfSource", chartString6(options, "shareOfSource"), percent(link.shareOfSource)),
1128
+ field("shareOfTarget", chartString6(options, "shareOfTarget"), percent(link.shareOfTarget))
1129
+ ]
1130
+ });
1131
+ })];
1132
+ });
1133
+ }
1134
+ function pyramid(ctx) {
1135
+ let data = ctx.request.data, geo = geometry(ctx);
1136
+ return [geo.marks.left, geo.marks.right].flatMap((marks, index) => marks.map((mark) => {
1137
+ let groupId = geo.derived.groupIds[index], value = number(ctx, geo.derived.values[mark.id]?.[groupId]);
1138
+ return makeRecord(ctx, { categoryId: mark.id, seriesId: groupId }, value, {
1139
+ label: data.bands.find((band) => band.id === mark.id)?.label ?? mark.id,
1140
+ anchor: mark.rect,
1141
+ share: share(value, geo.derived.grandTotal, typeof value.raw == "number" && geo.derived.grandTotal > 0 ? value.raw / geo.derived.grandTotal * 100 : void 0)
1142
+ });
1143
+ }));
1144
+ }
1145
+ function shareValue(share2, format, authored) {
1146
+ return format !== void 0 || authored || share2 === void 0 ? numericValue(share2, "%", format) : derivedPercent(share2);
1147
+ }
1148
+ function likert(ctx) {
1149
+ let data = ctx.request.data, options = ctx.request.options, geo = geometry(ctx);
1150
+ return geo.marks.rows.flatMap((row) => row.bars.map((bar) => {
1151
+ let option = data.scale.find((option2) => [`likert:${option2.id}`, `likert:${option2.id}:neg`, `likert:${option2.id}:pos`].includes(bar.seriesId)), item = data.items.find((item2) => item2.id === row.id), index = data.scale.indexOf(option), entry = item.values[index], raw = typeof entry == "object" && entry !== null ? item.values.find((value2) => value2.optionId === option.id)?.value : entry, value = numericValue(raw, options.values === "percent" ? "%" : ctx.request.options.unit);
1152
+ return makeRecord(ctx, { categoryId: row.id, seriesId: bar.seriesId }, value, {
1153
+ label: `${item.label ?? item.id} / ${option.label ?? option.id}`,
1154
+ anchor: bar.rect,
1155
+ fields: [
1156
+ field("share", chartString6(ctx.request.options, "responseShare"), shareValue(geo.derived.shares[row.id]?.[option.id], options.format, options.values === "percent")),
1157
+ field("base", chartString6(ctx.request.options, "sampleSize"), row.id in geo.derived.base ? numericValue(geo.derived.base[row.id]) : unavailable(chartString6(ctx.request.options, "sampleSizeMissing")))
1158
+ ]
1159
+ });
1160
+ }));
1161
+ }
1162
+ function businessRecords(ctx) {
1163
+ switch (ctx.request.type) {
1164
+ case "waterfall":
1165
+ return waterfall(ctx);
1166
+ case "kpi":
1167
+ return kpi(ctx);
1168
+ case "bullet":
1169
+ return bullet(ctx);
1170
+ case "sparkline":
1171
+ return sparkline(ctx);
1172
+ case "funnel":
1173
+ return funnel(ctx);
1174
+ case "pie":
1175
+ return pie(ctx);
1176
+ case "mekko":
1177
+ return mekko(ctx);
1178
+ case "pareto":
1179
+ return pareto(ctx);
1180
+ case "pvm":
1181
+ return pvm(ctx);
1182
+ case "pyramid":
1183
+ return pyramid(ctx);
1184
+ case "waffle":
1185
+ return waffle(ctx);
1186
+ case "treemap":
1187
+ return treemap(ctx);
1188
+ case "sankey":
1189
+ return sankey(ctx);
1190
+ case "likert":
1191
+ return likert(ctx);
1192
+ default:
1193
+ return;
1194
+ }
1195
+ }
1196
+
1197
+ // src/core/strings/a11y-categoryRecords.ts
1198
+ var EN6 = {
1199
+ // reader-facing wording linked only by its consumers.
1200
+ date: "Date",
1201
+ footnote: "Footnote",
1202
+ shareOfTotal: "Share of total"
1203
+ }, DE6 = {
1204
+ // reader-facing wording linked only by its consumers.
1205
+ date: "Datum",
1206
+ footnote: "Fu\xDFnote",
1207
+ shareOfTotal: "Anteil an der Summe"
1208
+ }, { chartString: chartString7 } = chartStrings(EN6, DE6);
1209
+
1210
+ // src/core/a11y/categoryMarks.ts
1211
+ function withLineEndLabels(ctx, cells) {
1212
+ let endKeys = ctx.geometry.legend?.items.flatMap((item) => {
1213
+ let label2 = ctx.geometry.scene.find((node) => node.id === item.labelId);
1214
+ return label2?.owner.seriesId === void 0 ? [] : [{ seriesId: label2.owner.seriesId, nodeIds: [item.labelId, item.swatchNodeId] }];
1215
+ }) ?? [];
1216
+ if (endKeys.length > 0) {
1217
+ let ends = /* @__PURE__ */ new Map();
1218
+ for (let cell of cells) ends.set(cell.seriesId, cell);
1219
+ for (let key of endKeys) {
1220
+ let end = ends.get(key.seriesId);
1221
+ end && end.nodeIds.push(...key.nodeIds);
1222
+ }
1223
+ }
1224
+ let tail = ctx.geometry.derived.nearZeroTail;
1225
+ if (tail?.mode !== "shared") return cells;
1226
+ let seed = sharedEndLabelId(tail.seriesIds), label = ctx.geometry.scene.find((node) => node.t === "text" && (node.id === seed || node.id.endsWith(`:${seed}`))), categoryId = label?.owner.categoryId;
1227
+ if (!label || categoryId === void 0) return cells;
1228
+ let members = new Set(tail.seriesIds.map(String));
1229
+ return cells.map((cell) => cell.categoryId === categoryId && members.has(cell.seriesId) ? { ...cell, nodeIds: [...cell.nodeIds, label.id] } : cell);
1230
+ }
1231
+ function cellMarks(ctx) {
1232
+ let marks = ctx.geometry.marks;
1233
+ switch (ctx.request.type) {
1234
+ case "column": {
1235
+ let { bars, referenceTicks, ribbons = [] } = marks, ribbonIds = (categoryId, seriesId) => ribbons.filter((ribbon) => ribbon.seriesId === seriesId && (ribbon.from === categoryId || ribbon.to === categoryId)).flatMap((ribbon) => [ribbon.nodeId, `${ribbon.nodeId}:edge`]);
1236
+ return [
1237
+ ...bars.flatMap((bar) => bar.segments ? bar.segments.map((segment) => ({ categoryId: bar.categoryId, seriesId: segment.seriesId, nodeIds: [segment.nodeId, ...ribbonIds(bar.categoryId, segment.seriesId)], anchor: segment.rect })) : [{ categoryId: bar.categoryId, seriesId: bar.seriesId, nodeIds: bar.nodeId ? [bar.nodeId] : [], anchor: bar.rect }]),
1238
+ ...referenceTicks.map((mark) => ({ ...mark, nodeIds: [mark.nodeId], anchor: mark.rect }))
1239
+ ];
1240
+ }
1241
+ case "bar": {
1242
+ let { rows, referenceTicks, ranges } = marks, cells = rows.flatMap((row) => row.bars.map((bar) => ({ categoryId: row.id, seriesId: bar.seriesId, nodeIds: [bar.nodeId], anchor: bar.rect })));
1243
+ for (let tick of referenceTicks) cells.push({ ...tick, nodeIds: [tick.nodeId] });
1244
+ for (let range of ranges ?? []) cells.some((cell) => cell.categoryId === range.categoryId && cell.seriesId === range.seriesId) || cells.push({ categoryId: range.categoryId, seriesId: range.seriesId, nodeIds: range.nodeIds, anchor: rows.find((row) => row.id === range.categoryId)?.rect });
1245
+ return cells;
1246
+ }
1247
+ case "line":
1248
+ return withLineEndLabels(ctx, marks.series.flatMap((series) => series.points.map((point) => ({
1249
+ categoryId: point.categoryId,
1250
+ seriesId: series.seriesId,
1251
+ nodeIds: point.nodeId ? [point.nodeId] : [],
1252
+ anchor: { x: point.x, y: point.y }
1253
+ }))));
1254
+ case "combo": {
1255
+ let { columns, lines } = marks;
1256
+ return [
1257
+ ...columns.flatMap((column) => column.segments.map((segment) => ({ categoryId: column.categoryId, seriesId: segment.seriesId, nodeIds: [segment.nodeId], anchor: segment.rect }))),
1258
+ ...lines.flatMap((line) => line.points.map((point) => ({ categoryId: point.categoryId, seriesId: line.seriesId, nodeIds: point.markerNodeId ? [point.markerNodeId] : [], anchor: { x: point.x, y: point.y } })))
1259
+ ];
1260
+ }
1261
+ case "heatmap":
1262
+ return marks.cells.map((cell) => ({ ...cell, nodeIds: [cell.nodeId], anchor: cell.rect }));
1263
+ case "dot":
1264
+ return marks.rows.flatMap((row) => row.dots.map((dot) => ({ categoryId: row.categoryId, seriesId: dot.seriesId, nodeIds: [dot.nodeId], anchor: { x: dot.cx, y: dot.cy } })));
1265
+ case "slope": {
1266
+ let categories = ctx.request.data.categories, id = (index) => typeof categories[index] == "string" ? categories[index] : categories[index].id;
1267
+ return marks.series.flatMap((series) => [
1268
+ { seriesId: series.seriesId, categoryId: id(0), nodeIds: [series.lineNodeId], anchor: series.from },
1269
+ { seriesId: series.seriesId, categoryId: id(categories.length - 1), nodeIds: [series.lineNodeId], anchor: series.to }
1270
+ ]);
1271
+ }
1272
+ case "butterfly": {
1273
+ let series = ctx.request.data.series.filter((item) => item.role !== "reference"), { left, right } = marks;
1274
+ return [left, right].flatMap((side, index) => side.map((mark) => ({ categoryId: mark.id, seriesId: series[index].id, nodeIds: [mark.nodeId], anchor: mark.rect })));
1275
+ }
1276
+ default:
1277
+ return;
1278
+ }
1279
+ }
1280
+ function categoryMarks(ctx) {
1281
+ let cells = cellMarks(ctx);
1282
+ if (!cells || !["bar", "column", "dot"].includes(ctx.request.type)) return cells;
1283
+ let byCell = new Map(cells.map((cell) => [JSON.stringify([cell.seriesId, cell.categoryId]), cell])), ranges = ctx.geometry.marks.ranges ?? [];
1284
+ for (let range of ranges) {
1285
+ let cell = byCell.get(JSON.stringify([range.seriesId, range.categoryId]));
1286
+ cell ? cell.nodeIds = [.../* @__PURE__ */ new Set([...cell.nodeIds, ...range.nodeIds])] : cells.push({ seriesId: range.seriesId, categoryId: range.categoryId, nodeIds: range.nodeIds });
1287
+ }
1288
+ return cells;
1289
+ }
1290
+
1291
+ // src/core/a11y/comparison.ts
1292
+ function isPercentLevel(value) {
1293
+ return value.unit !== void 0 ? value.unit === "%" : value.format !== void 0 && specUnitKind(parseFormatExample(value.format)) === "percent";
1294
+ }
1295
+ function unavailableValue(reason, unit) {
1296
+ return { kind: "number", raw: null, state: "unavailable", reason, ...unit === void 0 ? {} : { unit } };
1297
+ }
1298
+ function compareValues(current, reference, label, scenario, incompatible) {
1299
+ let reason = incompatible ?? (current.unit !== reference.unit ? "Incompatible units" : void 0) ?? (current.state !== "value" || reference.state !== "value" ? "A comparison operand is unavailable" : void 0) ?? (typeof current.raw != "number" || typeof reference.raw != "number" ? "Comparison requires numeric values" : void 0), deltaUnit = isPercentLevel(current) && isPercentLevel(reference) ? "pp" : current.unit, delta = reason ? unavailableValue(reason, deltaUnit) : derivedValue(current.raw - reference.raw, deltaUnit, current.format), percent = reason ? unavailableValue(reason, "%") : reference.raw <= 0 ? unavailableValue("Relative change requires a positive reference", "%") : derivedPercent(delta.raw / reference.raw * 100);
1300
+ return { label, ...scenario ? { scenario } : {}, current, reference, delta, percent };
1301
+ }
1302
+
1303
+ // src/core/a11y/categoryRecords.ts
1304
+ function valueFor(ctx, matrix, series, categoryId) {
1305
+ let index = matrix.categoryIndex.get(categoryId) ?? -1;
1306
+ if (index >= 0) return cellRecordValue(series.cells[index], series.unit ?? ctx.request.options.unit, series.format ?? ctx.request.options.format);
1307
+ if (!(categoryId === "__others" || categoryId === "__rest" || ctx.request.type === "column" && !!ctx.request.options.topN && /^_*others$/.test(categoryId))) return unavailableValue("No source category for this mark");
1308
+ let sum = matrix.restValues.get(series.id) ?? 0;
1309
+ return derivedValue(sum, series.unit ?? ctx.request.options.unit, series.format ?? ctx.request.options.format);
1310
+ }
1311
+ function comparisons(ctx, matrix, source, sourceScenario, categoryId, value) {
1312
+ if (sourceScenario && sourceScenario !== "AC") return [];
1313
+ let index = matrix.categoryIndex.get(categoryId), refs = matrix.series.flatMap((series) => {
1314
+ let scenario = normalizeScenario((index === void 0 ? void 0 : cellMeta(series.cells[index])?.scenario) ?? series.scenario, "scenario");
1315
+ return series.id !== source.id && scenario && scenario !== "AC" ? [{ series, scenario }] : [];
1316
+ }), variant = ctx.request.options.variant, stackedComponent = (ctx.request.type === "combo" ? !source.kind || source.kind === "column" : ["stacked", "stacked100", "stacked-area", "stacked100-area"].includes(variant ?? "")) && matrix.series.filter((series) => series.role !== "reference" && (ctx.request.type !== "combo" || !series.kind || series.kind === "column")).length > 1;
1317
+ return refs.map(({ series: reference, scenario }) => {
1318
+ let reason = refs.filter((candidate) => candidate.scenario === scenario).length > 1 ? "More than one series has this comparison scenario" : (reference.axis ?? "primary") !== (source.axis ?? "primary") ? "Comparison uses a different axis" : stackedComponent && reference.role === "reference" ? "A stacked component has no per-component comparison reference" : void 0;
1319
+ return {
1320
+ ...compareValues(value, valueFor(ctx, matrix, reference, categoryId), reference.label ?? reference.id, scenario, reason),
1321
+ target: { ...ctx.scope, owner: { seriesId: reference.id, categoryId } }
1322
+ };
1323
+ });
1324
+ }
1325
+ function shareFor(ctx, matrix, mark, value) {
1326
+ let options = ctx.request.options;
1327
+ if (!["stacked", "stacked100", "stacked100-area", "stacked-area"].includes(options.variant ?? "") && !options.valueAxis?.percent && ctx.request.type !== "combo" || value.state === "missing") return;
1328
+ let source = matrix.seriesIndex.get(mark.seriesId);
1329
+ if (source.role === "reference" || ctx.request.type === "combo" && source.kind !== void 0 && source.kind !== "column") return;
1330
+ let ci = matrix.categoryIndex.get(mark.categoryId) ?? -1, parts = matrix.series.filter((series) => series.role !== "reference" && (ctx.request.type !== "combo" || !series.kind || series.kind === "column"));
1331
+ if (["column", "bar", "combo"].includes(ctx.request.type) && !stackAdds(
1332
+ parts.map((series) => ({ label: series.label ?? series.id, unit: series.unit, pctCells: series.cells.some((cell) => cell !== null && isPctCell(cell)) })),
1333
+ ctx.request.options.unit,
1334
+ ctx.request.options.sharesOfOneWhole
1335
+ )) return;
1336
+ let category = matrix.categories[ci], directShare = ci >= 0 && isPctCell(source.cells[ci]);
1337
+ if (parts.length < 2 && category?.total100 === void 0 && !directShare) return;
1338
+ let values = parts.map((series) => valueFor(ctx, matrix, series, mark.categoryId)), hasNegative = values.some((part) => typeof part.raw == "number" && part.raw < 0), like = directShare ? ctx.request.options : value, denominator2 = derivedValue(category?.total100 ?? values.reduce((sum, part, index) => sum + (ci >= 0 && isPctCell(parts[index].cells[ci]) ? 0 : typeof part.raw == "number" ? part.raw : 0), 0), like.unit, like.format), existing = ctx.request.type === "bar" ? ctx.geometry.derived.shares?.[mark.categoryId]?.[mark.seriesId] : ctx.request.type === "column" ? ctx.geometry.derived.percents?.[mark.categoryId]?.[mark.seriesId] : void 0;
1339
+ if (directShare && existing !== void 0) return {
1340
+ numerator: value,
1341
+ denominator: numericValue(100, "%"),
1342
+ percent: numericValue(existing, "%")
1343
+ };
1344
+ let percent = hasNegative ? unavailableValue("A signed composition has no share of a nonnegative total", "%") : denominator2.raw <= 0 ? unavailableValue("Share requires a positive total", "%") : value.state !== "value" ? unavailableValue("The observation is unavailable", "%") : directShare ? numericValue(value.raw, "%") : derivedPercent(existing ?? value.raw / denominator2.raw * 100);
1345
+ return { numerator: value, denominator: denominator2, percent };
1346
+ }
1347
+ function cellFacts(ctx, cell, category, unit) {
1348
+ let fields = [];
1349
+ if (category?.date && fields.push({ key: "date", label: chartString7(ctx.request.options, "date"), value: textValue(category.date, "date") }), cell && typeof cell == "object" && "range" in cell && cell.range)
1350
+ for (let key of ["low", "high", "mid"]) cell.range[key] !== void 0 && fields.push({ key, label: key, value: numericValue(cell.range[key], unit) });
1351
+ let footnote = cell ? cellMeta(cell)?.footnote ?? category?.footnote : category?.footnote;
1352
+ return footnote !== void 0 && fields.push({ key: "footnote", label: chartString7(ctx.request.options, "footnote"), value: numericValue(footnote) }), fields.push(...detailRecordFields(ctx.request.options, cell)), fields;
1353
+ }
1354
+ function categoryRecord(ctx, matrix, mark) {
1355
+ let series = matrix.seriesIndex.get(mark.seriesId), ci = matrix.categoryIndex.get(mark.categoryId) ?? -1, category = matrix.categories[ci], found = valueFor(ctx, matrix, series, mark.categoryId), variant = ctx.request.options.variant, value = found.state === "missing" && ctx.request.type === "line" && (variant === "stacked-area" || variant === "stacked100-area") ? { ...found, reason: "No observation; drawn as 0 in the stack" } : found, scenario = normalizeScenario(cellMeta(series.cells[ci])?.scenario ?? series.scenario, "scenario"), othersLabel = ctx.request.options.topN?.restLabel ?? ctx.request.options.strings?.others ?? "Others", record = makeRecord(ctx, { categoryId: mark.categoryId, seriesId: mark.seriesId }, value, {
1356
+ label: `${category?.label ?? othersLabel} / ${series.label ?? series.id}`,
1357
+ categoryLabel: category?.label ?? othersLabel,
1358
+ seriesLabel: series.label ?? series.id,
1359
+ nodeIds: mark.nodeIds,
1360
+ anchor: mark.anchor,
1361
+ scenario,
1362
+ fields: cellFacts(ctx, series.cells[ci], category, value.unit),
1363
+ comparisons: comparisons(ctx, matrix, series, scenario, mark.categoryId, value),
1364
+ ...ci < 0 ? { members: matrix.categories.filter((item) => !matrix.shown.has(item.id)).map((item) => ({ categoryId: item.id, seriesId: series.id })) } : {}
1365
+ }), share2 = shareFor(ctx, matrix, mark, value);
1366
+ share2 && (record.share = share2);
1367
+ let bump = ctx.request.type === "line" ? ctx.geometry.derived.bump : void 0, rankIndex = matrix.displayedIndex.get(mark.categoryId) ?? -1;
1368
+ bump?.ranks[series.id]?.[rankIndex] != null && (record.rank = { value: bump.ranks[series.id][rankIndex], of: bump.participants[mark.categoryId], policy: "competition", direction: bump.direction === "higherIsBetter" ? "desc" : "asc" });
1369
+ let sort = ctx.request.options.sort?.categories;
1370
+ if (ctx.request.type === "bar" && (sort === "asc" || sort === "desc")) {
1371
+ let order = ctx.geometry.derived.order;
1372
+ record.rank = { value: order.indexOf(mark.categoryId) + 1, of: order.length, policy: "display-order", direction: sort };
1373
+ }
1374
+ return record;
1375
+ }
1376
+ function slopeOtherRecords(ctx, marks, categories) {
1377
+ let folded = ctx.request.type === "slope" ? ctx.geometry.derived.folded : void 0;
1378
+ if (!folded) return [];
1379
+ let options = ctx.request.options, seriesLabel = chartWording(options, "others", "Other"), ends = [
1380
+ { category: categories[0], value: folded.values.from, share: folded.shares.from },
1381
+ { category: categories[categories.length - 1], value: folded.values.to, share: folded.shares.to }
1382
+ ];
1383
+ return marks.filter((mark) => mark.seriesId === folded.otherId).flatMap((mark) => {
1384
+ let end = ends.find((entry) => entry.category?.id === mark.categoryId);
1385
+ return end?.category ? [makeRecord(ctx, { categoryId: mark.categoryId, seriesId: mark.seriesId }, numericValue(end.value, options.unit, options.format), {
1386
+ label: `${end.category.label} / ${seriesLabel}`,
1387
+ categoryLabel: end.category.label,
1388
+ seriesLabel,
1389
+ nodeIds: mark.nodeIds,
1390
+ anchor: mark.anchor,
1391
+ fields: [{ key: "share", label: chartString7(ctx.request.options, "shareOfTotal"), value: derivedPercent(end.share * 100) }],
1392
+ members: folded.memberIds.map((seriesId) => ({ seriesId, categoryId: mark.categoryId }))
1393
+ })] : [];
1394
+ });
1395
+ }
1396
+ function gapAnchor(ctx, marks, matrix, seriesId, categoryId) {
1397
+ let along = ctx.request.type === "bar" ? "y" : "x", across = along === "x" ? "y" : "x", index = matrix.categoryIndex.get(categoryId), center = (mark) => mark.anchor && rectCenter({ w: 0, h: 0, ...mark.anchor }), before, after, beside;
1398
+ for (let mark of marks) {
1399
+ let at2 = center(mark), own = matrix.categoryIndex.get(mark.categoryId);
1400
+ !at2 || own === void 0 || (own === index && (beside ??= at2), mark.seriesId === seriesId && (own < index && (!before || own > before.index) && (before = { index: own, at: at2 }), own > index && (!after || own < after.index) && (after = { index: own, at: at2 })));
1401
+ }
1402
+ let tick = ctx.geometry.axes.find((axis) => axis.axis === along)?.ticks.find((entry) => String(entry.at) === categoryId), baseline = ctx.request.type === "column" && !beside ? ctx.geometry.scene.find((node) => node.t === "line" && node.part === "baseline") : void 0;
1403
+ if (tick && baseline?.t === "line") return { x: tick.pos, y: baseline.y1 };
1404
+ if (!before || !after) return;
1405
+ let position = beside?.[along] ?? tick?.pos ?? before.at[along] + (after.at[along] - before.at[along]) * (index - before.index) / (after.index - before.index), at = (before.at[across] + after.at[across]) / 2;
1406
+ return along === "x" ? { x: position, y: at } : { x: at, y: position };
1407
+ }
1408
+ function categoryRecords(ctx) {
1409
+ let marks = categoryMarks(ctx);
1410
+ if (!marks) return;
1411
+ let data = ctx.request.data, periods = ["line", "column", "combo"].includes(ctx.request.type) ? calendarNames(data.categories, ctx.request.locale?.language) : void 0, categories = data.categories.map((raw, index) => {
1412
+ let category = normalizeCategory(raw, index);
1413
+ return periods?.[index] === void 0 ? category : { ...category, label: periods[index] };
1414
+ }), negName = ctx.request.options.diverging?.labels?.negative ?? "Negative", series = (ctx.request.type === "slope" && ctx.request.options.variant === "diverging" ? data.series.flatMap((item) => item.role !== "reference" && Array.isArray(item.negative) ? [item, { ...item, id: `${item.id}:negative`, label: `${item.label ?? item.id} (${negName})`, values: item.negative }] : [item]) : data.series).map((series2, index) => ({ ...series2, scenario: normalizeScenario(series2.scenario, `series[${index}].scenario`), cells: normalizeSeriesValues(series2, categories, index) })), computed = ctx.request.type === "column" ? ctx.geometry.derived.computedTotal : void 0, ti = computed ? categories.findIndex((category) => category.id === computed.categoryId) : -1;
1415
+ if (computed && ti >= 0) {
1416
+ categories[ti] = { ...categories[ti], total100: computed.total100 };
1417
+ for (let entry of series) computed.values[entry.id] !== void 0 && (entry.cells[ti] = { pct: computed.values[entry.id] });
1418
+ }
1419
+ let shown = new Set(ctx.request.type === "bar" ? ctx.geometry.derived.order : ctx.request.type === "column" ? (ctx.geometry.axes.find((axis) => axis.axis === "x")?.ticks.map((tick) => String(tick.at)) ?? []).filter((id) => {
1420
+ let index = categories.findIndex((category) => category.id === id);
1421
+ return index < 0 || series.some((entry) => entry.role !== "reference" && entry.cells[index] !== null);
1422
+ }) : ctx.request.type === "line" ? ctx.geometry.axes.find((axis) => axis.axis === "x")?.ticks.map((tick) => String(tick.at)) ?? [] : marks.map((mark) => mark.categoryId)), matrix = {
1423
+ categories,
1424
+ series,
1425
+ shown,
1426
+ displayedIndex: new Map([...shown].map((id, index) => [id, index])),
1427
+ categoryIndex: new Map(categories.map((category, index) => [category.id, index])),
1428
+ seriesIndex: new Map(series.map((series2) => [series2.id, series2])),
1429
+ restValues: new Map(series.map((series2) => [series2.id, categories.reduce((total, category, index) => total + (shown.has(category.id) ? 0 : cellValue(series2.cells[index]) ?? 0), 0)]))
1430
+ }, records = marks.filter((mark) => matrix.seriesIndex.has(mark.seriesId)).map((mark) => categoryRecord(ctx, matrix, mark));
1431
+ pushAll(records, slopeOtherRecords(ctx, marks, categories));
1432
+ let marked = new Set(marks.map((mark) => JSON.stringify([mark.seriesId, mark.categoryId]))), slots = ctx.request.type === "column" ? new Set(ctx.geometry.axes.find((axis) => axis.axis === "x")?.ticks.map((tick) => String(tick.at)) ?? []) : shown;
1433
+ for (let series2 of matrix.series) if (series2.role !== "reference") for (let category of categories) {
1434
+ let index = matrix.categoryIndex.get(category.id);
1435
+ slots.has(category.id) && series2.cells[index] === null && !marked.has(JSON.stringify([series2.id, category.id])) && records.push(categoryRecord(ctx, matrix, { seriesId: series2.id, categoryId: category.id, nodeIds: [], anchor: gapAnchor(ctx, marks, matrix, series2.id, category.id) }));
1436
+ }
1437
+ return computed && ti >= 0 ? records.map((record) => record.target.owner.categoryId === computed.categoryId && record.value.kind === "number" && record.value.derived === void 0 ? { ...record, value: { ...record.value, ...typeof record.value.raw == "number" ? { raw: withoutResidue(record.value.raw) } : {}, derived: "number" } } : record) : records;
1438
+ }
1439
+
1440
+ // src/core/strings/a11y-eventRecords.ts
1441
+ var EN7 = {
1442
+ // reader-facing wording linked only by its consumers.
1443
+ date: "Date",
1444
+ category: "Category",
1445
+ recordKind: "Kind"
1446
+ }, DE7 = {
1447
+ // reader-facing wording linked only by its consumers.
1448
+ date: "Datum",
1449
+ category: "Kategorie",
1450
+ recordKind: "Art"
1451
+ }, { chartString: chartString8 } = chartStrings(EN7, DE7);
1452
+
1453
+ // src/core/a11y/eventRecords.ts
1454
+ function eventRecords(ctx) {
1455
+ return ctx.geometry.annotations.flatMap((placed) => {
1456
+ let { event } = placed;
1457
+ if (placed.kind !== "event" || !event) return [];
1458
+ let owner = { annotationId: placed.id }, target = { ...ctx.scope, owner }, { anchor, ...reading } = event;
1459
+ return [{
1460
+ id: targetId(target),
1461
+ target,
1462
+ label: eventHeading(event) || event.items[0].title,
1463
+ value: textValue(event.items[0].title),
1464
+ fields: [
1465
+ ...event.dateText ? [{ key: "date", label: chartString8(ctx.request.options, "date"), value: textValue(event.dateText) }] : [],
1466
+ ...event.place ? [{ key: "place", label: chartString8(ctx.request.options, "category"), value: textValue(event.place) }] : [],
1467
+ ...event.group ? [{ key: "group", label: chartString8(ctx.request.options, "recordKind"), value: textValue(event.group) }] : []
1468
+ ],
1469
+ comparisons: [],
1470
+ annotations: [],
1471
+ claimIds: [],
1472
+ nodeIds: ctx.geometry.scene.filter((node) => node.owner.annotationId === placed.id).map((node) => node.id),
1473
+ ...anchor ? { anchor } : {},
1474
+ event: reading
1475
+ }];
1476
+ });
1477
+ }
1478
+
1479
+ // src/core/a11y/valueLineRecords.ts
1480
+ function valueLineRecords(ctx) {
1481
+ let options = ctx.request.options;
1482
+ return ctx.geometry.annotations.flatMap((placed) => {
1483
+ if (placed.kind !== "valueLine") return [];
1484
+ let index = ctx.request.annotations.findIndex((annotation, at) => (annotation.id ?? `${annotation.kind}-${at + 1}`) === placed.id), authored = ctx.request.annotations[index], raw = placed.derivation?.raw ?? (typeof authored?.value == "number" && authored.valueKind === void 0 ? authored.value : null), nodeIds = ctx.geometry.scene.filter((node) => node.owner.annotationId === placed.id && node.part === "valueLine").map((node) => node.id);
1485
+ if (raw === null || nodeIds.length === 0) return [];
1486
+ let owner = { annotationId: placed.id }, target = { ...ctx.scope, owner }, value = {
1487
+ ...numericValue(raw),
1488
+ ...placed.valueText === void 0 ? {} : { displayed: placed.valueText },
1489
+ // Only a number the author typed reads exact; a mean the engine measured (an average marker too) is rounded.
1490
+ ...typeof authored?.value == "number" && authored.value === raw ? {} : { derived: "number" }
1491
+ }, measure = authored && placed.derivation?.basis === "observed" ? measured(ctx, authored) : void 0, band = tolerance(ctx, placed.toleranceText);
1492
+ return [{
1493
+ id: targetId(target),
1494
+ target,
1495
+ label: placed.computedText || chartString(options, "valueLineName"),
1496
+ value,
1497
+ valueLabel: chartString(options, "valueLineValue"),
1498
+ fields: [
1499
+ ...measure ? [{ key: "measure", label: chartString(options, "valueLineMeasure"), value: textValue(measure) }] : [],
1500
+ ...band ? [{ key: "tolerance", label: chartString(options, "valueLineTolerance"), value: textValue(band) }] : []
1501
+ ],
1502
+ comparisons: [],
1503
+ annotations: [],
1504
+ claimIds: [],
1505
+ nodeIds
1506
+ }];
1507
+ });
1508
+ }
1509
+ function tolerance(ctx, bounds) {
1510
+ return bounds && chartString(ctx.request.options, "valueLineRange", { v1: bounds.low, v2: bounds.high });
1511
+ }
1512
+ function measured(ctx, line) {
1513
+ if (line.seriesId === void 0 && line.from === void 0) return;
1514
+ let data = ctx.request.data, series = data.series?.find((entry) => entry.id === line.seriesId), options = ctx.request.options, base = series ? chartString(options, "valueLineMeanOf", { v1: series.label ?? series.id }) : chartString(options, "valueLineMean");
1515
+ if (line.from === void 0 || line.to === void 0) return base;
1516
+ let categories = data.categories ?? [], periods = ["line", "column", "combo"].includes(ctx.request.type) ? calendarNames(categories, ctx.request.locale?.language) : void 0, name = (id) => {
1517
+ let index = categories.findIndex((category) => (typeof category == "string" ? category : category.id) === id);
1518
+ return index < 0 ? id : periods?.[index] ?? normalizeCategory(categories[index], index).label ?? id;
1519
+ };
1520
+ return chartString(options, "valueLineSpan", { v1: base, v2: name(line.from), v3: name(line.to) });
1521
+ }
1522
+
1523
+ // src/core/strings/a11y-categoryVariants.ts
1524
+ var EN8 = {
1525
+ // reader-facing wording linked only by its consumers.
1526
+ lowCase: "Low case",
1527
+ highCase: "High case",
1528
+ baseCaseName: "Base case",
1529
+ current: "Current"
1530
+ }, DE8 = {
1531
+ // reader-facing wording linked only by its consumers.
1532
+ lowCase: "Niedriger Fall",
1533
+ highCase: "Hoher Fall",
1534
+ baseCaseName: "Basisfall",
1535
+ current: "Aktuell"
1536
+ }, { chartString: chartString9 } = chartStrings(EN8, DE8);
1537
+
1538
+ // src/core/a11y/categoryVariants.ts
1539
+ function tornadoRecords(ctx) {
1540
+ let derived2 = ctx.geometry.derived;
1541
+ if (!derived2.tornado) return;
1542
+ let data = ctx.request.data, categories = data.categories.map(normalizeCategory), marks = ctx.geometry.marks, number2 = (value) => numericValue(value, ctx.request.options.unit, ctx.request.options.format);
1543
+ return derived2.tornado.rows.map((row) => {
1544
+ let mark = marks.rows.find((mark2) => mark2.id === row.id), rank = derived2.tornado.ties.find((tie) => tie.categoryIds.includes(row.id))?.rank;
1545
+ return makeRecord(ctx, { categoryId: row.id }, derivedValue(row.swing, ctx.request.options.unit, ctx.request.options.format), {
1546
+ label: categories.find((category) => category.id === row.id)?.label ?? row.id,
1547
+ anchor: mark?.rect,
1548
+ fields: [
1549
+ { key: "low", label: chartString9(ctx.request.options, "lowCase"), value: number2(row.low) },
1550
+ { key: "high", label: chartString9(ctx.request.options, "highCase"), value: number2(row.high) },
1551
+ { key: "base", label: chartString9(ctx.request.options, "baseCaseName"), value: number2(derived2.tornado.baseValue) }
1552
+ ],
1553
+ members: data.series.map((series) => ({ categoryId: row.id, seriesId: series.id })),
1554
+ ...rank ? { rank: { value: rank, of: derived2.tornado.rows.length, policy: "competition", direction: "desc" } } : {}
1555
+ });
1556
+ });
1557
+ }
1558
+ function categoryVariantRecords(ctx) {
1559
+ if (ctx.request.type === "bar") return tornadoRecords(ctx);
1560
+ if (ctx.request.type !== "variance") return;
1561
+ let data = ctx.request.data, options = ctx.request.options, marks = ctx.geometry.marks, derived2 = ctx.geometry.derived, referenceSeries = data.series.find((series) => series.id === options.variance.vs), categories = data.categories.map(normalizeCategory), cells = new Map(data.series.map((series, index) => [series.id, normalizeSeriesValues(series, categories, index)])), sources = data.series.filter((series) => options.variance.of && options.variance.of !== "total" ? series.id === options.variance.of : series.role !== "reference"), mode = options.variant;
1562
+ return categories.map((category, index) => {
1563
+ let operands = sources.map((series) => cellRecordValue(cells.get(series.id)[index], series.unit ?? options.unit, series.format ?? options.format)), values = operands.map((value) => value.raw).filter((value) => typeof value == "number"), units = new Set(operands.map((value) => value.unit)), current = operands.length === 1 ? operands[0] : units.size > 1 ? unavailableValue("Current total combines incompatible units") : derivedValue(derived2.ac[category.id] === null ? null : values.reduce((sum, value) => sum + value, 0), operands[0]?.unit, options.format), reference = cellRecordValue(cells.get(referenceSeries.id)[index], referenceSeries.unit ?? options.unit, referenceSeries.format ?? options.format), comparison = compareValues(current, reference, referenceSeries.label ?? referenceSeries.id, referenceSeries.scenario), mark = marks.bars.find((mark2) => mark2.categoryId === category.id) ?? marks.pins.find((mark2) => mark2.categoryId === category.id);
1564
+ return makeRecord(ctx, { categoryId: category.id }, mode === "integrated" ? current : mode === "relative" ? comparison.percent : comparison.delta, {
1565
+ label: category.label ?? category.id,
1566
+ anchor: mark?.rect,
1567
+ comparisons: [comparison],
1568
+ // the fields carry the series' own labels; a sum of several reads 'Current'.
1569
+ fields: [
1570
+ { key: "current", label: sources.length === 1 ? sources[0].label ?? sources[0].id : chartString9(ctx.request.options, "current"), value: current },
1571
+ { key: "reference", label: referenceSeries.label ?? referenceSeries.id, value: reference }
1572
+ ],
1573
+ ...options.variance.of === void 0 || options.variance.of === "total" ? { members: data.series.filter((series) => series.role !== "reference").map((series) => ({ categoryId: category.id, seriesId: series.id })) } : {}
1574
+ });
1575
+ });
1576
+ }
1577
+
1578
+ // src/core/strings/a11y-statisticsRecords.ts
1579
+ var EN9 = {
1580
+ // reader-facing wording linked only by its consumers.
1581
+ valueWithheld: "Value withheld",
1582
+ group: "Group",
1583
+ medianName: "Median",
1584
+ quartiles: "Quartiles",
1585
+ whiskers: "Whiskers",
1586
+ observationsLower: "observations",
1587
+ retentionNotMeaningful: "Retention is not meaningful for this period",
1588
+ periodObservationMissing: "No observation for this period",
1589
+ basis: "Basis",
1590
+ cohortSizeLabel: "{v1} / cohort size",
1591
+ region: "Region",
1592
+ notMeaningful: "Not meaningful",
1593
+ notApplicableName: "Not applicable",
1594
+ spanText: "{v1} to {v2}"
1595
+ }, DE9 = {
1596
+ // reader-facing wording linked only by its consumers.
1597
+ valueWithheld: "Wert zur\xFCckgehalten",
1598
+ group: "Gruppe",
1599
+ medianName: "Median",
1600
+ quartiles: "Quartile",
1601
+ whiskers: "Antennen",
1602
+ observationsLower: "Beobachtungen",
1603
+ retentionNotMeaningful: "Bindung f\xFCr diese Periode nicht aussagekr\xE4ftig",
1604
+ periodObservationMissing: "Keine Beobachtung f\xFCr diese Periode",
1605
+ basis: "Basis",
1606
+ cohortSizeLabel: "{v1} / Kohortengr\xF6\xDFe",
1607
+ region: "Region",
1608
+ notMeaningful: "Nicht aussagekr\xE4ftig",
1609
+ notApplicableName: "Nicht anwendbar",
1610
+ spanText: "{v1} bis {v2}"
1611
+ }, { chartString: chartString10 } = chartStrings(EN9, DE9);
1612
+
1613
+ // src/core/a11y/statisticsRecords.ts
1614
+ var field2 = (key, label, value) => ({ key, label, value }), numberField = (key, raw, unit, format) => field2(key, key, numericValue(raw, unit, format));
1615
+ function statisticsRecords(ctx) {
1616
+ switch (ctx.request.type) {
1617
+ case "scatter":
1618
+ return scatterRecords(ctx);
1619
+ case "box":
1620
+ return boxRecords(ctx);
1621
+ case "histogram":
1622
+ return histogramRecords(ctx);
1623
+ case "cohort":
1624
+ return cohortRecords(ctx);
1625
+ case "choropleth":
1626
+ case "tilemap":
1627
+ return mapRecords(ctx);
1628
+ default:
1629
+ return;
1630
+ }
1631
+ }
1632
+ function scatterRecords(ctx) {
1633
+ let data = ctx.request.data, marks = ctx.geometry.marks, byId = new Map(marks.points.map((point) => [point.id, point])), { unit, format } = ctx.request.options;
1634
+ return data.points.map((point) => {
1635
+ let mark = byId.get(point.id), x = cellRecordValue(normalizeCell(point.x, `points[${point.id}].x`), unit, format), y = cellRecordValue(normalizeCell(point.y, `points[${point.id}].y`), unit, format), fields = [field2("x", "x", x), field2("y", "y", y)];
1636
+ return point.size !== void 0 && fields.push(numberField("size", point.size)), point.group !== void 0 && fields.push(field2("group", chartString10(ctx.request.options, "group"), textValue(point.group))), makeRecord(ctx, { pointId: point.id }, y, {
1637
+ label: point.label ?? point.id,
1638
+ fields,
1639
+ ...point.scenario ? { scenario: normalizeScenario(point.scenario, `points[${point.id}].scenario`) } : {},
1640
+ ...mark ? { anchor: { x: mark.cx, y: mark.cy } } : {},
1641
+ // A dot of a dense cloud is drawn in its colour's shared path, which owns no point.
1642
+ ...mark?.nodeId?.startsWith("mark:dense:") ? { nodeIds: [mark.nodeId] } : {}
1643
+ });
1644
+ });
1645
+ }
1646
+ function observations(values, owner = {}) {
1647
+ let seen = /* @__PURE__ */ new Map();
1648
+ return [...values].sort((a, b) => a - b).map((value) => {
1649
+ let occurrence = seen.get(value) ?? 0;
1650
+ return seen.set(value, occurrence + 1), { owner: { ...owner, pointId: JSON.stringify(["observation", value, occurrence]) }, value };
1651
+ });
1652
+ }
1653
+ function computedValue(value, observed) {
1654
+ return value === null || observed.has(value) ? value : withoutResidue(value);
1655
+ }
1656
+ function spanValue(low, high, unit, format, locale) {
1657
+ return low === null || high === null ? numericValue(null) : textValue(chartString10({ locale: { language: locale } }, "spanText", { v1: ((raw) => displayedValueText(numericValue(raw, void 0, format), locale))(low), v2: displayedValueText(numericValue(high, unit, format), locale) }));
1658
+ }
1659
+ function boxRecords(ctx) {
1660
+ let data = ctx.request.data, marks = ctx.geometry.marks, derived2 = ctx.geometry.derived, { unit, format } = ctx.request.options, locale = ctx.request.locale?.language;
1661
+ return derived2.groups.map((group) => {
1662
+ let mark = marks.rows.find((row) => row.id === group.id), input = data.groups.find((row) => row.id === group.id), members = observations(input?.observations ?? [], { categoryId: group.id }), observed = new Set(input?.observations ?? []), stat = (key) => computedValue(group[key], observed);
1663
+ return makeRecord(ctx, { categoryId: group.id }, numericValue(stat("median"), unit, format), {
1664
+ label: group.label,
1665
+ valueLabel: chartString10(ctx.request.options, "medianName"),
1666
+ ...mark ? { anchor: mark.rect } : {},
1667
+ fields: [
1668
+ field2("quartiles", chartString10(ctx.request.options, "quartiles"), spanValue(stat("q1"), stat("q3"), unit, format, locale)),
1669
+ field2("whiskers", chartString10(ctx.request.options, "whiskers"), spanValue(stat("whiskerLow"), stat("whiskerHigh"), unit, format, locale)),
1670
+ field2("n", "n", numericValue(group.n)),
1671
+ ...members.map((item) => numberField(item.owner.pointId, item.value, unit, format))
1672
+ ],
1673
+ members: members.map((item) => item.owner)
1674
+ });
1675
+ });
1676
+ }
1677
+ function histogramRecords(ctx) {
1678
+ let data = ctx.request.data, marks = ctx.geometry.marks, derived2 = ctx.geometry.derived, { unit, format } = ctx.request.options, noun = ctx.request.options.axisTitles?.y?.trim().toLowerCase() || chartString10(ctx.request.options, "observationsLower"), observationsByBin = /* @__PURE__ */ new Map();
1679
+ for (let item of observations(data.observations)) {
1680
+ let firstHigher = derived2.binning.edges.slice(1, -1).findIndex((edge) => item.value < edge), index = firstHigher < 0 ? derived2.counts.length - 1 : firstHigher, members = observationsByBin.get(index) ?? [];
1681
+ members.push(item), observationsByBin.set(index, members);
1682
+ }
1683
+ let dash = derived2.binLabels.some((label) => label.includes(" \u2013 ")) ? " \u2013 " : "\u2013";
1684
+ return marks.bins.map((bin) => {
1685
+ let members = observationsByBin.get(bin.index) ?? [], last = bin.index === derived2.counts.length - 1, [low, high] = derived2.binLabels[bin.index]?.split(dash) ?? [], edge = (text, raw, withUnit2) => text ? withUnit2 && /^[\d\s.,'\u2212+-]+$/.test(text) && unit ? withUnit(text, unit, !1, ctx.request.locale?.language) : text : displayedValueText(numericValue(raw, withUnit2 ? unit : void 0, format), ctx.request.locale?.language), counted = bin.count === 1 && noun.endsWith("s") ? noun.slice(0, -1) : noun;
1686
+ return makeRecord(ctx, { categoryId: JSON.stringify(["bin", bin.lo, bin.hi]) }, numericValue(bin.count, counted), {
1687
+ label: intervalText(edge(low, bin.lo, !1), edge(high, bin.hi, !0), last, ctx.request.options),
1688
+ anchor: bin.rect,
1689
+ annotations: makeRecord(ctx, { categoryId: bin.id }, numericValue(bin.count)).annotations,
1690
+ nodeIds: bin.nodeId ? [bin.nodeId] : [],
1691
+ members: members.map((item) => item.owner),
1692
+ fields: members.map((item) => numberField(item.owner.pointId, item.value, unit, format)),
1693
+ share: {
1694
+ numerator: numericValue(bin.count, noun),
1695
+ denominator: numericValue(derived2.n, noun),
1696
+ percent: derivedPercent(derived2.n > 0 ? bin.count / derived2.n * 100 : null)
1697
+ }
1698
+ });
1699
+ });
1700
+ }
1701
+ function retentionValue(value, observed, options) {
1702
+ return value !== null ? derivedPercent(value, "fraction") : {
1703
+ kind: "number",
1704
+ raw: null,
1705
+ unit: "fraction",
1706
+ format: DERIVED_PERCENT_FORMAT,
1707
+ derived: "percent",
1708
+ state: observed ? "nm" : "missing",
1709
+ reason: observed ? chartString10(options, "retentionNotMeaningful") : chartString10(options, "periodObservationMissing")
1710
+ };
1711
+ }
1712
+ function missingCohortRate(row, period, basis) {
1713
+ return row.retention[period] === null && (basis !== "previous" || !row.active.slice(0, period).includes(0)) && (row.active[period] === null || basis === "previous" && period > 0 && row.active[period - 1] === null);
1714
+ }
1715
+ function denominator(row, period, derived2) {
1716
+ return derived2.basis === "cohort" || period === 0 ? row.base : row.active[period - 1];
1717
+ }
1718
+ function cohortCell(ctx, mark, derived2, displayed) {
1719
+ let row = derived2.cohorts.find((item) => item.id === mark.rowId), period = mark.periodIndex, aggregate = mark.kind !== "cohort", missing = aggregate ? derived2.cohorts.some((item) => missingCohortRate(item, period, derived2.basis)) : !!row && missingCohortRate(row, period, derived2.basis), contributors = aggregate ? derived2.cohorts.filter((item) => period < item.observedPeriods && item.retention[period] != null && (denominator(item, period, derived2) ?? 0) > 0) : [], numerator = aggregate ? contributors.reduce((sum, item) => sum + item.active[period], 0) : row?.active[period], den = aggregate ? contributors.reduce((sum, item) => sum + denominator(item, period, derived2), 0) : row && period < row.observedPeriods ? denominator(row, period, derived2) : void 0, observed = aggregate ? contributors.length > 0 : !!row && period < row.observedPeriods, value = retentionValue(mark.retention, observed && !missing, ctx.request.options);
1720
+ displayed?.includes("%") && (value.displayed = displayed);
1721
+ let owner = { seriesId: mark.rowId, categoryId: mark.periodId };
1722
+ return makeRecord(ctx, owner, value, {
1723
+ label: `${mark.rowLabel} / ${mark.periodLabel}`,
1724
+ anchor: mark.rect,
1725
+ fields: [
1726
+ numberField("period", period),
1727
+ numberField("active", observed && !(aggregate && missing) ? numerator : null, "count"),
1728
+ numberField("denominator", observed && !(aggregate && missing) ? den : null, "count"),
1729
+ numberField("base", row?.base ?? (aggregate && !missing ? contributors.reduce((sum, item) => sum + item.base, 0) : void 0), "count"),
1730
+ field2("basis", chartString10(ctx.request.options, "basis"), textValue(derived2.basis)),
1731
+ ...aggregate ? [numberField("support", contributors.length)] : []
1732
+ ],
1733
+ ...aggregate ? { members: contributors.map((item) => ({ seriesId: item.id, categoryId: mark.periodId })) } : {}
1734
+ });
1735
+ }
1736
+ function cohortRecords(ctx) {
1737
+ let marks = ctx.geometry.marks, derived2 = ctx.geometry.derived, displayed = new Map(ctx.geometry.scene.map((node) => [node.id, node.display?.value])), cells = marks.cells.map((mark) => cohortCell(ctx, mark, derived2, displayed.get(mark.nodeId))), sizes = (marks.sizeCells ?? []).map((mark) => makeRecord(
1738
+ ctx,
1739
+ { seriesId: mark.rowId, categoryId: "cohort-size" },
1740
+ numericValue(mark.value, "count"),
1741
+ {
1742
+ label: chartString10(ctx.request.options, "cohortSizeLabel", { v1: mark.rowLabel }),
1743
+ anchor: mark.rect,
1744
+ ...mark.kind === "total" ? { members: derived2.cohorts.map((row) => ({ seriesId: row.id, categoryId: "cohort-size" })) } : {}
1745
+ }
1746
+ ));
1747
+ return [...cells, ...sizes];
1748
+ }
1749
+ function overlayRecord(ctx, input, mark) {
1750
+ let fields = [];
1751
+ "lon" in input.at ? fields.push(numberField("longitude", input.at.lon, "degrees"), numberField("latitude", input.at.lat, "degrees")) : fields.push(field2("region", chartString10(ctx.request.options, "region"), textValue(input.at.region)));
1752
+ let glyph = input.glyph, value = textValue(input.label);
1753
+ return glyph.kind === "harvey" && (value = numericValue(glyph.value, "fraction")), glyph.kind === "status" && (value = textValue(glyph.status)), glyph.kind === "pie" && pushAll(fields, glyph.shares.map((share2) => numberField(`share:${share2.label}`, share2.value))), makeRecord(ctx, { categoryId: `overlay:${input.id}` }, value, {
1754
+ label: input.label,
1755
+ anchor: mark.anchor,
1756
+ fields
1757
+ });
1758
+ }
1759
+ function mapRecords(ctx) {
1760
+ let data = ctx.request.data, marks = ctx.geometry.marks, { unit, format } = ctx.request.options, records = marks.regions.map((mark) => {
1761
+ let value = numericValue(mark.value, unit, format);
1762
+ return (mark.state === "suppressed" || mark.state === "nm" || mark.state === "na") && (value.raw = null, value.state = mark.state, value.reason = mark.state === "suppressed" ? chartString10(ctx.request.options, "valueWithheld") : mark.state === "nm" ? chartString10(ctx.request.options, "notMeaningful") : chartString10(ctx.request.options, "notApplicableName")), makeRecord(ctx, { categoryId: mark.id }, value, {
1763
+ // The region's name, never its code.
1764
+ label: mark.name,
1765
+ ..."rect" in mark ? { anchor: mark.rect } : {}
1766
+ });
1767
+ });
1768
+ for (let mark of marks.overlays ?? []) {
1769
+ let input = data.overlays?.find((item) => item.id === mark.id);
1770
+ input && records.push(overlayRecord(ctx, input, mark));
1771
+ }
1772
+ return records;
1773
+ }
1774
+
1775
+ // src/core/a11y/records.ts
1776
+ function interactionRecords(context) {
1777
+ return withSmallValues(context.request.options.smallValues, () => recordsOf(context));
1778
+ }
1779
+ function recordsOf(context) {
1780
+ let ctx = { ...context, request: { ...context.request, options: withLocaleStrings(context.request.options) } }, records = categoryVariantRecords(ctx) ?? categoryRecords(ctx) ?? businessRecords(ctx) ?? creativeRecords(ctx) ?? statisticsRecords(ctx) ?? structuralRecords(ctx, interactionRecords);
1781
+ if (!records) throw new Error(`No interaction record adapter for chart type '${ctx.request.type}'`);
1782
+ ctx.request.type !== "grid" && (pushAll(records, eventRecords(ctx)), pushAll(records, valueLineRecords(ctx)));
1783
+ let target = ctx.request.options.target, currency = (value) => (value.reason && (value = { ...value, reason: localizedRecordReason(value.reason, ctx.request.locale?.language) }), !value.format && currencyWholeNumbers(value.unit, target) ? { ...value, renderTarget: target } : value);
1784
+ for (let record of records)
1785
+ record.value = currency(record.value), record.fields = record.fields.map((field3) => ({ ...field3, value: currency(field3.value) })), record.comparisons = record.comparisons.map((comparison) => ({
1786
+ ...comparison,
1787
+ current: currency(comparison.current),
1788
+ reference: currency(comparison.reference),
1789
+ delta: currency(comparison.delta)
1790
+ })), record.share && (record.share = {
1791
+ ...record.share,
1792
+ numerator: currency(record.share.numerator),
1793
+ denominator: currency(record.share.denominator)
1794
+ });
1795
+ return withExhibitPercentFormat(records, ctx.geometry.scene);
1796
+ }
1797
+
1798
+ export {
1799
+ decimalPrecision,
1800
+ rawUnit,
1801
+ derivedValueText,
1802
+ deltaValueText,
1803
+ signedPercentText,
1804
+ displayedValueText,
1805
+ interactionValueText,
1806
+ targetId,
1807
+ ownerContains,
1808
+ preparedTableRecords,
1809
+ interactionRecords
1810
+ };