@mui/x-charts-vendor 7.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +76 -0
  2. package/d3-color.d.ts +5 -0
  3. package/d3-color.js +7 -0
  4. package/d3-delaunay.d.ts +5 -0
  5. package/d3-delaunay.js +7 -0
  6. package/d3-interpolate.d.ts +5 -0
  7. package/d3-interpolate.js +7 -0
  8. package/d3-scale.d.ts +5 -0
  9. package/d3-scale.js +7 -0
  10. package/d3-shape.d.ts +5 -0
  11. package/d3-shape.js +7 -0
  12. package/d3-time.d.ts +5 -0
  13. package/d3-time.js +7 -0
  14. package/es/d3-array.js +6 -0
  15. package/es/d3-color.js +6 -0
  16. package/es/d3-delaunay.js +6 -0
  17. package/es/d3-format.js +6 -0
  18. package/es/d3-interpolate.js +6 -0
  19. package/es/d3-path.js +6 -0
  20. package/es/d3-scale.js +6 -0
  21. package/es/d3-shape.js +6 -0
  22. package/es/d3-time-format.js +6 -0
  23. package/es/d3-time.js +6 -0
  24. package/es/delaunator.js +6 -0
  25. package/es/internmap.js +6 -0
  26. package/es/robust-predicates.js +6 -0
  27. package/lib/d3-array.js +6 -0
  28. package/lib/d3-color.js +6 -0
  29. package/lib/d3-delaunay.js +6 -0
  30. package/lib/d3-format.js +6 -0
  31. package/lib/d3-interpolate.js +6 -0
  32. package/lib/d3-path.js +6 -0
  33. package/lib/d3-scale.js +6 -0
  34. package/lib/d3-shape.js +6 -0
  35. package/lib/d3-time-format.js +6 -0
  36. package/lib/d3-time.js +6 -0
  37. package/lib/delaunator.js +6 -0
  38. package/lib/internmap.js +6 -0
  39. package/lib/robust-predicates.js +6 -0
  40. package/lib-vendor/d3-array/LICENSE +13 -0
  41. package/lib-vendor/d3-array/dist/d3-array.js +1349 -0
  42. package/lib-vendor/d3-array/dist/d3-array.min.js +777 -0
  43. package/lib-vendor/d3-array/src/array.js +9 -0
  44. package/lib-vendor/d3-array/src/ascending.js +9 -0
  45. package/lib-vendor/d3-array/src/bin.js +126 -0
  46. package/lib-vendor/d3-array/src/bisect.js +15 -0
  47. package/lib-vendor/d3-array/src/bisector.js +59 -0
  48. package/lib-vendor/d3-array/src/blur.js +122 -0
  49. package/lib-vendor/d3-array/src/constant.js +9 -0
  50. package/lib-vendor/d3-array/src/count.js +24 -0
  51. package/lib-vendor/d3-array/src/cross.js +35 -0
  52. package/lib-vendor/d3-array/src/cumsum.js +11 -0
  53. package/lib-vendor/d3-array/src/descending.js +9 -0
  54. package/lib-vendor/d3-array/src/deviation.js +12 -0
  55. package/lib-vendor/d3-array/src/difference.js +16 -0
  56. package/lib-vendor/d3-array/src/disjoint.js +24 -0
  57. package/lib-vendor/d3-array/src/every.js +16 -0
  58. package/lib-vendor/d3-array/src/extent.js +35 -0
  59. package/lib-vendor/d3-array/src/filter.js +17 -0
  60. package/lib-vendor/d3-array/src/fsum.js +77 -0
  61. package/lib-vendor/d3-array/src/greatest.js +31 -0
  62. package/lib-vendor/d3-array/src/greatestIndex.js +23 -0
  63. package/lib-vendor/d3-array/src/group.js +67 -0
  64. package/lib-vendor/d3-array/src/groupSort.js +15 -0
  65. package/lib-vendor/d3-array/src/identity.js +9 -0
  66. package/lib-vendor/d3-array/src/index.js +539 -0
  67. package/lib-vendor/d3-array/src/intersection.js +23 -0
  68. package/lib-vendor/d3-array/src/least.js +31 -0
  69. package/lib-vendor/d3-array/src/leastIndex.js +23 -0
  70. package/lib-vendor/d3-array/src/map.js +11 -0
  71. package/lib-vendor/d3-array/src/max.js +24 -0
  72. package/lib-vendor/d3-array/src/maxIndex.js +26 -0
  73. package/lib-vendor/d3-array/src/mean.js +25 -0
  74. package/lib-vendor/d3-array/src/median.js +16 -0
  75. package/lib-vendor/d3-array/src/merge.js +14 -0
  76. package/lib-vendor/d3-array/src/min.js +24 -0
  77. package/lib-vendor/d3-array/src/minIndex.js +26 -0
  78. package/lib-vendor/d3-array/src/mode.js +33 -0
  79. package/lib-vendor/d3-array/src/nice.js +23 -0
  80. package/lib-vendor/d3-array/src/number.js +26 -0
  81. package/lib-vendor/d3-array/src/pairs.js +21 -0
  82. package/lib-vendor/d3-array/src/permute.js +9 -0
  83. package/lib-vendor/d3-array/src/quantile.js +55 -0
  84. package/lib-vendor/d3-array/src/quickselect.js +47 -0
  85. package/lib-vendor/d3-array/src/range.js +16 -0
  86. package/lib-vendor/d3-array/src/rank.js +30 -0
  87. package/lib-vendor/d3-array/src/reduce.js +28 -0
  88. package/lib-vendor/d3-array/src/reverse.js +10 -0
  89. package/lib-vendor/d3-array/src/scan.js +12 -0
  90. package/lib-vendor/d3-array/src/shuffle.js +20 -0
  91. package/lib-vendor/d3-array/src/some.js +16 -0
  92. package/lib-vendor/d3-array/src/sort.js +45 -0
  93. package/lib-vendor/d3-array/src/subset.js +11 -0
  94. package/lib-vendor/d3-array/src/sum.js +24 -0
  95. package/lib-vendor/d3-array/src/superset.js +28 -0
  96. package/lib-vendor/d3-array/src/threshold/freedmanDiaconis.js +14 -0
  97. package/lib-vendor/d3-array/src/threshold/scott.js +14 -0
  98. package/lib-vendor/d3-array/src/threshold/sturges.js +11 -0
  99. package/lib-vendor/d3-array/src/ticks.js +60 -0
  100. package/lib-vendor/d3-array/src/transpose.js +20 -0
  101. package/lib-vendor/d3-array/src/union.js +16 -0
  102. package/lib-vendor/d3-array/src/variance.js +31 -0
  103. package/lib-vendor/d3-array/src/zip.js +11 -0
  104. package/lib-vendor/d3-color/LICENSE +13 -0
  105. package/lib-vendor/d3-color/dist/d3-color.js +532 -0
  106. package/lib-vendor/d3-color/dist/d3-color.min.js +446 -0
  107. package/lib-vendor/d3-color/src/color.js +366 -0
  108. package/lib-vendor/d3-color/src/cubehelix.js +61 -0
  109. package/lib-vendor/d3-color/src/define.js +16 -0
  110. package/lib-vendor/d3-color/src/index.js +59 -0
  111. package/lib-vendor/d3-color/src/lab.js +117 -0
  112. package/lib-vendor/d3-color/src/math.js +8 -0
  113. package/lib-vendor/d3-delaunay/LICENSE +14 -0
  114. package/lib-vendor/d3-delaunay/dist/d3-delaunay.js +1398 -0
  115. package/lib-vendor/d3-delaunay/dist/d3-delaunay.min.js +853 -0
  116. package/lib-vendor/d3-delaunay/src/delaunay.js +282 -0
  117. package/lib-vendor/d3-delaunay/src/index.js +20 -0
  118. package/lib-vendor/d3-delaunay/src/path.js +43 -0
  119. package/lib-vendor/d3-delaunay/src/polygon.js +24 -0
  120. package/lib-vendor/d3-delaunay/src/voronoi.js +390 -0
  121. package/lib-vendor/d3-format/LICENSE +13 -0
  122. package/lib-vendor/d3-format/dist/d3-format.js +313 -0
  123. package/lib-vendor/d3-format/dist/d3-format.min.js +193 -0
  124. package/lib-vendor/d3-format/src/defaultLocale.js +23 -0
  125. package/lib-vendor/d3-format/src/exponent.js +10 -0
  126. package/lib-vendor/d3-format/src/formatDecimal.js +23 -0
  127. package/lib-vendor/d3-format/src/formatGroup.js +22 -0
  128. package/lib-vendor/d3-format/src/formatNumerals.js +13 -0
  129. package/lib-vendor/d3-format/src/formatPrefixAuto.js +18 -0
  130. package/lib-vendor/d3-format/src/formatRounded.js +14 -0
  131. package/lib-vendor/d3-format/src/formatSpecifier.js +42 -0
  132. package/lib-vendor/d3-format/src/formatTrim.js +25 -0
  133. package/lib-vendor/d3-format/src/formatTypes.js +25 -0
  134. package/lib-vendor/d3-format/src/identity.js +9 -0
  135. package/lib-vendor/d3-format/src/index.js +68 -0
  136. package/lib-vendor/d3-format/src/locale.js +152 -0
  137. package/lib-vendor/d3-format/src/precisionFixed.js +11 -0
  138. package/lib-vendor/d3-format/src/precisionPrefix.js +11 -0
  139. package/lib-vendor/d3-format/src/precisionRound.js +12 -0
  140. package/lib-vendor/d3-interpolate/LICENSE +13 -0
  141. package/lib-vendor/d3-interpolate/dist/d3-interpolate.js +543 -0
  142. package/lib-vendor/d3-interpolate/dist/d3-interpolate.min.js +362 -0
  143. package/lib-vendor/d3-interpolate/src/array.js +28 -0
  144. package/lib-vendor/d3-interpolate/src/basis.js +23 -0
  145. package/lib-vendor/d3-interpolate/src/basisClosed.js +18 -0
  146. package/lib-vendor/d3-interpolate/src/color.js +33 -0
  147. package/lib-vendor/d3-interpolate/src/constant.js +8 -0
  148. package/lib-vendor/d3-interpolate/src/cubehelix.js +32 -0
  149. package/lib-vendor/d3-interpolate/src/date.js +12 -0
  150. package/lib-vendor/d3-interpolate/src/discrete.js +12 -0
  151. package/lib-vendor/d3-interpolate/src/hcl.js +27 -0
  152. package/lib-vendor/d3-interpolate/src/hsl.js +27 -0
  153. package/lib-vendor/d3-interpolate/src/hue.js +14 -0
  154. package/lib-vendor/d3-interpolate/src/index.js +191 -0
  155. package/lib-vendor/d3-interpolate/src/lab.js +22 -0
  156. package/lib-vendor/d3-interpolate/src/number.js +11 -0
  157. package/lib-vendor/d3-interpolate/src/numberArray.js +20 -0
  158. package/lib-vendor/d3-interpolate/src/object.js +26 -0
  159. package/lib-vendor/d3-interpolate/src/piecewise.js +20 -0
  160. package/lib-vendor/d3-interpolate/src/quantize.js +11 -0
  161. package/lib-vendor/d3-interpolate/src/rgb.js +59 -0
  162. package/lib-vendor/d3-interpolate/src/round.js +11 -0
  163. package/lib-vendor/d3-interpolate/src/string.js +75 -0
  164. package/lib-vendor/d3-interpolate/src/transform/decompose.js +31 -0
  165. package/lib-vendor/d3-interpolate/src/transform/index.js +83 -0
  166. package/lib-vendor/d3-interpolate/src/transform/parse.js +25 -0
  167. package/lib-vendor/d3-interpolate/src/value.js +23 -0
  168. package/lib-vendor/d3-interpolate/src/zoom.js +66 -0
  169. package/lib-vendor/d3-path/LICENSE +13 -0
  170. package/lib-vendor/d3-path/dist/d3-path.js +161 -0
  171. package/lib-vendor/d3-path/dist/d3-path.min.js +92 -0
  172. package/lib-vendor/d3-path/src/index.js +24 -0
  173. package/lib-vendor/d3-path/src/path.js +158 -0
  174. package/lib-vendor/d3-scale/LICENSE +13 -0
  175. package/lib-vendor/d3-scale/dist/d3-scale.js +944 -0
  176. package/lib-vendor/d3-scale/dist/d3-scale.min.js +690 -0
  177. package/lib-vendor/d3-scale/src/band.js +87 -0
  178. package/lib-vendor/d3-scale/src/colors.js +11 -0
  179. package/lib-vendor/d3-scale/src/constant.js +11 -0
  180. package/lib-vendor/d3-scale/src/continuous.js +116 -0
  181. package/lib-vendor/d3-scale/src/diverging.js +91 -0
  182. package/lib-vendor/d3-scale/src/identity.js +27 -0
  183. package/lib-vendor/d3-scale/src/index.js +193 -0
  184. package/lib-vendor/d3-scale/src/init.js +38 -0
  185. package/lib-vendor/d3-scale/src/linear.js +67 -0
  186. package/lib-vendor/d3-scale/src/log.js +123 -0
  187. package/lib-vendor/d3-scale/src/nice.js +21 -0
  188. package/lib-vendor/d3-scale/src/number.js +9 -0
  189. package/lib-vendor/d3-scale/src/ordinal.js +44 -0
  190. package/lib-vendor/d3-scale/src/pow.js +44 -0
  191. package/lib-vendor/d3-scale/src/quantile.js +48 -0
  192. package/lib-vendor/d3-scale/src/quantize.js +46 -0
  193. package/lib-vendor/d3-scale/src/radial.js +53 -0
  194. package/lib-vendor/d3-scale/src/sequential.js +90 -0
  195. package/lib-vendor/d3-scale/src/sequentialQuantile.js +38 -0
  196. package/lib-vendor/d3-scale/src/symlog.js +35 -0
  197. package/lib-vendor/d3-scale/src/threshold.js +34 -0
  198. package/lib-vendor/d3-scale/src/tickFormat.js +37 -0
  199. package/lib-vendor/d3-scale/src/time.js +62 -0
  200. package/lib-vendor/d3-scale/src/utcTime.js +13 -0
  201. package/lib-vendor/d3-shape/LICENSE +13 -0
  202. package/lib-vendor/d3-shape/dist/d3-shape.js +2004 -0
  203. package/lib-vendor/d3-shape/dist/d3-shape.min.js +1389 -0
  204. package/lib-vendor/d3-shape/src/arc.js +250 -0
  205. package/lib-vendor/d3-shape/src/area.js +98 -0
  206. package/lib-vendor/d3-shape/src/areaRadial.js +42 -0
  207. package/lib-vendor/d3-shape/src/array.js +12 -0
  208. package/lib-vendor/d3-shape/src/constant.js +11 -0
  209. package/lib-vendor/d3-shape/src/curve/basis.js +62 -0
  210. package/lib-vendor/d3-shape/src/curve/basisClosed.js +70 -0
  211. package/lib-vendor/d3-shape/src/curve/basisOpen.js +54 -0
  212. package/lib-vendor/d3-shape/src/curve/bump.js +81 -0
  213. package/lib-vendor/d3-shape/src/curve/bundle.js +50 -0
  214. package/lib-vendor/d3-shape/src/curve/cardinal.js +69 -0
  215. package/lib-vendor/d3-shape/src/curve/cardinalClosed.js +76 -0
  216. package/lib-vendor/d3-shape/src/curve/cardinalOpen.js +60 -0
  217. package/lib-vendor/d3-shape/src/curve/catmullRom.js +92 -0
  218. package/lib-vendor/d3-shape/src/curve/catmullRomClosed.js +83 -0
  219. package/lib-vendor/d3-shape/src/curve/catmullRomOpen.js +67 -0
  220. package/lib-vendor/d3-shape/src/curve/linear.js +42 -0
  221. package/lib-vendor/d3-shape/src/curve/linearClosed.js +28 -0
  222. package/lib-vendor/d3-shape/src/curve/monotone.js +121 -0
  223. package/lib-vendor/d3-shape/src/curve/natural.js +67 -0
  224. package/lib-vendor/d3-shape/src/curve/radial.js +37 -0
  225. package/lib-vendor/d3-shape/src/curve/step.js +63 -0
  226. package/lib-vendor/d3-shape/src/descending.js +9 -0
  227. package/lib-vendor/d3-shape/src/identity.js +9 -0
  228. package/lib-vendor/d3-shape/src/index.js +436 -0
  229. package/lib-vendor/d3-shape/src/line.js +52 -0
  230. package/lib-vendor/d3-shape/src/lineRadial.js +24 -0
  231. package/lib-vendor/d3-shape/src/link.js +70 -0
  232. package/lib-vendor/d3-shape/src/math.js +26 -0
  233. package/lib-vendor/d3-shape/src/noop.js +7 -0
  234. package/lib-vendor/d3-shape/src/offset/diverging.js +20 -0
  235. package/lib-vendor/d3-shape/src/offset/expand.js +16 -0
  236. package/lib-vendor/d3-shape/src/offset/none.js +15 -0
  237. package/lib-vendor/d3-shape/src/offset/silhouette.js +16 -0
  238. package/lib-vendor/d3-shape/src/offset/wiggle.js +30 -0
  239. package/lib-vendor/d3-shape/src/order/appearance.js +23 -0
  240. package/lib-vendor/d3-shape/src/order/ascending.js +23 -0
  241. package/lib-vendor/d3-shape/src/order/descending.js +11 -0
  242. package/lib-vendor/d3-shape/src/order/insideOut.js +31 -0
  243. package/lib-vendor/d3-shape/src/order/none.js +12 -0
  244. package/lib-vendor/d3-shape/src/order/reverse.js +11 -0
  245. package/lib-vendor/d3-shape/src/path.js +22 -0
  246. package/lib-vendor/d3-shape/src/pie.js +79 -0
  247. package/lib-vendor/d3-shape/src/point.js +13 -0
  248. package/lib-vendor/d3-shape/src/pointRadial.js +9 -0
  249. package/lib-vendor/d3-shape/src/stack.js +55 -0
  250. package/lib-vendor/d3-shape/src/symbol/asterisk.js +21 -0
  251. package/lib-vendor/d3-shape/src/symbol/circle.js +14 -0
  252. package/lib-vendor/d3-shape/src/symbol/cross.js +25 -0
  253. package/lib-vendor/d3-shape/src/symbol/diamond.js +20 -0
  254. package/lib-vendor/d3-shape/src/symbol/diamond2.js +17 -0
  255. package/lib-vendor/d3-shape/src/symbol/plus.js +16 -0
  256. package/lib-vendor/d3-shape/src/symbol/square.js +14 -0
  257. package/lib-vendor/d3-shape/src/symbol/square2.js +17 -0
  258. package/lib-vendor/d3-shape/src/symbol/star.js +28 -0
  259. package/lib-vendor/d3-shape/src/symbol/times.js +16 -0
  260. package/lib-vendor/d3-shape/src/symbol/triangle.js +17 -0
  261. package/lib-vendor/d3-shape/src/symbol/triangle2.js +19 -0
  262. package/lib-vendor/d3-shape/src/symbol/wye.js +32 -0
  263. package/lib-vendor/d3-shape/src/symbol.js +50 -0
  264. package/lib-vendor/d3-time/LICENSE +13 -0
  265. package/lib-vendor/d3-time/dist/d3-time.js +367 -0
  266. package/lib-vendor/d3-time/dist/d3-time.min.js +190 -0
  267. package/lib-vendor/d3-time/src/day.js +30 -0
  268. package/lib-vendor/d3-time/src/duration.js +13 -0
  269. package/lib-vendor/d3-time/src/hour.js +28 -0
  270. package/lib-vendor/d3-time/src/index.js +417 -0
  271. package/lib-vendor/d3-time/src/interval.js +61 -0
  272. package/lib-vendor/d3-time/src/millisecond.js +29 -0
  273. package/lib-vendor/d3-time/src/minute.js +28 -0
  274. package/lib-vendor/d3-time/src/month.js +29 -0
  275. package/lib-vendor/d3-time/src/second.js +18 -0
  276. package/lib-vendor/d3-time/src/ticks.js +41 -0
  277. package/lib-vendor/d3-time/src/week.js +56 -0
  278. package/lib-vendor/d3-time/src/year.js +51 -0
  279. package/lib-vendor/d3-time-format/LICENSE +13 -0
  280. package/lib-vendor/d3-time-format/dist/d3-time-format.js +648 -0
  281. package/lib-vendor/d3-time-format/dist/d3-time-format.min.js +528 -0
  282. package/lib-vendor/d3-time-format/src/defaultLocale.js +32 -0
  283. package/lib-vendor/d3-time-format/src/index.js +60 -0
  284. package/lib-vendor/d3-time-format/src/isoFormat.js +13 -0
  285. package/lib-vendor/d3-time-format/src/isoParse.js +14 -0
  286. package/lib-vendor/d3-time-format/src/locale.js +606 -0
  287. package/lib-vendor/delaunator/LICENSE +15 -0
  288. package/lib-vendor/delaunator/delaunator.js +688 -0
  289. package/lib-vendor/delaunator/delaunator.min.js +316 -0
  290. package/lib-vendor/delaunator/index.js +440 -0
  291. package/lib-vendor/internmap/LICENSE +13 -0
  292. package/lib-vendor/internmap/dist/internmap.js +93 -0
  293. package/lib-vendor/internmap/dist/internmap.min.js +81 -0
  294. package/lib-vendor/internmap/src/index.js +87 -0
  295. package/lib-vendor/robust-predicates/LICENSE +24 -0
  296. package/lib-vendor/robust-predicates/esm/incircle.js +667 -0
  297. package/lib-vendor/robust-predicates/esm/insphere.js +693 -0
  298. package/lib-vendor/robust-predicates/esm/orient2d.js +174 -0
  299. package/lib-vendor/robust-predicates/esm/orient3d.js +422 -0
  300. package/lib-vendor/robust-predicates/esm/util.js +147 -0
  301. package/lib-vendor/robust-predicates/index.js +57 -0
  302. package/lib-vendor/robust-predicates/umd/incircle.js +798 -0
  303. package/lib-vendor/robust-predicates/umd/incircle.min.js +170 -0
  304. package/lib-vendor/robust-predicates/umd/insphere.js +828 -0
  305. package/lib-vendor/robust-predicates/umd/insphere.min.js +223 -0
  306. package/lib-vendor/robust-predicates/umd/orient2d.js +260 -0
  307. package/lib-vendor/robust-predicates/umd/orient2d.min.js +69 -0
  308. package/lib-vendor/robust-predicates/umd/orient3d.js +550 -0
  309. package/lib-vendor/robust-predicates/umd/orient3d.min.js +133 -0
  310. package/lib-vendor/robust-predicates/umd/predicates.js +2073 -0
  311. package/lib-vendor/robust-predicates/umd/predicates.min.js +468 -0
  312. package/package.json +63 -0
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var epsilon2 = 1e-12;
8
+ function cosh(x) {
9
+ return ((x = Math.exp(x)) + 1 / x) / 2;
10
+ }
11
+ function sinh(x) {
12
+ return ((x = Math.exp(x)) - 1 / x) / 2;
13
+ }
14
+ function tanh(x) {
15
+ return ((x = Math.exp(2 * x)) - 1) / (x + 1);
16
+ }
17
+ var _default = exports.default = function zoomRho(rho, rho2, rho4) {
18
+ // p0 = [ux0, uy0, w0]
19
+ // p1 = [ux1, uy1, w1]
20
+ function zoom(p0, p1) {
21
+ var ux0 = p0[0],
22
+ uy0 = p0[1],
23
+ w0 = p0[2],
24
+ ux1 = p1[0],
25
+ uy1 = p1[1],
26
+ w1 = p1[2],
27
+ dx = ux1 - ux0,
28
+ dy = uy1 - uy0,
29
+ d2 = dx * dx + dy * dy,
30
+ i,
31
+ S;
32
+
33
+ // Special case for u0 ≅ u1.
34
+ if (d2 < epsilon2) {
35
+ S = Math.log(w1 / w0) / rho;
36
+ i = function (t) {
37
+ return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];
38
+ };
39
+ }
40
+
41
+ // General case.
42
+ else {
43
+ var d1 = Math.sqrt(d2),
44
+ b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
45
+ b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
46
+ r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
47
+ r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
48
+ S = (r1 - r0) / rho;
49
+ i = function (t) {
50
+ var s = t * S,
51
+ coshr0 = cosh(r0),
52
+ u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
53
+ return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];
54
+ };
55
+ }
56
+ i.duration = S * 1000 * rho / Math.SQRT2;
57
+ return i;
58
+ }
59
+ zoom.rho = function (_) {
60
+ var _1 = Math.max(1e-3, +_),
61
+ _2 = _1 * _1,
62
+ _4 = _2 * _2;
63
+ return zoomRho(_1, _2, _4);
64
+ };
65
+ return zoom;
66
+ }(Math.SQRT2, 2, 4);
@@ -0,0 +1,13 @@
1
+ Copyright 2015-2022 Mike Bostock
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose
4
+ with or without fee is hereby granted, provided that the above copyright notice
5
+ and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
9
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
11
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
12
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
13
+ THIS SOFTWARE.
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+
3
+ // https://d3js.org/d3-path/ v3.1.0 Copyright 2015-2022 Mike Bostock
4
+ (function (global, factory) {
5
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}));
6
+ })(this, function (exports) {
7
+ 'use strict';
8
+
9
+ const pi = Math.PI,
10
+ tau = 2 * pi,
11
+ epsilon = 1e-6,
12
+ tauEpsilon = tau - epsilon;
13
+ function append(strings) {
14
+ this._ += strings[0];
15
+ for (let i = 1, n = strings.length; i < n; ++i) {
16
+ this._ += arguments[i] + strings[i];
17
+ }
18
+ }
19
+ function appendRound(digits) {
20
+ let d = Math.floor(digits);
21
+ if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
22
+ if (d > 15) return append;
23
+ const k = 10 ** d;
24
+ return function (strings) {
25
+ this._ += strings[0];
26
+ for (let i = 1, n = strings.length; i < n; ++i) {
27
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
28
+ }
29
+ };
30
+ }
31
+ class Path {
32
+ constructor(digits) {
33
+ this._x0 = this._y0 =
34
+ // start of current subpath
35
+ this._x1 = this._y1 = null; // end of current subpath
36
+ this._ = "";
37
+ this._append = digits == null ? append : appendRound(digits);
38
+ }
39
+ moveTo(x, y) {
40
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
41
+ }
42
+ closePath() {
43
+ if (this._x1 !== null) {
44
+ this._x1 = this._x0, this._y1 = this._y0;
45
+ this._append`Z`;
46
+ }
47
+ }
48
+ lineTo(x, y) {
49
+ this._append`L${this._x1 = +x},${this._y1 = +y}`;
50
+ }
51
+ quadraticCurveTo(x1, y1, x, y) {
52
+ this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;
53
+ }
54
+ bezierCurveTo(x1, y1, x2, y2, x, y) {
55
+ this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;
56
+ }
57
+ arcTo(x1, y1, x2, y2, r) {
58
+ x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
59
+
60
+ // Is the radius negative? Error.
61
+ if (r < 0) throw new Error(`negative radius: ${r}`);
62
+ let x0 = this._x1,
63
+ y0 = this._y1,
64
+ x21 = x2 - x1,
65
+ y21 = y2 - y1,
66
+ x01 = x0 - x1,
67
+ y01 = y0 - y1,
68
+ l01_2 = x01 * x01 + y01 * y01;
69
+
70
+ // Is this path empty? Move to (x1,y1).
71
+ if (this._x1 === null) {
72
+ this._append`M${this._x1 = x1},${this._y1 = y1}`;
73
+ }
74
+
75
+ // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
76
+ else if (!(l01_2 > epsilon)) ;
77
+
78
+ // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
79
+ // Equivalently, is (x1,y1) coincident with (x2,y2)?
80
+ // Or, is the radius zero? Line to (x1,y1).
81
+ else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
82
+ this._append`L${this._x1 = x1},${this._y1 = y1}`;
83
+ }
84
+
85
+ // Otherwise, draw an arc!
86
+ else {
87
+ let x20 = x2 - x0,
88
+ y20 = y2 - y0,
89
+ l21_2 = x21 * x21 + y21 * y21,
90
+ l20_2 = x20 * x20 + y20 * y20,
91
+ l21 = Math.sqrt(l21_2),
92
+ l01 = Math.sqrt(l01_2),
93
+ l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
94
+ t01 = l / l01,
95
+ t21 = l / l21;
96
+
97
+ // If the start tangent is not coincident with (x0,y0), line to.
98
+ if (Math.abs(t01 - 1) > epsilon) {
99
+ this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
100
+ }
101
+ this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
102
+ }
103
+ }
104
+ arc(x, y, r, a0, a1, ccw) {
105
+ x = +x, y = +y, r = +r, ccw = !!ccw;
106
+
107
+ // Is the radius negative? Error.
108
+ if (r < 0) throw new Error(`negative radius: ${r}`);
109
+ let dx = r * Math.cos(a0),
110
+ dy = r * Math.sin(a0),
111
+ x0 = x + dx,
112
+ y0 = y + dy,
113
+ cw = 1 ^ ccw,
114
+ da = ccw ? a0 - a1 : a1 - a0;
115
+
116
+ // Is this path empty? Move to (x0,y0).
117
+ if (this._x1 === null) {
118
+ this._append`M${x0},${y0}`;
119
+ }
120
+
121
+ // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
122
+ else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
123
+ this._append`L${x0},${y0}`;
124
+ }
125
+
126
+ // Is this arc empty? We’re done.
127
+ if (!r) return;
128
+
129
+ // Does the angle go the wrong way? Flip the direction.
130
+ if (da < 0) da = da % tau + tau;
131
+
132
+ // Is this a complete circle? Draw two arcs to complete the circle.
133
+ if (da > tauEpsilon) {
134
+ this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
135
+ }
136
+
137
+ // Is this arc non-empty? Draw an arc!
138
+ else if (da > epsilon) {
139
+ this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;
140
+ }
141
+ }
142
+ rect(x, y, w, h) {
143
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;
144
+ }
145
+ toString() {
146
+ return this._;
147
+ }
148
+ }
149
+ function path() {
150
+ return new Path();
151
+ }
152
+
153
+ // Allow instanceof d3.path
154
+ path.prototype = Path.prototype;
155
+ function pathRound(digits = 3) {
156
+ return new Path(+digits);
157
+ }
158
+ exports.Path = Path;
159
+ exports.path = path;
160
+ exports.pathRound = pathRound;
161
+ });
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ // https://d3js.org/d3-path/ v3.1.0 Copyright 2015-2022 Mike Bostock
4
+ !function (t, i) {
5
+ "object" == typeof exports && "undefined" != typeof module ? i(exports) : "function" == typeof define && define.amd ? define(["exports"], i) : i((t = "undefined" != typeof globalThis ? globalThis : t || self).d3 = t.d3 || {});
6
+ }(this, function (t) {
7
+ "use strict";
8
+
9
+ const i = Math.PI,
10
+ s = 2 * i,
11
+ h = 1e-6,
12
+ e = s - h;
13
+ function n(t) {
14
+ this._ += t[0];
15
+ for (let i = 1, s = t.length; i < s; ++i) this._ += arguments[i] + t[i];
16
+ }
17
+ class _ {
18
+ constructor(t) {
19
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = null == t ? n : function (t) {
20
+ let i = Math.floor(t);
21
+ if (!(i >= 0)) throw new Error(`invalid digits: ${t}`);
22
+ if (i > 15) return n;
23
+ const s = 10 ** i;
24
+ return function (t) {
25
+ this._ += t[0];
26
+ for (let i = 1, h = t.length; i < h; ++i) this._ += Math.round(arguments[i] * s) / s + t[i];
27
+ };
28
+ }(t);
29
+ }
30
+ moveTo(t, i) {
31
+ this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}`;
32
+ }
33
+ closePath() {
34
+ null !== this._x1 && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
35
+ }
36
+ lineTo(t, i) {
37
+ this._append`L${this._x1 = +t},${this._y1 = +i}`;
38
+ }
39
+ quadraticCurveTo(t, i, s, h) {
40
+ this._append`Q${+t},${+i},${this._x1 = +s},${this._y1 = +h}`;
41
+ }
42
+ bezierCurveTo(t, i, s, h, e, n) {
43
+ this._append`C${+t},${+i},${+s},${+h},${this._x1 = +e},${this._y1 = +n}`;
44
+ }
45
+ arcTo(t, s, e, n, _) {
46
+ if (t = +t, s = +s, e = +e, n = +n, (_ = +_) < 0) throw new Error(`negative radius: ${_}`);
47
+ let a = this._x1,
48
+ $ = this._y1,
49
+ o = e - t,
50
+ r = n - s,
51
+ p = a - t,
52
+ d = $ - s,
53
+ l = p * p + d * d;
54
+ if (null === this._x1) this._append`M${this._x1 = t},${this._y1 = s}`;else if (l > h) {
55
+ if (Math.abs(d * o - r * p) > h && _) {
56
+ let u = e - a,
57
+ f = n - $,
58
+ x = o * o + r * r,
59
+ y = u * u + f * f,
60
+ c = Math.sqrt(x),
61
+ M = Math.sqrt(l),
62
+ b = _ * Math.tan((i - Math.acos((x + l - y) / (2 * c * M))) / 2),
63
+ g = b / M,
64
+ w = b / c;
65
+ Math.abs(g - 1) > h && this._append`L${t + g * p},${s + g * d}`, this._append`A${_},${_},0,0,${+(d * u > p * f)},${this._x1 = t + w * o},${this._y1 = s + w * r}`;
66
+ } else this._append`L${this._x1 = t},${this._y1 = s}`;
67
+ } else ;
68
+ }
69
+ arc(t, n, _, a, $, o) {
70
+ if (t = +t, n = +n, o = !!o, (_ = +_) < 0) throw new Error(`negative radius: ${_}`);
71
+ let r = _ * Math.cos(a),
72
+ p = _ * Math.sin(a),
73
+ d = t + r,
74
+ l = n + p,
75
+ u = 1 ^ o,
76
+ f = o ? a - $ : $ - a;
77
+ null === this._x1 ? this._append`M${d},${l}` : (Math.abs(this._x1 - d) > h || Math.abs(this._y1 - l) > h) && this._append`L${d},${l}`, _ && (f < 0 && (f = f % s + s), f > e ? this._append`A${_},${_},0,1,${u},${t - r},${n - p}A${_},${_},0,1,${u},${this._x1 = d},${this._y1 = l}` : f > h && this._append`A${_},${_},0,${+(f >= i)},${u},${this._x1 = t + _ * Math.cos($)},${this._y1 = n + _ * Math.sin($)}`);
78
+ }
79
+ rect(t, i, s, h) {
80
+ this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}h${s = +s}v${+h}h${-s}Z`;
81
+ }
82
+ toString() {
83
+ return this._;
84
+ }
85
+ }
86
+ function a() {
87
+ return new _();
88
+ }
89
+ a.prototype = _.prototype, t.Path = _, t.path = a, t.pathRound = function (t = 3) {
90
+ return new _(+t);
91
+ };
92
+ });
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Path", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _path.Path;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "path", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _path.path;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "pathRound", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _path.pathRound;
22
+ }
23
+ });
24
+ var _path = require("./path.js");
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Path = void 0;
7
+ exports.path = path;
8
+ exports.pathRound = pathRound;
9
+ const pi = Math.PI,
10
+ tau = 2 * pi,
11
+ epsilon = 1e-6,
12
+ tauEpsilon = tau - epsilon;
13
+ function append(strings) {
14
+ this._ += strings[0];
15
+ for (let i = 1, n = strings.length; i < n; ++i) {
16
+ this._ += arguments[i] + strings[i];
17
+ }
18
+ }
19
+ function appendRound(digits) {
20
+ let d = Math.floor(digits);
21
+ if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
22
+ if (d > 15) return append;
23
+ const k = 10 ** d;
24
+ return function (strings) {
25
+ this._ += strings[0];
26
+ for (let i = 1, n = strings.length; i < n; ++i) {
27
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
28
+ }
29
+ };
30
+ }
31
+ class Path {
32
+ constructor(digits) {
33
+ this._x0 = this._y0 =
34
+ // start of current subpath
35
+ this._x1 = this._y1 = null; // end of current subpath
36
+ this._ = "";
37
+ this._append = digits == null ? append : appendRound(digits);
38
+ }
39
+ moveTo(x, y) {
40
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
41
+ }
42
+ closePath() {
43
+ if (this._x1 !== null) {
44
+ this._x1 = this._x0, this._y1 = this._y0;
45
+ this._append`Z`;
46
+ }
47
+ }
48
+ lineTo(x, y) {
49
+ this._append`L${this._x1 = +x},${this._y1 = +y}`;
50
+ }
51
+ quadraticCurveTo(x1, y1, x, y) {
52
+ this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;
53
+ }
54
+ bezierCurveTo(x1, y1, x2, y2, x, y) {
55
+ this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;
56
+ }
57
+ arcTo(x1, y1, x2, y2, r) {
58
+ x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
59
+
60
+ // Is the radius negative? Error.
61
+ if (r < 0) throw new Error(`negative radius: ${r}`);
62
+ let x0 = this._x1,
63
+ y0 = this._y1,
64
+ x21 = x2 - x1,
65
+ y21 = y2 - y1,
66
+ x01 = x0 - x1,
67
+ y01 = y0 - y1,
68
+ l01_2 = x01 * x01 + y01 * y01;
69
+
70
+ // Is this path empty? Move to (x1,y1).
71
+ if (this._x1 === null) {
72
+ this._append`M${this._x1 = x1},${this._y1 = y1}`;
73
+ }
74
+
75
+ // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
76
+ else if (!(l01_2 > epsilon)) ;
77
+
78
+ // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
79
+ // Equivalently, is (x1,y1) coincident with (x2,y2)?
80
+ // Or, is the radius zero? Line to (x1,y1).
81
+ else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
82
+ this._append`L${this._x1 = x1},${this._y1 = y1}`;
83
+ }
84
+
85
+ // Otherwise, draw an arc!
86
+ else {
87
+ let x20 = x2 - x0,
88
+ y20 = y2 - y0,
89
+ l21_2 = x21 * x21 + y21 * y21,
90
+ l20_2 = x20 * x20 + y20 * y20,
91
+ l21 = Math.sqrt(l21_2),
92
+ l01 = Math.sqrt(l01_2),
93
+ l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
94
+ t01 = l / l01,
95
+ t21 = l / l21;
96
+
97
+ // If the start tangent is not coincident with (x0,y0), line to.
98
+ if (Math.abs(t01 - 1) > epsilon) {
99
+ this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
100
+ }
101
+ this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
102
+ }
103
+ }
104
+ arc(x, y, r, a0, a1, ccw) {
105
+ x = +x, y = +y, r = +r, ccw = !!ccw;
106
+
107
+ // Is the radius negative? Error.
108
+ if (r < 0) throw new Error(`negative radius: ${r}`);
109
+ let dx = r * Math.cos(a0),
110
+ dy = r * Math.sin(a0),
111
+ x0 = x + dx,
112
+ y0 = y + dy,
113
+ cw = 1 ^ ccw,
114
+ da = ccw ? a0 - a1 : a1 - a0;
115
+
116
+ // Is this path empty? Move to (x0,y0).
117
+ if (this._x1 === null) {
118
+ this._append`M${x0},${y0}`;
119
+ }
120
+
121
+ // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
122
+ else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
123
+ this._append`L${x0},${y0}`;
124
+ }
125
+
126
+ // Is this arc empty? We’re done.
127
+ if (!r) return;
128
+
129
+ // Does the angle go the wrong way? Flip the direction.
130
+ if (da < 0) da = da % tau + tau;
131
+
132
+ // Is this a complete circle? Draw two arcs to complete the circle.
133
+ if (da > tauEpsilon) {
134
+ this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
135
+ }
136
+
137
+ // Is this arc non-empty? Draw an arc!
138
+ else if (da > epsilon) {
139
+ this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;
140
+ }
141
+ }
142
+ rect(x, y, w, h) {
143
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;
144
+ }
145
+ toString() {
146
+ return this._;
147
+ }
148
+ }
149
+ exports.Path = Path;
150
+ function path() {
151
+ return new Path();
152
+ }
153
+
154
+ // Allow instanceof d3.path
155
+ path.prototype = Path.prototype;
156
+ function pathRound(digits = 3) {
157
+ return new Path(+digits);
158
+ }
@@ -0,0 +1,13 @@
1
+ Copyright 2010-2021 Mike Bostock
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose
4
+ with or without fee is hereby granted, provided that the above copyright notice
5
+ and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
9
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
11
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
12
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
13
+ THIS SOFTWARE.