@milaboratories/graph-maker 1.1.137 → 1.1.139

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 (283) hide show
  1. package/README.md +120 -24
  2. package/dist/GraphMaker/components/LassoControls/index.vue.js +15 -13
  3. package/dist/GraphMaker/components/LassoControls/index.vue.js.map +1 -1
  4. package/dist/GraphMaker/components/SettingsTabs/icons/AxesIcon.vue.d.ts.map +1 -0
  5. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/AxesIcon.vue.js +1 -1
  6. package/dist/GraphMaker/components/SettingsTabs/icons/AxesIcon.vue.js.map +1 -0
  7. package/dist/GraphMaker/components/SettingsTabs/icons/DeleteChartIcon.vue.d.ts.map +1 -0
  8. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/DeleteChartIcon.vue.js +1 -1
  9. package/dist/GraphMaker/components/SettingsTabs/icons/DeleteChartIcon.vue.js.map +1 -0
  10. package/dist/GraphMaker/components/SettingsTabs/icons/ExportIcon.vue.d.ts.map +1 -0
  11. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/ExportIcon.vue.js +1 -1
  12. package/dist/GraphMaker/components/SettingsTabs/icons/ExportIcon.vue.js.map +1 -0
  13. package/dist/GraphMaker/components/SettingsTabs/icons/LayersIcon.vue.d.ts.map +1 -0
  14. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LayersIcon.vue.js +1 -1
  15. package/dist/GraphMaker/components/SettingsTabs/icons/LayersIcon.vue.js.map +1 -0
  16. package/dist/GraphMaker/components/SettingsTabs/icons/LinkIcon.vue.d.ts.map +1 -0
  17. package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LinkIcon.vue.js +1 -1
  18. package/dist/GraphMaker/components/SettingsTabs/icons/LinkIcon.vue.js.map +1 -0
  19. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.d.ts +3 -0
  20. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.d.ts.map +1 -0
  21. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.js +12 -0
  22. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue.js.map +1 -0
  23. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue2.js +5 -0
  24. package/dist/GraphMaker/components/SettingsTabs/icons/LogIcon.vue2.js.map +1 -0
  25. package/dist/GraphMaker/components/SettingsTabs/icons/SettingsIcon.vue.d.ts.map +1 -0
  26. package/dist/GraphMaker/components/SettingsTabs/index.vue.d.ts +2 -0
  27. package/dist/GraphMaker/components/SettingsTabs/index.vue.d.ts.map +1 -1
  28. package/dist/GraphMaker/components/SettingsTabs/index.vue.js +17 -15
  29. package/dist/GraphMaker/components/SettingsTabs/index.vue.js.map +1 -1
  30. package/dist/GraphMaker/forms/LogForm.vue.d.ts +19 -0
  31. package/dist/GraphMaker/forms/LogForm.vue.d.ts.map +1 -0
  32. package/dist/GraphMaker/forms/LogForm.vue.js +22 -0
  33. package/dist/GraphMaker/forms/LogForm.vue.js.map +1 -0
  34. package/dist/GraphMaker/forms/index.d.ts +22 -0
  35. package/dist/GraphMaker/forms/index.d.ts.map +1 -1
  36. package/dist/GraphMaker/forms/index.js +35 -28
  37. package/dist/GraphMaker/forms/index.js.map +1 -1
  38. package/dist/GraphMaker/index.vue.d.ts +1 -0
  39. package/dist/GraphMaker/index.vue.d.ts.map +1 -1
  40. package/dist/GraphMaker/index.vue.js +146 -144
  41. package/dist/GraphMaker/index.vue.js.map +1 -1
  42. package/dist/GraphMaker/store.d.ts.map +1 -1
  43. package/dist/GraphMaker/store.js +71 -67
  44. package/dist/GraphMaker/store.js.map +1 -1
  45. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +9 -3
  46. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
  47. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +17 -2
  48. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
  49. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +13 -4
  50. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  51. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +28 -7
  52. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  53. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +6 -2
  54. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
  55. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +16 -2
  56. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  57. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +14 -2
  58. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
  59. package/dist/lib.js +1 -1
  60. package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js +95 -72
  61. package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js.map +1 -1
  62. package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +1 -1
  63. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +124 -122
  64. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
  65. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +72 -91
  66. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
  67. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js +43 -41
  68. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
  69. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +28 -0
  70. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -0
  71. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +94 -0
  72. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -0
  73. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +42 -38
  74. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
  75. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
  76. package/dist/node_modules/@milaboratories/miplots4/dist/common/Legend.js.map +1 -1
  77. package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js +11 -11
  78. package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js.map +1 -1
  79. package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js +20 -0
  80. package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js.map +1 -0
  81. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js +181 -181
  82. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js.map +1 -1
  83. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js +2 -2
  84. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js.map +1 -1
  85. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js +45 -45
  86. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js.map +1 -1
  87. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js +27 -27
  88. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js.map +1 -1
  89. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Legend.js.map +1 -1
  90. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js +18 -18
  91. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js.map +1 -1
  92. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js +36 -36
  93. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js.map +1 -1
  94. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js +45 -41
  95. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js.map +1 -1
  96. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js +33 -33
  97. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js.map +1 -1
  98. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js +90 -93
  99. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js.map +1 -1
  100. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +200 -199
  101. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js.map +1 -1
  102. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +17 -17
  103. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
  104. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/BoxElement.js.map +1 -1
  105. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +102 -99
  106. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
  107. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js +31 -36
  108. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js.map +1 -1
  109. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js +62 -74
  110. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js.map +1 -1
  111. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js +52 -53
  112. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js.map +1 -1
  113. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js +32 -32
  114. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js.map +1 -1
  115. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js +7 -6
  116. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js.map +1 -1
  117. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js +23 -23
  118. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js.map +1 -1
  119. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js +63 -63
  120. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js.map +1 -1
  121. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js +60 -64
  122. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js.map +1 -1
  123. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +23 -23
  124. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
  125. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js +5 -5
  126. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js.map +1 -1
  127. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js +13 -13
  128. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map +1 -1
  129. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +258 -256
  130. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
  131. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +1 -1
  132. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
  133. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +45 -44
  134. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  135. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +107 -106
  136. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  137. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +18 -18
  138. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
  139. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +99 -95
  140. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
  141. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +30 -29
  142. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  143. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js +1 -1
  144. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js.map +1 -1
  145. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
  146. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js +143 -142
  147. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js.map +1 -1
  148. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/HistogramSettingsImpl.js.map +1 -1
  149. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js +30 -30
  150. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js.map +1 -1
  151. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +7 -7
  152. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js +53 -54
  153. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js.map +1 -1
  154. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js +59 -55
  155. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js.map +1 -1
  156. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/@d3fc/d3fc-axis/src/axisBase.js +7 -7
  157. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +6 -12
  158. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
  159. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-shape/src/line.js.map +1 -1
  160. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js +148 -0
  161. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js.map +1 -0
  162. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +172 -168
  163. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
  164. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +26 -26
  165. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
  166. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js +11 -11
  167. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js +30 -29
  168. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js.map +1 -1
  169. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js +135 -153
  170. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js.map +1 -1
  171. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js +35 -32
  172. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js.map +1 -1
  173. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js +27 -27
  174. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
  175. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +14 -14
  176. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/constants.js.map +1 -1
  177. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js +24 -22
  178. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
  179. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +11 -14
  180. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
  181. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +57 -58
  182. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
  183. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js +85 -83
  184. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js.map +1 -1
  185. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js +20 -20
  186. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js.map +1 -1
  187. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +44 -37
  188. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
  189. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js +11 -0
  190. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js.map +1 -0
  191. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js +46 -56
  192. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js.map +1 -1
  193. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +223 -205
  194. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
  195. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js +22 -22
  196. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
  197. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js +42 -0
  198. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js.map +1 -0
  199. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +84 -81
  200. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
  201. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/SVGLayer.js +11 -11
  202. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js +15 -14
  203. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js.map +1 -1
  204. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +89 -114
  205. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
  206. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js +3 -1
  207. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js.map +1 -1
  208. package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js +1 -1
  209. package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js.map +1 -1
  210. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +1 -1
  211. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
  212. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +1 -1
  213. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
  214. package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js +1 -1
  215. package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js.map +1 -1
  216. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +1 -1
  217. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
  218. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +4 -4
  219. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js.map +1 -1
  220. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js +39 -0
  221. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js.map +1 -0
  222. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js +101 -0
  223. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js.map +1 -0
  224. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js +4 -4
  225. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js.map +1 -1
  226. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js +3 -3
  227. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js.map +1 -1
  228. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +1031 -1023
  229. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
  230. package/package.json +3 -3
  231. package/dist/GraphMaker/icons/AxesIcon.vue.d.ts.map +0 -1
  232. package/dist/GraphMaker/icons/AxesIcon.vue.js.map +0 -1
  233. package/dist/GraphMaker/icons/DeleteChartIcon.vue.d.ts.map +0 -1
  234. package/dist/GraphMaker/icons/DeleteChartIcon.vue.js.map +0 -1
  235. package/dist/GraphMaker/icons/ExportIcon.vue.d.ts.map +0 -1
  236. package/dist/GraphMaker/icons/ExportIcon.vue.js.map +0 -1
  237. package/dist/GraphMaker/icons/LayersIcon.vue.d.ts.map +0 -1
  238. package/dist/GraphMaker/icons/LayersIcon.vue.js.map +0 -1
  239. package/dist/GraphMaker/icons/LinkIcon.vue.d.ts.map +0 -1
  240. package/dist/GraphMaker/icons/LinkIcon.vue.js.map +0 -1
  241. package/dist/GraphMaker/icons/SettingsIcon.vue.d.ts.map +0 -1
  242. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js +0 -91
  243. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js.map +0 -1
  244. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js +0 -30
  245. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js.map +0 -1
  246. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js +0 -29
  247. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js.map +0 -1
  248. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js +0 -12
  249. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js.map +0 -1
  250. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js +0 -7
  251. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js.map +0 -1
  252. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js +0 -26
  253. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js.map +0 -1
  254. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js +0 -7
  255. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js.map +0 -1
  256. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js +0 -51
  257. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js.map +0 -1
  258. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js +0 -21
  259. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js.map +0 -1
  260. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js +0 -7
  261. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js.map +0 -1
  262. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js +0 -12
  263. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js.map +0 -1
  264. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js +0 -14
  265. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js.map +0 -1
  266. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js +0 -19
  267. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js.map +0 -1
  268. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js +0 -11
  269. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js.map +0 -1
  270. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js +0 -11
  271. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js.map +0 -1
  272. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js +0 -24
  273. package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js.map +0 -1
  274. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/AxesIcon.vue.d.ts +0 -0
  275. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/DeleteChartIcon.vue.d.ts +0 -0
  276. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/ExportIcon.vue.d.ts +0 -0
  277. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LayersIcon.vue.d.ts +0 -0
  278. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/LinkIcon.vue.d.ts +0 -0
  279. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue.d.ts +0 -0
  280. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue.js +0 -0
  281. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue.js.map +0 -0
  282. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue2.js +0 -0
  283. /package/dist/GraphMaker/{icons → components/SettingsTabs/icons}/SettingsIcon.vue2.js.map +0 -0
@@ -1,80 +1,83 @@
1
+ import { l as y } from "../node_modules/lodash/lodash.js";
2
+ import { renderToString as C } from "../node_modules/react-dom/server.browser.js";
1
3
  import { AbstractChart as f } from "../AbstractChart.js";
2
- import { createHistogramDataByFacets as C } from "./getHistogramData.js";
3
- import m from "../node_modules/lodash/lodash.js";
4
- import { renderToString as D } from "../node_modules/react-dom/server.browser.js";
5
- import S from "./ChartRenderer.js";
6
- import { HistogramSettingsImpl as p } from "./HistogramSettingsImpl.js";
7
- import { getKeysCombinations as b } from "../utils/getKeysCombination.js";
8
- var _ = Object.defineProperty, B = (u, t, a) => t in u ? _(u, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : u[t] = a, h = (u, t, a) => B(u, typeof t != "symbol" ? t + "" : t, a);
9
- function A(u, t, a) {
10
- return t.reduce((r, n) => {
11
- const o = m.uniqBy(u.rows, (e) => e[n.value]), l = (e) => String(e[n.value]), i = (e) => n.valueLabels ? String(e[n.valueLabels]) : l(e), s = o.reduce((e, d) => (e[l(d)] = i(d), e), {});
12
- return r[n.value] = {
13
- values: o.map(l).filter((e) => e !== "null").sort((e, d) => s[e].localeCompare(s[d], "en", { numeric: !0 })),
14
- aesMap: a[n.value],
15
- labels: s
16
- }, r;
4
+ import { getKeysCombinations as D } from "../utils/getKeysCombination.js";
5
+ import b from "./ChartRenderer.js";
6
+ import { createHistogramDataByFacets as S } from "./getHistogramData.js";
7
+ import { HistogramSettingsImpl as g } from "./HistogramSettingsImpl.js";
8
+ var _ = Object.defineProperty, w = (u, e, t) => e in u ? _(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t, c = (u, e, t) => w(u, typeof e != "symbol" ? e + "" : e, t);
9
+ function x(u, e, t) {
10
+ return e.reduce((a, n) => {
11
+ const o = u.getColumnCategories(n.value, !1), l = (r) => n.valueLabels ? String(u.getColumnValue(
12
+ n.valueLabels,
13
+ u.getColumnCategoryRowIndex(n.value, r)
14
+ )) : r, i = o.reduce((r, s) => (r[s] = l(s), r), {});
15
+ return a[n.value] = {
16
+ values: o.sort((r, s) => i[r].localeCompare(i[s], "en", { numeric: !0 })),
17
+ aesMap: t[n.value],
18
+ labels: i
19
+ }, a;
17
20
  }, {});
18
21
  }
19
22
  class T extends f {
20
- constructor(t, a, r) {
21
- super(t, a), h(this, "settings"), h(this, "chartRenderer", new S()), h(this, "onTooltipHintSwitch", () => {
22
- }), h(this, "calculatedData", null), this.settings = new p(a), r && (this.onTooltipHintSwitch = r[0]);
23
+ constructor(e, t, a) {
24
+ super(e, t), c(this, "settings"), c(this, "chartRenderer", new b()), c(this, "onTooltipHintSwitch", () => {
25
+ }), c(this, "calculatedData", null), this.settings = new g(t), a && (this.onTooltipHintSwitch = a[0]);
23
26
  }
24
- mount(t) {
27
+ mount(e) {
25
28
  try {
26
- this.chartRenderer.init(t), this._updateData(), this._updateChart();
27
- } catch (a) {
28
- a instanceof Error && this.chartRenderer.renderError(a.message);
29
+ this.chartRenderer.init(e), this._updateData(), this._updateChart();
30
+ } catch (t) {
31
+ t instanceof Error && (this.chartRenderer.renderError(t.message), console.error(t));
29
32
  }
30
33
  }
31
34
  unmount() {
32
35
  this.chartRenderer.clear();
33
36
  }
34
- updateSettingsAndData(t, a) {
37
+ updateSettingsAndData(e, t) {
35
38
  try {
36
- const r = this.settings, n = this.data;
37
- this.settings = new p(a), this.data = t, this._needUpdateCalculatedDataBySettings(r, this.settings) || this._needUpdateCalculatedDataByData(n, this.data) ? this._updateData() : this._updateAesInData(), this._updateChart();
38
- } catch (r) {
39
- r instanceof Error && this.chartRenderer.renderError(r.message);
39
+ const a = this.settings, n = this.data;
40
+ this.settings = new g(t), this.data = e, this._needUpdateCalculatedDataBySettings(a, this.settings) || this._needUpdateCalculatedDataByData(n, this.data) ? this._updateData() : this._updateAesInData(), this._updateChart();
41
+ } catch (a) {
42
+ a instanceof Error && (this.chartRenderer.renderError(a.message), console.error(a));
40
43
  }
41
44
  }
42
- updateChartState(t, a) {
45
+ updateChartState(e, t) {
43
46
  console.warn("no chart state for histogram");
44
47
  }
45
48
  export() {
46
- return this._updateChart(), D(this.chartRenderer.component);
49
+ return this._updateChart(), C(this.chartRenderer.component);
47
50
  }
48
- _needUpdateCalculatedDataBySettings(t, a) {
49
- var r, n, o, l;
50
- return t.valueColumn.value !== a.valueColumn.value || t.facetBy.some((i, s) => {
51
- var e;
52
- return i.value !== ((e = a.facetBy[s]) == null ? void 0 : e.value);
53
- }) || ((r = t.grouping) == null ? void 0 : r.value) !== ((n = a.grouping) == null ? void 0 : n.value) || t.layers.length !== a.layers.length || t.layers.some((i, s) => i.type !== a.layers[s].type) || t.binsCount !== a.binsCount || t.chartSettings.xAxis.scale !== a.chartSettings.xAxis.scale || ((o = t.groupingOrder) == null ? void 0 : o.some((i, s) => {
54
- var e;
55
- return i !== ((e = a.groupingOrder) == null ? void 0 : e[s]);
56
- })) || ((l = a.groupingOrder) == null ? void 0 : l.some((i, s) => {
57
- var e;
58
- return i !== ((e = t.groupingOrder) == null ? void 0 : e[s]);
51
+ _needUpdateCalculatedDataBySettings(e, t) {
52
+ var a, n, o, l;
53
+ return e.valueColumn.value !== t.valueColumn.value || e.facetBy.some((i, r) => {
54
+ var s;
55
+ return i.value !== ((s = t.facetBy[r]) == null ? void 0 : s.value);
56
+ }) || ((a = e.grouping) == null ? void 0 : a.value) !== ((n = t.grouping) == null ? void 0 : n.value) || e.layers.length !== t.layers.length || e.layers.some((i, r) => i.type !== t.layers[r].type) || e.binsCount !== t.binsCount || e.chartSettings.xAxis.scale !== t.chartSettings.xAxis.scale || ((o = e.groupingOrder) == null ? void 0 : o.some((i, r) => {
57
+ var s;
58
+ return i !== ((s = t.groupingOrder) == null ? void 0 : s[r]);
59
+ })) || ((l = t.groupingOrder) == null ? void 0 : l.some((i, r) => {
60
+ var s;
61
+ return i !== ((s = e.groupingOrder) == null ? void 0 : s[r]);
59
62
  }));
60
63
  }
61
- _needUpdateCalculatedDataByData(t, a) {
62
- const r = Object.keys(t.data), n = Object.keys(a.data);
63
- return t.id !== a.id || r.length !== n.length || r.some((o) => {
64
+ _needUpdateCalculatedDataByData(e, t) {
65
+ const a = Object.keys(e.data), n = Object.keys(t.data);
66
+ return e.id !== t.id || a.length !== n.length || a.some((o) => {
64
67
  var l;
65
- return t.data[o].length !== ((l = a.data[o]) == null ? void 0 : l.length);
68
+ return e.data[o].length !== ((l = t.data[o]) == null ? void 0 : l.length);
66
69
  });
67
70
  }
68
71
  _updateData() {
69
- const { valueColumn: t, facetBy: a, grouping: r, binsCount: n, chartSettings: o, inheritedAes: l, groupingOrder: i } = this.settings, s = a.map((c) => this.data.getColumnCategories(c.value)), e = s.length ? b([...s]) : [["null"]], d = a.map((c) => c.value) ?? null, v = r ? [r.value] : [];
70
- let g = r ? this.data.getColumnCategories(r.value) : ["null"];
71
- i && (g = m.intersection(i, g)), this.data.setGrouping([...d, ...v]);
72
- const y = C(this.data, e, g, t, n, o.xAxis.scale);
72
+ const { valueColumn: e, facetBy: t, grouping: a, binsCount: n, chartSettings: o, inheritedAes: l, groupingOrder: i } = this.settings, r = t.map((d) => this.data.getColumnCategories(d.value)), s = r.length ? D([...r]) : [["null"]], p = t.map((d) => d.value) ?? null, m = a ? [a.value] : [];
73
+ let h = a ? this.data.getColumnCategories(a.value) : ["null"];
74
+ i && (h = y.intersection(i, h)), this.data.setGrouping([...p, ...m]);
75
+ const v = S(this.data, s, h, e, n, o.xAxis.scale);
73
76
  this.calculatedData = {
74
- facetKeys: e.map((c) => c.join(", ")),
75
- facetKeysCombinations: e,
76
- histogramDataByFacets: y,
77
- legendInfo: A(this.data, r ? [r] : [], l)
77
+ facetKeys: s.map((d) => d.join(", ")),
78
+ facetKeysCombinations: s,
79
+ histogramDataByFacets: v,
80
+ legendInfo: x(this.data, a ? [a] : [], l)
78
81
  };
79
82
  }
80
83
  _updateAesInData() {
@@ -83,11 +86,12 @@ class T extends f {
83
86
  _updateChart() {
84
87
  if (!this.calculatedData)
85
88
  return;
86
- const { id: t, chartSettings: a, facetSettings: r, inheritedAes: n, layers: o, grouping: l, groupingDirection: i, groupingStack: s } = this.settings;
89
+ const { id: e, chartSettings: t, facetSettings: a, inheritedAes: n, layers: o, grouping: l, groupingDirection: i, groupingStack: r } = this.settings;
87
90
  this.chartRenderer.render(
91
+ this.data,
92
+ e,
88
93
  t,
89
94
  a,
90
- r,
91
95
  this.calculatedData.facetKeys,
92
96
  this.calculatedData.facetKeysCombinations,
93
97
  //for titles, if facet by more than 1 column
@@ -96,7 +100,7 @@ class T extends f {
96
100
  o,
97
101
  n,
98
102
  l,
99
- s,
103
+ r,
100
104
  i,
101
105
  this.onTooltipHintSwitch
102
106
  );
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/histogram/index.ts"],"sourcesContent":["import {AbstractChart} from '../AbstractChart';\nimport type {HistogramLegendInfo} from './components/types';\nimport type {GroupedHistogramData} from './getHistogramData';\nimport {createHistogramDataByFacets} from './getHistogramData';\nimport type {ColumnName, HistogramEventHandlers, Row} from '../types';\nimport type {HistogramSettings} from '../types';\nimport lodash from 'lodash';\nimport {renderToString} from 'react-dom/server';\nimport ChartRenderer from './ChartRenderer';\nimport {HistogramSettingsImpl} from './HistogramSettingsImpl';\nimport type {DataFrame} from '../DataFrame';\nimport {getKeysCombinations} from '../utils/getKeysCombination';\n\nfunction getLegendInfo(\n data: DataFrame,\n grouping: ColumnName[],\n inheritedAes: HistogramSettingsImpl['inheritedAes']\n): HistogramLegendInfo {\n return grouping.reduce((res: HistogramLegendInfo, column) => {\n const uniqRowsByGrouping = lodash.uniqBy(data.rows, row => row[column.value]);\n const getValue = (row: Row) => String(row[column.value]);\n const getValueLabel = (row: Row) => (column.valueLabels ? String(row[column.valueLabels]) : getValue(row));\n const labels = uniqRowsByGrouping.reduce((res: Record<string, string>, row) => {\n res[getValue(row)] = getValueLabel(row);\n return res;\n }, {});\n res[column.value] = {\n values: uniqRowsByGrouping.map(getValue).filter((v) => v !== 'null').sort((a, b) => labels[a].localeCompare(labels[b], 'en', {numeric: true})),\n aesMap: inheritedAes[column.value],\n labels,\n };\n return res;\n }, {});\n}\nexport class ChartHistogram extends AbstractChart {\n settings: HistogramSettingsImpl;\n chartRenderer = new ChartRenderer();\n\n onTooltipHintSwitch: (v:boolean) => void = () => undefined;\n calculatedData: {\n facetKeys: string[];\n facetKeysCombinations: string[][];\n histogramDataByFacets: Record<string, GroupedHistogramData>\n legendInfo: HistogramLegendInfo\n } | null = null;\n\n constructor(data: DataFrame, settings: HistogramSettings, eventHandlers?: HistogramEventHandlers) {\n super(data, settings);\n\n this.settings = new HistogramSettingsImpl(settings);\n if (eventHandlers) {\n this.onTooltipHintSwitch = eventHandlers[0];\n }\n }\n\n mount(node: HTMLElement) {\n try {\n this.chartRenderer.init(node);\n this._updateData();\n this._updateChart();\n } catch (err) {\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n }\n }\n }\n\n unmount() {\n this.chartRenderer.clear();\n }\n\n updateSettingsAndData(data: DataFrame, settings: HistogramSettings) {\n try {\n const previousSettings = this.settings;\n const previousData = this.data;\n this.settings = new HistogramSettingsImpl(settings);\n this.data = data;\n if (\n this._needUpdateCalculatedDataBySettings(previousSettings, this.settings) ||\n this._needUpdateCalculatedDataByData(previousData, this.data)\n ) {\n this._updateData();\n } else {\n this._updateAesInData();\n }\n this._updateChart();\n } catch (err) {\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n }\n }\n }\n\n updateChartState(_field: string, _value: unknown) {\n console.warn('no chart state for histogram');\n }\n\n export(): string {\n this._updateChart();\n return renderToString(this.chartRenderer.component);\n }\n\n _needUpdateCalculatedDataBySettings(prevSettings: HistogramSettingsImpl, settings: HistogramSettingsImpl) {\n return (\n prevSettings.valueColumn.value !== settings.valueColumn.value ||\n prevSettings.facetBy.some((el, idx) => el.value !== settings.facetBy[idx]?.value) ||\n prevSettings.grouping?.value !== settings.grouping?.value ||\n prevSettings.layers.length !== settings.layers.length ||\n prevSettings.layers.some((l, idx) => l.type !== settings.layers[idx].type) ||\n prevSettings.binsCount !== settings.binsCount ||\n prevSettings.chartSettings.xAxis.scale !== settings.chartSettings.xAxis.scale ||\n prevSettings.groupingOrder?.some((key, idx) => key !== settings.groupingOrder?.[idx]) ||\n settings.groupingOrder?.some((key, idx) => key !== prevSettings.groupingOrder?.[idx])\n );\n }\n\n _needUpdateCalculatedDataByData(prevData: DataFrame, data: DataFrame) {\n const prevKeys = Object.keys(prevData.data);\n const keys = Object.keys(data.data);\n return (\n prevData.id !== data.id ||\n prevKeys.length !== keys.length ||\n prevKeys.some(key => prevData.data[key].length !== data.data[key]?.length)\n );\n }\n\n _updateData() {\n const {valueColumn, facetBy, grouping, binsCount, chartSettings, inheritedAes, groupingOrder} = this.settings;\n\n const facetKeysLists = facetBy.map(column => this.data.getColumnCategories(column.value));\n const facetKeysCombinations = facetKeysLists.length ? getKeysCombinations([...facetKeysLists]) : [['null']];\n const facetGroupingValues = facetBy.map(column => column.value) ?? null;\n const groupingValues = grouping ? [grouping.value] : [];\n let groupingKeys = grouping ? this.data.getColumnCategories(grouping.value) : ['null'];\n if (groupingOrder) {\n groupingKeys = lodash.intersection(groupingOrder, groupingKeys);\n }\n\n this.data.setGrouping([...facetGroupingValues, ...groupingValues]);\n const histogramDataByFacets = createHistogramDataByFacets(this.data, facetKeysCombinations, groupingKeys, valueColumn, binsCount, chartSettings.xAxis.scale);\n\n this.calculatedData = {\n facetKeys: facetKeysCombinations.map(v => v.join(', ')),\n facetKeysCombinations,\n histogramDataByFacets,\n legendInfo: getLegendInfo(this.data, grouping ? [grouping] : [], inheritedAes)\n };\n }\n\n _updateAesInData() {\n const calculated = this.calculatedData;\n if (!calculated) {\n return;\n }\n }\n\n _updateChart() {\n if (!this.calculatedData) {\n return;\n }\n const {id, chartSettings, facetSettings, inheritedAes, layers, grouping, groupingDirection, groupingStack} = this.settings;\n this.chartRenderer.render(\n id,\n chartSettings,\n facetSettings,\n this.calculatedData.facetKeys,\n this.calculatedData.facetKeysCombinations, //for titles, if facet by more than 1 column\n this.calculatedData.histogramDataByFacets,\n this.calculatedData.legendInfo,\n layers,\n inheritedAes,\n grouping,\n groupingStack,\n groupingDirection,\n this.onTooltipHintSwitch\n );\n }\n}\n"],"names":["getLegendInfo","data","grouping","inheritedAes","res","column","uniqRowsByGrouping","lodash","row","getValue","getValueLabel","labels","v","a","b","ChartHistogram","AbstractChart","settings","eventHandlers","__publicField","ChartRenderer","HistogramSettingsImpl","node","err","previousSettings","previousData","_field","_value","renderToString","prevSettings","el","idx","_a","_b","l","_c","key","_d","prevData","prevKeys","keys","valueColumn","facetBy","binsCount","chartSettings","groupingOrder","facetKeysLists","facetKeysCombinations","getKeysCombinations","facetGroupingValues","groupingValues","groupingKeys","histogramDataByFacets","createHistogramDataByFacets","id","facetSettings","layers","groupingDirection","groupingStack"],"mappings":";;;;;;;;AAaA,SAASA,EACLC,GACAC,GACAC,GACmB;AACnB,SAAOD,EAAS,OAAO,CAACE,GAA0BC,MAAW;AACzD,UAAMC,IAAqBC,EAAO,OAAON,EAAK,MAAM,CAAAO,MAAOA,EAAIH,EAAO,KAAK,CAAC,GACtEI,IAAW,CAACD,MAAa,OAAOA,EAAIH,EAAO,KAAK,CAAC,GACjDK,IAAgB,CAACF,MAAcH,EAAO,cAAc,OAAOG,EAAIH,EAAO,WAAW,CAAC,IAAII,EAASD,CAAG,GAClGG,IAASL,EAAmB,OAAO,CAACF,GAA6BI,OACnEJ,EAAIK,EAASD,CAAG,CAAC,IAAIE,EAAcF,CAAG,GAC/BJ,IACR,EAAE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A;AAAA,EAErF;AAAA,EAEA,mBAAmB;AACI,SAAK;AAAA,EAI5B;AAAA,EAEA,eAAe;AACX,QAAI,CAAC,KAAK;AACN;AAEJ,UAAM,EAAC,IAAAmD,GAAI,eAAAV,GAAe,eAAAW,GAAe,cAAApD,GAAc,QAAAqD,GAAQ,UAAAtD,GAAU,mBAAAuD,GAAmB,eAAAC,MAAiB,KAAK;AAClH,SAAK,cAAc;AAAA,MACfJ;AAAAA,MACAV;AAAAA,MACAW;AAAAA,MACA,KAAK,eAAe;AAAA,MACpB,KAAK,eAAe;AAAA;AAAA,MACpB,KAAK,eAAe;AAAA,MACpB,KAAK,eAAe;AAAA,MACpBC;AAAAA,MACArD;AAAAA,MACAD;AAAAA,MACAwD;AAAAA,MACAD;AAAAA,MACA,KAAK;AAAA,IAAA;AAAA,EAEb;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/histogram/index.ts"],"sourcesContent":["import {\n intersection\n} from 'lodash';\nimport { renderToString } from 'react-dom/server';\nimport { AbstractChart } from '../AbstractChart';\nimport type { DataFrame } from '../DataFrame';\nimport type { Category, ColumnName, HistogramEventHandlers, HistogramSettings } from '../types';\nimport { getKeysCombinations } from '../utils/getKeysCombination';\nimport ChartRenderer from './ChartRenderer';\nimport type { HistogramLegendInfo } from './components/types';\nimport type { GroupedHistogramData } from './getHistogramData';\nimport { createHistogramDataByFacets } from './getHistogramData';\nimport { HistogramSettingsImpl } from './HistogramSettingsImpl';\n\nfunction getLegendInfo(\n data: DataFrame,\n grouping: ColumnName[],\n inheritedAes: HistogramSettingsImpl['inheritedAes']\n): HistogramLegendInfo {\n return grouping.reduce((res: HistogramLegendInfo, column) => {\n const categories = data.getColumnCategories(column.value, false);\n const getValueLabel = (category: Category) => (column.valueLabels\n ? String(data.getColumnValue(\n column.valueLabels,\n data.getColumnCategoryRowIndex(column.value, category)\n ))\n : category\n );\n const labels = categories.reduce((res: Record<string, string>, category) => {\n res[category] = getValueLabel(category);\n return res;\n }, {});\n res[column.value] = {\n values: categories.sort((a, b) => labels[a].localeCompare(labels[b], 'en', {numeric: true})),\n aesMap: inheritedAes[column.value],\n labels,\n };\n return res;\n }, {});\n}\n\nexport class ChartHistogram extends AbstractChart {\n settings: HistogramSettingsImpl;\n chartRenderer = new ChartRenderer();\n\n onTooltipHintSwitch: (v:boolean) => void = () => undefined;\n calculatedData: {\n facetKeys: string[];\n facetKeysCombinations: string[][];\n histogramDataByFacets: Record<string, GroupedHistogramData>\n legendInfo: HistogramLegendInfo\n } | null = null;\n\n constructor(data: DataFrame, settings: HistogramSettings, eventHandlers?: HistogramEventHandlers) {\n super(data, settings);\n\n this.settings = new HistogramSettingsImpl(settings);\n if (eventHandlers) {\n this.onTooltipHintSwitch = eventHandlers[0];\n }\n }\n\n mount(node: HTMLElement) {\n try {\n this.chartRenderer.init(node);\n this._updateData();\n this._updateChart();\n } catch (err) {\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n console.error(err);\n }\n }\n }\n\n unmount() {\n this.chartRenderer.clear();\n }\n\n updateSettingsAndData(data: DataFrame, settings: HistogramSettings) {\n try {\n const previousSettings = this.settings;\n const previousData = this.data;\n this.settings = new HistogramSettingsImpl(settings);\n this.data = data;\n if (\n this._needUpdateCalculatedDataBySettings(previousSettings, this.settings) ||\n this._needUpdateCalculatedDataByData(previousData, this.data)\n ) {\n this._updateData();\n } else {\n this._updateAesInData();\n }\n this._updateChart();\n } catch (err) {\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n console.error(err);\n }\n }\n }\n\n updateChartState(_field: string, _value: unknown) {\n console.warn('no chart state for histogram');\n }\n\n export(): string {\n this._updateChart();\n return renderToString(this.chartRenderer.component);\n }\n\n _needUpdateCalculatedDataBySettings(prevSettings: HistogramSettingsImpl, settings: HistogramSettingsImpl) {\n return (\n prevSettings.valueColumn.value !== settings.valueColumn.value ||\n prevSettings.facetBy.some((el, idx) => el.value !== settings.facetBy[idx]?.value) ||\n prevSettings.grouping?.value !== settings.grouping?.value ||\n prevSettings.layers.length !== settings.layers.length ||\n prevSettings.layers.some((l, idx) => l.type !== settings.layers[idx].type) ||\n prevSettings.binsCount !== settings.binsCount ||\n prevSettings.chartSettings.xAxis.scale !== settings.chartSettings.xAxis.scale ||\n prevSettings.groupingOrder?.some((key, idx) => key !== settings.groupingOrder?.[idx]) ||\n settings.groupingOrder?.some((key, idx) => key !== prevSettings.groupingOrder?.[idx])\n );\n }\n\n _needUpdateCalculatedDataByData(prevData: DataFrame, data: DataFrame) {\n const prevKeys = Object.keys(prevData.data);\n const keys = Object.keys(data.data);\n return (\n prevData.id !== data.id ||\n prevKeys.length !== keys.length ||\n prevKeys.some(key => prevData.data[key].length !== data.data[key]?.length)\n );\n }\n\n _updateData() {\n const {valueColumn, facetBy, grouping, binsCount, chartSettings, inheritedAes, groupingOrder} = this.settings;\n\n const facetKeysLists = facetBy.map(column => this.data.getColumnCategories(column.value));\n const facetKeysCombinations = facetKeysLists.length ? getKeysCombinations([...facetKeysLists]) : [['null']];\n const facetGroupingValues = facetBy.map(column => column.value) ?? null;\n const groupingValues = grouping ? [grouping.value] : [];\n let groupingKeys = grouping ? this.data.getColumnCategories(grouping.value) : ['null'];\n if (groupingOrder) {\n groupingKeys = intersection(groupingOrder, groupingKeys);\n }\n\n this.data.setGrouping([...facetGroupingValues, ...groupingValues]);\n const histogramDataByFacets = createHistogramDataByFacets(this.data, facetKeysCombinations, groupingKeys, valueColumn, binsCount, chartSettings.xAxis.scale);\n\n this.calculatedData = {\n facetKeys: facetKeysCombinations.map(v => v.join(', ')),\n facetKeysCombinations,\n histogramDataByFacets,\n legendInfo: getLegendInfo(this.data, grouping ? [grouping] : [], inheritedAes)\n };\n }\n\n _updateAesInData() {\n const calculated = this.calculatedData;\n if (!calculated) {\n return;\n }\n }\n\n _updateChart() {\n if (!this.calculatedData) {\n return;\n }\n const {id, chartSettings, facetSettings, inheritedAes, layers, grouping, groupingDirection, groupingStack} = this.settings;\n this.chartRenderer.render(\n this.data,\n id,\n chartSettings,\n facetSettings,\n this.calculatedData.facetKeys,\n this.calculatedData.facetKeysCombinations, //for titles, if facet by more than 1 column\n this.calculatedData.histogramDataByFacets,\n this.calculatedData.legendInfo,\n layers,\n inheritedAes,\n grouping,\n groupingStack,\n groupingDirection,\n this.onTooltipHintSwitch\n );\n }\n}\n"],"names":["getLegendInfo","data","grouping","inheritedAes","res","column","categories","getValueLabel","category","labels","a","b","ChartHistogram","AbstractChart","settings","eventHandlers","__publicField","ChartRenderer","HistogramSettingsImpl","node","err","previousSettings","previousData","_field","_value","renderToString","prevSettings","el","idx","_a","_b","l","_c","key","_d","prevData","prevKeys","keys","valueColumn","facetBy","binsCount","chartSettings","groupingOrder","facetKeysLists","facetKeysCombinations","getKeysCombinations","facetGroupingValues","groupingValues","groupingKeys","intersection","histogramDataByFacets","createHistogramDataByFacets","v","id","facetSettings","layers","groupingDirection","groupingStack"],"mappings":";;;;;;;;AAcA,SAASA,EACLC,GACAC,GACAC,GACmB;AACnB,SAAOD,EAAS,OAAO,CAACE,GAA0BC,MAAW;AACzD,UAAMC,IAAaL,EAAK,oBAAoBI,EAAO,OAAO,EAAK,GACzDE,IAAgB,CAACC,MAAwBH,EAAO,cAChD,OAAOJ,EAAK;AAAA,MACVI,EAAO;AAAA,MACPJ,EAAK,0BAA0BI,EAAO,OAAOG,CAAQ;AAAA,IAAA,CACxD,IACCA,GAEAC,IAASH,EAAW,OAAO,CAACF,GAA6BI,OAC3DJ,EAAII,CAAQ,IAAID,EAAcC,CAAQ,GAC/BJ,IACR,EAAE;AACL,WAAAA,EAAIC,EAAO,KAAK,IAAI;AAAA,MAChB,QAAQC,EAAW,KAAK,CAACI,GAAGC,MAAMF,EAAOC,CAAC,EAAE,cAAcD,EAAOE,CAAC,GAAG,MAAM,EAAC,SAAS,GAAA,CAAK,CAAC;AAAA,MAC3F,QAAQR,EAAaE,EAAO,KAAK;AAAA,MACjC,QA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iB,KAAK;AAClH,SAAK,cAAc;AAAA,MACf,KAAK;AAAA,MACLJ;AAAAA,MACAZ;AAAAA,MACAa;AAAAA,MACA,KAAK,eAAe;AAAA,MACpB,KAAK,eAAe;AAAA;AAAA,MACpB,KAAK,eAAe;AAAA,MACpB,KAAK,eAAe;AAAA,MACpBC;AAAAA,MACApD;AAAAA,MACAD;AAAAA,MACAuD;AAAAA,MACAD;AAAAA,MACA,KAAK;AAAA,IAAA;AAAA,EAEb;AACJ;","x_google_ignoreList":[0]}
@@ -5,27 +5,27 @@ import H from "../../../d3-selection/src/select.js";
5
5
  const K = (a) => a, X = (a, i, N = {}) => {
6
6
  let f = [10], g = null, k = () => {
7
7
  }, S = null, c = 6, m = 6, _ = 3;
8
- const w = G(), A = I("g", "tick").key(K), O = I("path", "domain"), M = () => ({ offset: [0, m + _] }), T = () => ({ path: [[0, 0], [0, m]] }), V = N.labelOffset || M, q = N.tickPath || T, b = (t, l) => {
8
+ const w = G(), F = I("g", "tick").key(K), O = I("path", "domain"), M = () => ({ offset: [0, m + _] }), T = () => ({ path: [[0, 0], [0, m]] }), V = N.labelOffset || M, q = N.tickPath || T, b = (t, l) => {
9
9
  let s = 0;
10
10
  return t.bandwidth && (s = t.bandwidth() / 2, t.round() && (s = Math.round(s))), (y) => l(t(y) + s, 0);
11
11
  }, h = (t, l) => x() ? `translate(${l}, ${t})` : `translate(${t}, ${l})`, P = (t) => x() ? t.map((l) => [l[1], l[0]]) : t, x = () => a === "left" || a === "right", r = (t) => {
12
- Y(t) && (A.transition(t), O.transition(t)), t.each((l, s, y) => {
12
+ Y(t) && (F.transition(t), O.transition(t)), t.each((l, s, y) => {
13
13
  const p = y[s], $ = H(p);
14
14
  p.__scale__ || $.attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", a === "right" ? "start" : a === "left" ? "end" : "middle");
15
15
  const D = p.__scale__ || i;
16
16
  p.__scale__ = i.copy();
17
- const d = C(r), J = E(r), z = a === "bottom" || a === "right" ? 1 : -1, F = ([n, e]) => [n, z * e], u = i.range(), Q = P([
17
+ const d = C(r), J = E(r), z = a === "bottom" || a === "right" ? 1 : -1, A = ([n, e]) => [n, z * e], u = i.range(), Q = P([
18
18
  [u[0], z * c],
19
19
  [u[0], 0],
20
20
  [u[1], 0],
21
21
  [u[1], z * c]
22
22
  ]), j = O($, [l]);
23
23
  j.enter().attr("stroke", "#000"), j.attr("d", w(Q));
24
- const o = A($, d), v = d.map((n, e) => V(n, e, d)), B = d.map((n, e) => q(n, e, d));
25
- o.enter().attr("transform", b(D, h)).append("path").attr("stroke", "#000"), o.enter().append("text").attr("transform", (n, e) => h(...F(v[e].offset))).attr("fill", "#000"), o.exit().attr("transform", b(i, h)), o.select("path").attr("visibility", (n, e) => B[e].hidden && "hidden").attr(
24
+ const o = F($, d), v = d.map((n, e) => V(n, e, d)), B = d.map((n, e) => q(n, e, d));
25
+ o.enter().attr("transform", b(D, h)).append("path").attr("stroke", "#000"), o.enter().append("text").attr("transform", (n, e) => h(...A(v[e].offset))).attr("fill", "#000"), o.exit().attr("transform", b(i, h)), o.select("path").attr("visibility", (n, e) => B[e].hidden && "hidden").attr(
26
26
  "d",
27
- (n, e) => w(P(B[e].path.map(F)))
28
- ), o.select("text").attr("visibility", (n, e) => v[e].hidden && "hidden").attr("transform", (n, e) => h(...F(v[e].offset))).attr("dy", () => {
27
+ (n, e) => w(P(B[e].path.map(A)))
28
+ ), o.select("text").attr("visibility", (n, e) => v[e].hidden && "hidden").attr("transform", (n, e) => h(...A(v[e].offset))).attr("dy", () => {
29
29
  let n = "0em";
30
30
  return x() ? n = "0.32em" : a === "bottom" && (n = "0.71em"), n;
31
31
  }).text(J), o.attr("transform", b(i, h)), k(o, l, s);
@@ -1,16 +1,10 @@
1
- function n(f, t) {
2
- let e;
3
- if (t === void 0)
4
- for (const l of f)
5
- l != null && (e > l || e === void 0 && l >= l) && (e = l);
6
- else {
7
- let l = -1;
8
- for (let o of f)
9
- (o = t(o, ++l, f)) != null && (e > o || e === void 0 && o >= o) && (e = o);
10
- }
11
- return e;
1
+ function l(t, e) {
2
+ let o;
3
+ for (const n of t)
4
+ n != null && (o > n || o === void 0 && n >= n) && (o = n);
5
+ return o;
12
6
  }
13
7
  export {
14
- n as default
8
+ l as default
15
9
  };
16
10
  //# sourceMappingURL=min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"min.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-array/src/min.js"],"sourcesContent":["export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n"],"names":["min","values","valueof","value","index"],"mappings":"AAAe,SAASA,EAAIC,GAAQC,GAAS;AAC3C,MAAIF;AACJ,MAAIE,MAAY;AACd,eAAWC,KAASF;AACdE,MAAAA,KAAS,SACLH,IAAMG,KAAUH,MAAQ,UAAaG,KAASA,OACpDH,IAAMG;AAAAA,OAGL;AACL,QAAIC,IAAQ;AACZ,aAASD,KAASF;AAChB,OAAKE,IAAQD,EAAQC,GAAO,EAAEC,GAAOH,CAAM,MAAM,SACzCD,IAAMG,KAAUH,MAAQ,UAAaG,KAASA,OACpDH,IAAMG;AAAAA,EAGZ;AACA,SAAOH;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"min.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-array/src/min.js"],"sourcesContent":["export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n"],"names":["min","values","valueof","value"],"mappings":"AAAe,SAASA,EAAIC,GAAQC,GAAS;AAC3C,MAAIF;AAEF,aAAWG,KAASF;AACdE,SAAS,SACLH,IAAMG,KAAUH,MAAQ,UAAaG,KAASA,OACpDH,IAAMG;AAYZ,SAAOH;AACT;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"line.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-shape/src/line.js"],"sourcesContent":["import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n"],"names":["lineShape","x","y","defined","constant","context","curve","curveLinear","output","path","withPath","line","pointX","pointY","data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CAAC,GAAGV,KAAQR;AAAAA,EAC5F,GAEAQ,EAAK,QAAQ,SAASU,GAAG;AACvB,WAAO,UAAU,UAAUf,IAAQe,GAAGhB,KAAW,SAASG,IAASF,EAAMD,CAAO,IAAIM,KAAQL;AAAAA,EAC9F,GAEAK,EAAK,UAAU,SAASU,GAAG;AACzB,WAAO,UAAU,UAAUA,KAAK,OAAOhB,IAAUG,IAAS,OAAOA,IAASF,EAAMD,IAAUgB,CAAC,GAAGV,KAAQN;AAAAA,EACxG,GAEOM;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"line.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-shape/src/line.js"],"sourcesContent":["import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n"],"names":["line","x","y","defined","constant","context","curve","curveLinear","output","path","withPath","pointX","pointY","data","i","n","array","d","defined0","buffer","_"],"mappings":";;;;;AAMe,SAAAA,EAASC,GAAGC,GAAG;AAC5B,MAAIC,IAAUC,EAAS,EAAI,GACvBC,IAAU,MACVC,IAAQC,GACRC,IAAS,MACTC,IAAOC,EAASV,CAAI;AAExBC,EAAAA,IAAI,OAAOA,KAAM,aAAaA,IAAKA,MAAM,SAAaU,IAASP,EAASH,CAAC,GACzEC,IAAI,OAAOA,KAAM,aAAaA,IAAKA,MAAM,SAAaU,IAASR,EAASF,CAAC;AAEzE,WAASF,EAAKa,GAAM;AAClB,QAAIC,GACAC,KAAKF,IAAOG,EAAMH,CAAI,GAAG,QACzBI,GACAC,IAAW,IACXC;AAIJ,SAFId,KAAW,SAAMG,IAASF,EAAMa,IAASV,GAAM,IAE9CK,IAAI,GAAGA,KAAKC,GAAG,EAAED;AAChB,QAAEA,IAAIC,KAAKZ,EAAQc,IAAIJ,EAAKC,CAAC,GAAGA,GAAGD,CAAI,OAAOK,OAC5CA,IAAW,CAACA,KAAUV,EAAO,UAAA,IAC5BA,EAAO,YAEVU,KAAUV,EAAO,MAAM,CAACP,EAAEgB,GAAGH,GAAGD,CAAI,GAAG,CAACX,EAAEe,GAAGH,GAAGD,CAAI,CAAC;AAG3D,QAAIM,EAAQ,QAAOX,IAAS,MAAMW,IAAS,MAAM;AAAA,EACnD;AAEA,SAAAnB,EAAK,IAAI,SAASoB,GAAG;AACnB,WAAO,UAAU,UAAUnB,IAAI,OAAOmB,KAAM,aAAaA,IAAIhB,EAAS,CAACgB,CAAC,GAAGpB,KAAQC;AAAAA,EACrF,GAEAD,EAAK,IAAI,SAASoB,GAAG;AACnB,WAAO,UAAU,UAAUlB,IAAI,OAAOkB,KAAM,aAAaA,IAAIhB,EAAS,CAACgB,CAAC,GAAGpB,KAAQE;AAAAA,EACrF,GAEAF,EAAK,UAAU,SAASoB,GAAG;AACzB,WAAO,UAAU,UAAUjB,IAAU,OAAOiB,KAAM,aAAaA,IAAIhB,EAAS,CAAC,CAACgB,CAAC,GAAGpB,KAAQG;AAAAA,EAC5F,GAEAH,EAAK,QAAQ,SAASoB,GAAG;AACvB,WAAO,UAAU,UAAUd,IAAQc,GAAGf,KAAW,SAASG,IAASF,EAAMD,CAAO,IAAIL,KAAQM;AAAAA,EAC9F,GAEAN,EAAK,UAAU,SAASoB,GAAG;AACzB,WAAO,UAAU,UAAUA,KAAK,OAAOf,IAAUG,IAAS,OAAOA,IAASF,EAAMD,IAAUe,CAAC,GAAGpB,KAAQK;AAAAA,EACxG,GAEOL;AACT;","x_google_ignoreList":[0]}
@@ -0,0 +1,148 @@
1
+ const I = [
2
+ Int8Array,
3
+ Uint8Array,
4
+ Uint8ClampedArray,
5
+ Int16Array,
6
+ Uint16Array,
7
+ Int32Array,
8
+ Uint32Array,
9
+ Float32Array,
10
+ Float64Array
11
+ ], m = 1, l = 8;
12
+ class B {
13
+ /**
14
+ * Creates an index from raw `ArrayBuffer` data.
15
+ * @param {ArrayBuffer} data
16
+ */
17
+ static from(r) {
18
+ if (!(r instanceof ArrayBuffer))
19
+ throw new Error("Data must be an instance of ArrayBuffer.");
20
+ const [e, t] = new Uint8Array(r, 0, 2);
21
+ if (e !== 219)
22
+ throw new Error("Data does not appear to be in a KDBush format.");
23
+ const s = t >> 4;
24
+ if (s !== m)
25
+ throw new Error(`Got v${s} data when expected v${m}.`);
26
+ const i = I[t & 15];
27
+ if (!i)
28
+ throw new Error("Unrecognized array type.");
29
+ const [h] = new Uint16Array(r, 2, 1), [n] = new Uint32Array(r, 4, 1);
30
+ return new B(n, h, i, r);
31
+ }
32
+ /**
33
+ * Creates an index that will hold a given number of items.
34
+ * @param {number} numItems
35
+ * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).
36
+ * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
37
+ * @param {ArrayBuffer} [data] (For internal use only)
38
+ */
39
+ constructor(r, e = 64, t = Float64Array, s) {
40
+ if (isNaN(r) || r < 0) throw new Error(`Unpexpected numItems value: ${r}.`);
41
+ this.numItems = +r, this.nodeSize = Math.min(Math.max(+e, 2), 65535), this.ArrayType = t, this.IndexArrayType = r < 65536 ? Uint16Array : Uint32Array;
42
+ const i = I.indexOf(this.ArrayType), h = r * 2 * this.ArrayType.BYTES_PER_ELEMENT, n = r * this.IndexArrayType.BYTES_PER_ELEMENT, o = (8 - n % 8) % 8;
43
+ if (i < 0)
44
+ throw new Error(`Unexpected typed array class: ${t}.`);
45
+ s && s instanceof ArrayBuffer ? (this.data = s, this.ids = new this.IndexArrayType(this.data, l, r), this.coords = new this.ArrayType(this.data, l + n + o, r * 2), this._pos = r * 2, this._finished = !0) : (this.data = new ArrayBuffer(l + h + n + o), this.ids = new this.IndexArrayType(this.data, l, r), this.coords = new this.ArrayType(this.data, l + n + o, r * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (m << 4) + i]), new Uint16Array(this.data, 2, 1)[0] = e, new Uint32Array(this.data, 4, 1)[0] = r);
46
+ }
47
+ /**
48
+ * Add a point to the index.
49
+ * @param {number} x
50
+ * @param {number} y
51
+ * @returns {number} An incremental index associated with the added item (starting from `0`).
52
+ */
53
+ add(r, e) {
54
+ const t = this._pos >> 1;
55
+ return this.ids[t] = t, this.coords[this._pos++] = r, this.coords[this._pos++] = e, t;
56
+ }
57
+ /**
58
+ * Perform indexing of the added points.
59
+ */
60
+ finish() {
61
+ const r = this._pos >> 1;
62
+ if (r !== this.numItems)
63
+ throw new Error(`Added ${r} items when expected ${this.numItems}.`);
64
+ return U(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
65
+ }
66
+ /**
67
+ * Search the index for items within a given bounding box.
68
+ * @param {number} minX
69
+ * @param {number} minY
70
+ * @param {number} maxX
71
+ * @param {number} maxY
72
+ * @returns {number[]} An array of indices correponding to the found items.
73
+ */
74
+ range(r, e, t, s) {
75
+ if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
76
+ const { ids: i, coords: h, nodeSize: n } = this, o = [0, i.length - 1, 0], d = [];
77
+ for (; o.length; ) {
78
+ const c = o.pop() || 0, u = o.pop() || 0, p = o.pop() || 0;
79
+ if (u - p <= n) {
80
+ for (let y = p; y <= u; y++) {
81
+ const _ = h[2 * y], T = h[2 * y + 1];
82
+ _ >= r && _ <= t && T >= e && T <= s && d.push(i[y]);
83
+ }
84
+ continue;
85
+ }
86
+ const f = p + u >> 1, w = h[2 * f], A = h[2 * f + 1];
87
+ w >= r && w <= t && A >= e && A <= s && d.push(i[f]), (c === 0 ? r <= w : e <= A) && (o.push(p), o.push(f - 1), o.push(1 - c)), (c === 0 ? t >= w : s >= A) && (o.push(f + 1), o.push(u), o.push(1 - c));
88
+ }
89
+ return d;
90
+ }
91
+ /**
92
+ * Search the index for items within a given radius.
93
+ * @param {number} qx
94
+ * @param {number} qy
95
+ * @param {number} r Query radius.
96
+ * @returns {number[]} An array of indices correponding to the found items.
97
+ */
98
+ within(r, e, t) {
99
+ if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
100
+ const { ids: s, coords: i, nodeSize: h } = this, n = [0, s.length - 1, 0], o = [], d = t * t;
101
+ for (; n.length; ) {
102
+ const c = n.pop() || 0, u = n.pop() || 0, p = n.pop() || 0;
103
+ if (u - p <= h) {
104
+ for (let y = p; y <= u; y++)
105
+ M(i[2 * y], i[2 * y + 1], r, e) <= d && o.push(s[y]);
106
+ continue;
107
+ }
108
+ const f = p + u >> 1, w = i[2 * f], A = i[2 * f + 1];
109
+ M(w, A, r, e) <= d && o.push(s[f]), (c === 0 ? r - t <= w : e - t <= A) && (n.push(p), n.push(f - 1), n.push(1 - c)), (c === 0 ? r + t >= w : e + t >= A) && (n.push(f + 1), n.push(u), n.push(1 - c));
110
+ }
111
+ return o;
112
+ }
113
+ }
114
+ function U(a, r, e, t, s, i) {
115
+ if (s - t <= e) return;
116
+ const h = t + s >> 1;
117
+ g(a, r, h, t, s, i), U(a, r, e, t, h - 1, 1 - i), U(a, r, e, h + 1, s, 1 - i);
118
+ }
119
+ function g(a, r, e, t, s, i) {
120
+ for (; s > t; ) {
121
+ if (s - t > 600) {
122
+ const d = s - t + 1, c = e - t + 1, u = Math.log(d), p = 0.5 * Math.exp(2 * u / 3), f = 0.5 * Math.sqrt(u * p * (d - p) / d) * (c - d / 2 < 0 ? -1 : 1), w = Math.max(t, Math.floor(e - c * p / d + f)), A = Math.min(s, Math.floor(e + (d - c) * p / d + f));
123
+ g(a, r, e, w, A, i);
124
+ }
125
+ const h = r[2 * e + i];
126
+ let n = t, o = s;
127
+ for (E(a, r, t, e), r[2 * s + i] > h && E(a, r, t, s); n < o; ) {
128
+ for (E(a, r, n, o), n++, o--; r[2 * n + i] < h; ) n++;
129
+ for (; r[2 * o + i] > h; ) o--;
130
+ }
131
+ r[2 * t + i] === h ? E(a, r, t, o) : (o++, E(a, r, o, s)), o <= e && (t = o + 1), e <= o && (s = o - 1);
132
+ }
133
+ }
134
+ function E(a, r, e, t) {
135
+ x(a, e, t), x(r, 2 * e, 2 * t), x(r, 2 * e + 1, 2 * t + 1);
136
+ }
137
+ function x(a, r, e) {
138
+ const t = a[r];
139
+ a[r] = a[e], a[e] = t;
140
+ }
141
+ function M(a, r, e, t) {
142
+ const s = a - e, i = r - t;
143
+ return s * s + i * i;
144
+ }
145
+ export {
146
+ B as default
147
+ };
148
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/node_modules/kdbush/index.js"],"sourcesContent":["\nconst ARRAY_TYPES = [\n Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array,\n Int32Array, Uint32Array, Float32Array, Float64Array\n];\n\n/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */\n\nconst VERSION = 1; // serialized format version\nconst HEADER_SIZE = 8;\n\nexport default class KDBush {\n\n /**\n * Creates an index from raw `ArrayBuffer` data.\n * @param {ArrayBuffer} data\n */\n static from(data) {\n if (!(data instanceof ArrayBuffer)) {\n throw new Error('Data must be an instance of ArrayBuffer.');\n }\n const [magic, versionAndType] = new Uint8Array(data, 0, 2);\n if (magic !== 0xdb) {\n throw new Error('Data does not appear to be in a KDBush format.');\n }\n const version = versionAndType >> 4;\n if (version !== VERSION) {\n throw new Error(`Got v${version} data when expected v${VERSION}.`);\n }\n const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n if (!ArrayType) {\n throw new Error('Unrecognized array type.');\n }\n const [nodeSize] = new Uint16Array(data, 2, 1);\n const [numItems] = new Uint32Array(data, 4, 1);\n\n return new KDBush(numItems, nodeSize, ArrayType, data);\n }\n\n /**\n * Creates an index that will hold a given number of items.\n * @param {number} numItems\n * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).\n * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n * @param {ArrayBuffer} [data] (For internal use only)\n */\n constructor(numItems, nodeSize = 64, ArrayType = Float64Array, data) {\n if (isNaN(numItems) || numItems < 0) throw new Error(`Unpexpected numItems value: ${numItems}.`);\n\n this.numItems = +numItems;\n this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n this.ArrayType = ArrayType;\n this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;\n\n const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);\n const coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;\n const idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;\n const padCoords = (8 - idsByteSize % 8) % 8;\n\n if (arrayTypeIndex < 0) {\n throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n }\n\n if (data && (data instanceof ArrayBuffer)) { // reconstruct an index from a buffer\n this.data = data;\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = numItems * 2;\n this._finished = true;\n } else { // initialize a new index\n this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = 0;\n this._finished = false;\n\n // set header\n new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);\n new Uint16Array(this.data, 2, 1)[0] = nodeSize;\n new Uint32Array(this.data, 4, 1)[0] = numItems;\n }\n }\n\n /**\n * Add a point to the index.\n * @param {number} x\n * @param {number} y\n * @returns {number} An incremental index associated with the added item (starting from `0`).\n */\n add(x, y) {\n const index = this._pos >> 1;\n this.ids[index] = index;\n this.coords[this._pos++] = x;\n this.coords[this._pos++] = y;\n return index;\n }\n\n /**\n * Perform indexing of the added points.\n */\n finish() {\n const numAdded = this._pos >> 1;\n if (numAdded !== this.numItems) {\n throw new Error(`Added ${numAdded} items when expected ${this.numItems}.`);\n }\n // kd-sort both arrays for efficient search\n sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);\n\n this._finished = true;\n return this;\n }\n\n /**\n * Search the index for items within a given bounding box.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @returns {number[]} An array of indices correponding to the found items.\n */\n range(minX, minY, maxX, maxY) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n\n // recursively search for items in range in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n\n /**\n * Search the index for items within a given radius.\n * @param {number} qx\n * @param {number} qy\n * @param {number} r Query radius.\n * @returns {number[]} An array of indices correponding to the found items.\n */\n within(qx, qy, r) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n const r2 = r * r;\n\n // recursively search for items within radius in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType<TypedArrayConstructor>} coords\n * @param {number} nodeSize\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction sort(ids, coords, nodeSize, left, right, axis) {\n if (right - left <= nodeSize) return;\n\n const m = (left + right) >> 1; // middle index\n\n // sort ids and coords around the middle index so that the halves lie\n // either left/right or top/bottom correspondingly (taking turns)\n select(ids, coords, m, left, right, axis);\n\n // recursively kd-sort first half and second half on the opposite axis\n sort(ids, coords, nodeSize, left, m - 1, 1 - axis);\n sort(ids, coords, nodeSize, m + 1, right, 1 - axis);\n}\n\n/**\n * Custom Floyd-Rivest selection algorithm: sort ids and coords so that\n * [left..k-1] items are smaller than k-th item (on either x or y axis)\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType<TypedArrayConstructor>} coords\n * @param {number} k\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction select(ids, coords, k, left, right, axis) {\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, axis);\n }\n\n const t = coords[2 * k + axis];\n let i = left;\n let j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + axis] < t) i++;\n while (coords[2 * j + axis] > t) j--;\n }\n\n if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType<TypedArrayConstructor>} coords\n * @param {number} i\n * @param {number} j\n */\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\n/**\n * @param {InstanceType<TypedArrayConstructor>} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @param {number} ax\n * @param {number} ay\n * @param {number} bx\n * @param {number} by\n */\nfunction sqDist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n"],"names":["ARRAY_TYPES","VERSION","HEADER_SIZE","KDBush","data","magic","versionAndType","version","ArrayType","nodeSize","numItems","arrayTypeIndex","coordsByteSize","idsByteSize","padCoords","x","y","index","numAdded","sort","minX","minY","maxX","maxY","ids","coords","stack","result","axis","right","left","i","m","qx","qy","r","r2","sqDist","select","k","n","z","s","sd","newLeft","newRight","t","j","swapItem","swap","arr","tmp","ax","ay","bx","by","dx","dy"],"mappings":"AACA,MAAMA,IAAc;AAAA,EAChB;AAAA,EAAW;AAAA,EAAY;AAAA,EAAmB;AAAA,EAAY;AAAA,EACtD;AAAA,EAAY;AAAA,EAAa;AAAA,EAAc;AAC3C,GAIMC,IAAU,GACVC,IAAc;AAEL,MAAMC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,OAAO,KAAKC,GAAM;AACd,QAAI,EAAEA,aAAgB;AAClB,YAAM,IAAI,MAAM,0CAA0C;AAE9D,UAAM,CAACC,GAAOC,CAAc,IAAI,IAAI,WAAWF,GAAM,GAAG,CAAC;AACzD,QAAIC,MAAU;AACV,YAAM,IAAI,MAAM,gDAAgD;AAEpE,UAAME,IA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