@guardian/interactive-component-library 0.2.0-rc1 → 0.2.0-rc2

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 (335) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +8 -0
  2. package/dist/_virtual/dayjs.min.js +4 -0
  3. package/dist/_virtual/relativeTime.js +4 -0
  4. package/dist/components/index.d.ts +3 -0
  5. package/dist/components/molecules/canvas-map/Map.d.ts +17 -0
  6. package/dist/components/molecules/canvas-map/Map.js +89 -0
  7. package/dist/components/molecules/canvas-map/context/MapContext.d.ts +19 -0
  8. package/dist/components/molecules/canvas-map/context/MapContext.js +20 -0
  9. package/dist/components/molecules/canvas-map/controls/ZoomControl.d.ts +6 -0
  10. package/dist/components/molecules/canvas-map/controls/ZoomControl.js +40 -0
  11. package/dist/components/molecules/canvas-map/controls/icons/index.d.ts +3 -0
  12. package/dist/components/molecules/canvas-map/controls/icons/minus.d.ts +1 -0
  13. package/dist/components/molecules/canvas-map/controls/icons/minus.js +25 -0
  14. package/dist/components/molecules/canvas-map/controls/icons/plus.d.ts +1 -0
  15. package/dist/components/molecules/canvas-map/controls/icons/plus.js +25 -0
  16. package/dist/components/molecules/canvas-map/controls/icons/reset.d.ts +3 -0
  17. package/dist/components/molecules/canvas-map/controls/icons/reset.js +25 -0
  18. package/dist/components/molecules/canvas-map/controls/index.d.ts +1 -0
  19. package/dist/components/molecules/canvas-map/controls/style.module.css.js +11 -0
  20. package/dist/components/molecules/canvas-map/index.d.ts +12 -0
  21. package/dist/components/molecules/canvas-map/lib/Feature.d.ts +38 -0
  22. package/dist/components/molecules/canvas-map/lib/Feature.js +104 -0
  23. package/dist/components/molecules/canvas-map/lib/FeatureCollection.d.ts +20 -0
  24. package/dist/components/molecules/canvas-map/lib/FeatureCollection.js +23 -0
  25. package/dist/components/molecules/canvas-map/lib/Map.d.ts +69 -0
  26. package/dist/components/molecules/canvas-map/lib/Map.js +254 -0
  27. package/dist/components/molecules/canvas-map/lib/View.d.ts +136 -0
  28. package/dist/components/molecules/canvas-map/lib/View.js +179 -0
  29. package/dist/components/molecules/canvas-map/lib/events/Dispatcher.d.ts +8 -0
  30. package/dist/components/molecules/canvas-map/lib/events/Dispatcher.js +35 -0
  31. package/dist/components/molecules/canvas-map/lib/events/MapEvent.d.ts +6 -0
  32. package/dist/components/molecules/canvas-map/lib/events/MapEvent.js +9 -0
  33. package/dist/components/molecules/canvas-map/lib/events/index.d.ts +2 -0
  34. package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.d.ts +10 -0
  35. package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.js +96 -0
  36. package/dist/components/molecules/canvas-map/lib/geometry/Geometry.d.ts +32 -0
  37. package/dist/components/molecules/canvas-map/lib/geometry/Geometry.js +41 -0
  38. package/dist/components/molecules/canvas-map/lib/geometry/LineString.d.ts +12 -0
  39. package/dist/components/molecules/canvas-map/lib/geometry/LineString.js +19 -0
  40. package/dist/components/molecules/canvas-map/lib/geometry/Point.d.ts +11 -0
  41. package/dist/components/molecules/canvas-map/lib/geometry/Point.js +16 -0
  42. package/dist/components/molecules/canvas-map/lib/geometry/Polygon.d.ts +16 -0
  43. package/dist/components/molecules/canvas-map/lib/geometry/Polygon.js +46 -0
  44. package/dist/components/molecules/canvas-map/lib/geometry/index.d.ts +4 -0
  45. package/dist/components/molecules/canvas-map/lib/interpolators/index.d.ts +2 -0
  46. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.d.ts +5 -0
  47. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.js +95 -0
  48. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.d.ts +4 -0
  49. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.js +65 -0
  50. package/dist/components/molecules/canvas-map/lib/layers/TextLayer.d.ts +52 -0
  51. package/dist/components/molecules/canvas-map/lib/layers/TextLayer.js +111 -0
  52. package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.d.ts +53 -0
  53. package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.js +132 -0
  54. package/dist/components/molecules/canvas-map/lib/layers/index.d.ts +3 -0
  55. package/dist/components/molecules/canvas-map/lib/projection/index.d.ts +22 -0
  56. package/dist/components/molecules/canvas-map/lib/projection/index.js +12 -0
  57. package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.d.ts +6 -0
  58. package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.js +46 -0
  59. package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.d.ts +6 -0
  60. package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.js +53 -0
  61. package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.d.ts +17 -0
  62. package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.js +119 -0
  63. package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.d.ts +10 -0
  64. package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.js +78 -0
  65. package/dist/components/molecules/canvas-map/lib/sources/VectorSource.d.ts +15 -0
  66. package/dist/components/molecules/canvas-map/lib/sources/VectorSource.js +56 -0
  67. package/dist/components/molecules/canvas-map/lib/styles/Fill.d.ts +7 -0
  68. package/dist/components/molecules/canvas-map/lib/styles/Fill.js +15 -0
  69. package/dist/components/molecules/canvas-map/lib/styles/Stroke.d.ts +8 -0
  70. package/dist/components/molecules/canvas-map/lib/styles/Stroke.js +16 -0
  71. package/dist/components/molecules/canvas-map/lib/styles/Style.d.ts +24 -0
  72. package/dist/components/molecules/canvas-map/lib/styles/Style.js +17 -0
  73. package/dist/components/molecules/canvas-map/lib/styles/Text.d.ts +10 -0
  74. package/dist/components/molecules/canvas-map/lib/styles/Text.js +14 -0
  75. package/dist/components/molecules/canvas-map/lib/styles/index.d.ts +4 -0
  76. package/dist/components/molecules/canvas-map/lib/util/array.d.ts +6 -0
  77. package/dist/components/molecules/canvas-map/lib/util/array.js +15 -0
  78. package/dist/components/molecules/canvas-map/lib/util/bboxFeature.d.ts +8 -0
  79. package/dist/components/molecules/canvas-map/lib/util/bboxFeature.js +26 -0
  80. package/dist/components/molecules/canvas-map/lib/util/debug.d.ts +11 -0
  81. package/dist/components/molecules/canvas-map/lib/util/debug.js +27 -0
  82. package/dist/components/molecules/canvas-map/lib/util/deflate.d.ts +36 -0
  83. package/dist/components/molecules/canvas-map/lib/util/distance.d.ts +1 -0
  84. package/dist/components/molecules/canvas-map/lib/util/distance.js +12 -0
  85. package/dist/components/molecules/canvas-map/lib/util/dom.d.ts +9 -0
  86. package/dist/components/molecules/canvas-map/lib/util/dom.js +28 -0
  87. package/dist/components/molecules/canvas-map/lib/util/extent.d.ts +21 -0
  88. package/dist/components/molecules/canvas-map/lib/util/extent.js +38 -0
  89. package/dist/components/molecules/canvas-map/lib/util/memoise.d.ts +10 -0
  90. package/dist/components/molecules/canvas-map/lib/util/memoise.js +20 -0
  91. package/dist/components/molecules/canvas-map/lib/util/resolution.d.ts +9 -0
  92. package/dist/components/molecules/canvas-map/lib/util/resolution.js +11 -0
  93. package/dist/components/molecules/canvas-map/lib/util/simplify.d.ts +114 -0
  94. package/dist/components/molecules/canvas-map/lib/util/size.d.ts +32 -0
  95. package/dist/components/molecules/canvas-map/lib/util/size.js +53 -0
  96. package/dist/components/molecules/canvas-map/lib/util/toRgba.d.ts +1 -0
  97. package/dist/components/molecules/canvas-map/lib/util/toRgba.js +25 -0
  98. package/dist/components/molecules/canvas-map/lib/util/uid.d.ts +5 -0
  99. package/dist/components/molecules/canvas-map/lib/util/uid.js +7 -0
  100. package/dist/components/molecules/canvas-map/lib/util/zoomLevel.d.ts +2 -0
  101. package/dist/components/molecules/canvas-map/lib/util/zoomLevel.js +14 -0
  102. package/dist/components/molecules/canvas-map/style.module.scss.js +20 -0
  103. package/dist/components/molecules/column-chart/column-chart-example.d.ts +35 -0
  104. package/dist/components/molecules/column-chart/column-chart-util.d.ts +1 -0
  105. package/dist/components/molecules/column-chart/index.d.ts +11 -0
  106. package/dist/components/molecules/column-chart/index.js +63 -0
  107. package/dist/components/molecules/column-chart/style.module.css.js +14 -0
  108. package/dist/components/molecules/control-change/index.d.ts +6 -0
  109. package/dist/components/molecules/control-change/index.js +29 -0
  110. package/dist/components/molecules/control-change/style.module.css.js +11 -0
  111. package/dist/components/molecules/dropdown/index.d.ts +11 -0
  112. package/dist/components/molecules/dropdown/index.js +191 -0
  113. package/dist/components/molecules/dropdown/style.module.css.js +50 -0
  114. package/dist/components/molecules/first-past-the-post-waffle/index.d.ts +5 -0
  115. package/dist/components/molecules/first-past-the-post-waffle/index.js +14 -0
  116. package/dist/components/molecules/first-past-the-post-waffle/style.module.css.js +14 -0
  117. package/dist/components/molecules/index.d.ts +17 -0
  118. package/dist/components/molecules/modal/index.d.ts +8 -0
  119. package/dist/components/molecules/modal/index.js +59 -0
  120. package/dist/components/molecules/modal/style.module.css.js +26 -0
  121. package/dist/components/molecules/page-section/index.d.ts +8 -0
  122. package/dist/components/molecules/page-section/index.js +52 -0
  123. package/dist/components/molecules/page-section/style.module.scss.js +20 -0
  124. package/dist/components/molecules/party-profile/index.d.ts +10 -0
  125. package/dist/components/molecules/party-profile/index.js +29 -0
  126. package/dist/components/molecules/party-profile/style.module.css.js +26 -0
  127. package/dist/components/molecules/refresh-indicator/index.d.ts +4 -0
  128. package/dist/components/molecules/refresh-indicator/index.js +18 -0
  129. package/dist/components/molecules/refresh-indicator/style.module.scss.js +17 -0
  130. package/dist/components/molecules/responsive-grid/index.d.ts +10 -0
  131. package/dist/components/molecules/responsive-grid/index.js +19 -0
  132. package/dist/components/molecules/responsive-grid/style.module.scss.js +8 -0
  133. package/dist/components/molecules/result-summary/index.d.ts +8 -0
  134. package/dist/components/molecules/result-summary/index.js +36 -0
  135. package/dist/components/molecules/result-summary/style.module.css.js +11 -0
  136. package/dist/components/molecules/search-input/icons/search.d.ts +1 -0
  137. package/dist/components/molecules/search-input/icons/search.js +24 -0
  138. package/dist/components/molecules/search-input/icons/search.module.css.js +11 -0
  139. package/dist/components/molecules/search-input/index.d.ts +11 -0
  140. package/dist/components/molecules/search-input/index.js +164 -0
  141. package/dist/components/molecules/search-input/style.module.css.js +32 -0
  142. package/dist/components/molecules/slope-chart/index.d.ts +16 -0
  143. package/dist/components/molecules/slope-chart/index.js +139 -0
  144. package/dist/components/molecules/slope-chart/style.module.css.js +35 -0
  145. package/dist/components/molecules/svg-map/context/MapContext.d.ts +1 -0
  146. package/dist/components/molecules/svg-map/context/MapContext.js +5 -0
  147. package/dist/components/molecules/svg-map/context/SVGMapProvider.d.ts +10 -0
  148. package/dist/components/molecules/svg-map/context/SVGMapProvider.js +88 -0
  149. package/dist/components/molecules/svg-map/helpers/bboxFeature.d.ts +8 -0
  150. package/dist/components/molecules/svg-map/helpers/bboxFeature.js +26 -0
  151. package/dist/components/molecules/svg-map/helpers/dynamicPropValue.d.ts +1 -0
  152. package/dist/components/molecules/svg-map/helpers/dynamicPropValue.js +9 -0
  153. package/dist/components/molecules/svg-map/helpers/geoMath.d.ts +4 -0
  154. package/dist/components/molecules/svg-map/helpers/saveSVG.d.ts +1 -0
  155. package/dist/components/molecules/svg-map/hooks/useCamera.d.ts +0 -0
  156. package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.d.ts +4 -0
  157. package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.js +19 -0
  158. package/dist/components/molecules/svg-map/index.d.ts +38 -0
  159. package/dist/components/molecules/svg-map/index.js +120 -0
  160. package/dist/components/molecules/svg-map/layers/CompositionBorders.d.ts +3 -0
  161. package/dist/components/molecules/svg-map/layers/CompositionBorders.js +14 -0
  162. package/dist/components/molecules/svg-map/layers/Line.d.ts +7 -0
  163. package/dist/components/molecules/svg-map/layers/Line.js +48 -0
  164. package/dist/components/molecules/svg-map/layers/Point.d.ts +10 -0
  165. package/dist/components/molecules/svg-map/layers/Point.js +59 -0
  166. package/dist/components/molecules/svg-map/layers/Polygon.d.ts +9 -0
  167. package/dist/components/molecules/svg-map/layers/Polygon.js +75 -0
  168. package/dist/components/molecules/svg-map/layers/Prerendered.d.ts +3 -0
  169. package/dist/components/molecules/svg-map/layers/Prerendered.js +11 -0
  170. package/dist/components/molecules/svg-map/layers/compositionBorders.module.scss.js +8 -0
  171. package/dist/components/molecules/svg-map/layers/index.d.ts +5 -0
  172. package/dist/components/molecules/svg-map/layers/index.js +12 -0
  173. package/dist/components/molecules/svg-map/renderers/SVGRenderer.d.ts +3 -0
  174. package/dist/components/molecules/svg-map/renderers/SVGRenderer.js +32 -0
  175. package/dist/components/molecules/svg-map/style.module.css.js +11 -0
  176. package/dist/components/molecules/table/index.d.ts +7 -0
  177. package/dist/components/molecules/table/index.js +90 -0
  178. package/dist/components/molecules/table/style.module.scss.js +29 -0
  179. package/dist/components/molecules/table/useTable.d.ts +8 -0
  180. package/dist/components/molecules/table/useTable.js +128 -0
  181. package/dist/components/molecules/tooltip/index.d.ts +82 -0
  182. package/dist/components/molecules/tooltip/index.js +117 -0
  183. package/dist/components/molecules/tooltip/style.module.css.js +8 -0
  184. package/dist/components/molecules/topline-result/index.d.ts +3 -0
  185. package/dist/components/molecules/topline-result/index.js +61 -0
  186. package/dist/components/molecules/topline-result/style.module.scss.js +38 -0
  187. package/dist/components/organisms/coalitions-tracker/index.d.ts +16 -0
  188. package/dist/components/organisms/coalitions-tracker/index.js +151 -0
  189. package/dist/components/organisms/coalitions-tracker/style.module.scss.js +32 -0
  190. package/dist/components/organisms/index.d.ts +2 -0
  191. package/dist/components/organisms/ticker/gradient/index.d.ts +1 -0
  192. package/dist/components/organisms/ticker/gradient/index.js +35 -0
  193. package/dist/components/organisms/ticker/gradient/style.module.scss.js +14 -0
  194. package/dist/components/organisms/ticker/index.d.ts +5 -0
  195. package/dist/components/organisms/ticker/index.js +102 -0
  196. package/dist/components/organisms/ticker/style.module.scss.js +32 -0
  197. package/dist/components/particles/ad-slot/index.d.ts +40 -0
  198. package/dist/components/particles/ad-slot/index.js +34 -0
  199. package/dist/components/particles/ad-slot/style.module.css.js +11 -0
  200. package/dist/components/particles/arrow-button/index.d.ts +6 -0
  201. package/dist/components/particles/arrow-button/index.js +32 -0
  202. package/dist/components/particles/arrow-button/style.module.css.js +11 -0
  203. package/dist/components/particles/aspect-ratio-box/index.d.ts +4 -0
  204. package/dist/components/particles/aspect-ratio-box/index.js +15 -0
  205. package/dist/components/particles/aspect-ratio-box/style.module.css.js +6 -0
  206. package/dist/components/particles/button/index.d.ts +6 -0
  207. package/dist/components/particles/button/index.js +10 -0
  208. package/dist/components/particles/button/style.module.css.js +11 -0
  209. package/dist/components/particles/change-bar/index.d.ts +8 -0
  210. package/dist/components/particles/change-bar/index.js +27 -0
  211. package/dist/components/particles/change-bar/style.module.scss.js +14 -0
  212. package/dist/components/particles/chevron/index.d.ts +6 -0
  213. package/dist/components/particles/chevron/index.js +78 -0
  214. package/dist/components/particles/chevron/style.module.css.js +20 -0
  215. package/dist/components/particles/circle-icon/index.d.ts +6 -0
  216. package/dist/components/particles/circle-icon/index.js +32 -0
  217. package/dist/components/particles/circle-icon/style.module.css.js +14 -0
  218. package/dist/components/particles/close-button/index.d.ts +5 -0
  219. package/dist/components/particles/close-button/index.js +35 -0
  220. package/dist/components/particles/close-button/style.module.css.js +17 -0
  221. package/dist/components/particles/container/index.d.ts +5 -0
  222. package/dist/components/particles/container/index.js +13 -0
  223. package/dist/components/particles/container/style.module.scss.js +11 -0
  224. package/dist/components/particles/gradient-icon/index.d.ts +1 -0
  225. package/dist/components/particles/gradient-icon/index.js +46 -0
  226. package/dist/components/particles/gradient-icon/style.module.css.js +14 -0
  227. package/dist/components/particles/index.d.ts +18 -0
  228. package/dist/components/particles/info-button/index.d.ts +3 -0
  229. package/dist/components/particles/info-button/index.js +19 -0
  230. package/dist/components/particles/info-button/style.module.css.js +11 -0
  231. package/dist/components/particles/legend-item/index.d.ts +6 -0
  232. package/dist/components/particles/legend-item/index.js +26 -0
  233. package/dist/components/particles/legend-item/style.module.css.js +17 -0
  234. package/dist/components/particles/relative-time-sentence/index.d.ts +4 -0
  235. package/dist/components/particles/relative-time-sentence/index.js +14 -0
  236. package/dist/components/particles/relative-time-sentence/style.module.css.js +8 -0
  237. package/dist/components/particles/square-cut-corner-icon/index.d.ts +6 -0
  238. package/dist/components/particles/square-cut-corner-icon/index.js +56 -0
  239. package/dist/components/particles/square-cut-corner-icon/style.module.scss.js +17 -0
  240. package/dist/components/particles/square-icon/index.d.ts +5 -0
  241. package/dist/components/particles/square-icon/index.js +28 -0
  242. package/dist/components/particles/square-icon/style.module.scss.js +11 -0
  243. package/dist/components/particles/stacked-bar/index.d.ts +23 -0
  244. package/dist/components/particles/stacked-bar/index.js +140 -0
  245. package/dist/components/particles/stacked-bar/style.module.css.js +17 -0
  246. package/dist/components/particles/stacked-grid/index.d.ts +6 -0
  247. package/dist/components/particles/stacked-grid/index.js +35 -0
  248. package/dist/components/particles/stacked-grid/style.module.css.js +20 -0
  249. package/dist/components/particles/waffle/index.d.ts +14 -0
  250. package/dist/components/particles/waffle/index.js +76 -0
  251. package/dist/components/particles/waffle/style.module.css.js +11 -0
  252. package/dist/index.d.ts +2 -0
  253. package/dist/index.js +128 -0
  254. package/dist/node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js +338 -0
  255. package/dist/node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js +13 -0
  256. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/albersUk.js +108 -0
  257. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/bounds.js +24 -0
  258. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/fit.js +18 -0
  259. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/math.js +4 -0
  260. package/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +70 -0
  261. package/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js +6 -0
  262. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js +24 -0
  263. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js +4 -0
  264. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js +8 -0
  265. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js +20 -0
  266. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js +43 -0
  267. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js +28 -0
  268. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js +59 -0
  269. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js +18 -0
  270. package/dist/node_modules/.pnpm/d3-path@2.0.0/node_modules/d3-path/src/path.js +73 -0
  271. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js +13 -0
  272. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +96 -0
  273. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js +21 -0
  274. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js +5 -0
  275. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js +9 -0
  276. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js +39 -0
  277. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js +55 -0
  278. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js +42 -0
  279. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js +18 -0
  280. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js +18 -0
  281. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js +14 -0
  282. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js +15 -0
  283. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js +23 -0
  284. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js +16 -0
  285. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js +68 -0
  286. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js +11 -0
  287. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js +18 -0
  288. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js +23 -0
  289. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js +13 -0
  290. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js +125 -0
  291. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js +20 -0
  292. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js +24 -0
  293. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js +8 -0
  294. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js +47 -0
  295. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js +25 -0
  296. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js +18 -0
  297. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js +25 -0
  298. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js +22 -0
  299. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js +64 -0
  300. package/dist/node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/dayjs.min.js +282 -0
  301. package/dist/node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/plugin/relativeTime.js +48 -0
  302. package/dist/node_modules/.pnpm/flatbush@4.4.0/node_modules/flatbush/index.js +339 -0
  303. package/dist/node_modules/.pnpm/flatqueue@2.0.3/node_modules/flatqueue/index.js +67 -0
  304. package/dist/node_modules/.pnpm/preact-merge-refs@1.0.2_preact@10.21.0/node_modules/preact-merge-refs/lib/preact-merge-refs.modern.js +10 -0
  305. package/dist/node_modules/.pnpm/preact-transitioning@1.4.1_preact@10.21.0/node_modules/preact-transitioning/lib/preact-transitioning.modern.js +63 -0
  306. package/dist/node_modules/.pnpm/quickselect@2.0.0/node_modules/quickselect/index.js +47 -0
  307. package/dist/node_modules/.pnpm/rbush-knn@4.0.0/node_modules/rbush-knn/index.js +42 -0
  308. package/dist/node_modules/.pnpm/rbush@4.0.0/node_modules/rbush/index.js +378 -0
  309. package/dist/node_modules/.pnpm/tinyqueue@2.0.3/node_modules/tinyqueue/index.js +65 -0
  310. package/dist/shared/colors/index.d.ts +2 -0
  311. package/dist/shared/helpers/createStore.d.ts +1 -0
  312. package/dist/shared/helpers/geometry.d.ts +3 -0
  313. package/dist/shared/helpers/geometry.js +16 -0
  314. package/dist/shared/helpers/geometry.test.d.ts +1 -0
  315. package/dist/shared/helpers/labelsUtil.d.ts +54 -0
  316. package/dist/shared/helpers/labelsUtil.js +58 -0
  317. package/dist/shared/helpers/labelsUtils.test.d.ts +1 -0
  318. package/dist/shared/helpers/shouldUpdate.d.ts +7 -0
  319. package/dist/shared/hooks/index.d.ts +3 -0
  320. package/dist/shared/hooks/useContainerSize.d.ts +1 -0
  321. package/dist/shared/hooks/useContainerSize.js +24 -0
  322. package/dist/shared/hooks/useTouchOrHover.d.ts +6 -0
  323. package/dist/shared/hooks/useTouchOrHover.js +95 -0
  324. package/dist/shared/hooks/useWindowSize.d.ts +4 -0
  325. package/dist/shared/hooks/useWindowSize.js +27 -0
  326. package/dist/style.css +74 -74
  327. package/dist/styles/helpers/mergeStyles.d.ts +1 -0
  328. package/dist/styles/helpers/mergeStyles.js +22 -0
  329. package/dist/styles/helpers/mergeStyles.test.d.ts +1 -0
  330. package/dist/styles/theme.config.d.ts +124 -0
  331. package/package.json +6 -9
  332. package/dist/interactive-component-library.js +0 -7993
  333. package/dist/interactive-component-library.js.map +0 -1
  334. package/dist/interactive-component-library.umd.cjs +0 -7989
  335. package/dist/interactive-component-library.umd.cjs.map +0 -1
@@ -0,0 +1,282 @@
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as dayjs_min } from "../../../../../_virtual/dayjs.min.js";
3
+ (function(module, exports) {
4
+ !function(t, e) {
5
+ module.exports = e();
6
+ }(commonjsGlobal, function() {
7
+ var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
8
+ var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
9
+ return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
10
+ } }, m = function(t2, e2, n2) {
11
+ var r2 = String(t2);
12
+ return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
13
+ }, v = { s: m, z: function(t2) {
14
+ var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
15
+ return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
16
+ }, m: function t2(e2, n2) {
17
+ if (e2.date() < n2.date()) return -t2(n2, e2);
18
+ var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
19
+ return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
20
+ }, a: function(t2) {
21
+ return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
22
+ }, p: function(t2) {
23
+ return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
24
+ }, u: function(t2) {
25
+ return void 0 === t2;
26
+ } }, g = "en", D = {};
27
+ D[g] = M;
28
+ var p = "$isDayjsObject", S = function(t2) {
29
+ return t2 instanceof _ || !(!t2 || !t2[p]);
30
+ }, w = function t2(e2, n2, r2) {
31
+ var i2;
32
+ if (!e2) return g;
33
+ if ("string" == typeof e2) {
34
+ var s2 = e2.toLowerCase();
35
+ D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
36
+ var u2 = e2.split("-");
37
+ if (!i2 && u2.length > 1) return t2(u2[0]);
38
+ } else {
39
+ var a2 = e2.name;
40
+ D[a2] = e2, i2 = a2;
41
+ }
42
+ return !r2 && i2 && (g = i2), i2 || !r2 && g;
43
+ }, O = function(t2, e2) {
44
+ if (S(t2)) return t2.clone();
45
+ var n2 = "object" == typeof e2 ? e2 : {};
46
+ return n2.date = t2, n2.args = arguments, new _(n2);
47
+ }, b = v;
48
+ b.l = w, b.i = S, b.w = function(t2, e2) {
49
+ return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
50
+ };
51
+ var _ = function() {
52
+ function M2(t2) {
53
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
54
+ }
55
+ var m2 = M2.prototype;
56
+ return m2.parse = function(t2) {
57
+ this.$d = function(t3) {
58
+ var e2 = t3.date, n2 = t3.utc;
59
+ if (null === e2) return /* @__PURE__ */ new Date(NaN);
60
+ if (b.u(e2)) return /* @__PURE__ */ new Date();
61
+ if (e2 instanceof Date) return new Date(e2);
62
+ if ("string" == typeof e2 && !/Z$/i.test(e2)) {
63
+ var r2 = e2.match($);
64
+ if (r2) {
65
+ var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
66
+ return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
67
+ }
68
+ }
69
+ return new Date(e2);
70
+ }(t2), this.init();
71
+ }, m2.init = function() {
72
+ var t2 = this.$d;
73
+ this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
74
+ }, m2.$utils = function() {
75
+ return b;
76
+ }, m2.isValid = function() {
77
+ return !(this.$d.toString() === l);
78
+ }, m2.isSame = function(t2, e2) {
79
+ var n2 = O(t2);
80
+ return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
81
+ }, m2.isAfter = function(t2, e2) {
82
+ return O(t2) < this.startOf(e2);
83
+ }, m2.isBefore = function(t2, e2) {
84
+ return this.endOf(e2) < O(t2);
85
+ }, m2.$g = function(t2, e2, n2) {
86
+ return b.u(t2) ? this[e2] : this.set(n2, t2);
87
+ }, m2.unix = function() {
88
+ return Math.floor(this.valueOf() / 1e3);
89
+ }, m2.valueOf = function() {
90
+ return this.$d.getTime();
91
+ }, m2.startOf = function(t2, e2) {
92
+ var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
93
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
94
+ return r2 ? i2 : i2.endOf(a);
95
+ }, $2 = function(t3, e3) {
96
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
97
+ }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
98
+ switch (f2) {
99
+ case h:
100
+ return r2 ? l2(1, 0) : l2(31, 11);
101
+ case c:
102
+ return r2 ? l2(1, M3) : l2(0, M3 + 1);
103
+ case o:
104
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
105
+ return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
106
+ case a:
107
+ case d:
108
+ return $2(v2 + "Hours", 0);
109
+ case u:
110
+ return $2(v2 + "Minutes", 1);
111
+ case s:
112
+ return $2(v2 + "Seconds", 2);
113
+ case i:
114
+ return $2(v2 + "Milliseconds", 3);
115
+ default:
116
+ return this.clone();
117
+ }
118
+ }, m2.endOf = function(t2) {
119
+ return this.startOf(t2, false);
120
+ }, m2.$set = function(t2, e2) {
121
+ var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
122
+ if (o2 === c || o2 === h) {
123
+ var y2 = this.clone().set(d, 1);
124
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
125
+ } else l2 && this.$d[l2]($2);
126
+ return this.init(), this;
127
+ }, m2.set = function(t2, e2) {
128
+ return this.clone().$set(t2, e2);
129
+ }, m2.get = function(t2) {
130
+ return this[b.p(t2)]();
131
+ }, m2.add = function(r2, f2) {
132
+ var d2, l2 = this;
133
+ r2 = Number(r2);
134
+ var $2 = b.p(f2), y2 = function(t2) {
135
+ var e2 = O(l2);
136
+ return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
137
+ };
138
+ if ($2 === c) return this.set(c, this.$M + r2);
139
+ if ($2 === h) return this.set(h, this.$y + r2);
140
+ if ($2 === a) return y2(1);
141
+ if ($2 === o) return y2(7);
142
+ var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
143
+ return b.w(m3, this);
144
+ }, m2.subtract = function(t2, e2) {
145
+ return this.add(-1 * t2, e2);
146
+ }, m2.format = function(t2) {
147
+ var e2 = this, n2 = this.$locale();
148
+ if (!this.isValid()) return n2.invalidDate || l;
149
+ var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
150
+ return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
151
+ }, d2 = function(t3) {
152
+ return b.s(s2 % 12 || 12, t3, "0");
153
+ }, $2 = f2 || function(t3, e3, n3) {
154
+ var r3 = t3 < 12 ? "AM" : "PM";
155
+ return n3 ? r3.toLowerCase() : r3;
156
+ };
157
+ return r2.replace(y, function(t3, r3) {
158
+ return r3 || function(t4) {
159
+ switch (t4) {
160
+ case "YY":
161
+ return String(e2.$y).slice(-2);
162
+ case "YYYY":
163
+ return b.s(e2.$y, 4, "0");
164
+ case "M":
165
+ return a2 + 1;
166
+ case "MM":
167
+ return b.s(a2 + 1, 2, "0");
168
+ case "MMM":
169
+ return h2(n2.monthsShort, a2, c2, 3);
170
+ case "MMMM":
171
+ return h2(c2, a2);
172
+ case "D":
173
+ return e2.$D;
174
+ case "DD":
175
+ return b.s(e2.$D, 2, "0");
176
+ case "d":
177
+ return String(e2.$W);
178
+ case "dd":
179
+ return h2(n2.weekdaysMin, e2.$W, o2, 2);
180
+ case "ddd":
181
+ return h2(n2.weekdaysShort, e2.$W, o2, 3);
182
+ case "dddd":
183
+ return o2[e2.$W];
184
+ case "H":
185
+ return String(s2);
186
+ case "HH":
187
+ return b.s(s2, 2, "0");
188
+ case "h":
189
+ return d2(1);
190
+ case "hh":
191
+ return d2(2);
192
+ case "a":
193
+ return $2(s2, u2, true);
194
+ case "A":
195
+ return $2(s2, u2, false);
196
+ case "m":
197
+ return String(u2);
198
+ case "mm":
199
+ return b.s(u2, 2, "0");
200
+ case "s":
201
+ return String(e2.$s);
202
+ case "ss":
203
+ return b.s(e2.$s, 2, "0");
204
+ case "SSS":
205
+ return b.s(e2.$ms, 3, "0");
206
+ case "Z":
207
+ return i2;
208
+ }
209
+ return null;
210
+ }(t3) || i2.replace(":", "");
211
+ });
212
+ }, m2.utcOffset = function() {
213
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
214
+ }, m2.diff = function(r2, d2, l2) {
215
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
216
+ return b.m(y2, m3);
217
+ };
218
+ switch (M3) {
219
+ case h:
220
+ $2 = D2() / 12;
221
+ break;
222
+ case c:
223
+ $2 = D2();
224
+ break;
225
+ case f:
226
+ $2 = D2() / 3;
227
+ break;
228
+ case o:
229
+ $2 = (g2 - v2) / 6048e5;
230
+ break;
231
+ case a:
232
+ $2 = (g2 - v2) / 864e5;
233
+ break;
234
+ case u:
235
+ $2 = g2 / n;
236
+ break;
237
+ case s:
238
+ $2 = g2 / e;
239
+ break;
240
+ case i:
241
+ $2 = g2 / t;
242
+ break;
243
+ default:
244
+ $2 = g2;
245
+ }
246
+ return l2 ? $2 : b.a($2);
247
+ }, m2.daysInMonth = function() {
248
+ return this.endOf(c).$D;
249
+ }, m2.$locale = function() {
250
+ return D[this.$L];
251
+ }, m2.locale = function(t2, e2) {
252
+ if (!t2) return this.$L;
253
+ var n2 = this.clone(), r2 = w(t2, e2, true);
254
+ return r2 && (n2.$L = r2), n2;
255
+ }, m2.clone = function() {
256
+ return b.w(this.$d, this);
257
+ }, m2.toDate = function() {
258
+ return new Date(this.valueOf());
259
+ }, m2.toJSON = function() {
260
+ return this.isValid() ? this.toISOString() : null;
261
+ }, m2.toISOString = function() {
262
+ return this.$d.toISOString();
263
+ }, m2.toString = function() {
264
+ return this.$d.toUTCString();
265
+ }, M2;
266
+ }(), k = _.prototype;
267
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
268
+ k[t2[1]] = function(e2) {
269
+ return this.$g(e2, t2[0], t2[1]);
270
+ };
271
+ }), O.extend = function(t2, e2) {
272
+ return t2.$i || (t2(e2, _, O), t2.$i = true), O;
273
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
274
+ return O(1e3 * t2);
275
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
276
+ });
277
+ })(dayjs_min);
278
+ var dayjs_minExports = dayjs_min.exports;
279
+ const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
280
+ export {
281
+ dayjs as default
282
+ };
@@ -0,0 +1,48 @@
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as relativeTime$1 } from "../../../../../../_virtual/relativeTime.js";
3
+ (function(module, exports) {
4
+ !function(r, e) {
5
+ module.exports = e();
6
+ }(commonjsGlobal, function() {
7
+ return function(r, e, t) {
8
+ r = r || {};
9
+ var n = e.prototype, o = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
10
+ function i(r2, e2, t2, o2) {
11
+ return n.fromToBase(r2, e2, t2, o2);
12
+ }
13
+ t.en.relativeTime = o, n.fromToBase = function(e2, n2, i2, d2, u) {
14
+ for (var f, a, s, l = i2.$locale().relativeTime || o, h = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h.length, c = 0; c < m; c += 1) {
15
+ var y = h[c];
16
+ y.d && (f = d2 ? t(e2).diff(i2, y.d, true) : i2.diff(e2, y.d, true));
17
+ var p = (r.rounding || Math.round)(Math.abs(f));
18
+ if (s = f > 0, p <= y.r || !y.r) {
19
+ p <= 1 && c > 0 && (y = h[c - 1]);
20
+ var v = l[y.l];
21
+ u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n2, y.l, s);
22
+ break;
23
+ }
24
+ }
25
+ if (n2) return a;
26
+ var M = s ? l.future : l.past;
27
+ return "function" == typeof M ? M(a) : M.replace("%s", a);
28
+ }, n.to = function(r2, e2) {
29
+ return i(r2, e2, this, true);
30
+ }, n.from = function(r2, e2) {
31
+ return i(r2, e2, this);
32
+ };
33
+ var d = function(r2) {
34
+ return r2.$u ? t.utc() : t();
35
+ };
36
+ n.toNow = function(r2) {
37
+ return this.to(d(this), r2);
38
+ }, n.fromNow = function(r2) {
39
+ return this.from(d(this), r2);
40
+ };
41
+ };
42
+ });
43
+ })(relativeTime$1);
44
+ var relativeTimeExports = relativeTime$1.exports;
45
+ const relativeTime = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports);
46
+ export {
47
+ relativeTime as default
48
+ };
@@ -0,0 +1,339 @@
1
+ import FlatQueue from "../../../flatqueue@2.0.3/node_modules/flatqueue/index.js";
2
+ const ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
3
+ const VERSION = 3;
4
+ class Flatbush {
5
+ /**
6
+ * Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.
7
+ * @param {ArrayBuffer | SharedArrayBuffer} data
8
+ * @param {number} [byteOffset=0] byte offset to the start of the Flatbush buffer in the referenced ArrayBuffer.
9
+ * @returns {Flatbush} index
10
+ */
11
+ static from(data, byteOffset = 0) {
12
+ if (byteOffset % 8 !== 0) {
13
+ throw new Error("byteOffset must be 8-byte aligned.");
14
+ }
15
+ if (!data || data.byteLength === void 0 || data.buffer) {
16
+ throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");
17
+ }
18
+ const [magic, versionAndType] = new Uint8Array(data, byteOffset + 0, 2);
19
+ if (magic !== 251) {
20
+ throw new Error("Data does not appear to be in a Flatbush format.");
21
+ }
22
+ const version = versionAndType >> 4;
23
+ if (version !== VERSION) {
24
+ throw new Error(`Got v${version} data when expected v${VERSION}.`);
25
+ }
26
+ const ArrayType = ARRAY_TYPES[versionAndType & 15];
27
+ if (!ArrayType) {
28
+ throw new Error("Unrecognized array type.");
29
+ }
30
+ const [nodeSize] = new Uint16Array(data, byteOffset + 2, 1);
31
+ const [numItems] = new Uint32Array(data, byteOffset + 4, 1);
32
+ return new Flatbush(numItems, nodeSize, ArrayType, void 0, data, byteOffset);
33
+ }
34
+ /**
35
+ * Create a Flatbush index that will hold a given number of items.
36
+ * @param {number} numItems
37
+ * @param {number} [nodeSize=16] Size of the tree node (16 by default).
38
+ * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
39
+ * @param {ArrayBufferConstructor | SharedArrayBufferConstructor} [ArrayBufferType=ArrayBuffer] The array buffer type used to store data (`ArrayBuffer` by default).
40
+ * @param {ArrayBuffer | SharedArrayBuffer} [data] (Only used internally)
41
+ * @param {number} [byteOffset=0] (Only used internally)
42
+ */
43
+ constructor(numItems, nodeSize = 16, ArrayType = Float64Array, ArrayBufferType = ArrayBuffer, data, byteOffset = 0) {
44
+ if (numItems === void 0) throw new Error("Missing required argument: numItems.");
45
+ if (isNaN(numItems) || numItems <= 0) throw new Error(`Unexpected numItems value: ${numItems}.`);
46
+ this.numItems = +numItems;
47
+ this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);
48
+ this.byteOffset = byteOffset;
49
+ let n = numItems;
50
+ let numNodes = n;
51
+ this._levelBounds = [n * 4];
52
+ do {
53
+ n = Math.ceil(n / this.nodeSize);
54
+ numNodes += n;
55
+ this._levelBounds.push(numNodes * 4);
56
+ } while (n !== 1);
57
+ this.ArrayType = ArrayType;
58
+ this.IndexArrayType = numNodes < 16384 ? Uint16Array : Uint32Array;
59
+ const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);
60
+ const nodesByteSize = numNodes * 4 * this.ArrayType.BYTES_PER_ELEMENT;
61
+ if (arrayTypeIndex < 0) {
62
+ throw new Error(`Unexpected typed array class: ${ArrayType}.`);
63
+ }
64
+ if (data && data.byteLength !== void 0 && !data.buffer) {
65
+ this.data = data;
66
+ this._boxes = new this.ArrayType(this.data, byteOffset + 8, numNodes * 4);
67
+ this._indices = new this.IndexArrayType(this.data, byteOffset + 8 + nodesByteSize, numNodes);
68
+ this._pos = numNodes * 4;
69
+ this.minX = this._boxes[this._pos - 4];
70
+ this.minY = this._boxes[this._pos - 3];
71
+ this.maxX = this._boxes[this._pos - 2];
72
+ this.maxY = this._boxes[this._pos - 1];
73
+ } else {
74
+ this.data = new ArrayBufferType(8 + nodesByteSize + numNodes * this.IndexArrayType.BYTES_PER_ELEMENT);
75
+ this._boxes = new this.ArrayType(this.data, 8, numNodes * 4);
76
+ this._indices = new this.IndexArrayType(this.data, 8 + nodesByteSize, numNodes);
77
+ this._pos = 0;
78
+ this.minX = Infinity;
79
+ this.minY = Infinity;
80
+ this.maxX = -Infinity;
81
+ this.maxY = -Infinity;
82
+ new Uint8Array(this.data, 0, 2).set([251, (VERSION << 4) + arrayTypeIndex]);
83
+ new Uint16Array(this.data, 2, 1)[0] = nodeSize;
84
+ new Uint32Array(this.data, 4, 1)[0] = numItems;
85
+ }
86
+ this._queue = new FlatQueue();
87
+ }
88
+ /**
89
+ * Add a given rectangle to the index.
90
+ * @param {number} minX
91
+ * @param {number} minY
92
+ * @param {number} maxX
93
+ * @param {number} maxY
94
+ * @returns {number} A zero-based, incremental number that represents the newly added rectangle.
95
+ */
96
+ add(minX, minY, maxX = minX, maxY = minY) {
97
+ const index = this._pos >> 2;
98
+ const boxes = this._boxes;
99
+ this._indices[index] = index;
100
+ boxes[this._pos++] = minX;
101
+ boxes[this._pos++] = minY;
102
+ boxes[this._pos++] = maxX;
103
+ boxes[this._pos++] = maxY;
104
+ if (minX < this.minX) this.minX = minX;
105
+ if (minY < this.minY) this.minY = minY;
106
+ if (maxX > this.maxX) this.maxX = maxX;
107
+ if (maxY > this.maxY) this.maxY = maxY;
108
+ return index;
109
+ }
110
+ /** Perform indexing of the added rectangles. */
111
+ finish() {
112
+ if (this._pos >> 2 !== this.numItems) {
113
+ throw new Error(`Added ${this._pos >> 2} items when expected ${this.numItems}.`);
114
+ }
115
+ const boxes = this._boxes;
116
+ if (this.numItems <= this.nodeSize) {
117
+ boxes[this._pos++] = this.minX;
118
+ boxes[this._pos++] = this.minY;
119
+ boxes[this._pos++] = this.maxX;
120
+ boxes[this._pos++] = this.maxY;
121
+ return;
122
+ }
123
+ const width = this.maxX - this.minX || 1;
124
+ const height = this.maxY - this.minY || 1;
125
+ const hilbertValues = new Uint32Array(this.numItems);
126
+ const hilbertMax = (1 << 16) - 1;
127
+ for (let i = 0, pos = 0; i < this.numItems; i++) {
128
+ const minX = boxes[pos++];
129
+ const minY = boxes[pos++];
130
+ const maxX = boxes[pos++];
131
+ const maxY = boxes[pos++];
132
+ const x = Math.floor(hilbertMax * ((minX + maxX) / 2 - this.minX) / width);
133
+ const y = Math.floor(hilbertMax * ((minY + maxY) / 2 - this.minY) / height);
134
+ hilbertValues[i] = hilbert(x, y);
135
+ }
136
+ sort(hilbertValues, boxes, this._indices, 0, this.numItems - 1, this.nodeSize);
137
+ for (let i = 0, pos = 0; i < this._levelBounds.length - 1; i++) {
138
+ const end = this._levelBounds[i];
139
+ while (pos < end) {
140
+ const nodeIndex = pos;
141
+ let nodeMinX = boxes[pos++];
142
+ let nodeMinY = boxes[pos++];
143
+ let nodeMaxX = boxes[pos++];
144
+ let nodeMaxY = boxes[pos++];
145
+ for (let j = 1; j < this.nodeSize && pos < end; j++) {
146
+ nodeMinX = Math.min(nodeMinX, boxes[pos++]);
147
+ nodeMinY = Math.min(nodeMinY, boxes[pos++]);
148
+ nodeMaxX = Math.max(nodeMaxX, boxes[pos++]);
149
+ nodeMaxY = Math.max(nodeMaxY, boxes[pos++]);
150
+ }
151
+ this._indices[this._pos >> 2] = nodeIndex;
152
+ boxes[this._pos++] = nodeMinX;
153
+ boxes[this._pos++] = nodeMinY;
154
+ boxes[this._pos++] = nodeMaxX;
155
+ boxes[this._pos++] = nodeMaxY;
156
+ }
157
+ }
158
+ }
159
+ /**
160
+ * Search the index by a bounding box.
161
+ * @param {number} minX
162
+ * @param {number} minY
163
+ * @param {number} maxX
164
+ * @param {number} maxY
165
+ * @param {(index: number) => boolean} [filterFn] An optional function for filtering the results.
166
+ * @returns {number[]} An array of indices of items intersecting or touching the given bounding box.
167
+ */
168
+ search(minX, minY, maxX, maxY, filterFn) {
169
+ if (this._pos !== this._boxes.length) {
170
+ throw new Error("Data not yet indexed - call index.finish().");
171
+ }
172
+ let nodeIndex = this._boxes.length - 4;
173
+ const queue = [];
174
+ const results = [];
175
+ while (nodeIndex !== void 0) {
176
+ const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));
177
+ for (let pos = nodeIndex; pos < end; pos += 4) {
178
+ if (maxX < this._boxes[pos]) continue;
179
+ if (maxY < this._boxes[pos + 1]) continue;
180
+ if (minX > this._boxes[pos + 2]) continue;
181
+ if (minY > this._boxes[pos + 3]) continue;
182
+ const index = this._indices[pos >> 2] | 0;
183
+ if (nodeIndex >= this.numItems * 4) {
184
+ queue.push(index);
185
+ } else if (filterFn === void 0 || filterFn(index)) {
186
+ results.push(index);
187
+ }
188
+ }
189
+ nodeIndex = queue.pop();
190
+ }
191
+ return results;
192
+ }
193
+ /**
194
+ * Search items in order of distance from the given point.
195
+ * @param {number} x
196
+ * @param {number} y
197
+ * @param {number} [maxResults=Infinity]
198
+ * @param {number} [maxDistance=Infinity]
199
+ * @param {(index: number) => boolean} [filterFn] An optional function for filtering the results.
200
+ * @returns {number[]} An array of indices of items found.
201
+ */
202
+ neighbors(x, y, maxResults = Infinity, maxDistance = Infinity, filterFn) {
203
+ if (this._pos !== this._boxes.length) {
204
+ throw new Error("Data not yet indexed - call index.finish().");
205
+ }
206
+ let nodeIndex = this._boxes.length - 4;
207
+ const q = this._queue;
208
+ const results = [];
209
+ const maxDistSquared = maxDistance * maxDistance;
210
+ outer: while (nodeIndex !== void 0) {
211
+ const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));
212
+ for (let pos = nodeIndex; pos < end; pos += 4) {
213
+ const index = this._indices[pos >> 2] | 0;
214
+ const dx = axisDist(x, this._boxes[pos], this._boxes[pos + 2]);
215
+ const dy = axisDist(y, this._boxes[pos + 1], this._boxes[pos + 3]);
216
+ const dist = dx * dx + dy * dy;
217
+ if (dist > maxDistSquared) continue;
218
+ if (nodeIndex >= this.numItems * 4) {
219
+ q.push(index << 1, dist);
220
+ } else if (filterFn === void 0 || filterFn(index)) {
221
+ q.push((index << 1) + 1, dist);
222
+ }
223
+ }
224
+ while (q.length && q.peek() & 1) {
225
+ const dist = q.peekValue();
226
+ if (dist > maxDistSquared) break outer;
227
+ results.push(q.pop() >> 1);
228
+ if (results.length === maxResults) break outer;
229
+ }
230
+ nodeIndex = q.length ? q.pop() >> 1 : void 0;
231
+ }
232
+ q.clear();
233
+ return results;
234
+ }
235
+ }
236
+ function axisDist(k, min, max) {
237
+ return k < min ? min - k : k <= max ? 0 : k - max;
238
+ }
239
+ function upperBound(value, arr) {
240
+ let i = 0;
241
+ let j = arr.length - 1;
242
+ while (i < j) {
243
+ const m = i + j >> 1;
244
+ if (arr[m] > value) {
245
+ j = m;
246
+ } else {
247
+ i = m + 1;
248
+ }
249
+ }
250
+ return arr[i];
251
+ }
252
+ function sort(values, boxes, indices, left, right, nodeSize) {
253
+ if (Math.floor(left / nodeSize) >= Math.floor(right / nodeSize)) return;
254
+ const pivot = values[left + right >> 1];
255
+ let i = left - 1;
256
+ let j = right + 1;
257
+ while (true) {
258
+ do
259
+ i++;
260
+ while (values[i] < pivot);
261
+ do
262
+ j--;
263
+ while (values[j] > pivot);
264
+ if (i >= j) break;
265
+ swap(values, boxes, indices, i, j);
266
+ }
267
+ sort(values, boxes, indices, left, j, nodeSize);
268
+ sort(values, boxes, indices, j + 1, right, nodeSize);
269
+ }
270
+ function swap(values, boxes, indices, i, j) {
271
+ const temp = values[i];
272
+ values[i] = values[j];
273
+ values[j] = temp;
274
+ const k = 4 * i;
275
+ const m = 4 * j;
276
+ const a = boxes[k];
277
+ const b = boxes[k + 1];
278
+ const c = boxes[k + 2];
279
+ const d = boxes[k + 3];
280
+ boxes[k] = boxes[m];
281
+ boxes[k + 1] = boxes[m + 1];
282
+ boxes[k + 2] = boxes[m + 2];
283
+ boxes[k + 3] = boxes[m + 3];
284
+ boxes[m] = a;
285
+ boxes[m + 1] = b;
286
+ boxes[m + 2] = c;
287
+ boxes[m + 3] = d;
288
+ const e = indices[i];
289
+ indices[i] = indices[j];
290
+ indices[j] = e;
291
+ }
292
+ function hilbert(x, y) {
293
+ let a = x ^ y;
294
+ let b = 65535 ^ a;
295
+ let c = 65535 ^ (x | y);
296
+ let d = x & (y ^ 65535);
297
+ let A = a | b >> 1;
298
+ let B = a >> 1 ^ a;
299
+ let C = c >> 1 ^ b & d >> 1 ^ c;
300
+ let D = a & c >> 1 ^ d >> 1 ^ d;
301
+ a = A;
302
+ b = B;
303
+ c = C;
304
+ d = D;
305
+ A = a & a >> 2 ^ b & b >> 2;
306
+ B = a & b >> 2 ^ b & (a ^ b) >> 2;
307
+ C ^= a & c >> 2 ^ b & d >> 2;
308
+ D ^= b & c >> 2 ^ (a ^ b) & d >> 2;
309
+ a = A;
310
+ b = B;
311
+ c = C;
312
+ d = D;
313
+ A = a & a >> 4 ^ b & b >> 4;
314
+ B = a & b >> 4 ^ b & (a ^ b) >> 4;
315
+ C ^= a & c >> 4 ^ b & d >> 4;
316
+ D ^= b & c >> 4 ^ (a ^ b) & d >> 4;
317
+ a = A;
318
+ b = B;
319
+ c = C;
320
+ d = D;
321
+ C ^= a & c >> 8 ^ b & d >> 8;
322
+ D ^= b & c >> 8 ^ (a ^ b) & d >> 8;
323
+ a = C ^ C >> 1;
324
+ b = D ^ D >> 1;
325
+ let i0 = x ^ y;
326
+ let i1 = b | 65535 ^ (i0 | a);
327
+ i0 = (i0 | i0 << 8) & 16711935;
328
+ i0 = (i0 | i0 << 4) & 252645135;
329
+ i0 = (i0 | i0 << 2) & 858993459;
330
+ i0 = (i0 | i0 << 1) & 1431655765;
331
+ i1 = (i1 | i1 << 8) & 16711935;
332
+ i1 = (i1 | i1 << 4) & 252645135;
333
+ i1 = (i1 | i1 << 2) & 858993459;
334
+ i1 = (i1 | i1 << 1) & 1431655765;
335
+ return (i1 << 1 | i0) >>> 0;
336
+ }
337
+ export {
338
+ Flatbush as default
339
+ };