@antv/g2 5.0.0-alpha.3 → 5.0.0-beta.1

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 (1480) hide show
  1. package/README.md +29 -27
  2. package/dist/g2-lite.min.js +2 -2
  3. package/dist/g2.min.js +2 -2
  4. package/esm/animation/fadeIn.d.ts +2 -2
  5. package/esm/animation/fadeOut.d.ts +2 -2
  6. package/esm/animation/growInX.d.ts +7 -0
  7. package/esm/animation/growInX.js +26 -0
  8. package/esm/animation/growInX.js.map +1 -0
  9. package/esm/animation/growInY.d.ts +7 -0
  10. package/esm/animation/growInY.js +26 -0
  11. package/esm/animation/growInY.js.map +1 -0
  12. package/esm/animation/index.d.ts +6 -0
  13. package/esm/animation/index.js +3 -0
  14. package/esm/animation/index.js.map +1 -1
  15. package/esm/animation/morphing.d.ts +4 -4
  16. package/esm/animation/morphing.js +49 -12
  17. package/esm/animation/morphing.js.map +1 -1
  18. package/esm/animation/pathIn.d.ts +7 -0
  19. package/esm/animation/pathIn.js +18 -0
  20. package/esm/animation/pathIn.js.map +1 -0
  21. package/esm/animation/scaleInX.d.ts +2 -2
  22. package/esm/animation/scaleInY.d.ts +2 -2
  23. package/esm/animation/scaleOutX.d.ts +2 -2
  24. package/esm/animation/scaleOutY.d.ts +2 -2
  25. package/esm/animation/types.d.ts +6 -0
  26. package/esm/animation/types.js +2 -0
  27. package/esm/animation/types.js.map +1 -0
  28. package/esm/animation/waveIn.d.ts +2 -2
  29. package/esm/animation/waveIn.js +28 -2
  30. package/esm/animation/waveIn.js.map +1 -1
  31. package/esm/animation/zoomIn.d.ts +2 -2
  32. package/esm/animation/zoomOut.d.ts +2 -2
  33. package/esm/api/chart.d.ts +8 -4
  34. package/esm/api/chart.js +19 -3
  35. package/esm/api/chart.js.map +1 -1
  36. package/esm/api/composition/facetCircle.d.ts +3 -6
  37. package/esm/api/composition/facetCircle.js +2 -5
  38. package/esm/api/composition/facetCircle.js.map +1 -1
  39. package/esm/api/composition/facetRect.d.ts +3 -8
  40. package/esm/api/composition/facetRect.js +2 -7
  41. package/esm/api/composition/facetRect.js.map +1 -1
  42. package/esm/api/composition/geoPath.d.ts +21 -0
  43. package/esm/api/composition/geoPath.js +30 -0
  44. package/esm/api/composition/geoPath.js.map +1 -0
  45. package/esm/api/composition/geoView.d.ts +21 -0
  46. package/esm/api/composition/geoView.js +29 -0
  47. package/esm/api/composition/geoView.js.map +1 -0
  48. package/esm/api/composition/index.d.ts +7 -1
  49. package/esm/api/composition/index.js +5 -1
  50. package/esm/api/composition/index.js.map +1 -1
  51. package/esm/api/composition/repeatMatrix.d.ts +3 -6
  52. package/esm/api/composition/repeatMatrix.js +2 -5
  53. package/esm/api/composition/repeatMatrix.js.map +1 -1
  54. package/esm/api/composition/spaceFlex.d.ts +1 -5
  55. package/esm/api/composition/spaceFlex.js +1 -8
  56. package/esm/api/composition/spaceFlex.js.map +1 -1
  57. package/esm/api/composition/spaceLayer.d.ts +1 -2
  58. package/esm/api/composition/spaceLayer.js +1 -5
  59. package/esm/api/composition/spaceLayer.js.map +1 -1
  60. package/esm/api/composition/timingKeyframe.d.ts +2 -7
  61. package/esm/api/composition/timingKeyframe.js +1 -8
  62. package/esm/api/composition/timingKeyframe.js.map +1 -1
  63. package/esm/api/composition/view.d.ts +7 -8
  64. package/esm/api/composition/view.js +6 -7
  65. package/esm/api/composition/view.js.map +1 -1
  66. package/esm/api/mark/index.d.ts +17 -1
  67. package/esm/api/mark/index.js +9 -1
  68. package/esm/api/mark/index.js.map +1 -1
  69. package/esm/api/mark/mark.d.ts +49 -1
  70. package/esm/api/mark/mark.js +74 -11
  71. package/esm/api/mark/mark.js.map +1 -1
  72. package/esm/api/mark/types.d.ts +4 -12
  73. package/esm/api/props.d.ts +1 -1
  74. package/esm/api/types.d.ts +7 -7
  75. package/esm/component/axis.d.ts +2 -2
  76. package/esm/component/axis.js +23 -25
  77. package/esm/component/axis.js.map +1 -1
  78. package/esm/component/axisX.d.ts +1 -1
  79. package/esm/component/axisY.d.ts +1 -1
  80. package/esm/component/legendCategory.d.ts +2 -2
  81. package/esm/component/legendCategory.js +2 -2
  82. package/esm/component/legendCategory.js.map +1 -1
  83. package/esm/component/legendContinuous.d.ts +1 -1
  84. package/esm/component/title.d.ts +1 -1
  85. package/esm/component/utils.d.ts +1 -1
  86. package/esm/composition/facetCircle.d.ts +1 -1
  87. package/esm/composition/facetCircle.js +2 -2
  88. package/esm/composition/facetCircle.js.map +1 -1
  89. package/esm/composition/facetRect.d.ts +2 -2
  90. package/esm/composition/facetRect.js +8 -10
  91. package/esm/composition/facetRect.js.map +1 -1
  92. package/esm/composition/mark.d.ts +1 -1
  93. package/esm/composition/mark.js +3 -3
  94. package/esm/composition/mark.js.map +1 -1
  95. package/esm/composition/repeatMatrix.d.ts +1 -1
  96. package/esm/composition/repeatMatrix.js +4 -4
  97. package/esm/composition/repeatMatrix.js.map +1 -1
  98. package/esm/composition/spaceFlex.d.ts +1 -1
  99. package/esm/composition/spaceLayer.d.ts +1 -1
  100. package/esm/composition/timingKeyframe.d.ts +1 -1
  101. package/esm/composition/timingKeyframe.js +7 -8
  102. package/esm/composition/timingKeyframe.js.map +1 -1
  103. package/esm/composition/utils.d.ts +1 -1
  104. package/esm/composition/view.d.ts +1 -1
  105. package/esm/coordinate/cartesian.d.ts +1 -1
  106. package/esm/coordinate/fisheye.d.ts +1 -1
  107. package/esm/coordinate/fisheyeX.d.ts +1 -1
  108. package/esm/coordinate/fisheyeY.d.ts +1 -1
  109. package/esm/coordinate/helix.d.ts +1 -1
  110. package/esm/coordinate/parallel.d.ts +1 -1
  111. package/esm/coordinate/polar.d.ts +1 -1
  112. package/esm/coordinate/radial.d.ts +1 -1
  113. package/esm/coordinate/reflect.d.ts +1 -1
  114. package/esm/coordinate/reflectX.d.ts +1 -1
  115. package/esm/coordinate/reflectY.d.ts +1 -1
  116. package/esm/coordinate/theta.d.ts +1 -1
  117. package/esm/coordinate/transpose.d.ts +1 -1
  118. package/esm/data/arc.d.ts +1 -1
  119. package/esm/data/cluster.d.ts +1 -1
  120. package/esm/data/custom.d.ts +1 -1
  121. package/esm/data/fetch.d.ts +1 -1
  122. package/esm/data/fetch.js.map +1 -1
  123. package/esm/data/filter.d.ts +9 -0
  124. package/esm/data/filter.js +13 -0
  125. package/esm/data/filter.js.map +1 -0
  126. package/esm/data/fold.d.ts +1 -1
  127. package/esm/data/index.d.ts +4 -2
  128. package/esm/data/index.js +2 -1
  129. package/esm/data/index.js.map +1 -1
  130. package/esm/data/inline.d.ts +1 -1
  131. package/esm/data/join.d.ts +7 -0
  132. package/esm/data/join.js +22 -0
  133. package/esm/data/join.js.map +1 -0
  134. package/esm/data/map.d.ts +1 -1
  135. package/esm/data/pick.d.ts +1 -1
  136. package/esm/data/rename.d.ts +1 -1
  137. package/esm/data/rename.js +2 -3
  138. package/esm/data/rename.js.map +1 -1
  139. package/esm/data/sankey.d.ts +1 -1
  140. package/esm/data/sortBy.d.ts +1 -1
  141. package/esm/data/subset.d.ts +1 -1
  142. package/esm/data/tree.d.ts +1 -1
  143. package/esm/data/utils/arc/types.d.ts +2 -2
  144. package/esm/data/utils/flow.d.ts +1 -1
  145. package/esm/data/wordCloud.d.ts +1 -1
  146. package/esm/encode/column.d.ts +1 -1
  147. package/esm/encode/constant.d.ts +1 -1
  148. package/esm/encode/field.d.ts +1 -1
  149. package/esm/encode/transform.d.ts +1 -1
  150. package/esm/geo/d3-projection.d.ts +1 -0
  151. package/esm/geo/d3-projection.js +2 -0
  152. package/esm/geo/d3-projection.js.map +1 -0
  153. package/esm/geo/geoPath.d.ts +7 -0
  154. package/esm/geo/geoPath.js +36 -0
  155. package/esm/geo/geoPath.js.map +1 -0
  156. package/esm/geo/geoView.d.ts +7 -0
  157. package/esm/geo/geoView.js +215 -0
  158. package/esm/geo/geoView.js.map +1 -0
  159. package/esm/geo/index.d.ts +9 -0
  160. package/esm/geo/index.js +8 -0
  161. package/esm/geo/index.js.map +1 -0
  162. package/esm/interaction/action/service/elementSelection.d.ts +1 -1
  163. package/esm/interaction/action/service/elementSelection.js +1 -1
  164. package/esm/interaction/action/service/elementSelection.js.map +1 -1
  165. package/esm/interaction/action/service/fisheyeFocus.d.ts +1 -1
  166. package/esm/interaction/action/service/legendItemSelection.d.ts +1 -1
  167. package/esm/interaction/action/service/recordCurrentPoint.d.ts +1 -1
  168. package/esm/interaction/action/service/recordPoint.d.ts +1 -1
  169. package/esm/interaction/action/service/recordRegion.d.ts +1 -1
  170. package/esm/interaction/action/service/recordState.d.ts +1 -1
  171. package/esm/interaction/action/service/recordTip.d.ts +1 -1
  172. package/esm/interaction/action/service/surfacePointSelection.d.ts +1 -1
  173. package/esm/interaction/action/service/triggerInfoSelection.d.ts +1 -1
  174. package/esm/interaction/action/transformer/activeElement.d.ts +1 -1
  175. package/esm/interaction/action/transformer/activeRegion.d.ts +1 -1
  176. package/esm/interaction/action/transformer/button.d.ts +1 -1
  177. package/esm/interaction/action/transformer/cursor.d.ts +1 -1
  178. package/esm/interaction/action/transformer/filter.d.ts +2 -2
  179. package/esm/interaction/action/transformer/filter.js +6 -4
  180. package/esm/interaction/action/transformer/filter.js.map +1 -1
  181. package/esm/interaction/action/transformer/filterElement.d.ts +1 -1
  182. package/esm/interaction/action/transformer/highlightElement.d.ts +1 -1
  183. package/esm/interaction/action/transformer/mask.d.ts +1 -1
  184. package/esm/interaction/action/transformer/move.d.ts +1 -1
  185. package/esm/interaction/action/transformer/plot.d.ts +1 -1
  186. package/esm/interaction/action/transformer/poptip.d.ts +1 -1
  187. package/esm/interaction/action/transformer/setItemState.d.ts +1 -1
  188. package/esm/interaction/action/transformer/tooltip.d.ts +1 -1
  189. package/esm/interaction/builtin/activeRegion.d.ts +1 -1
  190. package/esm/interaction/builtin/brush.d.ts +1 -1
  191. package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
  192. package/esm/interaction/builtin/brushVisible.d.ts +1 -1
  193. package/esm/interaction/builtin/elementActive.d.ts +1 -1
  194. package/esm/interaction/builtin/elementHighlight.d.ts +1 -1
  195. package/esm/interaction/builtin/elementHighlightByColor.d.ts +5 -3
  196. package/esm/interaction/builtin/elementHighlightByColor.js +1 -1
  197. package/esm/interaction/builtin/elementHighlightByColor.js.map +1 -1
  198. package/esm/interaction/builtin/elementHighlightByX.d.ts +5 -3
  199. package/esm/interaction/builtin/elementHighlightByX.js +1 -1
  200. package/esm/interaction/builtin/elementHighlightByX.js.map +1 -1
  201. package/esm/interaction/builtin/elementListHighlight.d.ts +1 -1
  202. package/esm/interaction/builtin/elementSelected.d.ts +1 -1
  203. package/esm/interaction/builtin/ellipsisText.d.ts +1 -1
  204. package/esm/interaction/builtin/fisheye.d.ts +1 -1
  205. package/esm/interaction/builtin/legendActive.d.ts +1 -1
  206. package/esm/interaction/builtin/legendHighlight.d.ts +1 -1
  207. package/esm/interaction/builtin/tooltip.d.ts +9 -5
  208. package/esm/interaction/index.d.ts +4 -3
  209. package/esm/interaction/index.js +4 -3
  210. package/esm/interaction/index.js.map +1 -1
  211. package/esm/interaction/interactor/mousePosition.d.ts +1 -1
  212. package/esm/interaction/interactor/touchPosition.d.ts +1 -1
  213. package/esm/interaction/native/chartIndex.js +6 -2
  214. package/esm/interaction/native/chartIndex.js.map +1 -1
  215. package/esm/interaction/native/elementHighlight.d.ts +10 -0
  216. package/esm/interaction/native/{elementActive.js → elementHighlight.js} +9 -9
  217. package/esm/interaction/native/elementHighlight.js.map +1 -0
  218. package/esm/interaction/native/elementHighlightByColor.d.ts +4 -0
  219. package/esm/interaction/native/elementHighlightByColor.js +12 -0
  220. package/esm/interaction/native/elementHighlightByColor.js.map +1 -0
  221. package/esm/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
  222. package/esm/interaction/native/elementHighlightByX.js +13 -0
  223. package/esm/interaction/native/elementHighlightByX.js.map +1 -0
  224. package/esm/interaction/native/elementSelect.js +2 -2
  225. package/esm/interaction/native/elementSelect.js.map +1 -1
  226. package/esm/interaction/native/elementSelectByColor.js +2 -2
  227. package/esm/interaction/native/elementSelectByColor.js.map +1 -1
  228. package/esm/interaction/native/elementSelectByX.js +2 -2
  229. package/esm/interaction/native/elementSelectByX.js.map +1 -1
  230. package/esm/interaction/native/fisheye.js +8 -5
  231. package/esm/interaction/native/fisheye.js.map +1 -1
  232. package/esm/interaction/native/tooltip.d.ts +11 -0
  233. package/esm/interaction/native/tooltip.js +279 -0
  234. package/esm/interaction/native/tooltip.js.map +1 -0
  235. package/esm/interaction/native/utils.d.ts +1 -1
  236. package/esm/interaction/native/utils.js +2 -2
  237. package/esm/interaction/native/utils.js.map +1 -1
  238. package/esm/interaction/types.d.ts +16 -16
  239. package/esm/label-transform/dodgeY.d.ts +1 -1
  240. package/esm/label-transform/dodgeY.js +9 -1
  241. package/esm/label-transform/dodgeY.js.map +1 -1
  242. package/esm/label-transform/hideOverlap.d.ts +1 -1
  243. package/esm/label-transform/hideOverlap.js +14 -4
  244. package/esm/label-transform/hideOverlap.js.map +1 -1
  245. package/esm/label-transform/index.d.ts +4 -0
  246. package/esm/label-transform/index.js +2 -0
  247. package/esm/label-transform/index.js.map +1 -1
  248. package/esm/label-transform/spider.d.ts +7 -0
  249. package/esm/label-transform/spider.js +30 -0
  250. package/esm/label-transform/spider.js.map +1 -0
  251. package/esm/label-transform/surround.d.ts +7 -0
  252. package/esm/label-transform/surround.js +30 -0
  253. package/esm/label-transform/surround.js.map +1 -0
  254. package/esm/mark/area.d.ts +1 -1
  255. package/esm/mark/area.js +9 -8
  256. package/esm/mark/area.js.map +1 -1
  257. package/esm/mark/box.d.ts +1 -1
  258. package/esm/mark/box.js +7 -9
  259. package/esm/mark/box.js.map +1 -1
  260. package/esm/mark/boxplot.d.ts +4 -0
  261. package/esm/mark/boxplot.js +104 -0
  262. package/esm/mark/boxplot.js.map +1 -0
  263. package/esm/mark/cell.d.ts +1 -1
  264. package/esm/mark/cell.js +4 -8
  265. package/esm/mark/cell.js.map +1 -1
  266. package/esm/mark/connector.d.ts +1 -1
  267. package/esm/mark/connector.js +2 -2
  268. package/esm/mark/connector.js.map +1 -1
  269. package/esm/mark/forceGraph.d.ts +4 -0
  270. package/esm/mark/forceGraph.js +95 -0
  271. package/esm/mark/forceGraph.js.map +1 -0
  272. package/esm/mark/image.d.ts +1 -1
  273. package/esm/mark/image.js +12 -9
  274. package/esm/mark/image.js.map +1 -1
  275. package/esm/mark/index.d.ts +16 -0
  276. package/esm/mark/index.js +9 -0
  277. package/esm/mark/index.js.map +1 -1
  278. package/esm/mark/interval.d.ts +1 -1
  279. package/esm/mark/interval.js +7 -8
  280. package/esm/mark/interval.js.map +1 -1
  281. package/esm/mark/line.d.ts +1 -1
  282. package/esm/mark/line.js +13 -9
  283. package/esm/mark/line.js.map +1 -1
  284. package/esm/mark/lineX.d.ts +1 -1
  285. package/esm/mark/lineX.js +5 -2
  286. package/esm/mark/lineX.js.map +1 -1
  287. package/esm/mark/lineY.d.ts +1 -1
  288. package/esm/mark/lineY.js +5 -2
  289. package/esm/mark/lineY.js.map +1 -1
  290. package/esm/mark/link.d.ts +1 -1
  291. package/esm/mark/link.js +4 -8
  292. package/esm/mark/link.js.map +1 -1
  293. package/esm/mark/pack.d.ts +4 -0
  294. package/esm/mark/pack.js +81 -0
  295. package/esm/mark/pack.js.map +1 -0
  296. package/esm/mark/path.d.ts +7 -0
  297. package/esm/mark/path.js +24 -0
  298. package/esm/mark/path.js.map +1 -0
  299. package/esm/mark/point.d.ts +1 -1
  300. package/esm/mark/point.js +31 -28
  301. package/esm/mark/point.js.map +1 -1
  302. package/esm/mark/polygon.d.ts +1 -1
  303. package/esm/mark/polygon.js +4 -8
  304. package/esm/mark/polygon.js.map +1 -1
  305. package/esm/mark/range.d.ts +1 -1
  306. package/esm/mark/range.js +2 -2
  307. package/esm/mark/range.js.map +1 -1
  308. package/esm/mark/rangeX.d.ts +1 -1
  309. package/esm/mark/rangeX.js +5 -2
  310. package/esm/mark/rangeX.js.map +1 -1
  311. package/esm/mark/rangeY.d.ts +1 -1
  312. package/esm/mark/rangeY.js +5 -2
  313. package/esm/mark/rangeY.js.map +1 -1
  314. package/esm/mark/rect.d.ts +1 -1
  315. package/esm/mark/rect.js +7 -8
  316. package/esm/mark/rect.js.map +1 -1
  317. package/esm/mark/sankey.d.ts +8 -0
  318. package/esm/mark/sankey.js +98 -0
  319. package/esm/mark/sankey.js.map +1 -0
  320. package/esm/mark/shape.d.ts +7 -0
  321. package/esm/mark/shape.js +33 -0
  322. package/esm/mark/shape.js.map +1 -0
  323. package/esm/mark/text.d.ts +1 -1
  324. package/esm/mark/text.js +16 -11
  325. package/esm/mark/text.js.map +1 -1
  326. package/esm/mark/tree.d.ts +4 -0
  327. package/esm/mark/tree.js +59 -0
  328. package/esm/mark/tree.js.map +1 -0
  329. package/esm/mark/treemap.d.ts +4 -0
  330. package/esm/mark/treemap.js +123 -0
  331. package/esm/mark/treemap.js.map +1 -0
  332. package/esm/mark/utils.d.ts +51 -3
  333. package/esm/mark/utils.js +84 -12
  334. package/esm/mark/utils.js.map +1 -1
  335. package/esm/mark/vector.d.ts +1 -1
  336. package/esm/mark/vector.js +4 -8
  337. package/esm/mark/vector.js.map +1 -1
  338. package/esm/mark/wordCloud.d.ts +4 -0
  339. package/esm/mark/wordCloud.js +65 -0
  340. package/esm/mark/wordCloud.js.map +1 -0
  341. package/esm/palette/category10.d.ts +1 -1
  342. package/esm/palette/category20.d.ts +1 -1
  343. package/esm/palette/divergingGreenRed.d.ts +1 -1
  344. package/esm/palette/divergingGreenYellow.d.ts +1 -1
  345. package/esm/palette/divergingRedBlue.d.ts +1 -1
  346. package/esm/palette/divergingRedPurple.d.ts +1 -1
  347. package/esm/palette/sequentialBlue.d.ts +1 -1
  348. package/esm/palette/sequentialDarkBlue.d.ts +1 -1
  349. package/esm/palette/sequentialDarkGreen.d.ts +1 -1
  350. package/esm/palette/sequentialGreen.d.ts +1 -1
  351. package/esm/palette/sequentialGreenBlue.d.ts +1 -1
  352. package/esm/palette/sequentialGrey.d.ts +1 -1
  353. package/esm/palette/sequentialOrange.d.ts +1 -1
  354. package/esm/palette/sequentialPink.d.ts +1 -1
  355. package/esm/palette/sequentialPinkPurple.d.ts +1 -1
  356. package/esm/palette/sequentialPurple.d.ts +1 -1
  357. package/esm/palette/sequentialRed.d.ts +1 -1
  358. package/esm/palette/sequentialYellow.d.ts +1 -1
  359. package/esm/palette/sequentialYellowGreen.d.ts +1 -1
  360. package/esm/palette/sequentialYellowOrange.d.ts +1 -1
  361. package/esm/runtime/component.d.ts +1 -1
  362. package/esm/runtime/component.js +18 -29
  363. package/esm/runtime/component.js.map +1 -1
  364. package/esm/runtime/coordinate.d.ts +8 -8
  365. package/esm/runtime/coordinate.js +21 -21
  366. package/esm/runtime/coordinate.js.map +1 -1
  367. package/esm/runtime/mark.d.ts +3 -3
  368. package/esm/runtime/mark.js +37 -41
  369. package/esm/runtime/mark.js.map +1 -1
  370. package/esm/runtime/plot.d.ts +2 -2
  371. package/esm/runtime/plot.js +153 -42
  372. package/esm/runtime/plot.js.map +1 -1
  373. package/esm/runtime/render.d.ts +0 -7
  374. package/esm/runtime/render.js +6 -5
  375. package/esm/runtime/render.js.map +1 -1
  376. package/esm/runtime/scale.d.ts +4 -4
  377. package/esm/runtime/scale.js +98 -175
  378. package/esm/runtime/scale.js.map +1 -1
  379. package/esm/runtime/transform.d.ts +1 -0
  380. package/esm/runtime/transform.js +18 -2
  381. package/esm/runtime/transform.js.map +1 -1
  382. package/esm/runtime/types/common.d.ts +37 -21
  383. package/esm/runtime/types/component.d.ts +35 -35
  384. package/esm/runtime/types/data.d.ts +4 -4
  385. package/esm/runtime/types/encode.d.ts +9 -9
  386. package/esm/runtime/types/mark.d.ts +14 -6
  387. package/esm/runtime/types/options.d.ts +32 -34
  388. package/esm/runtime/types/theme.d.ts +32 -12
  389. package/esm/runtime/types/transform.d.ts +7 -7
  390. package/esm/scale/band.d.ts +1 -1
  391. package/esm/scale/identity.d.ts +1 -1
  392. package/esm/scale/linear.d.ts +1 -1
  393. package/esm/scale/log.d.ts +1 -1
  394. package/esm/scale/ordinal.d.ts +1 -1
  395. package/esm/scale/point.d.ts +1 -1
  396. package/esm/scale/pow.d.ts +1 -1
  397. package/esm/scale/quantile.d.ts +1 -1
  398. package/esm/scale/quantize.d.ts +1 -1
  399. package/esm/scale/sequential.d.ts +1 -1
  400. package/esm/scale/sqrt.d.ts +1 -1
  401. package/esm/scale/threshold.d.ts +1 -1
  402. package/esm/scale/time.d.ts +1 -1
  403. package/esm/shape/area/area.d.ts +1 -1
  404. package/esm/shape/area/curve.d.ts +1 -1
  405. package/esm/shape/area/curve.js +2 -0
  406. package/esm/shape/area/curve.js.map +1 -1
  407. package/esm/shape/area/smooth.d.ts +1 -1
  408. package/esm/shape/area/step.d.ts +1 -1
  409. package/esm/shape/box/box.d.ts +1 -1
  410. package/esm/shape/box/box.js +3 -1
  411. package/esm/shape/box/box.js.map +1 -1
  412. package/esm/shape/connector/connector.d.ts +5 -11
  413. package/esm/shape/connector/connector.js +50 -64
  414. package/esm/shape/connector/connector.js.map +1 -1
  415. package/esm/shape/createElement.d.ts +1 -1
  416. package/esm/shape/image/image.d.ts +1 -1
  417. package/esm/shape/image/image.js +5 -2
  418. package/esm/shape/image/image.js.map +1 -1
  419. package/esm/shape/index.d.ts +4 -0
  420. package/esm/shape/index.js +3 -0
  421. package/esm/shape/index.js.map +1 -1
  422. package/esm/shape/interval/color.d.ts +1 -1
  423. package/esm/shape/interval/color.js +14 -10
  424. package/esm/shape/interval/color.js.map +1 -1
  425. package/esm/shape/interval/funnel.d.ts +1 -1
  426. package/esm/shape/interval/funnel.js +1 -3
  427. package/esm/shape/interval/funnel.js.map +1 -1
  428. package/esm/shape/interval/hollow.d.ts +1 -1
  429. package/esm/shape/interval/pyramid.d.ts +1 -1
  430. package/esm/shape/interval/pyramid.js +2 -3
  431. package/esm/shape/interval/pyramid.js.map +1 -1
  432. package/esm/shape/interval/rect.d.ts +1 -1
  433. package/esm/shape/label/label.d.ts +1 -1
  434. package/esm/shape/label/label.js +13 -5
  435. package/esm/shape/label/label.js.map +1 -1
  436. package/esm/shape/label/position.d.ts +1 -1
  437. package/esm/shape/label/position.js +77 -36
  438. package/esm/shape/label/position.js.map +1 -1
  439. package/esm/shape/line/curve.d.ts +1 -1
  440. package/esm/shape/line/curve.js +8 -2
  441. package/esm/shape/line/curve.js.map +1 -1
  442. package/esm/shape/line/hv.d.ts +1 -1
  443. package/esm/shape/line/hvh.d.ts +1 -1
  444. package/esm/shape/line/line.d.ts +1 -1
  445. package/esm/shape/line/smooth.d.ts +1 -1
  446. package/esm/shape/line/vh.d.ts +1 -1
  447. package/esm/shape/lineXY/line.d.ts +1 -1
  448. package/esm/shape/lineXY/line.js +2 -0
  449. package/esm/shape/lineXY/line.js.map +1 -1
  450. package/esm/shape/link/arc.d.ts +1 -1
  451. package/esm/shape/link/arc.js +2 -0
  452. package/esm/shape/link/arc.js.map +1 -1
  453. package/esm/shape/link/link.d.ts +1 -7
  454. package/esm/shape/link/link.js +5 -3
  455. package/esm/shape/link/link.js.map +1 -1
  456. package/esm/shape/link/smooth.d.ts +1 -1
  457. package/esm/shape/link/smooth.js +2 -0
  458. package/esm/shape/link/smooth.js.map +1 -1
  459. package/esm/shape/link/vhv.d.ts +1 -1
  460. package/esm/shape/link/vhv.js +2 -0
  461. package/esm/shape/link/vhv.js.map +1 -1
  462. package/esm/shape/path/color.d.ts +9 -0
  463. package/esm/shape/path/color.js +37 -0
  464. package/esm/shape/path/color.js.map +1 -0
  465. package/esm/shape/path/hollow.d.ts +8 -0
  466. package/esm/shape/path/hollow.js +13 -0
  467. package/esm/shape/path/hollow.js.map +1 -0
  468. package/esm/shape/path/path.d.ts +8 -0
  469. package/esm/shape/path/path.js +13 -0
  470. package/esm/shape/path/path.js.map +1 -0
  471. package/esm/shape/point/bowtie.d.ts +1 -1
  472. package/esm/shape/point/color.d.ts +1 -1
  473. package/esm/shape/point/color.js +5 -2
  474. package/esm/shape/point/color.js.map +1 -1
  475. package/esm/shape/point/cross.d.ts +1 -1
  476. package/esm/shape/point/diamond.d.ts +1 -1
  477. package/esm/shape/point/hexagon.d.ts +1 -1
  478. package/esm/shape/point/hollow.d.ts +1 -1
  479. package/esm/shape/point/hollowBowtie.d.ts +1 -1
  480. package/esm/shape/point/hollowDiamond.d.ts +1 -1
  481. package/esm/shape/point/hollowHexagon.d.ts +1 -1
  482. package/esm/shape/point/hollowSquare.d.ts +1 -1
  483. package/esm/shape/point/hollowTriangle.d.ts +1 -1
  484. package/esm/shape/point/hollowTriangleDown.d.ts +1 -1
  485. package/esm/shape/point/hyphen.d.ts +1 -1
  486. package/esm/shape/point/line.d.ts +1 -1
  487. package/esm/shape/point/plus.d.ts +1 -1
  488. package/esm/shape/point/point.d.ts +1 -1
  489. package/esm/shape/point/square.d.ts +1 -1
  490. package/esm/shape/point/tick.d.ts +1 -1
  491. package/esm/shape/point/triangle.d.ts +1 -1
  492. package/esm/shape/point/triangleDown.d.ts +1 -1
  493. package/esm/shape/polygon/polygon.d.ts +1 -1
  494. package/esm/shape/polygon/polygon.js +2 -0
  495. package/esm/shape/polygon/polygon.js.map +1 -1
  496. package/esm/shape/polygon/ribbon.d.ts +1 -1
  497. package/esm/shape/polygon/ribbon.js +2 -0
  498. package/esm/shape/polygon/ribbon.js.map +1 -1
  499. package/esm/shape/shape/shape.d.ts +6 -0
  500. package/esm/shape/shape/shape.js +27 -0
  501. package/esm/shape/shape/shape.js.map +1 -0
  502. package/esm/shape/text/advance.d.ts +2 -0
  503. package/esm/shape/text/advance.js +122 -0
  504. package/esm/shape/text/advance.js.map +1 -0
  505. package/esm/shape/text/badge.d.ts +5 -9
  506. package/esm/shape/text/badge.js +31 -50
  507. package/esm/shape/text/badge.js.map +1 -1
  508. package/esm/shape/text/text.d.ts +1 -15
  509. package/esm/shape/text/text.js +15 -144
  510. package/esm/shape/text/text.js.map +1 -1
  511. package/esm/shape/utils.d.ts +21 -21
  512. package/esm/shape/utils.js +31 -12
  513. package/esm/shape/utils.js.map +1 -1
  514. package/esm/shape/vector/vector.d.ts +1 -7
  515. package/esm/shape/vector/vector.js +4 -2
  516. package/esm/shape/vector/vector.js.map +1 -1
  517. package/esm/spec/action.d.ts +27 -27
  518. package/esm/spec/animate.d.ts +1 -8
  519. package/esm/spec/composition.d.ts +40 -17
  520. package/esm/spec/coordinate.d.ts +17 -17
  521. package/esm/spec/data.d.ts +47 -25
  522. package/esm/spec/encode.d.ts +7 -7
  523. package/esm/spec/geometry.d.ts +79 -39
  524. package/esm/spec/index.d.ts +1 -1
  525. package/esm/spec/interaction.d.ts +28 -26
  526. package/esm/spec/labelTransform.d.ts +10 -3
  527. package/esm/spec/palette.d.ts +23 -23
  528. package/esm/spec/scale.d.ts +17 -17
  529. package/esm/spec/theme.d.ts +5 -5
  530. package/esm/spec/title.d.ts +1 -1
  531. package/esm/spec/transform.d.ts +44 -26
  532. package/esm/stdlib/index.js +12 -216
  533. package/esm/stdlib/index.js.map +1 -1
  534. package/esm/theme/dark.d.ts +1 -1
  535. package/esm/theme/dark.js +157 -57
  536. package/esm/theme/dark.js.map +1 -1
  537. package/esm/theme/light.d.ts +1 -1
  538. package/esm/theme/light.js +155 -52
  539. package/esm/theme/light.js.map +1 -1
  540. package/esm/transform/Select.d.ts +1 -1
  541. package/esm/transform/SelectX.d.ts +1 -1
  542. package/esm/transform/SelectY.d.ts +1 -1
  543. package/esm/transform/bin.d.ts +12 -0
  544. package/esm/transform/bin.js +82 -0
  545. package/esm/transform/bin.js.map +1 -0
  546. package/esm/transform/binX.d.ts +4 -0
  547. package/esm/transform/binX.js +7 -0
  548. package/esm/transform/binX.js.map +1 -0
  549. package/esm/transform/diffY.d.ts +1 -1
  550. package/esm/transform/dodgeX.d.ts +1 -1
  551. package/esm/transform/flexX.d.ts +1 -1
  552. package/esm/transform/group.d.ts +2 -2
  553. package/esm/transform/group.js +4 -82
  554. package/esm/transform/group.js.map +1 -1
  555. package/esm/transform/groupColor.d.ts +1 -1
  556. package/esm/transform/groupColor.js +1 -1
  557. package/esm/transform/groupColor.js.map +1 -1
  558. package/esm/transform/groupN.d.ts +9 -0
  559. package/esm/transform/groupN.js +99 -0
  560. package/esm/transform/groupN.js.map +1 -0
  561. package/esm/transform/groupX.d.ts +1 -1
  562. package/esm/transform/groupX.js +1 -1
  563. package/esm/transform/groupX.js.map +1 -1
  564. package/esm/transform/groupY.d.ts +1 -1
  565. package/esm/transform/groupY.js +1 -1
  566. package/esm/transform/groupY.js.map +1 -1
  567. package/esm/transform/index.d.ts +16 -6
  568. package/esm/transform/index.js +8 -3
  569. package/esm/transform/index.js.map +1 -1
  570. package/esm/transform/jitter.d.ts +1 -1
  571. package/esm/transform/jitterX.d.ts +1 -1
  572. package/esm/transform/maybeFunctionAttribute.d.ts +6 -0
  573. package/esm/transform/maybeFunctionAttribute.js +19 -0
  574. package/esm/transform/maybeFunctionAttribute.js.map +1 -0
  575. package/esm/transform/maybeGradient.d.ts +7 -0
  576. package/esm/transform/maybeGradient.js +24 -0
  577. package/esm/transform/maybeGradient.js.map +1 -0
  578. package/esm/transform/maybeIdentityX.d.ts +1 -1
  579. package/esm/transform/maybeIdentityY.d.ts +1 -1
  580. package/esm/transform/maybeKey.d.ts +1 -1
  581. package/esm/transform/maybeSeries.d.ts +1 -1
  582. package/esm/transform/maybeSize.d.ts +1 -1
  583. package/esm/transform/maybeStackY.d.ts +1 -1
  584. package/esm/transform/maybeTitle.d.ts +8 -0
  585. package/esm/transform/{maybeTitleX.js → maybeTitle.js} +6 -5
  586. package/esm/transform/maybeTitle.js.map +1 -0
  587. package/esm/transform/maybeTooltip.d.ts +2 -2
  588. package/esm/transform/maybeTooltip.js +7 -5
  589. package/esm/transform/maybeTooltip.js.map +1 -1
  590. package/esm/transform/maybeTuple.d.ts +7 -0
  591. package/esm/transform/maybeTuple.js +19 -0
  592. package/esm/transform/maybeTuple.js.map +1 -0
  593. package/esm/transform/maybeTupleX.d.ts +1 -1
  594. package/esm/transform/maybeTupleX.js +2 -2
  595. package/esm/transform/maybeTupleX.js.map +1 -1
  596. package/esm/transform/maybeTupleY.d.ts +1 -1
  597. package/esm/transform/maybeTupleY.js +2 -2
  598. package/esm/transform/maybeTupleY.js.map +1 -1
  599. package/esm/transform/maybeVisualPosition.d.ts +7 -0
  600. package/esm/transform/maybeVisualPosition.js +45 -0
  601. package/esm/transform/maybeVisualPosition.js.map +1 -0
  602. package/esm/transform/maybeZeroPadding.d.ts +1 -1
  603. package/esm/transform/maybeZeroX.d.ts +1 -1
  604. package/esm/transform/maybeZeroY.d.ts +1 -1
  605. package/esm/transform/maybeZeroY1.d.ts +1 -1
  606. package/esm/transform/normalizeY.d.ts +1 -1
  607. package/esm/transform/pack.d.ts +1 -1
  608. package/esm/transform/sort.d.ts +1 -1
  609. package/esm/transform/sortColor.d.ts +1 -1
  610. package/esm/transform/sortX.d.ts +1 -1
  611. package/esm/transform/sortY.d.ts +1 -1
  612. package/esm/transform/stackEnter.d.ts +2 -1
  613. package/esm/transform/stackEnter.js +15 -5
  614. package/esm/transform/stackEnter.js.map +1 -1
  615. package/esm/transform/stackY.d.ts +1 -1
  616. package/esm/transform/stackY.js +25 -4
  617. package/esm/transform/stackY.js.map +1 -1
  618. package/esm/transform/symmetryY.d.ts +1 -1
  619. package/esm/transform/utils/helper.d.ts +1 -0
  620. package/esm/transform/utils/helper.js +9 -1
  621. package/esm/transform/utils/helper.js.map +1 -1
  622. package/esm/transform/utils/order.d.ts +3 -3
  623. package/esm/transform/utils/order.js +2 -0
  624. package/esm/transform/utils/order.js.map +1 -1
  625. package/esm/utils/coordinate.js +3 -1
  626. package/esm/utils/coordinate.js.map +1 -1
  627. package/esm/utils/helper.d.ts +5 -2
  628. package/esm/utils/helper.js +11 -3
  629. package/esm/utils/helper.js.map +1 -1
  630. package/esm/utils/selection.d.ts +4 -4
  631. package/esm/utils/selection.js +3 -1
  632. package/esm/utils/selection.js.map +1 -1
  633. package/esm/utils/size.d.ts +6 -1
  634. package/esm/utils/size.js +22 -1
  635. package/esm/utils/size.js.map +1 -1
  636. package/esm/utils/vector.d.ts +1 -1
  637. package/lib/animation/fadeIn.d.ts +2 -2
  638. package/lib/animation/fadeOut.d.ts +2 -2
  639. package/lib/animation/growInX.d.ts +7 -0
  640. package/lib/animation/growInX.js +30 -0
  641. package/lib/animation/growInX.js.map +1 -0
  642. package/lib/animation/growInY.d.ts +7 -0
  643. package/lib/animation/growInY.js +30 -0
  644. package/lib/animation/growInY.js.map +1 -0
  645. package/lib/animation/index.d.ts +6 -0
  646. package/lib/animation/index.js +7 -1
  647. package/lib/animation/index.js.map +1 -1
  648. package/lib/animation/morphing.d.ts +4 -4
  649. package/lib/animation/morphing.js +49 -12
  650. package/lib/animation/morphing.js.map +1 -1
  651. package/lib/animation/pathIn.d.ts +7 -0
  652. package/lib/animation/pathIn.js +22 -0
  653. package/lib/animation/pathIn.js.map +1 -0
  654. package/lib/animation/scaleInX.d.ts +2 -2
  655. package/lib/animation/scaleInY.d.ts +2 -2
  656. package/lib/animation/scaleOutX.d.ts +2 -2
  657. package/lib/animation/scaleOutY.d.ts +2 -2
  658. package/lib/animation/types.d.ts +6 -0
  659. package/lib/animation/types.js +3 -0
  660. package/lib/animation/types.js.map +1 -0
  661. package/lib/animation/waveIn.d.ts +2 -2
  662. package/lib/animation/waveIn.js +28 -2
  663. package/lib/animation/waveIn.js.map +1 -1
  664. package/lib/animation/zoomIn.d.ts +2 -2
  665. package/lib/animation/zoomOut.d.ts +2 -2
  666. package/lib/api/chart.d.ts +8 -4
  667. package/lib/api/chart.js +19 -3
  668. package/lib/api/chart.js.map +1 -1
  669. package/lib/api/composition/facetCircle.d.ts +3 -6
  670. package/lib/api/composition/facetCircle.js +2 -5
  671. package/lib/api/composition/facetCircle.js.map +1 -1
  672. package/lib/api/composition/facetRect.d.ts +3 -8
  673. package/lib/api/composition/facetRect.js +2 -7
  674. package/lib/api/composition/facetRect.js.map +1 -1
  675. package/lib/api/composition/geoPath.d.ts +21 -0
  676. package/lib/api/composition/geoPath.js +33 -0
  677. package/lib/api/composition/geoPath.js.map +1 -0
  678. package/lib/api/composition/geoView.d.ts +21 -0
  679. package/lib/api/composition/geoView.js +32 -0
  680. package/lib/api/composition/geoView.js.map +1 -0
  681. package/lib/api/composition/index.d.ts +7 -1
  682. package/lib/api/composition/index.js +7 -1
  683. package/lib/api/composition/index.js.map +1 -1
  684. package/lib/api/composition/repeatMatrix.d.ts +3 -6
  685. package/lib/api/composition/repeatMatrix.js +2 -5
  686. package/lib/api/composition/repeatMatrix.js.map +1 -1
  687. package/lib/api/composition/spaceFlex.d.ts +1 -5
  688. package/lib/api/composition/spaceFlex.js +1 -8
  689. package/lib/api/composition/spaceFlex.js.map +1 -1
  690. package/lib/api/composition/spaceLayer.d.ts +1 -2
  691. package/lib/api/composition/spaceLayer.js +1 -5
  692. package/lib/api/composition/spaceLayer.js.map +1 -1
  693. package/lib/api/composition/timingKeyframe.d.ts +2 -7
  694. package/lib/api/composition/timingKeyframe.js +1 -8
  695. package/lib/api/composition/timingKeyframe.js.map +1 -1
  696. package/lib/api/composition/view.d.ts +7 -8
  697. package/lib/api/composition/view.js +6 -7
  698. package/lib/api/composition/view.js.map +1 -1
  699. package/lib/api/mark/index.d.ts +17 -1
  700. package/lib/api/mark/index.js +8 -0
  701. package/lib/api/mark/index.js.map +1 -1
  702. package/lib/api/mark/mark.d.ts +49 -1
  703. package/lib/api/mark/mark.js +75 -12
  704. package/lib/api/mark/mark.js.map +1 -1
  705. package/lib/api/mark/types.d.ts +4 -12
  706. package/lib/api/props.d.ts +1 -1
  707. package/lib/api/types.d.ts +7 -7
  708. package/lib/component/axis.d.ts +2 -2
  709. package/lib/component/axis.js +23 -25
  710. package/lib/component/axis.js.map +1 -1
  711. package/lib/component/axisX.d.ts +1 -1
  712. package/lib/component/axisY.d.ts +1 -1
  713. package/lib/component/legendCategory.d.ts +2 -2
  714. package/lib/component/legendCategory.js +2 -2
  715. package/lib/component/legendCategory.js.map +1 -1
  716. package/lib/component/legendContinuous.d.ts +1 -1
  717. package/lib/component/title.d.ts +1 -1
  718. package/lib/component/utils.d.ts +1 -1
  719. package/lib/composition/facetCircle.d.ts +1 -1
  720. package/lib/composition/facetCircle.js +2 -2
  721. package/lib/composition/facetCircle.js.map +1 -1
  722. package/lib/composition/facetRect.d.ts +2 -2
  723. package/lib/composition/facetRect.js +8 -10
  724. package/lib/composition/facetRect.js.map +1 -1
  725. package/lib/composition/mark.d.ts +1 -1
  726. package/lib/composition/mark.js +3 -3
  727. package/lib/composition/mark.js.map +1 -1
  728. package/lib/composition/repeatMatrix.d.ts +1 -1
  729. package/lib/composition/repeatMatrix.js +4 -4
  730. package/lib/composition/repeatMatrix.js.map +1 -1
  731. package/lib/composition/spaceFlex.d.ts +1 -1
  732. package/lib/composition/spaceLayer.d.ts +1 -1
  733. package/lib/composition/timingKeyframe.d.ts +1 -1
  734. package/lib/composition/timingKeyframe.js +7 -8
  735. package/lib/composition/timingKeyframe.js.map +1 -1
  736. package/lib/composition/utils.d.ts +1 -1
  737. package/lib/composition/view.d.ts +1 -1
  738. package/lib/coordinate/cartesian.d.ts +1 -1
  739. package/lib/coordinate/fisheye.d.ts +1 -1
  740. package/lib/coordinate/fisheyeX.d.ts +1 -1
  741. package/lib/coordinate/fisheyeY.d.ts +1 -1
  742. package/lib/coordinate/helix.d.ts +1 -1
  743. package/lib/coordinate/parallel.d.ts +1 -1
  744. package/lib/coordinate/polar.d.ts +1 -1
  745. package/lib/coordinate/radial.d.ts +1 -1
  746. package/lib/coordinate/reflect.d.ts +1 -1
  747. package/lib/coordinate/reflectX.d.ts +1 -1
  748. package/lib/coordinate/reflectY.d.ts +1 -1
  749. package/lib/coordinate/theta.d.ts +1 -1
  750. package/lib/coordinate/transpose.d.ts +1 -1
  751. package/lib/data/arc.d.ts +1 -1
  752. package/lib/data/cluster.d.ts +1 -1
  753. package/lib/data/custom.d.ts +1 -1
  754. package/lib/data/fetch.d.ts +1 -1
  755. package/lib/data/fetch.js.map +1 -1
  756. package/lib/data/filter.d.ts +9 -0
  757. package/lib/data/filter.js +18 -0
  758. package/lib/data/filter.js.map +1 -0
  759. package/lib/data/fold.d.ts +1 -1
  760. package/lib/data/index.d.ts +4 -2
  761. package/lib/data/index.js +5 -3
  762. package/lib/data/index.js.map +1 -1
  763. package/lib/data/inline.d.ts +1 -1
  764. package/lib/data/join.d.ts +7 -0
  765. package/lib/data/join.js +26 -0
  766. package/lib/data/join.js.map +1 -0
  767. package/lib/data/map.d.ts +1 -1
  768. package/lib/data/pick.d.ts +1 -1
  769. package/lib/data/rename.d.ts +1 -1
  770. package/lib/data/rename.js +2 -3
  771. package/lib/data/rename.js.map +1 -1
  772. package/lib/data/sankey.d.ts +1 -1
  773. package/lib/data/sortBy.d.ts +1 -1
  774. package/lib/data/subset.d.ts +1 -1
  775. package/lib/data/tree.d.ts +1 -1
  776. package/lib/data/utils/arc/types.d.ts +2 -2
  777. package/lib/data/utils/flow.d.ts +1 -1
  778. package/lib/data/wordCloud.d.ts +1 -1
  779. package/lib/encode/column.d.ts +1 -1
  780. package/lib/encode/constant.d.ts +1 -1
  781. package/lib/encode/field.d.ts +1 -1
  782. package/lib/encode/transform.d.ts +1 -1
  783. package/lib/geo/d3-projection.d.ts +1 -0
  784. package/lib/geo/d3-projection.js +36 -0
  785. package/lib/geo/d3-projection.js.map +1 -0
  786. package/lib/geo/geoPath.d.ts +7 -0
  787. package/lib/geo/geoPath.js +40 -0
  788. package/lib/geo/geoPath.js.map +1 -0
  789. package/lib/geo/geoView.d.ts +7 -0
  790. package/lib/geo/geoView.js +242 -0
  791. package/lib/geo/geoView.js.map +1 -0
  792. package/lib/geo/index.d.ts +9 -0
  793. package/lib/geo/index.js +12 -0
  794. package/lib/geo/index.js.map +1 -0
  795. package/lib/interaction/action/service/elementSelection.d.ts +1 -1
  796. package/lib/interaction/action/service/elementSelection.js +1 -1
  797. package/lib/interaction/action/service/elementSelection.js.map +1 -1
  798. package/lib/interaction/action/service/fisheyeFocus.d.ts +1 -1
  799. package/lib/interaction/action/service/legendItemSelection.d.ts +1 -1
  800. package/lib/interaction/action/service/recordCurrentPoint.d.ts +1 -1
  801. package/lib/interaction/action/service/recordPoint.d.ts +1 -1
  802. package/lib/interaction/action/service/recordRegion.d.ts +1 -1
  803. package/lib/interaction/action/service/recordState.d.ts +1 -1
  804. package/lib/interaction/action/service/recordTip.d.ts +1 -1
  805. package/lib/interaction/action/service/surfacePointSelection.d.ts +1 -1
  806. package/lib/interaction/action/service/triggerInfoSelection.d.ts +1 -1
  807. package/lib/interaction/action/transformer/activeElement.d.ts +1 -1
  808. package/lib/interaction/action/transformer/activeRegion.d.ts +1 -1
  809. package/lib/interaction/action/transformer/button.d.ts +1 -1
  810. package/lib/interaction/action/transformer/cursor.d.ts +1 -1
  811. package/lib/interaction/action/transformer/filter.d.ts +2 -2
  812. package/lib/interaction/action/transformer/filter.js +6 -4
  813. package/lib/interaction/action/transformer/filter.js.map +1 -1
  814. package/lib/interaction/action/transformer/filterElement.d.ts +1 -1
  815. package/lib/interaction/action/transformer/highlightElement.d.ts +1 -1
  816. package/lib/interaction/action/transformer/mask.d.ts +1 -1
  817. package/lib/interaction/action/transformer/move.d.ts +1 -1
  818. package/lib/interaction/action/transformer/plot.d.ts +1 -1
  819. package/lib/interaction/action/transformer/poptip.d.ts +1 -1
  820. package/lib/interaction/action/transformer/setItemState.d.ts +1 -1
  821. package/lib/interaction/action/transformer/tooltip.d.ts +1 -1
  822. package/lib/interaction/builtin/activeRegion.d.ts +1 -1
  823. package/lib/interaction/builtin/brush.d.ts +1 -1
  824. package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
  825. package/lib/interaction/builtin/brushVisible.d.ts +1 -1
  826. package/lib/interaction/builtin/elementActive.d.ts +1 -1
  827. package/lib/interaction/builtin/elementHighlight.d.ts +1 -1
  828. package/lib/interaction/builtin/elementHighlightByColor.d.ts +5 -3
  829. package/lib/interaction/builtin/elementHighlightByColor.js +1 -1
  830. package/lib/interaction/builtin/elementHighlightByColor.js.map +1 -1
  831. package/lib/interaction/builtin/elementHighlightByX.d.ts +5 -3
  832. package/lib/interaction/builtin/elementHighlightByX.js +1 -1
  833. package/lib/interaction/builtin/elementHighlightByX.js.map +1 -1
  834. package/lib/interaction/builtin/elementListHighlight.d.ts +1 -1
  835. package/lib/interaction/builtin/elementSelected.d.ts +1 -1
  836. package/lib/interaction/builtin/ellipsisText.d.ts +1 -1
  837. package/lib/interaction/builtin/fisheye.d.ts +1 -1
  838. package/lib/interaction/builtin/legendActive.d.ts +1 -1
  839. package/lib/interaction/builtin/legendHighlight.d.ts +1 -1
  840. package/lib/interaction/builtin/tooltip.d.ts +9 -5
  841. package/lib/interaction/index.d.ts +4 -3
  842. package/lib/interaction/index.js +9 -7
  843. package/lib/interaction/index.js.map +1 -1
  844. package/lib/interaction/interactor/mousePosition.d.ts +1 -1
  845. package/lib/interaction/interactor/touchPosition.d.ts +1 -1
  846. package/lib/interaction/native/chartIndex.js +6 -2
  847. package/lib/interaction/native/chartIndex.js.map +1 -1
  848. package/lib/interaction/native/elementHighlight.d.ts +10 -0
  849. package/lib/interaction/native/{elementActive.js → elementHighlight.js} +11 -11
  850. package/lib/interaction/native/elementHighlight.js.map +1 -0
  851. package/lib/interaction/native/elementHighlightByColor.d.ts +4 -0
  852. package/lib/interaction/native/elementHighlightByColor.js +16 -0
  853. package/lib/interaction/native/elementHighlightByColor.js.map +1 -0
  854. package/lib/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
  855. package/lib/interaction/native/elementHighlightByX.js +17 -0
  856. package/lib/interaction/native/elementHighlightByX.js.map +1 -0
  857. package/lib/interaction/native/elementSelect.js +1 -1
  858. package/lib/interaction/native/elementSelect.js.map +1 -1
  859. package/lib/interaction/native/elementSelectByColor.js +1 -1
  860. package/lib/interaction/native/elementSelectByColor.js.map +1 -1
  861. package/lib/interaction/native/elementSelectByX.js +1 -1
  862. package/lib/interaction/native/elementSelectByX.js.map +1 -1
  863. package/lib/interaction/native/fisheye.js +8 -5
  864. package/lib/interaction/native/fisheye.js.map +1 -1
  865. package/lib/interaction/native/tooltip.d.ts +11 -0
  866. package/lib/interaction/native/tooltip.js +285 -0
  867. package/lib/interaction/native/tooltip.js.map +1 -0
  868. package/lib/interaction/native/utils.d.ts +1 -1
  869. package/lib/interaction/native/utils.js +4 -4
  870. package/lib/interaction/native/utils.js.map +1 -1
  871. package/lib/interaction/types.d.ts +16 -16
  872. package/lib/label-transform/dodgeY.d.ts +1 -1
  873. package/lib/label-transform/dodgeY.js +9 -1
  874. package/lib/label-transform/dodgeY.js.map +1 -1
  875. package/lib/label-transform/hideOverlap.d.ts +1 -1
  876. package/lib/label-transform/hideOverlap.js +14 -4
  877. package/lib/label-transform/hideOverlap.js.map +1 -1
  878. package/lib/label-transform/index.d.ts +4 -0
  879. package/lib/label-transform/index.js +5 -1
  880. package/lib/label-transform/index.js.map +1 -1
  881. package/lib/label-transform/spider.d.ts +7 -0
  882. package/lib/label-transform/spider.js +34 -0
  883. package/lib/label-transform/spider.js.map +1 -0
  884. package/lib/label-transform/surround.d.ts +7 -0
  885. package/lib/label-transform/surround.js +34 -0
  886. package/lib/label-transform/surround.js.map +1 -0
  887. package/lib/mark/area.d.ts +1 -1
  888. package/lib/mark/area.js +8 -7
  889. package/lib/mark/area.js.map +1 -1
  890. package/lib/mark/box.d.ts +1 -1
  891. package/lib/mark/box.js +6 -8
  892. package/lib/mark/box.js.map +1 -1
  893. package/lib/mark/boxplot.d.ts +4 -0
  894. package/lib/mark/boxplot.js +108 -0
  895. package/lib/mark/boxplot.js.map +1 -0
  896. package/lib/mark/cell.d.ts +1 -1
  897. package/lib/mark/cell.js +3 -7
  898. package/lib/mark/cell.js.map +1 -1
  899. package/lib/mark/connector.d.ts +1 -1
  900. package/lib/mark/connector.js +2 -2
  901. package/lib/mark/connector.js.map +1 -1
  902. package/lib/mark/forceGraph.d.ts +4 -0
  903. package/lib/mark/forceGraph.js +99 -0
  904. package/lib/mark/forceGraph.js.map +1 -0
  905. package/lib/mark/image.d.ts +1 -1
  906. package/lib/mark/image.js +11 -8
  907. package/lib/mark/image.js.map +1 -1
  908. package/lib/mark/index.d.ts +16 -0
  909. package/lib/mark/index.js +19 -1
  910. package/lib/mark/index.js.map +1 -1
  911. package/lib/mark/interval.d.ts +1 -1
  912. package/lib/mark/interval.js +6 -7
  913. package/lib/mark/interval.js.map +1 -1
  914. package/lib/mark/line.d.ts +1 -1
  915. package/lib/mark/line.js +12 -8
  916. package/lib/mark/line.js.map +1 -1
  917. package/lib/mark/lineX.d.ts +1 -1
  918. package/lib/mark/lineX.js +5 -2
  919. package/lib/mark/lineX.js.map +1 -1
  920. package/lib/mark/lineY.d.ts +1 -1
  921. package/lib/mark/lineY.js +5 -2
  922. package/lib/mark/lineY.js.map +1 -1
  923. package/lib/mark/link.d.ts +1 -1
  924. package/lib/mark/link.js +3 -7
  925. package/lib/mark/link.js.map +1 -1
  926. package/lib/mark/pack.d.ts +4 -0
  927. package/lib/mark/pack.js +85 -0
  928. package/lib/mark/pack.js.map +1 -0
  929. package/lib/mark/path.d.ts +7 -0
  930. package/lib/mark/path.js +28 -0
  931. package/lib/mark/path.js.map +1 -0
  932. package/lib/mark/point.d.ts +1 -1
  933. package/lib/mark/point.js +30 -27
  934. package/lib/mark/point.js.map +1 -1
  935. package/lib/mark/polygon.d.ts +1 -1
  936. package/lib/mark/polygon.js +3 -7
  937. package/lib/mark/polygon.js.map +1 -1
  938. package/lib/mark/range.d.ts +1 -1
  939. package/lib/mark/range.js +2 -2
  940. package/lib/mark/range.js.map +1 -1
  941. package/lib/mark/rangeX.d.ts +1 -1
  942. package/lib/mark/rangeX.js +5 -2
  943. package/lib/mark/rangeX.js.map +1 -1
  944. package/lib/mark/rangeY.d.ts +1 -1
  945. package/lib/mark/rangeY.js +5 -2
  946. package/lib/mark/rangeY.js.map +1 -1
  947. package/lib/mark/rect.d.ts +1 -1
  948. package/lib/mark/rect.js +6 -7
  949. package/lib/mark/rect.js.map +1 -1
  950. package/lib/mark/sankey.d.ts +8 -0
  951. package/lib/mark/sankey.js +102 -0
  952. package/lib/mark/sankey.js.map +1 -0
  953. package/lib/mark/shape.d.ts +7 -0
  954. package/lib/mark/shape.js +37 -0
  955. package/lib/mark/shape.js.map +1 -0
  956. package/lib/mark/text.d.ts +1 -1
  957. package/lib/mark/text.js +15 -10
  958. package/lib/mark/text.js.map +1 -1
  959. package/lib/mark/tree.d.ts +4 -0
  960. package/lib/mark/tree.js +63 -0
  961. package/lib/mark/tree.js.map +1 -0
  962. package/lib/mark/treemap.d.ts +4 -0
  963. package/lib/mark/treemap.js +127 -0
  964. package/lib/mark/treemap.js.map +1 -0
  965. package/lib/mark/utils.d.ts +51 -3
  966. package/lib/mark/utils.js +93 -13
  967. package/lib/mark/utils.js.map +1 -1
  968. package/lib/mark/vector.d.ts +1 -1
  969. package/lib/mark/vector.js +3 -7
  970. package/lib/mark/vector.js.map +1 -1
  971. package/lib/mark/wordCloud.d.ts +4 -0
  972. package/lib/mark/wordCloud.js +69 -0
  973. package/lib/mark/wordCloud.js.map +1 -0
  974. package/lib/palette/category10.d.ts +1 -1
  975. package/lib/palette/category20.d.ts +1 -1
  976. package/lib/palette/divergingGreenRed.d.ts +1 -1
  977. package/lib/palette/divergingGreenYellow.d.ts +1 -1
  978. package/lib/palette/divergingRedBlue.d.ts +1 -1
  979. package/lib/palette/divergingRedPurple.d.ts +1 -1
  980. package/lib/palette/sequentialBlue.d.ts +1 -1
  981. package/lib/palette/sequentialDarkBlue.d.ts +1 -1
  982. package/lib/palette/sequentialDarkGreen.d.ts +1 -1
  983. package/lib/palette/sequentialGreen.d.ts +1 -1
  984. package/lib/palette/sequentialGreenBlue.d.ts +1 -1
  985. package/lib/palette/sequentialGrey.d.ts +1 -1
  986. package/lib/palette/sequentialOrange.d.ts +1 -1
  987. package/lib/palette/sequentialPink.d.ts +1 -1
  988. package/lib/palette/sequentialPinkPurple.d.ts +1 -1
  989. package/lib/palette/sequentialPurple.d.ts +1 -1
  990. package/lib/palette/sequentialRed.d.ts +1 -1
  991. package/lib/palette/sequentialYellow.d.ts +1 -1
  992. package/lib/palette/sequentialYellowGreen.d.ts +1 -1
  993. package/lib/palette/sequentialYellowOrange.d.ts +1 -1
  994. package/lib/runtime/component.d.ts +1 -1
  995. package/lib/runtime/component.js +18 -29
  996. package/lib/runtime/component.js.map +1 -1
  997. package/lib/runtime/coordinate.d.ts +8 -8
  998. package/lib/runtime/coordinate.js +21 -21
  999. package/lib/runtime/coordinate.js.map +1 -1
  1000. package/lib/runtime/mark.d.ts +3 -3
  1001. package/lib/runtime/mark.js +35 -39
  1002. package/lib/runtime/mark.js.map +1 -1
  1003. package/lib/runtime/plot.d.ts +2 -2
  1004. package/lib/runtime/plot.js +152 -41
  1005. package/lib/runtime/plot.js.map +1 -1
  1006. package/lib/runtime/render.d.ts +0 -7
  1007. package/lib/runtime/render.js +6 -6
  1008. package/lib/runtime/render.js.map +1 -1
  1009. package/lib/runtime/scale.d.ts +4 -4
  1010. package/lib/runtime/scale.js +98 -175
  1011. package/lib/runtime/scale.js.map +1 -1
  1012. package/lib/runtime/transform.d.ts +1 -0
  1013. package/lib/runtime/transform.js +20 -3
  1014. package/lib/runtime/transform.js.map +1 -1
  1015. package/lib/runtime/types/common.d.ts +37 -21
  1016. package/lib/runtime/types/component.d.ts +35 -35
  1017. package/lib/runtime/types/data.d.ts +4 -4
  1018. package/lib/runtime/types/encode.d.ts +9 -9
  1019. package/lib/runtime/types/mark.d.ts +14 -6
  1020. package/lib/runtime/types/options.d.ts +32 -34
  1021. package/lib/runtime/types/theme.d.ts +32 -12
  1022. package/lib/runtime/types/transform.d.ts +7 -7
  1023. package/lib/scale/band.d.ts +1 -1
  1024. package/lib/scale/identity.d.ts +1 -1
  1025. package/lib/scale/linear.d.ts +1 -1
  1026. package/lib/scale/log.d.ts +1 -1
  1027. package/lib/scale/ordinal.d.ts +1 -1
  1028. package/lib/scale/point.d.ts +1 -1
  1029. package/lib/scale/pow.d.ts +1 -1
  1030. package/lib/scale/quantile.d.ts +1 -1
  1031. package/lib/scale/quantize.d.ts +1 -1
  1032. package/lib/scale/sequential.d.ts +1 -1
  1033. package/lib/scale/sqrt.d.ts +1 -1
  1034. package/lib/scale/threshold.d.ts +1 -1
  1035. package/lib/scale/time.d.ts +1 -1
  1036. package/lib/shape/area/area.d.ts +1 -1
  1037. package/lib/shape/area/curve.d.ts +1 -1
  1038. package/lib/shape/area/curve.js +2 -0
  1039. package/lib/shape/area/curve.js.map +1 -1
  1040. package/lib/shape/area/smooth.d.ts +1 -1
  1041. package/lib/shape/area/step.d.ts +1 -1
  1042. package/lib/shape/box/box.d.ts +1 -1
  1043. package/lib/shape/box/box.js +3 -1
  1044. package/lib/shape/box/box.js.map +1 -1
  1045. package/lib/shape/connector/connector.d.ts +5 -11
  1046. package/lib/shape/connector/connector.js +50 -64
  1047. package/lib/shape/connector/connector.js.map +1 -1
  1048. package/lib/shape/createElement.d.ts +1 -1
  1049. package/lib/shape/image/image.d.ts +1 -1
  1050. package/lib/shape/image/image.js +5 -2
  1051. package/lib/shape/image/image.js.map +1 -1
  1052. package/lib/shape/index.d.ts +4 -0
  1053. package/lib/shape/index.js +7 -1
  1054. package/lib/shape/index.js.map +1 -1
  1055. package/lib/shape/interval/color.d.ts +1 -1
  1056. package/lib/shape/interval/color.js +13 -9
  1057. package/lib/shape/interval/color.js.map +1 -1
  1058. package/lib/shape/interval/funnel.d.ts +1 -1
  1059. package/lib/shape/interval/funnel.js +1 -3
  1060. package/lib/shape/interval/funnel.js.map +1 -1
  1061. package/lib/shape/interval/hollow.d.ts +1 -1
  1062. package/lib/shape/interval/pyramid.d.ts +1 -1
  1063. package/lib/shape/interval/pyramid.js +2 -3
  1064. package/lib/shape/interval/pyramid.js.map +1 -1
  1065. package/lib/shape/interval/rect.d.ts +1 -1
  1066. package/lib/shape/label/label.d.ts +1 -1
  1067. package/lib/shape/label/label.js +13 -5
  1068. package/lib/shape/label/label.js.map +1 -1
  1069. package/lib/shape/label/position.d.ts +1 -1
  1070. package/lib/shape/label/position.js +77 -36
  1071. package/lib/shape/label/position.js.map +1 -1
  1072. package/lib/shape/line/curve.d.ts +1 -1
  1073. package/lib/shape/line/curve.js +8 -2
  1074. package/lib/shape/line/curve.js.map +1 -1
  1075. package/lib/shape/line/hv.d.ts +1 -1
  1076. package/lib/shape/line/hvh.d.ts +1 -1
  1077. package/lib/shape/line/line.d.ts +1 -1
  1078. package/lib/shape/line/smooth.d.ts +1 -1
  1079. package/lib/shape/line/vh.d.ts +1 -1
  1080. package/lib/shape/lineXY/line.d.ts +1 -1
  1081. package/lib/shape/lineXY/line.js +2 -0
  1082. package/lib/shape/lineXY/line.js.map +1 -1
  1083. package/lib/shape/link/arc.d.ts +1 -1
  1084. package/lib/shape/link/arc.js +2 -0
  1085. package/lib/shape/link/arc.js.map +1 -1
  1086. package/lib/shape/link/link.d.ts +1 -7
  1087. package/lib/shape/link/link.js +5 -3
  1088. package/lib/shape/link/link.js.map +1 -1
  1089. package/lib/shape/link/smooth.d.ts +1 -1
  1090. package/lib/shape/link/smooth.js +2 -0
  1091. package/lib/shape/link/smooth.js.map +1 -1
  1092. package/lib/shape/link/vhv.d.ts +1 -1
  1093. package/lib/shape/link/vhv.js +2 -0
  1094. package/lib/shape/link/vhv.js.map +1 -1
  1095. package/lib/shape/path/color.d.ts +9 -0
  1096. package/lib/shape/path/color.js +41 -0
  1097. package/lib/shape/path/color.js.map +1 -0
  1098. package/lib/shape/path/hollow.d.ts +8 -0
  1099. package/lib/shape/path/hollow.js +17 -0
  1100. package/lib/shape/path/hollow.js.map +1 -0
  1101. package/lib/shape/path/path.d.ts +8 -0
  1102. package/lib/shape/path/path.js +17 -0
  1103. package/lib/shape/path/path.js.map +1 -0
  1104. package/lib/shape/point/bowtie.d.ts +1 -1
  1105. package/lib/shape/point/color.d.ts +1 -1
  1106. package/lib/shape/point/color.js +4 -1
  1107. package/lib/shape/point/color.js.map +1 -1
  1108. package/lib/shape/point/cross.d.ts +1 -1
  1109. package/lib/shape/point/diamond.d.ts +1 -1
  1110. package/lib/shape/point/hexagon.d.ts +1 -1
  1111. package/lib/shape/point/hollow.d.ts +1 -1
  1112. package/lib/shape/point/hollowBowtie.d.ts +1 -1
  1113. package/lib/shape/point/hollowDiamond.d.ts +1 -1
  1114. package/lib/shape/point/hollowHexagon.d.ts +1 -1
  1115. package/lib/shape/point/hollowSquare.d.ts +1 -1
  1116. package/lib/shape/point/hollowTriangle.d.ts +1 -1
  1117. package/lib/shape/point/hollowTriangleDown.d.ts +1 -1
  1118. package/lib/shape/point/hyphen.d.ts +1 -1
  1119. package/lib/shape/point/line.d.ts +1 -1
  1120. package/lib/shape/point/plus.d.ts +1 -1
  1121. package/lib/shape/point/point.d.ts +1 -1
  1122. package/lib/shape/point/square.d.ts +1 -1
  1123. package/lib/shape/point/tick.d.ts +1 -1
  1124. package/lib/shape/point/triangle.d.ts +1 -1
  1125. package/lib/shape/point/triangleDown.d.ts +1 -1
  1126. package/lib/shape/polygon/polygon.d.ts +1 -1
  1127. package/lib/shape/polygon/polygon.js +2 -0
  1128. package/lib/shape/polygon/polygon.js.map +1 -1
  1129. package/lib/shape/polygon/ribbon.d.ts +1 -1
  1130. package/lib/shape/polygon/ribbon.js +2 -0
  1131. package/lib/shape/polygon/ribbon.js.map +1 -1
  1132. package/lib/shape/shape/shape.d.ts +6 -0
  1133. package/lib/shape/shape/shape.js +31 -0
  1134. package/lib/shape/shape/shape.js.map +1 -0
  1135. package/lib/shape/text/advance.d.ts +2 -0
  1136. package/lib/shape/text/advance.js +125 -0
  1137. package/lib/shape/text/advance.js.map +1 -0
  1138. package/lib/shape/text/badge.d.ts +5 -9
  1139. package/lib/shape/text/badge.js +31 -50
  1140. package/lib/shape/text/badge.js.map +1 -1
  1141. package/lib/shape/text/text.d.ts +1 -15
  1142. package/lib/shape/text/text.js +15 -144
  1143. package/lib/shape/text/text.js.map +1 -1
  1144. package/lib/shape/utils.d.ts +21 -21
  1145. package/lib/shape/utils.js +33 -13
  1146. package/lib/shape/utils.js.map +1 -1
  1147. package/lib/shape/vector/vector.d.ts +1 -7
  1148. package/lib/shape/vector/vector.js +4 -2
  1149. package/lib/shape/vector/vector.js.map +1 -1
  1150. package/lib/spec/action.d.ts +27 -27
  1151. package/lib/spec/animate.d.ts +1 -8
  1152. package/lib/spec/composition.d.ts +40 -17
  1153. package/lib/spec/coordinate.d.ts +17 -17
  1154. package/lib/spec/data.d.ts +47 -25
  1155. package/lib/spec/encode.d.ts +7 -7
  1156. package/lib/spec/geometry.d.ts +79 -39
  1157. package/lib/spec/index.d.ts +1 -1
  1158. package/lib/spec/interaction.d.ts +28 -26
  1159. package/lib/spec/labelTransform.d.ts +10 -3
  1160. package/lib/spec/palette.d.ts +23 -23
  1161. package/lib/spec/scale.d.ts +17 -17
  1162. package/lib/spec/theme.d.ts +5 -5
  1163. package/lib/spec/title.d.ts +1 -1
  1164. package/lib/spec/transform.d.ts +44 -26
  1165. package/lib/stdlib/index.js +4 -208
  1166. package/lib/stdlib/index.js.map +1 -1
  1167. package/lib/theme/dark.d.ts +1 -1
  1168. package/lib/theme/dark.js +157 -57
  1169. package/lib/theme/dark.js.map +1 -1
  1170. package/lib/theme/light.d.ts +1 -1
  1171. package/lib/theme/light.js +155 -52
  1172. package/lib/theme/light.js.map +1 -1
  1173. package/lib/transform/Select.d.ts +1 -1
  1174. package/lib/transform/SelectX.d.ts +1 -1
  1175. package/lib/transform/SelectY.d.ts +1 -1
  1176. package/lib/transform/bin.d.ts +12 -0
  1177. package/lib/transform/bin.js +86 -0
  1178. package/lib/transform/bin.js.map +1 -0
  1179. package/lib/transform/binX.d.ts +4 -0
  1180. package/lib/transform/binX.js +11 -0
  1181. package/lib/transform/binX.js.map +1 -0
  1182. package/lib/transform/diffY.d.ts +1 -1
  1183. package/lib/transform/dodgeX.d.ts +1 -1
  1184. package/lib/transform/flexX.d.ts +1 -1
  1185. package/lib/transform/group.d.ts +2 -2
  1186. package/lib/transform/group.js +4 -82
  1187. package/lib/transform/group.js.map +1 -1
  1188. package/lib/transform/groupColor.d.ts +1 -1
  1189. package/lib/transform/groupColor.js +1 -1
  1190. package/lib/transform/groupColor.js.map +1 -1
  1191. package/lib/transform/groupN.d.ts +9 -0
  1192. package/lib/transform/groupN.js +103 -0
  1193. package/lib/transform/groupN.js.map +1 -0
  1194. package/lib/transform/groupX.d.ts +1 -1
  1195. package/lib/transform/groupX.js +1 -1
  1196. package/lib/transform/groupX.js.map +1 -1
  1197. package/lib/transform/groupY.d.ts +1 -1
  1198. package/lib/transform/groupY.js +1 -1
  1199. package/lib/transform/groupY.js.map +1 -1
  1200. package/lib/transform/index.d.ts +16 -6
  1201. package/lib/transform/index.js +17 -7
  1202. package/lib/transform/index.js.map +1 -1
  1203. package/lib/transform/jitter.d.ts +1 -1
  1204. package/lib/transform/jitterX.d.ts +1 -1
  1205. package/lib/transform/maybeFunctionAttribute.d.ts +6 -0
  1206. package/lib/transform/maybeFunctionAttribute.js +23 -0
  1207. package/lib/transform/maybeFunctionAttribute.js.map +1 -0
  1208. package/lib/transform/maybeGradient.d.ts +7 -0
  1209. package/lib/transform/maybeGradient.js +28 -0
  1210. package/lib/transform/maybeGradient.js.map +1 -0
  1211. package/lib/transform/maybeIdentityX.d.ts +1 -1
  1212. package/lib/transform/maybeIdentityY.d.ts +1 -1
  1213. package/lib/transform/maybeKey.d.ts +1 -1
  1214. package/lib/transform/maybeSeries.d.ts +1 -1
  1215. package/lib/transform/maybeSize.d.ts +1 -1
  1216. package/lib/transform/maybeStackY.d.ts +1 -1
  1217. package/lib/transform/maybeTitle.d.ts +8 -0
  1218. package/lib/transform/{maybeTitleX.js → maybeTitle.js} +8 -7
  1219. package/lib/transform/maybeTitle.js.map +1 -0
  1220. package/lib/transform/maybeTooltip.d.ts +2 -2
  1221. package/lib/transform/maybeTooltip.js +7 -5
  1222. package/lib/transform/maybeTooltip.js.map +1 -1
  1223. package/lib/transform/maybeTuple.d.ts +7 -0
  1224. package/lib/transform/maybeTuple.js +23 -0
  1225. package/lib/transform/maybeTuple.js.map +1 -0
  1226. package/lib/transform/maybeTupleX.d.ts +1 -1
  1227. package/lib/transform/maybeTupleX.js +1 -1
  1228. package/lib/transform/maybeTupleX.js.map +1 -1
  1229. package/lib/transform/maybeTupleY.d.ts +1 -1
  1230. package/lib/transform/maybeTupleY.js +1 -1
  1231. package/lib/transform/maybeTupleY.js.map +1 -1
  1232. package/lib/transform/maybeVisualPosition.d.ts +7 -0
  1233. package/lib/transform/maybeVisualPosition.js +49 -0
  1234. package/lib/transform/maybeVisualPosition.js.map +1 -0
  1235. package/lib/transform/maybeZeroPadding.d.ts +1 -1
  1236. package/lib/transform/maybeZeroX.d.ts +1 -1
  1237. package/lib/transform/maybeZeroY.d.ts +1 -1
  1238. package/lib/transform/maybeZeroY1.d.ts +1 -1
  1239. package/lib/transform/normalizeY.d.ts +1 -1
  1240. package/lib/transform/pack.d.ts +1 -1
  1241. package/lib/transform/sort.d.ts +1 -1
  1242. package/lib/transform/sortColor.d.ts +1 -1
  1243. package/lib/transform/sortX.d.ts +1 -1
  1244. package/lib/transform/sortY.d.ts +1 -1
  1245. package/lib/transform/stackEnter.d.ts +2 -1
  1246. package/lib/transform/stackEnter.js +15 -5
  1247. package/lib/transform/stackEnter.js.map +1 -1
  1248. package/lib/transform/stackY.d.ts +1 -1
  1249. package/lib/transform/stackY.js +25 -4
  1250. package/lib/transform/stackY.js.map +1 -1
  1251. package/lib/transform/symmetryY.d.ts +1 -1
  1252. package/lib/transform/utils/helper.d.ts +1 -0
  1253. package/lib/transform/utils/helper.js +11 -2
  1254. package/lib/transform/utils/helper.js.map +1 -1
  1255. package/lib/transform/utils/order.d.ts +3 -3
  1256. package/lib/transform/utils/order.js +2 -0
  1257. package/lib/transform/utils/order.js.map +1 -1
  1258. package/lib/utils/coordinate.js +3 -1
  1259. package/lib/utils/coordinate.js.map +1 -1
  1260. package/lib/utils/helper.d.ts +5 -2
  1261. package/lib/utils/helper.js +13 -4
  1262. package/lib/utils/helper.js.map +1 -1
  1263. package/lib/utils/selection.d.ts +4 -4
  1264. package/lib/utils/selection.js +3 -1
  1265. package/lib/utils/selection.js.map +1 -1
  1266. package/lib/utils/size.d.ts +6 -1
  1267. package/lib/utils/size.js +24 -2
  1268. package/lib/utils/size.js.map +1 -1
  1269. package/lib/utils/vector.d.ts +1 -1
  1270. package/package.json +12 -11
  1271. package/src/animation/fadeIn.ts +1 -1
  1272. package/src/animation/fadeOut.ts +1 -1
  1273. package/src/animation/growInX.ts +40 -0
  1274. package/src/animation/growInY.ts +40 -0
  1275. package/src/animation/index.ts +6 -0
  1276. package/src/animation/morphing.ts +60 -11
  1277. package/src/animation/pathIn.ts +24 -0
  1278. package/src/animation/scaleInX.ts +1 -1
  1279. package/src/animation/scaleInY.ts +1 -1
  1280. package/src/animation/scaleOutX.ts +1 -1
  1281. package/src/animation/scaleOutY.ts +1 -1
  1282. package/src/animation/types.ts +6 -0
  1283. package/src/animation/waveIn.ts +26 -3
  1284. package/src/animation/zoomIn.ts +1 -1
  1285. package/src/animation/zoomOut.ts +1 -1
  1286. package/src/api/chart.ts +25 -5
  1287. package/src/api/composition/facetCircle.ts +4 -10
  1288. package/src/api/composition/facetRect.ts +4 -14
  1289. package/src/api/composition/geoPath.ts +43 -0
  1290. package/src/api/composition/geoView.ts +42 -0
  1291. package/src/api/composition/index.ts +8 -0
  1292. package/src/api/composition/repeatMatrix.ts +4 -13
  1293. package/src/api/composition/spaceFlex.ts +1 -12
  1294. package/src/api/composition/spaceLayer.ts +1 -6
  1295. package/src/api/composition/timingKeyframe.ts +3 -19
  1296. package/src/api/composition/view.ts +12 -14
  1297. package/src/api/mark/index.ts +24 -0
  1298. package/src/api/mark/mark.ts +97 -11
  1299. package/src/api/mark/types.ts +3 -11
  1300. package/src/api/types.ts +4 -2
  1301. package/src/component/axis.ts +29 -13
  1302. package/src/component/legendCategory.ts +3 -3
  1303. package/src/composition/facetCircle.ts +2 -2
  1304. package/src/composition/facetRect.ts +8 -10
  1305. package/src/composition/mark.ts +4 -4
  1306. package/src/composition/repeatMatrix.ts +4 -4
  1307. package/src/composition/timingKeyframe.ts +7 -8
  1308. package/src/data/fetch.ts +1 -0
  1309. package/src/data/filter.ts +19 -0
  1310. package/src/data/index.ts +4 -2
  1311. package/src/data/join.ts +40 -0
  1312. package/src/data/rename.ts +2 -3
  1313. package/src/geo/d3-projection.ts +33 -0
  1314. package/src/geo/geoPath.ts +34 -0
  1315. package/src/geo/geoView.ts +235 -0
  1316. package/src/geo/index.ts +12 -0
  1317. package/src/interaction/action/service/elementSelection.ts +1 -1
  1318. package/src/interaction/action/transformer/filter.ts +6 -5
  1319. package/src/interaction/builtin/elementHighlightByColor.ts +1 -1
  1320. package/src/interaction/builtin/elementHighlightByX.ts +1 -1
  1321. package/src/interaction/index.ts +4 -3
  1322. package/src/interaction/native/chartIndex.ts +5 -2
  1323. package/src/interaction/native/{elementActive.ts → elementHighlight.ts} +9 -9
  1324. package/src/interaction/native/{elementActiveByColor.ts → elementHighlightByColor.ts} +5 -5
  1325. package/src/interaction/native/{elementActiveByX.ts → elementHighlightByX.ts} +5 -5
  1326. package/src/interaction/native/elementSelect.ts +2 -2
  1327. package/src/interaction/native/elementSelectByColor.ts +2 -2
  1328. package/src/interaction/native/elementSelectByX.ts +2 -2
  1329. package/src/interaction/native/fisheye.ts +7 -5
  1330. package/src/interaction/native/tooltip.ts +381 -0
  1331. package/src/interaction/native/utils.ts +2 -2
  1332. package/src/label-transform/dodgeY.ts +11 -1
  1333. package/src/label-transform/hideOverlap.ts +17 -5
  1334. package/src/label-transform/index.ts +4 -0
  1335. package/src/label-transform/spider.ts +37 -0
  1336. package/src/label-transform/surround.ts +37 -0
  1337. package/src/mark/area.ts +10 -7
  1338. package/src/mark/box.ts +7 -8
  1339. package/src/mark/boxplot.ts +119 -0
  1340. package/src/mark/cell.ts +5 -7
  1341. package/src/mark/connector.ts +3 -2
  1342. package/src/mark/forceGraph.ts +133 -0
  1343. package/src/mark/image.ts +14 -9
  1344. package/src/mark/index.ts +16 -0
  1345. package/src/mark/interval.ts +8 -7
  1346. package/src/mark/line.ts +15 -8
  1347. package/src/mark/lineX.ts +6 -2
  1348. package/src/mark/lineY.ts +6 -2
  1349. package/src/mark/link.ts +5 -7
  1350. package/src/mark/pack.ts +105 -0
  1351. package/src/mark/path.ts +34 -0
  1352. package/src/mark/point.ts +32 -27
  1353. package/src/mark/polygon.ts +5 -7
  1354. package/src/mark/range.ts +3 -2
  1355. package/src/mark/rangeX.ts +6 -2
  1356. package/src/mark/rangeY.ts +6 -2
  1357. package/src/mark/rect.ts +8 -7
  1358. package/src/mark/sankey.ts +128 -0
  1359. package/src/mark/shape.ts +37 -0
  1360. package/src/mark/text.ts +17 -11
  1361. package/src/mark/tree.ts +86 -0
  1362. package/src/mark/treemap.ts +189 -0
  1363. package/src/mark/utils.ts +115 -12
  1364. package/src/mark/vector.ts +5 -7
  1365. package/src/mark/wordCloud.ts +74 -0
  1366. package/src/runtime/component.ts +18 -28
  1367. package/src/runtime/coordinate.ts +20 -20
  1368. package/src/runtime/mark.ts +52 -71
  1369. package/src/runtime/plot.ts +229 -61
  1370. package/src/runtime/render.ts +7 -5
  1371. package/src/runtime/scale.ts +112 -246
  1372. package/src/runtime/transform.ts +21 -2
  1373. package/src/runtime/types/common.ts +21 -1
  1374. package/src/runtime/types/component.ts +11 -5
  1375. package/src/runtime/types/mark.ts +12 -2
  1376. package/src/runtime/types/options.ts +6 -4
  1377. package/src/runtime/types/theme.ts +32 -4
  1378. package/src/shape/.DS_Store +0 -0
  1379. package/src/shape/area/curve.ts +2 -0
  1380. package/src/shape/box/box.ts +3 -1
  1381. package/src/shape/connector/connector.ts +75 -102
  1382. package/src/shape/image/image.ts +5 -2
  1383. package/src/shape/index.ts +5 -0
  1384. package/src/shape/interval/color.ts +31 -9
  1385. package/src/shape/interval/funnel.ts +1 -1
  1386. package/src/shape/interval/pyramid.ts +1 -1
  1387. package/src/shape/label/label.ts +20 -7
  1388. package/src/shape/label/position.ts +116 -34
  1389. package/src/shape/line/curve.ts +7 -1
  1390. package/src/shape/lineXY/line.ts +2 -0
  1391. package/src/shape/link/arc.ts +2 -0
  1392. package/src/shape/link/link.ts +6 -10
  1393. package/src/shape/link/smooth.ts +2 -0
  1394. package/src/shape/link/vhv.ts +2 -0
  1395. package/src/shape/path/color.ts +38 -0
  1396. package/src/shape/path/hollow.ts +20 -0
  1397. package/src/shape/path/path.ts +20 -0
  1398. package/src/shape/point/color.ts +5 -2
  1399. package/src/shape/polygon/polygon.ts +2 -0
  1400. package/src/shape/polygon/ribbon.ts +2 -0
  1401. package/src/shape/shape/shape.ts +25 -0
  1402. package/src/shape/text/advance.ts +181 -0
  1403. package/src/shape/text/badge.ts +40 -79
  1404. package/src/shape/text/text.ts +19 -219
  1405. package/src/shape/utils.ts +42 -18
  1406. package/src/shape/vector/vector.ts +5 -9
  1407. package/src/spec/action.ts +1 -1
  1408. package/src/spec/animate.ts +9 -9
  1409. package/src/spec/composition.ts +41 -5
  1410. package/src/spec/data.ts +38 -10
  1411. package/src/spec/geometry.ts +122 -13
  1412. package/src/spec/interaction.ts +40 -34
  1413. package/src/spec/labelTransform.ts +9 -0
  1414. package/src/spec/transform.ts +19 -1
  1415. package/src/stdlib/index.ts +66 -18
  1416. package/src/theme/dark.ts +161 -58
  1417. package/src/theme/light.ts +159 -53
  1418. package/src/transform/bin.ts +102 -0
  1419. package/src/transform/binX.ts +17 -0
  1420. package/src/transform/group.ts +7 -104
  1421. package/src/transform/groupColor.ts +1 -1
  1422. package/src/transform/groupN.ts +120 -0
  1423. package/src/transform/groupX.ts +1 -1
  1424. package/src/transform/groupY.ts +1 -1
  1425. package/src/transform/index.ts +16 -6
  1426. package/src/transform/maybeFunctionAttribute.ts +28 -0
  1427. package/src/transform/maybeGradient.ts +27 -0
  1428. package/src/transform/{maybeTitleX.ts → maybeTitle.ts} +8 -5
  1429. package/src/transform/maybeTooltip.ts +17 -13
  1430. package/src/transform/maybeTuple.ts +22 -0
  1431. package/src/transform/maybeTupleX.ts +2 -2
  1432. package/src/transform/maybeTupleY.ts +2 -2
  1433. package/src/transform/maybeVisualPosition.ts +37 -0
  1434. package/src/transform/stackEnter.ts +20 -4
  1435. package/src/transform/stackY.ts +30 -4
  1436. package/src/transform/utils/helper.ts +8 -1
  1437. package/src/transform/utils/order.ts +1 -0
  1438. package/src/utils/coordinate.ts +2 -1
  1439. package/src/utils/helper.ts +17 -4
  1440. package/src/utils/selection.ts +7 -4
  1441. package/src/utils/size.ts +45 -1
  1442. package/esm/data/filterBy.d.ts +0 -8
  1443. package/esm/data/filterBy.js +0 -17
  1444. package/esm/data/filterBy.js.map +0 -1
  1445. package/esm/interaction/native/elementActive.d.ts +0 -10
  1446. package/esm/interaction/native/elementActive.js.map +0 -1
  1447. package/esm/interaction/native/elementActiveByColor.d.ts +0 -4
  1448. package/esm/interaction/native/elementActiveByColor.js +0 -12
  1449. package/esm/interaction/native/elementActiveByColor.js.map +0 -1
  1450. package/esm/interaction/native/elementActiveByX.js +0 -13
  1451. package/esm/interaction/native/elementActiveByX.js.map +0 -1
  1452. package/esm/transform/maybeTitleX.d.ts +0 -6
  1453. package/esm/transform/maybeTitleX.js.map +0 -1
  1454. package/esm/transform/maybeTooltipPosition.d.ts +0 -7
  1455. package/esm/transform/maybeTooltipPosition.js +0 -10
  1456. package/esm/transform/maybeTooltipPosition.js.map +0 -1
  1457. package/esm/transform/maybeTooltipY.d.ts +0 -6
  1458. package/esm/transform/maybeTooltipY.js +0 -9
  1459. package/esm/transform/maybeTooltipY.js.map +0 -1
  1460. package/lib/data/filterBy.d.ts +0 -8
  1461. package/lib/data/filterBy.js +0 -21
  1462. package/lib/data/filterBy.js.map +0 -1
  1463. package/lib/interaction/native/elementActive.d.ts +0 -10
  1464. package/lib/interaction/native/elementActive.js.map +0 -1
  1465. package/lib/interaction/native/elementActiveByColor.d.ts +0 -4
  1466. package/lib/interaction/native/elementActiveByColor.js +0 -16
  1467. package/lib/interaction/native/elementActiveByColor.js.map +0 -1
  1468. package/lib/interaction/native/elementActiveByX.js +0 -17
  1469. package/lib/interaction/native/elementActiveByX.js.map +0 -1
  1470. package/lib/transform/maybeTitleX.d.ts +0 -6
  1471. package/lib/transform/maybeTitleX.js.map +0 -1
  1472. package/lib/transform/maybeTooltipPosition.d.ts +0 -7
  1473. package/lib/transform/maybeTooltipPosition.js +0 -14
  1474. package/lib/transform/maybeTooltipPosition.js.map +0 -1
  1475. package/lib/transform/maybeTooltipY.d.ts +0 -6
  1476. package/lib/transform/maybeTooltipY.js +0 -13
  1477. package/lib/transform/maybeTooltipY.js.map +0 -1
  1478. package/src/data/filterBy.ts +0 -28
  1479. package/src/transform/maybeTooltipPosition.ts +0 -14
  1480. package/src/transform/maybeTooltipY.ts +0 -13
package/dist/g2.min.js CHANGED
@@ -1,7 +1,7 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(x){"use strict";const w="main-layer",Z="label-layer",K="element",j="view",J="plot",Q="component",tt="label",et="area";function I(t,e,n,r,i){!function t(e,n,r,i,o){for(;r<i;){600<i-r&&(a=i-r+1,u=n-r+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(u-a/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/a+l)),u=Math.min(i,Math.floor(n+(a-u)*s/a+l)),t(e,n,c,u,o));var a,s,l,c,u,h=e[n],f=r,d=i;for(R(e,r,n),0<o(e[i],h)&&R(e,r,i);f<d;){for(R(e,f,d),f++,d--;o(e[f],h)<0;)f++;for(;0<o(e[d],h);)d--}0===o(e[r],h)?R(e,r,d):R(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||B)}function R(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function B(t,e){return t<e?-1:e<t?1:0}class z{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;var r=[];if(rt(e,n))for(var i=this.toBBox,o=[];n;){for(let t=0;t<n.children.length;t++){var a=n.children[t],s=n.leaf?i(a):a;rt(e,s)&&(n.leaf?r.push(a):nt(e,s)?this._all(a,r):o.push(a))}n=o.pop()}return r}collides(e){let n=this.data;if(rt(e,n))for(var r=[];n;){for(let t=0;t<n.children.length;t++){var i=n.children[t],o=n.leaf?this.toBBox(i):i;if(rt(e,o)){if(n.leaf||nt(e,o))return!0;r.push(i)}}n=r.pop()}return!1}load(e){if(e&&e.length)if(e.length<this._minEntries)for(let t=0;t<e.length;t++)this.insert(e[t]);else{let t=this._build(e.slice(),0,e.length-1,0);var n;this.data.children.length?this.data.height===t.height?this._splitRoot(this.data,t):(this.data.height<t.height&&(n=this.data,this.data=t,t=n),this._insert(t,this.data.height-t.height-1,!0)):this.data=t}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=it([]),this}remove(i,o){if(i){let t=this.data;var a=this.toBBox(i),s=[],l=[];let e,n,r;for(;t||s.length;){if(t||(t=s.pop(),n=s[s.length-1],e=l.pop(),r=!0),t.leaf){var c=function(e,n,r){if(!r)return n.indexOf(e);for(let t=0;t<n.length;t++)if(r(e,n[t]))return t;return-1}(i,t.children,o);if(-1!==c)return t.children.splice(c,1),s.push(t),this._condense(s),this}r||t.leaf||!nt(t,a)?n?(e++,t=n.children[e],r=!1):t=null:(s.push(t),l.push(e),e=0,t=(n=t).children[0])}}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){for(var n=[];t;)(t.leaf?e:n).push(...t.children),t=n.pop();return e}_build(n,t,r,i){var e=r-t+1;let o=this._maxEntries,a;if(e<=o)G(a=it(n.slice(t,r+1)),this.toBBox);else{i||(i=Math.ceil(Math.log(e)/Math.log(o)),o=Math.ceil(e/Math.pow(o,i-1))),(a=it([])).leaf=!1,a.height=i;var s=Math.ceil(e/o),l=s*Math.ceil(Math.sqrt(o));ot(n,t,r,l,this.compareMinX);for(let e=t;e<=r;e+=l){var c=Math.min(e+l-1,r);ot(n,e,c,s,this.compareMinY);for(let t=e;t<=c;t+=s){var u=Math.min(t+s-1,c);a.children.push(this._build(n,t,u,i-1))}}G(a,this.toBBox)}return a}_chooseSubtree(i,o,t,a){for(;;){if(a.push(o),o.leaf||a.length-1===t)break;let e=1/0,n=1/0,r;for(let t=0;t<o.children.length;t++){var s=o.children[t],l=q(s),c=(u=i,c=s,(Math.max(c.maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-l);c<n?(n=c,e=l<e?l:e,r=s):c===n&&l<e&&(e=l,r=s)}o=r||o.children[0]}var u,c;return o}_insert(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),W(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=it(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,G(n,this.toBBox),G(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)}_splitRoot(t,e){this.data=it([t,e]),this.data.height=t.height+1,this.data.leaf=!1,G(this.data,this.toBBox)}_chooseSplitIndex(e,n,r){let i,o=1/0,a=1/0;for(let t=n;t<=r-n;t++){var s=H(e,0,t,this.toBBox),l=H(e,t,r,this.toBBox),c=(h=s,c=l,u=d=f=void 0,f=Math.max(h.minX,c.minX),d=Math.max(h.minY,c.minY),u=Math.min(h.maxX,c.maxX),h=Math.min(h.maxY,c.maxY),Math.max(0,u-f)*Math.max(0,h-d)),u=q(s)+q(l);c<o?(o=c,i=t,a=u<a?u:a):c===o&&u<a&&(a=u,i=t)}var h,c,f,d,u;return i||r-n}_chooseSplitAxis(t,e,n){var r=t.leaf?this.compareMinX:Y,i=t.leaf?this.compareMinY:V;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(e,n,r,t){e.children.sort(t);var i=this.toBBox,o=H(e,0,n,i),a=H(e,r-n,r,i);let s=X(o)+X(a);for(let t=n;t<r-n;t++){var l=e.children[t];W(o,e.leaf?i(l):l),s+=X(o)}for(let t=r-n-1;t>=n;t--){var c=e.children[t];W(a,e.leaf?i(c):c),s+=X(a)}return s}_adjustParentBBoxes(e,n,r){for(let t=r;0<=t;t--)W(n[t],e)}_condense(n){for(let t=n.length-1,e;0<=t;t--)0===n[t].children.length?0<t?(e=n[t-1].children).splice(e.indexOf(n[t]),1):this.clear():G(n[t],this.toBBox)}}function G(t,e){H(t,0,t.children.length,e,t)}function H(e,n,r,i,o){(o=o||it(null)).minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let t=n;t<r;t++){var a=e.children[t];W(o,e.leaf?i(a):a)}return o}function W(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function Y(t,e){return t.minX-e.minX}function V(t,e){return t.minY-e.minY}function q(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function X(t){return t.maxX-t.minX+(t.maxY-t.minY)}function nt(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function rt(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function it(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ot(t,e,n,r,i){for(var o,a=[e,n];a.length;)(n=a.pop())-(e=a.pop())<=r||(I(t,o=e+Math.ceil((n-e)/r/2)*r,e,n,i),a.push(e,o,o,n))}var at=1e-6,st="undefined"!=typeof Float32Array?Float32Array:Array;function lt(){var t=new st(9);return st!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ct=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],h=n[0],f=n[1],d=n[2],p=n[3],y=n[4],g=n[5],m=n[6],v=n[7],n=n[8];return t[0]=h*r+f*a+d*c,t[1]=h*i+f*s+d*u,t[2]=h*o+f*l+d*e,t[3]=p*r+y*a+g*c,t[4]=p*i+y*s+g*u,t[5]=p*o+y*l+g*e,t[6]=m*r+v*a+n*c,t[7]=m*i+v*s+n*u,t[8]=m*o+v*l+n*e,t};function ut(){var t=new st(16);return st!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ft(t,e,n,r,i,o,a,s,l,c,u,h,f,d,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=y,t[15]=g,t}function dt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function pt(t,e){var n,r,i,o,a,s;return t===e?(n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function yt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15],m=n*s-r*a,v=n*l-i*a,b=n*c-o*a,x=r*l-i*s,w=r*c-o*s,k=i*c-o*l,E=u*y-h*p,M=u*g-f*p,S=u*e-d*p,O=h*g-f*y,_=h*e-d*y,P=f*e-d*g,T=m*P-v*_+b*O+x*S-w*M+k*E;return T?(t[0]=(s*P-l*_+c*O)*(T=1/T),t[1]=(i*_-r*P-o*O)*T,t[2]=(y*k-g*w+e*x)*T,t[3]=(f*w-h*k-d*x)*T,t[4]=(l*S-a*P-c*M)*T,t[5]=(n*P-i*S+o*M)*T,t[6]=(g*b-p*k-e*v)*T,t[7]=(u*k-f*b+d*v)*T,t[8]=(a*_-s*S+c*E)*T,t[9]=(r*S-n*_-o*E)*T,t[10]=(p*w-y*b+e*m)*T,t[11]=(h*b-u*w-d*m)*T,t[12]=(s*M-a*O-l*E)*T,t[13]=(n*O-r*M+i*E)*T,t[14]=(y*v-p*x-g*m)*T,t[15]=(u*x-h*v+f*m)*T,t):null}function gt(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],y=t[14],t=t[15];return(e*a-n*o)*(h*t-f*y)-(e*s-r*o)*(u*t-f*p)+(e*l-i*o)*(u*y-h*p)+(n*s-r*a)*(c*t-f*d)-(n*l-i*a)*(c*y-h*d)+(r*l-i*s)*(c*p-u*d)}function mt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],y=e[12],g=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*h+w*y,t[1]=v*i+b*l+x*f+w*g,t[2]=v*o+b*c+x*d+w*m,t[3]=v*a+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*h+w*y,t[5]=v*i+b*l+x*f+w*g,t[6]=v*o+b*c+x*d+w*m,t[7]=v*a+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*h+w*y,t[9]=v*i+b*l+x*f+w*g,t[10]=v*o+b*c+x*d+w*m,t[11]=v*a+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*h+w*y,t[13]=v*i+b*l+x*f+w*g,t[14]=v*o+b*c+x*d+w*m,t[15]=v*a+b*u+x*p+w*e,t}function vt(t,e,n){var r,i,o,a,s,l,c,u,h,f,d,p,y=n[0],g=n[1],n=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+f*n+e[13],t[14]=o*y+c*g+d*n+e[14],t[15]=a*y+u*g+p*n+e[15]),t}function bt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function xt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=o*n+c*r,t[6]=a*n+u*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=c*n-o*r,t[10]=u*n-a*r,t[11]=h*n-s*r,t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[8],c=e[9],u=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=o*n-c*r,t[2]=a*n-u*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=o*r+c*n,t[10]=a*r+u*n,t[11]=s*r+h*n,t}function kt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Et(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=r+r,s=i+i,l=o+o,c=r*a,u=r*s,r=r*l,h=i*s,i=i*l,o=o*l,a=e*a,s=e*s,e=e*l;return t[0]=1-(h+o),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+o),t[6]=i+a,t[7]=0,t[8]=r+s,t[9]=i-a,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Mt(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(l,c,e),t}function Ot(t,e){var n=new st(3),r=(St(n,e),1/n[0]),i=1/n[1],n=1/n[2],o=e[0]*r,a=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=o+c+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(u-i)/h,t[1]=(r-s)/h,t[2]=(a-l)/h):c<o&&e<o?(h=2*Math.sqrt(1+o-c-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(a+l)/h,t[2]=(r+s)/h):e<c?(h=2*Math.sqrt(1+c-o-e),t[3]=(r-s)/h,t[0]=(a+l)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-o-c),t[3]=(a-l)/h,t[0]=(r+s)/h,t[1]=(u+i)/h,t[2]=.25*h),t}function _t(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],e=e[3],l=o+o,c=a+a,u=s+s,h=o*l,f=o*c,o=o*u,d=a*c,a=a*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],y=i[0],g=i[1],i=i[2],m=(1-(d+s))*u,v=(f+e)*u,u=(o-c)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(a+l)*p,p=(o+c)*r,o=(a-l)*r,c=(1-(h+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=f,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=o,t[10]=c,t[11]=0,t[12]=n[0]+y-(m*y+f*g+p*i),t[13]=n[1]+g-(v*y+e*g+o*i),t[14]=n[2]+i-(u*y+s*g+c*i),t[15]=1,t}function Pt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n+n,a=r+r,s=i+i,n=n*o,l=r*o,r=r*a,c=i*o,u=i*a,i=i*s,o=e*o,a=e*a,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-a,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+o,t[7]=0,t[8]=c+a,t[9]=u-o,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Tt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function At(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*c,t[15]=1,t}var Lt=At;function Nt(t,e,n,r){var i,o,a,s,l=e[0],c=e[1],e=e[2],u=r[0],h=r[1],r=r[2],f=n[0],d=n[1],n=n[2];return Math.abs(l-f)<at&&Math.abs(c-d)<at&&Math.abs(e-n)<at?dt(t):(f=l-f,d=c-d,n=e-n,i=h*(n*=s=1/Math.hypot(f,d,n))-r*(d*=s),r=r*(f*=s)-u*n,u=u*d-h*f,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,h=d*u-n*r,o=n*i-f*u,a=f*r-d*i,(s=Math.hypot(h,o,a))?(h*=s=1/s,o*=s,a*=s):a=o=h=0,t[0]=i,t[1]=h,t[2]=f,t[3]=0,t[4]=r,t[5]=o,t[6]=d,t[7]=0,t[8]=u,t[9]=a,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(h*l+o*c+a*e),t[14]=-(f*l+d*c+n*e),t[15]=1,t)}function Ct(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var jt=Object.freeze({__proto__:null,create:ut,clone:function(t){var e=new st(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:ht,fromValues:function(t,e,n,r,i,o,a,s,l,c,u,h,f,d,p,y){var g=new st(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=h,g[12]=f,g[13]=d,g[14]=p,g[15]=y,g},set:ft,identity:dt,transpose:pt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(f*e-d*g)-h*(l*e-c*g)+y*(l*d-c*f),t[1]=-(r*(f*e-d*g)-h*(i*e-o*g)+y*(i*d-o*f)),t[2]=r*(l*e-c*g)-s*(i*e-o*g)+y*(i*c-o*l),t[3]=-(r*(l*d-c*f)-s*(i*d-o*f)+h*(i*c-o*l)),t[4]=-(a*(f*e-d*g)-u*(l*e-c*g)+p*(l*d-c*f)),t[5]=n*(f*e-d*g)-u*(i*e-o*g)+p*(i*d-o*f),t[6]=-(n*(l*e-c*g)-a*(i*e-o*g)+p*(i*c-o*l)),t[7]=n*(l*d-c*f)-a*(i*d-o*f)+u*(i*c-o*l),t[8]=a*(h*e-d*y)-u*(s*e-c*y)+p*(s*d-c*h),t[9]=-(n*(h*e-d*y)-u*(r*e-o*y)+p*(r*d-o*h)),t[10]=n*(s*e-c*y)-a*(r*e-o*y)+p*(r*c-o*s),t[11]=-(n*(s*d-c*h)-a*(r*d-o*h)+u*(r*c-o*s)),t[12]=-(a*(h*g-f*y)-u*(s*g-l*y)+p*(s*f-l*h)),t[13]=n*(h*g-f*y)-u*(r*g-i*y)+p*(r*f-i*h),t[14]=-(n*(s*g-l*y)-a*(r*g-i*y)+p*(r*l-i*s)),t[15]=n*(s*f-l*h)-a*(r*f-i*h)+u*(r*l-i*s),t},determinant:gt,multiply:mt,translate:vt,scale:bt,rotate:function(t,e,n,r){var i,o,a,s,l,c,u,h,f,d,p,y,g,m,v,b,x,w,k,E,M=r[0],S=r[1],r=r[2],O=Math.hypot(M,S,r);return O<at?null:(M*=O=1/O,S*=O,r*=O,O=Math.sin(n),n=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],y=e[10],g=e[11],v=M*S*(i=1-n)-r*O,b=S*S*i+n,x=r*S*i+M*O,w=M*r*i+S*O,k=S*r*i-M*O,E=r*r*i+n,t[0]=o*(n=M*M*i+n)+c*(m=S*M*i+r*O)+d*(r=r*M*i-S*O),t[1]=a*n+u*m+p*r,t[2]=s*n+h*m+y*r,t[3]=l*n+f*m+g*r,t[4]=o*v+c*b+d*x,t[5]=a*v+u*b+p*x,t[6]=s*v+h*b+y*x,t[7]=l*v+f*b+g*x,t[8]=o*w+c*k+d*E,t[9]=a*w+u*k+p*E,t[10]=s*w+h*k+y*E,t[11]=l*w+f*k+g*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:xt,rotateY:wt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[4],c=e[5],u=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=o*n+c*r,t[2]=a*n+u*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=c*n-o*r,t[6]=u*n-a*r,t[7]=h*n-s*r,t},fromTranslation:kt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],o=n[1],n=n[2],a=Math.hypot(i,o,n);return a<at?null:(i*=a=1/a,o*=a,n*=a,a=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=o*i*r+n*a,t[2]=n*i*r-o*a,t[3]=0,t[4]=i*o*r-n*a,t[5]=o*o*r+e,t[6]=n*o*r+i*a,t[7]=0,t[8]=i*n*r+o*a,t[9]=o*n*r-i*a,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:Et,fromQuat2:function(t,e){var n=new st(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=r*r+i*i+o*o+a*a;return 0<h?(n[0]=2*(s*a+u*r+l*o-c*i)/h,n[1]=2*(l*a+u*i+c*r-s*o)/h,n[2]=2*(c*a+u*o+s*i-l*r)/h):(n[0]=2*(s*a+u*r+l*o-c*i),n[1]=2*(l*a+u*i+c*r-s*o),n[2]=2*(c*a+u*o+s*i-l*r)),Et(t,e,n),t},getTranslation:Mt,getScaling:St,getRotation:Ot,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],e=e[3],s=i*(u=i+i),l=i*(h=o+o),i=i*(f=a+a),c=o*h,o=o*f,a=a*f,u=e*u,h=e*h,e=e*f,f=r[0],d=r[1],r=r[2];return t[0]=(1-(c+a))*f,t[1]=(l+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+a))*d,t[6]=(o+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(o-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:_t,fromQuat:Pt,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),l=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t},perspectiveNO:Tt,perspective:Tt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+e),l=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-e)*s*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:At,ortho:Lt,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),a=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=a,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=o*a,t[15]=1,t},lookAt:Nt,targetTo:function(t,e,n,r){var i=e[0],o=e[1],e=e[2],a=r[0],s=r[1],r=r[2],l=i-n[0],c=o-n[1],n=e-n[2],u=l*l+c*c+n*n,h=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=h*h+(r=r*l-a*n)*r+(a=a*c-s*l)*a)&&(h*=u=1/Math.sqrt(u),r*=u,a*=u),t[0]=h,t[1]=r,t[2]=a,t[3]=0,t[4]=c*a-n*r,t[5]=n*h-l*a,t[6]=l*r-c*h,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=o,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Ct,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],y=t[13],g=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],E=e[6],M=e[7],S=e[8],O=e[9],_=e[10],P=e[11],T=e[12],A=e[13],L=e[14],e=e[15];return Math.abs(n-m)<=at*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=at*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=at*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-x)<=at*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-w)<=at*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-k)<=at*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-E)<=at*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(c-M)<=at*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-S)<=at*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(h-O)<=at*Math.max(1,Math.abs(h),Math.abs(O))&&Math.abs(f-_)<=at*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-P)<=at*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(p-T)<=at*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(y-A)<=at*Math.max(1,Math.abs(y),Math.abs(A))&&Math.abs(g-L)<=at*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(t-e)<=at*Math.max(1,Math.abs(t),Math.abs(e))},mul:mt,sub:Ct});function m(){var t=new st(3);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function E(t,e,n){var r=new st(3);return r[0]=t,r[1]=e,r[2]=n,r}function Rt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ft(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Dt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Bt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function zt(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Gt(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Ht(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Wt(t,e,n){var r=e[0],i=e[1],e=e[2],o=n[0],a=n[1],n=n[2];t[0]=i*n-e*a,t[1]=e*o-r*n,t[2]=r*a-i*o}function Yt(t,e,n){var r=e[0],i=e[1],e=e[2],o=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/o,t}function Vt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function qt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],o=e[1],e=e[2];return Math.abs(n-i)<=at*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=at*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(t-e)<=at*Math.max(1,Math.abs(t),Math.abs(e))}var Xt=Bt,Ut=It;function $t(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*e,t}function Kt(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Jt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Qt(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*a+i*l-o*s,t[1]=i*n+e*s+o*a-r*l,t[2]=o*n+e*l+r*s-i*a,t[3]=e*n-r*a-i*s-o*l,t}function te(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e,o=o?1/o:0;return t[0]=-n*o,t[1]=-r*o,t[2]=-i*o,t[3]=e*o,t}function ee(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),o=Math.sin(n),n=Math.cos(n),a=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*o*a,t[1]=e*o*r+i*n*a,t[2]=e*n*a-i*o*r,t[3]=e*n*r+i*o*a}m(),$t();var ne=function(t,e,n,r){var i=new st(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},re=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ie=Qt,oe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e;return 0<o&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=e*o,t};function ae(t,e){var n=new st(2);return n[0]=t,n[1]=e,n}function se(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function le(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ce(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ue(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function he(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function fe(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}m(),E(1,0,0),E(0,1,0),Kt(),Kt(),lt();var de=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function pe(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}t=new st(2),st!=Float32Array&&(t[0]=0,t[1]=0);var ye=function(t,e){return(ye=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ye(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var S=function(){return(S=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function U(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function ge(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}function me(t,a,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function i(t){try{o(l.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}o((l=l.apply(t,a||[])).next())})}function F(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function ve(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var be={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var xe={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function we(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return xe[e]===t.length-1&&"achlmqstvz".includes(e)})}function ke(t){return we(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Ee(t){return ke(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Me(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=xe[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,xe[n]))),xe[n]););}function Se(t){return 48<=t&&t<=57}function Oe(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function _e(t){var e,n,r,i,o,a=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=xe[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,Oe(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|c)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,o=t.index,a=o,s=!1,l=!1,c=!1;if(r<=a)t.err="[path-util]: Invalid path value at index "+a+', "pathValue" is missing param';else if(Se(n=43!==(n=i.charCodeAt(a))&&45!==n?n:i.charCodeAt(a+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(a+=1),e&&a<r&&n&&Se(n))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" illegal number';for(;a<r&&Se(i.charCodeAt(a));)a+=1,s=!0;n=i.charCodeAt(a)}if(46===n){for(c=!0,a+=1;Se(i.charCodeAt(a));)a+=1,l=!0;n=i.charCodeAt(a)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid float exponent';if(43!==(n=i.charCodeAt(a+=1))&&45!==n||(a+=1),!(a<r&&Se(i.charCodeAt(a))))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid integer exponent';for(;a<r&&Se(i.charCodeAt(a));)a+=1}t.index=a,t.param=+t.pathValue.slice(o,a)}else t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" is not a number'}(t):(o=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(o=i.charCodeAt(r))?(n.param=0,n.index+=1):49===o?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Oe(t),t.index<a&&44===s.charCodeAt(t.index)&&(t.index+=1,Oe(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Me(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Pe=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Te(t){var a,s,l,c;return ke(t)?pe(t):(t=function(t){if(we(t))return pe(t);var e=new Pe(t);for(Oe(e);e.index<e.max&&!e.err.length;)_e(e);return e.err||e.segments}(t),c=l=s=a=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return a=e[0],s=e[1],["M",l=a,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+a,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+a];break;default:var r=e.map(function(t,e){return t+(e%2?s:a)}),i=[n].concat(r)}else i=[n].concat(e);var o=i.length;switch(n){case"Z":a=l,s=c;break;case"H":a=i[1];break;case"V":s=i[1];break;default:a=i[o-2],s=i[o-1],"M"===n&&(l=a,c=s)}return i}))}function Ae(t){if(Ee(t))return pe(t);for(var e,n,r,i,o,a,s,l=Te(t),c=S({},be),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=a=f=o=h=i=r=void 0,r=e[0],i=n.x1,h=n.y1,o=n.x2,f=n.y2,a=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],h]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*h-f,s=["C",n.x1=2*i-o,n.y1=e].concat(a)):"T"===r?(f=2*i-n.qx,o=2*h-n.qy,s=["Q",n.qx=f,n.qy=o].concat(a)):"Q"===r&&(e=a[0],i=a[1],n.qx=e,n.qy=i),s);var h=l[u],f=h.length;c.x1=+h[f-2],c.y1=+h[f-1],c.x2=+h[f-4]||c.x1,c.y2=+h[f-3]||c.y1}return l}function Le(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ne(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Ce(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function je(t,e,n,r,i){var o=Ce([t,e],[n,r]),a={x:0,y:0};return{length:o,point:a="number"==typeof i?i<=0?{x:t,y:e}:o<=i?{x:n,y:r}:{x:(i=Ne([t,e],[n,r],i/o))[0],y:i[1]}:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Ie(t,e,n,r){var t=[t,e],e=[n,r],i=Ne(t,e,.5),e=Ne(e,i,.5),o=Ne(i,e,.5),a=Ne(e,o,.5),s=Ne(o,a,.5),t=je(t[0],t[1],i[0],i[1],o[0]).point,i=je(s[0],s[1],a[0],a[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Re(t,e){var n,r,i,o,a,s,l=t[0],c=t.slice(1).map(Number),u=c[0],h=c[1],f=e.x1,d=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(c),["C"].concat(function t(e,n,r,i,o,a,s,l,c,u){var h=120*Math.PI/180,f=Math.PI/180*(+o||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(g=Le(e,n,-f)).x,n=g.y,1<(p=(y=(e-(l=(g=Le(l,c,-f)).x))/2)*y/(r*r)+(g=(n-(c=g.y))/2)*g/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(a=(a===s?-1:1)*Math.sqrt(Math.abs((p*m-p*g*g-m*y*y)/(p*g*g+m*y*y))))*r*g/i+(e+l)/2,b=a*-i*y/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),y=(Math.abs(p)>h&&(m=w,g=l,a=c,w=x+h*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,o,0,s,g,a,[w,m,v,b])),p=w-x,Math.cos(x)),h=Math.sin(x),o=Math.cos(w),s=Math.sin(w),g=Math.tan(p/4),a=4/3*r*g,m=4/3*i*g,v=[e,n],b=[e+a*h,n-m*y],x=[l+a*s,c-m*o],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var k=[],E=0,M=(d=b.concat(x,w,d)).length;E<M;E+=1)k[E]=E%2?Le(d[E-1],d[E],f).y:Le(d[E],d[E+1],f).x;return k}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=h,s=[f,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],o=s[3],a=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*s+2/3*o,a,s]));case"L":return["C"].concat(Ie(f,d,u,h));case"Z":return f===p&&d===y?["C",f,d,p,y,p,y]:["C"].concat(Ie(f,d,p,y))}return t}function Fe(t,e){var n;if(void 0===e&&(e=!1),Ee(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=pe(t),e?[n,[]]:n;for(var r,i=Ae(t),o=S({},be),a=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),a[u]=s;var h=Re(i[u],o),f=(i[u]=h,g=y=p=d=f=void 0,i),d=a,p=u;if(7<f[p].length){f[p].shift();for(var y=f[p],g=p;y.length;)d[p]="A",f.splice(g+=1,0,["C"].concat(y.splice(0,6)));f.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(h=i[u]).length,o.x1=+h[r-2],o.y1=+h[r-1],o.x2=+h[r-4]||o.x1,o.y2=+h[r-3]||o.y1}return e?[i,c]:i}function De(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,o=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/o)}function Be(t,e,n,r,i,R,F,o,a,s,l){var c=l.bbox,D=void 0===c||c,c=l.length,B=void 0===c||c,c=l.sampleSize,u=void 0===c?30:c,h="number"==typeof s,f=t,d=e,p=0,y=[f,d,p],g=[f,d],m={x:0,y:0},v=[{x:f,y:d}];h&&s<=0&&(m={x:f,y:d});for(var b,x,w,k,E,M,S,O,_,P,T,A,L,N,C,j,I=0;I<=u;I+=1)b=t,x=e,w=n,k=r,E=i,M=R,S=F,O=o,_=a,P=I/u,A=j=C=N=L=A=T=void 0,A=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=A(w),A=A(k),k=j/180*((E%360+360)%360),f=(T=b===O&&x===_?{x:b,y:x}:0===w||0===A?je(b,x,O,_,P).point:(E=(b-O)/2,T=(x-_)/2,E={x:N(k)*E+L(k)*T,y:-L(k)*E+N(k)*T},1<(T=Math.pow(E.x,2)/Math.pow(w,2)+Math.pow(E.y,2)/Math.pow(A,2))&&(w*=C(T),A*=C(T)),T=(Math.pow(w,2)*Math.pow(A,2)-Math.pow(w,2)*Math.pow(E.y,2)-Math.pow(A,2)*Math.pow(E.x,2))/(Math.pow(w,2)*Math.pow(E.y,2)+Math.pow(A,2)*Math.pow(E.x,2)),M=(M!==S?1:-1)*C(T<0?0:T),C=w*E.y/A*M,T=-A*E.x/w*M,M=N(k)*C-L(k)*T+(b+O)/2,b=L(k)*C+N(k)*T+(x+_)/2,x=De({x:1,y:0},O={x:(E.x-C)/w,y:(E.y-T)/A}),_=De(O,{x:(-E.x-C)/w,y:(-E.y-T)/A}),!S&&0<_?_-=2*j:S&&_<0&&(_+=2*j),O=x+(_%=2*j)*P,C=w*N(O),E=A*L(O),{x:N(k)*C-L(k)*E+M,y:L(k)*C+N(k)*E+b})).x,d=T.y,D&&v.push({x:f,y:d}),B&&(p+=Ce(g,[f,d])),g=[f,d],h&&s<=p&&s>y[2]&&(S=(p-s)/(p-y[2]),m={x:g[0]*(1-S)+y[0]*S,y:g[1]*(1-S)+y[1]*S}),y=[f,d,p];return{length:p,point:m=h&&p<=s?{x:o,y:a}:m,min:{x:Math.min.apply(null,v.map(function(t){return t.x})),y:Math.min.apply(null,v.map(function(t){return t.y}))},max:{x:Math.max.apply(null,v.map(function(t){return t.x})),y:Math.max.apply(null,v.map(function(t){return t.y}))}}}function ze(t,e,n,r,i,o,a,s,l,c){var u=c.bbox,h=void 0===u||u,u=c.length,f=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,y=t,g=e,m=0,v=[y,g,m],b=[y,g],x={x:0,y:0},w=[{x:y,y:g}];p&&l<=0&&(x={x:y,y:g});for(var k,E,M,S,O,_,P,T,A,L,N=0;N<=d;N+=1)k=t,E=e,M=n,S=r,O=i,_=o,P=a,T=s,L=void 0,L=1-(A=N/d),y=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*A*M+3*L*Math.pow(A,2)*O+Math.pow(A,3)*P,y:Math.pow(L,3)*E+3*Math.pow(L,2)*A*S+3*L*Math.pow(A,2)*_+Math.pow(A,3)*T}).x,g=k.y,h&&w.push({x:y,y:g}),f&&(m+=Ce(b,[y,g])),b=[y,g],p&&l<=m&&l>v[2]&&(M=(m-l)/(m-v[2]),x={x:b[0]*(1-M)+v[0]*M,y:b[1]*(1-M)+v[1]*M}),v=[y,g,m];return{length:m,point:x=p&&m<=l?{x:a,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Ge(t,e,n,r,i,o,a,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,f="number"==typeof a,d=t,p=e,y=0,g=[d,p,y],m=[d,p],v={x:0,y:0},b=[{x:d,y:p}];f&&a<=0&&(v={x:d,y:p});for(var x,w,k,E,M,S,O,_,P=0;P<=h;P+=1)x=t,w=e,k=n,E=r,M=i,S=o,_=void 0,_=1-(O=P/h),d=(x={x:Math.pow(_,2)*x+2*_*O*k+Math.pow(O,2)*M,y:Math.pow(_,2)*w+2*_*O*E+Math.pow(O,2)*S}).x,p=x.y,c&&b.push({x:d,y:p}),u&&(y+=Ce(m,[d,p])),m=[d,p],f&&a<=y&&a>g[2]&&(k=(y-a)/(y-g[2]),v={x:m[0]*(1-k)+g[0]*k,y:m[1]*(1-k)+g[1]*k}),g=[d,p,y];return{length:y,point:v=f&&y<=a?{x:i,y:o}:v,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function He(t,e,n){for(var r,i,o,a=Ae(t),s="number"==typeof e,l=[],c=0,u=0,h=0,f=0,d=[],p=[],y=0,g={x:0,y:0},m=g,v=g,b=g,x=0,w=0,k=a.length;w<k;w+=1)l=(r="M"===(i=(o=a[w])[0]))?l:[c,u].concat(o.slice(1)),r?(m=g={x:h=o[1],y:f=o[2]},y=0,s&&e<.001&&(b=g)):"L"===i?(y=(r=je(l[0],l[1],l[2],l[3],(e||0)-x)).length,g=r.min,m=r.max,v=r.point):"A"===i?(y=(r=Be(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"C"===i?(y=(r=ze(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"Q"===i?(y=(r=Ge(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"Z"===i&&(y=(r=je((l=[c,u,h,f])[0],l[1],l[2],l[3],(e||0)-x)).length,g=r.min,m=r.max,v=r.point),s&&x<e&&e<=x+y&&(b=v),p.push(m),d.push(g),x+=y,c=(r="Z"!==i?o.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:c,y:u}:b,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,p.map(function(t){return t.x})),y:Math.max.apply(null,p.map(function(t){return t.y}))}}}function We(t){return(c=l=s=0)<=Fe(t).map(function(t){var e,n,r,i,o,a;return"M"===t[0]?(s=t[1],l=t[2],0):(a=t.slice(1),e=a[0],n=a[1],r=a[2],i=a[3],o=a[4],a=a[5],c=3*((a-l)*(e+r)-(o-s)*(n+i)+n*(s-r)-e*(l-i)+a*(r+s/3)-o*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Ye(t){return t.map(function(t,e,n){var r,i,o,a,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?ze(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),o=e.slice(4,6),e=e.slice(6,8),n=Ne(n,i,r),i=Ne(i,o,r),o=Ne(o,e,r),a=Ne(n,i,r),i=Ne(i,o,r),r=Ne(a,i,r),[["C"].concat(n,a,r),["C"].concat(i,o,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}function Ve(t){var e=typeof t;return null!==t&&"object"==e||"function"==e}function qe(o,a){if("function"!=typeof o)throw new TypeError("Expected a function");function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=a?a.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=o.apply(this,t),i.set(r,n),n)}return s.cache=new Map,s}var _=function(t){return null==t},Xe={}.toString,Ue=function(t,e){return Xe.call(t)==="[object "+e+"]"},$e=function(t){return Ue(t,"String")},Ze=function(t,e,n){return t<e?e:n<t?n:t},Ke=function(t){return Ue(t,"Number")},Je=function(t){return Ue(t,"Boolean")},Qe=function(t){return void 0===t};function tn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function en(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function nn(){}var t="\\s*([+-]?\\d+)\\s*",e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",on=/^#([0-9a-f]{3,8})$/,an=new RegExp("^rgb\\("+[t,t,t]+"\\)$"),sn=new RegExp("^rgb\\("+[rn,rn,rn]+"\\)$"),ln=new RegExp("^rgba\\("+[t,t,t,e]+"\\)$"),cn=new RegExp("^rgba\\("+[rn,rn,rn,e]+"\\)$"),un=new RegExp("^hsl\\("+[e,rn,rn]+"\\)$"),hn=new RegExp("^hsla\\("+[e,rn,rn,e]+"\\)$"),fn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function dn(){return this.rgb().formatHex()}function pn(){return this.rgb().formatRgb()}function yn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=on.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?gn(e):3===n?new vn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?mn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?mn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=an.exec(t))?new vn(e[1],e[2],e[3],1):(e=sn.exec(t))?new vn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ln.exec(t))?mn(e[1],e[2],e[3],e[4]):(e=cn.exec(t))?mn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=un.exec(t))?kn(e[1],e[2]/100,e[3]/100,1):(e=hn.exec(t))?kn(e[1],e[2]/100,e[3]/100,e[4]):fn.hasOwnProperty(t)?gn(fn[t]):"transparent"===t?new vn(NaN,NaN,NaN,0):null}function gn(t){return new vn(t>>16&255,t>>8&255,255&t,1)}function mn(t,e,n,r){return new vn(t=r<=0?e=n=NaN:t,e,n,r)}function vn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function bn(){return"#"+wn(this.r)+wn(this.g)+wn(this.b)}function xn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function wn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function kn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Mn(t,e,n,r)}function En(t){var e,n,r,i,o,a,s,l;return t instanceof Mn?new Mn(t.h,t.s,t.l,t.opacity):(t=t instanceof nn?t:yn(t))?t instanceof Mn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=NaN,l=((o=Math.max(e,n,r))+i)/2,(s=o-i)?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=0<l&&l<1?0:a,new Mn(a,s,l,t.opacity)):new Mn}function Mn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function On(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function _n(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}tn(nn,yn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:dn,formatHex:dn,formatHsl:function(){return En(this).formatHsl()},formatRgb:pn,toString:pn}),tn(vn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof nn?i:yn(i))?new vn((i=i.rgb()).r,i.g,i.b,i.opacity):new vn:new vn(t,e,n,null==r?1:r);var i},en(nn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bn,formatHex:bn,formatRgb:xn,toString:xn})),tn(Mn,function(t,e,n,r){return 1===arguments.length?En(t):new Mn(t,e,n,null==r?1:r)},en(nn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Mn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Mn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new vn(Sn(240<=t?t-240:120+t,n,e),Sn(t,n,e),Sn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Pn={box:function(t,e,n,r){return _n([t,n],[e,r])},length:On,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?On(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?On(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a,n=[n-t,r-e];return(r=n)[0]===(a=[0,0])[0]&&r[1]===a[1]?Math.sqrt((i-t)*(i-t)+(o-e)*(o-e)):(fe(r=[-n[1],n[0]],r),a=[i-t,o-e],Math.abs(a[0]*r[0]+a[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Tn(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],o=t[r+1],a=On(i[0],i[1],o[0],o[1]);n.push({from:i,to:o,length:a}),e+=a}return{segments:n,totalLength:e}}var An,Ln,Nn={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return _n(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],o=e[r+1];n+=On(i[0],i[1],o[0],o[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=Tn(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var o=0,a=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=Pn.pointAt(c[0],c[1],u[0],u[1],(n-o)/l);break}o+=l}return a},pointDistance:function(t,e,n){for(var r=t,i=e,o=n,a=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Pn.pointDistance(l[0],l[1],c[0],c[1],i,o);l<a&&(a=l)}return a},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Tn(t)).segments,i=t.totalLength,o=0,a=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=Math.atan2(u[1]-c[1],u[0]-c[0]);break}o+=l}return a}},Cn={exports:{}};function jn(){}function In(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Rn(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new In(n,r||t,i),r=Ln?Ln+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Fn(t,e){0==--t._eventsCount?t._events=new jn:delete t._events[e]}function Dn(){this._events=new jn,this._eventsCount=0}t=Cn,An=Object.prototype.hasOwnProperty,Ln="~",Object.create&&(jn.prototype=Object.create(null),(new jn).__proto__||(Ln=!1)),Dn.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)An.call(t,e)&&n.push(Ln?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Dn.prototype.listeners=function(t){var t=Ln?Ln+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},Dn.prototype.listenerCount=function(t){t=Ln?Ln+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Dn.prototype.emit=function(t,e,n,r,i,o){var a=Ln?Ln+t:t;if(!this._events[a])return!1;var s,l=this._events[a],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,o),!0}for(f=1,s=new Array(c-1);f<c;f++)s[f-1]=arguments[f];l.fn.apply(l.context,s)}else for(var u,h=l.length,f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),c){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,n);break;case 4:l[f].fn.call(l[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[f].fn.apply(l[f].context,s)}return!0},Dn.prototype.on=function(t,e,n){return Rn(this,t,e,n,!1)},Dn.prototype.once=function(t,e,n){return Rn(this,t,e,n,!0)},Dn.prototype.removeListener=function(t,e,n,r){t=Ln?Ln+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Fn(this,t);else{for(var o=0,a=[],s=i.length;o<s;o++)(i[o].fn!==e||r&&!i[o].once||n&&i[o].context!==n)&&a.push(i[o]);a.length?this._events[t]=1===a.length?a[0]:a:Fn(this,t)}}else Fn(this,t);return this},Dn.prototype.removeAllListeners=function(t){return t?(t=Ln?Ln+t:t,this._events[t]&&Fn(this,t)):(this._events=new jn,this._eventsCount=0),this},Dn.prototype.off=Dn.prototype.removeListener,Dn.prototype.addListener=Dn.prototype.on,Dn.prefixed=Ln,t.exports=Dn.EventEmitter=Dn;var n,rn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let Bn=1;const zn="object"==typeof self&&self.self==self?self:"object"==typeof rn&&rn.global==rn?rn:{},Gn=Date.now();let Hn={},Wn=Date.now();const Yn=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Wn,r=16<e?0:16-e,i=Bn++;return Hn[i]=t,1<Object.keys(Hn).length||setTimeout(()=>{Wn=n;const e=Hn;Hn={},Object.keys(e).forEach(t=>e[t](zn.performance&&"function"==typeof zn.performance.now?zn.performance.now():Date.now()-Gn))},r),i}:""===t?zn.requestAnimationFrame:zn[t+"RequestAnimationFrame"],Vn=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Yn(t)),qn=Yn(Vn),Xn="string"!=typeof(e=Vn)?t=>{delete Hn[t]}:""===e?zn.cancelAnimationFrame:zn[e+"CancelAnimationFrame"]||zn[e+"CancelRequestAnimationFrame"];zn.requestAnimationFrame=qn,zn.cancelAnimationFrame=Xn,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:qn,cancelAnimationFrame:Xn}),(t=n=n||{}).COORDINATE="<coordinate>",t.COLOR="<color>",t.PAINT="<paint>",t.NUMBER="<number>",t.ANGLE="<angle>",t.OPACITY_VALUE="<opacity-value>",t.SHADOW_BLUR="<shadow-blur>",t.LENGTH="<length>",t.PERCENTAGE="<percentage>",t.LENGTH_PERCENTAGE="<length> | <percentage>",t.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",t.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",t.LIST_OF_POINTS="<list-of-points>",t.PATH="<path>",t.FILTER="<filter>",t.Z_INDEX="<z-index>",t.OFFSET_DISTANCE="<offset-distance>",t.DEFINED_PATH="<defined-path>",t.MARKER="<marker>",t.TRANSFORM="<transform>",t.TRANSFORM_ORIGIN="<transform-origin>",t.TEXT="<text>",t.TEXT_TRANSFORM="<text-transform>";var Un,M,$n=function(){function g(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}g.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=g.prototype;return t.update=function(t,e){Rt(this.center,t),Rt(this.halfExtents,e),Xt(this.min,this.center,this.halfExtents),Dt(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Dt(this.center,e,t),zt(this.center,this.center,.5),Xt(this.halfExtents,e,t),zt(this.halfExtents,this.halfExtents,.5),Rt(this.min,t),Rt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,o,a,s,l,c,u,h,f,d,p,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],o=e[2],i=(r=this.halfExtents)[0],h=r[1],a=r[2],l=(f=t.center)[0],y=f[1],f=f[2],c=(t=t.halfExtents)[0],(d=y-(u=t[1]))<(s=p-h)&&(s=d),(d=p+h)<(p=y+u)&&(d=p),(y=f-(h=t[2]))<(u=o-a)&&(u=y),(p=o+a)<(t=f+h)&&(p=t),e[0]=.5*((o=(y=l-c)<(o=n-i)?y:o)+(a=(a=n+i)<(f=l+c)?f:a)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(a-o),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=o,this.min[1]=s,this.min[2]=u,this.max[0]=a,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,o=e[0],a=e[4],s=e[8],l=e[1],c=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(o),y=Math.abs(a),g=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),k=Math.abs(d);Ft(n,e[12]+o*i[0]+a*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+h*i[0]+f*i[1]+d*i[2]),Ft(r,p*t[0]+y*t[1]+g*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Xt(this.min,n,r),this.max=Dt(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new g,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Rt(m(),this.min):272===t.pnVertexFlag?E(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?E(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?E(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?E(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?E(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?E(this.max[0],this.max[1],this.min[2]):E(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Rt(m(),this.max):272===t.pnVertexFlag?E(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?E(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?E(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?E(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?E(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?E(this.min[0],this.min[1],this.max[2]):E(this.min[0],this.min[1],this.min[2])},g}(),Zn=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||E(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Ht(t,this.normal)-this.distance},e.normalize=function(){var t=1/Ut(this.normal);zt(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r,i,o=this.distanceToPoint(t),o=o/(o-this.distanceToPoint(e)),a=0<=o&&o<=1;return a&&n&&(n=n,e=e,o=o,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+o*(e[0]-r),n[1]=i+o*(e[1]-i),n[2]=t+o*(e[2]-t)),a},t}(),Kn=((e=Un=Un||{})[e.OUTSIDE=4294967295]="OUTSIDE",e[e.INSIDE=0]="INSIDE",e[e.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Zn)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],y=t[14],t=t[15];Ft(this.planes[0].normal,i-e,l-o,f-c),this.planes[0].distance=t-d,Ft(this.planes[1].normal,i+e,l+o,f+c),this.planes[1].distance=t+d,Ft(this.planes[2].normal,i+n,l+a,f+u),this.planes[2].distance=t+p,Ft(this.planes[3].normal,i-n,l-a,f-u),this.planes[3].distance=t-p,Ft(this.planes[4].normal,i-r,l-s,f-h),this.planes[4].distance=t-y,Ft(this.planes[5].normal,i+r,l+s,f+h),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Jn=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Qn=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),tr=((t=M=M||{}).GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html",t.MESH="mesh",qe(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function er(t){if(!t)throw new Error}function nr(t,e){if(t===e)throw new Error}function rr(t){return"function"==typeof t}var ir={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},or=qe(function(t){var t=tr(t),e=ir[t];return[(null==e?void 0:e.alias)||t,e]});function ar(t,e){var t=or(t),n=t[0],t=t[1];return[n,$e(e)&&(null==t||null==(n=t.values)?void 0:n[e])||e]}var sr={},lr=0;var cr="undefined"!=typeof window&&void 0!==window.document;function ur(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function hr(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function fr(t,e){if(cr)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var y,dr,pr,yr,gr="Method not implemented.",mr="Use document.documentElement instead.",vr={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function O(){O=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function br(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function xr(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){br(r,e,n,i,o,"next",t)}function o(t){br(r,e,n,i,o,"throw",t)}i(void 0)})}}function wr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kr(t,e,n){e&&wr(t.prototype,e),n&&wr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function s(){return(s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function l(t,e){t.prototype=Object.create(e.prototype),Er(t.prototype.constructor=t,e)}function Er(t,e){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mr(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||(r[n]=t[n]);return r}function Sr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Or(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _r(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Or(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=y=y||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(t=dr=dr||{})[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUOther=5]="kUOther",(e=pr=pr||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",(t=yr=yr||{})[t.kYes=0]="kYes",t[t.kNo=1]="kNo";function Pr(t){return t?"number"===t?y.kNumber:"percent"===t||"%"===t?y.kPercentage:(e=t,jr.find(function(t){return t.name===e}).unit_type):y.kUnknown;var e}function Tr(t){var e=1;switch(t){case y.kPixels:case y.kDegrees:case y.kSeconds:break;case y.kMilliseconds:e=.001;break;case y.kRadians:e=180/Math.PI;break;case y.kGradians:e=.9;break;case y.kTurns:e=360}return e}function Ar(t){switch(t){case y.kNumber:case y.kInteger:return"";case y.kPercentage:return"%";case y.kEms:return"em";case y.kRems:return"rem";case y.kPixels:return"px";case y.kDegrees:return"deg";case y.kRadians:return"rad";case y.kGradians:return"grad";case y.kMilliseconds:return"ms";case y.kSeconds:return"s";case y.kTurns:return"turn"}return""}var Lr,Nr,Cr,c,jr=[{name:"em",unit_type:y.kEms},{name:"px",unit_type:y.kPixels},{name:"deg",unit_type:y.kDegrees},{name:"rad",unit_type:y.kRadians},{name:"grad",unit_type:y.kGradians},{name:"ms",unit_type:y.kMilliseconds},{name:"s",unit_type:y.kSeconds},{name:"rem",unit_type:y.kRems},{name:"turn",unit_type:y.kTurns}],t=((e=Lr=Lr||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===y.kDegrees||t===y.kRadians||t===y.kGradians||t===y.kTurns},t.isLength=function(t){return t>=y.kEms&&t<y.kDegrees},t.isRelativeUnit=function(t){return t===y.kPercentage||t===y.kEms||t===y.kRems},t.isTime=function(t){return t===y.kSeconds||t===y.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(pr.kNo,yr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Lr.kUnitType&&this.getType()<=Lr.kClampType},t}()),e=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}l(t,n);var e=t.prototype;return e.getType=function(){return Lr.kColorType},e.to=function(t){return this},t}(t),Ir=((r=Nr=Nr||{})[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}l(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Lr.kColorType},t}(t)),Rr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}l(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Lr.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(t);(r=Cr=Cr||{}).kAdd="+",r.kSubtract="-",r.kMultiply="*",r.kDivide="/",r.kMin="min",r.kMax="max",r.kClamp="clamp",r.kInvalid="",(r=c=c||{})[r.kLength=0]="kLength",r[r.kAngle=1]="kAngle",r[r.kTime=2]="kTime",r[r.kFrequency=3]="kFrequency",r[r.kResolution=4]="kResolution",r[r.kFlex=5]="kFlex",r[r.kPercent=6]="kPercent",r[r.kNumBaseTypes=7]="kNumBaseTypes";function Fr(t){return"number"==typeof t?new Vr(t,y.kNumber):t}var Dr=function(){function t(t,e){void 0===t&&(t=y.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=c.kPercent,this.hasPercentHint=!1,this.exponents=new Array(c.kNumBaseTypes).fill(0),t!==y.kNumber&&this.setExponent(function(t){switch(nr(t,y.kNumber),t){case y.kEms:case y.kPixels:case y.kRems:return c.kLength;case y.kMilliseconds:case y.kSeconds:return c.kTime;case y.kDegrees:case y.kRadians:case y.kGradians:case y.kTurns:return c.kAngle;case y.kPercentage:return c.kPercent;default:return c.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){nr(t,c.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(c.kPercent)),this.setExponent(c.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return nr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return nr(t,c.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(c.kPercent,1)},e.matchesBaseTypePercentage=function(t){return nr(t,c.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(c.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(c.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var o=0;o<c.kNumBaseTypes;++o){var a=o;if(t.exponents[o]!==e.exponents[o]&&(a!==c.kPercent&&(t.applyPercentHint(a),e.applyPercentHint(a)),t.exponents[o]!==e.exponents[o]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<c.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),r=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}l(d,n);var t=d.prototype;return t.getType=function(){return Lr.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Br(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Br(e),i=(zr(Lr.kSumType,r,this),Hr(r,Cr.kAdd));return i||Jr.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Br(e)).map(function(t){return t.negate()}),i=(zr(Lr.kSumType,r,this),Hr(r,Cr.kAdd));return i||Jr.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Br(e),i=(zr(Lr.kProductType,r,this),Wr(r));return i||Qr.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Br(e)).map(function(t){return t.invert()}),i=(zr(Lr.kProductType,r,this),Wr(r));return i||Qr.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Br(e),i=(zr(Lr.kMinType,r,this),Hr(r,Cr.kMin));return i||Zr.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Br(e),i=(zr(Lr.kMaxType,r,this),Hr(r,Cr.kMax));return i||Kr.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Gr(e[0]))?(t="string"==typeof t?Pr(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o=i[r];if(!d.isValidUnit(Pr(o)))return null}var a=this.sumValue();if(!a.length)return null;for(var s=[],l=_r(a);!(c=l()).done;){var c=Gr(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),er(!!(a=Jr.create(s))),a;for(var u=[],h=0,f=e;h<f.length;h++)!function(){var t=f[h],r=Pr(t),t=(er(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new Vr(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Jr.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(c.kLength);return e&&(t.length=e),(e=this.type_.exponent(c.kAngle))&&(t.angle=e),(e=this.type_.exponent(c.kTime))&&(t.time=e),(e=this.type_.exponent(c.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(c.kResolution))&&(t.resolution=e),(e=this.type_.exponent(c.kFlex))&&(t.flex=e),(e=this.type_.exponent(c.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case c.kLength:return"length";case c.kAngle:return"angle";case c.kTime:return"time";case c.kFrequency:return"frequency";case c.kResolution:return"resolution";case c.kFlex:return"flex";case c.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===y.kNumber||t==y.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Xr.create(this)},t.invert=function(){return qr.create(this)},d}(t);function Br(t){return t.map(Fr)}function zr(t,e,n){er(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Gr(t){return 0===Object.keys(t.units).length?new Vr(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Vr(t.value,Number(Object.keys(t.units)[0])):null}function Hr(t,e){er(!!t.length);var n=t[0]instanceof Vr?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof Vr?t[i]:null;if(!o||o.unit!==n.unit)return null;e===Cr.kAdd?r+=o.value:e===Cr.kMax?r=Math.max(r,o.value):e===Cr.kMin&&(r=Math.min(r,o.value))}return new Vr(r,n.unit)}function Wr(t){er(!!t.length);for(var e=y.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Vr?t[r]:null;if(!i)return null;if(i.unit!==y.kNumber){if(e!==y.kNumber)return null;e=i.unit}n*=i.value}return new Vr(n,e)}function Yr(t){switch(function(t){switch(t){case y.kNumber:case y.kInteger:return dr.kUNumber;case y.kPercentage:return dr.kUPercent;case y.kPixels:return dr.kULength;case y.kMilliseconds:case y.kSeconds:return dr.kUTime;case y.kDegrees:case y.kRadians:case y.kGradians:case y.kTurns:return dr.kUAngle;default:return dr.kUOther}}(t)){case dr.kUNumber:return y.kNumber;case dr.kULength:return y.kPixels;case dr.kUPercent:return y.kPercentage;case dr.kUTime:return y.kSeconds;case dr.kUAngle:return y.kDegrees;default:return y.kUnknown}}var Vr=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?y.kNumber:e)?Pr(e):e;return(n=r.call(this,new Dr(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}l(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Yr(this.unit))!==Yr(t)||e===y.kUnknown?null:(e=Tr(this.unit)/Tr(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Lr.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==y.kNumber&&(r[t=this.unit,(e=Yr(t))===y.kUnknown?t:e]=1),n.push({value:this.value*Tr(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===y.kNumber?0===this.value?null:new n(1/this.value,this.unit):qr.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case y.kUnknown:break;case y.kInteger:i=Number(this.value).toFixed(0);break;case y.kNumber:case y.kPercentage:case y.kEms:case y.kRems:case y.kPixels:case y.kDegrees:case y.kRadians:case y.kGradians:case y.kMilliseconds:case y.kSeconds:case y.kTurns:var r,i,o=this.value,a=Ar(this.unit);i=o<-999999||999999<o?(r=Ar(this.unit),!Number.isFinite(o)||Number.isNaN(o)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(er(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(o,r):o+(r||"")):""+o+a}return n+=i},n}(r),t=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype.isUnitValue=function(){return!1},e}(r),qr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}l(e,n),e.create=function(t){return new e(t,Dr.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Lr.kInvertType},t.equals=function(t){return t.getType()===Lr.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==yr.kNo&&(n+=t===pr.kYes?"(":"calc("),n=this.value.buildCSSText(pr.kYes,yr.kNo,n+="1 / "),e===yr.kNo&&(n+=")"),n},e}(t),Xr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}l(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Lr.kNegateType},t.equals=function(t){return t.getType()===Lr.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==yr.kNo&&(n+=t===pr.kYes?"(":"calc("),n=this.value.buildCSSText(pr.kYes,yr.kNo,n+="-"),e===yr.kNo&&(n+=")"),n},e}(t);function Ur(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function $r(t){return oi[t]||(oi[t]=new Rr(t)),oi[t]}var r=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}l(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(t),Zr=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}l(e,i),e.create=function(t){return new e(t,Ur(t,Dr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Lr.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=_r(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,o=_r(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(pr.kYes,yr.kYes,n);return n+=")"},e}(r),Kr=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}l(e,i),e.create=function(t){return new e(t,Ur(t,Dr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Lr.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=_r(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,o=_r(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(pr.kYes,yr.kYes,n);return n+=")"},e}(r),Jr=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}l(e,i),e.create=function(t){return new e(t,Ur(t,Dr.add))},e.numericTypeFromUnitMap=function(n){var r=new Dr;return Object.keys(n).forEach(function(t){var e=n[t];r=Dr.multiply(r,new Dr(Number(t),e),!1),er(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(er(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Dr.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Lr.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(s({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==yr.kNo&&(n+=t===pr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(pr.kYes,yr.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=(o.getType()===Lr.kNegateType?(n+=" - ",o.value):(n+=" + ",o)).buildCSSText(pr.kYes,yr.kNo,n)}return e===yr.kNo&&(n+=")"),n},e}(r),Qr=function(i){function o(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}l(o,i),o.create=function(t){return new o(t,Ur(t,Dr.multiply))},o.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){nr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=o.prototype;return t.clone=function(){return new o(this.values,this.type_)},t.getType=function(){return Lr.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:o.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==yr.kNo&&(n+=t===pr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(pr.kYes,yr.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=(o.getType()===Lr.kInvertType?(n+=" / ",o.value):(n+=" * ",o)).buildCSSText(pr.kYes,yr.kNo,n)}return e===yr.kNo&&(n+=")"),n},o}(r),ti=new Vr(0,"px"),ei=(new Vr(1,"px"),new Vr(0,"deg")),ni=function(a){function t(t,e,n,r,i){var o;return void 0===r&&(r=1),void 0===i&&(i=!1),(o=a.call(this,"rgb")||this).r=void 0,o.g=void 0,o.b=void 0,o.alpha=void 0,o.isNone=void 0,o.r=t,o.g=e,o.b=n,o.alpha=r,o.isNone=i,o}l(t,a);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(e),ri=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;b.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},ii=new Rr("unset"),t=new Rr("initial"),r=new Rr("inherit"),oi={"":ii,unset:ii,initial:t,inherit:r},ai=new ni(0,0,0,0,!0),si=new ni(0,0,0,0),li=qe(function(t,e,n,r){return new ni(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ci=qe(function(t,e){return void 0===e&&(e=y.kNumber),new Vr(t,e)},function(t,e){return""+t+(e=void 0===e?y.kNumber:e)}),ui=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,hi=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,fi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,di=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var pi={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},yi=qe(function(t){t="angular"===t.type?Number(t.value):pi[t.value]||0;return ci(t,"deg")}),gi=qe(function(t){var e,n=50,r=50,i="%",o="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(o=null==t?void 0:t.type,r=Number(t.value))),{cx:ci(n,i),cy:ci(r,o)}}),mi=qe(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Ro(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,o=(r[i-1].length=null!=(f=r[i-1].length)?f:{type:"%",value:"100"},1<i&&(r[0].length=null!=(f=r[0].length)?f:{type:"%",value:"0"}),0),a=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!_(c)&&!_(a)){for(var u=1;u<s-o;u++)r[o+u].length={type:"%",value:""+(a+(Number(c)-a)*u/(s-o))};o=s,a=Number(c)}}var h,f=t.map(function(t){return{offset:ci(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Ir(Nr.LinearGradient,{angle:n?yi(n):ei,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=gi(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?$r(n):ci(n,h)),new Ir(Nr.RadialGradient,{cx:e,cy:t,size:h,steps:f})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ui.exec(t);if(n)return r=(null==(r=n[2].match(di))?void 0:r.map(function(t){return t.split(":")}))||[],[new Ir(Nr.LinearGradient,{angle:ci(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ci(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=hi.exec(t);if(t)return t=(null==(t=t[4].match(di))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ci(50,"%"),cy:ci(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ci(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!$e(n))return[new Ir(Nr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=fi.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function vi(t){return Ve(t)&&t.image}var bi=qe(function(t){var e;return vi(t)?s({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?si:mi(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=yn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),li.apply(void 0,e))});function xi(t,e){if(t instanceof ni&&e instanceof ni)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(Ze(e[n],0,255));return e[3]=Ze(e[3],0,1),"rgba("+e.join(",")+")"}]}function wi(t,e){if(_(e))return ci(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ci(Number(e),"px");if(0<="deg".search(t))return ci(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ci(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var ki=qe(function(t){return wi(new RegExp("px","g"),t)}),Ei=(qe(function(t){return wi(new RegExp("%","g"),t)}),qe(function(t){return Ke(t)||isFinite(Number(t))?ci(Number(t),"px"):wi(new RegExp("px|%|em|rem","g"),t)})),Mi=qe(function(t){return wi(new RegExp("deg|rad|grad|turn","g"),t)});function Si(t){var e=0;return t.unit===y.kDegrees?e=t.value:t.unit===y.kRadians?e=So(Number(t.value)):t.unit===y.kTurns&&(e=360*Number(t.value)),e}function Oi(t){return $e(t)?t.split(" ").map(function(t){return Ei(t)}):t.map(function(t){return Ei(t.toString())})}function _i(t,e,n){var r;return t.unit===y.kPixels?Number(t.value):t.unit===y.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,$n.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var Pi=function(t){return wi(/deg|rad|grad|turn|px|%/g,t)},Ti=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ai(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Ti.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Pi(t)||bi(t)})}),n.lastIndex===t.length)return r}return[]}function Li(t){return t.toString()}var Ni=qe(function(t){return"number"==typeof t?ci(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ci(Number(t)):ci(0)});function Ci(t,e){return[t,e,Li]}function ji(n,r){return function(t,e){return[t,e,function(t){return Li(Ze(t,n,r))}]}}function Ii(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}qe(function(t){return($e(t)?t.split(" "):t).map(Ni)});var Ri=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:{x:0,y:0,width:0,height:0}};var n;try{n=Ae(e)}catch(t){n=Ae(""),console.error("[g]: Invalid SVG Path definition: "+e)}var t,e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),i=r.polygons,r=r.polylines,o=Fe(n,!0),a=o[0],o=o[1],s=function(t){for(var e=[],n=null,r=null,i=0,o=t.length,a=0;a<o;a++){var s=t[a],l=(r=t[a+1],s[0]),c={command:l,prePoint:n,params:s,startTangent:null,endTangent:null},u=("M"===l&&(i=a),s.length),u=(n=[s[u-2],s[u-1]],c.currentPoint=n,e[i]&&function(t,e){return t[0]===e[0]&&t[1]===e[1]}(n,e[i].currentPoint)&&(e[i].prePoint=c.prePoint),r?[r[r.length-2],r[r.length-1]]:null),u=(c.nextPoint=u,c.prePoint);"C"===l&&(l=[s[1],s[2]],s=[s[3],s[4]],c.startTangent=[u[0]-l[0],u[1]-l[1]],c.endTangent=[n[0]-s[0],n[1]-s[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[l[0]-s[0],l[1]-s[1]]),0===c.endTangent[0])&&0===c.endTangent[1]&&(c.endTangent=[s[0]-l[0],s[1]-l[1]]),e.push(c)}return e}(a),l=(c=n)?(u=(h=(c=He(c,void 0,S(S({},h),{length:!1}))).min).x,h=h.y,{width:f=(l=(c=c.max).x)-u,height:t=(c=c.y)-h,x:u,y:h,x2:l,y2:c,cx:u+f/2,cy:h+t/2,cz:Math.max(f,t)+Math.min(f,t)/2}):{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0},c=l.x,u=l.y,h=l.width,f=l.height;return{absolutePath:n,hasArc:e,segments:s,polygons:i,polylines:r,curve:a,totalLength:0,zCommandIndexes:o,rect:{x:Number.isFinite(c)?c:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(h)?h:0,height:Number.isFinite(f)?f:0}}},Fi=qe(Ri);function Di(t,e){t=($e(t)?Fi:Ri)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Bi(t,e,n){var r,i,o,a,s,l,c,u,h,t=t.curve,e=e.curve,f=[t,e],e=We((f=t.length!==e.length?function t(e,n,r){var i,e=Ye(e),n=Ye(n),o=e.length,a=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(o,a),u=[s,l],h=[c-o,c-a],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=u[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(t,e):f)[0])!==We(f[1])?(r=f[0],t=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(t[0].slice(0,2))].concat(t.map(function(t){return["C"].concat(t.slice(2))}))):pe(f[0]);return[e,(i=f[1],o=e,c=i.length-1,u=[],h=0,s=(a=i).length,l=s-1,(t=a.map(function(t,r){return a.map(function(t,e){var n=r+e;return 0===e||a[n]&&"M"===a[n][0]?(e=a[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),a[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=Ce(i[(n+e)%c].slice(-2),o[e%c].slice(-2))}),u[n]=h,h=0}),t[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function zi(t,e){var n,r,i=$e(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,o=[],a=0,s=Nn.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=a/s,r=Pn.length(t[0],t[1],i[e+1][0],i[e+1][1]),a+=r,n[1]=a/s,o.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:o}}var Gi=null;function Hi(t){return function(e){var n=0;return t.map(function(t){return t===Gi?e[n++]:t})}}function Wi(t){return t}var Yi={matrix:["NNNNNN",[Gi,Gi,0,0,Gi,Gi,0,0,0,0,1,0,Gi,Gi,0,1],Wi],matrix3d:["NNNNNNNNNNNNNNNN",Wi],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Hi([Gi,Gi,new Vr(1)]),Wi],scalex:["N",Hi([Gi,new Vr(1),new Vr(1)]),Hi([Gi,new Vr(1)])],scaley:["N",Hi([new Vr(1),Gi,new Vr(1)]),Hi([new Vr(1),Gi])],scalez:["N",Hi([new Vr(1),new Vr(1),Gi])],scale3d:["NNN",Wi],skew:["Aa",null,Wi],skewx:["A",null,Hi([Gi,ei])],skewy:["A",null,Hi([ei,Gi])],translate:["Tt",Hi([Gi,Gi,ti]),Wi],translatex:["T",Hi([Gi,ti,ti]),Hi([Gi,ti])],translatey:["T",Hi([ti,Gi,ti]),Hi([ti,Gi])],translatez:["L",Hi([ti,ti,Gi])],translate3d:["TTL",Wi]};function Vi(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,o=e[1],a=Yi[o];if(!a)return[];var s=e[2].split(","),l=a[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var h=s[u],f=l[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?ei:Mi(t)},N:Ni,T:Ei,L:ki}[f.toUpperCase()](h):{a:ei,n:c[0],t:ti}[f]))return[];c.push(d)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function qi(t){switch(t.t){case"rotatex":return i=Mo(Si(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Mo(Si(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Mo(Si(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Mo(Si(t.d[3])),o=e*e+n*n+r*r,o=(0==o?(e=1,r=n=0):1!=o&&(e/=o=Math.sqrt(o),n/=o,r/=o),Math.sin(i/2)),a=o*Math.cos(i/2),o=o*o;return[1-2*(n*n+r*r)*o,2*(e*n*o+r*a),2*(e*r*o-n*a),0,2*(e*n*o-r*a),1-2*(e*e+r*r)*o,2*(n*r*o+e*a),0,2*(e*r*o+n*a),2*(n*r*o-e*a),1-2*(e*e+n*n)*o,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":a=Mo(Si(t.d[0])),o=Mo(Si(t.d[1]));return[1,Math.tan(o),0,0,Math.tan(a),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Mo(Si(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Mo(Si(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=_i(t.d[0],0,null)||0,n=_i(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=_i(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=_i(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=_i(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=_i(t.d[0],0,null)||0,n=_i(t.d[1],0,null)||0,r=_i(t.d[2],0,null)||0,1];case"perspective":o=_i(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,o?-1/o:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function Xi(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Ui(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(To,t))return;if(ht(Ao,To),Ao[3]=0,Ao[7]=0,Ao[11]=0,Ao[15]=1,Math.abs(gt(Ao))<1e-8)return;var t=To[3],a=To[7],s=To[11],l=To[12],c=To[13],u=To[14],h=To[15];if(0!==t||0!==a||0!==s){if(Lo[0]=t,Lo[1]=a,Lo[2]=s,Lo[3]=h,!yt(Ao,Ao))return;pt(Ao,Ao),Zt(i,Lo,Ao)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,To),n[0]=It(d[0]),Gt(d[0],d[0]),r[0]=Ht(d[0],d[1]),Co(d[1],d[1],d[0],1,-r[0]),n[1]=It(d[1]),Gt(d[1],d[1]),r[0]/=n[1],r[1]=Ht(d[0],d[2]),Co(d[2],d[2],d[0],1,-r[1]),r[2]=Ht(d[1],d[2]),Co(d[2],d[2],d[1],1,-r[2]),n[2]=It(d[2]),Gt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Wt(No,d[1],d[2]),Ht(d[0],No)<0)for(var f=0;f<3;f++)n[f]*=-1,d[f][0]*=-1,d[f][1]*=-1,d[f][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(o[0]=-o[0]);d[0][2]>d[2][0]&&(o[1]=-o[1]);d[1][0]>d[0][1]&&(o[2]=-o[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(qi).reduce(Xi),e,n,r,i,o),[[e,n,r,o,i]]}var $i=function(t,e,n,r,i){for(var o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],a=0;a<4;a++)o[a][3]=i[a];for(var s=0;s<3;s++)for(var l=0;l<3;l++)o[3][s]+=t[l]*o[l][s];var c=r[0],u=r[1],h=r[2],r=r[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(f[0][0]=1-2*(u*u+h*h),f[0][1]=2*(c*u-h*r),f[0][2]=2*(c*h+u*r),f[1][0]=2*(c*u+h*r),f[1][1]=1-2*(c*c+h*h),f[1][2]=2*(u*h-c*r),f[2][0]=2*(c*h-u*r),f[2][1]=2*(u*h+c*r),f[2][2]=1-2*(c*c+u*u),o=Zi(o,f),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],o=Zi(o,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],o=Zi(o,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],o=Zi(o,h));for(var d=0;d<3;d++)for(var p=0;p<3;p++)o[d][p]*=e[d];return 0==(r=o)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])};function Zi(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}function Ki(t){return t.toFixed(6).replace(".000000","")}function Ji(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Ui(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Ui(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=Ze(r,-1,1),[]);if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(r[0][3],i[0][3],t[5]);return $i(t[0],t[1],t[2],e,t[4]).map(Ki).join(",")}])}function Qi(t){return t.replace(/[xy]/,"")}function to(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var eo=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function no(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ci(n):ci(n,t.unit)})})}(n)}var o=[],a=[],s=[];if(r.length!==i.length)var l=Ji(r,i),o=[l[0]],a=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,h=i[c].t,f=r[c].d,d=i[c].d,p=Yi[u],y=Yi[h],g=void 0;if(eo(u,h)){var m=Ji([r[c]],[i[c]]);o.push(m[0]),a.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===h)g=u;else if(p[2]&&y[2]&&Qi(u)===Qi(h))g=Qi(u),f=p[2](f),d=y[2](d);else{if(!p[1]||!y[1]||to(u)!==to(h)){m=Ji(r,i);o=[m[0]],a=[m[1]],s=[["matrix",[m[2]]]];break}g=to(u),f=p[1](f),d=y[1](d)}for(var v=[],b=[],x=[],w=0;w<f.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,l=Yr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(a=c.value,s=l.value,o=Ar(t.unit)):(Vr.isLength(t.unit)||Vr.isLength(e.unit))&&(a=_i(t,i,n),s=_i(e,i,n),o="px"),[a,s,function(t){return(t=r?Math.max(t,0):t)+o}]}(f[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}o.push(v),a.push(b),s.push([g,x])}}return e&&(l=o,o=a,a=l),[o,a,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var ro=qe(function(t){var e;return $e(t)?"text-anchor"===t?[ci(0,"px"),ci(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Ei(io(e[0])),Ei(io(e[1]))]):[ci(t[0]||0,"px"),ci(t[1]||0,"px")]});function io(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=Mi,this.mixer=Ci}return t.prototype.calculator=function(t,e,n,r){return Si(n)},t}(),t=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Rr&&(n=null),b.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&b.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=bi,this.mixer=xi}return t.prototype.calculator=function(t,e,n,r){return n instanceof Rr?"none"===n.value?ai:si:n},t}(),oo=function(){function t(){this.parser=Ai}return t.prototype.calculator=function(t,e,n){return n instanceof Rr?[]:n},t}();function ao(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function so(){this.parser=ro}var lo=function(){function t(){this.parser=Ei,this.mixer=Ci}return t.prototype.calculator=function(t,e,n,r,i){if(!Vr.isRelativeUnit(n.unit))return n.value;if(n.unit===y.kPercentage)return 0;if(n.unit===y.kEms){if(r.parentNode){var o=ao(r.parentNode);if(o)return o*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===y.kRems){if(null!=r&&null!=(o=r.ownerDocument)&&o.documentElement){o=ao(r.ownerDocument.documentElement);if(o)return o*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),co=function(){function t(){this.mixer=Ii}var e=t.prototype;return e.parser=function(t){t=Oi(Ke(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),uo=function(){function t(){this.mixer=Ii}var e=t.prototype;return e.parser=function(t){t=Oi(Ke(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ho=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,o=i.cx,i=i.cy;_(o)||(l=o),_(i)||(c=i);break;case M.LINE:var o=t.parsedStyle,i=o.x1,a=o.x2,s=o.y1,o=o.y2,l=Math.min(i,a),c=Math.min(s,o),u=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:_(t.parsedStyle.x)||(l=t.parsedStyle.x),_(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),_(l)&&_(c)&&_(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(_(l)?e:l,_(c)?n:c,_(u)?r:u))},e}(lo),fo=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Rr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),po=function(){function t(){this.mixer=Ci,this.parser=Ni}return t.prototype.calculator=function(t,e,n){return n.value},t}(),yo=function(){function t(){this.parser=Ni,this.mixer=ji(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e;!t.attributes.offsetPath||(e=t.attributes.offsetPath.nodeName)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=t.attributes.offsetPath.getPoint(t.parsedStyle.offsetDistance))&&t.setLocalPosition(e.x,e.y)},t}(),go=function(){function t(){this.parser=Ni,this.mixer=ji(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),mo=function(){function t(){this.parser=Di,this.mixer=Bi}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Rr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new Qn(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===M.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),o=function(){function t(){this.parser=zi}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==M.POLYGON&&t.nodeName!==M.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),vo=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=ji(0,1/0),t}return l(t,i),t}(lo),bo=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Rr?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),xo=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,o=r.getAttribute("text");return o&&(i=o,"capitalize"===n.value?i=o.charAt(0).toUpperCase()+o.slice(1):"lowercase"===n.value?i=o.toLowerCase():"uppercase"===n.value&&(i=o.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),wo=function(){function t(){this.tmpMat4=ut(),this.parser=Vi,this.mixer=no}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Rr?[]:n},e.postProcessor=function(l){var c=this,t=l.parsedStyle,e=t.transform,u=t.defX,h=t.defY;e&&e.length&&(l.resetLocalTransform(),l.setLocalPosition(u,h),e.forEach(function(t){var e,n,r,i,o,a,s=t.t,t=t.d;"scale"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(a[0],a[1],1)):"scalex"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(a[0],1,1)):"scaley"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,a[0],1)):"scalez"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,a[0])):"scale3d"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(a[0],a[1],a[2])):"translate"===s?(a=t||[ti,ti],l.translateLocal(a[0].value,a[1].value,0)):"translatex"===s?(a=t||[ti],l.translateLocal(a[0].value,0,0)):"translatey"===s?(a=t||[ti],l.translateLocal(0,a[0].value,0)):"translatez"===s?(a=t||[ti],l.translateLocal(0,0,a[0].value)):"translate3d"===s?(a=t||[ti,ti,ti],l.translateLocal(a[0].value,a[1].value,a[2].value)):"rotate"===s?(a=t||[ei],l.rotateLocal(0,0,a[0].value)):"rotatex"===s?(a=t||[ei],l.rotateLocal(a[0].value,0,0)):"rotatey"===s?(a=t||[ei],l.rotateLocal(0,a[0].value,0)):"rotatez"===s?(a=t||[ei],l.rotateLocal(0,0,a[0].value)):"rotate3d"!==s&&("skew"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Mo(a[0]),Mo(a[1]))):"skewx"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Mo(a[0]),l.getLocalSkew()[1])):"skewy"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Mo(a[0]))):"matrix"===s?(e=(a=t.map(function(t){return t.value}))[0],n=a[1],r=a[2],i=a[3],o=a[4],a=a[5],l.setLocalTransform(ft(c.tmpMat4,e,n,0,0,r,i,0,0,0,0,1,0,o+u,a+h,0,1))):"matrix3d"===s&&(ft.apply(jt,[c.tmpMat4].concat(t.map(function(t){return t.value}))),c.tmpMat4[12]+=u,c.tmpMat4[13]+=h,l.setLocalTransform(c.tmpMat4)))}))},t}(),a=function(){function t(){this.parser=Ni}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}();function ko(t){return void 0===t?0:360<t||t<-360?t%360:t}function Eo(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),Ke(t)?E(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new st(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):E(t[0],t[1]||e,t[2]||n)}function Mo(t){return t*(Math.PI/180)}function So(t){return t*(180/Math.PI)}function Oo(t,e){return 16===e.length?(n=t,r=e,a=.5*Math.PI,s=(c=St(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<a?-a<u?(i=Math.atan2(r[6]/l,r[10]/c),o=Math.atan2(r[1]/s,r[0]/s)):(o=0,i=-Math.atan2(r[4]/l,r[5]/l)):(o=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=o,n):(a=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(o=c*c))<(t=s*c-r*l)?(a[0]=Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):t<-.499995*n?(a[0]=-Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):(a[0]=Math.asin(2*(s*l-c*r)),a[1]=Math.atan2(2*(s*c+r*l),1-2*(u+o)),a[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),a);var n,r,i,o,a,s,l,c,u}function _o(t,e,n,r,i){var o,a,s,l,c=Math.cos(t),t=Math.sin(t);return o=r*c,a=i*t,r=-r*t,t=i*c,c=i=0,e=e,n=n,s=1,(l=new st(9))[0]=o,l[1]=a,l[2]=i,l[3]=r,l[4]=t,l[5]=c,l[6]=e,l[7]=n,l[8]=s,l}function Po(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o);r=So(Math.atan2(n,e));return[t[6],t[7],o,a,r]}var To=ut(),Ao=ut(),Lo=$t(),d=[m(),m(),m()],No=m();function Co(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}jo={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},Io="";var jo,Io,Ro=function(t){return Io=t,Do()};function Fo(t){throw new Error(Io+": "+t)}function Do(){var t=Uo(Bo);return 0<Io.length&&Fo("Invalid input not EOF"),t}function Bo(){return zo("linear-gradient",jo.linearGradient,Ho)||zo("repeating-linear-gradient",jo.repeatingLinearGradient,Ho)||zo("radial-gradient",jo.radialGradient,Wo)||zo("repeating-radial-gradient",jo.repeatingRadialGradient,Wo)||zo("conic-gradient",jo.conicGradient,Wo)}function zo(n,t,r){return Go(t,function(t){var e=r();return e&&!ea(jo.comma)&&Fo("Missing comma before color stops"),{type:n,orientation:e,colorStops:Uo($o)}})}function Go(t,e){t=ea(t);if(t)return ea(jo.startCall)||Fo("Missing ("),e=e(t),ea(jo.endCall)||Fo("Missing )"),e}function Ho(){return ta("directional",jo.sideOrCorner,1)||ta("angular",jo.angleValue,1)}function Wo(){var t,e,n=Yo();return n&&((t=[]).push(n),e=Io,ea(jo.comma))&&((n=Yo())?t.push(n):Io=e),t}function Yo(){var t,e=function(){var t=ta("shape",/^(circle)/i,0);t&&(t.style=Qo()||Vo());return t}()||function(){var t=ta("shape",/^(ellipse)/i,0);t&&(t.style=Ko()||Vo());return t}();return e?e.at=qo():(t=Vo())?(e=t,(t=qo())&&(e.at=t)):(t=Xo())&&(e={type:"default-radial",at:t}),e}function Vo(){return ta("extent-keyword",jo.extentKeywords,1)}function qo(){var t;if(ta("position",/^at/,0))return(t=Xo())||Fo("Missing positioning value"),t}function Xo(){var t={x:Ko(),y:Ko()};if(t.x||t.y)return{type:"position",value:t}}function Uo(t){var e=t(),n=[];if(e)for(n.push(e);ea(jo.comma);)(e=t())?n.push(e):Fo("One extra comma");return n}function $o(){var t=ta("hex",jo.hexColor,1)||Go(jo.rgbaColor,function(){return{type:"rgba",value:Uo(Zo)}})||Go(jo.rgbColor,function(){return{type:"rgb",value:Uo(Zo)}})||ta("literal",jo.literalColor,0);return t||Fo("Expected color definition"),t.length=Ko(),t}function Zo(){return ea(jo.number)[1]}function Ko(){return ta("%",jo.percentageValue,1)||Jo()||Qo()}function Jo(){return ta("position-keyword",jo.positionKeywords,1)}function Qo(){return ta("px",jo.pixelValue,1)||ta("em",jo.emValue,1)}function ta(t,e,n){e=ea(e);if(e)return{type:t,value:e[n]}}function ea(t){var e=/^[\n\r\t\s]+/.exec(Io),e=(e&&na(e[0].length),t.exec(Io));return e&&na(e[0].length),e}function na(t){Io=Io.substring(t)}function ra(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=He(t.parsedStyle.path.absolutePath,void 0,S(S({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function ia(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,i=e*i,a=n-t,t=n+t,s=r-e,e=r+e;return[["M",a,r],["C",a,r-i,n-o,s,n,s],["C",n+o,s,t,r-i,t,r],["C",t,r+i,n+o,e,n,e],["C",n-o,e,a,r+i,a,r],["Z"]]}function oa(t,e){void 0===e&&(e=!0);var n,r,i,o,a,s,l,c,u,h,f=[];switch(t.nodeName){case M.LINE:var d=t.parsedStyle,f=[["M",d.x1,d.y1],["L",d.x2,d.y2]];break;case M.CIRCLE:var d=t.parsedStyle,p=d.r,y=d.cx,d=d.cy;f=ia(p,p,y,d);break;case M.ELLIPSE:var p=t.parsedStyle,y=p.rx,d=p.ry,g=p.cx,p=p.cy;f=ia(y,d,g,p);break;case M.POLYLINE:case M.POLYGON:y=t.parsedStyle.points;d=y.points,g=t.nodeName===M.POLYGON,d=d.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),g&&d.push(["Z"]),f=d;break;case M.RECT:var p=t.parsedStyle,m=p.width,v=p.height,y=p.x,b=p.y,p=p.radius,x=p&&p.some(function(t){return 0!==t});n=m,r=v,y=y,b=b,x=x&&p.map(function(t){return Ze(t,0,Math.min(Math.abs(m)/2,Math.abs(v)/2))}),f=x?(o=(p=0<n?1:-1)+(k=0<r?1:-1)!=0?1:0,[["M",p*(i=x[0])+y,b],["L",n-p*(w=x[1])+y,b],w?["A",w,w,0,0,o,n+y,k*w+b]:null,["L",n+y,r-k*(w=x[2])+b],w?["A",w,w,0,0,o,n+y-p*w,r+b]:null,["L",y+p*(w=x[3]),r+b],w?["A",w,w,0,0,o,y,r+b-k*w]:null,["L",y,k*i+b],i?["A",i,i,0,0,o,p*i+y,b]:null,["Z"]].filter(function(t){return t})):[["M",y,b],["L",y+n,b],["L",y+n,b+r],["L",y,b+r],["Z"]];break;case M.PATH:var x=t.parsedStyle.path,w=x.curve,k=x.zCommandIndexes;f=[].concat(w),k.forEach(function(t,e){f.splice(t+e+1,0,["Z"])})}if(f.length)return a=f,s=t,(l=void 0===(l=e)?!0:l)&&(c=s.getLocalTransform()),e=(s=s.parsedStyle).defX,u=void 0===e?0:e,h=void 0===(e=s.defY)?0:e,a.reduce(function(t,e){var n,r,i,o="";return"M"===e[0]||"L"===e[0]?(i=E(e[1]-u,e[2]-h,0),l&&Yt(i,i,c),o=""+e[0]+i[0]+","+i[1]):"Z"===e[0]?o=e[0]:"C"===e[0]?(i=E(e[1]-u,e[2]-h,0),n=E(e[3]-u,e[4]-h,0),r=E(e[5]-u,e[6]-h,0),l&&(Yt(i,i,c),Yt(n,n,c),Yt(r,r,c)),o=""+e[0]+i[0]+","+i[1]+","+n[0]+","+n[1]+","+r[0]+","+r[1]):"A"===e[0]&&(i=E(e[6]-u,e[7]-h,0),l&&Yt(i,i,c),o=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+i[0]+","+i[1]),t+o},"")}function aa(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}function sa(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function la(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function ca(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function ua(t){return xa.setup(this,t),xa.create(t)}function ha(t){return ka.setup(this,t),ka.create(t)}function fa(){throw new Error("tapAsync is not supported on a SyncHook")}function da(){throw new Error("tapPromise is not supported on a SyncHook")}function pa(t){return Ma.setup(this,t),Ma.create(t)}function ya(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function ga(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function ma(t){return Oa.setup(this,t),Oa.create(t)}var va=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=sa,this.call=sa,this._callAsync=la,this.callAsync=la,this._promise=ca,this.promise=ca,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e=_r(this.interceptors);!(n=e()).done;){var n=n.value;n.register&&void 0!==(n=n.register(t))&&(t=n)}return t},e.withOptions=function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}},e.isUsed=function(){return 0<this.taps.length||0<this.interceptors.length},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],o=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<o)){r++;break}}this.taps[r]=t},t}(),ba=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,o=t.onResult,n=t.onDone,e="",a=0;a<this.options.interceptors.length;a++){var s=this.options.interceptors[a];s.call&&(e+=this.getInterceptor(a)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:o&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=o(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=_r(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,o=e.rethrowIfPossible,a="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":o||(a=a+"var _hasError"+t+" = false;\ntry {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",o||(a=(a=(a=a+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h=(h=(h="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(h+=r("_result"+t)),i&&(h+=i()),a+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:h=h+"}\n"+"})"})+");\n";break;case"promise":a=(a=(a=(a+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),a=(a=a+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return a},e.callTapsSeries=function(t){var o=this,a=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),h=e||n,f="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==o.options.taps[n].type||20<p++)&&(p=0,f=(f+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(h?"return ":"")+"_next"+n+"();\n"}),d),i=o.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return f+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var o=this.options.taps.every(function(t){return"sync"===t.type}),r="";o||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var a=this.options.interceptors[i];a.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:a.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return o||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&o})+"} while(_loop);\n",o||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,o=t.onError,a=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:o,onResult:a,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onResult:a&&function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onDone:!a&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),xa=new(function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(ba)),wa=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=ua,t._call=void 0,t.call=void 0,t}return l(t,n),t}(va),ka=new(function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype.content=function(t){var i=this,o=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return o(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(ba)),Ea=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=ha,t._call=void 0,t.call=void 0,t}return l(t,n),t}(va),Ma=new(function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(ba)),Sa=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=fa,t.tapPromise=da,t.compile=pa,t}return l(t,n),t}(va),Oa=new(function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(ba)),_a=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=ya,t.tapPromise=ga,t.compile=ma,t}return l(t,n),t}(Sa),Pa=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Ta=/([\"\'])[^\'\"]+\1/;var Aa,v,La,Na,Ca,ja=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:n.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:n.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:n.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:n.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:n.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:n.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:n.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:n.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:n.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:n.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:n.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:n.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:n.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:n.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:n.FILTER},{n:"clipPath",syntax:n.DEFINED_PATH},{n:"textPath",syntax:n.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:n.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},l:!0,syntax:n.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:n.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:n.COORDINATE},{n:"cy",int:!0,d:"0",syntax:n.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:n.COORDINATE},{n:"y",int:!0,d:"0",syntax:n.COORDINATE},{n:"z",int:!0,d:"0",syntax:n.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:n.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:n.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:n.COORDINATE},{n:"y1",int:!0,l:!0,syntax:n.COORDINATE},{n:"z1",int:!0,l:!0,syntax:n.COORDINATE},{n:"x2",int:!0,l:!0,syntax:n.COORDINATE},{n:"y2",int:!0,l:!0,syntax:n.COORDINATE},{n:"z2",int:!0,l:!0,syntax:n.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:n.PATH,p:50},{n:"points",l:!0,syntax:n.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:n.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:n.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:n.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:n.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:n.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:n.NUMBER,d:function(t){return t===M.PATH||t===M.POLYGON||t===M.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","end","left","right"],d:"start"},{n:"markerStart",syntax:n.MARKER},{n:"markerEnd",syntax:n.MARKER},{n:"markerMid",syntax:n.MARKER},{n:"markerStartOffset",syntax:n.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:n.LENGTH,l:!0,int:!0,d:"0"}],Ia={},Ra=new WeakMap,Fa={},Da=qe(function(t){return t.sort(function(t,e){return Fa[t]-Fa[e]})}),Ba=m(),za=m(),Ga=m(),va=function(){function t(){var e=this;ja.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){Ia[t]=e,Fa[t]=e.p||0})},e.unregisterMetadata=function(t){delete Ia[t]},e.getPropertySyntax=function(t){return b.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,o=t.skipUpdateAttribute,e=t.skipParse,a=t.forceUpdateGeometry,t=t.usedAttributes,s=a,a=Object.keys(r);a.forEach(function(t){var t=ar(t,r[t]),e=t[0],t=t[1];o||(n.attributes[e]=t),!s&&null!=(t=Ia[e])&&t.l&&(s=!0)}),e||a.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(a=Da(null!=t&&t.length?Array.from(new Set(a.concat(t))):a)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),a.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&a.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=Ia[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=$r(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=$r(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=Ia[t],i="g-root"===n.id,o=e;if(r){var a=r.syntax,s=r.inh,r=r.d;if(e instanceof Rr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))_(r)||(e=this.parseProperty(t,rr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),_(s)?void this.addUnresolveProperty(n,t):s}i=a&&this.getPropertySyntax(a);o=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Rr?e.value:e}return o},e.postProcessProperty=function(t,e){var t=Ia[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=Ra.get(t);n||(Ra.set(t,[]),n=Ra.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=Ra.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=Ra.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),Ra.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,o,a,l,c,u,h,f,d,p,y,g,m,v=b.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new $n),s.renderBounds||(s.renderBounds=new $n),e=t.parsedStyle,d=(v=v.update(e,t)).width,f=v.height,p=void 0===(p=v.depth)?0:p,h=void 0===(h=v.offsetX)?0:h,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=f<0,p=Ft(Ba,Math.abs(d)/2,Math.abs(f)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,g=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,o=e.transformOrigin,a=e.anchor,t.nodeName===M.TEXT&&delete e.anchor,d=Ft(za,(1-2*(a&&a[0]||0))*d/2+h,(1-2*(a&&a[1]||0))*f/2+m,(1-2*(a&&a[2]||0))*p[2]+v),s.contentBounds.update(d,p),h=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,l&&!l.isNone&&Dt(p,p,Ft(Ga,f=((c||0)+(u||0))*h,f,0)),s.renderBounds.update(d,p),y&&g&&"inner"!==g&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,h=e.shadowOffsetY||0,f=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+h,y=l[1]+c+h,v[0]=Math.min(v[0],f),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,o,a=t.name,t=t.params;"blur"===a?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Dt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,E(i,i,0)))):"drop-shadow"===a&&(i=t[0].value,a=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,o=e[1]-t+a,t=n[1]+t+a,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],o),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),a=e.anchor,g=(n?-1:1)*_i(o[0],0,t),m=(r?-1:1)*_i(o[1],1,t),g-=(n?-1:1)*(a&&a[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(a&&a[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),b.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=Ia[t];return!!t&&t.inh},t}(),Ha=function(){function t(){this.registry={},this.define(M.CIRCLE,as),this.define(M.ELLIPSE,ds),this.define(M.RECT,Ps),this.define(M.IMAGE,bs),this.define(M.LINE,ws),this.define(M.GROUP,ys),this.define(M.PATH,T),this.define(M.POLYGON,Ms),this.define(M.POLYLINE,Os),this.define(M.TEXT,As),this.define(M.HTML,ms)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}(),Wa=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Jn,this.page=new Jn,this.canvas=new Jn,this.viewport=new Jn,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(gr)},kr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),Ya=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Sr(n),e),n}return l(t,r),t}(Wa),ba=function(){function t(){this.emitter=new Cn.exports.EventEmitter}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,o,a=Je(n)&&n||Ve(n)&&n.capture,n=Ve(n)&&n.once,s=rr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=a?t+"capture":t,e=rr(e)?e:e.handleEvent,l&&(o=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&o.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=Je(n)&&n||Ve(n)&&n.capture,i=rr(e)?void 0:e;return e=rr(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new Ya(t,e))},e.dispatchEvent=function(t){if(!(t instanceof Wa))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e;if(e=this.document?this:this.defaultView||(null==(e=this.ownerDocument)?void 0:e.defaultView)){if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],t.target=this,null!=(e=t.manager)&&e.dispatchEvent(t)}return!t.defaultPrevented},t}(),Va=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}l(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(gr)},t.lookupNamespaceURI=function(t){throw new Error(gr)},t.lookupPrefix=function(t){throw new Error(gr)},t.normalize=function(){throw new Error(gr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[o=this];null!=(r=i.parentNode)?r:o.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,o=o.parentNode?(n.push(o.parentNode),o.parentNode):o;if(i!==o)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var a=n.length<e.length?e:n,s=a===e?n:e;if(a[a.length-s.length]===s[0])return a===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=a.length-s.length,c=s.length-1;0<=c;c--){var u,h=s[c],f=a[l+c];if(f!==h)return(u=h.parentNode.childNodes).indexOf(h)<u.indexOf(f)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:a===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},kr(d,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=_r(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===M.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===M.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(ba),qa=(Va.DOCUMENT_POSITION_DISCONNECTED=1,Va.DOCUMENT_POSITION_PRECEDING=2,Va.DOCUMENT_POSITION_FOLLOWING=4,Va.DOCUMENT_POSITION_CONTAINS=8,Va.DOCUMENT_POSITION_CONTAINED_BY=16,Va.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,function(e){function t(){var t=e.call(this)||this;t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new b.AnimationTimeline(Sr(t))}catch(t){}var r={};return ja.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=rr(t)?t(M.GROUP):t)}),t.documentElement=new ys({id:"g-root",style:r}),t.documentElement.ownerDocument=Sr(t),t.documentElement.parentNode=Sr(t),t.childNodes=[t.documentElement],t}l(t,e);var n=t.prototype;return n.createElement=function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?As:ys),(t=new n(e)).ownerDocument=this,t)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error(gr)},n.destroy=function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}},n.elementsFromBBox=function(t,e,n,r){var t=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),i=[];return t.forEach(function(t){var t=t.id,t=b.displayObjectPool.getByEntity(t),e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||i.push(t)}),i.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),i},n.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),o=i.width,i=i.height;return r<0||n<0||o<r||i<n?null:(i=(o=this.defaultView.viewport2Client({x:r,y:n})).x,o=o.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:o},picked:[]}).picked)&&t[0]||this.documentElement)},n.elementFromPoint=function(){var n=xr(O().mark(function t(e,n){var r,i,o,a,s,l;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",null);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,l=s.picked,t.abrupt("return",l&&l[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),o=i.width,i=i.height;return r<0||n<0||o<r||i<n?[]:(i=(o=this.defaultView.viewport2Client({x:r,y:n})).x,o=o.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:o},picked:[]}).picked)[t.length-1]!==this.documentElement&&t.push(this.documentElement),t)},n.elementsFromPoint=function(){var n=xr(O().mark(function t(e,n){var r,i,o,a,s,l;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",[]);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error(mr)},n.insertBefore=function(t,e){throw new Error(mr)},n.removeChild=function(t,e){throw new Error(mr)},n.replaceChild=function(t,e,n){throw new Error(mr)},n.append=function(){throw new Error(mr)},n.prepend=function(){throw new Error(mr)},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},kr(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),t}(Va)),Xa=(Aa=Aa||{},Aa[Aa.Standard=0]="Standard",(hs=v=v||{}).DESTROY="destroy",hs.ATTR_MODIFIED="DOMAttrModified",hs.INSERTED="DOMNodeInserted",hs.REMOVED="removed",hs.MOUNTED="DOMNodeInsertedIntoDocument",hs.UNMOUNTED="DOMNodeRemovedFromDocument",hs.BOUNDS_CHANGED="bounds-changed",hs.RENDER_ORDER_CHANGED="render-order-changed",hs.CULLED="culled",function(c){function t(t,e,n,r,i,o,a,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=o,l.prevParsedValue=a,l.newParsedValue=s,l.type=t,l}return l(t,c),t}(Wa)),Ua=(Xa.ADDITION=2,Xa.MODIFICATION=1,Xa.REMOVAL=3,0),$a=new Xa(v.INSERTED,null,"","","",0,"",""),Za=new Xa(v.REMOVED,null,"","","",0,"",""),Ka=new Ya(v.DESTROY),Ja=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=Ua++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Aa.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:E(0,0,0),localRotation:ne(0,0,0,1),localScale:E(1,1,1),localTransform:ut(),localSkew:ae(0,0),position:E(0,0,0),rotation:ne(0,0,0,1),scaling:E(1,1,1),worldTransform:ut(),origin:E(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:ii,opacity:ii,fillOpacity:ii,strokeOpacity:ii,fill:ii,stroke:ii,transform:ii,transformOrigin:ii,visibility:ii,pointerEvents:ii,lineWidth:ii,lineCap:ii,lineJoin:ii,increasedLineWidthForHitTesting:ii,fontSize:ii,fontFamily:ii,fontStyle:ii,fontWeight:ii,fontVariant:ii,textAlign:ii,textBaseline:ii,textTransform:ii,zIndex:ii,filter:ii,shadowType:ii},t.parsedStyle={},t.attributes={},t}l(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(gr)},e.appendChild=function(t,e){return b.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),$a.relatedNode=this,t.dispatchEvent($a),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return Za.relatedNode=this,t.dispatchEvent(Za),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),b.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t),t.destroy()})},e.matches=function(t){return b.sceneGraphService.matches(t,this)},e.getElementById=function(t){return b.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return b.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return b.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return b.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return b.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return b.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(b.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Ka),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return b.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return b.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return b.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return b.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return b.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e=this.attributes[t];return void 0===e&&(t=ar(t,"")[0],e=this.attributes[t],_(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(gr)},e.getAttributeNode=function(t){throw new Error(gr)},e.getAttributeNodeNS=function(t,e){throw new Error(gr)},e.hasAttributeNS=function(t,e){throw new Error(gr)},e.removeAttributeNS=function(t,e){throw new Error(gr)},e.removeAttributeNode=function(t){throw new Error(gr)},e.setAttributeNS=function(t,e,n){throw new Error(gr)},e.setAttributeNode=function(t){throw new Error(gr)},e.setAttributeNodeNS=function(t){throw new Error(gr)},e.toggleAttribute=function(t,e){throw new Error(gr)},kr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(Va),Qa=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Jn,t.movement=new Jn,t.offset=new Jn,t.global=new Jn,t.screen=new Jn,t}l(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error(gr)},kr(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(Wa),ts=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}l(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.clone=function(){return this.manager.clonePointerEvent(this)},t}(Qa),es=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return l(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(Qa),ns=new Xa(v.ATTR_MODIFIED,null,null,null,null,Xa.MODIFICATION,null,null),rs={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},is={anchor:[0,0],fill:ai,stroke:ai,transform:[],zIndex:0,filter:[],shadowType:"outer"},P=function(i){function a(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||M.GROUP,r.config.style=s({},r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,is,r.config.initialParsedStyle),Object.assign(r.attributes,rs),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),b.displayObjectPool.add(r.entity,Sr(r)),r}l(a,i);var t=a.prototype;return t.destroy=function(){i.prototype.destroy.call(this),b.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=s({},this.attributes);for(n in r){var i=r[n];i instanceof a&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},t.initAttributes=function(t){var e=this.renderable;b.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);var t=ar(t,e),r=t[0],t=t[1];Qe(e)||!n&&t===this.attributes[r]||(this.internalSetAttribute(r,t),i.prototype.setAttribute.call(this,r,t))},t.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],o=this.parsedStyle[t],a=(b.styleValueRegistry.processProperties(this,((a={})[t]=e,a),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(ns.relatedNode=this,ns.prevValue=i,ns.newValue=e,ns.attrName=t,ns.prevParsedValue=o,ns.newParsedValue=a,this.dispatchEvent(ns)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,o,a)},t.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new Qn(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return b.sceneGraphService.setOrigin(this,Eo(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return b.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return b.sceneGraphService.setPosition(this,Eo(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return b.sceneGraphService.setLocalPosition(this,Eo(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return b.sceneGraphService.translate(this,Eo(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return b.sceneGraphService.translateLocal(this,Eo(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return b.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return b.sceneGraphService.getLocalPosition(this)},t.scale=function(t,e,n){return this.scaleLocal(t,e,n)},t.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Eo(t,e=e||t,n=n||t)),b.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Eo(t,e=e||t,n=n||t)),b.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return b.sceneGraphService.getLocalScale(this)},t.getScale=function(){return b.sceneGraphService.getScale(this)},t.getEulerAngles=function(){return So(Oo(m(),b.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return So(Oo(m(),b.sceneGraphService.getLocalRotation(this))[2])},t.setEulerAngles=function(t){return b.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return b.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return _(e)&&_(n)?b.sceneGraphService.rotateLocal(this,0,0,t):b.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return _(e)&&_(n)?b.sceneGraphService.rotate(this,0,0,t):b.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return b.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return b.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return b.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return b.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return b.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return b.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return b.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return b.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return b.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){b.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},t.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},t.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},t.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},t.getConfig=function(){return this.config},t.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1];return i?Ve(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=Mt(m(),t),n=e[0],e=e[1],r=St(m(),t),i=r[0],r=r[1],t=Ot(Kt(),t),t=Oo(m(),t),o=t[0],t=t[2];return _o(o||t,n,e,i,r)},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=Po(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},t.setLocalMatrix=function(t){var t=Po(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.getCount=function(){return this.childElementCount},t.getParent=function(){return this.parentElement},t.getChildren=function(){return this.children},t.getFirst=function(){return this.firstElementChild},t.getLast=function(){return this.lastElementChild},t.getChildByIndex=function(t){return this.children[t]||null},t.add=function(t,e){return this.appendChild(t,e)},t.setClip=function(t){this.style.clipPath=t},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},t.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.setZIndex=function(t){return this.style.zIndex=t,this},kr(a,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),a}(Ja),os=["style"],as=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,os);return n.call(this,s({type:M.CIRCLE,style:s({cx:"",cy:"",r:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return l(t,n),t}(P),ss=["style"],ls=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,ss),e=n.call(this,s({style:s({x:"",y:""},e)},t))||this;return e.isCustomElement=!0,e}return l(t,n),t}(P),cs={},us=[],hs=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return cs[t]},e.getAll=function(){return Object.keys(cs).map(function(t){return cs[t]})},e.add=function(t,e){(cs[t]=e).nodeName===M.HTML&&us.push(e)},e.remove=function(t){var e=cs[t];e&&(delete cs[t],e.nodeName===M.HTML)&&(t=us.indexOf(e),us.splice(t,1))},e.getHTMLs=function(){return us},t}(),fs=["style"],ds=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,fs);return n.call(this,s({type:M.ELLIPSE,style:s({cx:"",cy:"",rx:"",ry:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return l(t,n),t}(P),ps=["style"],ys=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,ps);return n.call(this,s({type:M.GROUP,style:s({x:"",y:"",width:"",height:""},e)},t))||this}return l(t,n),t}(P),gs=["style"],ms=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,gs),e=n.call(this,s({type:M.HTML,style:s({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))||this;return e.cullable.enable=!1,e}l(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new $n).setMinMax(E(t,r,0),E(t+n.width,r+n.height,0)),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=yt(ut(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!$n.isEmpty(n))return(t=new $n).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(P),vs=["style"],bs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,vs);return n.call(this,s({type:M.IMAGE,style:s({x:"",y:"",img:"",width:"",height:""},e)},t))||this}return l(t,n),t}(P),xs=["style"],ws=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,xs),e=r.call(this,s({type:M.LINE,style:s({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof P&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof P&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}l(t,r);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof P&&(this.markerStartAngle=0,r.remove()),i&&i instanceof P&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof P&&(this.markerEndAngle=0,r.remove()),i)&&i instanceof P&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,c=a.markerStartOffset,u=a.markerEndOffset,h=a.x1,f=a.x2,d=a.y1,p=a.y2,y=a.defX,a=a.defY,s=t?s:l;s&&s instanceof P&&(l=0,t=t?(r=h-y,i=d-a,e=f-h,n=p-d,o=c||0,this.markerStartAngle):(r=f-y,i=p-a,e=h-f,n=d-p,o=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*o,i+Math.sin(l)*o))},e.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.defX,e=e.defY,n=Pn.pointAt(n,r,i,o,t),r=n.x,i=n.y,o=Yt(m(),E(r-a,i-e,0),this.getLocalTransform());return new Jn(o[0],o[1])},e.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return Pn.length(e,n,r,t)},t}(P),ks=["style"],T=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,ks),e=i.call(this,s({type:M.PATH,style:s({path:"",miterLimit:""},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof P&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof P&&e.placeMarkerMid(t),r&&r instanceof P&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}l(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof P&&(this.markerStartAngle=0,r.remove()),i&&i instanceof P&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof P&&(this.markerEndAngle=0,r.remove()),i&&i instanceof P&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,c=a.markerStartOffset,u=a.markerEndOffset,h=a.defX,a=a.defY,s=t?s:l;s&&s instanceof P&&(l=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=i[0]-t[0],i=i[1]-t[1],o=c||0,this.markerStartAngle):(c=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=c[0]-t[0],i=c[1]-t[1],o=u||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*o,n+Math.sin(l)*o))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&t instanceof P)for(var o=1;o<n.length-1;o++){var a=n[o].currentPoint,s=a[0],a=a[1],l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,a-i)}},e.getTotalLength=function(){return ra(this)},e.getPointAtLength=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,e=He(e.path.absolutePath,t,S(S({},i),{bbox:!1,length:!0})).point,t=e.x,i=e.y,e=Yt(m(),E(t-n,i-r,0),this.getLocalTransform());return new Jn(e[0],e[1])},e.getPoint=function(t){return this.getPointAtLength(t*ra(this))},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(P),Es=["style"],Ms=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,Es),e=i.call(this,s({type:M.POLYGON,style:s({points:"",miterLimit:"",isClosed:!0},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof P&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof P&&e.placeMarkerMid(t),r&&r instanceof P&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}l(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof P&&(this.markerStartAngle=0,r.remove()),i&&i instanceof P&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof P&&(this.markerEndAngle=0,r.remove()),i&&i instanceof P&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,c=a.markerStartOffset,u=a.markerEndOffset,h=a.points.points,f=a.defX,a=a.defY,s=t?s:l;s&&s instanceof P&&(i=h[l=0][0]-f,o=h[0][1]-a,c=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=c||0,this.markerStartAngle):(t=h.length,n=this.style.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-f,o=h[t-1][1]-a,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+c),s.setLocalPosition(i+Math.cos(l)*r,o+Math.sin(l)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&t instanceof P)for(var o=1;o<(this.style.isClosed?n.length:n.length-1);o++){var a=n[o][0]-r,s=n[o][1]-i,l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(a,s)}},t}(P),Ss=["style"],Os=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,Ss);return n.call(this,s({type:M.POLYLINE,style:s({points:"",miterLimit:"",isClosed:!1},e)},t))||this}l(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPointAtLength=function(t){return this.getPoint(t/this.getTotalLength())},e.getPoint=function(n){var t=this.parsedStyle,e=t.defX,r=t.defY,t=t.points,i=t.points,t=t.segments,o=0,a=0,t=(t.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),a=e)}),Pn.pointAt(i[a][0],i[a][1],i[a+1][0],i[a+1][1],o)),i=t.x,t=t.y,i=Yt(m(),E(i-e,t-r,0),this.getLocalTransform());return new Jn(i[0],i[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}(Ms),_s=["style"],Ps=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,_s);return n.call(this,s({type:M.RECT,style:s({x:"",y:"",width:"",height:"",radius:""},e)},t))||this}return l(t,n),t}(P),Ts=["style"],As=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Mr(t,Ts);return n.call(this,s({type:M.TEXT,style:s({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))||this}l(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(P);(u=La=La||{})[u.ORBITING=0]="ORBITING",u[u.EXPLORING=1]="EXPLORING",u[u.TRACKING=2]="TRACKING",(u=Na=Na||{})[u.DEFAULT=0]="DEFAULT",u[u.ROTATIONAL=1]="ROTATIONAL",u[u.TRANSLATIONAL=2]="TRANSLATIONAL",u[u.CINEMATIC=3]="CINEMATIC",(u=Ca=Ca||{})[u.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",u[u.PERSPECTIVE=1]="PERSPECTIVE";var Ls,Ns,Cs="updated",u=function(){function t(){this.canvas=void 0,this.eventEmitter=new Cn.exports.EventEmitter,this.matrix=ut(),this.right=E(1,0,0),this.up=E(0,1,0),this.forward=E(0,0,1),this.position=E(0,0,1),this.focalPoint=E(0,0,0),this.distanceVector=E(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ut(),this.projectionMatrixInverse=ut(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=La.EXPLORING,this.trackingMode=Na.DEFAULT,this.projectionMode=Ca.PERSPECTIVE,this.frustum=new Kn,this.orthoMatrix=ut()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Ca.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===La.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===La.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==La.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return yt(ut(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=kt(ut(),[t,e,0]);this.jitteredProjectionMatrix=mt(ut(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Ca.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Ca.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===Ca.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Ca.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Ca.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ca.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=E(t.x-r,t.y-n,0),e=Ht(i,this.right)/It(this.right),r=Ht(i,this.up)/It(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Ca.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,s,n=this.near*Math.tan(Mo(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,o=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/o,r*=this.view.width/i,e*=this.view.height/o),i=this.projectionMatrix,l=(o=l)+r,n=(r=n)-e,e=this.far,a=2*t/(r-n),s=(l+o)/(l-o),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,bt(this.projectionMatrix,this.projectionMatrix,E(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=Ca.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,a=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=a*this.view.offsetY)-a*this.view.height),Lt(this.projectionMatrix,s,n,r,e,i,o),bt(this.projectionMatrix,this.projectionMatrix,E(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=Eo(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=E(0,1,0);return this.focalPoint=Eo(t,e,n),this.trackingMode===Na.CINEMATIC&&(t=(r=Bt(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=It(r),e=So(Math.asin(e/r)),r=90+So(Math.atan2(n,t)),wt(n=ut(),n,Mo(r)),xt(n,n,Mo(e)),i=Yt(m(),[0,1,0],n)),yt(this.matrix,Nt(ut(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=ko(t),this.computeMatrix(),this._getAxes(),this.type===La.ORBITING||this.type===La.EXPLORING?this._getPosition():this.type===La.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=ko(t),this.computeMatrix(),this._getAxes(),this.type===La.ORBITING||this.type===La.EXPLORING?this._getPosition():this.type===La.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=ko(t),this.computeMatrix(),this._getAxes(),this.type===La.ORBITING||this.type===La.EXPLORING?this._getPosition():this.type===La.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Jt(Kt(),[0,0,1],Mo(this.roll)),e=(dt(this.matrix),Jt(Kt(),[1,0,0],Mo((this.rotateWorld&&this.type!==La.TRACKING||this.type===La.TRACKING?1:-1)*this.elevation))),n=Jt(Kt(),[0,1,0],Mo((this.rotateWorld&&this.type!==La.TRACKING||this.type===La.TRACKING?1:-1)*this.azimuth)),n=Qt(Kt(),n,e),n=Qt(Kt(),n,t),e=Pt(ut(),n);this.type===La.ORBITING||this.type===La.EXPLORING?(vt(this.matrix,this.matrix,this.focalPoint),mt(this.matrix,this.matrix,e),vt(this.matrix,this.matrix,[0,0,this.distance])):this.type===La.TRACKING&&(vt(this.matrix,this.matrix,this.position),mt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=Eo(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Rt(this.right,Eo(Zt($t(),[1,0,0,0],this.matrix))),Rt(this.up,Eo(Zt($t(),[0,1,0,0],this.matrix))),Rt(this.forward,Eo(Zt($t(),[0,0,1,0],this.matrix))),Gt(this.right,this.right),Gt(this.up,this.up),Gt(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=It(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===La.TRACKING||this.rotateWorld?(this.elevation=So(Math.asin(e/r)),this.azimuth=So(Math.atan2(-t,-n))):(this.elevation=-So(Math.asin(e/r)),this.azimuth=-So(Math.atan2(-t,-n)))},e._getPosition=function(){Rt(this.position,Eo(Zt($t(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Vt(this.distanceVector,[0,0,-this.distance],(t=lt(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Dt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Bt(m(),this.focalPoint,this.position),this.distance=It(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Ca.ORTHOGRAPHIC&&(t=this.position,e=Jt(Kt(),[0,0,1],-this.roll*Math.PI/180),_t(this.orthoMatrix,e,E((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),E(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=mt(ut(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Cs))},e.rotate=function(t,e,n){throw new Error(gr)},e.pan=function(t,e){throw new Error(gr)},e.dolly=function(t){throw new Error(gr)},e.createLandmark=function(t,e){throw new Error(gr)},e.gotoLandmark=function(t,e){throw new Error(gr)},t}(),js=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Is=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),Rs=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),Fs=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Ds=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),Bs=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!$e(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),zs=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&o&&a&&s&&l&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===o?(r=a/2,u=[.5,1]):"right"!==o&&"end"!==o||(r=a,u=[1,1]),o=0,"middle"===s?o=i[1]:"top"===s||"hanging"===s?o=2*i[1]:"alphabetic"===s?o=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(o=0),l&&(r+=l),c&&(o+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:o}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),Gs=function(){function t(t,e){var f=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new Cn.exports.EventEmitter,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ut(),this.tmpVec3=m(),this.onPointerDown=function(){var e=xr(O().mark(function t(e){var n,r;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ts){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:n=t.sent,f.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?f.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,f.dispatchEvent(n,r?"rightdown":"mousedown")),f.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),f.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUp=function(){var e=xr(O().mark(function t(e){var n,r,i,o,a,s,l;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ts){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,f.createPointerEvent(e);case 5:if(r=t.sent,f.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?f.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,f.dispatchEvent(r,i?"rightup":"mouseup")),i=f.trackingData(e.pointerId),s=f.findMountedTarget(i.pressTargetsByButton[e.button]),(l=s)&&!r.composedPath().includes(s)){for(o=s;o&&!r.composedPath().includes(o);)r.currentTarget=o,f.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?f.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(a=2===r.button,f.notifyTarget(r,a?"rightupoutside":"mouseupoutside")),Va.isNode(o)&&(o=o.parentNode);delete i.pressTargetsByButton[e.button],l=o}l&&((s=f.clonePointerEvent(r,"click")).target=l,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(l=i.clicksByButton[e.button]).target===s.target&&n-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=s.target,l.timeStamp=n,s.detail=l.clickCount,null!=(l=r.detail)&&l.preventClick||("mouse"!==s.pointerType&&"touch"!==s.pointerType||f.dispatchEvent(s,"click"),f.dispatchEvent(s,"pointertap")),f.freeEvent(s)),f.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerMove=function(){var e=xr(O().mark(function t(e){var n,r,i,o,a,s,l,c,u,h;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ts){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=f.trackingData(e.pointerId),o=f.findMountedTarget(i.overTargets),i.overTargets&&o!==n.target)return l="mousemove"===e.type?"mouseout":"pointerout",t.next=12,f.createPointerEvent(e,l,o||void 0);t.next=23;break;case 12:if(a=t.sent,f.dispatchEvent(a,"pointerout"),r&&f.dispatchEvent(a,"mouseout"),n.composedPath().includes(o)){t.next=22;break}return t.next=18,f.createPointerEvent(e,"pointerleave",o||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,f.notifyTarget(s),r&&f.notifyTarget(s,"mouseleave"),Va.isNode(s.target)&&(s.target=s.target.parentNode);f.freeEvent(s);case 22:f.freeEvent(a);case 23:if(o===n.target){t.next=38;break}l="mousemove"===e.type?"mouseover":"pointerover",c=f.clonePointerEvent(n,l),f.dispatchEvent(c,"pointerover"),r&&f.dispatchEvent(c,"mouseover"),u=o&&Va.isNode(o)&&o.parentNode;case 29:if(u&&u!==(Va.isNode(f.rootTarget)&&f.rootTarget.parentNode)){if(u===n.target)return t.abrupt("break",35);t.next=32}else t.next=35;break;case 32:u=u.parentNode,t.next=29;break;case 35:if(!u||u===(Va.isNode(f.rootTarget)&&f.rootTarget.parentNode)){for((h=f.clonePointerEvent(n,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==o&&h.target!==(Va.isNode(f.rootTarget)&&f.rootTarget.parentNode);)h.currentTarget=h.target,f.notifyTarget(h),r&&f.notifyTarget(h,"mouseenter"),Va.isNode(h.target)&&(h.target=h.target.parentNode);f.freeEvent(h)}f.freeEvent(c);case 38:f.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&f.dispatchEvent(n,"touchmove"),r&&(f.dispatchEvent(n,"mousemove"),f.cursor=f.getCursor(n.target)),i.overTargets=n.composedPath(),f.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOut=function(){var e=xr(O().mark(function t(e){var n,r,i,o,a;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ts){t.next=2;break}return t.abrupt("return");case 2:if((n=f.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=f.findMountedTarget(n.overTargets),t.next=8,f.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return o=t.sent,f.dispatchEvent(o),r&&f.dispatchEvent(o,"mouseout"),t.next=13,f.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((a=t.sent).eventPhase=a.AT_TARGET;a.target&&a.target!==(Va.isNode(f.rootTarget)&&f.rootTarget.parentNode);)a.currentTarget=a.target,f.notifyTarget(a),r&&f.notifyTarget(a,"mouseleave"),Va.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=null,f.freeEvent(o),f.freeEvent(a);case 19:f.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOver=function(){var e=xr(O().mark(function t(e){var n,r,i,o;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ts){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),t.next=5,f.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,f.dispatchEvent(r,"pointerover"),i&&f.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(f.cursor=f.getCursor(r.target)),(o=f.clonePointerEvent(r,"pointerenter")).eventPhase=o.AT_TARGET;o.target&&o.target!==(Va.isNode(f.rootTarget)&&f.rootTarget.parentNode);)o.currentTarget=o.target,f.notifyTarget(o),i&&f.notifyTarget(o,"mouseenter"),Va.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=r.composedPath(),f.freeEvent(r),f.freeEvent(o);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var e=xr(O().mark(function t(e){var n,r,i,o;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ts){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),r=f.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,f.createPointerEvent(e);case 6:if(i=t.sent,r){for(o=r;o;)i.currentTarget=o,f.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||f.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),Va.isNode(o)&&(o=o.parentNode);delete n.pressTargetsByButton[e.button]}f.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onWheel=function(){var e=xr(O().mark(function t(e){var n;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof es){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createWheelEvent(e);case 4:n=t.sent,f.dispatchEvent(n),f.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Jn(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new Jn(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.context.config,i=r.width,r=r.height,o=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=mt(this.tmpMatrix,n,o),o=Ft(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Yt(o,o,n),new Jn(o[0],o[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=mt(this.tmpMatrix,n,e),e=Ft(this.tmpVec3,t.x,t.y,0),t=(Yt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Jn((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;o<n.length;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)Va.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(){var e=xr(O().mark(function t(e){var n,r,i,o;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,o=this.context.config,i=o.width,o=o.height,n<0||r<0||i<n||o<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e=this.context.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=_r(this.globalRuntime.displayObjectPool.getHTMLs());!(n=e()).done;){var n=n.value;if(-1<t.nativeEvent.composedPath().indexOf(n))return n}return null},e.pickTarget=function(){var e=xr(O().mark(function t(e){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.createPointerEvent=function(){var r=xr(O().mark(function t(e,n,r){var i,o;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=this.allocateEvent(ts),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r?t.next=11:(t.t0=r,t.next=20);break;case 11:if(t.t1=o,t.t1)t.next=19;else{if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18}break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.createWheelEvent=function(){var e=xr(O().mark(function t(e){var n,r;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(es),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0)t.next=15;else{if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14}break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(es);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=e.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(ts);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof ts&&e instanceof ts&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof Qa&&e instanceof Qa&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||Va.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Ja.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Va.isNode(e)&&e.parentNode}},t}(),Hs=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),Ws=((Vs=Ls=Ls||{})[Vs.CAMERA_CHANGED=0]="CAMERA_CHANGED",Vs[Vs.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",Vs[Vs.NONE=2]="NONE",function(){function t(t,e){this.globalRuntime=void 0,this.context=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new Ya(v.RENDER_ORDER_CHANGED),this.hooks={init:new wa,dirtycheck:new _a(["object"]),cull:new _a(["object","camera"]),beginFrame:new Sa([]),beforeRender:new Sa(["objectToRender"]),render:new Sa(["objectToRender"]),afterRender:new Sa(["objectToRender"]),endFrame:new Sa([]),destroy:new Sa([]),pick:new Ea(["result"]),pickSync:new _a(["result"]),pointerDown:new Sa(["event"]),pointerUp:new Sa(["event"]),pointerMove:new Sa(["event"]),pointerOut:new Sa(["event"]),pointerOver:new Sa(["event"]),pointerWheel:new Sa(["event"]),pointerCancel:new Sa(["event"])},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=xr(O().mark(function t(){var e;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=s({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e)}),t.next=4,this.hooks.init.promise();case 4:this.inited=!0;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(Ls.CAMERA_CHANGED)},e.render=function(t){var e=this,n=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(n.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),n.renderReasons.size&&this.inited&&(this.renderDisplayObject(n.root,t,n),this.hooks.beginFrame.call(),n.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),n.renderListCurrentFrame=[],n.renderReasons.clear())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,i=i.enableCulling,o=(this.globalRuntime.styleValueRegistry.recalc(t),o?this.hooks.dirtycheck.call(t):t),o=(o&&(i=i?this.hooks.cull.call(o,this.context.camera):o)&&(this.stats.rendered++,n.renderListCurrentFrame.push(i)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),i=!1;o.dirty&&(o.sorted=t.childNodes.slice().sort(ur),o.dirty=!(i=!0)),(o.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)}),i&&t.forEach(function(t){r.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.dispatchEvent(r.renderOrderChangedEvent)})},e.destroy=function(){this.inited=!1,this.hooks.destroy.call()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(Ls.DISPLAY_OBJECT_CHANGED)},t}()),Ys=/\[\s*(.*)=(.*)\s*\]/,Vs=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===o.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:o.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===o.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:o.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(Ys),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!_(t))&&t.toString?t.toString():""},t}(),qs=function(){function t(t){var a,i,o,r,s,l,c,u,h,n,f,d,y=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Ya(v.BOUNDS_CHANGED),this.rotate=(a=Kt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));var i,o,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ee(r=Kt(),e[0],e[1],e[2]),i=y.getRotation(t),o=y.getRotation(t.parentNode),re(a,o),te(a,a),Qt(r,a,r),Qt(n.localRotation,r,i),oe(n.localRotation,n.localRotation),y.dirtifyLocal(t,n)):y.rotateLocal(t,e)}),this.rotateLocal=(i=Kt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));n=t.transformable;ee(i,e[0],e[1],e[2]),ie(n.localRotation,n.localRotation,i),y.dirtifyLocal(t,n)}),this.setEulerAngles=(o=Kt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ee(n.localRotation,e[0],e[1],e[2]),r=y.getRotation(t.parentNode),re(o,te(Kt(),r)),ie(n.localRotation,n.localRotation,o),y.dirtifyLocal(t,n)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));var i,o,a,s,l,c,u,h,f,d,p,n=t.transformable;qt(e,m())||(i=r=e,o=n.localRotation,a=o[0],s=o[1],l=o[2],o=o[3],c=i[0],u=i[1],i=i[2],p=s*(d=a*u-s*c)-l*(f=l*c-a*i),l=l*(h=s*i-l*u)-a*d,a=a*f-s*h,f*=s=2*o,d*=s,l*=2,a*=2,r[0]=c+(h*=s)+(p*=2),r[1]=u+f+l,r[2]=i+d+a,Dt(n.localPosition,n.localPosition,e),y.dirtifyLocal(t,n))},this.setPosition=(r=ut(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,qt(y.getPosition(t),s)||(Rt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(r,e.worldTransform),yt(r,r),Yt(n.localPosition,s,r)):Rt(n.localPosition,s),y.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,qt(n.localPosition,l)||(Rt(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),h=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),qt(e="number"==typeof e?Ft(u,e,n,r):e,c)||(Dt(h,y.getPosition(t),e),y.setPosition(t,h))}),this.setRotation=function(){var a=Kt();return function(t,e,n,r,i){var o=t.transformable;"number"==typeof e&&(e=ne(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),re(a,n),te(a,a),Qt(o.localRotation,a,e),oe(o.localRotation,o.localRotation),y.dirtifyLocal(t,o)):y.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ut(),f=m(),d=ne(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(_t(t.localTransform,t.localRotation,t.localPosition,E(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=dt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),mt(t.localTransform,t.localTransform,e)),e=_t(n,d,f,t.localScale,t.origin),mt(t.localTransform,t.localTransform,e)):_t(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,_(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));n=t.transformable;qt(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));n=t.transformable;ee(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=E(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=E(e[0],e[1],e[2]||n.localScale[2]);qt(e,n.localScale)||(Rt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=ne(e,n,r,i));n=t.transformable;re(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=ae(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){i.has(t.entity)||(n.boundsChangedEvent.detail=e,t.dispatchEvent(n.boundsChangedEvent),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new Xa(v.ATTR_MODIFIED,t,n,n,e,Xa.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return Mt(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Ot(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return St(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=Mt(m(),e),r=Ot(Kt(),e),e=St(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return $n.isEmpty(e)?null:((n=n||new $n).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new $n},e.getBounds=function(t,e){var n,r,i=this,o=(void 0===e&&(e=!1),t.renderable);return o.boundsDirty||e||!o.bounds?!o.renderBoundsDirty&&e&&o.renderBounds?o.renderBounds:(n=e?o.renderBounds:o.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new $n).update(t.center,t.halfExtents))}),e&&(t=hr(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new $n)&&(e?o.renderBounds=r:o.bounds=r),e?o.renderBoundsDirty=!1:o.boundsDirty=!1,r):o.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=ut(),r=(t.parentNode.transformable&&(n=yt(ut(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!$n.isEmpty(r))return(e=new $n).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=($n.isEmpty(i)||(r=new $n).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new Qn(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Qn((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?mt(e.worldTransform,n.worldTransform,e.localTransform):ht(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),Xs={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Us=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,$s=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Zs=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Ks=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Zs.exec(e)&&!$s.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Xs.MetricsString+Xs.BaselineSymbol),o=Math.ceil(e.measureText(i).width),a=Math.ceil(e.measureText(Xs.BaselineSymbol).width),s=Xs.HeightMultiplier*a,a=a*Xs.BaselineMultiplier|0,l=(r.width=o,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,o,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,a),e.getImageData(0,0,o||1,s||1).data),r=l.length,c=4*o,u=0,h=0,f=!1,u=0;u<a;++u){for(var d=0;d<c;d+=4)if(255!==l[h+d]){f=!0;break}if(f)break;h+=c}for(n.ascent=a-u,h=r-c,f=!1,u=s;a<u;--u){for(var p=0;p<c;p+=4)if(255!==l[h+p]){f=!0;break}if(f)break;h-=c}return n.descent=u-a,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,h=(e.textPathSide,e.textPathStartOffset,e.leading),h=void 0===h?0:h,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=Ke(e)&&e+"px"||"16px",o=$e(n)?n.split(","):[n],a=o.length-1;0<=a;a--){var s=o[a].trim();!Ta.test(s)&&Pa.indexOf(s)<0&&(s='"'+s+'"'),o[a]=s}return r+" "+i+" "+t+" "+e+" "+o.join(",")}(e),d=this.measureFont(f,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=f,e.isOverflowing=!1;var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(y.length),m=0;if(!u){for(var v=0;v<y.length;v++){var b=p.measureText(y[v]).width+(y[v].length-1)*c;g[v]=b,m=Math.max(m,b)}var r=m+a,x=o||d.fontSize+a,i=Math.max(x,d.fontSize+a)+(y.length-1)*(x+h),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:r,height:i,lines:y,lineWidths:g,lineHeight:x+=h,maxLineWidth:m,fontProperties:d,lineMetrics:g.map(function(t,e){var n=0;return"center"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Qn(n-a/2,w+e*x,t+a,x)})}}u.getTotalLength(),u.getPoint(0);for(var k=0;k<y.length;k++)p.measureText(y[k]).width,y[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,o=e.letterSpacing,a=e.maxLines,s=void 0===a?1/0:a,a=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+o,u="",h=("ellipsis"===a?u="...":a&&"clip"!==a&&(u=a),[]),f=0,d=0,p={},y=function(t){return r.getFromCache(t,o,p,l)},g=Array.from(u).reduce(function(t,e){return t+y(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=y(b);if(this.isNewline(b))d=0,h[++f]="";else{if(0<d&&c<d+k){if(s<=f+1){if(e.isOverflowing=!0,0<g&&g<=c){for(var E=0,M=0,S=0;S<h[f].length;S++){var O=y(h[f][S]);if(c<E+O+g){M=S;break}E+=O}h[f]=(h[f]||"").slice(0,M)+u}break}if(d=0,h[++f]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(h=this.trimToBreakable(h),d=this.sumTextWidthByCache(h[f]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(h=this.trimByKinsokuShorui(h),d+=y(x||""))}d+=k,h[f]=(h[f]||"")+b}}return h.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=Xs.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Xs.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!Us.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!Us.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),b={},js=(Bs=new Bs,Ds=new Ds,(W1={})[M.CIRCLE]=new js,W1[M.ELLIPSE]=new Is,W1[M.RECT]=Bs,W1[M.IMAGE]=Bs,W1[M.GROUP]=Bs,W1[M.LINE]=new Rs,W1[M.TEXT]=new zs(b),W1[M.POLYLINE]=Ds,W1[M.POLYGON]=Ds,W1[M.PATH]=new Fs,W1[M.HTML]=null,W1[M.MESH]=null,W1),zs=(Is=new r,Bs=new lo,(Rs={})[n.PERCENTAGE]=null,Rs[n.NUMBER]=new po,Rs[n.ANGLE]=new e,Rs[n.DEFINED_PATH]=new t,Rs[n.PAINT]=Is,Rs[n.COLOR]=Is,Rs[n.FILTER]=new oo,Rs[n.LENGTH]=Bs,Rs[n.LENGTH_PERCENTAGE]=Bs,Rs[n.LENGTH_PERCENTAGE_12]=new co,Rs[n.LENGTH_PERCENTAGE_14]=new uo,Rs[n.COORDINATE]=new ho,Rs[n.OFFSET_DISTANCE]=new yo,Rs[n.OPACITY_VALUE]=new go,Rs[n.PATH]=new mo,Rs[n.LIST_OF_POINTS]=new o,Rs[n.SHADOW_BLUR]=new vo,Rs[n.TEXT]=new bo,Rs[n.TEXT_TRANSFORM]=new xo,Rs[n.TRANSFORM]=new wo,Rs[n.TRANSFORM_ORIGIN]=new so,Rs[n.Z_INDEX]=new a,Rs[n.MARKER]=new fo,Rs),Ds=(b.CameraContribution=u,b.AnimationTimeline=null,b.EasingFunction=null,b.offscreenCanvas=new Hs,b.displayObjectPool=new hs,b.sceneGraphSelector=new Vs,b.sceneGraphService=new qs(b),b.textService=new Ks(b),b.geometryUpdaterFactory=js,b.CSSPropertySyntaxFactory=zs,b.styleValueRegistry=new va,b.layoutRegistry=null,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}()),Fs=function(){function t(t){this.plugins=[],this.config=void 0,this.config=s({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),Js=function(){function o(t){this.strategies=void 0,this.strategies=t}return o.prototype.apply=function(t){var n=t.camera,e=t.renderingService,r=t.renderingContext,i=this.strategies;e.hooks.cull.tap(o.tag,function(e){var t;return e&&(t=e.cullable,0===i.length?t.visible=-1<r.unculledEntities.indexOf(e.entity):t.visible=i.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new Ya(v.CULLED)),null))}),e.hooks.afterRender.tap(o.tag,function(t){t.cullable.visibilityPlaneMask=-1})},o}(),Qs=(Js.tag="Culling",function(){function n(){}return n.prototype.apply=function(t){var e=t.renderingService;e.hooks.dirtycheck.tap(n.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},n}()),tl=(Qs.tag="DirtyCheck",function(){function e(){var o=this;this.autoPreventDefault=!1,this.rootPointerEvent=new ts(null),this.rootWheelEvent=new es(null),this.context=void 0,this.onPointerMove=function(t){var e,n=null==(e=o.context.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=_r(o.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,n);o.context.eventService.mapEvent(i)}o.setCursor(o.context.eventService.cursor)}}}var t=e.prototype;return t.apply=function(t){var o=this,t=(this.context=t).renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(){var e=xr(O().mark(function t(e){var n;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.context.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(e.tag,function(t){t=o.normalizeWheelEvent(t);o.context.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(e.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){var e=o.normalizeToPointerEvent(t,a);!o.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=_r(e);!(r=n()).done;){var r=r.value,r=o.bootstrapEvent(o.rootPointerEvent,r,a);o.context.eventService.mapEvent(r)}o.setCursor(o.context.eventService.cursor)}}),t.hooks.pointerUp.tap(e.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){for(var e=o.context.contextService.getDomElement(),n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":"",r=_r(o.normalizeToPointerEvent(t,a));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,a);i.type+=n,o.context.eventService.mapEvent(i)}o.setCursor(o.context.eventService.cursor)}}),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)},t.getViewportXY=function(t){var e,n=t.offsetX,r=t.offsetY,i=t.clientX,t=t.clientY;return t=!this.context.config.supportsCSSTransform||_(n)||_(r)?(e=(i=this.context.eventService.client2Viewport(new Jn(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var n=this.getViewportXY(e),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.context.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=vr[t.type]||t.type),t},t.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.getViewportXY(t)),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.context.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];Qe(i.button)&&(i.button=0),Qe(i.buttons)&&(i.buttons=1),Qe(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),Qe(i.width)&&(i.width=i.radiusX||1),Qe(i.height)&&(i.height=i.radiusY||1),Qe(i.tiltX)&&(i.tiltX=0),Qe(i.tiltY)&&(i.tiltY=0),Qe(i.pointerType)&&(i.pointerType="touch"),Qe(i.pointerId)&&(i.pointerId=i.identifier||0),Qe(i.pressure)&&(i.pressure=i.force||.5),Qe(i.twist)&&(i.twist=0),Qe(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(Qe((e=t).isPrimary)&&(e.isPrimary=!0),Qe(e.width)&&(e.width=1),Qe(e.height)&&(e.height=1),Qe(e.tiltX)&&(e.tiltX=0),Qe(e.tiltY)&&(e.tiltY=0),Qe(e.pointerType)&&(e.pointerType="mouse"),Qe(e.pointerId)&&(e.pointerId=1),Qe(e.pressure)&&(e.pressure=.5),Qe(e.twist)&&(e.twist=0),Qe(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),el=(tl.tag="Event",[M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML]),nl=function(){function t(){}var e=t.prototype;return e.isVisible=function(t,e){var n,r,i=e.cullable;return!i.enable||(n=e.getRenderBounds(),!$n.isEmpty(n)&&(t=t.getFrustum(),r=null==(r=e.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,n,r||Un.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==Un.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Un.OUTSIDE||n===Un.INSIDE)return n;for(var i=Un.INSIDE,o=-1<el.indexOf(t.nodeName),a=0,s=r.length;a<s;++a){var l=1<<a;if(0!=(n&l)&&(!o||4!==a&&5!==a)){var c=r[a],u=c.normal,c=c.distance;if(Ht(u,e.getPositiveFarPoint(r[a]))+c<0)return Un.OUTSIDE;Ht(u,e.getNegativeFarPoint(r[a]))+c<0&&(i|=l)}}return i},t}(),rl=function(){function l(){this.rBush=void 0,this.toSync=new Set}var t=l.prototype;return t.pushToSync=function(t){var e=this;t.forEach(function(t){e.toSync.add(t)})},t.apply=function(t){function e(t){t.target.renderable.dirty=!0,a.dirtify()}function n(t){var e=t.detail.affectChildren,n=t.target;e&&n.forEach(function(t){o.pushToSync([t])}),o.pushToSync(t.composedPath().slice(0,-2)),a.dirtify()}function r(t){var e=t.target;o.pushToSync(t.composedPath().slice(0,-2)),b.styleValueRegistry.recalc(e),b.sceneGraphService.dirtifyToRoot(e),a.dirtify()}function i(t){var e=t.target,n=e.rBushNode;n.aabb&&o.rBush.remove(n.aabb),o.toSync.delete(e),b.sceneGraphService.dirtifyToRoot(t.target),a.dirtify()}var o=this,a=t.renderingService,s=t.renderingContext,t=t.rBushRoot;this.rBush=t;a.hooks.init.tapPromise(l.tag,xr(O().mark(function t(){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:s.root.addEventListener(v.MOUNTED,r),s.root.addEventListener(v.UNMOUNTED,i),s.root.addEventListener(v.ATTR_MODIFIED,e),s.root.addEventListener(v.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),a.hooks.destroy.tap(l.tag,function(){s.root.removeEventListener(v.MOUNTED,r),s.root.removeEventListener(v.UNMOUNTED,i),s.root.removeEventListener(v.ATTR_MODIFIED,e),s.root.removeEventListener(v.BOUNDS_CHANGED,n)}),a.hooks.endFrame.tap(l.tag,function(){o.syncRTree()})},t.syncRTree=function(){var a=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,o=(i&&i.aabb&&a.rBush.remove(i.aabb),t.getRenderBounds());o&&(e=(n=o.getMin())[0],n=n[1],r=(o=o.getMax())[0],o=o[1],i.aabb||(i.aabb={}),i.aabb.id=t.entity,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=o),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},l}(),il=(rl.tag="Prepare",(W1=Ns=Ns||{}).READY="ready",W1.BEFORE_RENDER="beforerender",W1.AFTER_RENDER="afterrender",W1.BEFORE_DESTROY="beforedestroy",W1.AFTER_DESTROY="afterdestroy",W1.RESIZE="resize",W1.DIRTY_RECTANGLE="dirtyrectangle",new Ya(v.MOUNTED)),ol=new Ya(v.UNMOUNTED),al=new Ya(Ns.BEFORE_RENDER),sl=new Ya(Ns.AFTER_RENDER),ll=function(k){function t(t){var e=k.call(this)||this,n=(e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=P,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new qa,e.document.defaultView=Sr(e),e.customElements=new Ha,t.container),r=t.canvas,i=t.offscreenCanvas,o=t.width,a=t.height,s=t.devicePixelRatio,l=t.renderer,c=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,y=t.supportsPointerEvents,g=t.supportsTouchEvents,m=t.supportsCSSTransform,v=t.isTouchEvent,t=t.isMouseEvent,b=(b=n,x=Sr(e),b&&(b="string"==typeof b?b:b.id||lr++,sr[b]&&sr[b].destroy(),sr[b]=x),o),x=a,w=s;return r&&(w=1<=(w=s||cr&&window.devicePixelRatio||1)?Math.ceil(w):1,b=o||("auto"===(o=fr(s=r,"width"))?s.offsetWidth:parseFloat(o))||r.width/w,x=a||("auto"===(o=fr(s=r,"height"))?s.offsetHeight:parseFloat(o))||r.height/w),e.devicePixelRatio=w,e.requestAnimationFrame=null!=f?f:qn.bind(globalThis),e.cancelAnimationFrame=null!=d?d:Xn.bind(globalThis),e.supportsTouchEvents=null!=g?g:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=y?y:!!globalThis.PointerEvent,e.isTouchEvent=null!=v?v:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:b,height:x,renderer:l,offscreenCanvas:i,devicePixelRatio:w,cursor:u||"default",background:c||"transparent",createImage:p,document:h,supportsCSSTransform:m}),e.initDefaultCamera(b,x),xr(O().mark(function t(){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new Ya(Ns.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}l(t,k);var e=t.prototype;return e.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.initDefaultCamera=function(t,e){var n=this,r=new b.CameraContribution;r.setType(La.EXPLORING,Na.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r.canvas=this,r.eventEmitter.on(Cs,function(){n.context.renderingContext.renderReasons.add(Ls.CAMERA_CHANGED)}),this.context.camera=r},e.getConfig=function(){return this.context.config},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.context.camera},e.getContextService=function(){return this.context.contextService},e.getEventService=function(){return this.context.eventService},e.getRenderingService=function(){return this.context.renderingService},e.getRenderingContext=function(){return this.context.renderingContext},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new Ya(Ns.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),e||this.dispatchEvent(new Ya(Ns.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.context.config,n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.context.camera),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Ca.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new Ya(Ns.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.removeChildren=function(){this.document.documentElement.removeChildren()},e.render=function(){this.dispatchEvent(al),this.getRenderingService().render(this.getConfig()),this.dispatchEvent(sl)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=xr(O().mark(function t(e){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new z,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new tl,new rl,new Qs,new Js([new nl])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(s({},b,this.context)),this.context.renderingService=new Ws(b,this.context),this.context.eventService=new Gs(b,this.context),this.context.eventService.init(),t.next=14,this.context.contextService.init();case 14:return t.next=16,this.context.renderingService.init();case 16:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 20:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init()})},e.setRenderer=function(){var e=xr(O().mark(function t(e){var n,r;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e,n=this;this.inited&&(e=[],t.forEach(function(t){t.isConnected&&e.push(t)}),e.reverse().forEach(function(t){t instanceof ls&&t.disconnectedCallback&&t.disconnectedCallback(),t.dispatchEvent(ol),t!==n.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))},e.mountChildren=function(t){var e=this;this.inited?t.forEach(function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.dispatchEvent(il),t instanceof ls&&t.connectedCallback&&t.connectedCallback())}):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName)},e.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},kr(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(ba);function cl(t,e){return(cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ul="undefined"!=typeof Float32Array?Float32Array:Array;function hl(t,e,n){var r,i,o,a,s,l,c,u,h,f,d,p,y=n[0],g=n[1],n=n[2];e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+f*n+e[13],t[14]=o*y+c*g+d*n+e[14],t[15]=a*y+u*g+p*n+e[15])}function fl(){var t=new ul(3);return ul!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function dl(t){var e=new ul(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function pl(t,e,n){var r=new ul(3);return r[0]=t,r[1]=e,r[2]=n,r}function yl(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function gl(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function ml(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function vl(t,e,n,r){var i=e[0],o=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=e+r*(n[2]-e)}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var bl=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)};function xl(){var t=new ul(4);return ul!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function wl(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function kl(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*a+i*l-o*s,t[1]=i*n+e*s+o*a-r*l,t[2]=o*n+e*l+r*s-i*a,t[3]=e*n-r*a-i*s-o*l,t}fl(),r=new ul(4),ul!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0);fl(),pl(1,0,0),pl(0,1,0),xl(),xl(),lo=new ul(9),ul!=Float32Array&&(lo[1]=0,lo[2]=0,lo[3]=0,lo[5]=0,lo[6]=0,lo[7]=0),lo[0]=1,lo[4]=1,lo[8]=1;po=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).landmarks=[],t.landmarkAnimationID=void 0,t}t=i,(n=e).prototype=Object.create(t.prototype),cl(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=ko(e),this.relAzimuth=ko(t),this.relRoll=ko(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===La.EXPLORING){e=wl(xl(),[1,0,0],Mo((this.rotateWorld?1:-1)*this.relElevation)),t=wl(xl(),[0,1,0],Mo((this.rotateWorld?1:-1)*this.relAzimuth)),n=wl(xl(),[0,0,1],Mo(this.relRoll)),t=kl(xl(),t,e),t=kl(xl(),t,n),g=(e=new ul(16),ul!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,n=e,t=(e=t)[0],p=e[1],y=e[2],e=e[3],t*=x=t+t,m=p*x,p*=w=p+p,v=y*x,b=y*w,y*=g=y+y,x*=e,w*=e,e*=g,n[0]=1-p-y,n[1]=m+e,n[2]=v-w,n[3]=0,n[4]=m-e,n[5]=1-t-y,n[6]=b+x,n[7]=0,n[8]=v+w,n[9]=b-x,n[10]=1-t-p,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n);hl(this.matrix,this.matrix,[0,0,-this.distance]),m=this.matrix,e=this.matrix,y=g,v=e[0],w=e[1],b=e[2],x=e[3],t=e[4],p=e[5],n=e[6],g=e[7],r=e[8],i=e[9],o=e[10],a=e[11],s=e[12],l=e[13],c=e[14],e=e[15],u=y[0],h=y[1],f=y[2],d=y[3],m[0]=u*v+h*t+f*r+d*s,m[1]=u*w+h*p+f*i+d*l,m[2]=u*b+h*n+f*o+d*c,m[3]=u*x+h*g+f*a+d*e,u=y[4],h=y[5],f=y[6],d=y[7],m[4]=u*v+h*t+f*r+d*s,m[5]=u*w+h*p+f*i+d*l,m[6]=u*b+h*n+f*o+d*c,m[7]=u*x+h*g+f*a+d*e,u=y[8],h=y[9],f=y[10],d=y[11],m[8]=u*v+h*t+f*r+d*s,m[9]=u*w+h*p+f*i+d*l,m[10]=u*b+h*n+f*o+d*c,m[11]=u*x+h*g+f*a+d*e,u=y[12],h=y[13],f=y[14],d=y[15],m[12]=u*v+h*t+f*r+d*s,m[13]=u*w+h*p+f*i+d*l,m[14]=u*b+h*n+f*o+d*c,m[15]=u*x+h*g+f*a+d*e,hl(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}var r,i,o,a,s,l,c,u,h,f,d,p,y,g,m,v,b,x,w;return this._getAxes(),this.type===La.ORBITING||this.type===La.EXPLORING?this._getPosition():this.type===La.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=Eo(t,e,0),e=dl(this.position);return gl(e,e,ml(fl(),this.right,t[0])),gl(e,e,ml(fl(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=dl(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===La.ORBITING||this.type===La.EXPLORING?this._getDistance():this.type===La.TRACKING&&gl(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.createLandmark=function(t,e){var e=e=void 0===e?{}:e,n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,o=new b.CameraContribution,i=(o.setType(this.type,void 0),o.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),o.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),o.setRoll(i||this.roll),o.setZoom(e||this.zoom),{name:t,matrix:(n=o.getWorldTransform(),(r=new ul(16))[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],r),right:dl(o.right),up:dl(o.up),forward:dl(o.forward),position:dl(o.getPosition()),focalPoint:dl(o.getFocalPoint()),distanceVector:dl(o.getDistanceVector()),distance:o.getDistance(),dollyingStep:o.getDollyingStep(),azimuth:o.getAzimuth(),elevation:o.getElevation(),roll:o.getRoll(),relAzimuth:o.relAzimuth,relElevation:o.relElevation,relRoll:o.relRoll,zoom:o.getZoom()});return this.landmarks.push(i),i},n.gotoLandmark=function(e,t){var n,s,r,i,l,c,u,h,f,d,p,y,g=this,o=(void 0===t&&(t={}),$e(e)?this.landmarks.find(function(t){return t.name===e}):e);o&&(n=void 0===(n=(t=Ke(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,l=.01,0===s?(this.syncFromLandmark(o),i&&i()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),c=o.position,u=o.focalPoint,h=o.zoom,f=o.roll,d=r||b.EasingFunction(n),y=function(){g.setFocalPoint(u),g.setPosition(c),g.setRoll(f),g.setZoom(h),g.computeMatrix(),g.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,o,a,e=e-(p=void 0===p?e:p);s<e||(n=d(e/s),r=fl(),i=fl(),o=1,a=0,vl(r,g.focalPoint,u,n),vl(i,g.position,c,n),a=g.roll*(1-n)+f*n,o=g.zoom*(1-n)+h*n,g.setFocalPoint(r),g.setPosition(i),g.setRoll(a),g.setZoom(o),bl(r,u)+bl(i,c)<=l)?y():(g.computeMatrix(),g.triggerUpdate(),e<s&&(g.landmarkAnimationID=g.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){var e,n;this.matrix=(e=this.matrix,n=t.matrix,e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e),this.right=yl(this.right,t.right),this.up=yl(this.up,t.up),this.forward=yl(this.forward,t.forward),this.position=yl(this.position,t.position),this.focalPoint=yl(this.focalPoint,t.focalPoint),this.distanceVector=yl(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(u);function El(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ml(t,e,n){e&&El(t.prototype,e),n&&El(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Sl(t,e){return(Sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}b.CameraContribution=po;function Ol(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Zl?Float32Array:Array)(11),t=0;t<11;++t)w[t]=tc(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=ec(r,b,x);if(.001<=i){for(var o=t,a=r,s=b,l=x,c=0;c<Xl;++c){var u=ec(a,s,l);if(0===u)return a;a-=(tc(a,s,l)-o)/u}return a}if(0===i)return r;for(var h,f,d=t,p=e,y=e+.1,g=b,m=x,v=0;0<(h=tc(f=p+(y-p)/2,g,m)-d)?y=f:p=f,Math.abs(h)>Ul&&++v<$l;);return f}return function(t){return 0===t||1===t?t:tc(r(t),e,n)}}function _l(t){return Math.pow(t,2)}function Pl(t){return Math.pow(t,3)}function Tl(t){return Math.pow(t,4)}function Al(t){return Math.pow(t,5)}function Ll(t){return Math.pow(t,6)}function Nl(t){return 1-Math.cos(t*Math.PI/2)}function Cl(t){return 1-Math.sqrt(1-t*t)}function jl(t){return t*t*(3*t-2)}function Il(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}function Rl(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=Ze(Number(void 0===n?1:n),1,10),e=Ze(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function Fl(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,o=void 0===(o=e[2])?10:o,e=void 0===(e=e[3])?0:e,r=Ze(void 0===r?1:r,.1,1e3),i=Ze(i,.1,1e3),o=Ze(o,.1,1e3),e=Ze(e,.1,1e3),a=Math.sqrt(i/r),i=(o=o/(2*Math.sqrt(i*r)))<1?a*Math.sqrt(1-o*o):0,r=o<1?(o*a-e)/i:-e+a,e=n?n*t/1e3:t,e=o<1?Math.exp(-e*o*a)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*a);return 0===t||1===t?t:1-e}function Dl(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(Ze(t,0,1)*n)/n}function Bl(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return Ol(n,r,i,e)(t)}function zl(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function Gl(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function Hl(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function Wl(t){return t}var Yl=function(i){var t,e;function n(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return e=i,(t=n).prototype=Object.create(e.prototype),Sl(t.prototype.constructor=t,e),n}(Wa),Vl=0,ql=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+Vl++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}},e.persist=function(){throw new Error(gr)},e.addEventListener=function(t,e,n){throw new Error(gr)},e.removeEventListener=function(t,e,n){throw new Error(gr)},e.dispatchEvent=function(t){throw new Error(gr)},e.commitStyles=function(){throw new Error(gr)},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new Yl(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new Yl(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},Ml(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending)||this.resolveReadyPromise(),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),e=this.currentTime,this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),Xl=4,Ul=1e-7,$l=10,Zl="function"==typeof Float32Array,Kl=function(t,e){return 1-3*e+3*t},Jl=function(t,e){return 3*e-6*t},Ql=function(t){return 3*t},tc=function(t,e,n){return((Kl(e,n)*t+Jl(e,n))*t+Ql(e))*t},ec=function(t,e,n){return 3*Kl(e,n)*t*t+2*Jl(e,n)*t+Ql(e)},e=Ol(.42,0,1,1),nc={steps:Dl,"step-start":function(t){return Dl(t,[1,"start"])},"step-end":function(t){return Dl(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Bl,ease:function(t){return Bl(t,[.25,.1,.25,1])},in:e,out:zl(e),"in-out":Gl(e),"out-in":Hl(e),"in-quad":_l,"out-quad":zl(_l),"in-out-quad":Gl(_l),"out-in-quad":Hl(_l),"in-cubic":Pl,"out-cubic":zl(Pl),"in-out-cubic":Gl(Pl),"out-in-cubic":Hl(Pl),"in-quart":Tl,"out-quart":zl(Tl),"in-out-quart":Gl(Tl),"out-in-quart":Hl(Tl),"in-quint":Al,"out-quint":zl(Al),"in-out-quint":Gl(Al),"out-in-quint":Hl(Al),"in-expo":Ll,"out-expo":zl(Ll),"in-out-expo":Gl(Ll),"out-in-expo":Hl(Ll),"in-sine":Nl,"out-sine":zl(Nl),"in-out-sine":Gl(Nl),"out-in-sine":Hl(Nl),"in-circ":Cl,"out-circ":zl(Cl),"in-out-circ":Gl(Cl),"out-in-circ":Hl(Cl),"in-back":jl,"out-back":zl(jl),"in-out-back":Gl(jl),"out-in-back":Hl(jl),"in-bounce":Il,"out-bounce":zl(Il),"in-out-bounce":Gl(Il),"out-in-bounce":Hl(Il),"in-elastic":Rl,"out-elastic":zl(Rl),"in-out-elastic":Gl(Rl),"out-in-elastic":Hl(Rl),spring:Fl,"spring-in":Fl,"spring-out":zl(Fl),"spring-in-out":Gl(Fl),"spring-out-in":Hl(Fl)},rc=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function ic(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var t="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",oc=new RegExp("cubic-bezier\\("+t+","+t+","+t+","+t+"\\)"),ac=/steps\(\s*(\d+)\s*\)/,sc=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function lc(t){var e=oc.exec(t);return e?Ol.apply(void 0,e.slice(1).map(Number)):(e=ac.exec(t))?ic(Number(e[1]),0):(e=sc.exec(t))?ic(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):nc[rc(t)]||nc.linear}function cc(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var uc=0,hc=1,fc=2,dc=3;function pc(t,e,n){c=t,i=n;var r,i,o,a,s,l=null===(l=e)?uc:(r=i.endTime,l<Math.min(i.delay,r)?hc:l>=Math.min(i.delay+c+i.endDelay,r)?fc:dc),c=function(t,e,n,r,i){switch(r){case hc:return"backwards"===e||"both"===e?0:null;case dc:return n-i;case fc:return"forwards"===e||"both"===e?t:null;case uc:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,a=c,s=n.iterationStart,0===r?t!==hc&&(s+=e):s+=a/r,e=t=s,a=n.iterationStart,s=l,o=n.iterations,c=c,i=i,e=a=0!==(a=e===1/0?a%1:e%1)||s!==fc||0===o||0===c&&0!==i?a:1,s=n.iterations,o=e,c=t,i=l===fc&&s===1/0?1/0:1===o?Math.floor(c)-1:Math.floor(c),a=n.direction,t=i,l=e,o="normal"===(s="normal"!==(s=a)&&"reverse"!==a&&(t=t,"alternate-reverse"===a&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?l:1-l,n.currentIteration=i,n.progress=o,n.easingFunction(o))}function yc(t,e,n){var o=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var o;gc(i)&&(o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:lc(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(o))}return n}(t,e),a=function(t,e){var n,r=[];for(n in t)for(var i=t[n],o=0;o<i.length-1;o++){var a=o,s=o+1,l=i[a].computedOffset,c=i[s].computedOffset,u=l,h=c;0===o&&(u=-1/0,0===c)&&(s=a),o===i.length-2&&(h=1/0,1===l)&&(a=s),r.push({applyFrom:u,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:n,interpolation:function(t,e,n,r){var i=Ia[t];if(i&&i.syntax&&i.int){i=b.styleValueRegistry.getPropertySyntax(i.syntax);if(i){var o,a=b.styleValueRegistry.parseProperty(t,e,r),s=b.styleValueRegistry.parseProperty(t,n,r),a=b.styleValueRegistry.computeProperty(t,a,r),t=b.styleValueRegistry.computeProperty(t,s,r),s=i.mixer(a,t,r);if(s)return o=mc.apply(void 0,s),function(t){return 0===t?e:1===t?n:o(t)}}}return mc(!1,!0,function(t){return t?n:e})}(n,i[a].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(o,n);return function(r,i){if(null!==i)a.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in o)gc(t)&&(r.style[t]=null)}}function gc(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var mc=function(e,n,r){return function(t){return r(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var vc=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Wl,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return Ml(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=lc(t),this._easing=t}}]),t}();function bc(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],o=(i=Array.isArray(i)?i:[i]).length,a=0;a<o;a++)n[a]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[a]=r),void 0!==i[a]&&null!==i[a]&&(n[a][e]=i[a]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,o=0;o<e.length;o++){var a=e[o].offset;if(_(a))n=!1;else{if(a<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=a}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,l=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),c=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(c)){for(var f=1;f<u-l;f++)e[l+f].computedOffset=c+(Number(h)-c)*f/(u-l);l=u,c=Number(h)}}return e}var xc="backwards|forwards|both|none".split("|"),wc="reverse|alternate|alternate-reverse".split("|");function kc(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new vc,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===xc.indexOf(n[t])||"direction"===t&&-1===wc.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var Ec=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=kc(n,!1),(this.timing.effect=this).timing.activeDuration=cc(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=bc(e,this.timing),this.interpolations=yc(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=pc(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=bc(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})},t}();function Mc(t,e){return Number(t.id)-Number(e.id)}Is=function(){function t(t){var n=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(Mc),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){t=new Ec(t,e,n),e=new ql(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(Mc),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,o=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),a=[],s=[],l=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(a.push(t.effect),t.markTarget()):(o.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:l).push(t)}),(t=this.pendingEffects).push.apply(t,o),(t=this.pendingEffects).push.apply(t,a),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,l]},t}();function Sc(t,e){return(Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Oc(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function _c(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function Pc(t,e){var n,r,i=e.x1,o=e.y1,a=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,c=e.defY,c=void 0===c?0:c,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,y=0,g=0,m=0;u&&u instanceof P&&f&&(n=a-i,r=s-o,m=Math.atan2(r,n),d=Math.cos(m)*(f||0),p=Math.sin(m)*(f||0)),h&&h instanceof P&&e&&(n=i-a,r=o-s,m=Math.atan2(r,n),y=Math.cos(m)*(e||0),g=Math.sin(m)*(e||0)),t.moveTo(i-l+d,o-c+p),t.lineTo(a-l+y,s-c+g)}function Tc(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,e=e.path,u=e.curve,e=e.zCommandIndexes,h=[].concat(u),f=(e.forEach(function(t,e){h.splice(t+e+1,0,["Z"])}),h.length&&"Z"===h[h.length-1][0]),d=0,p=0,y=0,g=0,u=0;i&&i instanceof P&&l&&(i=(e=i.parentNode.getStartTangent())[0],e=e[1],n=i[0]-e[0],r=i[1]-e[1],u=Math.atan2(r,n),d=Math.cos(u)*(l||0),p=Math.sin(u)*(l||0)),s&&s instanceof P&&c&&(e=(i=s.parentNode.getEndTangent())[0],l=i[1],n=e[0]-l[0],r=e[1]-l[1],u=Math.atan2(r,n),y=Math.cos(u)*(c||0),g=Math.sin(u)*(c||0));for(var m=0;m<h.length;m++){var v=h[m];switch(v[0]){case"M":t.moveTo(v[1]-o+d,v[2]-a+p);break;case"C":var b=m===h.length-(f?2:1)?y:0,x=m===h.length-(f?2:1)?g:0;t.bezierCurveTo(v[1]-o,v[2]-a,v[3]-o,v[4]-a,v[5]-o+b,v[6]-a+x);break;case"Z":t.closePath()}}}function Ac(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-o,f=u[0][1]-a,d=u[h-1][0]-o,p=u[h-1][1]-a,y=0,g=0,m=0,v=0,b=0;i&&i instanceof P&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),g=Math.sin(b)*(l||0)),s&&s instanceof P&&c&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),m=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+(y||m),f+(g||v));for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(d,p)}function Lc(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-o,f=u[0][1]-a,d=u[h-1][0]-o,p=u[h-1][1]-a,y=0,g=0,m=0,v=0,b=0;i&&i instanceof P&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),g=Math.sin(b)*(l||0)),s&&s instanceof P&&c&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),m=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+y,f+g);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(d+m,p+v)}function Nc(t,e){var n,r,i,o,a=e.radius,s=e.width,e=e.height,l=s,c=e;a&&a.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(a=a.map(function(t){return Ze(t,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}))[0],i=a[1],o=a[2],a=a[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,c-e*o),0!==o&&t.arc(l-s*o,c-e*o,o,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*a,c),0!==a&&t.arc(s*a,c-e*a,a,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,l,c)}b.EasingFunction=lc,b.AnimationTimeline=Is;var Cc=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),Sc(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[M.CIRCLE]=Oc,t[M.ELLIPSE]=_c,t[M.RECT]=Nc,t[M.LINE]=Pc,t[M.POLYLINE]=Lc,t[M.POLYGON]=Ac,t[M.PATH]=Tc,t[M.TEXT]=void 0,t[M.GROUP]=void 0,t[M.IMAGE]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(Ds);function jc(){jc=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function Ic(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Rc(t,e){return(Rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Dc(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Fc(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fc(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Bc="undefined"!=typeof Float32Array?Float32Array:Array;function zc(){var t=new Bc(3);return Bc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Gc(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),zc(),oo=new Bc(2),Bc!=Float32Array&&(oo[0]=0,oo[1]=0);var Hc=zc(),Wc=zc(),Yc=zc(),Vc=(Bs=new Bc(16),Bc!=Float32Array&&(Bs[1]=0,Bs[2]=0,Bs[3]=0,Bs[4]=0,Bs[6]=0,Bs[7]=0,Bs[8]=0,Bs[9]=0,Bs[11]=0,Bs[12]=0,Bs[13]=0,Bs[14]=0),Bs[0]=1,Bs[5]=1,Bs[10]=1,Bs[15]=1,Bs),qc=function(){function s(){var C=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n){var r,i,o,a,s,l,c,u,h,f,d,p,y,g,m,v,b,x,w,k,E,M,S,O,_,P=C.pointInPathPickerFactory[t.nodeName];if(P){r=Vc,i=(n=n)[0],o=n[1],a=n[2],s=n[3],l=n[4],c=n[5],u=n[6],h=n[7],f=n[8],d=n[9],p=n[10],N=n[11],y=n[12],g=n[13],m=n[14],n=n[15];var T=(_=(v=i*c-o*l)*(T=p*n-N*m)-(b=i*u-a*l)*(O=d*n-N*g)+(A=i*h-s*l)*(S=d*m-p*g)+(x=o*u-a*c)*(M=f*n-N*y)-(L=o*h-s*c)*(E=f*m-p*y)+(w=a*h-s*u)*(k=f*g-d*y))?(r[0]=(c*T-u*O+h*S)*(_=1/_),r[1]=(a*O-o*T-s*S)*_,r[2]=(g*w-m*L+n*x)*_,r[3]=(p*L-d*w-N*x)*_,r[4]=(u*M-l*T-h*E)*_,r[5]=(i*T-a*M+s*E)*_,r[6]=(m*A-y*w-n*b)*_,r[7]=(f*w-p*A+N*b)*_,r[8]=(l*O-c*M+h*k)*_,r[9]=(o*M-i*O-s*k)*_,r[10]=(y*L-g*A+n*v)*_,r[11]=(d*A-f*L-N*v)*_,r[12]=(c*E-l*S-u*k)*_,r[13]=(i*S-o*E+a*k)*_,r[14]=(g*b-y*x-m*v)*_,r[15]=(f*x-d*b+p*v)*_,r):null,A=(w=Wc,h=Gc(Yc,e[0],e[1],0),M=T,O=h[0],s=h[1],h=h[2],n=M[3]*O+M[7]*s+M[11]*h+M[15],w[0]=(M[0]*O+M[4]*s+M[8]*h+M[12])/(n=n||1),w[1]=(M[1]*O+M[5]*s+M[9]*h+M[13])/n,w[2]=(M[2]*O+M[6]*s+M[10]*h+M[14])/n,w),L=t.getGeometryBounds().halfExtents,N=t.parsedStyle.anchor;if(A[0]+=(N&&N[0]||0)*L[0]*2,A[1]+=(N&&N[1]||0)*L[1]*2,P(t,new Jn(A[0],A[1]),C.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=b.offscreenCanvas.getOrCreateContext(C.canvasConfig.offscreenCanvas),r=C.pathGeneratorFactory[t.nodeName];return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}var t=s.prototype;return t.apply=function(t){var n=this,e=t.config,r=t.renderingService,i=t.renderingContext,o=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,a=(this.canvasConfig=e,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=t,null==(e=i.root)?void 0:e.ownerDocument);r.hooks.pick.tapPromise(s.tag,function(){s=jc().mark(function t(e){return jc().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(a,e));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Ic(r,e,n,i,o,"next",t)}function o(t){Ic(r,e,n,i,o,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),r.hooks.pickSync.tap(s.tag,function(t){return n.pick(a,t)})},t.pick=function(t,e){for(var n=e.topmost,r=e.position,i=r.x,r=r.y,o=Gc(Hc,i,r,0),a=[],s=Dc(t.elementsFromBBox(o[0],o[1],o[0],o[1]));!(l=s()).done;){var l=l.value,c=l.getWorldTransform();if(this.isHit(l,o,c)){c=hr(l);if(c){c=c.parsedStyle.clipPath;if(this.isHit(c,o,c.getWorldTransform())){if(n)return e.picked=[l],e;a.push(l)}}else{if(n)return e.picked=[l],e;a.push(l)}}}return e.picked=a,e},s}();function Xc(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Uc(t,e){return Math.abs(t-e)<.001}function $c(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}qc.tag="CanvasPicker";var Zc={box:function(t,e,n,r){return $c([t,n],[e,r])},length:Xc,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Xc(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?Xc(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a,s,l,n=[n-t,r-e];return(r=n)[0]===(a=[0,0])[0]&&r[1]===a[1]?Math.sqrt((i-t)*(i-t)+(o-e)*(o-e)):(s=(n=a=r=[-n[1],n[0]])[0],l=n[1],0<(s=s*s+l*l)&&(s=1/Math.sqrt(s)),a[0]=n[0]*s,a[1]=n[1]*s,l=[i-t,o-e],Math.abs(l[0]*r[0]+l[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Kc(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function Jc(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function Qc(t,e,n,r){var i,o,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Uc(r,0)?Uc(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Uc(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(o=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=o)&&o<=1&&t.push(o),t}function tu(t,e,n,r,i,o,a,s,l){var c=Kc(t,n,i,a,l),u=Kc(e,r,o,s,l),h=Zc.pointAt(t,e,n,r,l),n=Zc.pointAt(n,r,i,o,l),r=Zc.pointAt(i,o,a,s,l),i=Zc.pointAt(h.x,h.y,n.x,n.y,l),o=Zc.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,o.x,o.y,r.x,r.y,a,s]]}function eu(t,e,n,r,i,o,a,s,l){if(0===l){for(var c=[t,n,i,a],u=[e,r,o,s],h=0,f=c.length,d=0;d<f;d++)h+=Xc(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=tu(t,e,n,r,i,o,a,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return eu.apply(void 0,e)+eu.apply(void 0,n)}var nu={extrema:Qc,box:function(t,e,n,r,i,o,a,s){for(var l=[t,a],c=[e,s],u=Qc(t,n,i,a),h=Qc(e,r,o,s),f=0;f<u.length;f++)l.push(Kc(t,n,i,a,u[f]));for(var d=0;d<h.length;d++)c.push(Kc(e,r,o,s,h[d]));return $c(l,c)},length:function(t,e,n,r,i,o,a,s){return eu(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,l,c,u){for(var h=[t,n,i,a],f=[e,r,o,s],t=l,d=Kc,n=u,p=-1,y=1/0,g=[t,c],m=20,v=1/(m=n&&200<n?n/10:m),b=v/10,x=0;x<=m;x++){var w=x*v,k=[d.apply(void 0,h.concat([w])),d.apply(void 0,f.concat([w]))],k=Xc(g[0],g[1],k[0],k[1]);k<y&&(p=w,y=k)}if(0===p)return{x:h[0],y:f[0]};if(1===p)return{x:h[(t=h.length)-1],y:f[t-1]};for(var y=1/0,E=0;E<32&&!(b<1e-4);E++){var M=p-b,S=p+b,O=[d.apply(void 0,h.concat([M])),d.apply(void 0,f.concat([M]))],O=Xc(g[0],g[1],O[0],O[1]);0<=M&&O<y?(p=M,y=O):(M=[d.apply(void 0,h.concat([S])),d.apply(void 0,f.concat([S]))],O=Xc(g[0],g[1],M[0],M[1]),S<=1&&O<y?(p=S,y=O):b*=.5)}return{x:d.apply(void 0,h.concat([p])),y:d.apply(void 0,f.concat([p]))}},pointDistance:function(t,e,n,r,i,o,a,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,o,a,s,l,c,u);return Xc(t.x,t.y,l,c)},interpolationAt:Kc,pointAt:function(t,e,n,r,i,o,a,s,l){return{x:Kc(t,n,i,a,l),y:Kc(e,r,o,s,l)}},divide:tu,tangentAngle:function(t,e,n,r,i,o,a,s,l){t=Jc(t,n,i,a,l),n=Jc(e,r,o,s,l);return(Math.atan2(n,t)+2*Math.PI)%(2*Math.PI)}};function ru(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function iu(t,e,n,r,i,o){return t<=i&&i<=t+n&&e<=o&&o<=e+r}function ou(t,e,n,r,i,o,a,s){var l=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI);return!(l<r||i<l)&&ru((r={x:t+n*Math.cos(l),y:e+n*Math.sin(l)}).x,r.y,a,s)<=o/2}function au(t,e,n,r,i,o,a){var s=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=o&&o<=l+h&&c-h<=a&&a<=u+h&&Zc.pointToLine(t,e,n,r,o,a)<=i/2}function su(t,e,n,r,i){var o=t.length;if(!(o<2)){for(var a=0;a<o-1;a++)if(au(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[o-1];if(au(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var lu=1e-6;function cu(t){return Math.abs(t)<lu?0:t<0?-1:1}function uu(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o,a,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(a=u,((s=[e,n])[0]-(o=c)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return!0;0<cu(c[1]-n)!=0<cu(u[1]-n)&&cu(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}function hu(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=uu(t[i],e,n));i++);return r}function fu(t,e){var t=t.parsedStyle,n=t.r,r=t.fill,i=t.stroke,o=t.lineWidth,a=t.increasedLineWidthForHitTesting,s=t.clipPathTargets,t=t.pointerEvents,o=((o||0)+(a||0))/2,a=ru(n,n,e.x,e.y),e=!(null==s||!s.length),s=aa(t,r,i),t=s[0],r=s[1];return t&&r||e?a<=n+o:t?a<=n:!!r&&n-o<=a&&a<=n+o}function du(t,e,n,r){return t/(n*n)+e/(r*r)}function pu(t,e){var n=e.x,e=e.y,t=t.parsedStyle,r=t.rx,i=t.ry,o=t.fill,a=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,c=t.clipPathTargets,t=t.pointerEvents,c=!(null==c||!c.length),t=aa(t,o,a),o=t[0],a=t[1],t=((s||0)+(l||0))/2,s=(n-r)*(n-r),l=(e-i)*(e-i);return o&&a||c?du(s,l,r+t,i+t)<=1:o?du(s,l,r,i)<=1:!!a&&1<=du(s,l,r-t,i-t)&&du(s,l,r+t,i+t)<=1}function yu(t,e){var t=t.parsedStyle,n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.lineWidth,s=t.increasedLineWidthForHitTesting,l=t.defX,c=t.defY,u=t.clipPathTargets,h=t.pointerEvents,f=t.fill,t=t.stroke,u=!(null==u||!u.length);return!(!aa(h,f,t)[1]&&!u||!a)&&au(n,r,i,o,(a||0)+(s||0),e.x+(void 0===l?0:l),e.y+(void 0===c?0:c))}function gu(t,e,n){var r=t.parsedStyle,i=r.lineWidth,o=r.increasedLineWidthForHitTesting,a=r.stroke,s=r.fill,l=r.defX,l=void 0===l?0:l,c=r.defY,c=void 0===c?0:c,u=r.clipPathTargets,h=r.path,r=aa(r.pointerEvents,s,a),s=r[0],a=r[1],r=h.segments,f=h.hasArc,d=h.polylines,h=h.polygons,p=ra(t),u=!(null==u||!u.length),y=!1;return s||u?f?n(t,e):hu(h,e.x+l,e.y+c)||hu(d,e.x+l,e.y+c):a||u?function(t,e,n,r,i){for(var o=!1,a=0;a<t.length;a++){var s=t[a],l=s.currentPoint,c=s.params,u=s.prePoint;switch(s.command){case"L":case"Z":o=au(u[0],u[1],l[0],l[1],e,n,r);break;case"C":o=nu.pointDistance(u[0],u[1],c[1],c[2],c[3],c[4],c[5],c[6],n,r,i)<=e/2}if(o)break}return o}(r,(i||0)+(o||0),e.x+l,e.y+c,p):y}function mu(t,e){var t=t.parsedStyle,n=t.stroke,r=t.fill,i=t.lineWidth,o=t.increasedLineWidthForHitTesting,a=t.points,s=t.defX,s=void 0===s?0:s,l=t.defY,l=void 0===l?0:l,c=t.clipPathTargets,t=t.pointerEvents,c=!(null==c||!c.length),t=aa(t,r,n),r=t[0],n=!1;return n=(n=t[1]||c?su(a.points,(i||0)+(o||0),e.x+s,e.y+l,!0):n)||!r&&!c?n:uu(a.points,e.x+s,e.y+l)}function vu(t,e){var t=t.parsedStyle,n=t.lineWidth,r=t.increasedLineWidthForHitTesting,i=t.points,o=t.defX,a=t.defY,s=t.clipPathTargets,l=t.pointerEvents,c=t.fill,t=t.stroke,s=!(null==s||!s.length);return!(!aa(l,c,t)[1]&&!s||!n)&&su(i.points,(n||0)+(r||0),e.x+(void 0===o?0:o),e.y+(void 0===a?0:a),!1)}function bu(t,e,n){var r,i,o,a,s,l,c,u,h,f=t.parsedStyle,d=f.radius,p=f.fill,y=f.stroke,g=f.lineWidth,m=f.increasedLineWidthForHitTesting,v=f.width,b=f.height,x=f.clipPathTargets,f=f.pointerEvents,x=!(null==x||!x.length),f=aa(f,p,y),p=f[0],y=f[1],f=(g||0)+(m||0);return d&&d.some(function(t){return 0!==t})?(g=!1,(y||x)&&(c=m=0,a=v,l=b,d=d.map(function(t){return Ze(t,0,Math.min(Math.abs(v)/2,Math.abs(b)/2))}),h=f,r=e.x,i=e.y,u=d[0],o=d[1],s=d[2],d=d[3],g=au(m+u,c,m+a-o,c,h,r,i)||au(m+a,c+o,m+a,c+l-s,h,r,i)||au(m+a-s,c+l,m+d,c+l,h,r,i)||au(m,c+l-d,m,c+u,h,r,i)||ou(m+a-o,c+o,o,1.5*Math.PI,2*Math.PI,h,r,i)||ou(m+a-s,c+l-s,s,0,.5*Math.PI,h,r,i)||ou(m+d,c+l-d,d,.5*Math.PI,Math.PI,h,r,i)||ou(m+u,c+u,u,Math.PI,1.5*Math.PI,h,r,i)),g||!p&&!x?g:n(t,e)):(o=f/2,p&&y||x?iu(0-o,0-o,v+o,b+o,e.x,e.y):p?iu(0,0,v,b,e.x,e.y):!!y&&(s=a=0,l=v,d=b,m=f,c=e.x,u=e.y,iu(a-(h=m/2),s-h,l,m,c,u)||iu(a+l-h,s-h,m,d,c,u)||iu(a+h,s+d-h,l,m,c,u)||iu(a-h,s+h,m,d,c,u)))}var xu=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),Rc(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[M.CIRCLE]=fu,e[M.ELLIPSE]=pu,e[M.RECT]=bu,e[M.LINE]=yu,e[M.POLYLINE]=vu,e[M.POLYGON]=mu,e[M.PATH]=gu,e[M.TEXT]=t,e[M.GROUP]=null,e[M.IMAGE]=t,e[M.HTML]=null,e[M.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new qc)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Ds);function wu(){wu=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function ku(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Eu(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){ku(r,e,n,i,o,"next",t)}function o(t){ku(r,e,n,i,o,"throw",t)}i(void 0)})}}function Mu(){return(Mu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Su(t,e){return(Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Ou="undefined"!=typeof Float32Array?Float32Array:Array;function _u(){var t=new Ou(16);return Ou!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Pu(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]}function Tu(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],y=e[12],g=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];t[0]=v*r+b*s+x*h+w*y,t[1]=v*i+b*l+x*f+w*g,t[2]=v*o+b*c+x*d+w*m,t[3]=v*a+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*h+w*y,t[5]=v*i+b*l+x*f+w*g,t[6]=v*o+b*c+x*d+w*m,t[7]=v*a+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*h+w*y,t[9]=v*i+b*l+x*f+w*g,t[10]=v*o+b*c+x*d+w*m,t[11]=v*a+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*h+w*y,t[13]=v*i+b*l+x*f+w*g,t[14]=v*o+b*c+x*d+w*m,t[15]=v*a+b*u+x*p+w*e}function Au(t,e,n){var r,i,o,a,s,l,c,u,h,f,d,p,y=n[0],g=n[1],n=n[2];e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+f*n+e[13],t[14]=o*y+c*g+d*n+e[14],t[15]=a*y+u*g+p*n+e[15])}function Lu(){var t=new Ou(3);return Ou!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Nu(t,e,n){var r=new Ou(3);return r[0]=t,r[1]=e,r[2]=n,r}function Cu(t,e,n){var r=e[0],i=e[1],e=e[2],o=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/o,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),Lu();var ju=function(){function r(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=_u(),this.dprMatrix=_u(),this.tmpMat4=_u(),this.vec3a=Lu(),this.vec3b=Lu(),this.vec3c=Lu(),this.vec3d=Lu(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t){function o(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function a(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function c(t){t.isVisible()&&!t.isCulled()&&(u.renderDisplayObject(t,y,d),u.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){c(t)})}var u=this,h=(this.context=t).config,f=t.camera,d=t.renderingService,p=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,y=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),g=p.root.ownerDocument.defaultView;d.hooks.init.tapPromise(r.tag,Eu(wu().mark(function t(){var e,n,r,i;return wu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:p.root.addEventListener(v.UNMOUNTED,o),p.root.addEventListener(v.CULLED,a),e=y.getDPR(),n=h.width,r=h.height,i=y.getContext(),u.clearRect(i,0,0,n*e,r*e,h.background);case 6:case"end":return t.stop()}},t)}))),d.hooks.destroy.tap(r.tag,function(){p.root.removeEventListener(v.UNMOUNTED,o),p.root.removeEventListener(v.CULLED,a)}),d.hooks.beginFrame.tap(r.tag,function(){var t=y.getContext(),e=y.getDPR(),n=h.width,r=h.height,i=u.canvasRendererPluginOptions,o=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,a=d.getStats(),s=a.total,a=a.rendered,s=a/s;u.clearFullScreen=d.disableDirtyRectangleRendering()||o<a&&i<s,t&&(t.resetTransform(),u.clearFullScreen)&&u.clearRect(t,0,0,n*e,r*e,h.background)});d.hooks.endFrame.tap(r.tag,function(){var t=y.getContext(),e=y.getDPR();if(n=u.dprMatrix,e=Nu(e,e,1),n[0]=e[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,Tu(u.vpMatrix,u.dprMatrix,f.getOrthoMatrix()),u.clearFullScreen)c(p.root);else{e=u.safeMergeAABB.apply(u,[u.mergeDirtyAABBs(u.renderQueue)].concat(u.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new $n;return i.setMinMax(Nu(e,n,0),Nu(r,t,0)),i})));if(u.removedRBushNodeAABBs=[],$n.isEmpty(e))return void(u.renderQueue=[]);var n=u.convertAABB2Rect(e),r=n.x,i=n.y,o=n.width,n=n.height,a=Cu(u.vec3a,Nu(r,i,0),u.vpMatrix),s=Cu(u.vec3b,Nu(r+o,i,0),u.vpMatrix),l=Cu(u.vec3c,Nu(r,i+n,0),u.vpMatrix),r=Cu(u.vec3d,Nu(r+o,i+n,0),u.vpMatrix),o=Math.min(a[0],s[0],r[0],l[0]),i=Math.min(a[1],s[1],r[1],l[1]),n=Math.max(a[0],s[0],r[0],l[0]),a=Math.max(a[1],s[1],r[1],l[1]),s=Math.floor(o),r=Math.floor(i),l=Math.ceil(n-o),n=Math.ceil(a-i);t.save(),u.clearRect(t,s,r,l,n,h.background),t.beginPath(),t.rect(s,r,l,n),t.clip(),t.setTransform(u.vpMatrix[0],u.vpMatrix[1],u.vpMatrix[4],u.vpMatrix[5],u.vpMatrix[12],u.vpMatrix[13]),h.renderer.getConfig().enableDirtyRectangleRenderingDebug&&g.dispatchEvent(new Ya(Ns.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),u.searchDirtyObjects(e).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&u.renderDisplayObject(t,y,d)}),t.restore(),u.renderQueue.forEach(function(t){u.saveDirtyAABB(t)}),u.renderQueue=[]}u.restoreStack.forEach(function(){t.restore()}),u.restoreStack=[]}),d.hooks.render.tap(r.tag,function(t){u.clearFullScreen||u.renderQueue.push(t)})},t.clearRect=function(t,e,n,r,i,o){t.clearRect(e,n,r,i),o&&(t.fillStyle=o,t.fillRect(e,n,r,i))},t.renderDisplayObject=function(t,e,n){var r,e=e.getContext(),i=t.nodeName,o=this.restoreStack[this.restoreStack.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),this.restoreStack.pop()),this.context.styleRendererFactory[i]),i=this.pathGeneratorFactory[i],a=t.parsedStyle.clipPath;a&&(this.applyWorldTransform(e,a),r=this.pathGeneratorFactory[a.nodeName])&&(e.save(),this.restoreStack.push(t),e.beginPath(),r(e,a.parsedStyle),e.closePath(),e.clip()),o&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),i&&(e.beginPath(),i(e,t.parsedStyle),t.nodeName!==M.LINE)&&t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&e.closePath(),o&&(o.render(e,t.parsedStyle,t,n),e.restore()),t.renderable.dirty=!1},t.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},t.mergeDirtyAABBs=function(t){var n=new $n;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},t.searchDirtyObjects=function(t){var e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return this.rBush.search({minX:n,minY:e,maxX:r,maxY:t}).map(function(t){t=t.id;return b.displayObjectPool.getByEntity(t)})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new $n),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},t.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,o=n.opacity,a=n.lineDash,n=n.lineDashOffset;a&&t.setLineDash(a),_(n)||(t.lineDashOffset=n),_(o)||(t.globalAlpha*=o),_(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),_(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},t.applyWorldTransform=function(t,e,n){var r=0,i=0,o=(e.parsedStyle||{}).anchor,a=o&&o[0]||0,o=o&&o[1]||0;0===a&&0===o||(r=-a*((a=e.getGeometryBounds())&&2*a.halfExtents[0]||0),i=-o*(a&&2*a.halfExtents[1]||0)),n?(Pu(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,Au(this.tmpMat4,this.tmpMat4,this.vec3a),Tu(this.tmpMat4,n,this.tmpMat4)):(Pu(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,Au(this.tmpMat4,this.tmpMat4,this.vec3a)),Tu(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.safeMergeAABB=function(){for(var e=new $n,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},r}(),Iu=(ju.tag="CanvasRenderer",function(){function t(t){this.imagePool=void 0,this.imagePool=t}var e=t.prototype;return e.render=function(t,e,n,r){var i=e.fill,o=e.fillRule,a=e.opacity,s=e.fillOpacity,l=e.stroke,c=e.strokeOpacity,u=e.lineWidth,h=e.lineCap,f=e.lineJoin,d=e.shadowType,p=e.shadowColor,y=e.shadowBlur,g=e.filter,e=e.miterLimit,m=!_(i)&&!i.isNone,v=!_(l)&&!l.isNone&&0<u,b=0===i.alpha,g=!(!g||!g.length),p=!_(p)&&0<y,y=n.nodeName,d="inner"===d,y=v&&p&&(y===M.PATH||y===M.LINE||y===M.POLYLINE||b||d);m&&(t.globalAlpha=a*s,y||Ru(n,t,p),this.fill(t,n,i,o,r),y||this.clearShadowAndFilter(t,g,p)),v&&(t.globalAlpha=a*c,t.lineWidth=u,_(e)||(t.miterLimit=e),_(h)||(t.lineCap=h),_(f)||(t.lineJoin=f),y&&(d&&(t.globalCompositeOperation="source-atop"),Ru(n,t,!0),d)&&(this.stroke(t,n,l,r),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,g,!0)),this.stroke(t,n,l,r))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&(n=t.filter,!_(n))&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r,i){var o=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=o.getColor(t,n,e),e.fill(r)}):(vi(t)&&(e.fillStyle=this.getPattern(t,n,e,i)),e.fill(r))},e.stroke=function(e,n,t,r){var i=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=i.getColor(t,n,e),e.stroke()}):(vi(t)&&(e.strokeStyle=this.getPattern(t,n,e,r)),e.stroke())},e.getPattern=function(t,e,n,r){return this.imagePool.getOrCreatePatternSync(t,n,function(){e.renderable.dirty=!0,r.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==Nr.LinearGradient&&t.type!==Nr.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(Mu({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function Ru(t,e,n){var r=t.parsedStyle,i=r.filter,o=r.shadowColor,a=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=o.toString(),e.shadowBlur=a||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}var Fu=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,o=e.img,a=e.shadowColor,e=e.shadowBlur,o=$e(o)?this.imagePool.getImageSync(o):(r=r||o.width,i=i||o.height,o);if(o){Ru(n,t,!_(a)&&0<e);try{t.drawImage(o,0,0,r,i)}catch(t){}}},t}(),Du=function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,o=e.textBaseline,a=e.lineJoin,s=e.miterLimit,l=e.letterSpacing,c=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,y=e.dx,g=e.dy,m=e.shadowColor,e=e.shadowBlur,v=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,E=(t.font=v,t.lineWidth=r,t.textAlign=i,t.textBaseline=o,t.lineJoin=a,_(s)||(t.miterLimit=s),0),M=("middle"===o?E=-x/2-w/2:"bottom"===o||"alphabetic"===o||"ideographic"===o?E=-x:"top"!==o&&"hanging"!==o||(E=-w),y||0);E+=g||0,Ru(n,t,!_(m)&&0<e);for(var S=0;S<b.length;S++){var O=r/2+M;E+=w,_(c)||c.isNone||!r||this.drawLetterSpacing(t,b[S],k[S],i,O,E,l,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[S],k[S],i,O,E,l,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,o,a,s,l,c,u){if(void 0===u&&(u=!1),0===a)u?this.strokeText(t,e,i,o,l):this.fillText(t,e,i,o,s,c);else{for(var h=t.textAlign,f=(t.textAlign="left",i),d=("center"===r?f=i-n.width/2:"right"!==r&&"end"!==r||(f=i-n.width),Array.from(e)),p=t.measureText(e).width,y=0;y<d.length;++y){var g=d[y];u?this.strokeText(t,g,f,o,l):this.fillText(t,g,f,o,s,c),f+=p-(g=t.measureText(e.substring(y+1)).width)+a,p=g}t.textAlign=h}},e.fillText=function(t,e,n,r,i,o){var a,s=!_(i)&&1!==i;s&&(a=t.globalAlpha,t.globalAlpha=i*o),t.fillText(e,n,r),s&&(t.globalAlpha=a)},e.strokeText=function(t,e,n,r,i){var o,a=!_(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),a&&(t.globalAlpha=o)},t}(),Bu=function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Su(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=Mu({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new Iu(n),n=((t={})[M.CIRCLE]=r,t[M.ELLIPSE]=r,t[M.RECT]=r,t[M.IMAGE]=new Fu(n),t[M.TEXT]=new Du,t[M.LINE]=r,t[M.POLYLINE]=r,t[M.POLYGON]=r,t[M.PATH]=r,t[M.GROUP]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new ju(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Ds);function zu(){zu=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function Gu(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Hu(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Gu(r,e,n,i,o,"next",t)}function o(t){Gu(r,e,n,i,o,"throw",t)}i(void 0)})}}function Wu(t,e){return(Wu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Yu=function(){function r(){this.context=void 0}return r.prototype.apply=function(t){function i(t){e.hooks.pointerWheel.call(t)}var o=this,e=t.renderingService,n=t.renderingContext,a=(this.context=t,n.root.ownerDocument.defaultView),s=function(t){e.hooks.pointerMove.call(t)},l=function(t){e.hooks.pointerUp.call(t)},c=function(t){e.hooks.pointerDown.call(t)},u=function(t){e.hooks.pointerOver.call(t)},h=function(t){e.hooks.pointerOut.call(t)},f=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,Hu(zu().mark(function t(){var r;return zu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=o.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):a.supportsPointerEvents&&(r.style.touchAction="none"),a.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",c,!0),n.addEventListener("pointerleave",h,!0),n.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",l,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",c,!0),n.addEventListener("mouseout",h,!0),n.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=r).addEventListener("touchstart",c,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",f,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=o.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):a.supportsPointerEvents&&(n.style.touchAction=""),a.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",c,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",l,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",c,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=n).removeEventListener("touchstart",c,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",f,!0)),n.removeEventListener("wheel",i,!0)})},r}(),Vu=(Yu.tag="DOMInteraction",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),Wu(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Yu)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Ds));function qu(){qu=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function Xu(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Uu(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Xu(r,e,n,i,o,"next",t)}function o(t){Xu(r,e,n,i,o,"throw",t)}i(void 0)})}}function $u(t,e){return($u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Zu=function(){function f(){this.context=void 0,this.$camera=void 0}var t=f.prototype;return t.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},t.apply=function(t){function i(t,e){e.style.transform=s.joinTransformMatrix(t.getWorldTransform())}function e(t){var e,n,r=t.target;r.nodeName===M.HTML&&(e=s.getOrCreateEl(r),s.$camera.appendChild(e),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){s.updateAttribute(t,r)}),i(r,e))}function n(t){(t=t.target).nodeName===M.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&t.remove()}function r(t){var e=t.target;e.nodeName===M.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function o(t){var e;(t=t.target).nodeName===M.HTML&&(e=s.getOrCreateEl(t),i(t,e))}function a(){var t=(e=s.context.config).width,e=e.height;s.$camera.style.width=(t||0)+"px",s.$camera.style.height=(e||0)+"px"}var s=this,l=t.camera,c=t.renderingContext,u=t.renderingService,h=(this.context=t,c.root.ownerDocument.defaultView);u.hooks.init.tapPromise(f.tag,Uu(qu().mark(function t(){return qu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:s.$camera=s.createCamera(l),h.addEventListener(Ns.RESIZE,a),c.root.addEventListener(v.MOUNTED,e),c.root.addEventListener(v.UNMOUNTED,n),c.root.addEventListener(v.ATTR_MODIFIED,r),c.root.addEventListener(v.BOUNDS_CHANGED,o);case 6:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(f.tag,function(){s.$camera&&c.renderReasons.has(Ls.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(l.getOrthoMatrix()))}),u.hooks.destroy.tap(f.tag,function(){s.$camera&&s.$camera.remove(),h.removeEventListener(Ns.RESIZE,a),c.root.removeEventListener(v.MOUNTED,e),c.root.removeEventListener(v.UNMOUNTED,n),c.root.removeEventListener(v.ATTR_MODIFIED,r),c.root.removeEventListener(v.BOUNDS_CHANGED,o)})},t.getId=function(t){return t.id||"g-html-"+t.entity},t.createCamera=function(t){var e,n,r=this.context.config,i=r.document,o=r.width,r=r.height,a=this.context.contextService.getDomElement(),s=a.parentNode;return s?((n=s.querySelector("#"+(e="g_canvas_camera")))||((n=i=(i||document).createElement("div")).id=e,i.style.position="absolute",i.style.left=(a.offsetLeft||0)+"px",i.style.top=(a.offsetTop||0)+"px",i.style.transformOrigin="left top",i.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.width=(o||0)+"px",i.style.height=(r||0)+"px",s.appendChild(i)),n):null},t.getOrCreateEl=function(t){var e=this.context.config.document,n=this.getId(t),r=this.$camera.querySelector("#"+n);return r||(r=(e||document).createElement("div"),(t.parsedStyle.$el=r).id=n,t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r},t.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;$e(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r;break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof ni?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):vi(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof ni?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):vi(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}},f}(),Ku=(Zu.tag="HTMLRendering",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),$u(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Zu)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Ds));function Ju(){Ju=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function Qu(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function th(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Qu(r,e,n,i,o,"next",t)}function o(t){Qu(r,e,n,i,o,"throw",t)}i(void 0)})}}function eh(t,e){return(eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var nh=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i,o=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):cr&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,o.imageCache[r]=n)}))},e.getOrCreatePatternSync=function(t,e,n){var r,i=this.generatePatternKey(t);return i&&this.patternCache[i]?this.patternCache[i]:(r=t.image,t=t.repetition,r=(n=$e(r)?this.getImageSync(r,n):r)&&e.createPattern(n,t),i&&r&&(this.patternCache[i]=r),r)},e.getOrCreateGradient=function(t,e){var r,n,i,o,a,s=this.generateGradientKey(t),l=t.type,c=t.steps,u=t.width,h=t.height,f=t.angle,d=t.cx,p=t.cy,t=t.size;return this.gradientCache[s]||(r=null,l===Nr.LinearGradient?(n=u,i=h,f=Mo((f=f).value),o=0+n/2,a=0+i/2,n=Math.abs(n*Math.cos(f))+Math.abs(i*Math.sin(f)),i={x1:o-Math.cos(f)*n/2,y1:a-Math.sin(f)*n/2,x2:o+Math.cos(f)*n/2,y2:a+Math.sin(f)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):l===Nr.RadialGradient&&(o=u,a=h,f=p,n=t,l=(i=d).value,u=f.value,i.unit===y.kPercentage&&(l=i.value/100*o),f.unit===y.kPercentage&&(u=f.value/100*a),i=Math.max(Ce([0,0],[l,u]),Ce([0,a],[l,u]),Ce([o,a],[l,u]),Ce([o,0],[l,u])),n&&(n instanceof Vr?i=n.value:n instanceof Rr&&("closest-side"===n.value?i=Math.min(l,o-l,u,a-u):"farthest-side"===n.value?i=Math.max(l,o-l,u,a-u):"closest-corner"===n.value&&(i=Math.min(Ce([0,0],[l,u]),Ce([0,a],[l,u]),Ce([o,a],[l,u]),Ce([o,0],[l,u]))))),r=e.createRadialGradient(p=(h={x:l,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(c.forEach(function(t){var e,n=t.offset,t=t.color;n.unit===y.kPercentage&&null!=(e=r)&&e.addColorStop(n.value/100,t.toString())}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,o=t.angle,a=t.cx,s=t.cy,t=t.size;return"gradient-"+e+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==s?void 0:s.toString())||0)+"-"+((null==t?void 0:t.toString())||0)+"-"+n+"-"+r+"-"+i.map(function(t){return""+t.offset+t.color}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;if($e(e))return"pattern-"+e+"-"+t},t}(),rh=function(){function a(){}return a.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===M.IMAGE&&(t=n.img,$e(t))&&o.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===M.IMAGE&&"img"===n&&$e(t)&&o.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var r=t.renderingService,i=t.renderingContext,o=t.imagePool;r.hooks.init.tapPromise(a.tag,th(Ju().mark(function t(){return Ju().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i.root.addEventListener(v.MOUNTED,e),i.root.addEventListener(v.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(a.tag,function(){i.root.removeEventListener(v.MOUNTED,e),i.root.removeEventListener(v.ATTR_MODIFIED,n)})},a}(),ih=(rh.tag="LoadImage",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),eh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new nh(this.context.config),this.addRenderingPlugin(new rh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Ds));function oh(){oh=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function ah(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function sh(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){ah(r,e,n,i,o,"next",t)}function o(t){ah(r,e,n,i,o,"throw",t)}i(void 0)})}}function lh(t,e){t.prototype=Object.create(e.prototype),ch(t.prototype.constructor=t,e)}function ch(t,e){return(ch=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var uh=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var e=t.prototype;return e.init=function(){var t=sh(oh().mark(function t(){var e,n;return oh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=this.canvasConfig,e=n.container,(n=n.canvas)?(this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):e&&(this.$container=$e(e)?document.getElementById(e):e,this.$container)&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n=1<=(n=this.canvasConfig.devicePixelRatio||cr&&window.devicePixelRatio||1)?Math.ceil(n):1;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,cr)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(Ls.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=sh(oh().mark(function t(e){var n,r;return oh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),hh=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-context-register",t}lh(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=uh},e.destroy=function(){delete this.context.ContextService},t}(Ds),fh=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new hh),t.registerPlugin(new ih),t.registerPlugin(new Cc),t.registerPlugin(new Bu),t.registerPlugin(new Vu),t.registerPlugin(new xu),t.registerPlugin(new Ku),t}return lh(t,e),t}(Fs);function dh(){dh=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return u;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}r=c(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,u;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,u):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,u)}(n,a);if(n){if(n===u)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=c(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===u)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),e}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var u={};function h(){}function f(){}function d(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),d.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=c(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function w(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",f.prototype=d),o(d,"constructor",f),f.displayName=o(d,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=w,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function ph(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function yh(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){ph(r,e,n,i,o,"next",t)}function o(t){ph(r,e,n,i,o,"throw",t)}i(void 0)})}}function gh(){return(gh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function mh(t,e){return(mh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var vh=function(){function o(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return o.prototype.apply=function(t){function e(t){var e,o,a,s,l,c,n,u=t.target,h=u===d,f=h&&i?d:u.closest&&u.closest("[draggable=true]");f&&(e=function(){var e=yh(dh().mark(function t(e){var n,r,i;return dh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o)t.next=8;else{if(n=e.timeStamp-a,r=Ce([e.clientX,e.clientY],s),n<=m||r<=g)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",f.dispatchEvent(e),o=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],f.dispatchEvent(e),c=[e.clientX,e.clientY],h){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),o=!1,a=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",n=function(){o&&(l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",t.detail={preventClick:!0},f.dispatchEvent(t),o=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",n,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,y=t.isDocumentDroppable,g=t.dragstartDistanceThreshold,m=t.dragstartTimeThreshold;n.hooks.init.tapPromise(o.tag,yh(dh().mark(function t(){return dh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(o.tag,function(){r.removeEventListener("pointerdown",e)})},o}(),bh=(vh.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),mh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new vh(gh({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(Ds)),xh=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},wh={}.toString,kh=function(t,e){return wh.call(t)==="[object "+e+"]"},Eh=function(t){return kh(t,"Function")},Mh=function(t){return null==t},Sh=function(t){return Array.isArray?Array.isArray(t):kh(t,"Array")},Oh=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function _h(t,e){if(t)if(Sh(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Oh(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function Ph(t){return"object"==typeof t&&null!==t}function Th(t){if(Sh(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])}function Ah(t){if(Sh(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])}var Lh=function(t){if(!Ph(t)||!kh(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Nh=function(t){return kh(t,"String")};function Ch(t,e,n){return t<e?e:n<t?n:t}var jh=function(t){return kh(t,"Number")},Ih=1e-5;function Rh(t,e,n){return void 0===n&&(n=Ih),Math.abs(t-e)<n}function Fh(t){return(t=Gh(t)).charAt(0).toLowerCase()+t.substring(1)}var Dh=function(t,e){if(Sh(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=Eh(e)?e(o):o[e];r<a&&(n=o,r=a)}return n}},Bh=function(t,e){if(Sh(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=Eh(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},zh=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return _h(n,function(t,e){Eh(n)&&"prototype"===e||r.push(t)}),r},Gh=function(t){return Mh(t)?"":t.toString()};function Hh(t){return null===t}function Wh(t){return void 0===t}function Yh(t){return t instanceof Element||t instanceof HTMLDocument}var Vh=function(t){t=Gh(t);return t.charAt(0).toUpperCase()+t.substring(1)},qh={}.toString,Xh=function(t){return qh.call(t).replace(/^\[object /,"").replace(/]$/,"")},Uh=Object.prototype,$h=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Uh)};function Zh(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function Kh(t,e,n,r){return e&&Zh(t,e),n&&Zh(t,n),r&&Zh(t,r),t}var Jh=function(t){if("object"!=typeof t||null===t)return t;if(Sh(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=Jh(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=Jh(t[i]):e[i]=t[i];return e};function Qh(o,a){var s;if(Eh(o))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=a?a.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=o.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var tf=5;var N=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||tf,n){var a;n.hasOwnProperty(o)&&(null!==(a=n[o])&&Lh(a)?(Lh(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):Sh(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a))}}(t,e[r]);return t},ef=function(t,e){if(!xh(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},nf=Object.prototype.hasOwnProperty;function rf(t,e,n){for(var r=0,i=Nh(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function of(e,t){var n;return null!==e&&Lh(e)?(n={},_h(t,function(t){hf.call(e,t)&&(n[t]=e[t])}),n):{}}function af(t,r){return n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={},Sh(t=t)||Lh(t)?(i=e,_h(t,function(t,e){i=n(i,t,e)}),i):t;var n,e,i}function sf(){}function lf(t){return t}var cf,uf=function(t,e){if(t===e)return!0;if(t&&e&&!Nh(t)&&!Nh(e)){if(xh(t)||xh(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=uf(t[r],e[r]));r++);return n}if(Ph(t)||Ph(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=uf(t[i[r]],e[i[r]]));r++);return n}}return!1},hf=Object.prototype.hasOwnProperty,ff=function(n,r,i){function o(){u=!1===i.leading?0:Date.now(),a=null,c=n.apply(s,l),a||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(a&&(clearTimeout(a),a=null),u=t,c=n.apply(s,l),a||(s=l=null)):a||!1===i.trailing||(a=setTimeout(o,e)),c}var a,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(a),u=0,a=s=l=null},t};function df(t){return Mh(t)?0:(xh(t)?t:Object.keys(t)).length}var pf=Qh(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(cf=cf||document.createElement("canvas").getContext("2d")).font=[o,e,i,n+"px",r].join(" "),cf.measureText(Nh(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}([t],zh(e=void 0===e?{}:e)).join("")});const yf=()=>[["cartesian"]],gf=(yf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),mf=(gf.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),vf=(mf.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),bf=(vf.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),xf=(bf.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),wf=(xf.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),kf=(wf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...vf(),...gf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Ef=(kf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...bf(),...gf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Mf=(Ef.props={},()=>[["parallel",0,1,0,1]]),Sf=(Mf.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),Of=(Sf.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),_f=(Of.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),Pf=(_f.props={},({value:e})=>t=>t.map(()=>e)),Tf=(Pf.props={},({value:e})=>t=>t.map(e)),Af=(Tf.props={},({value:e})=>t=>t.map(t=>t[e])),Lf=(Af.props={},({value:t})=>()=>t);function Nf(){return[{name:"color"},{name:"shape"},{name:"enterType"},{name:"enterDelay",scaleName:"enter"},{name:"enterDuration",scaleName:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function Cf(){return[...Nf(),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function jf(){return[{type:"maybeKey"}]}function If(t,e){return t.getBandWidth(t.invert(e))}function Rf(t,e,n={}){const{x:i,y:o}=e,{x:a,y:s}=t,{style:{bandOffset:r=.5,bandOffsetX:l=r,bandOffsetY:c=r}={}}=n,u=!(null===a||void 0===a||!a.getBandWidth),h=!(null===s||void 0===s||!s.getBandWidth);return u||h?(t,e)=>{var n=u?If(a,i[e]):0,e=h?If(s,o[e]):0,[t,r]=t;return[t+l*n,r+c*e]}:t=>t}function Ff(t,e){return t.getBandWidth(t.invert(e))}Lf.props={};const Df=()=>(t,e,n,i)=>{const{x:o,y:a,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[h]=i.getSize(),f=r?r.map(t=>+t/h):null,d=r?(t,e,n)=>{t+=e/2,e=f[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Ff(c,o[t]),n=e*(u?Ff(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+o[t]+e,[e,n]=d(e,n,t),r=+a[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]},Bf=(Df.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...Cf(),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["rect","hollow","funnel","pyramid"]},()=>(t,e,n,r)=>{const{x:i,x1:o,y:a,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+a[t]],[+o[t],+a[t]],[+o[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]});function zf(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Gf(n){let o,a,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==o(e,e))return r;do{var i=n+r>>>1;a(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(o=zf,a=(t,e)=>zf(n(t),e),(t,e)=>n(t)-e):(o=n===zf||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Hf,a=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==o(e,e))return r;do{var i=n+r>>>1;a(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Hf(){return 0}Bf.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["rect","hollow"]},Gf(zf);const Wf=Gf(function(t){return null===t?NaN:+t}).center;function Yf(t,e){t=function(e,n){let r=0,i,o=0,a=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-o,o+=i/++r,a+=i*(t-o));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-o,o+=i/++r,a+=i*(s-o))}if(1<r)return a/(r-1)}(t,e);return t&&Math.sqrt(t)}function Vf(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var o of e)null!=(o=n(o,++t,e))&&(void 0===r?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}return[r,i]}class qf extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Xf(this,t))}has(t){return super.has(Xf(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Xf({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Uf(t){return t}function $f(t,...e){return Kf(t,Uf,Uf,e)}function Zf(t,e,...n){return Kf(t,Uf,e,n)}function Kf(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new qf,i=f[n++];let o=-1;for(const l of e){var a=i(l,++o,e),s=r.get(a);s?s.push(l):r.set(a,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Jf(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=td(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>td(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Qf(n))}function Qf(r=zf){if(r===zf)return td;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function td(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}function ed(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function nd(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function rd(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function id(n,r,i=0,o=n.length-1,a){for(a=void 0===a?td:Qf(a);i<o;){600<o-i&&(s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),id(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(o,Math.floor(r+(s-l)*c/s+u)),a));var s,l,c,u,h=n[r];let t=i,e=o;for(od(n,i,r),0<a(n[o],h)&&od(n,i,o);t<e;){for(od(n,t,e),++t,--e;a(n[t],h)<0;)++t;for(;0<a(n[e],h);)--e}0===a(n[i],h)?od(n,i,e):od(n,++e,o),e<=r&&(i=e+1),r<=e&&(o=e-1)}return n}function od(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function ad(t,e,n){var r;if(n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)return(e=+e)<=0||n<2?rd(t):1<=e?ed(t):(n=(n-1)*e,(r=ed(id(t,e=Math.floor(n)).subarray(0,e+1)))+(rd(t.subarray(e+1))-r)*(n-e))}function sd(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var o of e)null!=(o=n(o,++t,e))&&(o=+o)>=o&&(++r,i+=o)}if(r)return i/r}function ld(t,e){return ad(t,.5,e)}function cd(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function ud(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function hd(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function fd(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function dd(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function pd(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function yd(t){return fd(t)||hd(t)}const gd=(t,e,n,r)=>{var i;const{series:o,x:a,y:s}=n;var{x:n,y:e}=e;if(void 0===a||void 0===s)throw new Error("Missing encode for x or y channel.");var t=o?Array.from($f(t,t=>o[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+a[t]+c,+s[t]+u]))),t]},md=(t,e,n,i)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===o.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=o.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},vd=()=>(t,e,n,r)=>{return(dd(r)?md:gd)(t,e,n,r)},bd=(vd.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Cf(),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"}],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"},{type:"maybeTooltipPosition"}],shapes:["line","smooth"]},d=>(t,e,n,a)=>{const{x:r,y:i,size:s,dx:o,dy:l}=n,[c,u]=a.getSize(),h=Rf(e,n,d),f=t=>{var e=+((null===o||void 0===o?void 0:o[t])||0),n=+((null===l||void 0===l?void 0:l[t])||0);return[+r[t]+e,+i[t]+n]};return[t,s?Array.from(t,t=>{var[e,n]=f(t),r=+s[t],i=r/c,r=r/u,o=[e-i,n-r],e=[e+i,n+r];return[a.map(h(o,t)),a.map(h(e,t))]}):Array.from(t,t=>[a.map(h(f(t),t))])]}),xd=(bd.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","linePoint","tick","triangleDown"]},s=>(t,e,n,r)=>{const{x:i,y:o}=n,a=Rf(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+o[t]];return[r.map(a(e,t))]})]}),wd=(xd.props={defaultShape:"text",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0},{name:"text",required:!0,scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["text","badge"]},()=>(t,e,n,i)=>{const{x:o,y:a}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+o[t])),n=l.getBandWidth(l.invert(+a[t])),r=+o[t],t=+a[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]}),kd=(wd.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["rect","hollow"]},()=>(t,e,n,o)=>{const{x:a,y:s,y1:l,series:r}=n;n=r?Array.from($f(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=o.map([+a[i],+s[i]]),r[n+t]=o.map([+a[i],+l[i]])}return r}),n]}),Ed=(kd.props={defaultShape:"area",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["area","smooth"]},c=>(t,e,n,r)=>{const{x:i,y:o,x1:a=i,y1:s=o}=n,l=Rf(e,n,c);e=t.map(t=>[r.map(l([+i[t],+o[t]],t)),r.map(l([+a[t],+s[t]],t))]);return[t,e]}),Md=(Ed.props={defaultShape:"link",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["link","arc","vhv","smooth"]},s=>(t,e,n,r)=>{const{x:i,y:o}=n,a=Rf(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+o[t]];return[r.map(a(e,t))]})]}),Sd=(Md.props={defaultShape:"image",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0},{name:"src",required:!0,scale:"identity"},{name:"size"}],preInference:[],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["image"]},()=>(t,e,n,o)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<a.length;t++){var r=a[t][e];if(void 0===r)break;var i=s[t][e];n.push(o.map([+r,+i]))}return n});return[t,n]}),Od=(Sd.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["polygon","ribbon"]},()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:h,y3:f,y4:d,series:p}=n,y=e.x,g=e.series;return[t,Array.from(t,t=>{var e=y.getBandWidth(y.invert(+l[t])),n=e*(g?g.getBandWidth(g.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,o,a]=[+c[t],+u[t],+h[t],+f[t],+d[t]];return[[e-n/2,a],[e+n/2,a],[e,a],[e,o],[e-n/2,o],[e+n/2,o],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]}),_d=(Od.props={defaultShape:"box",defaultLabelShape:"label",channels:[...Cf(),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["box"]},()=>(t,e,n,i)=>{const{x:o,y:a,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+o[t]-r/2,+a[t]-n/2]),i.map([+o[t]+r/2,+a[t]+n/2])]});return[t,n]}),Pd=(_d.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...Cf(),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...jf(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["vector"]},()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]}),Td=(Pd.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Nf(),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...jf()],shapes:["line"]},()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]}),Ad=(Td.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Nf(),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...jf()],shapes:["line"]},(...t)=>Ed(...t));function Ld(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:o}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+e]}}function Nd(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const o=Ld("x",r,n,e.x),a=Ld("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=o(t),[t,r]=a(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Ad.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...Nf(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...jf()],shapes:["connector"]};const Cd=()=>Nd(),jd=(Cd.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Nf(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...jf()],shapes:["range"]},()=>Nd({extendY:!0})),Id=(jd.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Nf(),{name:"x",required:!0}],preInference:[],postInference:[...jf()],shapes:["range"]},()=>Nd({extendX:!0})),Rd=(Id.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Nf(),{name:"y",required:!0}],preInference:[],postInference:[...jf()],shapes:["range"]},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),Fd=(Rd.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Dd=(Fd.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),Bd=(Dd.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),zd=(Bd.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),Gd=(zd.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),Hd=(Gd.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),Wd=(Hd.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),Yd=(Wd.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),Vd=(Yd.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),qd=(Vd.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Xd=(qd.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),Ud=(Xd.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),$d=(Ud.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Zd=($d.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Kd=(Zd.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Jd=(Kd.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Qd=(Jd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),tp=(Qd.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),ep=(tp.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function np(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function rp(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function ip(t,e,n,r,i){let o=n||0,a=r||t.length;for(var s=i||(t=>t);o<a;){var l=Math.floor((o+a)/2);s(t[l])>e?a=l:o=l+1}return o}ep.props={};const op=Math.sqrt(50),ap=Math.sqrt(10),sp=Math.sqrt(2);function lp(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=op?10:n>=ap?5:n>=sp?2:1)*10**t:-(10**-t)/(n>=op?10:n>=ap?5:n>=sp?2:1)}function cp(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=op?r*=10:n>=ap?r*=5:n>=sp&&(r*=2),e<t?-r:r}const up=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,o=t[r],a=t[i],s;return a<o&&([o,a]=[a,o],[r,i]=[i,r]),0<(s=lp(o,a,n))?(o=Math.floor(o/s)*s,a=Math.ceil(a/s)*s,s=lp(o,a,n)):s<0&&(o=Math.ceil(o*s)/s,a=Math.floor(a*s)/s,s=lp(o,a,n)),0<s?(t[r]=Math.floor(o/s)*s,t[i]=Math.ceil(a/s)*s):s<0&&(t[r]=Math.ceil(o*s)/s,t[i]=Math.floor(a*s)/s),t},hp=36e5,fp=864e5,dp=7*fp;fp,fp;function pp(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],o=Math.floor(n),a=r?c(t,n):c(t);+a<+e;s(a,o),l(a))i.push(new Date(+a));return i},duration:t}}co=pp(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),uo=pp(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),ho=pp(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),yo=pp(hp,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+hp*e)},t=>t.getHours()),go=pp(fp,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+fp*e)},t=>t.getDate()-1);const yp=pp(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());mo=pp(dp,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+dp*e)},t=>{var e=yp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/dp)}),o=pp(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const gp={millisecond:co,second:uo,minute:ho,hour:yo,day:go,week:mo,month:yp,year:o};vo=pp(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),bo=pp(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),xo=pp(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),wo=pp(hp,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+hp*e)},t=>t.getUTCHours()),a=pp(fp,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+fp*e)},t=>t.getUTCDate()-1);const mp=pp(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());fo=pp(dp,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+dp*e)},t=>{var e=mp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/dp)}),Rs=pp(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const vp={millisecond:vo,second:bo,minute:xo,hour:wo,day:a,week:fo,month:mp,year:Rs};function bp(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:o,millisecond:a}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:o,second:a,millisecond:s}=t?vp:gp;return{tickIntervals:[[a,1],[a,5],[a,15],[a,30],[o,1],[o,5],[o,15],[o,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=ip(i,l,0,c,s);let h;return h=u===c?[o,cp(t/o.duration,e/o.duration,n)]:u?([c,o]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):o]):[a,Math.max(cp(t,e,n),1)]}const xp=(t,e,n,r,i)=>{var o=e<t,a=o?e:t,t=o?t:e,[e,n]=bp(a,t,n,r,i),r=[e.floor(a,n),e.ceil(t,n)];return o?r.reverse():r};function wp(t){return!Wh(t)&&!Hh(t)&&!Number.isNaN(t)}const kp=e=>t=>-e(-t),Ep=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?kp(t):t},Mp=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?kp(n):n},Sp=(t,e,n,r)=>{var i=t<0,o=Ep(r,i),r=Mp(r,i),i=e<t,a=i?t:e,e=[r(Math.floor(o(i?e:t))),r(Math.ceil(o(a)))];return i?e.reverse():e};function Op(e,a){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:o}=this.getOptions(),r=a(r.map(t)),o=o?(n=i,t=>{t=n(t);return jh(t)?Math.round(t):t}):i;this.output=np(o,r,e,t)},t.prototype.invert=void 0}}var _p,Hs={exports:{}},hs={exports:{}},Pp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Tp=Array.prototype.concat,Ap=Array.prototype.slice,Lp=hs.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Pp(i)?e=Tp.call(e,Ap.call(i)):e.push(i)}return e},Np=(Lp.wrap=function(t){return function(){return t(Lp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Cp=hs.exports,jp=Object.hasOwnProperty,Ip=Object.create(null);for(_p in Np)jp.call(Np,_p)&&(Ip[Np[_p]]=_p);var Rp=Hs.exports={to:{},get:{}};function Fp(t,e,n){return Math.min(Math.max(e,t),n)}function Dp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}Rp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=Rp.get.hsl(t),n="hsl";break;case"hwb":e=Rp.get.hwb(t),n="hwb";break;default:e=Rp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},Rp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var o=2*n;i[n]=parseInt(e.slice(o,2+o),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:jp.call(Np,e[1])?((i=Np[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=Fp(i[n],0,255);return i[3]=Fp(i[3],0,1),i},Rp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Fp(parseFloat(t[2]),0,100),Fp(parseFloat(t[3]),0,100),Fp(isNaN(e)?1:e,0,1)]):null},Rp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Fp(parseFloat(t[2]),0,100),Fp(parseFloat(t[3]),0,100),Fp(isNaN(e)?1:e,0,1)]):null},Rp.to.hex=function(){var t=Cp(arguments);return"#"+Dp(t[0])+Dp(t[1])+Dp(t[2])+(t[3]<1?Dp(Math.round(255*t[3])):"")},Rp.to.rgb=function(){var t=Cp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},Rp.to.rgb.percent=function(){var t=Cp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},Rp.to.hsl=function(){var t=Cp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},Rp.to.hwb=function(){var t=Cp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},Rp.to.keyword=function(t){return Ip[t.slice(0,3)]};var Bp=Hs.exports;function zp(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Gp(t){var e,n,r,t=Bp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*zp(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*zp(n,r,e),255*zp(n,r,e-1/3),t]):null):null}const Hp=(e,n)=>t=>e*(1-t)+n*t,Wp=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Hp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Gp(n),c=Gp(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,o,a,s]=n;return`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(a)}, ${s})`}}},Yp=(t,e)=>{const n=Hp(t,e);return t=>Math.round(n(t))};function Vp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function qp(t){return"object"==typeof t?t.valueOf():t}class Xp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=qp,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Vp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Vp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class Up{constructor(t){this.options=N({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=N({},this.options,t),this.rescale(t)}rescale(t){}}const $p=Symbol("defaultUnknown");function Zp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Kp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let o=r.get(t);if(void 0===o){if(i!==$p)return i;o=e.push(t)-1,r.set(t,o)}return n[o%n.length]}function Jp(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Qp extends Up{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:$p}}map(t){return 0===this.domainIndexMap.size&&Zp(this.domainIndexMap,this.getDomain(),this.domainKey),Kp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Zp(this.rangeIndexMap,this.getRange(),this.rangeKey),Kp({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Jp(e),this.rangeKey=Jp(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Qp(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function t0(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=o).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/l*r+1-1/l*i);const f=h*i/l;h-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=h/d.reduce((t,e)=>t+e);var c=new Xp(e.map((t,e)=>{e=d[e]*p;return[t,a?Math.floor(e):e]})),y=new Xp(e.map((t,e)=>{e=d[e]*p+f;return[t,a?Math.floor(e):e]})),h=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(u-(h-h/l*i))*s;let g=a?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=g,Math.round(1e12*v)/1e12);var v=e[t];g+=y.get(v)}return{valueBandWidth:c,valueStep:y,adjustedRange:m}}class e0 extends Qp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:$p,flex:[]}}clone(){return new e0(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return t0(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:o}=t;let a,s,l=n[0];return n=n[1]-l,a=n/Math.max(1,2*t+(e-r)),i&&(a=Math.floor(a)),l+=(n-a*(e-r))*o,s=a*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*a),{valueStep:a,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const n0=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0<n)return[o];let s=lp(o,a,n);if(0===s||!Number.isFinite(s))return[];if(0<s){o=Math.ceil(o/s),a=Math.floor(a/s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*s}else{s=-s,o=Math.ceil(o*s),a=Math.floor(a*s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/s}return i};function r0(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const i0=[1,5,2,2.5,4,3],o0=100*Number.EPSILON;const a0=(n,r,t=5,i=!0,o=i0,a=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,h,f,d,p,y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<o.length;t+=1){var m=o[t],v=(h=m,f=o,d=g,p=void 0,p=df(f),1-ef(f,h)/(p-1)-d+1);if(a[0]*v+a[1]+a[2]+a[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(a[0]*v+a[1]+a[2]*b+a[3]<y.score)break;var x=(r-n)/(e+1)/g/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=g*m*10**t,k=(M=r,k=w*(e-1),(M-=n)<k?1-((k-M)/2)**2/(.1*M)**2:1);if(a[0]*v+a[1]*k+a[2]*b+a[3]<y.score)break;var E=Math.floor(r/w)*g-(e-1)*g,M=Math.ceil(n/w)*g;if(E<=M){var S=M-E;for(let t=0;t<=S;t+=1){var O=(E+t)*(w/g),_=O+w*(e-1),P=w,T=function(t,e,n,r,i,o){var a=df(e),e=ef(e,t);let s=0;return t=(r%o+o)%o,1-e/(a-1)-n+(s=(t<o0||o-t<o0)&&r<=0&&0<=i?1:s)}(m,o,g,O,_,P),A=1-.5*((r-_)**2+(n-O)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(_-(N=O)),c=((c=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=a[0]*T+a[1]*A+a[2]*L+ +a[3];y.score<N&&(!i||O<=n&&r<=_)&&(y.lmin=O,y.lmax=_,y.lstep=P,y.score=N)}}t+=1}e+=1}}g+=1}var t=r0(y.lmax),e=r0(y.lmin),C=r0(y.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,I=new Array(j);I[0]=r0(e);for(let t=1;t<j;t+=1)I[t]=r0(I[t-1]+C);return I};class s0 extends Up{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:a0}}map(t){return wp(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new s0(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return jh(t)&&jh(r)?n(t,r,e):[]}}const l0=(t,e,n)=>{var[t,r]=t,[e,i]=e;let o,a;return np(a=t<r?(o=rp(t,r),n(e,i)):(o=rp(r,t),n(i,e)),o)},c0=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,o=new Array(i),a=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)o[t]=rp(s[t],s[t+1]),a[t]=e(l[t],l[t+1]);return t=>{var e=ip(r,t,1,i)-1,n=o[e];return np(a[e],n)(t)}},u0=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?c0:l0)(t,e,r?Yp:n)};class h0 extends Up{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Hp,tickCount:5}}map(t){return wp(t)?this.output(t):this.options.unknown}invert(t){return wp(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return up}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return lf}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:o}=this.options,n=u0(n.map(t),r,o,i);this.output=np(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=u0(i,r.map(t),Hp);this.input=np(e,n,i)}}class f0 extends h0{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Wp,tickMethod:n0,tickCount:5}}chooseTransforms(){return[lf,lf]}clone(){return new f0(this.options)}}class d0 extends e0{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:$p,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new d0(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const p0=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class y0 extends h0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Wp,tickMethod:n0,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[lf,lf]:(t=.5===r?p0:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new y0(this.options)}}class g0 extends y0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Wp,tickMethod:n0,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new g0(this.options)}}class m0 extends Up{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return wp(t)?(t=ip(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new m0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const v0=(t,e,n,r=10)=>{var i=t<0,o=Mp(r,i),a=Ep(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=a(l),h=a(c),f=[];if(!(r%1)&&h-u<n){if(u=Math.floor(u),h=Math.ceil(h),i)for(;u<=h;u+=1){var d=o(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&f.push(p)}}else for(;u<=h;u+=1){var y=o(u);for(let t=1;t<r;t+=1){var g=y*t;if(c<g)break;l<=g&&f.push(g)}}2*f.length<n&&(f=n0(l,c,n))}else f=n0(u,h,Math.min(h-u,n)).map(o);return s?f.reverse():f};class b0 extends h0{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Wp,tickMethod:v0,tickCount:5}}chooseNice(){return Sp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[Ep(t,e),Mp(t,e)]}clone(){return new b0(this.options)}}class x0 extends m0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:a0}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=up(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new x0(this.options)}}function w0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class k0 extends m0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:a0}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=w0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new k0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var E0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,M0=/\[([^]*?)\]/gm;function S0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function O0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o,a=i[r];for(o in a)t[o]=a[o]}return t}function _0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var P0,Vs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],qs=["January","February","March","April","May","June","July","August","September","October","November","December"],Ks=S0(qs,3),T0=O0({},{dayNamesShort:S0(Vs,3),dayNames:Vs,monthNamesShort:Ks,monthNames:qs,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),A0={D:function(t){return String(t.getDate())},DD:function(t){return _0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return _0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return _0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return _0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return _0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return _0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return _0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return _0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return _0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return _0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return _0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+_0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+_0(Math.floor(Math.abs(t)/60),2)+":"+_0(Math.abs(t)%60,2)}},L0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const N0=(t,e,n,r,i)=>{var o=e<t,a=o?e:t,t=o?t:e,[e,n]=bp(a,t,n,r,i),r=e.range(a,new Date(+t+1),n,!0);return o?r.reverse():r};function C0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class j0 extends h0{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:N0,interpolate:Hp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return xp}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:o,utc:t}=this.options,a=t?vp:gp,s=t?C0:lf;return t=>{var e=s(t),t=o||function(t,e){var{second:e,minute:n,hour:r,day:i,week:o,month:a,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":a.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,a),n=void 0;if(void 0===t&&(t=L0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=L0[t]||t).replace(M0,function(t,e){return r.push(e),"@@@"}),O0(O0({},T0),n));return(t=t.replace(E0,function(t){return A0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new j0(this.options)}}var I0;let R0=P0=class extends f0{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:lf,tickMethod:n0,tickCount:5}}constructor(t){super(t)}clone(){return new P0(this.options)}};R0=P0=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([Op(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return np(Hp(0,1),rp(t,e))})],R0);let F0=I0=class extends f0{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:lf,tickMethod:n0,tickCount:5}}constructor(t){super(t)}clone(){return new I0(this.options)}};F0=I0=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([Op(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=np(Hp(0,.5),rp(e,n)),o=np(Hp(.5,1),rp(n,r));return t=>(e>r?t<n?o:i:t<n?i:o)(t)})],F0);const D0=t=>new e0(t),B0=(D0.props={},t=>new f0(t)),z0=(B0.props={},t=>new Qp(t)),G0=(z0.props={},t=>new s0(t)),H0=(G0.props={},t=>new d0(t)),W0=(H0.props={},t=>new j0(t)),Y0=(W0.props={},t=>new b0(t)),V0=(Y0.props={},t=>new y0(t)),q0=(V0.props={},t=>new m0(t)),X0=(q0.props={},t=>new k0(t)),U0=(X0.props={},t=>new x0(t)),$0=(U0.props={},t=>new g0(t)),Z0=($0.props={},t=>new R0(t)),K0=(Z0.props={},Math.PI),J0=2*K0,Q0=1e-6,ty=J0-Q0;function ey(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ny(){return new ey}function ry(t){return function(){return t}}ey.prototype=ny.prototype={constructor:ey,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){var o,a,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),h=s-t,f=l-e,d=h*h+f*f;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>Q0&&(Math.abs(f*c-u*h)>Q0&&i?(a=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(a),o=Math.sqrt(d),d=(a=i*Math.tan((K0-Math.acos((a+d-r)/(2*l*o)))/2))/o,r=a/l,Math.abs(d-1)>Q0&&(this._+="L"+(t+d*h)+","+(e+d*f)),this._+="A"+i+","+i+",0,0,"+ +(h*s<f*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,c=e+s,u=1^o,o=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Q0||Math.abs(this._y1-c)>Q0)&&(this._+="L"+l+","+c),n&&((o=o<0?o%J0+J0:o)>ty?this._+="A"+n+","+n+",0,1,"+u+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):o>Q0&&(this._+="A"+n+","+n+",0,"+ +(o>=K0)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const iy=Math.abs,oy=Math.atan2,ay=Math.cos,sy=Math.max,ly=Math.min,cy=Math.sin,uy=Math.sqrt,hy=1e-12,fy=Math.PI,dy=fy/2,py=2*fy;function yy(t){return 1<=t?dy:t<=-1?-dy:Math.asin(t)}function gy(t){return t.innerRadius}function my(t){return t.outerRadius}function vy(t){return t.startAngle}function by(t){return t.endAngle}function xy(t){return t&&t.padAngle}function wy(t,e,n,r,i,o,a){var s=t-n,l=e-r,a=(a?o:-o)/uy(s*s+l*l),l=a*l,a=-a*s,s=t+l,t=e+a,e=n+l,n=r+a,r=(s+e)/2,c=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,o=i-o,s=s*n-e*t,n=(h<0?-1:1)*uy(sy(0,o*o*f-s*s)),e=(s*h-u*n)/f,t=(-s*u-h*n)/f,d=(s*h+u*n)/f,s=(-s*u+h*n)/f,u=e-r,h=t-c,n=d-r,f=s-c;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-a,x11:e*(i/o-1),y11:t*(i/o-1)}}function ky(){var P=gy,T=my,A=ry(0),L=null,N=vy,C=by,j=xy,I=null;function e(){var t,e,n,r,i,o,a,s,l,c,u,h,f,d,p,y,g,m,v,b,x,w,k=+P.apply(this,arguments),E=+T.apply(this,arguments),M=N.apply(this,arguments)-dy,S=C.apply(this,arguments)-dy,O=iy(S-M),_=M<S;if(I=I||(t=ny()),E<k&&(e=E,E=k,k=e),E>hy?O>py-hy?(I.moveTo(E*ay(M),E*cy(M)),I.arc(0,0,E,M,S,!_),k>hy&&(I.moveTo(k*ay(S),k*cy(S)),I.arc(0,0,k,S,M,_))):(r=e=M,i=n=S,a=o=O,f=(u=j.apply(this,arguments)/2)>hy&&(L?+L.apply(this,arguments):uy(k*k+E*E)),w=x=s=ly(iy(E-k)/2,+A.apply(this,arguments)),f>hy&&(h=yy(f/k*cy(u)),f=yy(f/E*cy(u)),(o-=2*h)>hy?(r+=h*=_?1:-1,i-=h):(o=0,r=i=(M+S)/2),(a-=2*f)>hy?(e+=f*=_?1:-1,n-=f):(a=0,e=n=(M+S)/2)),u=E*ay(e),h=E*cy(e),f=k*ay(i),M=k*cy(i),s>hy&&(d=E*ay(n),p=E*cy(n),y=k*ay(r),g=k*cy(r),O<fy)&&(S=function(t,e,n,r,i,o,a,s){var l=(s=s-o)*(n=n-t)-(a=a-i)*(r=r-e);if(!(l*l<hy))return[t+(l=(a*(e-o)-s*(t-i))/l)*n,e+l*r]}(u,h,y,g,d,p,f,M))&&(O=u-S[0],v=h-S[1],b=d-S[0],m=p-S[1],v=1/cy((1<(O=(O*b+v*m)/(uy(O*O+v*v)*uy(b*b+m*m)))?0:O<-1?fy:Math.acos(O))/2),b=uy(S[0]*S[0]+S[1]*S[1]),x=ly(s,(k-b)/(v-1)),w=ly(s,(E-b)/(1+v))),a>hy?w>hy?(l=wy(y,g,u,h,E,w,_),c=wy(d,p,f,M,E,w,_),I.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?I.arc(l.cx,l.cy,w,oy(l.y01,l.x01),oy(c.y01,c.x01),!_):(I.arc(l.cx,l.cy,w,oy(l.y01,l.x01),oy(l.y11,l.x11),!_),I.arc(0,0,E,oy(l.cy+l.y11,l.cx+l.x11),oy(c.cy+c.y11,c.cx+c.x11),!_),I.arc(c.cx,c.cy,w,oy(c.y11,c.x11),oy(c.y01,c.x01),!_))):(I.moveTo(u,h),I.arc(0,0,E,e,n,!_)):I.moveTo(u,h),k>hy&&o>hy?x>hy?(l=wy(f,M,d,p,k,-x,_),c=wy(u,h,y,g,k,-x,_),I.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?I.arc(l.cx,l.cy,x,oy(l.y01,l.x01),oy(c.y01,c.x01),!_):(I.arc(l.cx,l.cy,x,oy(l.y01,l.x01),oy(l.y11,l.x11),!_),I.arc(0,0,k,oy(l.cy+l.y11,l.cx+l.x11),oy(c.cy+c.y11,c.cx+c.x11),_),I.arc(c.cx,c.cy,x,oy(c.y11,c.x11),oy(c.y01,c.x01),!_))):I.arc(0,0,k,i,r,_):I.lineTo(f,M)):I.moveTo(0,0),I.closePath(),t)return I=null,t+""||null}return e.centroid=function(){var t=(+P.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-fy/2;return[ay(e)*t,cy(e)*t]},e.innerRadius=function(t){return arguments.length?(P="function"==typeof t?t:ry(+t),e):P},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:ry(+t),e):T},e.cornerRadius=function(t){return arguments.length?(A="function"==typeof t?t:ry(+t),e):A},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:ry(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:ry(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:ry(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:ry(+t),e):j},e.context=function(t){return arguments.length?(I=null==t?null:t,e):I},e}function Ey(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function My(t){this._context=t}function Sy(t){return new My(t)}function Oy(t){return t[0]}function _y(t){return t[1]}function Py(a,s){var l=ry(!0),c=null,u=Sy,h=null;function e(t){var e,n,r,i=(t=Ey(t)).length,o=!1;for(null==c&&(h=u(r=ny())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===o&&((o=!o)?h.lineStart():h.lineEnd()),o&&h.point(+a(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return a="function"==typeof a?a:void 0===a?Oy:ry(a),s="function"==typeof s?s:void 0===s?_y:ry(s),e.x=function(t){return arguments.length?(a="function"==typeof t?t:ry(+t),e):a},e.y=function(t){return arguments.length?(s="function"==typeof t?t:ry(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:ry(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(h=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=h=null:h=u(c=t),e):c},e}function Ty(u,h,f){var d=null,p=ry(!0),y=null,g=Sy,m=null;function e(t){var e,n,r,i,o,a=(t=Ey(t)).length,s=!1,l=new Array(a),c=new Array(a);for(null==y&&(m=g(o=ny())),e=0;e<=a;++e){if(!(e<a&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+h(i,e,t),m.point(d?+d(i,e,t):l[e],f?+f(i,e,t):c[e]))}if(o)return m=null,o+""||null}function t(){return Py().defined(p).curve(g).context(y)}return u="function"==typeof u?u:void 0===u?Oy:ry(+u),h="function"==typeof h?h:ry(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?_y:ry(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:ry(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:ry(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:ry(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:ry(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:ry(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:ry(+t),e):f},e.lineX0=e.lineY0=function(){return t().x(u).y(h)},e.lineY1=function(){return t().x(u).y(f)},e.lineX1=function(){return t().x(d).y(h)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:ry(!!t),e):p},e.curve=function(t){return arguments.length?(g=t,null!=y&&(m=g(y)),e):g},e.context=function(t){return arguments.length?(null==t?y=m=null:m=g(y=t),e):y},e}My.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Ay=Ny(Sy);function Ly(t){this._curve=t}function Ny(e){function t(t){return new Ly(e(t))}return t._curve=e,t}function Cy(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Ny(t)):e()._curve},t}function jy(){}function Iy(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ry(t,e){this._context=t,this._k=(1-e)/6}function Fy(t,e){this._context=t,this._k=(1-e)/6}function Dy(t,e,n){var r,i,o=t._x1,a=t._y1,s=t._x2,l=t._y2;t._l01_a>hy&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),o=(o*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,a=(a*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>hy&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(o,a,s,l,t._x2,t._y2)}function By(t,e){this._context=t,this._alpha=e}Ly.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Ry.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Iy(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Iy(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new Ry(t,n)}return t.tension=function(t){return e(+t)},t}(0),Fy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Iy(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new Fy(t,n)}return t.tension=function(t){return e(+t)},t}(0),By.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Dy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var zy=function e(n){function t(t){return n?new By(t,n):new Ry(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Gy(t,e){this._context=t,this._alpha=e}Gy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Dy(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Hy=function e(n){function t(t){return n?new Gy(t,n):new Fy(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function Wy(t){this._context=t}function Yy(t){return new Wy(t)}function Vy(t,e){this._context=t,this._t=e}function qy(t){return new Vy(t,.5)}function Xy(t){return new Vy(t,0)}function Uy(t){return new Vy(t,1)}function $y(t){return t}function Zy(t=""){throw new Error(t)}function Ky(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function Jy(t){return null!=t&&!Number.isNaN(t)}function Qy(t,e){return tg(t,e)||{}}function tg(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Fh(t.replace(n,"").trim()),e]).filter(([t])=>void 0!==t);return 0===t.length?null:Object.fromEntries(t)}function $(t){return new eg([t],null,t,t.ownerDocument)}Wy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Vy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class eg{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new eg(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new eg(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new eg([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],o=e(r,t);o.__data__=r,null!==i&&(o.__fromElements__=i),this._parent.appendChild(o),n.push(o)}return new eg(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var a=this._elements[t],s=e(a.__data__,t);a.appendChild(s),n.push(s)}return new eg(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new eg([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],o=[],a=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),h=$f(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var f=e[t],d=n(f,t),p=r(f,t);if(c.has(d)){var y=c.get(d);y.__data__=f,y.__facet__=!1,o.push(y),a.delete(y),c.delete(d)}else if(u.has(d)){y=u.get(d);y.__data__=f,y.__facet__=!0,o.push(y),u.delete(d)}else if(h.has(d)){const $f=h.get(d);s.push([f,$f]);for(const g of $f)a.delete(g);h.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],l.add(d),a.delete(d)):i.push(f)}var t=[new eg([],i,this._parent,this._document),new eg(o,null,this._parent,this._document),new eg(a,null,this._parent,this._document),new eg([],s,this._parent,this._document),new eg(l,null,this._parent,this._document)];return new eg(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new eg(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=eg.registry[t])?new e:Zy("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?e.then(()=>n.remove()):n.remove()}return new eg([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function ng([t,e],[n,r]){return[t-n,e-r]}function rg([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function ig([t,e]){return Math.atan2(e,t)}function og([t,e]){return ig([t,e])+Math.PI/2}function ag(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);var t=n-e,s=i-r;return[e,r,t,s]}function sg(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function lg(t){return t.map((t,e)=>e)}function cg(t){return Array.from(new Set(t))}function A(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function ug(t,e,n){var n=Object.assign({size:8},n)["size"],n="string"==typeof n?+parseFloat(n)/100*rg(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function hg(t,e,n,r,i){e=ig(ng(r,e))+Math.PI,n=ig(ng(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function fg(e,t,n,r="y"){const i="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=lg(i),[r,o]=Vf(t,t=>i[t]);const a=new f0({domain:[r,o],range:[0,100]}),s=t=>a.map(i[t]);return`linear-gradient(${n}deg, ${t.sort((t,e)=>s(t)-s(e)).map(t=>`${e[t]} ${s(t)}%`).join(",")})`}function dg(t){var[t,e,n,r]=t;return[r,t,e,n]}function pg(t,e,n){var[e,r,,i]=ud(t)?dg(e):e,[n,o]=n,t=t.getCenter(),a=og(ng(e,t)),r=og(ng(r,t)),n=r===a&&n!==o?r+2*Math.PI:r;return{startAngle:a,endAngle:0<=n-a?n:2*Math.PI+n,innerRadius:rg(i,t),outerRadius:rg(e,t)}}function yg(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return t[n]||t[r]||{fill:i,stroke:i}}eg.registry={g:ys,rect:Ps,circle:as,path:T,text:As,ellipse:ds,image:bs,line:ws,polygon:Ms,polyline:Os,html:ms};const gg=t=>{const M=t["colorAttribute"],S=U(t,["colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),i=M,o=r[i],a=U(r,["symbol"==typeof i?i:i+""]),r=a.lineWidth||1,{stroke:i,radius:s=0,radiusTopLeft:l=s,radiusTopRight:c=s,radiusBottomRight:u=s,radiusBottomLeft:h=s,inset:f=0,insetLeft:d=f,insetRight:p=f,insetBottom:y=f,insetTop:g=f,lineWidth:r="stroke"===M||i?r:0}=S,{color:o=o}=e;if(!hd(n)&&!fd(n)){var[m,,v]=!!ud(n)?dg(t):t;const[E,w]=m;var[v,m]=ng(v,m),b=(0<v?E:E+v)+d,x=(0<m?w:w+m)+g,v=Math.abs(v)-(d+p),d=Math.abs(m)-(g+y);return $(new Ps({})).call(A,a).style("lineWidth",r).style("x",b).style("y",x).style("width",v).style("height",d).style("stroke",o||i).style(M,o).style("radius",[l,c,u,h]).call(A,S).node()}const{y:w,y1:k}=e;p=n.getCenter(),m=pg(n,t,[w,k]),g=ky().cornerRadius(s).padAngle(f*Math.PI/180);return $(new T({})).call(A,a).style("path",g(m)).style("transform",`translate(${p[0]}, ${p[1]})`).style("stroke",o||i).style("lineWidth",r).style(M,o).call(A,S).node()}},mg=(gg.props={defaultEnterAnimation:"scaleInY"},t=>gg(Object.assign({colorAttribute:"fill"},t))),vg=(mg.props=Object.assign({},gg.props),t=>gg(Object.assign({colorAttribute:"stroke"},t)));vg.props=Object.assign({},gg.props);const bg=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,o]=t;if(ud(n)){const a=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,a,s,o]}const a=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,a,s,o]}}=t,l=U(t,["adjustPoints"]);return(t,e,n,r,i,...o)=>{var a=e["index"],a=i[a+1],t=s(t,a,n);return gg(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...o)}};function xg(t,e,n){var[t,r,i,o]=t;if(ud(n)){const a=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,a,s,o]}const a=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,a,s,o]}bg.props={defaultEnterAnimation:"fadeIn"};const wg=t=>bg(Object.assign({adjustPoints:xg},t));function kg(t){const e="function"==typeof t?t:t.render;return class extends ls{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}wg.props={defaultEnterAnimation:"fadeIn"};const Eg=kg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;$(t).maybeAppend("line",()=>new T({})).style("d",e).call(A,r),$(t).maybeAppend("line1",()=>new T({})).style("d",n).call(A,i)});const Mg=t=>{const{curve:u,gradient:h=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:d=!1}=t,p=U(t,["curve","gradient","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),{stroke:i,lineWidth:o}=r,a=U(r,["stroke","lineWidth"]),{color:r=i,size:e=o,transform:i,seriesColor:o,seriesX:s,seriesY:l}=e,o=h&&o?fg(o,s,l,h):r,s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),o&&{stroke:o}),e&&{lineWidth:e}),i&&{transform:i}),p),l=hd(n)?[...t,t[0]]:t;const c=Py().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>f(t)&&f(e)).curve(u);var[r,a]=function(t,e){var n=[],r=[];let i=!1,o=null;for(const a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(l,f),o=Qy(p,"connect"),e=!!a.length;return(!e||d&&!Object.keys(o).length?$(new T({})).style("d",c(r)).call(A,s):e&&!d?$(new T({})).style("d",c(l)).call(A,s):$(new Eg).style("style1",Object.assign(Object.assign({},s),o)).style("style2",s).style("d1",a.map(c).join(",")).style("d2",c(l))).node()}},Sg=(Mg.props={defaultEnterAnimation:"fadeIn"},t=>Mg(Object.assign({curve:Sy},t))),Og=(Sg.props=Object.assign({},Mg.props),t=>{var{alpha:e=.5}=t,t=U(t,["alpha"]);return Mg(Object.assign({curve:zy.alpha(e)},t))}),_g=(Og.props=Object.assign({},Mg.props),t=>Mg(Object.assign({curve:Uy},t))),Pg=(_g.props=Object.assign({},Mg.props),t=>Mg(Object.assign({curve:Xy},t))),Tg=(Pg.props=Object.assign({},Mg.props),t=>Mg(Object.assign({curve:qy},t)));function Ag(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}Tg.props=Object.assign({},Mg.props);var Lg=Object.freeze({__proto__:null,point:Ag,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const h=t=>{const{colorAttribute:h,symbol:e,mode:f="auto"}=t,d=U(t,["colorAttribute","symbol","mode"]),p=Lg[e]||Ag;return(t,e,n,r)=>{var i,{mark:o,shape:a,defaultShape:s}=e,r=yg(r,o,a,s),o=h,a=r[o],s=r["lineWidth"],r=U(r,["symbol"==typeof o?o:o+"","lineWidth"]),o=d.stroke?s||1:s,{color:s=a,transform:a}=e,[l,c]=1===(l=t).length?l[0]:([[l,u],[c,i]]=l,[(l+c)/2,(u+i)/2]),u=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||pd(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(f,t,e,n)||d.r||r.r;return $(new T).call(A,r).style("d",p(l,c,u)).style("lineWidth",o).style("transform",a).style("stroke",s).style(h,s).call(A,d).node()}},Ng=(h.props={defaultEnterAnimation:"fadeIn"},t=>h(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Cg=(Ng.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),jg=(Cg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),Ig=(jg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Rg=(Ig.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),Fg=(Rg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),Dg=(Fg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),Bg=(Dg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),zg=(Bg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Gg=(zg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Hg=(Gg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),Wg=(Hg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Yg=(Wg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Vg=(Yg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),qg=(Vg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Xg=(qg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Ug=(Xg.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),$g=(Ug.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Zg=($g.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Kg=(Zg.props=Object.assign({},h.props),t=>{const h=t["arrow"],f=U(t,["arrow"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:o,color:a,transform:s}=e,r=yg(r,e,i,o),{fill:e,stroke:i}=r,o=U(r,["fill","stroke"]),[r,t]=t,[l,c]=ug(r,t,h),u=ny();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),$(new T).call(A,o).style("d",u.toString()).style("stroke",a||i).style("fill",a||e).style("transform",s).call(A,f).node()}});Kg.props={defaultEnterAnimation:"fadeIn"};i(t1,Jg=ls),t1.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([Number(e)||0,Number(t)||0]),this.update(),this.bindEvents(this.attributes,this)},t1.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},t1.prototype.clear=function(){this.removeChildren()},t1.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},t1.prototype.bindEvents=function(t,e){};var Jg,Qg,js=t1;function t1(t){return Jg.call(this,t)||this}function e1(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e1)}function n1(){this.constructor=Qg}Qg=e1,zs=Error,n1.prototype=zs.prototype,Qg.prototype=new n1,e1.buildMessage=function(t,e){var o={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],o[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var r1;function i1(t,e,n,r){var i,o,a=o1(r=void 0===r?"...":r,n),s=Nh(t)?t:Gh(t),l=e,c=[];if(o1(t,n)<=e)return t;for(;;){if(i=s.substr(0,16),l<(o=o1(i,n))+a)break;if(c.push(i),l-=o,!(s=s.substr(16)))return c.join("")}for(;;){if(i=s.substr(0,1),l<(o=o1(i,n))+a)break;if(c.push(i),l-=o,!(s=s.substr(1)))return c.join("")}return"".concat(c.join("")).concat(r)}var o1=Qh(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(r1=r1||document.createElement("canvas").getContext("2d")).font=[o,e,i,"".concat(n,"px"),r].join(" "),r1.measureText(Nh(t)?t:"").width},function(t,e){return ve([t],F(zh(e=void 0===e?{}:e)),!1).join("")});function a1(t,e){return"string"==typeof t?o1(t,e):t}var s1=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function l1(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function c1(t,e){e=Math.pow(10,e);return~~(t*e)/e}function u1(t){return t.toLocaleString()}function h1(t,e){return void 0===e&&(e=0),Math.abs(t)<1e3?String(t):"".concat(c1(t/1e3,e).toLocaleString(),"K")}var f1=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},d1=function(t,e,n){return 0<t&&Number.isFinite(t)?e:n},p1=function(t,e){return t*e},y1=Math.PI/180;function g1(t){if(jh(t))return[t,t,t,t];if(Sh(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var m1=["default","active","selected","disabled","inactive"],v1={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function b1(t){var e;return t?null==t?void 0:t.default:(e=Jh(t)||{},m1.forEach(function(t){t in e&&delete e[t]}),e)}function x1(t,e,n){return void 0===n&&(n=!1),e?(e=rf(t,e),n?N({},b1(t),e):e):b1(t)||{}}function w1(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}E1.prototype.selectAll=function(t){return new E1("string"==typeof t?this.__parent__.querySelectorAll(t):t,null,this.__elements__[0],this.__document__)},E1.prototype.select=function(t){t="string"==typeof t?this.__parent__.querySelectorAll(t)[0]||null:t;return new E1([t],null,t,this.__document__)},E1.prototype.append=function(n){var r=this,t="function"==typeof n?n:function(){return t=n,r.__document__?r.__document__.createElement(t,{}):(e=E1.registry[t])?new e:new Error("Unknown node type: ".concat(t));var t,e},e=[];if(null!==this.__data__){for(var i=0;i<this.__data__.length;i++)(s=t(o=this.__data__[i],i)).__data__=o,this.__parent__.appendChild(s),e.push(s);return new E1(e,null,this.__parent__,this.__document__)}for(i=0;i<this.__elements__.length;i++){var o,a=this.__elements__[i],s=t(o=a.__data__,i);a.appendChild(s),e.push(s)}return new E1(e,null,e[0],this.__document__)},E1.prototype.data=function(t,n){void 0===n&&(n=function(t){return t});for(var e=[],r=[],i=new Map(this.__elements__.map(function(t,e){return[n(t.__data__,e),t]})),o=0;o<t.length;o++){var a,s=t[o],l=n(s,o);i.has(l)?((a=i.get(l)).__data__=s,r.push(a),i.delete(l)):e.push(s)}var c=Array.from(i.values()),c=[new E1([],e,this.__parent__,this.__document__),new E1(r,null,this.__parent__,this.__document__),new E1(c,null,this.__parent__,this.__document__)];return new E1(this.__elements__,null,this.__parent__,this.__document__,c)},E1.prototype.merge=function(t){return new E1(ve(ve([],F(this.__elements__),!1),F(t.__elements__),!1),null,this.__parent__,this.__document__)},E1.prototype.join=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this.__enter__),e=e(this.__update__),n=n(this.__exit__);return e.merge(t).merge(n)},E1.prototype.remove=function(){var n=ve([],F(this.__elements__),!1);return this.__elements__.forEach(function(t){var e;t.parentNode&&(t.parentNode.removeChild(t),e=n.indexOf(t),n.splice(e,1),null!=(e=t.parentNode)&&e.removeChild(t),t.remove())}),new E1(n,null,this.__parent__,this.__document__)},E1.prototype.each=function(t){for(var e=0;e<this.__elements__.length;e++){var n,r=this.__elements__[e];r&&(n=r.__data__,t.call(r,n,e))}return this},E1.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))}),this},E1.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))}),this},E1.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},E1.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,ve([this.__parent__,this],F(e),!1)),this},E1.prototype.node=function(){return this.__elements__[0]},E1.prototype.nodes=function(){return this.__elements__},E1.registry={g:ys,rect:Ps,circle:as,path:T,text:As,ellipse:ds,image:bs,line:ws,polygon:Ms,polyline:Os,html:ms};var k1=E1;function E1(t,e,n,r,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null]),this.__elements__=t=void 0===t?null:t,this.__data__=e,this.__parent__=n,this.__document__=r,this.__enter__=i[0],this.__update__=i[1],this.__exit__=i[2]}function k(t){return new k1([t],null,t,t.ownerDocument)}function L(t,e){var n,r;if(e)try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=F(o.value,2),s=a[0],l=a[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function D(t,e,n){return t.querySelector(e)?k(t).select(e):k(t).append(n)}function M1(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function S1(t){var t=t.getLocalBounds(),t=F([t.min,t.max],2),e=F(t[0],2),n=e[0],e=e[1],t=F(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function O1(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}var _1=["year","month","day","hour","minute","second"],P1=["YYYY","MM","DD","hh","mm","ss"];function T1(t){return t instanceof Date?t:new Date(t)}function A1(t){for(var e,t=F(t,2),n=t[0],t=t[1],n=_1.indexOf(n),r=_1.indexOf(t),i="",o=n;o<=r;o+=1)i+=P1[o],o<r&&(e="-",2===o?e=" ":2<o&&(e=":"),i+=e);return i}function L1(t,e){var n={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),hh:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},r=e;return Object.keys(n).forEach(function(t){var e=n[t];r=r.replace(t,"YYYY"===t?"".concat(e):"0".concat(e).slice(-2))}),r}function N1(t,e){t=new Date(t);return{year:function(t){t.setMonth(0),t.setHours(0,0,0,0)},month:function(t){t.setDate(1),t.setHours(0,0,0,0)},day:function(t){return t.setHours(0,0,0,0)},hour:function(t){return t.setMinutes(0,0,0)},minute:function(t){return t.setSeconds(0,0)},second:function(t){return t.setMilliseconds(0)}}[e](t),L1(t,A1(["year",e]))}function C1(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)j1(t,e[r]);return t}var j1=function(r,i,o,a){void 0===o&&(o=0),void 0===a&&(a=5),Object.entries(i).forEach(function(t){var t=F(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Lh(t)?(Lh(r[e])||(n[e]={}),o<a?j1(r[e],t,o+1,a):n[e]=i[e]):Sh(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function I1(t,e,n,r,i,o){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=o&&o<=Math.max(n,r))}function R1(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function F1(t,e){var t=F(t,2),n=t[0],t=t[1],e=F(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function D1(o){return void 0===o&&(o=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},o))})}}var B1=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function z1(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}va=z1;function G1(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function H1(t,e,n){return[["M",t-n,e],["L",t+n,e]]}var W1=H1;function Y1(t){n="default",Oh(e=t)&&e instanceof Image?n="image":Eh(e)?n="symbol":Nh(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}i(q1,V1=js),q1.prototype.render=function(t,e){t.x,t.y;var r=t.symbol,n=t.size,i=void 0===n?16:n,o=U(t,["x","y","symbol","size"]),a=Y1(r);a?D(e,".".concat(a,"-marker"),a).attr("className","marker ".concat(a,"-marker")).call(function(t){var e,n;"image"===a?(e=2*i,t.style("img",r).style("width",e).style("height",e).style("x",-i).style("y",-i)):(e=i/2,n=Eh(r)?r:q1.getSymbol(r),t.style("path",null==n?void 0:n(0,0,e)).call(L,o))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},q1.MARKER_SYMBOL_MAP=new Map,q1.registerSymbol=function(t,e){q1.MARKER_SYMBOL_MAP.set(t,e)},q1.getSymbol=function(t){return q1.MARKER_SYMBOL_MAP.get(t)};var V1,C=q1;function q1(){return null!==V1&&V1.apply(this,arguments)||this}C.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),C.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),C.registerSymbol("line",G1),C.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),C.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),C.registerSymbol("circle",z1),C.registerSymbol("point",va),C.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),C.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),C.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),C.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),C.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),C.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),C.registerSymbol("line",G1),C.registerSymbol("dot",H1),C.registerSymbol("dash",W1),C.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),C.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),C.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),C.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),C.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});i($1,X1=js),$1.prototype.render=function(t,e){var n,r,i=t.padding,o=t.marker,a=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,h=t.align,t=t.verticalAlign,i=F(g1(i),4),f=i[0],d=i[1],p=i[2],i=i[3],y=D(e,".tag-content","g").attr("className","tag-content").node(),g=D(y,".tag-marker",function(){return new C({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(o||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(g=g).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):g.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:g.style.y}),m=u.x,g=u.y,g=(D(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",g).style("text",Mh(a)?"":"".concat(a)).call(L,s).style("textBaseline","middle").call(function(t){a||t.remove()}),u=i,m=f,g=h||"start",s=t||"top",t=(h=y).getLocalBounds(),r=n=0,"start"===g&&(n=u),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),h.setLocalPosition([n,r]),y.getLocalBounds());D(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(y.style.zIndex||0)-1).style("x",g.min[0]-i).style("y",g.min[1]-f).style("width",null!==c?i+d+2*g.halfExtents[0]:0).style("height",null!==c?f+p+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(L,c)},$1.defaultOptions={type:$1.tag="tag",style:{padding:4,spacing:4}};var X1,U1=$1;function $1(t){return X1.call(this,N({},$1.defaultOptions,t))||this}var Z1,K1,J1={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Q1={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},tm={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}},em=(i(nm,Z1=js),Object.defineProperty(nm.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,i1(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=Wh(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),nm.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=N({},rf(J1,[n,e]),x1(rf(Q1,[t,e]),r),x1(rf(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in tm[e]&&(i[t]=rf(tm,[e,t]))}),Object.keys(tm.strict[e]).forEach(function(t){i[t]=rf(tm,["strict",e,t])}),N(i,x1(rf(this.attributes,e),"disabled"))),i},nm.prototype.render=function(t,e){var n=t.padding,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),F(g1(n),4)),i=(n[0],n[1]),o=(n[2],n[3]),a=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=D(e,".marker",function(){return new C({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(S(S({},s),{symbol:r,x:o+l/2,y:a/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=D(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:o).style("y",a/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(L,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");D(e,".background","rect").attr("className","background").style("zIndex",-1).call(L,c).style("height",a).style("width",o+(l?l+t:0)+2*n.halfExtents[0]+i).node()},nm.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},nm.prototype.setState=function(t){this.update({state:t})},nm.prototype.hide=function(){this.style.visibility="hidden"},nm.prototype.show=function(){this.style.visibility="visible"},nm.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},nm.defaultOptions={type:nm.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},nm);function nm(t){var n=Z1.call(this,C1({},nm.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function rm(t){return K1.call(this,N({},rm.defaultOptions,t))||this}i(rm,K1=js),rm.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=F(g1(i),3),i=t[0],h=t[1],t=t[2],f=D(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,y=(f.node().removeChildren(),this),o=0;o<s.length;o++)!function(t){var e,n=s[t],r=new U1({className:"breadcrumb-item",style:S(S({x:d,y:p,text:Mh(n.text)?n.id:n.text,textStyle:l},of(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(f.append(function(){return r}),r.getLocalBounds()),o=2*i.halfExtents[0],i=2*i.halfExtents[1],o=(d+=o,Mh(c)||c-h<d&&(r.attr({x:0,y:p+i}),d=o,p+=i),y.bindInnerEvents(r,n),u||{}),n=o.spacing,n=void 0===n?0:n,a=o.text,a=void 0===a?"/":a,o=o.style;t!==s.length-1&&(e=new As({className:"".concat(rm.tag,"-separator"),id:"".concat(rm.tag,"-separator-").concat(t),style:S(S(S(S({},v1),{x:d+n,y:p+i/2}),o),{text:a,textAlign:"end",textBaseline:"middle"})}),f.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(o)},rm.prototype.update=function(t){this.attr(N({},this.attributes,t)),this.render(this.attributes,this)},rm.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},rm.defaultOptions={type:rm.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:S(S({},v1),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(am,im=P),am.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},am.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},am.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},am.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new T({name:"line",style:t}))})},am.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new T({name:"area",style:t}))})};var im,om=am;function am(t){var e=this,n=t.style,t=U(t,["style"]);return(e=im.call(this,N({},{type:"lines",style:{width:0,height:0}},S({style:n},t)))||this).linesGroup=new ys({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new ys({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}i(cm,sm=P),cm.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new Ps({name:"column",style:t}))})})},cm.prototype.update=function(t){this.attr(N({},this.attributes,t)),t.columns&&(this.clear(),this.render())},cm.prototype.clear=function(){this.removeChildren()};var sm,lm=cm;function cm(t){var e=this,n=t.style,t=U(t,["style"]);return(e=sm.call(this,N({},{type:"column",style:{width:0,height:0}},S({style:n},t)))||this).columnsGroup=new ys({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function um(t){return 0===t.length?[0,0]:[Ah(Bh(t,function(t){return Ah(t)||0})),Th(Dh(t,function(t){return Th(t)||0}))]}function hm(t){for(var e=Jh(t),n=e[0].length,t=F([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],o=0;o<e.length;o+=1)for(var a=e[o],s=0;s<n;s+=1)0<=a[s]?(a[s]+=r[s],r[s]=a[s]):(a[s]+=i[s],i[s]=a[s]);return e}function fm(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,o=t.length;i<o;i+=2)r.push([t[i],t[i+1]]);for(var a,s,l,c=function(t,e,n,r){var i,o=[],a=!!r;if(a){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=le([0,0],c,x=t[s]),u=ce([0,0],u,x)}for(var s=0,h=t.length;s<h;s+=1){var f,d,p,y,g,m,v,b,x=t[s];0!==s||n?s!==h-1||n?(f=t[[s?s-1:h-1,s-1][n?0:1]],d=t[n?(s+1)%h:s+1],m=ue(m=de([0,0],d,f),m,e),0!==(g=(p=he(x,f))+(y=he(x,d)))&&(p/=g,y/=g),g=ue([0,0],m,-p),m=ue([0,0],m,y),v=se([0,0],x,g),b=le([0,0],b=se([0,0],x,m),ce([0,0],d,x)),b=ce([0,0],b,le([0,0],d,x)),v=le([0,0],v=se([0,0],x,g=ue([0,0],g=de([0,0],b,x),-p/y)),ce([0,0],f,x)),v=ce([0,0],v,le([0,0],f,x)),b=se([0,0],x,m=ue([0,0],m=de([0,0],x,v),y/p)),a&&(v=le([0,0],v=ce([0,0],v,c),u),b=le([0,0],b=ce([0,0],b,c),u)),o.push(i),o.push(v),i=b):(v=x,o.push(i),o.push(v)):i=x}return n&&o.push(o.shift()),o}(r,.4,e,n),u=r.length,h=[],i=0;i<u-1;i+=1)a=c[2*i],s=c[2*i+1],h.push(["C",a[0],a[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(a=c[u],s=c[u+1],h.push(["C",a[0],a[1],s[0],s[1],(l=r[0])[0],l[1]])),h}function dm(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return ve([e===n?"M":"L"],F(t),!1)});return e?t.reverse():t}function pm(t,e){if(void 0===e&&(e=!1),t.length<=2)return dm(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];uf(o,n.slice(-2))||n.push.apply(n,ve([],F(o),!1))}var a=fm(n,!1);return e?a.unshift(ve(["M"],F(t[r-1]),!1)):a.unshift(ve(["M"],F(t[0]),!1)),a}function ym(t,e,n){t=Jh(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(bm,gm=js),Object.defineProperty(bm.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Jh(t),jh(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(bm.prototype,"data",{get:function(){return this.attributes.isStack?hm(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(bm.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(bm.prototype,"baseline",{get:function(){var t=this.scales.y,e=F(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(bm.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(bm.prototype,"linesCfg",{get:function(){var t,n,r,i,o,e,a,s,l,c=this,u=this.attributes,h=u.areaStyle,f=u.isStack,d=u.lineStyle,p=u.smooth,u=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,n=(e={type:"line",x:e,y:t}).x,r=e.y,i=(e=F(r.getOptions().range||[0,0],2))[0],o=e[1],i<o&&(e=F([i,o],2),o=e[0],i=e[1]),t=y.map(function(t){return t.map(function(t,e){return[n.map(e),Ch(r.map(t),o,i)]})}),e=[],h&&(y=this.baseline,e=f?(p?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=t[i],s=pm(a),l=void 0,l=0===i?ym(s,e,n):(o=pm(t[i-1],!0),a=a[0],o[0][0]="L",ve(ve(ve([],F(s),!1),F(o),!1),[ve(["M"],F(a),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=dm(t[i]),s=void 0,s=0===i?ym(a,e,n):((o=dm(t[i-1],!0))[0][0]="L",ve(ve(ve([],F(a),!1),F(o),!1),[["Z"]],!1));r.push(s)}return r})(t,u,y):(a=p,s=u,l=y,t.map(function(t){return ym((a?pm:dm)(t),s,l)}))),{lines:t.map(function(t,e){return S({stroke:c.getColor(e),path:(p?pm:dm)(t)},d)}),areas:e.map(function(t,e){return S({path:t,fill:c.getColor(e)},h)})})},enumerable:!1,configurable:!0}),Object.defineProperty(bm.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,o=t.isStack,a=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=hm(s));var e=this.createScales(s),l=e.x,c=e.y,e=F(um(s),2),n=e[0],e=e[1],u=new f0({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.getBandWidth(),f=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return S(S({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:h,height:u.map(f[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),bm.prototype.render=function(t,e){this.containerShape=D(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=D(e,".".concat(r),function(){return new("line"===n?om:lm)({className:r,style:i})}).call(L,i).node()},bm.prototype.update=function(t){this.attr(N({},this.attributes,t)),this.render(this.attributes,this)},bm.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},bm.prototype.getColor=function(t){var e=this.attributes.color;return Sh(e)?e[t%e.length]:Eh(e)?e.call(null,t):e},bm.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,o=e.nice,o=void 0===o||o,a=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,c=F(um(t),2),u=c[0],c=c[1];return{type:n,x:"line"===n?new f0({domain:[0,t[0].length-1],range:[0,l]}):new e0({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new f0({domain:[null!=a?a:u,null!=e?e:c],range:[s,0],nice:o})}},bm.tag="sparkline",bm.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var gm,mm,vm=bm;function bm(t){return gm.call(this,N({},bm.defaultOptions,t))||this}function xm(){return null!==mm&&mm.apply(this,arguments)||this}function wm(e,n){return i(t,r=ls),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(N({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,C1({},{style:n},t))||this;return t.descriptor=e,t}var r}i(xm,mm=ls);var km=wm({render:function(t,e){function n(t,e,n,r,i){D(h,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",h.style.stroke).style("strokeOpacity",h.style.strokeOpacity).style("lineWidth",h.style.lineWidth)}var r=t.size,i=t.radius,o=t.stroke,a=t.fill,s=t.lineWidth,l=t.orient,c=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,u=2.4*r,h=D(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-u/2).style("width",r).style("height",u).style("fill",a||"#fff").style("fillOpacity",c||1).style("stroke",o||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),a=1/3*r,c=2/3*r,o=.25*u,s=.75*u;n(0,a,o,a,s),n(0,c,o,c,s),h.setOrigin(r/2,u/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});i(_m,Em=js),_m.prototype.render=function(t,e){var n,r,i,o=t.iconCfg,t=t.textCfg;i=e,o=((n=o)||{}).type,r="handle-icon ".concat(o,"-handle"),k(i).selectAll(".handle-icon").data(o?[o]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new C({className:r,name:"icon",style:n}):new km({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),D(e,".".concat(o="handle-text"),"text").attr("className",o).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(L,i)};var Em,Mm,Sm,Om=_m;function _m(){return null!==Em&&Em.apply(this,arguments)||this}function Pm(t){var o=Mm.call(this,N({},Pm.defaultOptions,t))||this;return o.onSelectionMouseenter=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onSelectionMouseleave=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onDragStart=function(i){return function(t){t.stopPropagation(),o.target=i,o.prevPos=o.getOrientVal(w1(t));var t=o.availableSpace,e=t.x,t=t.y,n=o.attributes,r=n.x,n=n.y;o.selectionStartPos=o.getRatio(o.prevPos-o.getOrientVal([e,t])-o.getOrientVal([r,n])),o.selectionWidth=0,o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd)}},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(w1(t)),e=t-o.prevPos;if(e){var n=o.getRatio(e);switch(o.target){case"start":o.setValuesOffset(n);break;case"end":o.setValuesOffset(0,n);break;case"selection":o.setValuesOffset(n,n);break;case"background":o.selectionWidth+=n,o.setValues([o.selectionStartPos,o.selectionStartPos+o.selectionWidth].sort())}o.prevPos=t}},o.onDragEnd=function(){o.removeEventListener("mousemove",o.onDragging),o.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchend",o.onDragEnd)},o.onValueChanged=function(t){t=new Ya("valueChanged",{detail:{oldValue:t,value:o.getValues()}});o.dispatchEvent(t)},o.selectionStartPos=0,o.selectionWidth=0,o.prevPos=0,o.target="",o}function Tm(t){var a=Sm.call(this,N({},Tm.defaultOptions,t))||this;return a.onValueChanged=function(t){var e=a.style.value;t!==e&&(e=new Ya("scroll",t={detail:{oldValue:t,value:e}}),a.dispatchEvent(e),e=new Ya("valueChanged",t),a.dispatchEvent(e))},a.onTrackClick=function(t){var e=a.attributes.thumbLen,n=F(a.getLocalPosition(),2),r=n[0],n=n[1],i=F(a.padding,4),o=i[0],i=i[3],r=a.getOrientVal([r+i,n+o]),i=a.getOrientVal(w1(t))-e/2,n=a.valueOffset(i-r,!0);a.setValue(n)},a.onThumbMouseenter=function(){a.thumbShape.attr(a.getStyle("thumbStyle","active"))},a.onTrackMouseenter=function(){a.trackShape.attr(a.getStyle("trackStyle","active"))},a.onThumbMouseleave=function(){a.thumbShape.attr(a.getStyle("thumbStyle"))},a.onTrackMouseleave=function(){a.trackShape.attr(a.getStyle("trackStyle"))},a.onDragStart=function(t){t.stopPropagation(),a.prevPos=a.getOrientVal(w1(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchmove",a.onDragging),document.addEventListener("touchcancel",a.onDragEnd)},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(w1(t)),e=t-a.prevPos;a.setOffset(e),a.prevPos=t},a.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("touchcancel",a.onDragEnd)},a}i(Pm,Mm=js),Object.defineProperty(Pm.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"backgroundShapeCfg",{get:function(){return S(S({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=U(t,["padding"]),e=F(g1(e),4),n=e[0],r=e[1],i=e[2],e=e[3],o=this.availableSpace,a=o.width,o=o.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return S(S({x:s/2+e,y:s/2+n},t),{zIndex:0,width:a-s-e-r,height:o-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=F(g1(e),4),r=e[0],i=e[1],o=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Pm.prototype.getValues=function(){return this.values},Pm.prototype.setValues=function(t){this.values=t,this.update({values:t})},Pm.prototype.getNames=function(){return this.names},Pm.prototype.setNames=function(t){this.names=t},Pm.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return D(o,".".concat(t),function(){return new Om({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=D(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(L,this.availableSpace).call(L,x1(i)).node(),o=(D(this.backgroundShape=e,".slider-sparkline",function(){return new vm({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),D(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=D(o,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(L,this.calcMask()).call(L,x1(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},Pm.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,o=F(this.getValues(),2),a=o[0],o=o[1],t=F(t||[a,o],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=F([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?a===i&&o===t?[i,t]:[i,l+i]:r<t?o===r&&a===s?[s,r]:[r-l,r]:[c1(s,e),c1(t,e)]},Pm.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):x1(rf(this.attributes,t),e,!0)},Pm.prototype.calcMask=function(t){var t=F(this.getSafetyValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},Pm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=F(this.getSafetyValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},Pm.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,o=this.getHandleCfg(t),a=o.spacing,s=o.formatter,o=o.textStyle,l=this.getHandleSize(t),c=this.getSafetyValues(),u=this.availableSpace,h=u.width,u=u.height,f=this.calcMask(),d=f.x,p=f.y,y=f.width,f=f.height,r=F("start"===t?[r[0],c[0]]:[r[1],c[1]],2),c=s(r[0],r[1]),s=new As({style:S(S({},o),{text:c})}),r=M1(s),o=r.width,r=r.height,s=(s.destroy(),0),g=0,l=l/2,m="center";return"horizontal"===i?(e=(i=a+l)+o/2,m="start"===t?(s=0<(n=d-i-o)?-e:e,0<n?"end":"start"):(s=(n=o<h-d-y-i)?e:-e,n?"start":"end")):(o=a+l,g="start"===t?r<p-l?-o:o:r<u-p-f-l?o:-o),{x:s,y:g,text:c,textAlign:m}},Pm.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return S(S({},e),this.calcHandleText(t))},Pm.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,o=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",S(S({},r),{cursor:o,size:t,symbol:i})):(e="default",S(S({},r),{cursor:o,size:t}));return S({orient:n,type:e},i)},Pm.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:S(S({},this.getHandleTextShapeCfg(t)),i)}},Pm.prototype.getHandleCfg=function(t){var e=rf(this.attributes,"handle"),n=e.start,r=e.end,e=U(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),N({},e,i)},Pm.prototype.getHandleSize=function(t){var e,t=this.getHandleCfg(t).size;return t||(e=(t=this.attributes).width,t=t.height,Math.floor((this.getOrientVal([t,e])+4)/2.4))},Pm.prototype.getOrientVal=function(t){var t=F(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Pm.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=F(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},Pm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Pm.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},Pm.defaultOptions={type:Pm.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},i(Tm,Sm=js),Object.defineProperty(Tm.prototype,"padding",{get:function(){return g1(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Tm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=F(this.padding,4),r=n[0],i=n[1],o=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(Tm.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(Tm.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=rf(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),Tm.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,o=t.thumbStyle,a=t.value,s=t.thumbLen,t=t.orient,e=D(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(L,x1(i)).node(),n=this.valueOffset(a||0),r=this.availableSpace;this.thumbShape=D(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(L,x1(o)).node(),this.trackShape=e},Tm.prototype.getValue=function(){return this.style.value},Tm.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:Ch(t,r,e)}),this.onValueChanged(n)},Tm.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},Tm.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*Ch(t,i,n)},Tm.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),x1(rf(this.attributes,t),e)},Tm.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},Tm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Tm.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},Tm.defaultOptions={type:Tm.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};Object.defineProperty(Lm.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Lm.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Lm.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Lm.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Lm.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Lm.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Lm.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Lm.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Lm.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Lm.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Lm.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*a+l,t*r+s*a+e],[s*o-t*a+l,t*o+s*a+e],[s*o-t*i+l,t*o+s*i+e]].flat(1)},Lm.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Lm.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Lm.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Am=Lm;function Lm(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function Nm(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=F(e=c,4))[0],r=e[1],i=e[2],e=e[3],o=(t=F(t,4))[0],a=t[1],i-=n,e-=r,s=t[2]-o,t=t[3]-a,0!=(l=i*t-s*e)&&(a=i*(i=r-a)-e*(r=n-o))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<a!=e&&l<n!=e;var e,n,r,i,o,a,s,l})}function Cm(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),o=i.min,a=i.max,i=i.halfExtents,s=o[0],l=2*i[0],i=2*i[1],o=o[1],c=a[0],a=a[1],u=0,h=0,f=s,d=o,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,u=+e.style.dx,h=+e.style.dy,"center"===p?f=(s+c)/2:"right"!==p&&"end"!==p||(f=c),"middle"===y?d=(o+a)/2:"bottom"!==y&&"baseline"!==y||(d=a)),F(n,4)),c=p[0],y=void 0===c?0:c,a=p[1],n=void 0===a?0:a,c=p[2],a=p[3];return t.set((u+=s)-(void 0===a?n:a),(h+=o)-y,u+l+n,h+i+(void 0===c?y:c)),e.setEulerAngles(r),t.rotatedPoints(r*y1,f,d)}function jm(t,e,n){t=Cm(new Am,t,n),e=Cm(new Am,e,n);return Nm(e,[t[0],t[1],t[2],t[3]])||Nm(e,[t[0],t[1],t[4],t[5]])||Nm(e,[t[4],t[5],t[6],t[7]])||Nm(e,[t[2],t[3],t[6],t[7]])}function Im(t,e,n){return"top"===t||"bottom"===t?e:n}function Rm(t,e,n){return"left"===t||"right"===t?e:n}function Fm(t,e,n){return"outside"===t?e:n}var Dm=function(t,e,n){return"left"===t?e:n},Bm=function(t,e,n){return"right"===t?e:n},zm=function(t,e,n){return"left"===t||"top"===t||"inside"===t?e:n};function Gm(t,r){var i;return ve([],F(t.reduce(function(t,e,n){return n&&i&&jm(i,e,r)?(t.add(i),t.add(e)):i=e,t},new Set)),!1)}var ba={style:{title:{content:"",rotate:void 0,maxLength:260},ticks:[],ticksThreshold:100,tickLine:{len:6},subTickLine:{len:4,count:0},label:{type:"text",alignTick:!0,tickPadding:2,margin:[0,0,0,0],overlapOrder:["autoRotate","autoEllipsis","autoHide"],autoRotate:!1,autoEllipsis:!1,autoHide:!1,autoHideTickLine:!0,showLast:!0,showFirst:!0,optionalAngles:[0,45,90],minLabel:0,minLength:14,maxLength:160,ellipsisStep:" "},verticalFactor:1}},Hm=(N({},ba,{style:{type:"arc"}}),N({},ba,{style:{}}),{year:[["year","second"],["year","day"],["month","day"],["day","day"]],month:[["month","day"],["day","day"]],day:[["month","day"],["day","day"]],hour:[["hour","second"],["hour","minute"],["hour","hour"]],minute:[["minute","second"],["second","second"]],second:[["second","second"]]});function Wm(t,r){for(var i,o=t.map(function(t,e){return[t.id,{text:t.style.text,value:t.style.tip||t.style.text,idx:e}]}),a=new Map(o),e=Bh(o,function(t){t=F(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,n=Dh(o,function(t){t=F(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,s=(n=n,e=F([T1(e=e),T1(n)],2),n=e[0],e=e[1],n.getFullYear()!==e.getFullYear()?"year":n.getMonth()!==e.getMonth()?"month":n.getDay()!==e.getDay()?"day":n.getHours()!==e.getHours()?"hour":n.getMinutes()!==e.getMinutes()?"minute":"second"),l=new Date("1970-01-01 00:00:00"),c=s1(t[0]),u=0;u<Hm[s].length;u+=1){var h=Hm[s][u];if(pf(L1(l,A1(h)),c)<r){i=h;break}i=h}return function(t,e){var n,e=a.get(e.id).idx;return 0===e?t:(e=null==(e=o[e-1])?void 0:e[1].text,t=new Date(t),n=i,N1(new Date(e),s)!==N1(t,s)&&(n=function(t,e,n,r){for(var i=[],o=F(t,2)[1],a=_1.indexOf(o),s=0;s<=a;s+=1){var l=[_1[s],o];if(pf(L1(e,A1(l)),r)<n){i=l;break}}return i}(i,t,r,c)),L1(t,A1(n)))}}function Ym(a,s,t){if(!(s.length<=1))for(var e=t.ellipsisStep,n=t.minLength,r=t.maxLength,i=t.margin,l=void 0===i?[]:i,c=t.labelType,u=s1(s[0]),o=a1(e,u)||1,h=a1(n,u)||1,i=a1(r,u),f=(!Mh(i)&&i!==1/0||(i=Math.max.apply(null,s.map(function(t){return t.getBBox().width}))),Date.now()),d=s.slice(),t=F(l,4),e=(t[0],t[1]),p=void 0===e?0:e,n=(t[2],t[3]),y=void 0===n?p:n,g=function(e){var t,n,r,i,o;return(d=Gm(s,l)).length<1||300<Date.now()-f?{value:void 0}:(o=function(t,e){return""},n=Im(a,e-y-p,e),o="time"===c?Wm(s,n):"number"===c?(n=n,r=(t=s).map(function(t,e){return{text:t.style.text,value:Number(t.style.tip||t.style.text)}}),r=Number(Dh(r,function(t){t=t.text;return(null==t?void 0:t.length)||0}).value),t=s1(t[0]),i=u1(r),pf(i,t)<=n?function(t,e){return u1(Number(t))}:(i=h1(r),pf(i,t)<=n?function(t,e){return h1(Number(t),1)}:function(t,e){return Number(t).toExponential()})):function(t){return i1(t,e,u)},void d.forEach(function(t,e){var n=t.style.tip||t.style.text,n=(t.style.tip=n,o.call(null,n,t));t.attr("text",n)}))},m=i;h+o<m;m-=o){var v=g(m);if("object"==typeof v)return v.value}}var Vm=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};function qm(t,e,n){var r=e.length;if(!(r<=1||2===r&&null!=n&&n.showFirst&&null!=n&&n.showLast)){var i,o,a,s=Vm,l=2,c=e.slice(),u=e.slice(),h=Date.now(),f=Math.min.apply(null,e.map(function(t){return t.getBBox().width}))||1;for("top"!==t&&"bottom"!==t||(t=S1(e[0]).left,e=S1(e[r-1]).right,e=Math.abs(e-t)||1,l=Math.max(Math.floor(r*f/e),l)),null!=n&&n.showFirst&&(i=c.splice(0,1)[0]),null!=n&&n.showLast&&(o=c.splice(-1,1)[0],c.reverse());Gm((o?ve(ve([o],F(u),!1),[i],!1):ve([i],F(u),!1)).filter(function(t){return B1(t)}),null==n?void 0:n.margin).length;)if(o&&!i&&l%2==0?c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}):o&&i&&c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}),u=s(((a=c).forEach(function(t){return t.style.visibility="visible"}),a),{seq:l}),l++,200<Date.now()-h)return}}function Xm(o,t,e){for(var n=e.optionalAngles,a=void 0===n?[0,45,90]:n,r=e.margin,i=function(i){if(t.forEach(function(t){return e=o,t=t,n=a[i],t.setEulerAngles(n),void(n&&(r=zm(e,-1,1),e=Dm(e,"end",Bm(e,"start",d1(p1(r,n),"left",f1(p1(r,n),"right")))),t.style.textAlign=e));var e,n,r}),Gm(t,r).length<1)return"break"},s=0;s<a.length&&"break"!==i(s);s++);}var Um=new Map([["autoHide",{getDefault:function(){return qm},equidistance:qm,greedy:function(t,e,n){var r,i=e.length;i<=1||2===i&&null!=n&&n.showFirst&&null!=n&&n.showLast||e.slice().forEach(function(t,e){e&&r&&jm(r,t,null==n?void 0:n.margin)?e===i-1&&null!=n&&n.showLast?r.style.visibility="hidden":t.style.visibility="hidden":r=t})}}],["autoRotate",{getDefault:function(){return Xm}}],["autoEllipsis",{getDefault:function(){return Ym},ellipsis:Ym}]]);function $m(t,e,n){var r,t=Array.from(t||[]).map(function(t,e){return S({id:"".concat(e)},t)}),i=t.length,o=t;return"number"==typeof e&&e<i&&(r=Math.ceil(i/e),o=t.filter(function(t,e){return e%r==0||e===i-1})),n&&1!==o[o.length-1].value&&o.push({value:1,id:"append"}),o}function Zm(a,s){return function(i){var t,o;a&&(t=void 0===(t=a.overlapOrder)?[]:t,o=S({labelType:a.type},of(a,["optionalAngles","minLength","maxLength","ellipsisStep","showFirst","showLast","margin"])),t.forEach(function(t){var e,n=Um.get(t),r=a[t];n&&r&&(t=t,e=a)&&("autoRotate"!==t||Mh(e.rotate))&&(t=n.getDefault(),"function"==typeof r?t=r:"object"==typeof r?(t=n[r.type]||sf,o=S(S({},o),r.cfg)):"string"==typeof r&&(t=n[r]||sf),t(s,i,o))}))}}function Km(t,n,e){e&&t.forEach(function(t,e){e=n[e];e&&(e.style.visibility=t.style.visibility)})}function Jm(t,e,n,r,i,o){D(t,".axis-title","text").attr("className","axis-title").style("text",(null==o?void 0:o.content)||"").style("x",e).style("y",n).style("fill","black").style("fontSize",12).style("fontWeight","lighter").style("textAlign",r).style("textBaseline",i).style("transform","rotate(".concat((null==o?void 0:o.rotate)||0,"deg)")).style("visibility",o?"visible":"hidden").call(L,(null==o?void 0:o.style)||{})}function Qm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function tv(t,n,r,e){void 0===e&&(e=""),k(t).selectAll(".axis-".concat(e,"tick")).data(r?n:[],function(t){return t.id}).join(function(t){return t.append(function(t){return new ws({className:"axis-".concat(e,"tick"),style:t})}).style("stroke","#416180").style("lineWidth",.5).style("strokeOpacity","sub"===e?.45:.65).style("visibility","visible").each(function(t,e){this.attr(t),Qm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Qm(this,e,n,null==r?void 0:r.style)}).style("visibility","visible")},function(t){return t.remove()})}function ev(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function nv(t,e){var n=s1(t),e=a1(e,n);t.attr("tip",null),B1(e)&&e<2*t.getBounds().halfExtents[0]&&(e=i1(t.style.text||"",e,n,"..."),t.attr("tip",t.style.text),t.attr("text",e))}function rv(t,e,n,r,i){k(t).selectAll(".".concat(e)).data(n,function(t){return t.id}).join(function(t){return t.append("text").attr("className",e).style("fontFamily","sans-serif").style("fontSize",12).style("fontWeight","normal").call(L,i||{}).each(function(t,e){this.attr(t),nv(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),ev(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),nv(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),ev(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()})}function iv(t,e,n){rv(t,"axis-label",(n=void 0===n?{}:n)?e:[],n,{fill:"#000",fontWeight:"lighter"})}function ov(t,e,n,r,i,o){D(t,".axis-".concat(e,"-arrow"),function(){return new C({})}).attr("className","axis-arrow$$ axis-".concat(e,"-arrow")).style("visibility",o?"visible":"hidden").style("symbol","axis-arrow").style("x",n).style("y",r).style("size",8).style("lineWidth",.5).style("fill","grey").style("stroke","grey").style("fillOpacity",.85).style("strokeOpacity",.85).style("transformOrigin","left").style("transform","rotate(".concat(i,"deg)")).call(L,o||{})}function av(t,e,n,r){var i,o,a,s;void 0===r&&(r={}),D(t,".axis-line","path").attr("className","axis-line").style("visibility",r?"visible":"hidden").style("stroke","grey").style("lineWidth",.5).style("strokeOpacity",.85).style("path",e).call(L,(null==r?void 0:r.style)||{}),n&&(r=(e=(null==r?void 0:r.arrow)||{}).start,e=e.end,n=F(n,2),i=(o=F(n[0],2))[0],o=o[1],a=(n=F(n[1],2))[0],n=n[1],s=Math.atan((n-o)/(a-i))/Math.PI*180/2,i===a?s=n<o?45:-45:o===n&&(s=a<i?0:90),ov(t,"start",i,o,s,r),ov(t,"end",a,n,s+90,e))}function sv(t,e,n,r){var i,o,a,s,l;return e?(o=t[0],a=e,s=(o=F(o,2))[0],o=o[1],s=(a=F(a,2))[0]-s,a=a[1]-o,i=Math.sqrt(s*s+a*a),l=r?0:1,n?"M".concat(e[0],",").concat(e[1]-i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]+i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]-i," Z"):t.reduce(function(t,e,n){return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(l,",")).concat(e[0],",").concat(e[1])},"")):""}function lv(t,e,n,r,i){return"circle"===e?sv(t,n,r,i):(e=t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},""),"".concat(e).concat(r?"Z":""))}i(hv,cv=js),hv.prototype.render=function(t,e){var n,r,i,o,a=t.items,s=void 0===a?[]:a,l=t.type,c=t.center,a=t.lineStyle,u=t.alternateColor,h=t.closed,t=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:lv(t.points,l,c,h)}}),f=(n=t,r={style:a},k(e).selectAll(".grid-line").data(n,function(t){return t.id}).join(function(t){return t.append("path").attr("className","grid-line").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){this.attr(t),Qm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Qm(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()}),[]);if(u)for(var d=Array.isArray(u)?u:[u,"transparent"],p=0;p<s.length-1;p++){0===p&&2<s[0].points.length&&(y=lv(s[0].points,l,c),f.push({path:y,fill:d[f.length%2]}));var y=lv(s[p].points,l,c,h),g=lv(s[p+1].points.slice().reverse(),l,c,h,!0),m=void 0,m=h?"".concat(y," ").concat(g):"".concat(y," L").concat(g.slice(1)," Z");f.push({path:m,fill:d[f.length%2]})}i=f,k(e).selectAll(".grid-region").data(i,function(t,e){return e}).join(function(t){return t.append("path").attr("className","grid-region").each(function(t,e){this.attr(t),Qm(this,e,i,null==o?void 0:o.style)})},function(t){return t.each(function(t,e){this.attr(t),Qm(this,e,i,null==o?void 0:o.style)})},function(t){return t.remove()})};var cv,uv=hv;function hv(){return null!==cv&&cv.apply(this,arguments)||this}function fv(t,e){e?D(t,".axis-grid",function(){return new uv({})}).attr("className","axis-grid").call(function(t){return t.node().update(e)}):(t=t.querySelector(".axis-grid"))&&t.remove()}function dv(t,e,n,r){void 0===r&&(r=0);var t=F(t,2),i=F(t[0],2),o=i[0],i=i[1],t=F(t[1],2),a=t[0],t=t[1],e=F([e*(a-o)+o,e*(t-i)+i],2),s=e[0],e=e[1],a=fe([0,0],[Math.abs(a-o),-Math.abs(t-i)]),o=zm(n,-1,1),n=F(ue([0,0],(t=a,!(i=[])?(i[0]=t[1],i[1]=-1*t[0]):(i[0]=-1*t[1],i[1]=t[0]),i),r),2),a=n[0],t=n[1];return[[s,e],[s+p1(o,a),e+p1(o,t)]]}function pv(a,s,t,e,n){var l=(null==n?void 0:n.len)||0,c=t,n=e||{},u=n.formatter,t=n.tickPadding,h=void 0===t?0:t,e=n.offset,f=void 0===e?0:e,t=n.alignTick,d=void 0===t||t,e=n.rotate,p=void 0===e?0:e,y=zm(c,-1,1);return Array.from(a).map(function(t,e){var n=t.value,r=(d||(n=((e===a.length-1?1:null==(r=a[e+1])?void 0:r.value)+n)/2+(i||0)/2),F(dv(s,n,c,l+h),2)),i=F(r[1],2),n=i[0],i=i[1],e=u?u(t,e):t.text,o=Im(c,"center",Dm(c,"end","start"));return p&&(o=Dm(c,"end",Bm(c,"start",d1(p1(y,p),"left",f1(p1(y,p),"right"))))),{id:"label-".concat(t.id),data:t,x:n+Im(c,f,0),y:i+Rm(c,f,0),text:e,textAlign:o,textBaseline:Rm(c,"middle","top"===c?"bottom":"top"),transform:"rotate(".concat(p||0,"deg)")}})}C.registerSymbol("axis-arrow",function(t,e,n){var r=t+2*n;return[["M",t,e],["L",r,e],["L",r-n,e-n],["L",r+n,e],["L",r-n,e+n],["L",r,e]]});var yv=wm({render:function(t,e){var n=t.startPos,r=t.endPos,i=t.verticalFactor,o=t.ticksThreshold,a=t.appendTick,s=t.axisLine,l=t.ticks,l=void 0===l?[]:l,c=t.label,c=void 0===c?{}:c,u=t.tickLine,h=t.subTickLine,f=t.title,t=t.grid,n=[n||[0,0],r||[0,0]],r=F(n,2),d=F(r[0],2),p=d[0],d=d[1],r=F(r[1],2),y=r[0],r=r[1],g=fe([0,0],[y-p,r-d]),g=(void 0===(g=g)&&(g=[0,0]),void 0===(i=i||1)&&(i=1),Math.abs(g[0])>Math.abs(g[1])?1===i?"bottom":"top":-1===i?"left":"right"),i=$m(l,o,a);fv(e,t);av(D(e,".axis-line-group","g").attr("className","axis-line-group").node(),"M".concat(p,",").concat(d," L").concat(y,",").concat(r),n,s);l=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=g,b=(null==u?void 0:u.len)||0;tv(l,Array.from(i).map(function(t){var e=F(dv(m,t.value,v,b),2),n=F(e[0],2),r=n[0],n=n[1],e=F(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),u);var m,v,b,o="axis-subtick-group",a=D(e,".".concat(o),"g").attr("className",o).node();x=i,w=n,k=g,E=null==h?void 0:h.count,M=null==h?void 0:h.len,void 0===E&&(E=0),void 0===M&&(M=0);tv(a,Array.from(x).map(function(a,s){return s===x.length-1?[]:Array(E).fill(null).map(function(t,e){var n=(((null==(n=x[s+1])?void 0:n.value)||1)-a.value)/(E+1),n=a.value+n*(e+1),n=F(dv(w,n,k,M),2),r=F(n[0],2),i=r[0],r=r[1],n=F(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),h,"sub");var x,w,k,E,M,S,O,_,t="axis-label-group",p=D(e,".".concat(t),"g").attr("className",t).node(),d=(iv(p,pv(i,n,g,c,u),c),p.querySelectorAll(".axis-label")),y=p.querySelectorAll(".axis-tick"),r=(Zm(c,g)(d),Km(d,y,null==c?void 0:c.autoHideTickLine),F(l.getBounds().halfExtents,2)),o=r[0],a=r[1],h=F(p.getBounds().halfExtents,2),t=h[0],i=h[1],d=+((null==(u=null==s?void 0:s.style)?void 0:u.lineWidth)||0),c=(y=g,c=2*(o+t)+d,l=2*(a+i)+d,r=f,h=(p=F(p=n,2))[0],p=p[1],s=(h=F(h,2))[0],h=h[1],u=(p=F(p,2))[0],p=p[1],g=Math.min(s,u),o=Math.max(s,u),t=Math.min(h,p),a=Math.max(h,p),i=g,d=t,S=n=0,O="bottom",_="start","left"===y||"right"===y?(n=c+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(d=(h+p)/2),"end"===(null==r?void 0:r.titleAnchor)&&(d=a,O="top"),"left"===y&&(_="end",n*=-1)):(S=l+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(i=(s+u)/2,_="center"),"end"===(null==r?void 0:r.titleAnchor)&&(i=o,_="end"),"top"===y&&(S*=-1),"bottom"===y&&(O="top")),void 0!==(null==r?void 0:r.positionX)&&(i=g+r.positionX,_="start"),void 0!==(null==r?void 0:r.positionY)&&(d=t+r.positionY,O="bottom"),{x:i+n,y:d+S,textAlign:_,textBaseline:O});Jm(e,c.x,c.y,c.textAlign,c.textBaseline,f)}},ba.style),gv=Math.PI,mv=Math.abs,vv=Math.cos,bv=Math.sin,xv=F([2*gv],1)[0];function wv(t,e,n,r,i){void 0===i&&(i=0);var t=F(t,2),o=t[0],t=t[1],n=n*y1,a=e*vv(n),s=e*bv(n),r=zm(r,-1,1);return[[o+a,t+s],[o+(e+p1(r,i))*vv(n),t+(e+p1(r,i))*bv(n)]]}function kv(t){var e;return Rh(t[0],0)?e="center":0<t[0]?e="start":t[0]<0&&(e="end"),e}function Ev(t,f,d,p,y,e,g,m){void 0===m&&(m=0);var v=e,b=zm(v,-1,1),e=g.tickPadding,x=void 0===e?0:e,w=g.formatter,k=g.align,E=g.rotate;return Array.from(t).map(function(t,e){var n,r=(d-f)*t.value+f,i=m+x,o=270<=(o=r)?(o-360)%360:o,a=F(wv(y,p,r,v,i),2),a=F(a[1],2),s=a[0],a=a[1],l=w?w(t,e):t.text,c="center",u="baseline",h=[p1(b,s-y[0]),p1(b,a-y[1])];return"radial"===k?(u="middle",(90<=o||o<-90)&&(o+=180),c=kv(h),Rh(o,-90)&&(c=Fm(v,"start","end")),Rh(o,270)&&(c=Fm(v,"end","start"))):"tangential"===k?(c="center",u="bottom",0<=o&&o<180?(o+=270,e="function"==typeof(null==g?void 0:g.style)?g.style(t,e):null!=(e=null==(e=null==g?void 0:g.style)?void 0:e.fontSize)?e:14,r=F(wv(y,p,r,v,i+e),2),s=(i=F(r[1],2))[0],a=i[1]):o+=90):(o=null!=E?E:0,c=kv(h),Rh((e=h)[1],0)?n="middle":0<e[1]?n="top":e[1]<0&&(n="bottom"),u=n),{id:"label-".concat(t.id),x:s,y:a,text:l,textAlign:c,textBaseline:u,transform:"rotate(".concat((o||0).toFixed(0),"deg)"),data:t}})}var Mv,Sv=wm({render:function(t,e){var n=t.startAngle,n=void 0===n?0:n,r=t.endAngle,r=void 0===r?0:r,i=t.center,o=t.radius,a=t.axisLine,s=t.tickLine,l=t.subTickLine,c=t.label,c=void 0===c?{}:c,u=t.ticks,R=t.title,h=t.grid,f=t.ticksThreshold,d=t.appendTick,t=t.verticalFactor,u=$m(void 0===u?[]:u,f,d),f=-1===t?"inside":"outside",d=(fv(e,h),D(e,".axis-line-group","g").attr("className","axis-line-group").node());t=i,h=o,g=n/180*Math.PI,I=r/180*Math.PI,void 0===h&&(h=0),void 0===g&&(g=0),void 0===I&&(I=0),p=(t=F(t=void 0===t?[0,0]:t,2))[0],t=t[1],C=(j=F([h,h],2))[0],j=j[1],E=(M=F([p+h*vv(g),t+h*bv(g)],2))[0],M=M[1],y=(h=F([p+h*vv(I),t+h*bv(I)],2))[0],h=h[1];av(d,(d=mv(I-g))===xv?"M".concat(p,",").concat(t-j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t+j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t-j):(d=gv<d?1:0,I=I<g?0:1,"M".concat(p,",").concat(t,",L").concat(E,",").concat(M,",A").concat(C,",").concat(j,",0,").concat(d,",").concat(I,",").concat(y,",").concat(h,",L").concat(p,",").concat(t)),void 0,a);var p,y,g=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=r,b=o,x=i,w=f,void 0===(k=null==s?void 0:s.len)&&(k=0);tv(g,Array.from(u).map(function(t){var e=(v-m)*t.value+m,e=F(wv(x,b,e,w,k),2),n=F(e[0],2),r=n[0],n=n[1],e=F(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),s);var m,v,b,x,w,k,E="axis-subtick-group",M=D(e,".".concat(E),"g").attr("className",E).node();S=u,O=n,_=r,P=o,T=i,A=f,L=null==l?void 0:l.count,N=null==l?void 0:l.len,void 0===L&&(L=0),void 0===N&&(N=0);tv(M,Array.from(S).map(function(a,s){return Array(L).fill(null).map(function(t,e){var n=(((null==(n=S[s+1])?void 0:n.value)||1+S[0].value)-a.value)/(L+1),n=a.value+n*(e+1),n=F(wv(T,P,(_-O)*n+O,A,N),2),r=F(n[0],2),i=r[0],r=r[1],n=F(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),l,"sub");var S,O,_,P,T,A,L,N,C="axis-label-group",j=D(e,".".concat(C),"g").attr("className",C).node(),d=(iv(j,Ev(u,n,r,o,i,f,c,null==s?void 0:s.len),c),j.querySelectorAll(".axis-label")),I=j.querySelectorAll(".axis-tick");Zm(c,f)(d),Km(d,I,null==c?void 0:c.autoHideTickLine),Jm(e,i[0],i[1],"center","middle",R)}},C1({startAngle:-90,endAngle:270,center:[0,0],label:{tickPadding:2,style:{},align:"normal"}},ba.style||{})),Ov=(i(_v,Mv=ls),_v.prototype.connectedCallback=function(){this.render(),this.bindEvents()},_v.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),t.disabled&&(this.active=!1,this.disabled=!0),this.render()},_v.prototype.setState=function(t){"disabled"===t?(this.active=!1,this.disabled=!0):this.disabled=!1,this.render()},_v.prototype.render=function(){var t=this.style,e=t.size,e=void 0===e?8:e,n=t.symbol,r=t.markerStyle,t=t.backgroundStyle,i=F(g1(this.style.margin),4),o=i[0],a=i[1],s=i[2],i=i[3],l=F(g1(this.style.padding),4),c=l[0],u=l[1],h=l[2],l=l[3],u=(e-u-l)/2,h=(e-c-h)/2,a=(D(this,".container","rect").attr("className","container").style("x",-(u+l+i)).style("y",-(h+c+o)).style("width",e+a+i).style("height",e+o+s).style("fill","transparent").style("cursor",this.disabled?"not-allowed":"pointer").style("zIndex",1),t||{}),i=a.active,o=a.disabled,s=U(a,["active","disabled"]),t=(D(this,".background","rect").attr("className","background").style("x",-(u+l)).style("y",-(h+c)).style("width",e).style("height",e).call(L,s).call(L,this.active?i:{}).call(L,this.disabled?o:{}),"function"==typeof n?n:_v.getSymbol(n||"")),a=r||{},l=a.active,c=a.disabled,e=U(a,["active","disabled"]);D(this,".marker","path").attr("className","marker").style("x",0).style("y",0).style("path",null==t?void 0:t(0,0,Math.min(u,h))).call(L,e).call(L,this.active?l:{}).call(L,this.disabled?c:{})},_v.prototype.bindEvents=function(){var e=this,n=k(this).select(".marker"),r=k(this).select(".background");k(this).on("pointerup",function(){e.disabled||(e.active=!0)}),k(this).on("pointermove",function(){var t;e.disabled||(e.active=!0,L(n,null==(t=e.style.markerStyle)?void 0:t.active),L(r,null==(t=e.style.backgroundStyle)?void 0:t.active))}),k(this).on("pointerout",function(){e.disabled||(e.active=!1,L(n,af(e.style.markerStyle||{},["active"])),L(r,af(e.style.backgroundStyle||{},["active"])))})},_v.MARKER_SYMBOL_MAP=new Map,_v.registerSymbol=function(t,e){_v.MARKER_SYMBOL_MAP.set(t,e)},_v.getSymbol=function(t){return _v.MARKER_SYMBOL_MAP.get(t)},_v);function _v(t){t=Mv.call(this,t)||this;return t.active=!1,t.disabled=!1,t.disabled=t.style.disabled||!1,t}Ov.registerSymbol("timeline-prev-button",function(t,e,n){return[["M",t+n,e+n],["L",t,e],["L",t+n,e-n],["M",t,e+n],["L",t-n,e],["L",t,e-n]]}),Ov.registerSymbol("timeline-next-button",function(t,e,n){return[["M",t,e+n],["L",t+n,e],["L",t,e-n],["M",t-n,e+n],["L",t,e],["L",t-n,e-n]]}),Ov.registerSymbol("timeline-play-button",function(t,e,n){return[["M",t+2,e+3],["L",t+2,e-3],["M",t-2,e+3],["L",t-2,e-3]]}),Ov.registerSymbol("timeline-stop-button",function(t,e,n){return[["M",t+3,e],["L",t-1.5,e-1.5*Math.sqrt(3)],["L",t-1.5,e+1.5*Math.sqrt(3)],["Z"]]});var r={margin:[2,4],markerStyle:{stroke:"#bfbfbf",active:{stroke:"#3471F9"}},backgroundStyle:{fill:"transparent"}},Pv={x:0,y:0,data:[],width:500,height:40,selection:[0,0],orient:"horizontal",singleModeControl:{width:56,size:12,labelStyle:{text:"单一时间",fontSize:10,dx:4}},speedControl:{width:32,markerSize:4,speeds:[1,2,3,4,5],labelStyle:{fontFamily:"sans-serif",fill:"rgba(0,0,0,0.45)",fontStyle:"normal",fontWeight:500,fontSize:10,textBaseline:"top"},formatter:function(t){return"".concat(t.toFixed(1),"x")}},controlPosition:"bottom",controlButton:{spacing:14,prevBtn:S(S({},r),{symbol:"timeline-prev-btn",padding:0,size:8}),nextBtn:S(S({},r),{symbol:"timeline-next-btn",padding:0,size:8}),playBtn:{margin:4,padding:0,size:20,symbol:"",markerStyle:{stroke:"#bfbfbf",fill:"#bfbfbf",active:{stroke:"#3471F9",fill:"#3471F9"}},backgroundStyle:{stroke:"#bfbfbf",lineWidth:1,fill:"#F7F7F7",active:{fill:"rgba(52, 113, 249, 0.1)",stroke:"#3471F9"}}}},padding:[0,8],playAxis:{appendPadding:[4,0],handleStyle:{r:3,lineWidth:1},label:{position:1,tickPadding:2,tickLine:{len:4,style:{stroke:"rgba(0,0,0,0.25)",lineWidth:1}},style:{fontSize:10,fillOpacity:1,fill:"rgba(0,0,0,0.45)"}},loop:!1},playInterval:2e3,autoPlay:!1},Tv=N({},{x:0,y:0,data:[],length:120,orient:"horizontal",selection:0,selectionStyle:{fill:"#5B8FF9",fillOpacity:.15},loop:!1,playInterval:1e3},Pv.playAxis),Av={axisLine:null,label:{autoRotate:!1,rotate:0,autoHide:!0,autoHideTickLine:!1,autoEllipsis:!0,minLength:50,alignTick:!0}};function Lv(t,e){void 0===t&&(t=[]);var t=F(Array.of(t).flat(),2),n=t[0],n=void 0===n?0:n,t=t[1];return e?[n,n]:[n,void 0===t?n:t]}i(Cv,Nv=ls),Cv.prototype.update=function(t){var e=N({},this.attributes,t=void 0===t?{}:t),t=(t.selection&&(this.selection=Lv(t.selection,e.singleMode)),t.singleMode&&(this.selection=Lv(e.selection,t.singleMode)),this.playTimer);t&&this.stop(),this.attr(e),this.render(),t&&this.play()},Cv.prototype.play=function(){var r=this,t=this.style,e=t.data,i=t.loop,o=t.singleMode,a=t.playMode,s=e.length,t=this.style.playInterval;Mh(t)&&(t=Tv.playInterval),this.playTimer&&clearInterval(this.playTimer),this.playTimer=setInterval(function(){var t,e,n;!i&&r.selection[1]>=s-1?r.stop(!0):o?(t=(r.selection[0]+1)%s,r.setSelection({start:t,end:t})):(t=r.selection[0],n=r.selection[1],e=r.selection[1]-r.selection[0],n=s-1<=n?"increase"===a?t:(t=0,e):("increase"!==a&&(t=(t+1)%s),(n+1)%s),r.setSelection({start:t,end:n}))},t)},Cv.prototype.stop=function(t){clearInterval(this.playTimer),this.playTimer=void 0,t&&this.dispatchEvent(new Ya("timelineStopped",{selection:this.selection}))},Cv.prototype.prev=function(){var t,e=F(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n-1+r)%r:0===n?(t=r-(e-n)-1,r-1):(t=n-1,e-1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},Cv.prototype.next=function(){var t,e=F(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n+1)%r:e===r-1?(t=0,e-n):(t=n+1,e+1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},Cv.prototype.getSelection=function(){return this.selection},Object.defineProperty(Cv.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Cv.prototype.ifH=function(t,e){return"horizontal"===this.orient?"function"==typeof t?t():t:"function"==typeof e?e():e},Cv.prototype.destroy=function(){Nv.prototype.destroy.call(this),this.playTimer&&clearInterval(this.playTimer),this.playTimer=void 0};var Nv,lo=Cv;function Cv(){var t=null!==Nv&&Nv.apply(this,arguments)||this;return t.selection=[0,0],t}function jv(t,e){return new d0({domain:t.map(function(t,e){return e}),range:e,padding:.1})}function Iv(t,e,n){n=jv(n,[0,e]).getStep(),e=0<t?Math.ceil:Math.floor;return 0<n?e(t/n):0}function Rv(t,e,n){return jv(n,[0,e]).map(t)}i(Bv,Fv=lo),Bv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(Bv.prototype,"styles",{get:function(){return N({},Bv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Bv.prototype.setSelection=function(t){var e,n,r=t.start,t=t.end,i=this.styles,o=i.data,o=void 0===o?[]:o,i={duration:i.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},a=this.ifH("cx","cy"),s=k(this).select(".slider-start-handle").node();void 0!==r&&(n=Rv(r,this.style.length,o),this.startHandleAnimation=s.animate([((e={})[a]=s.style[a],e),((s={})[a]=n,s)],i)),void 0!==t&&(e=k(this).select(".slider-end-handle").node(),n=Rv(t,this.style.length,o),this.endHandleAnimation=e.animate([((s={})[a]=e.style[a],s),((o={})[a]=n,o)],i)),this.selection=[null!=r?r:this.selection[0],null!=t?t:this.selection[1]],this.dispatchEvent(new Ya("selectionChanged",{detail:{selection:this.selection}}))},Bv.prototype.render=function(){var e=this,n=this.styles,t=F(this.ifH([n.length,n.size],[n.size,n.length]),2),r=t[0],i=t[1],t=D(this,".slider-background","line").attr("className","slider-background").style("x1",0).style("y1",0).style("x2",this.ifH(r,0)).style("y2",this.ifH(0,i)).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(t=n.backgroundStyle)?void 0:t.fill).style("strokeOpacity",null==(t=n.backgroundStyle)?void 0:t.fillOpacity).node(),o=jv(n.data,[0,1]),a=F(this.selection.map(function(t){return o.map(t)}),2),s=a[0],s=void 0===s?0:s,a=a[1],a=void 0===a?s:a,l=this.ifH(s*r,0),c=this.ifH(a*r,0),s=this.ifH(0,s*i),a=this.ifH(0,a*i),u=(D(t,".slider-selection","line").attr("className","slider-selection").style("x1",l).style("y1",s).style("x2",c).style("y2",a).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(h=n.selectionStyle)?void 0:h.fill).style("strokeOpacity",null==(h=n.selectionStyle)?void 0:h.fillOpacity).style("visibility",n.singleMode?"hidden":"visible").call(L,n.selectionStyle),"running"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.pause(),D(t,".slider-start-handle","circle").attr("className","slider-start-handle").style("cx",l).style("cy",s).call(L,n.handleStyle),"paused"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.play(),"running"===(null==(l=this.endHandleAnimation)?void 0:l.playState)&&this.endHandleAnimation.pause(),D(t,".slider-end-handle","circle").attr("className","slider-end-handle").style("cx",c).style("cy",a).style("visibility",n.singleMode?"hidden":"visible").call(L,n.handleStyle),"paused"===(null==(s=this.endHandleAnimation)?void 0:s.playState)&&this.endHandleAnimation.play(),n.data.map(function(t,e){return{value:o.map(e),text:t.date}})),h=n.label||{},l=h.position,f=void 0===l?-1:l,d=h.tickLine,p=U(h,["position","tickLine"]);D(t,".slider-axis",function(){return new yv({className:"slider-axis"})}).call(function(t){return t.node().update(N({},Av,{startPos:[f*e.ifH(0,r+2),f*e.ifH(i+2,0)],endPos:[e.ifH(r,0)+f*e.ifH(0,r+2),e.ifH(0,i)+f*e.ifH(i+2,0)],ticks:u,verticalFactor:f,tickLine:null===n.label?null:d,label:null===n.label?null:p}))})},Bv.prototype.bindEvents=function(){var t=k(this).select(".slider-background"),r=(this.dragHandle(t,"start"),this.dragHandle(t,"end"),this.dragSelection(t),t.select(".slider-selection").node()),e=t.select(".slider-start-handle").node(),t=t.select(".slider-end-handle").node();e.addEventListener(v.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x1":"y1"]=t)}),t.addEventListener(v.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x2":"y2"]=t)})},Bv.prototype.dragHandle=function(n,o){function t(t){var e,n,r,i;c&&(c=!1,t=Iv(s?l.ifH(t.x-s[0],t.y-s[1]):0,l.style.length,l.style.data),s=void 0,e=(n=F(l.selection,2))[0],n=n[1],r=l.style.data.length-1,"start"===o?e===n&&0<t?(i=Ch(0,e+t,r),l.setSelection({start:i,end:i})):l.setSelection({start:Ch(e+t,0,n)}):e===n&&t<0?(i=Ch(0,n+t,r),l.setSelection({start:i,end:i})):l.setSelection({end:Ch(n+t,e,r)}),l.playTimer)&&l.play()}var a,s,l=this,c=!1;n.on("pointerdown",function(t){l.playTimer&&clearInterval(l.playTimer);var e=n.select(".slider-".concat(o,"-handle")).node();t.target===e&&(c=!0,s=[t.x,t.y],a=[t.x,t.y])}.bind(this)).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e,n,r,i;c&&(e=l.styles.length,n=k(l).select(".slider-".concat(o,"-handle")).node(),r=l.ifH(t.x-a[0],t.y-a[1]),i=n.getLocalPosition(),"vertical"===l.orient?n.style.cy=Ch(i[1]+r,0,e):n.style.cx=Ch(i[0]+r,0,e),a=[t.x,t.y])})},Bv.prototype.dragSelection=function(t){function e(t){l.playTimer&&clearInterval(l.playTimer),t.target===o&&(h=!0,i=[t.x,t.y],s=[t.x,t.y])}function n(t){var e;h&&(h=!1,t=Iv(i?l.ifH(t.x-i[0],t.y-i[1]):0,l.style.length,l.style.data),i=void 0,e=l.selection[1]-l.selection[0],t=Ch(l.selection[1]+t,e,l.style.data.length-1),l.setSelection({start:t-e,end:t}),l.playTimer)&&l.play()}function r(t){var e,n,r,i,o,a;h&&(e=l.styles.length,n=l.ifH(t.x-s[0],t.y-s[1]),r=(a=F(c.getLocalPosition(),2))[0],a=a[1],i=(o=F(u.getLocalPosition(),2))[0],o=o[1],"vertical"===l.orient?(c.style.cy=Ch(a+n,0,e-(o=o-a)),u.style.cy=c.style.cy+o):(a=i-r,c.style.cx=Ch(r+n,0,e),u.style.cx=c.style.cx+a),s=[t.x,t.y])}var s,i,l=this,o=t.select(".slider-selection").node(),c=t.select(".slider-start-handle").node(),u=t.select(".slider-end-handle").node(),h=!1;t.on("mousedown",e.bind(this)).on("touchstart",e.bind(this)).on("mouseup",n.bind(this)).on("mouseupoutside",n.bind(this)).on("touchend",n.bind(this)).on("touchendoutside",n.bind(this)).on("mousemove",r.bind(this)).on("touchmove",r.bind(this))},Bv.defaultOptions={style:N({},Tv,{tag:"slider-axis",size:3,handleStyle:{r:3,stroke:"#8AADF3",strokeOpacity:.75,lineWidth:1,fill:"#fff",fillOpacity:1},backgroundStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{cursor:"grabbing"}})};var Fv,Dv=Bv;function Bv(t){t=Fv.call(this,N({},Bv.defaultOptions,t))||this;return t.startHandleAnimation=null,t.endHandleAnimation=null,t.selection=Lv(t.style.selection,t.style.singleMode),t}function zv(t,e){return new e0({domain:t.map(function(t,e){return e}),range:e,paddingOuter:0,paddingInner:0})}i(Wv,Gv=lo),Wv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(Wv.prototype,"styles",{get:function(){return N({},Wv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Wv.prototype.setSelection=function(t){var e,n=F(this.selection,2),r=n[0],n=n[1];this.selection=Lv([null!=(e=t.start)?e:r,null!=(e=t.end)?e:n],this.style.singleMode),this.dispatchEvent(new Ya("selectionChanged",{detail:{selection:this.selection}})),this.render()},Wv.prototype.render=function(){var i=this,r=this.styles,o=r.size,a=r.spacing,t=F(this.ifH(["x","y","width","height"],["y","x","height","width"]),4),s=t[0],l=t[1],c=t[2],u=t[3],t=D(this,".slider-background","rect").attr("className","slider-background").style("x",0).style("y",0).style(c,r.length).style(u,o+a).call(L,r.backgroundStyle).node(),h=this.getCellScale(),f=h.getBandWidth(),e=r.data.map(function(t,e){var n;return S(((n={})[s]=h.map(e),n[l]=a/2,n[c]=f-r.cellGap,n[u]=o,n),r.cellStyle)}),e=(k(t).selectAll(".cell").data(e).join(function(t){return t.append("rect").attr("className","cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()}),e.filter(function(t,e){var n=F(i.selection,2),r=n[0],n=n[1];return r<=e&&e<=n}).map(function(t){return S(S({},t),r.selectionStyle)})),n={duration:this.style.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},d=(k(t).selectAll(".selected-cell").data(e).join(function(t){return t.append("rect").attr("className","selected-cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.animate([t],n)})},function(t){return t.remove()}),r.length-2*r.spacing+r.cellGap),p=zv(r.data,[0,d]),y=r.data.map(function(t,e){return{value:(p.map(e)+(f-r.cellGap)/2)/d,text:t.date}}),e=r.label||{},g=e.position,m=void 0===g?-1:g,v=e.tickLine,b=U(e,["position","tickLine"]),g=-1===m?-2:r.spacing+o+2,x=[r.spacing,g],w=[a+d,g];"vertical"===this.orient&&(x=[x[1],x[0]],w=[w[1],w[0]]),D(t,".slider-axis",function(){return new yv({className:"slider-axis",style:Av})}).call(function(t){return t.node().update({startPos:x,endPos:w,ticks:y,verticalFactor:m,tickLine:null===r.label?null:v,label:null===r.label?null:b})})},Wv.prototype.bindEvents=function(){this.dragSelection()},Wv.prototype.getCellScale=function(){var t=this.styles.cellGap,e=this.styles.length,n=this.styles.spacing;return zv(this.style.data,[n,e-n+t])},Wv.prototype.dragSelection=function(){function t(){r=!1,i.playTimer&&i.play()}var n,i=this,o=k(this).select(".slider-background"),r=!1,a=this.styles.spacing,s=function(t){var e=F(o.node().getPosition(),2),n=e[0],e=e[1],n=i.ifH(n+4,e+a),e=i.styles.cellGap,r=i.getCellScale().getStep();return Math.floor((t-n+e)/r)};o.on("pointerdown",function(t){i.playTimer&&clearInterval(i.playTimer),r=!0,n=i.ifH(t.x,t.y);t=s(n);i.setSelection({start:t,end:t})}).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e;r&&(t=s(i.ifH(t.x,t.y)),e=(t=F((e=n?s(n):t)<t?[e,t]:[t,e],2))[0],t=t[1],i.setSelection({start:e,end:t}))})},Wv.defaultOptions={style:N({},Tv,{tag:"cell-axis",backgroundStyle:{fill:"#416180",fillOpacity:.05},size:16,spacing:4,cellGap:2,cellStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{fillOpacity:.45},label:{autoHideTickLine:!0}})};var Gv,Hv=Wv;function Wv(t){t=Gv.call(this,N({},Wv.defaultOptions,t))||this;return t.selection=Lv(t.style.selection,t.style.singleMode),t}function Yv(t,e){return[1.43,2.79,4.89,7.57,11.66][t]/11.66*e}var Vv,u=N({},Pv.speedControl,{markerFill:"#8c8c8c",spacing:1,lineStyle:{stroke:"#bfbfbf",lineWidth:1}}),qv=(i(Xv,Vv=ls),Xv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Xv.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(Xv.prototype,"styles",{get:function(){return N({},Xv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Xv.prototype.render=function(){var t=this.styles,e=t.initialSpeed,n=t.markerSize,r=t.markerFill,i=t.lineStyle,o=t.speeds,a=t.labelStyle,s=t.spacing,t=t.formatter,t=void 0===t?function(t){return"".concat(t)}:t,e=o.indexOf(e),l=2*n,c=Yv(e=-1===e?0:e,2*l),u=n*Math.tan(Math.PI/6)*2,r=(D(this,".speed-marker","path").attr("className","speed-marker").style("fill",r).style("path",[["M",0,c-u/2],["L",n,c],["L",0,c+u/2],["Z"]]),n-.5),c=D(this,".line-group","rect").attr("className","line-group").style("x",r).style("y",0).style("width",l).style("height",2*l).style("cursor","pointer").style("fill","transparent").node(),u=o.reduce(function(t,e,n){n=Yv(n,2*l);return t.push(["M",0,n],["L",l,n]),t},[]);D(c,".speed-path","path").attr("className","speed-path").style("path",u).call(L,i),D(this,".speed-label","text").attr("className","speed-label").style("x",r+l+s).style("y",2).style("text",t(o[e])).call(L,a)},Xv.prototype.bindEvents=function(){var e=this,t=this.querySelector(".line-group");t.addEventListener("pointerdown",function(t){return e.onClick(t)}),t.addEventListener("touchmove",function(t){return e.onClick(t)})},Xv.prototype.onClick=function(t){var o,e=this.styles,a=e.speeds,n=e.markerSize,e=e.formatter,e=void 0===e?function(t){return"".concat(t)}:e,s=2*n*2,n=this.querySelector(".line-group"),r=k(this).select(".speed-label").node(),i=k(this).select(".speed-marker").node();t.currentTarget===n&&(o=t.y-n.getBBox().y,-1!==(t=a.findIndex(function(t,e){var n=Yv(e,s),r=Yv(e-1,s),i=Yv(e+1,s);return 0===e?o<n+(Yv(1,s)-n)/2:e===a.length-1?n-(n-r)/2<o:(e=[n-(n-r)/2,n+(i-n)/2])[0]<=o&&o<e[1]})))&&(r.setAttribute("text",e(a[t])),i.setLocalPosition(0,Yv(t,s)-s/8),this.dispatchEvent(new Ya("speedChanged",{detail:{speed:a[t]}})))},Xv.tag="speed-control",Xv.defaultOptions={style:u},Xv);function Xv(t){return Vv.call(this,N({},Xv.defaultOptions,t))||this}i(Kv,Uv=ls),Kv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(Kv.prototype,"styles",{get:function(){return N({},Kv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Kv.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),Mh(t.active)||(this.active=t.active),this.render()},Kv.prototype.render=function(){var t,e=this.styles,n=e.size,r=e.buttonStyle,i=e.labelStyle,e=e.symbol,o=r.active,r=U(r,["active"]),r=D(this,".button","rect").attr("className","button").style("x",0).style("y",0).style("width",n).style("height",n).call(L,r).call(L,this.active?o:{}).node();D(r,".symbol","path").attr("className","symbol").style("x",n/2).style("y",n/2).style("path",[["M",(o=n/2)-(t=r=n/2)/7*4,r-t/14],["L",o-t/7,r+t/7*3],["L",o+t/7*4,r-t/7*3]]).style("lineWidth",1).style("lineCap","round").style("stroke","transparent").style("cursor","pointer").call(L,this.active?null==e?void 0:e.active:{}),D(this,".label","text").attr("className","label").style("x",n).style("y",n/2).call(L,i)},Kv.prototype.bindEvents=function(){var t=this;k(this).select(".button").on("pointerdown",function(){t.dispatchEvent(new Ya("singleModeChanged",{detail:{active:!t.active}}))})},Kv.defaultOptions={style:{size:12,buttonStyle:{fill:"transparent",stroke:"#000",strokeOpacity:.15,cursor:"pointer",lineWidth:1,radius:2,active:{stroke:"#3471F9",fill:"#3471F9",strokeOpacity:1}},symbol:{active:{stroke:"#fff"}},labelStyle:{text:"",textAlign:"left",textBaseline:"middle",fill:"#000",fillOpacity:.65},cursor:"pointer"}};var Uv,$v,Zv=Kv;function Kv(t){t=Uv.call(this,N({},Kv.defaultOptions,t))||this;return t.active=!1,t.active=t.style.active||!1,t}function Jv(t,e,n){var r,i,o,a,s,n=N({},Pv,n),l=n.type,c=n.playAxis,u=n.controlButton,h=n.speedControl,f=n.singleModeControl,d=(null==(d=null==c?void 0:c.label)?void 0:d.position)||-1,p=null!=(p=null==c?void 0:c.spacing)?p:(null==(p=null==(p=Hv.defaultOptions)?void 0:p.style)?void 0:p.spacing)||0,y=(null==c?void 0:c.size)||("cell"===l?null==(y=null==(y=Hv.defaultOptions)?void 0:y.style)?void 0:y.size:null==(y=null==(y=Dv.defaultOptions)?void 0:y.style)?void 0:y.size)||4,p=(y+="cell"===l?p:0,F(g1(null==c?void 0:c.appendPadding),4)),g=p[0],m=p[1],v=p[2],p=p[3],b=(null==u?void 0:u.spacing)||0,x=Hh(u)||Hh(null==u?void 0:u.playBtn)?0:null==(x=null==u?void 0:u.playBtn)?void 0:x.size,w=Hh(u)||Hh(null==u?void 0:u.prevBtn)?0:null==(w=null==u?void 0:u.prevBtn)?void 0:w.size,u=Hh(u)||Hh(null==u?void 0:u.nextBtn)?0:null==(u=null==u?void 0:u.nextBtn)?void 0:u.size,k=x/2+w/2+b,E=x/2+u/2+b,M=null===h?0:null==h?void 0:h.markerSize,S=2*M,h=null===h?0:null==h?void 0:h.width,O=2*S+M/2,_=null===f?0:null==f?void 0:f.width,f=null===f?0:(null==f?void 0:f.size)+2;return"vertical"===n.orient?{axis:{x:(n=p+(-1===d?30:0))+("cell"===l?0:y/2),y:i=(r=w+b+x/2)+x/2+b+g,length:(o=(s=(a=e-f)-4-O)-b-u/2)-b-u/2-v-i},prevBtn:{x:i=n+y/2,y:w/2,size:w},playBtn:{x:i,y:r,size:x},nextBtn:{x:i,y:o,size:u},speedControl:{x:n-h/2,y:s,size:h},singleModeControl:{x:0,y:a}}:(i=(r=e-_)-8-h,o=c,s=(o=N({},Pv.playAxis,o).label)?((null==(n=o.tickLine)?void 0:n.len)||0)+(o.tickPadding||0)+(Number(o.style.fontSize)||0)+2:0,a=(-1===d?s:0)+("cell"===l?0:y/2)+g,"bottom"===t?{axis:{x:p,y:a,length:e-(p+m)},playBtn:{x:_=e/2,y:c=a+(1===d?s:0)+y+x/2+v,size:x},prevBtn:{x:_-k,y:c,size:w},nextBtn:{x:_+E,y:c,size:u},speedControl:{x:i,y:n=a+(1===d?s:0)+y+v,size:h},singleModeControl:{x:r,y:n+S-f/2}}:(g="cell"===l?a+y/2:a,e="cell"===l&&-1===d?s+y-O:1===d?a+M/2:a-O,"left"===t?{axis:{x:n=(v=(c=(_=w/2)+k)+E)+u/2+p,y:a,length:i-m-n},prevBtn:{x:_,y:g,size:w},playBtn:{x:c,y:g,size:x},nextBtn:{x:v,y:g,size:u},speedControl:{x:i,y:e,size:h},singleModeControl:{x:r,y:e+S-f/2}}:{axis:{x:p,y:a,length:(y=(s=(l=i-(u/2+b))-E)-k)-w/2-m-p},playBtn:{x:s,y:g,size:x},prevBtn:{x:y,y:g,size:w},nextBtn:{x:l,y:g,size:u},speedControl:{x:i,y:e,size:h},singleModeControl:{x:r,y:e+S-f/2}}))}function Qv(t){t=$v.call(this,N({},{style:Pv},t))||this;return t.speed=1,t.singleMode=!1,t.playing=!1,t.selection=[0,0],t.singleMode=t.style.singleMode||!1,t.selection=Lv(t.style.selection,t.singleMode),t}function tb(t){var e,n={left:0,top:0,width:0,height:0};return"html"===(null==t?void 0:t.tagName)?n={left:0,top:0,width:(e=t.style).width,height:e.height}:t&&(t=(e=t.getLocalBounds()).min,e=e.halfExtents,n={left:t[0],top:t[1],width:2*e[0],height:2*e[1]}),{left:0,top:0,right:n.width,bottom:n.height}}function eb(t,n){var r,e,i,o;return n?(r=n.useHTML,e=n.style,i="legend-title ".concat(r?"html":"text","-title"),o="<span>".concat((null==n?void 0:n.content)||"","</span>"),D(t,".".concat(i),function(){return r?new ms({className:i,style:{innerHTML:o}}):new As({className:i,style:e})}).call(function(t){var e;r?t.style("width",null!=(e=n.width)?e:80).style("height",null!=(e=n.height)?e:20).style("innerHTML",o):t.style("fontSize",12).style("textBaseline","top").style("text",n.content||"")}).call(L,e).node()):((t=t.querySelector(".legend-title"))&&t.remove(),null)}function nb(t,e,n,r){return D(t,".".concat(e),"g").attr("className",e).style("x",n).style("y",r).node()}function rb(t,e,n,r,i){D(t,".".concat(e),"rect").attr("className",e).style("zIndex",-1).style("width",n).style("height",r).call(L,i||{}).node()}i(Qv,$v=ls),Qv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Qv.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),void 0!==t.singleMode&&(this.singleMode=t.singleMode),t.selection&&(this.selection=Lv(t.selection,this.singleMode)),this.render()},Object.defineProperty(Qv.prototype,"styles",{get:function(){return N({},Pv,this.attributes)},enumerable:!1,configurable:!0}),Qv.prototype.render=function(){var e=this,t=this.styles,n=t.width,r=t.height,i=t.controlPosition,o=t.speedControl,a=t.singleModeControl,t=F(g1(this.styles.padding),4),s=t[0],s=void 0===s?0:s,l=t[1],l=void 0===l?0:l,c=t[2],t=t[3],t=void 0===t?l:t,u=D(this,".container","g").attr("className","container").style("x",t).style("y",s).node(),h=Jv(i,"vertical"===this.style.orient?r-(s+c):n-(t+l),this.styles);this.renderAxis(u,h),this.renderControlButton(u,h),D(u,".timeline-speed-control",function(){return new qv({})}).attr("className","timeline-speed-control").call(function(t){null===o?t.remove():t.node().update(S(S({x:h.speedControl.x,y:h.speedControl.y},o),{initialSpeed:e.speed}))}),D(u,".timeline-single-control",function(){return new Zv({})}).attr("className","timeline-single-control").call(function(t){null===a?t.remove():t.node().update(S(S({x:h.singleModeControl.x,y:h.singleModeControl.y},a),{active:e.singleMode}))})},Qv.prototype.renderAxis=function(t,e){var n=this,r=this.styles.data,i=this.styles.type||"slider",o=k(t).select(".timeline-axis").node(),a="cell"===i?Hv:Dv;o&&o.style.tag!=="".concat(i,"-axis")&&(o.remove(),this.removeChild(o)),D(t,".timeline-axis",function(){return new a({})}).attr("className","timeline-axis").call(function(t){t.node().update(S({x:e.axis.x,y:e.axis.y,length:e.axis.length,data:r,selection:n.selection,orient:n.style.orient,playInterval:n.style.playInterval/n.speed,singleMode:n.singleMode},n.style.playAxis||{})),t.node().update({handleStyle:{cursor:"vertical"===n.style.orient?"ns-resize":"ew-resize"}})}).node()},Qv.prototype.renderControlButton=function(t,n){var e,r=this,i=n.playBtn.size||0,o=n.prevBtn.size||0,a=(null==(e=n.nextBtn)?void 0:e.size)||0;D(t,".timeline-prev-btn",function(){return new Ov({})}).attr("className","timeline-prev-btn").call(function(t){var e;o?(t.node().update(S(S({},(null==(e=r.style.controlButton)?void 0:e.prevBtn)||{}),{x:n.prevBtn.x,y:n.prevBtn.y,size:o,symbol:"timeline-prev-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),D(t,".timeline-play-btn",function(){return new Ov({})}).attr("className","timeline-play-btn").call(function(t){var e;i?(t.node().update({backgroundStyle:{radius:(n.playBtn.size||0)/2}}),t.node().update(S(S({},(null==(e=r.style.controlButton)?void 0:e.playBtn)||{}),{x:n.playBtn.x,y:n.playBtn.y,size:i,symbol:r.playing?"timeline-play-button":"timeline-stop-button"}))):t.remove()}),D(t,".timeline-next-btn",function(){return new Ov({})}).attr("className","timeline-next-btn").call(function(t){var e;a?(t.node().update(S(S({},(null==(e=r.style.controlButton)?void 0:e.nextBtn)||{}),{x:n.nextBtn.x,y:n.nextBtn.y,size:a,symbol:"timeline-next-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),this.style.autoPlay&&!this.playing&&(this.playing=!0,k(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.play()}),k(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-play-button"})})),!this.style.autoPlay&&this.playing&&(this.playing=!1,k(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.stop()}),k(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-stop-button"})}))};var po={style:{x:0,y:0,padding:0,orient:"horizontal",backgroundStyle:{fill:"transparent",lineWidth:0},title:{content:"",spacing:4,align:"left",style:{fontWeight:"bold",fontFamily:"sans-serif",fontSize:12,textAlign:"top",textBaseline:"top",fill:"#2C3542"}},label:{style:{fill:"#2C3542",fillOpacity:.65,fontSize:12}}}},ib={symbol:"circle",size:8},ob={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},ab={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},sb=N({},po,{style:{type:"category",items:[],maxWidth:void 0,maxHeight:void 0,maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!(Qv.prototype.bindEvents=function(){var e=this,n=k(this).select(".timeline-axis").node(),r=k(this).select(".timeline-play-btn").node();r&&k(r).on("pointerdown",function(t){e.playing?(e.playing=!1,n.stop(),r.update({symbol:"timeline-stop-button"})):(e.playing=!0,n.play(),r.update({symbol:"timeline-play-button"}))}),k(this).on("timelineStopped",function(){e.playing=!1,null!=r&&r.update({symbol:"timeline-stop-button"})}),k(this).on("speedChanged",function(t){e.speed=t.detail.speed,n.update({playInterval:e.style.playInterval/e.speed})}),k(this).select(".timeline-prev-btn").on("pointerdown",function(){return n.prev()}),k(this).select(".timeline-next-btn").on("pointerdown",function(){return n.next()}),k(this).on("singleModeChanged",function(t){e.singleMode=t.detail.active,e.selection=Lv(e.selection,e.singleMode),e.render()}),k(this).on("selectionChanged",function(t){e.selection=t.detail.selection})}),pageNavigator:{loop:!1}}}),lb={width:100,height:20,type:"color",chunked:!1,ticks:[],isGradient:"auto",backgroundColor:"#c5c5c5"},cb={spacing:4,formatter:function(t){return String(t)},align:"rail",flush:!0,maxLength:30},ub={size:25,stroke:"#c5c5c5",fill:"#fff",lineWidth:1},hb=N({},po,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],label:cb,rail:lb,slidable:!0,indicator:{size:8,spacing:10,padding:5,backgroundStyle:{fill:"#262626","background-color":"#262626","border-radius":"5px"},text:{style:{color:"white","font-size":"12px"}}}}}),fb="legend-item-";function db(t,e){t&&(t.setAttribute("tip",t.style.text),null!=t)&&t.attr("text",e||"")}function pb(n,t){return void 0===n&&(n={}),(t=void 0===t?"":t).split("-").reduce(function(t,e){return S(S({},t),rf(n,e,{}))},{})}i(mb,yb=js),mb.prototype.setState=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n=new Set((this.state||"").split("-"));e?n.add(t):n.delete(t),this.state=ve([],F(n),!1).join("-"),this.update()},mb.prototype.getState=function(){return this.state},mb.prototype.update=function(t){yb.prototype.update.call(this,t=void 0===t?{}:t),t.state&&(this.state=t.state)},Object.defineProperty(mb.prototype,"styles",{get:function(){return N({},mb.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),mb.prototype.render=function(t,e){var n,r,i,o,a,s,l=this,c=this.styles,u=c.backgroundStyle,h=c.itemMarker,f=c.padding,d=c.itemName,p=c.itemValue,c=c.maxItemWidth,y=this.styles.itemHeight,f=F(g1(f),4),g=f[0],m=f[1],v=f[2],f=f[3],b=Number((null==h?void 0:h.size)||0),x=(Mh(y)&&(y=Math.max.call(null,b,Number((null==(x=null==d?void 0:d.style)?void 0:x.fontSize)||0),Number((null==(x=null==p?void 0:p.style)?void 0:x.fontSize)||0))+(g+v)),D(this,".".concat(fb,"container"),"g").attr("className","".concat(fb,"container")).style("x",f).style("y",y/2).node()),w=(D(x,".".concat(fb,"marker"),function(){return new C({})}).attr("className","".concat(fb,"marker")).call(function(t){h?t.node().update(S(S({x:b/2,y:0,size:b,symbol:h.symbol},h.style||{}),pb(h.style,l.state))):t.remove()}),b?b+((null==d?void 0:d.spacing)||0):0),g=D(x,".".concat(fb,"name"),"text").attr("className","".concat(fb,"name")).call(function(t){d?t.node().attr(S(S({x:w,y:0,tip:"",text:(null==d?void 0:d.content)||"",textBaseline:"middle",textAlign:"left"},d.style||{}),pb(d.style,l.state))):t.remove()}).node(),k=w,v=(g&&!g.destroyed&&(k=g.getLocalBounds().max[0]),D(x,".".concat(fb,"value"),"text").attr("className","".concat(fb,"value")).call(function(t){p?t.node().attr(S(S(S({x:k+(p.spacing||0),y:0,tip:"",text:(null==p?void 0:p.content)||"",textAlign:"left"},p.style||{}),pb(p.style,l.state)),{textBaseline:"middle"})):t.remove()}).node()),E=(Mh(c)||(g=null!=g&&g.destroyed?null:g,v=null!=v&&v.destroyed?null:v,n=c-w-(f+m),(g||v)&&"number"==typeof n&&(Number(n)<=0?(db(g,""),db(v,"")):g&&v?(a=g.getLocalBounds(),i=v.getLocalBounds(),n<(r=2*a.halfExtents[0])+(E=2*i.halfExtents[0])+(i=r&&E?i.min[0]-a.max[0]:0)&&(o=(a=F([.5*n,.5*n],2))[0],a=a[1],s=M=!0,r<=o?(a=n-(r+i),M=!1):E<=a&&(o=n-(E+i),s=!1),M&&(db(g,i1(g.style.text,o,s1(g))),v.attr("x",Number(g.style.x)+o+i)),s)&&db(v,i1(v.style.text,a,s1(v)))):n<2*(r=g||v).getLocalBounds().halfExtents[0]&&db(r,i1(r.style.text,n,s1(r))))),x.getLocalBounds()),M=Math.max(2*E.halfExtents[0]+m+f,this.styles.itemWidth||0);Mh(c)||(M=Math.min(c,M)),D(this,".".concat(fb,"background"),"rect").attr("className","".concat(fb,"background")).style("x",E.min[0]-f).style("y",0).style("width",M).style("height",y).style("zIndex",-1).call(L,u).call(L,pb(u,this.state))},mb.defaultOptions={style:{id:"",value:{},itemMarker:{size:8,symbol:"circle",style:{fill:"#d3d2d3",fillOpacity:1,lineWidth:0,active:{cursor:"pointer"}}},itemName:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",fontSize:12,opacity:1,active:{cursor:"pointer"}}},itemValue:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",opacity:1,fontSize:12,active:{cursor:"pointer"}}}}};var yb,gb=mb;function mb(t){t=yb.call(this,N({},mb.defaultOptions,t))||this;return t.state="default",t.state=t.style.state||"selected",t}function vb(t,o,a){void 0===a&&(a=0);var s=0,l=0,c=0;return t.reduce(function(t,e){var n=F(e.getLocalBounds().halfExtents,2),r=n[0],n=n[1],i="horizontal"===o?[t,0]:[0,t];return e.setLocalPosition(i[0],i[1]),l=Math.max(l,2*n),c=Math.max(c,2*r),(s="horizontal"===o?t+2*r:t+2*n)+a},0),{totalSize:s,maxItemWidth:c,maxItemHeight:l}}Ov.registerSymbol("left",function(t,e,n){return[["M",t-n*Math.sin(Math.PI/3),e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),Ov.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n*Math.sin(Math.PI/3),e],["L",t-n,e+n],["Z"]]}),Ov.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n*Math.sin(Math.PI/3)],["L",t+n,e+n],["Z"]]}),Ov.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n*Math.sin(Math.PI/3)],["Z"]]});i(wb,bb=ls),wb.prototype.connectedCallback=function(){this.container=this.appendChild(new ys),this.clipView=new T({style:{path:[]}}),this.container.appendChild(this.clipView),this.render(),this.bindEvents()},wb.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(wb.prototype,"styles",{get:function(){return N({},wb.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),wb.prototype.render=function(){this.renderButtonGroup();var t=this.style.items,t=void 0===t?[]:t;this.items=k(this.container).selectAll(".legend-item").data(t||[],function(t,e){return t.id||e}).join(function(t){return t.append(function(t){return new gb({id:t.id,className:"legend-item",style:t})})},function(t){return t.each(function(t){this.update(t)})},function(t){return t.remove()}).nodes(),this.adjustLayout()},wb.prototype.bindEvents=function(){this.prevButton.addEventListener("pointerdown",this.prev.bind(this)),this.nextButton.addEventListener("pointerdown",this.next.bind(this))},wb.prototype.ifHorizontal=function(t,e){return"vertical"===this.style.orient?"function"==typeof e?e():e:"function"==typeof t?t():t},wb.prototype.renderButtonGroup=function(){var t=this.styles,e=t.pageButtonStyle,n=void 0===e?{}:e,e=t.pageTextStyle,t=D(this,".page-button-group",function(){return new ys({className:"page-button-group"})}).node(),r="page-prev-button",i="page-next-button";this.prevButton=D(t,"#".concat(r),function(){return new Ov({})}).attr("id",r).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),D(t,".page-info","text").attr("className","page-info").call(L,e),this.nextButton=D(t,"#".concat(i),function(){return new Ov({})}).attr("id",i).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),this.updatePageButtonSymbol()},Object.defineProperty(wb.prototype,"pageInfoBounds",{get:function(){var t,e,n,r,i=this.querySelector(".page-info");return i?(r=(t=this.styles).pageFormatter,t=t.pageInfoSpacing,e=i.style.visibility,i.style.visibility="hidden",i.style.text=r(1,this.styles.items.length),n=(r=F(i.getLocalBounds().halfExtents,2))[0],r=r[1],i.style.visibility=e,{width:2*(n+t),height:2*(r+t)}):{width:0,height:0}},enumerable:!1,configurable:!0}),wb.prototype.layoutButton=function(t){var e,n=this.style.pageInfoSpacing,r=this.pageInfoBounds.height,n=this.pageInfoBounds.width+2*(void 0===n?0:n),i=F(this.querySelector(".page-button-group").childNodes,3),o=i[0],a=i[1],i=i[2];"horizontal"===t?(t=2*o.getLocalBounds().halfExtents[0],e=2*i.getLocalBounds().halfExtents[0],o.style.x=t/2,i.style.x=t+n+e/2,a.style.x=(Number(o.style.x)+Number(i.style.x))/2,o.style.y=0,i.style.y=0,a.style.y=0):(t=2*o.getLocalBounds().halfExtents[1],n=2*i.getLocalBounds().halfExtents[1],o.style.y=-(r+t)/2,i.style.y=(r+n)/2,a.style.y=0,e=this.pageInfoBounds.width/2,o.style.x=e,i.style.x=e,a.style.x=e)},wb.prototype.showButtonGroup=function(){this.querySelector(".page-button-group").style.visibility="visible"},wb.prototype.resetPageCfg=function(){this.querySelector(".page-button-group").style.visibility="hidden",this.container.style.clipPath=null,this.currPage=void 0,this.maxPages=void 0,this.pageOffsets=[],this.container.style.transform="translate(0,0)",this.clipView&&(this.clipView.style.transform="translate(0,0)")},wb.prototype.adjustLayout=function(){var t,e,n,r;this.resetPageCfg(),this.items.length<=1||(t=(n=F(g1(this.style.spacing),2))[0],n=n[1],t=this.ifHorizontal(t,n),t=(n=vb(this.items,this.style.orient||"horizontal",t)).totalSize,e=n.maxItemWidth,n=n.maxItemHeight,r=this.ifHorizontal(this.style.maxWidth,this.style.maxHeight),!Mh(r)&&r!==1/0&&r<t&&(this.style.autoWrap&&"vertical"!==this.style.orient?(this.layoutButton("vertical"),this.adjustHorizontalWrap(e,n,r)):(this.layoutButton("horizontal"),this.adjustFlip(e,n,r))))},wb.prototype.adjustFlip=function(t,e,n){this.showButtonGroup();var r=this.querySelector(".page-button-group"),i=this.style.pageSpacing,o=this.prevButton.style.size||wb.defaultOptions.style.pageButtonSize,a=r.getLocalBounds(),s=2*a.halfExtents[0],a=2*a.halfExtents[1],e=F(this.ifHorizontal([n-(s+i),e],[t,n-(a+i)]),2),l=e[0],c=e[1];this.clipView.style.path="M-1,0 L".concat(l,",0 L").concat(l,",").concat(c," L-1,").concat(c," Z"),this.container.style.clipPath=this.clipView,r.style.x=this.ifHorizontal(n-s,0),r.style.y=this.ifHorizontal(c/2-1,c+o+i);for(var u="x"===this.ifHorizontal("x","y")?0:1,h=[0],f=1,d=0;d<this.items.length;d++){var p=this.items[d].getLocalBounds(),y=p.min;p.max[u]-function(t){if(xh(t))return t[t.length-1]}(h)>this.ifHorizontal(l,c)+4&&(0!==y[u]&&h.push(y[u]),f+=1)}this.maxPages=f,this.currPage=1,this.pageOffsets=h,this.updatePageNavigatorState()},wb.prototype.adjustHorizontalWrap=function(t,c,e){this.showButtonGroup();var n,r=this.querySelector(".page-button-group"),i=this.style,o=i.pageSpacing,o=void 0===o?0:o,a=i.cols,i=this.pageInfoBounds.width,u=this.style.maxRows||2,s=r.getLocalBounds(),s=Math.max(2*s.halfExtents[0],i),i=e-(s+o),l=c*u;function h(t,e){for(var n=1,r=0,i=[0],o=0;o<e.length;o++){var a=e[o],s=a.getLocalBounds(),l=s.min;s.max[0]-r>t&&(n+=1,r=l[0],n%u==1)&&i.push((n-1)*c),a.setLocalPosition(l[0]-r,(n-1)*c)}return i}a&&u&&(a*u<=this.items.length&&(i=e),n=e/a),this.clipView.style.path="M-1,0 L".concat(i,",0 L").concat(i,",").concat(l," L-1,").concat(l," Z"),this.container.style.clipPath=this.clipView;var f=[];if(a&&n)for(var d=F(g1(this.style.spacing),1)[0],p=0,y=0,g=0;g<this.items.length;g+=a){y=0,(p+=1)%u==1&&f.push(Math.floor(p/u)*l);for(var m=0;m<a&&g+m<this.items.length;m++)this.items[g+m].update({x:y,y:(p-1)*c,maxItemWidth:n-d}),y+=n}else 1===(f=h(i,this.items)).length&&(d=(o=F(g1(this.style.spacing),2))[0],i=o[1],y=this.ifHorizontal(d,i),vb(this.items,this.style.orient||"horizontal",y),h(e,this.items));this.maxPages=f.length,this.currPage=1,this.pageOffsets=f,this.maxPages<=1?this.resetPageCfg():(r.style.x=e-s,r.style.y=l/2-2,this.updatePageNavigatorState())},wb.prototype.updatePageNavigatorState=function(){this.updatePageInfo(),this.currPage===this.maxPages?this.nextButton.setState("disabled"):this.nextButton.setState("default"),1===this.currPage?this.prevButton.setState("disabled"):this.prevButton.setState("default")},wb.prototype.updatePageButtonSymbol=function(){var t=this.style.autoWrap,t=this.ifHorizontal(t?1:0,1);this.prevButton.update({symbol:["left","up"][t]}),this.nextButton.update({symbol:["right","down"][t]})},wb.prototype.updatePageInfo=function(){var t=this.styles.pageFormatter;k(this).select(".page-info").style("text",this.currPage&&this.maxPages?t(this.currPage,this.maxPages):"")},wb.prototype.finished=function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},wb.prototype.prev=function(){var t,e;this.maxPages&&this.currPage&&(t=this.style.loop,(e=this.currPage-1)<1&&(e=t?this.maxPages:1),this.goTo(e))},wb.prototype.next=function(){var t,e,n;this.maxPages&&this.currPage&&(t=this.style.loop,e=this.maxPages,n=this.currPage+1,this.goTo(n=e<n?t?1:e:n))},wb.prototype.goTo=function(t){var e,n,r,i,o=this;t!==this.currPage&&"idle"===this.playState&&(e=(i=this.style).effect,n=i.duration,i=i.autoWrap,r=(i=F(this.ifHorizontal(i?[0,-this.pageOffsets[t-1]]:[-this.pageOffsets[t-1],0],[0,-this.pageOffsets[t-1]]),2))[0],i=i[1],this.playState="running",this.clipView.animate([{transform:this.clipView.style.transform},{transform:"translate(".concat(-r,"px,").concat(-i,"px)")}],{duration:n,easing:e,fill:"both"}),this.container.animate([{transform:this.container.style.transform},{transform:"translate(".concat(r,"px,").concat(i,"px)")}],{duration:n,easing:e,fill:"both"}),Promise.all(this.clipView.getAnimations().map(function(t){return t.finished})).then(function(){o.currPage=t,o.updatePageNavigatorState(),o.resolveFinishedPromise(),o.playState="idle"}),this.finished())},wb.defaultOptions={style:{spacing:[4,0],effect:"easeQuadInOut",duration:320,maxRows:2,maxCols:2,pageButtonSize:10,pageInfoSpacing:2,pageFormatter:function(t,e){return"".concat(t,"/").concat(e)},pageButtonStyle:{size:10,margin:0,padding:0,markerStyle:{fill:"black",cursor:"pointer",disabled:{fill:"#d9d9d9",cursor:"not-allowed"}},backgroundStyle:{cursor:"pointer",fill:"transparent",disabled:{cursor:"not-allowed"}}},pageTextStyle:{fontSize:12,textBaseline:"middle",textAlign:"center"}}};var bb,xb=wb;function wb(t){t=bb.call(this,N({},wb.defaultOptions,t))||this;return t.items=[],t.maxPages=void 0,t.currPage=void 0,t.pageOffsets=[],t.playState="idle",t}function kb(t){var e=t.items,i=t.maxWidth,o=t.maxItemWidth,a=t.itemMarker,s=t.itemName,l=t.itemValue,n=t.reverse,c=t.itemWidth,u=t.itemHeight,h=t.itemPadding,f=t.itemBackgroundStyle,d=e.slice();return n&&d.reverse(),d.map(function(t,e){return{id:t.id||"legend-item-".concat(e),state:t.state||"default",value:t,maxItemWidth:Ah([null!=o?o:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE]),itemMarker:(r=Eh(a)?a(t,e,d):a,N({},ib,{symbol:t.marker,style:{fill:t.color,stroke:t.color}},r)),itemName:(r=N({},{formatter:function(){return t.name}},s),n=r.formatter,r=U(r,["formatter"]),N({},ob,{content:n(t,e,d)},r)),itemValue:(n=N({},{formatter:function(){return t.value}},l),r=n.formatter,n=U(n,["formatter"]),N({},ab,{content:r(t,e,d)},n)),itemWidth:c,itemHeight:u,padding:h,backgroundStyle:f};var n,r})}i(Sb,Eb=js),Sb.prototype.render=function(e,t){var n=e.padding,r=e.title,i=e.inset,o=e.orient,a=void 0===o?"horizontal":o,s=e.spacing,l=e.autoWrap,c=e.maxRows,u=e.maxWidth,h=e.maxHeight,f=e.cols,d=e.pageNavigator,o=e.backgroundStyle,o=void 0===o?{}:o,n=F(g1(n),4),p=n[0],y=n[1],g=n[2],n=n[3],m=nb(t,"legend-container",n,p),v=eb(m,r),r=(null==r?void 0:r.spacing)||0,i=F(g1(i),4),b=i[0],i=i[3],v=tb(v),i=(D(nb(m,"legend-inner-group",v.left+i,v.bottom+b+r),".category-items",function(){return new xb({})}).attr("className","category-items").call(function(t){t.node().update(S({orient:a,items:kb(e),spacing:s,autoWrap:l,maxRows:c,maxWidth:u,maxHeight:h,cols:f},d||{}))}).node(),m.getLocalBounds()),v=i.min,b=i.max,r=b[0]-v[0],m=b[1]-v[1];rb(t,"legend-background",Math.min(r+y+n,u||Number.MAX_VALUE),Math.min(m+p+g,h||Number.MAX_VALUE),o)},Sb.prototype.getItem=function(t){return this.querySelector("[id=".concat(t,"]"))},Sb.prototype.setItemState=function(t,e,n){void 0===n&&(n=!0),null!=(t=this.getItem(t))&&t.setState(e,n)},Sb.prototype.getItemsStates=function(){return this.querySelectorAll(".legend-item").map(function(t){return{id:t.id,state:t.getState()}})};var Eb,Mb=Sb;function Sb(t){return Eb.call(this,N({},sb,t))||this}function Ob(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}C.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),C.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=t+.4*r;return[["M",t,e],["L",o,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",o,e-i],["Z"],["M",o,e+(n=n/6)],["L",t+r-2,e+n],["M",o,e-n],["L",t+r-2,e-n]]}),C.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=e+.4*r;return[["M",t,e],["L",t-i,o],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,o],["Z"],["M",t-(n=n/6),o],["L",t-n,e+r-2],["M",t+n,o],["L",t+n,e+r-2]]});i(Tb,_b=ls),Tb.prototype.connectedCallback=function(){this.draw()},Tb.prototype.attributeChangedCallback=function(){this.draw()},Tb.prototype.draw=function(){this.updateBackground(),this.updateTrack()},Tb.prototype.updateBackground=function(){var t=this.style.backgroundColor;this.path.style.path=this.getRailPath(),this.path.attr({fill:t,fillOpacity:.45})},Tb.prototype.updateTrack=function(){var t=this.style.fill,e=(this.track.style.path=this.getRailPath(),this.getClipPath());(this.track.style.clipPath=e)&&this.track.appendChild(e),this.track.style.fill=t},Object.defineProperty(Tb.prototype,"box",{get:function(){var t=this.style,e=t.orient,n=t.size,t=t.length;return Ob(e,[t,n],[n,t])},enumerable:!1,configurable:!0}),Tb.prototype.getRailPath=function(){var t=this.style.type,e=F(this.box,2),n=e[0],e=e[1];return"size"===t?[["M",0,e],["L",0+n,0],["L",0+n,e]]:[["M",0,e],["L",0,0],["L",0+n,0],["L",0+n,e]]},Tb.prototype.getClipPath=function(){var t,e,n,r,i=this.style,o=i.orient,i=i.selection;return i?(r=(t=F(this.box,2))[0],t=t[1],n=(i=F(i,2))[0],i=i[1],e=Ob(o,n*r,0),n=Ob(o,0,n*t),r=Ob(o,i*r,r),o=Ob(o,t,i*t),new T({style:{path:[["M",e,n],["L",e,o],["L",r,o],["L",r,n]]}})):null};var _b,Pb=Tb;function Tb(t){t=_b.call(this,C1({},{style:lb},t=void 0===t?{}:t))||this;return t.path=t.appendChild(new T({className:"rail-path"})),t.track=t.appendChild(new T({className:"rail-path"})),t}i(Nb,Ab=js),Nb.prototype.render=function(t,e){var n=t.textStyle,r=t.visibility,i=t.symbol,o=t.size,a=t.fill,s=t.stroke,l=t.lineWidth;i&&"hidden"!==r?(D(e,".handle",function(){return new C({})}).attr("className","handle").call(function(t){t.node().update({symbol:i,size:o,fill:a,stroke:s,lineWidth:l})}),D(e,".handle-text","text").attr("className","handle-text").call(L,n)):(null!=(t=e.querySelector(".handle"))&&t.remove(),null!=(r=e.querySelector(".handle-text"))&&r.remove())};var Ab,Lb=Nb;function Nb(){return null!==Ab&&Ab.apply(this,arguments)||this}i(Ib,Cb=ls),Ib.prototype.connectedCallback=function(){this.init(),this.bindEvents()},Ib.prototype.attributeChangedCallback=function(t,e,n){"textStyle"!==t&&"padding"!==t&&"position"!==t||this.init()},Ib.prototype.hide=function(){this.style.visibility="hidden"},Ib.prototype.show=function(){this.style.visibility="visible"},Ib.prototype.init=function(){var t=this.style,e=t.textStyle;"top"===t.position?this.text.attr(S({textAlign:"center"},e)):this.text.attr(S({textAlign:"left"},e))},Ib.prototype.updateBackground=function(){var t,e,n=this.text.getLocalBounds(),r=n.min,n=n.max,i=Math.min(n[0]-r[0],40),r=[r[0]-4,r[1]-2,r[0]+i+4,n[1]+2],o=(i=this.style.position,r=(n=F(n=r,4))[0],e=n[1],o=n[2],n=n[3],"top"===i?[["M",r,n],["L",r,e],["L",o,e],["L",o,n],["L",r+(i=o-r)/2+(t=Ch(10,i/3,i/2))/2,n],["L",r+i/2,n+4],["L",r+i/2-t/2,n],["L",r,n]]:[["M",r,e],["L",o,e],["L",o,n],["L",r,n],["L",r,e+(i=n-e)/2+(t=Ch(6,i/3,i/2))/2],["L",r-4,e+i/2],["L",r,e+i/2-t/2],["L",r,e]]);this.background.style.path=o},Ib.prototype.bindEvents=function(){var t=this;this.text.addEventListener(v.BOUNDS_CHANGED,function(){t.updateBackground()})};var Cb,jb=Ib;function Ib(t){t=Cb.call(this,C1({},{style:{visibility:"hidden"}},t=void 0===t?{}:t))||this;return t.background=t.appendChild(new T({style:{lineCap:"round",fill:"#262626",lineWidth:1,stroke:"#333"}})),t.text=t.appendChild(new As({style:{text:"",fill:"#fff",fontSize:10,textBaseline:"middle"}})),t}function Rb(t,e){var t=F(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}function Fb(t,e,n,r,i){var o=F(Ob(t,["dx","dy"],["dy","dx"]),2),a=o[0],o=o[1],s={};return s[a]=e,s[o]="start"===n?-i:r+i,s.textAlign=Ob(t,"center","start"===n?"right":"left"),s.textBaseline=Ob(t,"start"===n?"bottom":"top","middle"),s}function Db(t,e){var n,s,l,c,r,i,o,u=t.min,h=t.max,a=t.handle,f=t.orient,d=void 0===f?"horizontal":f;return null===t.label||a?[]:(s=C1({size:24,length:200},lb,t.rail||{}),f=C1({},cb,t.label||{}),l=f.align,c=f.spacing,"rail"===l?(t=(a=F(Ob(d,["dx","dy"],["dy","dx"]),2))[0],f=a[1],r=(a=F(Ob(d,["right","left"],["center","center"]),2))[0],a=a[1],i=(o=F(Ob(d,["middle","middle"],["bottom","top"]),2))[0],o=o[1],[((n={id:"legend-label-0",text:"".concat(u)})[t]=-c,n[f]=s.size/2,n.textAlign=r,n.textBaseline=i,n),((r={id:"legend-label-1",text:"".concat(h)})[t]=s.length+c,r[f]=s.size/2,r.textAlign=a,r.textBaseline=o,r)]):e.map(function(t,e){a=t,n=u,r=h,i=s;var n,r,i,o=(o=void 0!==o&&o)?a*(r-n)/i.length:c1((a-n)*(n<r?i.length/(r-n):0),2),a=Fb(d,o,l,s.size,c);return S({id:"legend-label-".concat(e),text:"".concat(t)},a)}))}var Bb=Qh(function(t){return t.sort(function(t,e){return t-e})},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return JSON.stringify(t)});i(f,zb=js),f.prototype.render=function(t,e){var n=t.padding,r=t.title,i=t.inset,o=(t.orient,t.backgroundStyle),o=void 0===o?{}:o,a=t.maxWidth,s=t.maxHeight,l=t.label,n=F(g1(n),4),c=n[0],u=n[1],h=n[2],n=n[3],f=nb(e,"legend-container",n,c),d=eb(f,r),r=(null==r?void 0:r.spacing)||0,i=F(g1(i),4),p=i[0],i=i[3],d=tb(d),i=nb(f,"legend-inner-group",d.left+i,d.bottom+p+r),d=Db(t,this.ticks),p=(rv(i,"legend-label",d,l,{fill:"#2C3542",fillOpacity:.65,fontWeight:"normal"}),this.drawInner(),f.getLocalBounds()),r=p.min,t=p.max,i=t[0]-r[0],d=t[1]-r[1];rb(e,"legend-background",Math.min(i+u+n,a||Number.MAX_VALUE),Math.min(d+c+h,s||Number.MAX_VALUE),o)},f.prototype.drawInner=function(){this.drawRail(),this.drawHandles(),this.createIndicator()},Object.defineProperty(f.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"selection",{get:function(){var t=this.style,e=t.min,n=t.max;return[t.start||e,t.end||n]},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelsCfg",{get:function(){var t=this.style.label;return C1({},cb,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"railCfg",{get:function(){var t=this.style.rail;return C1({size:24,length:200},lb,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"handleCfg",{get:function(){var t=this.style,e=t.handle,t=t.label;return C1({},ub,e||{},{textStyle:this.labelsCfg.style,spacing:this.labelsCfg.spacing,visibility:e&&null!==t?"visible":"hidden"})},enumerable:!1,configurable:!0}),f.prototype.ifHorizontal=function(t,e){return Ob(this.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Object.defineProperty(f.prototype,"color",{get:function(){var t,e,i,o,a,n=this.style.color,n=Array.from(void 0===n?[]:n),r=n.length;return r?this.railCfg.chunked?(t=this.ticks,e=this.orient,i=Array.from(n),o=i.length,a=t.length,t.reduce(function(t,e,n){var r=i[n%o];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===e?"0":"270",")"))):n.reduce(function(t,e,n){return t+" ".concat(n/(r-1),":").concat(e)},"l(".concat(this.ifHorizontal("0","270"),")")):""},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"slidable",{get:function(){return!!this.style.handle},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ticks",{get:function(){var t=this.style,e=t.min,t=t.max;return Bb(ve(ve([e],F(this.railCfg.ticks||[]),!1),[t],!1))},enumerable:!1,configurable:!0}),f.prototype.drawRail=function(){var t=this.style,e=t.orient,n=t.min,t=t.max,r=F(this.selection,2),i=r[0],r=r[1],o=this.querySelector(".legend-inner-group");this.rail=k(this.rail||o.appendChild(new Pb)).attr("className","legend-rail").call(L,S(S({},this.railCfg),{fill:this.color,orient:e})).style("selection",this.slidable?[(i-n)/(t-n),(r-n)/(t-n)]:void 0).node()},f.prototype.drawHandles=function(){var t=F(this.selection,2),e=t[0],t=t[1];this.startHandle=this.drawHandle("start",e),this.endHandle=this.drawHandle("end",t)},f.prototype.drawHandle=function(t,e){var n=this,r=this.labelsCfg,i=r.align,r=r.spacing,o=this.railCfg.size,a=this.handleCfg.size,s=this.getOffset(e),l=Fb(this.orient,s,i,o,-a/3),c=l.dx,u=l.dy,h=Fb(this.orient,s,i,o,"start"===i?r:a/3+r),l="start"===t?this.startHandle:this.endHandle,s=this.querySelector(".legend-inner-group");return k(l||s.appendChild(new Lb({}))).attr("className","legend-handle-".concat(t)).call(function(t){return t.node().update(S(S({},n.handleCfg),{x:c,y:u,symbol:n.ifHorizontal("horizontalHandle","verticalHandle"),textStyle:S({text:"".concat(null!=e?e:""),x:+h.dx-+c,y:+h.dy-+u,textAlign:h.textAlign,textBaseline:h.textBaseline},n.handleCfg.textStyle)}))}).node()},f.prototype.createIndicator=function(){this.indicator=this.appendChild(new jb({zIndex:2,className:"legend-indicator",style:{position:this.ifHorizontal("top","right")}}))},f.prototype.bindEvents=function(){var n=this,t=new Map;t.set("rail",this.rail),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){t.addEventListener("mousedown",n.onDragStart(e)),t.addEventListener("touchstart",n.onDragStart(e))}),this.startHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.endHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.rail.addEventListener("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},f.prototype.showIndicator=function(t,e){var n,r,i,o,a,s,l;void 0===e&&(e="".concat(t)),"number"!=typeof t?this.hideIndicator():(this.indicator.show(),l=this.querySelector(".legend-container"),n=(r=this.style).min,r=r.max,t=Ch(t,n,r),n=this.ifHorizontal(this.getOffset(t),this.railCfg.size+12),r=this.ifHorizontal(-14,this.getOffset(t)),i=(t=this.rail.getBBox()).x,t=t.y,o=(a=l.getBBox()).x,a=a.y,s=(l=F(l.getLocalPosition(),2))[0],l=l[1],this.indicator.style.x=i-o+s+n,this.indicator.style.y=t-a+l+r,this.indicator.style.textStyle={text:e})},f.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.hide()},f.prototype.onDragEnd=function(){this.style.cursor="default",this.removeEventListener("mousemove",this.onDragging),this.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd)},f.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},f.prototype.setSelection=function(t,e){this.updateSelection(t,e)},f.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,o,a,s,l=F(this.selection,2),c=l[0],l=l[1],t=F([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.style),c=n.min,l=n.max,u=F((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=F(n,2))[0],n=n[1],o=(c=F(c,2))[0],c=c[1],a=(l=F(l,2))[0],l=l[1],c=(o=F([o,c],2))[0],s=(o=o[1])-c,o<c&&(c=(u=F([o,c],2))[0],o=u[1]),n-i<s?[i,n]:c<i?a===i&&l===o?[i,o]:[i,s+i]:n<o?l===n&&a===c?[c,n]:[n-s,n]:[c1(c,r),c1(o,r)]),2),e=u[0],t=u[1];this.update({start:e,end:t}),this.dispatchSelection()},Object.defineProperty(f.prototype,"step",{get:function(){var t=this.attributes,e=t.step,n=t.min,t=t.max;return Wh(e)?c1(.01*(t-n),0):e},enumerable:!1,configurable:!0}),f.prototype.getTickValue=function(t){return this.railCfg.chunked?Rb(this.ticks,t).tick:(e=this.step,(n=this.style.min)+Math.round((t-n)/e)*e);var e,n},f.prototype.getValueByCanvasPoint=function(t,e){var n=this.style,r=n.min,n=n.max,i=F(this.rail.getPosition(),2),o=i[0],i=i[1],o=this.ifHorizontal(o,i),i=this.ifHorizontal.apply(this,ve([],F(w1(t)),!1));return Ch(this.getOffset(i-o,!0)+r,r,n)},f.prototype.getOffset=function(t,e){var n=this.style,r=n.min,n=n.max;return(e=void 0!==e&&e)?t*(n-r)/this.railCfg.length:c1((t-r)*(r<n?this.railCfg.length/(n-r):0),2)},f.prototype.dispatchSelection=function(){var t=new Ya("valueChanged",{detail:{value:this.selection}});this.dispatchEvent(t)},f.prototype.dispatchIndicated=function(t,e){t=new Ya("onIndicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},ge([D1(20)],f.prototype,"dispatchSelection",null),ge([D1(20)],f.prototype,"dispatchIndicated",null);var zb,Gb,Hb,Wb,Yb=f;function f(t){var o=zb.call(this,C1({type:"continuous-legend"},hb,t))||this;return o.onHovering=function(t){t.stopPropagation();var e,t=o.getValueByCanvasPoint(t);rf(o.attributes,["rail","chunked"])?(e=Rb(o.ticks,t).range,o.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),o.dispatchIndicated(t,e)):(e=o.getTickValue(t),o.showIndicator(e),o.dispatchIndicated(e))},o.onDragStart=function(e){return function(t){t.stopPropagation(),o.slidable&&(o.target=e,o.prevValue=o.getTickValue(o.getValueByCanvasPoint(t)),o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),o.addEventListener("mouseleave",o.onDragEnd),o.addEventListener("mouseup",o.onDragEnd),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd))}},o.onDragging=function(t){var e=o.target,n=(o.updateMouse(),F(o.selection,2)),r=n[0],n=n[1],t=o.getTickValue(o.getValueByCanvasPoint(t)),i=t-o.prevValue;"start"===e?r!==t&&o.updateSelection(t,n):"end"===e?n!==t&&o.updateSelection(r,t):"rail"===e&&0!=i&&(o.prevValue=t,o.updateSelection(i,i,!0))},o}function Vb(t){Gb||(Gb=document.createElement("table"),Wb=document.createElement("tr"),Hb=/^\s*<(\w+|!)[^>]*>/,Wb={tr:document.createElement("tbody"),tbody:Gb,thead:Gb,tfoot:Gb,td:Wb,th:Wb,"*":document.createElement("div")});var e=Hb.test(t)&&RegExp.$1,e=(e&&e in Wb||(e="*"),Wb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var qb,e="tooltip",Xb="tooltip-title",Ub="tooltip-list",t="tooltip-list-item",Is="tooltip-list-item-name",oo="tooltip-list-item-marker",Bs="tooltip-list-item-name-label",Fs="tooltip-list-item-value",Ds="tooltip-crosshair-x",co="tooltip-crosshair-y",uo={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},yo=((ho={})[".".concat(e)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},ho[".".concat(Xb)]={color:"rgba(0, 0, 0, 0.45)"},ho[".".concat(Ub)]={margin:"0px","list-style-type":"none",padding:"0px"},ho[".".concat(t)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},ho[".".concat(oo)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},ho[".".concat(Is)]={display:"flex","align-items":"center","max-width":"216px"},ho[".".concat(Bs)]=S({flex:1},uo),ho[".".concat(Fs)]=S({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},uo),ho[".".concat(Ds)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},ho[".".concat(co)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},ho);function $b(t){var e=qb.call(this,N({},$b.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=ff(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}i($b,qb=js),Object.defineProperty($b.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"position",{set:function(t){var t=F(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,o=t.index,t=U(t,["name","value","color","index"]);return S({name:n,value:r,color:i,index:void 0===o?e:o},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(Vb((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return Nh(t)?O1(t):Yh(t)?t:Eh(t)?O1(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),$b.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},$b.prototype.update=function(t){this.attr(N({},this.attributes,t)),this.render(this.attributes,this)},$b.prototype.clear=function(){this.element.innerHTML=""},$b.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},$b.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},$b.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},$b.prototype.initShape=function(){var t=this.attributes.template.container;this.element=Vb(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},$b.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(Xb)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=Ub,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=F(t,2),e=t[0],n=t[1];ve([r],F(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},$b.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=F(e.offset,2),i=e[0],o=e[1],e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=F(c,2),n=e[0],e=e[1],t=F(a[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+o)*t]}),c},$b.prototype.setOffsetPosition=function(t){var t=F(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,o=n.x,n=n.y;this.element.style.left="".concat(r+o+e,"px"),this.element.style.top="".concat(i+n+t,"px")},$b.prototype.updatePosition=function(){this.throttleUpdatePosition()},$b.prototype.autoPosition=function(t){var e,n,r,i,o,a,s,t=F(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,h=c.y,f=c.autoPosition,c=c.bounding;return f?(e=(f=this.element).offsetWidth,f=f.offsetHeight,h=(u=F([u+l,h+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,o={left:h<s,right:s+c.width<h+e,top:u<i,bottom:i+c.height<u+f},a=[],n.split("-").forEach(function(t){a.push(o[t]?r[t]:t)}),s=a.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},$b.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},$b.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},$b.tag="tooltip",$b.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(e,'"></div>'),title:'<div class="'.concat(Xb,'"></div>'),item:'<li class="'.concat(t,'" data-index={index}>\n <span class="').concat(Is,'">\n <span class="').concat(oo,'" style="background:{color}"></span>\n <span class="').concat(Bs,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Fs,'" title="{value}">{value}</span>\n </li>')},style:yo}};var Zb,Kb={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function Jb(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function Qb(t){return Zb.call(this,N({},Qb.defaultOptions,t))||this}i(Qb,Zb=js),Qb.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,o=t.spacing,r=t.disabled,a=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=D(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=rf(Kb,n,Kb.default),c=n.sizeStyle,u=n.tagStyle,h=r?"no-drop":"pointer",n=a?"#1890FF":"#00000040",f=c,d=a?t:s,p=((t||s)&&D(e,".switch-tag",function(){return new U1({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(N({cursor:h,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);f=S(S({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:f.height},n={width:i,height:r},i=f.radius,r=a,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===a?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),D(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",h).style("fillOpacity",r?.4:1).call(L,f).node()),y=D(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(L,f).node();D(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",h).call(function(t){var e,t=t.node(),n=Jb(p,o,a),r=Jb(p,o,!a);t.attr("x")&&!uf(n,r)&&i.checked!==a?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=y.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),y.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!a},Qb.defaultOptions={type:Qb.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var t2,go={text:"",type:"primary",height:20,width:20,buttonStyle:{default:{lineWidth:0,fill:"#fff"},active:{fill:"#fff"},disabled:{fill:"#fff"}},markerStyle:{default:{fill:"black",size:10},disabled:{fill:"#8c8c8c"}}};function p(t){var t=t2.call(this,N({},p.defaultOptions,t))||this,e=(t.playState="idle",t.attributes),n=e.view,e=e.initPageNum;return t.currPage=e,t.view=n,t.init(),t}i(p,t2=js),Object.defineProperty(p.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"maxPages",{get:function(){var t=this.attributes,e=t.pageWidth,n=t.pageHeight,r=t.orient,i=t.pageLimit;return t.pageCallback||i!==1/0?i:"horizontal"===r?Math.ceil(this.width/e):Math.ceil(this.height/n)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"view",{get:function(){return this.fullView},set:function(t){var e=this.attributes,n=e.width,e=e.height;t.setLocalPosition(0,0),this.fullView=t,n&&e||(e=(n=M1(t)).width,t=n.height,this.width=e,this.height=t)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"width",{get:function(){var t=this.attributes.width;return t||this.viewWidth},set:function(t){this.viewWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"height",{get:function(){var t=this.attributes.height;return t||this.viewHeight},set:function(t){this.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"btnPosition",{get:function(){var t;return null!=(t=this.style.button)&&t.position?this.style.button.position:"horizontal"===this.style.orient?"right":"bottom"},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"defaultShape",{get:function(){return["left","right","left-right"].includes(this.btnPosition)?["left","right"]:["up","down"]},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"buttonCfg",{get:function(){var t=F(this.defaultShape,2),e=t[0],t=t[1],n=this.attributes.button,r=n.prev,n=n.next;return{prev:S({marker:e},r),next:S({marker:t},n)}},enumerable:!1,configurable:!0}),p.prototype.render=function(t,e){},p.prototype.init=function(){this.initShape(),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},p.prototype.update=function(t){var e=t.view;e&&(this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.currPage=this.attributes.initPageNum,this.view=e,this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack()),this.attr(N({},this.attributes,t)),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},p.prototype.clear=function(){this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.fullView=void 0,this.removeChildren()},p.prototype.destroy=function(){this.removeChildren(),t2.prototype.destroy.call(this)},p.prototype.goTo=function(t){var e,n,r,i,o,a,s,l,c,u,h=this;return"idle"===this.playState&&(e=(n=this.attributes).effect,n=n.duration,r=(c=this.calcRelativePagingOffset(t)).viewFromX,i=c.viewFromY,o=c.viewToX,a=c.viewToY,u=c.clipFromX,s=c.clipFromY,l=c.clipToX,c=c.clipToY,this.playState="running",this.clipView.animate([{transform:"translate(".concat(u,"px, ").concat(s,"px)")},{transform:"translate(".concat(l,"px, ").concat(c,"px)")}],{duration:n,easing:e,fill:"both"}),null!=(u=this.view.animate([{transform:"translate(".concat(r,"px, ").concat(i,"px)")},{transform:"translate(".concat(o,"px, ").concat(a,"px)")}],{duration:n,easing:e,fill:"both"})))&&u.finished.then(function(){h.currPage=t,h.updateButtonState(),h.resolveFinishedPromise(),h.playState="idle"}),this.finished},p.prototype.prev=function(){var t=this.attributes.loop,e=this.currPage-1;return e<1&&(e=t?this.maxPages:1),this.goTo(e)},p.prototype.next=function(){var t=this.attributes.loop,e=this.maxPages,n=this.currPage+1;return this.goTo(n=e<n?t?1:e:n)},p.prototype.initShape=function(){this.clipView=new Ps({name:"clipView",style:{x:0,y:0,width:0,height:0}}),this.view.style.clipPath=this.clipView,this.view.appendChild(this.clipView),this.appendChild(this.view),this.view.toBack();var t=F(this.defaultShape,2),e=t[0],t=t[1];this.prevButton=new em({name:"prevButton",style:S(S({},p.defaultOptions.style.button.prev),{marker:e,onClick:this.prev.bind(this)})}),this.appendChild(this.prevButton),this.nextButton=new em({name:"nextButton",style:S(S({},p.defaultOptions.style.button.next),{marker:t,onClick:this.next.bind(this)})}),this.appendChild(this.nextButton),this.paginationGroup=new ys({name:"paginationGroup"}),this.appendChild(this.paginationGroup)},p.prototype.updateView=function(){var t=this.getClipViewSpace(this.currPage),e=t.width,t=t.height;this.clipView.attr({width:e,height:t}),this.view.setLocalPosition(0,0),this.clipView.setLocalPosition(0,0)},p.prototype.updateButton=function(){var t=this.buttonCfg,e=t.prev,t=t.next;e&&this.prevButton.update(e),t&&this.nextButton.update(t)},p.prototype.updateButtonState=function(){this.attributes.loop?(this.nextButton.setState("default"),this.prevButton.setState("default")):(this.nextButton.setState(this.currPage===this.maxPages?"disabled":"default"),this.prevButton.setState(1===this.currPage?"disabled":"default"))},p.prototype.getClipViewSpace=function(t){var e=this.attributes,n=e.orient,r=e.pageWidth,i=e.pageHeight,e=e.pageCallback,o={x:0,y:0,width:r,height:i},a=this.maxPages;return e?S(S({},o),e(t)):(a<t||t<1||("vertical"===n?o.y=(t-1)*i:"horizontal"===n&&(o.x=(t-1)*r)),o)},p.prototype.absolute2Relative=function(t,e){var n=this.currPage,n=this.getClipViewSpace(n);return[t+n.x,e+n.y]},p.prototype.getViewPosition=function(t){var e=this.getClipViewSpace(1),n=e.x,e=e.y,t=this.getClipViewSpace(t),n=F([-t.x+n,-t.y+e],2);return{x:n[0],y:n[1]}},p.prototype.getRelativeViewPosition=function(t){var t=this.getViewPosition(t),e=t.x,t=t.y,e=F(this.absolute2Relative(e,t),2);return{x:e[0],y:e[1]}},p.prototype.calcRelativePagingOffset=function(t){var e=F(this.absolute2Relative.apply(this,ve([],F(this.view.getLocalPosition().slice(0,2)),!1)),2),n=e[0],e=e[1],t=this.getRelativeViewPosition(t),r=t.x,t=t.y,i=F([-n,-e],2),o=i[0],i=i[1],a=F([-r,-t],2);return{viewFromX:n,viewFromY:e,viewToX:r,viewToY:t,clipFromX:o,clipFromY:i,clipToX:a[0],clipToY:a[1]}},p.prototype.adjustLayout=function(){this.adjustButton()},p.prototype.adjustButton=function(){var t,e=this.attributes,n=e.button,r=e.pageWidth,e=e.pageHeight,i=this.btnPosition,n=(null==n?void 0:n.spacing)||0,o=M1(this.prevButton),a=o.width,o=o.height,s=M1(this.nextButton),l=s.width,s=s.height,c=0,u=0,h=0,f=0;"left-right"===i?(c=-(n+a),u=(e-o)/2,h=n+r,f=(e-s)/2):"top-bottom"===i?(c=(r-a)/2,u=-(n+o),h=(r-l)/2,f=n+e):"top"===i?(c=(r-n)/2-a,u=-(n+(t=Th([o,s]))),h=(r+n)/2,f=-(n+t)):"bottom"===i?(c=(r-n)/2-a,h=(r+n)/2,f=u=n+e):"left"===i?(c=(h=-(n+l))-(n+a),f=u=(e-(t=Th([o,s])))/2):"right"===i&&(h=(c=n+r)+a,f=u=(e-(t=Th([o,s])))/2),this.prevButton.setLocalPosition(c,u),this.nextButton.setLocalPosition(h,f)},p.defaultOptions={type:p.tag="page-navigator",style:{x:0,y:0,effect:"linear",duration:200,orient:"horizontal",initPageNum:1,pageLimit:1/0,loop:!1,button:{prev:S({spacing:0},go),next:S({spacing:0},go),style:{default:{},active:{},disabled:{}},spacing:5},pagination:{type:"currTotal",style:{default:{},active:{}},separator:"/",spacing:5}}},C.registerSymbol("left",function(t,e,n){return[["M",t-n,e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),C.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]}),C.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n],["L",t+n,e+n],["Z"]]}),C.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n],["Z"]]});var e2,n2,r2,i2,mo={text:{text:""},lineStyle:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,lineDash:[5,5]}},o=C1({},mo,{type:"line",text:{position:"start",align:"center",verticalAlign:"bottom"}}),vo=C1({},mo,{type:"circle",defaultRadius:0}),bo=C1({},mo,{type:"polygon",defaultRadius:0,startAngle:0}),xo=(i(o2,e2=js),Object.defineProperty(o2.prototype,"localPointer",{get:function(){var t=F(this.getPosition(),2),e=t[0],t=t[1],n=F(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(o2.prototype,"tagCfg",{get:function(){var t=this.attributes.text;return t.position,U(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(o2.prototype,"crosshairCfg",{get:function(){var t=this.attributes.lineStyle;return S(S({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),o2.prototype.render=function(t,e){var n=this,e=D(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=D(e,".crosshair-tag",function(){return new U1({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=D(e,".crosshair-path","path").attr("className","crosshair-path").call(L,this.crosshairCfg).node(),this.adjustLayout()},o2.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},o2.prototype.setPointer=function(t){this.pointer=t},o2.defaultOptions={type:o2.tag="crosshair-base",style:mo},o2);function o2(t){return e2.call(this,N({},o2.defaultOptions,t))||this}function a2(t){return n2.call(this,C1({},a2.defaultOptions,t))||this}function s2(t){return r2.call(this,C1({},s2.defaultOptions,t))||this}function l2(t){return i2.call(this,C1({},l2.defaultOptions,t))||this}i(a2,n2=xo),Object.defineProperty(a2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=F(t.startPos,2),n=e[0],e=e[1],t=F(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(a2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=F(this.getPosition(),2))[0],e=e[1],[(n=F(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(a2.prototype,"isVertical",{get:function(){var t=this.attributes,e=F(t.startPos,2),n=e[0],e=e[1],t=F(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(a2.prototype,"tagShapeSpace",{get:function(){var t=M1(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),a2.prototype.update=function(t){n2.prototype.update.call(this,t)},a2.prototype.setPointer=function(t){n2.prototype.setPointer.call(this,t),this.adjustPosition()},a2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},a2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},a2.prototype.adjustPosition=function(){var t=F(this.localPointer,2),e=t[0],t=t[1],n=F(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},a2.prototype.adjustTag=function(){var t,e,n=this.attributes,r=n.text,i=F(n.startPos,2),o=i[0],i=i[1],n=F(n.endPos,2),a=n[0],n=n[1];r&&""!==r?(this.tagShape.show(),r=r.position,e=(t=this.tagShapeSpace).width,t=t.height,o=(a=F(this.getOrientVal({start:[-e/2,t/2],end:[a-o+e/2,t/2]},{start:[0,0],end:[0,n-i+t]})[r],2))[0],e=a[1],this.tagShape.setLocalPosition(o,e)):this.tagShape.hide()},a2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},a2.defaultOptions={type:a2.tag="line-crosshair",style:o},ge([D1(20)],a2.prototype,"setPointer",null),i(s2,r2=xo),Object.defineProperty(s2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),s2.prototype.update=function(t){r2.prototype.update.call(this,t)},s2.prototype.setPointer=function(t){var t=F(t,2),e=t[0],t=t[1],e=(r2.prototype.setPointer.call(this,[e,t]),F(this.localPointer,2)),t=e[0],e=e[1],n=F(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},s2.prototype.adjustLayout=function(){this.tagShape.hide()},s2.prototype.createCirclePath=function(t){var e=this.attributes,n=F(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return z1(r,n,t||e)},s2.defaultOptions={type:s2.tag="circle-crosshair",style:vo},ge([D1(20)],s2.prototype,"setPointer",null),i(l2,i2=xo),Object.defineProperty(l2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),l2.prototype.update=function(t){i2.prototype.update.call(this,t)},Object.defineProperty(l2.prototype,"points",{get:function(){for(var t,e,n,r,i,o,a=this.attributes,s=a.startAngle,l=a.sides,c=2*Math.PI/l,u=[1,0],h=[],f=0;f<l;f+=1)h.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*f,o=i=void 0,i=e[0]-n[0],e=e[1]-n[1],o=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*o+n[0],t[1]=i*o+e*r+n[1],t));return h},enumerable:!1,configurable:!0}),l2.prototype.setPointer=function(t){var t=F(t,2),e=t[0],t=t[1],e=(i2.prototype.setPointer.call(this,[e,t]),F(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=F(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=F1(n,[t,e])/F1(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},l2.prototype.adjustLayout=function(){this.tagShape.hide()},l2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=F(t.center,2),o=t[0],a=t[1],t=this.points.map(function(t,e){var t=F(t,2),t=F(ue([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",o+n,a+t]});return t.push(["Z"]),t},l2.prototype.intersection=function(t){for(var e,n,r,i,o,a,s,l,t=F(t,2),c=t[0],u=t[1],h=this.points,t=F(this.attributes.center,2),f=t[0],d=t[1],p=1;p<=h.length;p+=1){var y=F(h[p-1],2),g=y[0],y=y[1],m=F(h[p%h.length],2),v=m[0],m=m[1],g=(i=[f,d],g=[g+f,y+d],y=[v+f,m+d],l=s=a=o=m=v=void 0,m=(r=F(r=[c,u],2))[0],r=r[1],o=(i=F(i,2))[0],i=i[1],a=(g=F(g,2))[0],g=g[1],s=(y=F(y,2))[0],y=y[1],l=[],(y-g)*(o-m)==(i-r)*(s-a)?(i-r)*(a-m)==(g-r)*(o-m)&&(I1(m,o,r,i,a,g)&&R1(l,a,g),I1(m,o,r,i,s,y)&&R1(l,s,y),I1(a,s,g,y,m,r)&&R1(l,m,r),I1(a,s,g,y,o,i))&&R1(l,o,i):(v=(m*(i-r)+g*(o-m)-r*(o-m)-a*(i-r))/((s-a)*(i-r)-(o-m)*(y-g)),0<=(y=(a*(y-g)+r*(s-a)-g*(s-a)-m*(y-g))/((o-m)*(y-g)-(s-a)*(i-r)))&&y<=1&&0<=v&&v<=1&&(l[0]=m+y*(o-m),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=F(g,2))[0],n=s[1])}return[e,n]},l2.defaultOptions={type:l2.tag="polygon-crosshair",style:bo},ge([D1(20)],l2.prototype,"setPointer",null);i(f2,c2=P),Object.defineProperty(f2.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Sh(t)?t.map(function(t){return Sh(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(f2.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(f2.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(f2.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(f2.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(f2.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(f2.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=F(t,2),n=t[0],t=t[1];return"wavy"===t?S({path:r.getWavyPath(n)},i):"double"===t?S({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},S(S({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),f2.prototype.update=function(t){var e=this;this.attr(C1({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new T({style:t}))})},f2.prototype.clear=function(){this.removeChildren()},f2.prototype.getLinePos=function(t){var e=F(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,o=i.height,i=i.fontSize,a=F([0,0],2),s=a[0],a=a[1],a=("overline"===t?(s=(n=F([0,o*n-i/2],2))[0],n):"line-through"===t?(s=(n=F([0,o*r],2))[0],n):(s=(t=F([0,o*e+i/2],2))[0],t))[1];return[s,a]},f2.prototype.getLinePath=function(t){var e=this.attributes.width,t=F(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},f2.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=F(this.getLinePos(t),2),o=i[0],i=i[1],a=F([0,0],2),s=a[0],a=a[1];return"line-through"===t&&(s=(e=F([-.5,.5],2))[0],a=e[1]),"underline"===t?(s=(e=F([0,1],2))[0],a=e[1]):"overline"===t&&(s=(e=F([1,0],2))[0],a=e[1]),[["M",o,i+n*s],["L",o+r,i+n*s],["M",o,i+n*a],["L",o+r,i+n*a]]},f2.prototype.getWavyPath=function(t){return[]},f2.tag="decoration",f2.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var c2,u2,h2=f2;function f2(t){t=c2.call(this,C1({},f2.defaultOptions,t))||this;return t.update({}),t}function d2(t){t=u2.call(this,C1({},d2.defaultOptions,t))||this;return t.init(),t}i(d2,u2=js),Object.defineProperty(d2.prototype,"textWidth",{get:function(){var e=this;return Th(this.renderText.split("\n").map(function(t){return o1(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"textHeight",{get:function(){return M1(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"height",{get:function(){var t=this.attributes.height;return jh(t)&&0!==t?t:M1(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return l1(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:l1(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return i1(t,jh(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&jh(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"font",{get:function(){return of(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return S(S(S({},v1),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return S({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return C1({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),d2.prototype.init=function(){this.initShape(),this.update({})},d2.prototype.update=function(t){this.attr(C1({},this.attributes,t)),this.render()},d2.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new h2({style:t}))})},d2.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},d2.prototype.initShape=function(){this.backgroundShape=new Ps({name:"background",style:{width:0,height:0}}),this.decorationGroup=new ys({name:"decoration-group"}),this.textShape=new As({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},d2.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&jh(n)&&"clip"===e&&(this.clipRect=new Ps({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},d2.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;jh(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},d2.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},d2.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},d2.defaultOptions={type:d2.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var p2,wo=S(S({},v1),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),y2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},g2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function m2(t){return p2.call(this,N({},m2.defaultOptions,t))||this}i(m2,p2=js),m2.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,o=t.checked,t=t.spacing,o=(this.checked=!!o,D(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=Kh({},this.checked?y2.selected:y2.default,r),r=Kh({},g2,i),t=(this.checkboxBoxShape=D(o,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(o.style.zIndex||0)-1).call(L,e).node(),D(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(L,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;D(o,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(L,n)},m2.defaultOptions={type:m2.tag="checkbox",style:{x:0,y:0,label:S({text:""},wo),spacing:4,checked:!1}};var v2="gui-poptip",b2="gui-poptip-arrow",x2="gui-poptip-text",w2=((a={})[".".concat(v2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},a[".".concat(x2)]={"text-align":"center"},a[".".concat(v2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(v2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(v2,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(v2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(v2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(v2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(v2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(v2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(v2,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(v2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(v2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(v2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(b2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(v2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(b2)]={bottom:"-2px"},a[".".concat(v2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(b2)]={right:"-2px"},a[".".concat(v2,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(b2)]={left:"-2px"},a[".".concat(v2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(b2)]={top:"-2px"},a[".".concat(v2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(b2)]={left:"10px",bottom:"-2px"},a[".".concat(v2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(b2)]={right:"10px",bottom:"-2px"},a[".".concat(v2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(b2)]={right:"-2px",top:"8px"},a[".".concat(v2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(b2)]={right:"-2px",bottom:"8px"},a[".".concat(v2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(b2)]={left:"-2px",top:"8px"},a[".".concat(v2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(b2)]={left:"-2px",bottom:"8px"},a[".".concat(v2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(b2)]={top:"-2px",left:"8px"},a[".".concat(v2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(b2)]={top:"-2px",right:"8px"},a),k2=void 0;var E2;function M2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function S2(t){var n,r;return n=M2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(k2,t)}(t)}function O2(t){t=E2.call(this,N({style:{id:"gui-poptip"}},O2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(O2,E2=js),Object.defineProperty(O2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),O2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},O2.prototype.update=function(t){this.attr(N({},this.style,t)),this.render(this.attributes,this)},O2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(a=(i="function"==typeof l?l.call(null,t):l).html,o=i.target,i=U(i,["html","target"]),n=Kh({},u.style,i),!o&&!1!==o||(e=o),"string"==typeof a)&&(r=a),n.position),o=n.arrowPointAtCenter,a=n.follow,n=n.offset;e?(e=(t=F(function(t,e,n,r,i,o){if(void 0===i&&(i=!1),o=void 0===o?!1:o)return[t,e];var a=(o=n.getBoundingClientRect()).x,s=o.y,l=o.width,c=o.height;switch(r){case"top":return i?[a+l/2,s]:[t,s];case"left":return i?[a,s+c/2]:[a,e];case"bottom":return i?[a+l/2,s+c]:[t,s+c];case"right":return i?[a+l,s+c/2]:[a+l,e];case"top-right":case"right-top":return[a+l,s];case"left-bottom":case"bottom-left":return[a,s+c];case"right-bottom":case"bottom-right":return[a+l,s+c];default:return[a,s]}}(t.clientX,t.clientY,e,i,o,a),2))[0],o=t[1],u.showTip(e,o,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},O2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=F(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},O2.prototype.clear=function(){this.container.innerHTML=""},O2.prototype.destroy=function(){var t,e=this;ve([],F(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},O2.prototype.showTip=function(t,e,n){var r,i=rf(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(x2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},O2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},O2.prototype.getContainer=function(){return this.container},O2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(v2).concat(t?" ".concat(t):"")},O2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=S2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},O2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(b2,'"></span>'));t.innerHTML=n,Nh(r)?t.innerHTML+=r:r&&Yh(r)&&t.appendChild(r),e&&(t.getElementsByClassName(x2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},O2.prototype.applyStyles=function(){var t,e=C1({},w2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=F(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=F(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},O2.prototype.setOffsetPosition=function(t,e,n){var n=F(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},O2.tag="poptip",O2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:w2,template:'<div class="'.concat(x2,'"></div>')}};class _2 extends ls{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawText(),this.drawBackground(),this.drawConnector(),this.drawPoints()}get endPoint(){var t,e=this.style["connector"];return Array.isArray(null==e?void 0:e.path)&&e.path.length?([[,e,t]]=e.path.slice(-1),{x:e,y:t}):{x:0,y:0}}drawText(){var t=this.attributes,e=t["textAlign"],t=U(t,["class","connector","startMarker","endMarker","background","transform","textAlign"]),{x:n,y:r}=this.endPoint;this.textShape=$(this.textShape||this.appendChild(new As({}))).call(A,t).style("x",+n).style("y",+r).style("textAlign",e||(n<0?"right":0<n?"left":"center")).node()}drawBackground(){var t,e,n,r,i,o,a,s,l,c=this.style["background"];c?(t=c.padding,c=U(c,["padding"]),[t=0,e=0,n=t,r=e]=t||[],i=this.getEulerAngles(),{min:[o,a],halfExtents:[s,l]}=(this.setEulerAngles(0),this.textShape.getLocalBounds()),this.setEulerAngles(i),this.background=$(this.background||this.appendChild(new Ps({}))).style("zIndex",-1).style("x",o-r).style("y",a-t).style("width",2*s+r+e).style("height",2*l+t+n).call(A,c).node()):(this.background&&(this.removeChild(this.background),this.background.destroy()),this.background=void 0)}drawConnector(){var t,e=this.style["connector"];e?(t=e.path||function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,o=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(o=e),r<0&&(o=r),[["M",0,0],["L",i,o]]}(this.background||this.textShape),this.connector=$(this.connector||this.appendChild(new T({}))).style("zIndex",-1).style("stroke","black").style("lineWidth",1).call(A,e).style("path",t).node()):(this.connector&&(this.removeChild(this.connector),this.connector.destroy()),this.connector=void 0)}drawPoints(){var{startMarker:t,endMarker:e}=this.style;this.drawStartMarker(t),this.drawEndMarker(e&&Object.assign(Object.assign({},e),this.endPoint))}drawStartMarker(t){var e=this.startMarkerPoint;t?(e||(this.startMarkerPoint=this.appendChild(new C({style:{symbol:"circle",size:4}}))),this.startMarkerPoint.update(t)):(e&&(this.removeChild(e),e.destroy()),this.startMarkerPoint=void 0)}drawEndMarker(t){var e=this.endMarkerPoint;t?(e||(this.endMarkerPoint=this.appendChild(new C({style:{symbol:"circle",size:4}}))),this.endMarkerPoint.update(t)):(e&&(this.removeChild(e),e.destroy()),this.endMarkerPoint=void 0)}}const P2=t=>{const h=U(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),{fill:i,stroke:o,fontSize:a}=r,r=U(r,["fill","stroke","fontSize"]),{color:e,text:s="",fontSize:a=a,rotate:l=0,transform:c=""}=e,[[t,u]]=t;return $(new _2({})).call(A,r).style("x",t).style("y",u).style("text",String(s)).style("stroke",e||o).style("fill",e||i).style("fontSize",a).style("transform",c+`rotate(${+l}deg)`).call(A,h).node()}};P2.props={defaultEnterAnimation:"fadeIn"};class T2 extends ls{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawMarker(),this.drawText()}drawMarker(){const t=this.attributes,{size:s=24}=t,e=U(t,["class","size","textStyle"]);this.badgeMarker=this.badgeMarker||this.appendChild(new C({})),this.badgeMarker.className="badge-marker",this.badgeMarker.update(Object.assign(Object.assign({symbol:()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",o,a],["Z"]]}},e),{size:s,x:0,y:0}))}drawText(){var t=function(t){var{min:t,max:e}=t.getLocalBounds();return{x:(t[0]+e[0])/2,y:(t[1]+e[1])/2}}(this.badgeMarker),{text:e="",textStyle:n}=this.style;this.badgeText=this.badgeText||this.appendChild(new As({})),$(this.badgeText).attr("className","badge-text").style("x",t.x).style("y",t.y).style("text",e).style("textAlign","center").style("textBaseline","middle").style("fill","#333").style("fontSize",10).call(A,n||{}).node()}}const A2=t=>{const l=U(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),{fill:i,stroke:o=i}=r,a=U(r,["fill","stroke"]),{color:r,text:e=""}=e,[[t,s]]=t;return $(new T2({})).call(A,a).style("x",t).style("y",s).style("text",String(e)).style("stroke",r||o).style("fill",r||i).call(A,l).node()}},L2=(A2.props={defaultEnterAnimation:"fadeIn"},kg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;$(t).maybeAppend("connect-path",()=>new T({})).style("d",n).call(A,i),$(t).maybeAppend("area-path",()=>new T({})).style("d",e).call(A,r)}));const N2=t=>{const{curve:u,gradient:h=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:d=!1}=t,p=U(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:o}=e,n=yg(n,r,i,o),r=n["fill"],i=U(n,["fill"]),{color:o=r,seriesColor:n,seriesX:r,seriesY:a}=e,s=(e=e,hd(s=c)?(e=e["transform"],`translate(${(s=s.getCenter())[0]}, ${s[1]}) `+(e||"")):""),e=h&&n?fg(n,r,a,h):o;const l=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:e,fill:e}),s&&{transform:s}),p);var[n,r]=function(e,n){var r=[],i=[],o=[];let a=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,h=e[t],f=e[t+l];[...h,...f].some(t=>!n(t))?a=!0:(r.push(h),i.push(f),a&&s&&(a=!1,[c,u]=s,o.push([c,h,u,f])),s=[h,f])}return[r.concat(i),o]}(t,f),a=Qy(p,"connect"),o=!!r.length,i=t=>$(new T({})).style("d",t).call(A,l).node();return hd(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=Ty().curve(Ay),e=t.curve,o=t.lineX0,a=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Cy(o())},delete t.lineX0,t.lineEndAngle=function(){return Cy(a())},delete t.lineX1,t.lineInnerRadius=function(){return Cy(s())},delete t.lineY0,t.lineOuterRadius=function(){return Cy(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Ny(t)):e()._curve},t.angle((t,e)=>og(ng(r[e],n))).outerRadius((t,e)=>rg(r[e],n)).innerRadius((t,e)=>rg(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,o,a,s,l},!o||d&&!Object.keys(a).length?i(e(n)):o&&!d?i(e(t)):$(new L2).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},a),p)).style("areaPath",e(t)).style("connectPath",r.map(e).join("")).node()):(s=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return Ty().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f)).curve(u)(n)},!o||d&&!Object.keys(a).length?i(s(n)):o&&!d?i(s(t)):$(new L2).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},a),p)).style("areaPath",s(t)).style("connectPath",r.map(s).join("")).node())}},C2=(N2.props={defaultEnterAnimation:"fadeIn"},o=>(t,e,n,r)=>{var i=hd(n)?Yy:Sy;return N2(Object.assign({curve:i},o))(t,e,n,r)}),j2=(C2.props=Object.assign({},N2.props),t=>{const{alpha:o=.5}=t,a=U(t,["alpha"]);return(t,e,n,r)=>{var i=hd(n)?Hy:zy;return N2(Object.assign({curve:i.alpha(o)},a))(t,e,n,r)}}),I2=(j2.props=Object.assign({},N2.props),i=>(t,e,n,r)=>N2(Object.assign({curve:qy},i))(t,e,n,r)),R2=(I2.props=Object.assign({},N2.props),t=>{const l=t["arrow"],c=U(t,["arrow"]);return(t,e,n,r)=>{var i,{mark:o,shape:a,defaultShape:s}=e,r=yg(r,o,a,s),o=r["stroke"],a=U(r,["stroke"]),{color:s=o,transform:r}=e,[e,o]=t,t=ny();return t.moveTo(...e),t.lineTo(...o),l&&([e,i]=ug(e,o,l),t.moveTo(...o),t.lineTo(...e),t.moveTo(...o),t.lineTo(...i)),$(new T).call(A,a).style("d",t.toString()).style("stroke",s).style("transform",r).call(A,c).node()}}),F2=(R2.props={defaultEnterAnimation:"fadeIn"},t=>{const s=U(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),i=r["stroke"],o=U(r,["stroke"]),{color:a=i,transform:r}=e,[e,i]=t,t=ny();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),$(new T).call(A,o).style("d",t.toString()).style("stroke",a).style("transform",r).call(A,s).node()}});F2.props={defaultEnterAnimation:"fadeIn"};const D2=t=>{const{cornerRatio:u=1/3}=t,h=U(t,["cornerRatio"]);return(t,e,n,r)=>{var i,o,{mark:a,shape:s,defaultShape:l}=e,r=yg(r,a,s,l),a=r["stroke"],s=U(r,["stroke"]),{color:l=a,transform:r}=e,[e,a]=t,c=(t=e,e=a,a=n,n=u,o=ny(),hd(a)?(i=rg(t,c=a.getCenter()),i=(rg(e,c)-i)*n+i,o.moveTo(t[0],t[1]),hg(o,t,e,c,i)):ud(a)?(o.moveTo(t[0],t[1]),o.lineTo(t[0]+(e[0]-t[0])*n,t[1]),o.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(o.moveTo(t[0],t[1]),o.lineTo(t[0],t[1]+(e[1]-t[1])*n),o.lineTo(e[0],t[1]+(e[1]-t[1])*n)),o.lineTo(e[0],e[1]),o);return $(new T).call(A,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(A,h).node()}},B2=(D2.props={defaultEnterAnimation:"fadeIn"},t=>{const u=U(t,[]);return(t,e,n,r)=>{var i,o,a,{mark:s,shape:l,defaultShape:c}=e,r=yg(r,s,l,c),s=r["stroke"],l=U(r,["stroke"]),{color:c=s,transform:r}=e,[e,s]=t,t=ny();return t.moveTo(e[0],e[1]),hd(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],s[0],s[1])):([[n,i],[o,a]]=[e,s],hg(t,e,s,[(n+o)/2,(i+a)/2],rg(e,s)/2)),$(new T).call(A,l).style("d",t.toString()).style("stroke",c).style("transform",r).call(A,u).node()}}),z2=(B2.props={defaultEnterAnimation:"fadeIn"},t=>{const l=U(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),i=r["stroke"],o=U(r,["stroke"]),{color:a=i,src:r="",size:e=32,transform:i=""}=e,[[t,s]]=t,t=t-Number(e)/2,s=s-Number(e)/2;return $(new bs).call(A,o).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",a).style("transform",i).call(A,l).node()}});z2.props={defaultEnterAnimation:"fadeIn"};const G2=t=>{const l=U(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:o,color:a,transform:s}=e,r=yg(r,e,i,o),{fill:e,stroke:i}=r,o=U(r,["fill","stroke"]),r=function(i,t){const o=ny();if(hd(t)){const a=t.getCenter();t=[...i,i[0]];const s=t.map(t=>rg(t,a));return t.forEach((t,e)=>{var n,r;0===e?o.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?hg(o,r,t,a,n):o.lineTo(t[0],t[1]))}),o.closePath(),o}return n=o,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return $(new T).call(A,o).style("d",r.toString()).style("stroke",a||i).style("fill",a||e).style("transform",s).call(A,l).node()}};G2.props={defaultEnterAnimation:"fadeIn"};const H2=t=>{const l=U(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:o,color:a,transform:s}=e,r=yg(r,e,i,o),{fill:e,stroke:i}=r,o=U(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,o]=t,a=ny();return hd(e)?(n=rg(e=e.getCenter(),t),a.moveTo(t[0],t[1]),a.quadraticCurveTo(e[0],e[1],i[0],i[1]),hg(a,i,o,e,n),a.quadraticCurveTo(e[0],e[1],r[0],r[1]),hg(a,r,t,e,n),a.closePath()):(a.moveTo(t[0],t[1]),a.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(t[0],t[1]),a.closePath()),a}(t,n);return $(new T).call(A,o).style("d",r.toString()).style("fill",a||e).style("stroke",a||i).style("transform",s).call(A,l).node()}};H2.props={defaultEnterAnimation:"fadeIn"};const W2=t=>{const g=U(t,[]);return(t,e,n,r)=>{var i,o,a,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=yg(r,e,h,f),{fill:e,stroke:h}=r,f=U(r,["fill","stroke"]),y=(r=t,t=n,n=ny(),hd(t)?([i,o]=t=t.getCenter(),a=ig(ng(r[0],t)),s=ig(ng(r[1],t)),y=rg(t,r[2]),l=rg(t,r[3]),c=rg(t,r[8]),u=rg(t,r[10]),t=rg(t,r[11]),n.moveTo(...r[0]),n.arc(i,o,y,a,s),n.arc(i,o,y,s,a,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,o,l,a,s),n.lineTo(...r[6]),n.arc(i,o,u,s,a,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,o,c,a,s),n.arc(i,o,c,s,a,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,o,t,a,s),n.arc(i,o,t,s,a,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return $(new T).call(A,f).style("d",y.toString()).style("stroke",d||h).style("fill",d||e).style("transform",p).call(A,g).node()}};W2.props={defaultEnterAnimation:"fadeIn"};const Y2=t=>{const s=U(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),{stroke:i,lineWidth:o}=r,a=U(r,["stroke","lineWidth"]),{color:r=i,size:i=o}=e,t=(o=t,hd(t=n)?(t=t.getCenter(),ky()({startAngle:0,endAngle:2*Math.PI,outerRadius:rg(o[0],t),innerRadius:rg(o[1],t)})):Py().x(t=>t[0]).y(t=>t[1])(o)),o=(o=n,n=e.transform,hd(o)?([o,e]=o.getCenter(),`translate(${o}, ${e}) `+(n||"")):n);return $(new T({})).call(A,a).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",o).call(A,s).node()}};Y2.props={defaultEnterAnimation:"fadeIn"};class V2 extends ls{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawPath(),this.drawEndMarker()}drawPath(){var t=this.attributes,e=t["connectorPath"],t=U(t,["connectorPath","class"]);this.connector=$(this.connector||this.appendChild(new T({}))).style("path",e).call(A,t).node()}drawEndMarker(){var{stroke:t,endMarker:e={}}=this.style,{r:n=4}=e,e=U(e,["r"]);this.endMarker=this.endMarker||this.appendChild(new C({})),this.endMarker.update(Object.assign({size:2*n,fill:t},e))}}function q2(t,e,n){return[["M",t-n,e+2*n],["L",t,e],["L",t+n,e+2*n],["Z"]]}function X2(t,e,n){return[["M",t,e],["L",t-n,e-2*n],["L",t+n,e-2*n],["Z"]]}function U2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}const $2=t=>{const{direction:l="upward",offset:c=12,endMarker:u}=t,h=U(t,["direction","offset","endMarker"]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=yg(r,i,o,a),{fill:i,stroke:o=i,endMarker:a}=r,i=U(r,["fill","stroke","endMarker"]),{color:r,transform:e}=e,n=function(t,e,n,r){var[e,i]=e;return ud(t)?[e,[t="downward"===n?Math.min(e[0],i[0])-r:Math.max(e[0],i[0])+r,e[1]],[t,i[1]],i]:(t="downward"===n?Math.max(e[1],i[1])+r:Math.min(e[1],i[1])-r,[e,[e[0],t],[i[0],t],i])}(n,t,l,c),t=(t=n,Py().x(t=>t[0]).y(t=>t[1])(t)),[,,,s]=n,a=N({},a,u);return $(new V2({})).call(A,i).style("connectorPath",t).style("stroke",r||o).style("transform",e).style("endMarker",Object.assign({x:s[0],y:s[1],symbol:function(t){var[,,t,e]=t;return e[0]<t[0]?U2:t[1]>e[1]?q2:X2}(n)},a)).call(A,h).node()}};function Z2(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function K2(t,e,o,n){var r=o["bounds"];const[[a,s],[i,l]]=r,c=i-a,u=l-s;r=t=>{var{x:e,y:n}=t,r=Z2(o.x,c),i=Z2(o.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+a,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:"inside"===t?{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"}:{})}function J2(t,e,n,r){var{y:i,y1:o}=n,{startAngle:e,endAngle:i,innerRadius:o,outerRadius:a}=pg(r,e,[i,o]),e=(e+i)/2,i=r.getCenter(),{radius:r=.5}=n,n=("inside"===t?o+(a-o)*r:a)+("inside"===t?0:12);return{x:i[0]+Math.sin(e)*n,y:i[1]-Math.cos(e)*n,textAlign:"center",textBaseline:"middle"}}function Q2(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(yd(r)?J2:K2)(t,e,n,r)}$2.props={defaultEnterAnimation:"fadeIn"};var tx=Object.freeze({__proto__:null,top:Q2,bottom:Q2,right:Q2,left:Q2,topLeft:Q2,topRight:Q2,bottomLeft:Q2,bottomRight:Q2,inside:Q2,outside:Q2,area:function(t,e,n,r){var i=e.length/2;const o=e.slice(0,i),a=e.slice(i);var e=nd(o,(t,e)=>Math.abs(t[1]-a[e][1])),i=(l=t=>[o[t][0],(o[t][1]+a[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=ig(ng(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function ex(t,e,n,r){var i,o=e["position"],o=(i=n,void 0!==(o=o)?o:yd(i)?"inside":ud(i)?"right":"top");return Object.assign(Object.assign({},tx[o.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})](o,t,e,n)),r["inside"===o?"innerLabel":"label"])}const nx=t=>(t,e,n,r)=>{var i=e["text"],o=U(e,["text","x","y"]),t=ex(t,e,n,r);return $(new As).call(A,t).style("text",""+i).call(A,o).node()},rx=(nx.props={},t=>{var e="#5B8FF9";return Object.assign({},{defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:"black",enter:{duration:300,fill:"both",delay:0},line:{line:{stroke:e,strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fill:e,fillOpacity:.95,lineWidth:0},hollow:{r:3,stroke:e,strokeOpacity:.95,lineWidth:1},plus:{r:3,stroke:e,strokeOpacity:.95,lineWidth:3},diamond:{r:3,stroke:e,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fill:e,fillOpacity:.95},hollow:{stroke:e,strokeOpacity:1,lineWidth:2}},area:{area:{fill:e,fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fill:e,fillOpacity:.95}},cell:{rect:{fill:e,fillOpacity:.95},hollow:{stroke:e,strokeOpacity:1,lineWidth:2}},link:{link:{stroke:e,strokeOpacity:1}},vector:{vector:{fill:e,stroke:e,fillOpacity:1}},box:{box:{fill:e,fillOpacity:.95,stroke:e,lineWidth:2}},text:{text:{fill:"#1D2129",fontSize:12}},lineX:{line:{stroke:"#416180",strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:"#416180",strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:"#416180",fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:"#416180",fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,endMarker:{fillOpacity:.85}}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:"black"}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:"#000",titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,axisStroke:"#416180",axisStrokeOpacity:.45,axisLineWidth:.5,tickLineStroke:"#BFBFBF",tickLineLineWidth:1,tickLineLength:4,subTickLineStroke:"#D9D9D9",subTickLineLineWidth:1,subTickLineLength:2,labelFill:"#2C3542",labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:"#416180",gridStrokeOpacity:.15,gridLineWidth:.5,gridLineDash:[0,0]},legend:{titleFill:"#8C8C8C",titleFontSize:12,titleLineHeight:21,titleFontWeight:"bold",markerFill:e,markerSpacing:8,markerSize:4,itemNameFill:"#595959",itemNameFillOpacity:.65,itemNameFontSize:12,itemNameFontWeight:"lighter",itemValueFill:"#595959",itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal"},label:{fill:"#000",fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null},innerLabel:{fill:"#FFF",fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null},title:{fill:"#1D2129",fillOpacity:1,fontSize:40,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:"#424E66",fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}},t)}),ix=(rx.props={},t=>{var e="#5B8FF9";return Object.assign({},{defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:"black",enter:{duration:300,fill:"both",delay:0},line:{line:{stroke:e,strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fill:e,fillOpacity:.95,lineWidth:0},hollow:{r:3,stroke:e,strokeOpacity:.95,lineWidth:1},plus:{r:3,stroke:e,strokeOpacity:.95,lineWidth:3},diamond:{r:3,stroke:e,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fill:e,fillOpacity:.95},hollow:{stroke:e,strokeOpacity:1,lineWidth:2}},area:{area:{fill:e,fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fill:e,fillOpacity:.95}},cell:{rect:{fill:e,fillOpacity:.95},hollow:{stroke:e,strokeOpacity:1,lineWidth:2}},link:{link:{stroke:e,strokeOpacity:1}},vector:{vector:{fill:e,stroke:e,fillOpacity:1}},box:{box:{fill:e,fillOpacity:.95,stroke:e,lineWidth:2}},text:{text:{fill:"#1D2129",fontSize:12}},lineX:{line:{stroke:"#416180",strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:"#416180",strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:"#416180",fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:"#416180",fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,endMarker:{fillOpacity:.85}}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:"black"}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:"#fff",titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,axisStroke:"#FFF",axisStrokeOpacity:.3,axisLineWidth:.5,tickLineStroke:"#BFBFBF",tickLineLineWidth:1,tickLineLength:4,subTickLineStroke:"#D9D9D9",subTickLineLineWidth:1,subTickLineLength:2,labelFill:"#FFF",labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:"#FFF",gridStrokeOpacity:.15,gridLineWidth:.5,gridLineDash:[0,0]},legend:{titleFill:"#FFF",titleFontSize:12,titleLineHeight:21,titleFontWeight:"bold",markerFill:e,markerSpacing:8,markerSize:4,itemNameFill:"#FFF",itemNameFillOpacity:.65,itemNameFontSize:12,itemNameFontWeight:"normal",itemValueFill:"#FFF",itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal"},label:{fill:"#FFF",fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null},innerLabel:{fill:"#FFF",fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:"#000",lineWidth:.5},title:{fill:"#FFF",fillOpacity:.9,fontSize:40,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:"#FFF",fillOpacity:.85,fontSize:10,fontWeight:"normal",textBaseline:"top"}},t)});function ox(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}ix.props={};var ax,sx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lx(t){var e;if(e=sx.exec(t))return new cx({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function cx(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ux(t,e){var n,e=ox(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}lx.prototype=cx.prototype,cx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var hx={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ux(100*t,e),r:ux,s:function(t,e){var n,r,i=ox(t,e);return i?(n=i[0],(i=(i=i[1])-(ax=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+ox(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function fx(t){return t}var dx,px,yx=Array.prototype.map,gx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mx(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?fx:(s=yx.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,o=s[0],a=0;0<n&&0<o&&(e<a+o+1&&(o=Math.max(1,e-a)),r.push(t.substring(n-=o,n+o)),!((a+=o+1)>e));)o=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",E=void 0===t.decimal?".":t.decimal+"",M=void 0===t.numerals?fx:(e=yx.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),o=void 0===t.percent?"%":t.percent+"",S=void 0===t.minus?"−":t.minus+"",O=void 0===t.nan?"NaN":t.nan+"";function a(t){var c=(t=lx(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,y=t.precision,g=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):hx[m]||(void 0===y&&(y=12),g=!0,m="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?o:"",x=hx[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,o=b;if("c"===m)o=x(t)+o,t="";else{var a=(t=+t)<0||1/t<0;if(t=isNaN(t)?O:x(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((a=a&&0==+t&&"+"!==h?!1:a)?"("===h?h:S:"-"===h||"("===h?"":h)+i,o=("s"===m?gx[8+ax/3]:"")+o+(a&&"("===h?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){o=(46===r?E+t.slice(e+1):t.slice(e))+o,t=t.slice(0,e);break}}p&&!f&&(t=k(t,1/0));var s=i.length+t.length+o.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&f&&(t=k(l+t,l.length?d-o.length:1/0),l=""),u){case"<":t=i+t+o+l;break;case"=":t=i+l+t+o;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+o+l.slice(s);break;default:t=l+i+t+o}return M(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:a,formatPrefix:function(t,e){var n=a(((t=lx(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=ox(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=gx[8+e/3];return function(t){return n(r*t)+i}}}}function vx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function bx(o,t,e,n,r,i,a,s){void 0===e&&void 0===i||o.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=o).getTicks?i.getTicks():t?([c,l]=Vf(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=o.getFormatter)?void 0:l.call(o))||n,h=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:o,insetRight:a}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[o,a,e];const s=new f0({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(a,s),f=function(r,i){const{width:o,height:a}=i.getOptions();return t=>{var e,n;return pd(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new f0({domain:[0,o],range:[0,1]}).map(n)):"left"===r?(n=e[1],new f0({domain:[0,a],range:[0,1]}).map(n)):t):t}}(a,s);return hd(s)||ud(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=o.getBandWidth)?void 0:i.call(o,t))/2||0,i=h(o.map(t)+i);return{value:ud(s)&&null!=(r=o.getTicks)&&r.call(o)?1-i:i,text:u(t,e,n)}}),(e=(e=s).getOptions().transformations).some(([t])=>t.startsWith("reflect"))&&e.some(([t])=>t.startsWith("transpose"))&&"arcY"===a?i.map(({value:t,text:e})=>({value:1-t,text:e})):i):c.map((t,e,n)=>{var r=(null==(r=o.getBandWidth)?void 0:r.call(o,t))/2||0;return{value:f(h(o.map(t)+r)),text:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n)}})}function xx(t,e,n,r,i){var o;return hd(o=n)&&ud(o)||dd(n)?[]:t.map(t=>{t=function(t,e,n,r,i){var[r,o]=r,[i,a]=i,[n,s]=vx(n);let l,c,u,h;return"bottom"===e||"top"===e?(l=c=r+(i-r)*t,u=o,h="bottom"===e?o-s:o+s):(u=h=o+(a-o)*t,l=r,c="left"===e?r+n:r-n),[[l,u],[c,h]]}(t.value,e,n,r,i);return{points:hd(n)?[t[0]]:t}})}fo=mx({thousands:",",grouping:[3],currency:["$",""]}),dx=fo.format,fo.formatPrefix;const wx=t=>{const{position:u,tickFormatter:h=t=>""+t,tickFilter:f,tickCount:d,tickMethod:p}=t,y=U(t,["position","tickFormatter","tickFilter","tickCount","tickMethod"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:o,width:a,height:s}=i,i=[i+a/2,o+s/2],o=bx(t,e,d,h,f,p,u,n),t=Math.min(a,s)/2,[e,a]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),{grid:c=!1}=y,c=c?function(t,e,n,r,i,o,a){const[s,l]=e;var[e,a]=vx(a),e=Math.min(e,a)/2;const c=i*e,u=o*e;return t.map(({value:t})=>{var t=(r-n)*t+n,e=Math.cos(t*Math.PI/180),t=Math.sin(t*Math.PI/180);return{points:[[s+c*e,l+c*t],[s+u*e,l+u*t]]}})}(o,i,e,a,s,l,n):[];return new Sv({style:N({},{center:i,radius:t,startAngle:e,endAngle:a,ticks:o,verticalFactor:"arc"===u?1:-1,axisLine:{style:{lineWidth:0,strokeOpacity:0}},grid:{items:c,lineStyle:{stroke:"#1b1e23",strokeOpacity:.1,lineDash:[0,0]}},tickLine:{len:4,style:{lineWidth:1,stroke:"#BFBFBF"}},label:{align:"arcInner"===u?"radial":"tangential",tickPadding:2}})})}},kx=v=>{const{position:b,title:x,tickFormatter:w=t=>""+t,direction:k="left",tickCount:E,tickFilter:M,tickMethod:S,titleAnchor:O}=v,_=U(v,["position","title","tickFormatter","direction","tickCount","tickFilter","tickMethod","titleAnchor"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{startPos:o,endPos:a,labelOffset:s,titlePosition:l,titlePadding:c,titleRotate:u,verticalFactor:h,titleOffsetY:f,labelAlign:d,axisLine:p,label:y=void 0===v.label||v.label,tickLine:g=void 0===v.tickLine||v.tickLine}=function(t,e,n){var{x:n,y:r,width:i,height:o}=n;return"bottom"===t?{startPos:[n,r],endPos:[n+i,r],labelOffset:8,titlePosition:"end",titlePadding:2,titleRotate:0,verticalFactor:1}:"left"===t||"centerHorizontal"===t?{startPos:[n+i,r],endPos:[n+i,r+o],titlePosition:"center",titlePadding:6,titleRotate:-90,labelAlign:"end",labelOffset:4,verticalFactor:-1}:"right"===t?{startPos:[n,r],endPos:[n,r+o],titlePosition:"center",titlePadding:16,titleRotate:-90,labelAlign:"start",labelOffset:4,verticalFactor:1}:"arcY"===t?{startPos:[n,r],endPos:[n+i,r+o],titlePosition:"start",titlePadding:4,titleOffsetY:-5,titleRotate:0,labelOffset:"left"===e?4:"right"===e?-4:0,verticalFactor:-1,labelAlign:"center"===e?"center":"right"===e?"start":void 0,axisLine:!1}:{startPos:[n,r+o],endPos:[n+i,r+o],titlePosition:"end",titlePadding:2,titleRotate:0,labelOffset:4,verticalFactor:-1}}(b,k,i),e=bx(t,e,E,w,M,S,b,n),l="arcY"===b||t.getTicks?l:"center",[,m]=n.getCenter(),{grid:t=!!t.getTicks}=_,t=t?xx(e,b,n,o,a):[],n=Qy(_,"line");return new yv({style:N(Object.assign({startPos:o,endPos:a,verticalFactor:h,ticks:e,label:y?Object.assign(Object.assign({tickPadding:s,autoHide:!1,autoRotate:!0},Qy(_,"label")),{style:Object.assign(Object.assign({},d&&{textAlign:d}),Qy(_,"label"))}):null,axisLine:p||Object.keys(n).length?{stroke:"#BFBFBF",style:n}:null,grid:Object.assign({items:t,lineStyle:{stroke:"#1b1e23",strokeOpacity:.05,lineDash:[0,0]}},"arcY"===b&&{type:"circle",center:[i.x,m+i.y],closed:!0}),tickLine:g?{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},Qy(_,"tick"))}:null},x&&{title:{content:(o=x,Array.isArray(o)?o.join(", "):""+o),titleAnchor:O||l,style:Object.assign({fontWeight:"bold",fillOpacity:1,dy:f,textAnchor:l},Qy(_,"title")),titlePadding:c,rotate:u}}))})}},Ex=t=>{const{position:i,tickFormatter:e=t=>""+t}=t;var n="string"==typeof e?dx(e):e;const o=Object.assign(Object.assign({},t),{tickFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?wx:kx)(o)(t,e,n,r)},Mx=(Ex.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>Ex(t)),Sx=(Mx.props=Object.assign(Object.assign({},Ex.props),{defaultPosition:"bottom"}),t=>Ex(t)),Ox=(Sx.props=Object.assign(Object.assign({},Ex.props),{defaultPosition:"left"}),t=>{const{position:c,tickFormatter:u=t=>""+t,dx:h=0,dy:f=0,title:d,cols:p=void 0,autoWrap:y=!1}=t,g=U(t,["position","tickFormatter","dx","dy","title","cols","autoWrap"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:o,width:a,height:s}=i,t=t.map(t=>({id:t,name:u(t),color:e.map(t)})),l=y&&p?a/p:void 0,t=N({},Object.assign(Object.assign({items:t,x:i+h,y:o+f,orient:["right","left","arcCenter"].includes(c)?"vertical":"horizontal",maxWidth:a,maxHeight:s,autoWrap:y,maxItemWidth:l,itemWidth:l,spacing:[8,0],itemName:{style:{fontSize:12,fillOpacity:1,fill:"#000",fontWeight:"lighter",active:{fillOpacity:.8},inactive:{fill:"#d8d8d8"},unchecked:{fill:"#d8d8d8"}}}},d&&{title:{content:Array.isArray(d)?d[0]:d,style:{fontSize:12,fontWeight:"bold",fillOpacity:1}}}),{itemMarker:{size:8,symbol:"circle",style:{fillOpacity:1,inactive:{fillOpacity:.2},unchecked:{fill:"#d8d8d8",stroke:"#d8d8d8"}}},itemBackgroundStyle:{fill:"transparent"}}),Object.assign({},g));return new Mb({className:"category-legend",style:t})}}),_x=(Ox.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const c=t["title"];return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:o}=i,a=(null==(a=e.getTicks)?void 0:a.call(e))||[],[s,l]=t;return new Yb({style:Object.assign(Object.assign({x:i,y:o,rail:{length:120,size:12,ticks:a},min:s,max:l,indicator:null,handle:null},c&&{title:{content:Array.isArray(c)?c[0]:c,style:{fontSize:12}}}),{color:t.map(t=>e.map(t))})})}});function Px(t,e,n){return t.querySelector(e)?$(t).select(e):$(t).append(n)}_x.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};px={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:o}=t;t=Px(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(A,r||{}).node().getLocalBounds();Px(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===o||void 0===o?void 0:o.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},o))})}};const Tx=class extends ls{constructor(t){super(t),this.descriptor=px}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(N({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},Ax=t=>{const{text:o,style:a,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new Tx({style:N({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:a,text:o,subtitle:s,subtitleStyle:l})})}};Ax.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class Lx{constructor(t){this.$value=t}static of(t){return new Lx(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Nx(t,e,n){return Lx.of({}).call(Cx,t).call(Cx,e).call(Cx,n).value()}function Cx(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function jx(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const Ix=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],Rx=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=ud(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(a+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],a=(o.setOrigin(r),o.animate(t,Nx(i,n,u)));return a.finished.then(()=>o.setOrigin(0,0)),a}},Fx=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=ud(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(o.setOrigin(r),o.animate(s,Nx(i,n,u)));return l.finished.then(()=>o.setOrigin(0,0)),l}},Dx=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=ud(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(a+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],a=(o.setOrigin(r),o.animate(t,Nx(i,n,u)));return a.finished.then(()=>o.setOrigin(0,0)),a}},Bx=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=ud(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(o.setOrigin(r),o.animate(s,Nx(i,n,u)));return l.finished.then(()=>o.setOrigin(0,0)),l}},zx=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:o,strokeOpacity:a,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:s}],Nx(i,n,l))},Gx=(zx.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:o,strokeOpacity:a,opacity:s}=t.style;return t.animate([{fillOpacity:o,strokeOpacity:a,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Nx(i,n,l))});function Hx(t,e){var[n,r,i,t]=function(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}(t),o=Math.ceil(Math.sqrt(e/(t/i))),a=[],s=t/Math.ceil(e/o);let l=0,c=e;for(;0<c;){var u=Math.min(c,o),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+l*s;a.push(function(t){var[t,e,n,r]=t;return`
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(h){"use strict";const f="main-layer",tt="label-layer",et="element",B="view",nt="plot",rt="component",it="label",ot="area";function p(t,e,n,r,i){!function t(e,n,r,i,o){for(;r<i;){600<i-r&&(a=i-r+1,u=n-r+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(u-a/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/a+l)),u=Math.min(i,Math.floor(n+(a-u)*s/a+l)),t(e,n,c,u,o));var a,s,l,c,u,h=e[n],f=r,d=i;for(g(e,r,n),0<o(e[i],h)&&g(e,r,i);f<d;){for(g(e,f,d),f++,d--;o(e[f],h)<0;)f++;for(;0<o(e[d],h);)d--}0===o(e[r],h)?g(e,r,d):g(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||x)}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function x(t,e){return t<e?-1:e<t?1:0}class w{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;var r=[];if(X(e,n))for(var i=this.toBBox,o=[];n;){for(let t=0;t<n.children.length;t++){var a=n.children[t],s=n.leaf?i(a):a;X(e,s)&&(n.leaf?r.push(a):U(e,s)?this._all(a,r):o.push(a))}n=o.pop()}return r}collides(e){let n=this.data;if(X(e,n))for(var r=[];n;){for(let t=0;t<n.children.length;t++){var i=n.children[t],o=n.leaf?this.toBBox(i):i;if(X(e,o)){if(n.leaf||U(e,o))return!0;r.push(i)}}n=r.pop()}return!1}load(e){if(e&&e.length)if(e.length<this._minEntries)for(let t=0;t<e.length;t++)this.insert(e[t]);else{let t=this._build(e.slice(),0,e.length-1,0);var n;this.data.children.length?this.data.height===t.height?this._splitRoot(this.data,t):(this.data.height<t.height&&(n=this.data,this.data=t,t=n),this._insert(t,this.data.height-t.height-1,!0)):this.data=t}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=$([]),this}remove(i,o){if(i){let t=this.data;var a=this.toBBox(i),s=[],l=[];let e,n,r;for(;t||s.length;){if(t||(t=s.pop(),n=s[s.length-1],e=l.pop(),r=!0),t.leaf){var c=function(e,n,r){if(!r)return n.indexOf(e);for(let t=0;t<n.length;t++)if(r(e,n[t]))return t;return-1}(i,t.children,o);if(-1!==c)return t.children.splice(c,1),s.push(t),this._condense(s),this}r||t.leaf||!U(t,a)?n?(e++,t=n.children[e],r=!1):t=null:(s.push(t),l.push(e),e=0,t=(n=t).children[0])}}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){for(var n=[];t;)(t.leaf?e:n).push(...t.children),t=n.pop();return e}_build(n,t,r,i){var e=r-t+1;let o=this._maxEntries,a;if(e<=o)z(a=$(n.slice(t,r+1)),this.toBBox);else{i||(i=Math.ceil(Math.log(e)/Math.log(o)),o=Math.ceil(e/Math.pow(o,i-1))),(a=$([])).leaf=!1,a.height=i;var s=Math.ceil(e/o),l=s*Math.ceil(Math.sqrt(o));Z(n,t,r,l,this.compareMinX);for(let e=t;e<=r;e+=l){var c=Math.min(e+l-1,r);Z(n,e,c,s,this.compareMinY);for(let t=e;t<=c;t+=s){var u=Math.min(t+s-1,c);a.children.push(this._build(n,t,u,i-1))}}z(a,this.toBBox)}return a}_chooseSubtree(i,o,t,a){for(;;){if(a.push(o),o.leaf||a.length-1===t)break;let e=1/0,n=1/0,r;for(let t=0;t<o.children.length;t++){var s=o.children[t],l=V(s),c=(u=i,c=s,(Math.max(c.maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-l);c<n?(n=c,e=l<e?l:e,r=s):c===n&&l<e&&(e=l,r=s)}o=r||o.children[0]}var u,c;return o}_insert(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),H(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=$(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,z(n,this.toBBox),z(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)}_splitRoot(t,e){this.data=$([t,e]),this.data.height=t.height+1,this.data.leaf=!1,z(this.data,this.toBBox)}_chooseSplitIndex(e,n,r){let i,o=1/0,a=1/0;for(let t=n;t<=r-n;t++){var s=W(e,0,t,this.toBBox),l=W(e,t,r,this.toBBox),c=(h=s,c=l,u=d=f=void 0,f=Math.max(h.minX,c.minX),d=Math.max(h.minY,c.minY),u=Math.min(h.maxX,c.maxX),h=Math.min(h.maxY,c.maxY),Math.max(0,u-f)*Math.max(0,h-d)),u=V(s)+V(l);c<o?(o=c,i=t,a=u<a?u:a):c===o&&u<a&&(a=u,i=t)}var h,c,f,d,u;return i||r-n}_chooseSplitAxis(t,e,n){var r=t.leaf?this.compareMinX:G,i=t.leaf?this.compareMinY:Y;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(e,n,r,t){e.children.sort(t);var i=this.toBBox,o=W(e,0,n,i),a=W(e,r-n,r,i);let s=q(o)+q(a);for(let t=n;t<r-n;t++){var l=e.children[t];H(o,e.leaf?i(l):l),s+=q(o)}for(let t=r-n-1;t>=n;t--){var c=e.children[t];H(a,e.leaf?i(c):c),s+=q(a)}return s}_adjustParentBBoxes(e,n,r){for(let t=r;0<=t;t--)H(n[t],e)}_condense(n){for(let t=n.length-1,e;0<=t;t--)0===n[t].children.length?0<t?(e=n[t-1].children).splice(e.indexOf(n[t]),1):this.clear():z(n[t],this.toBBox)}}function z(t,e){W(t,0,t.children.length,e,t)}function W(e,n,r,i,o){(o=o||$(null)).minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let t=n;t<r;t++){var a=e.children[t];H(o,e.leaf?i(a):a)}return o}function H(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function G(t,e){return t.minX-e.minX}function Y(t,e){return t.minY-e.minY}function V(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function U(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function X(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function $(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Z(t,e,n,r,i){for(var o,a=[e,n];a.length;)(n=a.pop())-(e=a.pop())<=r||(p(t,o=e+Math.ceil((n-e)/r/2)*r,e,n,i),a.push(e,o,o,n))}var at=1e-6,st="undefined"!=typeof Float32Array?Float32Array:Array;function lt(){var t=new st(9);return st!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ct=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],h=n[0],f=n[1],d=n[2],p=n[3],y=n[4],g=n[5],m=n[6],v=n[7],n=n[8];return t[0]=h*r+f*a+d*c,t[1]=h*i+f*s+d*u,t[2]=h*o+f*l+d*e,t[3]=p*r+y*a+g*c,t[4]=p*i+y*s+g*u,t[5]=p*o+y*l+g*e,t[6]=m*r+v*a+n*c,t[7]=m*i+v*s+n*u,t[8]=m*o+v*l+n*e,t};function ut(){var t=new st(16);return st!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t){var e=new st(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ft(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function dt(t,e,n,r,i,o,a,s,l,c,u,h,f,d,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=y,t[15]=g,t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function yt(t,e){var n,r,i,o,a,s;return t===e?(n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function gt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15],m=n*s-r*a,v=n*l-i*a,b=n*c-o*a,x=r*l-i*s,w=r*c-o*s,k=i*c-o*l,M=u*y-h*p,E=u*g-f*p,O=u*e-d*p,S=h*g-f*y,_=h*e-d*y,A=f*e-d*g,P=m*A-v*_+b*S+x*O-w*E+k*M;return P?(t[0]=(s*A-l*_+c*S)*(P=1/P),t[1]=(i*_-r*A-o*S)*P,t[2]=(y*k-g*w+e*x)*P,t[3]=(f*w-h*k-d*x)*P,t[4]=(l*O-a*A-c*E)*P,t[5]=(n*A-i*O+o*E)*P,t[6]=(g*b-p*k-e*v)*P,t[7]=(u*k-f*b+d*v)*P,t[8]=(a*_-s*O+c*M)*P,t[9]=(r*O-n*_-o*M)*P,t[10]=(p*w-y*b+e*m)*P,t[11]=(h*b-u*w-d*m)*P,t[12]=(s*E-a*S-l*M)*P,t[13]=(n*S-r*E+i*M)*P,t[14]=(y*v-p*x-g*m)*P,t[15]=(u*x-h*v+f*m)*P,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],y=t[14],t=t[15];return(e*a-n*o)*(h*t-f*y)-(e*s-r*o)*(u*t-f*p)+(e*l-i*o)*(u*y-h*p)+(n*s-r*a)*(c*t-f*d)-(n*l-i*a)*(c*y-h*d)+(r*l-i*s)*(c*p-u*d)}function vt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],y=e[12],g=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*h+w*y,t[1]=v*i+b*l+x*f+w*g,t[2]=v*o+b*c+x*d+w*m,t[3]=v*a+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*h+w*y,t[5]=v*i+b*l+x*f+w*g,t[6]=v*o+b*c+x*d+w*m,t[7]=v*a+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*h+w*y,t[9]=v*i+b*l+x*f+w*g,t[10]=v*o+b*c+x*d+w*m,t[11]=v*a+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*h+w*y,t[13]=v*i+b*l+x*f+w*g,t[14]=v*o+b*c+x*d+w*m,t[15]=v*a+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,o,a,s,l,c,u,h,f,d,p,y=n[0],g=n[1],n=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+f*n+e[13],t[14]=o*y+c*g+d*n+e[14],t[15]=a*y+u*g+p*n+e[15]),t}function xt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=o*n+c*r,t[6]=a*n+u*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=c*n-o*r,t[10]=u*n-a*r,t[11]=h*n-s*r,t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[8],c=e[9],u=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=o*n-c*r,t[2]=a*n-u*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=o*r+c*n,t[10]=a*r+u*n,t[11]=s*r+h*n,t}function Mt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Et(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ot(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=r+r,s=i+i,l=o+o,c=r*a,u=r*s,r=r*l,h=i*s,i=i*l,o=o*l,a=e*a,s=e*s,e=e*l;return t[0]=1-(h+o),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+o),t[6]=i+a,t[7]=0,t[8]=r+s,t[9]=i-a,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function St(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function _t(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(l,c,e),t}function At(t,e){var n=new st(3),r=(_t(n,e),1/n[0]),i=1/n[1],n=1/n[2],o=e[0]*r,a=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=o+c+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(u-i)/h,t[1]=(r-s)/h,t[2]=(a-l)/h):c<o&&e<o?(h=2*Math.sqrt(1+o-c-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(a+l)/h,t[2]=(r+s)/h):e<c?(h=2*Math.sqrt(1+c-o-e),t[3]=(r-s)/h,t[0]=(a+l)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-o-c),t[3]=(a-l)/h,t[0]=(r+s)/h,t[1]=(u+i)/h,t[2]=.25*h),t}function Pt(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],e=e[3],l=o+o,c=a+a,u=s+s,h=o*l,f=o*c,o=o*u,d=a*c,a=a*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],y=i[0],g=i[1],i=i[2],m=(1-(d+s))*u,v=(f+e)*u,u=(o-c)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(a+l)*p,p=(o+c)*r,o=(a-l)*r,c=(1-(h+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=f,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=o,t[10]=c,t[11]=0,t[12]=n[0]+y-(m*y+f*g+p*i),t[13]=n[1]+g-(v*y+e*g+o*i),t[14]=n[2]+i-(u*y+s*g+c*i),t[15]=1,t}function Tt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n+n,a=r+r,s=i+i,n=n*o,l=r*o,r=r*a,c=i*o,u=i*a,i=i*s,o=e*o,a=e*a,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-a,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+o,t[7]=0,t[8]=c+a,t[9]=u-o,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Lt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Nt(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*c,t[15]=1,t}var Ct=Nt;function jt(t,e,n,r){var i,o,a,s,l=e[0],c=e[1],e=e[2],u=r[0],h=r[1],r=r[2],f=n[0],d=n[1],n=n[2];return Math.abs(l-f)<at&&Math.abs(c-d)<at&&Math.abs(e-n)<at?pt(t):(f=l-f,d=c-d,n=e-n,i=h*(n*=s=1/Math.hypot(f,d,n))-r*(d*=s),r=r*(f*=s)-u*n,u=u*d-h*f,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,h=d*u-n*r,o=n*i-f*u,a=f*r-d*i,(s=Math.hypot(h,o,a))?(h*=s=1/s,o*=s,a*=s):a=o=h=0,t[0]=i,t[1]=h,t[2]=f,t[3]=0,t[4]=r,t[5]=o,t[6]=d,t[7]=0,t[8]=u,t[9]=a,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(h*l+o*c+a*e),t[14]=-(f*l+d*c+n*e),t[15]=1,t)}function Ft(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Rt=Object.freeze({__proto__:null,create:ut,clone:ht,copy:ft,fromValues:function(t,e,n,r,i,o,a,s,l,c,u,h,f,d,p,y){var g=new st(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=h,g[12]=f,g[13]=d,g[14]=p,g[15]=y,g},set:dt,identity:pt,transpose:yt,invert:gt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(f*e-d*g)-h*(l*e-c*g)+y*(l*d-c*f),t[1]=-(r*(f*e-d*g)-h*(i*e-o*g)+y*(i*d-o*f)),t[2]=r*(l*e-c*g)-s*(i*e-o*g)+y*(i*c-o*l),t[3]=-(r*(l*d-c*f)-s*(i*d-o*f)+h*(i*c-o*l)),t[4]=-(a*(f*e-d*g)-u*(l*e-c*g)+p*(l*d-c*f)),t[5]=n*(f*e-d*g)-u*(i*e-o*g)+p*(i*d-o*f),t[6]=-(n*(l*e-c*g)-a*(i*e-o*g)+p*(i*c-o*l)),t[7]=n*(l*d-c*f)-a*(i*d-o*f)+u*(i*c-o*l),t[8]=a*(h*e-d*y)-u*(s*e-c*y)+p*(s*d-c*h),t[9]=-(n*(h*e-d*y)-u*(r*e-o*y)+p*(r*d-o*h)),t[10]=n*(s*e-c*y)-a*(r*e-o*y)+p*(r*c-o*s),t[11]=-(n*(s*d-c*h)-a*(r*d-o*h)+u*(r*c-o*s)),t[12]=-(a*(h*g-f*y)-u*(s*g-l*y)+p*(s*f-l*h)),t[13]=n*(h*g-f*y)-u*(r*g-i*y)+p*(r*f-i*h),t[14]=-(n*(s*g-l*y)-a*(r*g-i*y)+p*(r*l-i*s)),t[15]=n*(s*f-l*h)-a*(r*f-i*h)+u*(r*l-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,o,a,s,l,c,u,h,f,d,p,y,g,m,v,b,x,w,k,M,E=r[0],O=r[1],r=r[2],S=Math.hypot(E,O,r);return S<at?null:(E*=S=1/S,O*=S,r*=S,S=Math.sin(n),n=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],y=e[10],g=e[11],v=E*O*(i=1-n)-r*S,b=O*O*i+n,x=r*O*i+E*S,w=E*r*i+O*S,k=O*r*i-E*S,M=r*r*i+n,t[0]=o*(n=E*E*i+n)+c*(m=O*E*i+r*S)+d*(r=r*E*i-O*S),t[1]=a*n+u*m+p*r,t[2]=s*n+h*m+y*r,t[3]=l*n+f*m+g*r,t[4]=o*v+c*b+d*x,t[5]=a*v+u*b+p*x,t[6]=s*v+h*b+y*x,t[7]=l*v+f*b+g*x,t[8]=o*w+c*k+d*M,t[9]=a*w+u*k+p*M,t[10]=s*w+h*k+y*M,t[11]=l*w+f*k+g*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:kt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[4],c=e[5],u=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=o*n+c*r,t[2]=a*n+u*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=c*n-o*r,t[6]=u*n-a*r,t[7]=h*n-s*r,t},fromTranslation:Mt,fromScaling:Et,fromRotation:function(t,e,n){var r,i=n[0],o=n[1],n=n[2],a=Math.hypot(i,o,n);return a<at?null:(i*=a=1/a,o*=a,n*=a,a=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=o*i*r+n*a,t[2]=n*i*r-o*a,t[3]=0,t[4]=i*o*r-n*a,t[5]=o*o*r+e,t[6]=n*o*r+i*a,t[7]=0,t[8]=i*n*r+o*a,t[9]=o*n*r-i*a,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:Ot,fromQuat2:function(t,e){var n=new st(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=r*r+i*i+o*o+a*a;return 0<h?(n[0]=2*(s*a+u*r+l*o-c*i)/h,n[1]=2*(l*a+u*i+c*r-s*o)/h,n[2]=2*(c*a+u*o+s*i-l*r)/h):(n[0]=2*(s*a+u*r+l*o-c*i),n[1]=2*(l*a+u*i+c*r-s*o),n[2]=2*(c*a+u*o+s*i-l*r)),Ot(t,e,n),t},getTranslation:St,getScaling:_t,getRotation:At,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],e=e[3],s=i*(u=i+i),l=i*(h=o+o),i=i*(f=a+a),c=o*h,o=o*f,a=a*f,u=e*u,h=e*h,e=e*f,f=r[0],d=r[1],r=r[2];return t[0]=(1-(c+a))*f,t[1]=(l+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+a))*d,t[6]=(o+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(o-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Pt,fromQuat:Tt,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),l=1/(i-r),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t},perspectiveNO:Lt,perspective:Lt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+e),l=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-e)*s*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Nt,ortho:Ct,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),a=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=a,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=o*a,t[15]=1,t},lookAt:jt,targetTo:function(t,e,n,r){var i=e[0],o=e[1],e=e[2],a=r[0],s=r[1],r=r[2],l=i-n[0],c=o-n[1],n=e-n[2],u=l*l+c*c+n*n,h=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=h*h+(r=r*l-a*n)*r+(a=a*c-s*l)*a)&&(h*=u=1/Math.sqrt(u),r*=u,a*=u),t[0]=h,t[1]=r,t[2]=a,t[3]=0,t[4]=c*a-n*r,t[5]=n*h-l*a,t[6]=l*r-c*h,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=o,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Ft,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],y=t[13],g=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],M=e[6],E=e[7],O=e[8],S=e[9],_=e[10],A=e[11],P=e[12],T=e[13],L=e[14],e=e[15];return Math.abs(n-m)<=at*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=at*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=at*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-x)<=at*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-w)<=at*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-k)<=at*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=at*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-E)<=at*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-O)<=at*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-S)<=at*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=at*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-A)<=at*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-P)<=at*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(y-T)<=at*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(g-L)<=at*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(t-e)<=at*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:Ft});function m(){var t=new st(3);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=new st(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Dt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function k(t,e,n){var r=new st(3);return r[0]=t,r[1]=e,r[2]=n,r}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ht(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Gt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Yt(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qt(t,e,n){var r=e[0],i=e[1],e=e[2],o=n[0],a=n[1],n=n[2];t[0]=i*n-e*a,t[1]=e*o-r*n,t[2]=r*a-i*o}function Ut(t,e,n,r){var i=e[0],o=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=e+r*(n[2]-e)}function Xt(t,e,n){var r=e[0],i=e[1],e=e[2],o=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/o,t}function $t(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Zt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],o=e[1],e=e[2];return Math.abs(n-i)<=at*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=at*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(t-e)<=at*Math.max(1,Math.abs(t),Math.abs(e))}var Kt=Ht,Jt=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},Qt=Dt;function te(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ee(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*e,t}function ne(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function re(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function ie(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*a+i*l-o*s,t[1]=i*n+e*s+o*a-r*l,t[2]=o*n+e*l+r*s-i*a,t[3]=e*n-r*a-i*s-o*l,t}function oe(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e,o=o?1/o:0;return t[0]=-n*o,t[1]=-r*o,t[2]=-i*o,t[3]=e*o,t}function ae(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),o=Math.sin(n),n=Math.cos(n),a=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*o*a,t[1]=e*o*r+i*n*a,t[2]=e*n*a-i*o*r,t[3]=e*n*r+i*o*a}m(),te();var se=function(t,e,n,r){var i=new st(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},le=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ce=ie,ue=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e;return 0<o&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=e*o,t};function he(t,e){var n=new st(2);return n[0]=t,n[1]=e,n}function fe(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function de(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function pe(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ye(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ge(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function me(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}function ve(t,e){return t[0]*e[0]+t[1]*e[1]}function be(t,e){return t[0]===e[0]&&t[1]===e[1]}m(),k(1,0,0),k(0,1,0),ne(),ne(),lt();var xe=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function we(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new st(2),st!=Float32Array&&(e[0]=0,e[1]=0);var ke=function(t,e){return(ke=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ke(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var O=function(){return(O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function K(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}function Me(t,a,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function i(t){try{o(l.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}o((l=l.apply(t,a||[])).next())})}function I(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Ee(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var Oe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var Se={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function _e(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return Se[e]===t.length-1&&"achlmqstvz".includes(e)})}function Ae(t){return _e(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Pe(t){return Ae(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Te(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Se[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,Se[n]))),Se[n]););}function Le(t){return 48<=t&&t<=57}function Ne(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Ce(t){var e,n,r,i,o,a=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=Se[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,Ne(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|c)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,o=t.index,a=o,s=!1,l=!1,c=!1;if(r<=a)t.err="[path-util]: Invalid path value at index "+a+', "pathValue" is missing param';else if(Le(n=43!==(n=i.charCodeAt(a))&&45!==n?n:i.charCodeAt(a+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(a+=1),e&&a<r&&n&&Le(n))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" illegal number';for(;a<r&&Le(i.charCodeAt(a));)a+=1,s=!0;n=i.charCodeAt(a)}if(46===n){for(c=!0,a+=1;Le(i.charCodeAt(a));)a+=1,l=!0;n=i.charCodeAt(a)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid float exponent';if(43!==(n=i.charCodeAt(a+=1))&&45!==n||(a+=1),!(a<r&&Le(i.charCodeAt(a))))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid integer exponent';for(;a<r&&Le(i.charCodeAt(a));)a+=1}t.index=a,t.param=+t.pathValue.slice(o,a)}else t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" is not a number'}(t):(o=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(o=i.charCodeAt(r))?(n.param=0,n.index+=1):49===o?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Ne(t),t.index<a&&44===s.charCodeAt(t.index)&&(t.index+=1,Ne(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Te(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var je=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Fe(t){var a,s,l,c;return Ae(t)?we(t):(t=function(t){if(_e(t))return we(t);var e=new je(t);for(Ne(e);e.index<e.max&&!e.err.length;)Ce(e);return e.err||e.segments}(t),c=l=s=a=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return a=e[0],s=e[1],["M",l=a,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+a,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+a];break;default:var r=e.map(function(t,e){return t+(e%2?s:a)}),i=[n].concat(r)}else i=[n].concat(e);var o=i.length;switch(n){case"Z":a=l,s=c;break;case"H":a=i[1];break;case"V":s=i[1];break;default:a=i[o-2],s=i[o-1],"M"===n&&(l=a,c=s)}return i}))}function Re(t){if(Pe(t))return we(t);for(var e,n,r,i,o,a,s,l=Fe(t),c=O({},Oe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=a=f=o=h=i=r=void 0,r=e[0],i=n.x1,h=n.y1,o=n.x2,f=n.y2,a=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],h]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*h-f,s=["C",n.x1=2*i-o,n.y1=e].concat(a)):"T"===r?(f=2*i-n.qx,o=2*h-n.qy,s=["Q",n.qx=f,n.qy=o].concat(a)):"Q"===r&&(e=a[0],i=a[1],n.qx=e,n.qy=i),s);var h=l[u],f=h.length;c.x1=+h[f-2],c.y1=+h[f-1],c.x2=+h[f-4]||c.x1,c.y2=+h[f-3]||c.y1}return l}function Ie(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function De(t,e,n,r,i,o,a,s,l,c){var u=120*Math.PI/180,h=Math.PI/180*(+i||0),f=[],d=(c?(b=c[0],x=c[1],m=c[2],v=c[3]):(t=(y=Ie(t,e,-h)).x,e=y.y,1<(d=(p=(t-(s=(y=Ie(s,l,-h)).x))/2)*p/(n*n)+(y=(e-(l=y.y))/2)*y/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,g=r*r,m=(o=(o===a?-1:1)*Math.sqrt(Math.abs((d*g-d*y*y-g*p*p)/(d*y*y+g*p*p))))*n*y/r+(t+s)/2,v=o*-r*p/n+(e+l)/2,b=Math.asin(((e-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((l-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<m?Math.PI-b:b,x=s<m?Math.PI-x:x,b<0&&(b=2*Math.PI+b),x<0&&(x=2*Math.PI+x),a&&x<b&&(b-=2*Math.PI),!a&&b<x&&(x-=2*Math.PI)),x-b),p=(Math.abs(d)>u&&(g=x,y=s,o=l,x=b+u*(a&&b<x?1:-1),f=De(s=m+n*Math.cos(x),l=v+r*Math.sin(x),n,r,i,0,a,y,o,[x,g,m,v])),d=x-b,Math.cos(b)),u=Math.sin(b),i=Math.cos(x),a=Math.sin(x),y=Math.tan(d/4),o=4/3*n*y,g=4/3*r*y,m=[t,e],v=[t+o*u,e-g*p],b=[s+o*a,l-g*i],x=[s,l];if(v[0]=2*m[0]-v[0],v[1]=2*m[1]-v[1],c)return v.concat(b,x,f);for(var w=[],k=0,M=(f=v.concat(b,x,f)).length;k<M;k+=1)w[k]=k%2?Ie(f[k-1],f[k],h).y:Ie(f[k],f[k+1],h).x;return w}function Be(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function ze(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function We(t,e,n,r,i){var o=ze([t,e],[n,r]),a={x:0,y:0};return{length:o,point:a="number"==typeof i?i<=0?{x:t,y:e}:o<=i?{x:n,y:r}:{x:(i=Be([t,e],[n,r],i/o))[0],y:i[1]}:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function He(t,e,n,r){var t=[t,e],e=[n,r],i=Be(t,e,.5),e=Be(e,i,.5),o=Be(i,e,.5),a=Be(e,o,.5),s=Be(o,a,.5),t=We(t[0],t[1],i[0],i[1],o[0]).point,i=We(s[0],s[1],a[0],a[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Ge(t,e){var n;if(void 0===e&&(e=!1),Pe(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=we(t),e?[n,[]]:n;for(var r,i=Re(t),o=O({},Oe),a=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),a[u]=s;var h=function(t,e){var n,r,i,o,a,s,l=t[0],c=t.slice(1).map(Number),u=c[0],h=c[1],f=e.x1,d=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(c),["C"].concat(De(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=h,s=[f,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],o=s[3],a=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*s+2/3*o,a,s]));case"L":return["C"].concat(He(f,d,u,h));case"Z":return f===p&&d===y?["C",f,d,p,y,p,y]:["C"].concat(He(f,d,p,y))}return t}(i[u],o),f=(i[u]=h,g=y=p=d=f=void 0,i),d=a,p=u;if(7<f[p].length){f[p].shift();for(var y=f[p],g=p;y.length;)d[p]="A",f.splice(g+=1,0,["C"].concat(y.splice(0,6)));f.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(h=i[u]).length,o.x1=+h[r-2],o.y1=+h[r-1],o.x2=+h[r-4]||o.x1,o.y2=+h[r-3]||o.y1}return e?[i,c]:i}function Ye(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,o=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/o)}function Ve(t,e,n,r,i,R,I,o,a,s,l){var c=l.bbox,D=void 0===c||c,c=l.length,B=void 0===c||c,c=l.sampleSize,u=void 0===c?30:c,h="number"==typeof s,f=t,d=e,p=0,y=[f,d,p],g=[f,d],m={x:0,y:0},v=[{x:f,y:d}];h&&s<=0&&(m={x:f,y:d});for(var b,x,w,k,M,E,O,S,_,A,P,T,L,N,C,j,F=0;F<=u;F+=1)b=t,x=e,w=n,k=r,M=i,E=R,O=I,S=o,_=a,A=F/u,T=j=C=N=L=T=P=void 0,T=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=T(w),T=T(k),k=j/180*((M%360+360)%360),f=(P=b===S&&x===_?{x:b,y:x}:0===w||0===T?We(b,x,S,_,A).point:(M=(b-S)/2,P=(x-_)/2,M={x:N(k)*M+L(k)*P,y:-L(k)*M+N(k)*P},1<(P=Math.pow(M.x,2)/Math.pow(w,2)+Math.pow(M.y,2)/Math.pow(T,2))&&(w*=C(P),T*=C(P)),P=(Math.pow(w,2)*Math.pow(T,2)-Math.pow(w,2)*Math.pow(M.y,2)-Math.pow(T,2)*Math.pow(M.x,2))/(Math.pow(w,2)*Math.pow(M.y,2)+Math.pow(T,2)*Math.pow(M.x,2)),E=(E!==O?1:-1)*C(P<0?0:P),C=w*M.y/T*E,P=-T*M.x/w*E,E=N(k)*C-L(k)*P+(b+S)/2,b=L(k)*C+N(k)*P+(x+_)/2,x=Ye({x:1,y:0},S={x:(M.x-C)/w,y:(M.y-P)/T}),_=Ye(S,{x:(-M.x-C)/w,y:(-M.y-P)/T}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,C=w*N(S),M=T*L(S),{x:N(k)*C-L(k)*M+E,y:L(k)*C+N(k)*M+b})).x,d=P.y,D&&v.push({x:f,y:d}),B&&(p+=ze(g,[f,d])),g=[f,d],h&&s<=p&&s>y[2]&&(O=(p-s)/(p-y[2]),m={x:g[0]*(1-O)+y[0]*O,y:g[1]*(1-O)+y[1]*O}),y=[f,d,p];return{length:p,point:m=h&&p<=s?{x:o,y:a}:m,min:{x:Math.min.apply(null,v.map(function(t){return t.x})),y:Math.min.apply(null,v.map(function(t){return t.y}))},max:{x:Math.max.apply(null,v.map(function(t){return t.x})),y:Math.max.apply(null,v.map(function(t){return t.y}))}}}function qe(t,e,n,r,i,o,a,s,l,c){var u=c.bbox,h=void 0===u||u,u=c.length,f=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,y=t,g=e,m=0,v=[y,g,m],b=[y,g],x={x:0,y:0},w=[{x:y,y:g}];p&&l<=0&&(x={x:y,y:g});for(var k,M,E,O,S,_,A,P,T,L,N=0;N<=d;N+=1)k=t,M=e,E=n,O=r,S=i,_=o,A=a,P=s,L=void 0,L=1-(T=N/d),y=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*T*E+3*L*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(L,3)*M+3*Math.pow(L,2)*T*O+3*L*Math.pow(T,2)*_+Math.pow(T,3)*P}).x,g=k.y,h&&w.push({x:y,y:g}),f&&(m+=ze(b,[y,g])),b=[y,g],p&&l<=m&&l>v[2]&&(E=(m-l)/(m-v[2]),x={x:b[0]*(1-E)+v[0]*E,y:b[1]*(1-E)+v[1]*E}),v=[y,g,m];return{length:m,point:x=p&&m<=l?{x:a,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Ue(t,e,n,r,i,o,a,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,f="number"==typeof a,d=t,p=e,y=0,g=[d,p,y],m=[d,p],v={x:0,y:0},b=[{x:d,y:p}];f&&a<=0&&(v={x:d,y:p});for(var x,w,k,M,E,O,S,_,A=0;A<=h;A+=1)x=t,w=e,k=n,M=r,E=i,O=o,_=void 0,_=1-(S=A/h),d=(x={x:Math.pow(_,2)*x+2*_*S*k+Math.pow(S,2)*E,y:Math.pow(_,2)*w+2*_*S*M+Math.pow(S,2)*O}).x,p=x.y,c&&b.push({x:d,y:p}),u&&(y+=ze(m,[d,p])),m=[d,p],f&&a<=y&&a>g[2]&&(k=(y-a)/(y-g[2]),v={x:m[0]*(1-k)+g[0]*k,y:m[1]*(1-k)+g[1]*k}),g=[d,p,y];return{length:y,point:v=f&&y<=a?{x:i,y:o}:v,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Xe(t,e,n){for(var r,i,o,a=Re(t),s="number"==typeof e,l=[],c=0,u=0,h=0,f=0,d=[],p=[],y=0,g={x:0,y:0},m=g,v=g,b=g,x=0,w=0,k=a.length;w<k;w+=1)l=(r="M"===(i=(o=a[w])[0]))?l:[c,u].concat(o.slice(1)),r?(m=g={x:h=o[1],y:f=o[2]},y=0,s&&e<.001&&(b=g)):"L"===i?(y=(r=We(l[0],l[1],l[2],l[3],(e||0)-x)).length,g=r.min,m=r.max,v=r.point):"A"===i?(y=(r=Ve(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"C"===i?(y=(r=qe(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"Q"===i?(y=(r=Ue(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"Z"===i&&(y=(r=We((l=[c,u,h,f])[0],l[1],l[2],l[3],(e||0)-x)).length,g=r.min,m=r.max,v=r.point),s&&x<e&&e<=x+y&&(b=v),p.push(m),d.push(g),x+=y,c=(r="Z"!==i?o.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:c,y:u}:b,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,p.map(function(t){return t.x})),y:Math.max.apply(null,p.map(function(t){return t.y}))}}}function $e(t){return(c=l=s=0)<=Ge(t).map(function(t){var e,n,r,i,o,a;return"M"===t[0]?(s=t[1],l=t[2],0):(a=t.slice(1),e=a[0],n=a[1],r=a[2],i=a[3],o=a[4],a=a[5],c=3*((a-l)*(e+r)-(o-s)*(n+i)+n*(s-r)-e*(l-i)+a*(r+s/3)-o*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Ze(t){return t.map(function(t,e,n){var r,i,o,a,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?qe(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),o=e.slice(4,6),e=e.slice(6,8),n=Be(n,i,r),i=Be(i,o,r),o=Be(o,e,r),a=Be(n,i,r),i=Be(i,o,r),r=Be(a,i,r),[["C"].concat(n,a,r),["C"].concat(i,o,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}function Ke(t){return Array.isArray?Array.isArray(t):tn(t,"Array")}function Je(t){var e=typeof t;return null!==t&&"object"==e||"function"==e}var _=function(t){return null==t},Qe={}.toString,tn=function(t,e){return Qe.call(t)==="[object "+e+"]"},en=function(t){if(Ke(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},nn=function(t){if(Ke(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},rn=function(t){return tn(t,"String")},on=function(t,e,n){return t<e?e:n<t?n:t},an=function(t){return tn(t,"Number")};function sn(o,a){if("function"!=typeof o)throw new TypeError("Expected a function");function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=a?a.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=o.apply(this,t),i.set(r,n),n)}return s.cache=new Map,s}var ln=function(t,e){return(t%e+e)%e},cn=function(t){return tn(t,"Boolean")},un=function(t){return void 0===t};function hn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function fn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function dn(){}var e="\\s*([+-]?\\d+)\\s*",pn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yn=/^#([0-9a-f]{3,8})$/,gn=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),mn=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),vn=new RegExp("^rgba\\("+[e,e,e,pn]+"\\)$"),bn=new RegExp("^rgba\\("+[n,n,n,pn]+"\\)$"),xn=new RegExp("^hsl\\("+[pn,n,n]+"\\)$"),wn=new RegExp("^hsla\\("+[pn,n,n,pn]+"\\)$"),kn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mn(){return this.rgb().formatHex()}function En(){return this.rgb().formatRgb()}function On(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=yn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Sn(e):3===n?new An(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_n(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_n(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=gn.exec(t))?new An(e[1],e[2],e[3],1):(e=mn.exec(t))?new An(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=vn.exec(t))?_n(e[1],e[2],e[3],e[4]):(e=bn.exec(t))?_n(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=xn.exec(t))?Nn(e[1],e[2]/100,e[3]/100,1):(e=wn.exec(t))?Nn(e[1],e[2]/100,e[3]/100,e[4]):kn.hasOwnProperty(t)?Sn(kn[t]):"transparent"===t?new An(NaN,NaN,NaN,0):null}function Sn(t){return new An(t>>16&255,t>>8&255,255&t,1)}function _n(t,e,n,r){return new An(t=r<=0?e=n=NaN:t,e,n,r)}function An(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Pn(){return"#"+Ln(this.r)+Ln(this.g)+Ln(this.b)}function Tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Ln(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Nn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new jn(t,e,n,r)}function Cn(t){var e,n,r,i,o,a,s,l;return t instanceof jn?new jn(t.h,t.s,t.l,t.opacity):(t=t instanceof dn?t:On(t))?t instanceof jn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=NaN,l=((o=Math.max(e,n,r))+i)/2,(s=o-i)?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=0<l&&l<1?0:a,new jn(a,s,l,t.opacity)):new jn}function jn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Fn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Rn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function In(t,e){return Math.abs(t-e)<.001}function Dn(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Bn(t){return(t+2*Math.PI)%(2*Math.PI)}hn(dn,On,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Mn,formatHex:Mn,formatHsl:function(){return Cn(this).formatHsl()},formatRgb:En,toString:En}),hn(An,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof dn?i:On(i))?new An((i=i.rgb()).r,i.g,i.b,i.opacity):new An:new An(t,e,n,null==r?1:r);var i},fn(dn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pn,formatHex:Pn,formatRgb:Tn,toString:Tn})),hn(jn,function(t,e,n,r){return 1===arguments.length?Cn(t):new jn(t,e,n,null==r?1:r)},fn(dn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new jn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new jn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new An(Fn(240<=t?t-240:120+t,n,e),Fn(t,n,e),Fn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var zn={box:function(t,e,n,r){return Dn([t,n],[e,r])},length:Rn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Rn(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?Rn(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){n=[n-t,r-e];return be(n,[0,0])?Math.sqrt((i-t)*(i-t)+(o-e)*(o-e)):(me(r=[-n[1],n[0]],r),Math.abs(ve([i-t,o-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Wn(t,e,n,r,i,o){for(var a=-1,s=1/0,l=[n,r],c=20,u=1/(c=o&&200<o?o/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Rn(l[0],l[1],p[0],p[1]);p<s&&(a=d,s=p)}if(0===a)return{x:t[0],y:e[0]};if(1===a)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(h<1e-4);y++){var g=a-h,m=a+h,v=[i.apply(void 0,t.concat([g])),i.apply(void 0,e.concat([g]))],v=Rn(l[0],l[1],v[0],v[1]);0<=g&&v<s?(a=g,s=v):(g=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Rn(l[0],l[1],g[0],g[1]),m<=1&&v<s?(a=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([a])),y:i.apply(void 0,e.concat([a]))}}function Hn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Gn(t,e,n){n=t+n-2*e;return In(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Yn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function Vn(t,e,n,r,i,o,a){var s=Hn(t,n,i,a),l=Hn(e,r,o,a),c=zn.pointAt(t,e,n,r,a),n=zn.pointAt(n,r,i,o,a);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,o]]}function qn(t,e,n,r,i,o,a){return 0===a?(Rn(t,e,n,r)+Rn(n,r,i,o)+Rn(t,e,i,o))/2:(e=(t=Vn(t,e,n,r,i,o,.5))[0],n=t[1],e.push(a-1),n.push(a-1),qn.apply(void 0,e)+qn.apply(void 0,n))}var Un={box:function(t,e,n,r,i,o){var a=Gn(t,n,i)[0],s=Gn(e,r,o)[0],l=[t,i],c=[e,o];return void 0!==a&&l.push(Hn(t,n,i,a)),void 0!==s&&c.push(Hn(e,r,o,s)),Dn(l,c)},length:function(t,e,n,r,i,o){return qn(t,e,n,r,i,o,3)},nearestPoint:function(t,e,n,r,i,o,a,s){return Wn([t,n,i],[e,r,o],a,s,Hn)},pointDistance:function(t,e,n,r,i,o,a,s){t=this.nearestPoint(t,e,n,r,i,o,a,s);return Rn(t.x,t.y,a,s)},interpolationAt:Hn,pointAt:function(t,e,n,r,i,o,a){return{x:Hn(t,n,i,a),y:Hn(e,r,o,a)}},divide:Vn,tangentAngle:function(t,e,n,r,i,o,a){t=Yn(t,n,i,a),n=Yn(e,r,o,a);return Bn(Math.atan2(n,t))}};function Xn(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function $n(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function Zn(t,e,n,r){var i,o,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return In(r,0)?In(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):In(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(o=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=o)&&o<=1&&t.push(o),t}function Kn(t,e,n,r,i,o,a,s,l){var c=Xn(t,n,i,a,l),u=Xn(e,r,o,s,l),h=zn.pointAt(t,e,n,r,l),n=zn.pointAt(n,r,i,o,l),r=zn.pointAt(i,o,a,s,l),i=zn.pointAt(h.x,h.y,n.x,n.y,l),o=zn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,o.x,o.y,r.x,r.y,a,s]]}function Jn(t,e,n,r,i,o,a,s,l){if(0===l){for(var c=[t,n,i,a],u=[e,r,o,s],h=0,f=c.length,d=0;d<f;d++)h+=Rn(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=Kn(t,e,n,r,i,o,a,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return Jn.apply(void 0,e)+Jn.apply(void 0,n)}var Qn={extrema:Zn,box:function(t,e,n,r,i,o,a,s){for(var l=[t,a],c=[e,s],u=Zn(t,n,i,a),h=Zn(e,r,o,s),f=0;f<u.length;f++)l.push(Xn(t,n,i,a,u[f]));for(var d=0;d<h.length;d++)c.push(Xn(e,r,o,s,h[d]));return Dn(l,c)},length:function(t,e,n,r,i,o,a,s){return Jn(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,l,c,u){return Wn([t,n,i,a],[e,r,o,s],l,c,Xn,u)},pointDistance:function(t,e,n,r,i,o,a,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,o,a,s,l,c,u);return Rn(t.x,t.y,l,c)},interpolationAt:Xn,pointAt:function(t,e,n,r,i,o,a,s,l){return{x:Xn(t,n,i,a,l),y:Xn(e,r,o,s,l)}},divide:Kn,tangentAngle:function(t,e,n,r,i,o,a,s,l){t=$n(t,n,i,a,l),n=$n(e,r,o,s,l);return Bn(Math.atan2(n,t))}};function tr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var er=function(t,e,n,r,i,o){var a=n,s=r;if(0===a||0===s)return{x:t,y:e};for(var n=i-t,r=o-e,l=Math.abs(n),c=Math.abs(r),u=a*a,h=s*s,f=Math.PI/4,d=0,p=0,y=0;y<4;y++){var d=a*Math.cos(f),p=s*Math.sin(f),g=(u-h)*Math.pow(Math.cos(f),3)/a,m=(h-u)*Math.pow(Math.sin(f),3)/s,v=d-g,b=p-m,g=l-g,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,g);f+=x*Math.asin((v*m-b*g)/(x*w))/Math.sqrt(u+h-d*d-p*p),f=Math.min(Math.PI/2,Math.max(0,f))}return{x:t+tr(d,n),y:e+tr(p,r)}};function nr(t,e,n,r,i,o){return n*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function rr(t,e,n,r,i,o){return n*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+e}function ir(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function or(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var ar={box:function(t,e,n,r,i,o,a){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[o,a],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var f=s+h;o<a?o<f&&f<a&&u.push(f):a<f&&f<o&&u.push(f)}for(var d=0;d<u.length;d++){var p=nr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,m=-1/0,v=[o,a],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=y+b;o<a?o<x&&x<a&&v.push(x):a<x&&x<o&&v.push(x)}for(var w=0;w<v.length;w++){var k=rr(0,e,n,r,i,v[w]);k<g&&(g=k),m<k&&(m=k)}return{x:l,y:g,width:c-l,height:m-g}},length:function(t,e,n,r,i,o,a){},nearestPoint:function(t,e,n,r,i,o,a,s,l){var s=or(s-t,l-e,-i),l=s[0],s=s[1],l=er(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<o?l=ir(n,r,o):a<c&&(l=ir(n,r,a)),or(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,o,a,s,l){t=this.nearestPoint(t,e,n,r,i,o,a,s,l);return Rn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,o,a,s){a=(a-o)*s+o;return{x:nr(t,0,n,r,i,a),y:rr(0,e,n,r,i,a)}},tangentAngle:function(t,e,n,r,i,o,a,s){var l,a=(a-o)*s+o,s=(s=r,o=i,l=a,-1*n*Math.cos(o)*Math.sin(l)-s*Math.sin(o)*Math.cos(l)),i=(o=r,l=i,r=a,-1*n*Math.sin(l)*Math.sin(r)+o*Math.cos(l)*Math.cos(r));return Bn(Math.atan2(i,s))}};function sr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],o=t[r+1],a=Rn(i[0],i[1],o[0],o[1]);n.push({from:i,to:o,length:a}),e+=a}return{segments:n,totalLength:e}}var lr,cr,ur={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return Dn(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],o=e[r+1];n+=Rn(i[0],i[1],o[0],o[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=sr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var o=0,a=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=zn.pointAt(c[0],c[1],u[0],u[1],(n-o)/l);break}o+=l}return a},pointDistance:function(t,e,n){for(var r=t,i=e,o=n,a=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=zn.pointDistance(l[0],l[1],c[0],c[1],i,o);l<a&&(a=l)}return a},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=sr(t)).segments,i=t.totalLength,o=0,a=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=Math.atan2(u[1]-c[1],u[0]-c[0]);break}o+=l}return a}},e={exports:{}};function hr(){}function fr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function dr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new fr(n,r||t,i),r=cr?cr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function pr(t,e){0==--t._eventsCount?t._events=new hr:delete t._events[e]}function yr(){this._events=new hr,this._eventsCount=0}n=e,lr=Object.prototype.hasOwnProperty,cr="~",Object.create&&(hr.prototype=Object.create(null),(new hr).__proto__||(cr=!1)),yr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)lr.call(t,e)&&n.push(cr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},yr.prototype.listeners=function(t){var t=cr?cr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},yr.prototype.listenerCount=function(t){t=cr?cr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},yr.prototype.emit=function(t,e,n,r,i,o){var a=cr?cr+t:t;if(!this._events[a])return!1;var s,l=this._events[a],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,o),!0}for(f=1,s=new Array(c-1);f<c;f++)s[f-1]=arguments[f];l.fn.apply(l.context,s)}else for(var u,h=l.length,f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),c){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,n);break;case 4:l[f].fn.call(l[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[f].fn.apply(l[f].context,s)}return!0},yr.prototype.on=function(t,e,n){return dr(this,t,e,n,!1)},yr.prototype.once=function(t,e,n){return dr(this,t,e,n,!0)},yr.prototype.removeListener=function(t,e,n,r){t=cr?cr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||pr(this,t);else{for(var o=0,a=[],s=i.length;o<s;o++)(i[o].fn!==e||r&&!i[o].once||n&&i[o].context!==n)&&a.push(i[o]);a.length?this._events[t]=1===a.length?a[0]:a:pr(this,t)}}else pr(this,t);return this},yr.prototype.removeAllListeners=function(t){return t?(t=cr?cr+t:t,this._events[t]&&pr(this,t)):(this._events=new hr,this._eventsCount=0),this},yr.prototype.off=yr.prototype.removeListener,yr.prototype.addListener=yr.prototype.on,yr.prefixed=cr,n.exports=yr.EventEmitter=yr;var r,gr=e.exports,pn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let mr=1;const vr="object"==typeof self&&self.self==self?self:"object"==typeof pn&&pn.global==pn?pn:{},br=Date.now();let xr={},wr=Date.now();const kr=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-wr,r=16<e?0:16-e,i=mr++;return xr[i]=t,1<Object.keys(xr).length||setTimeout(()=>{wr=n;const e=xr;xr={},Object.keys(e).forEach(t=>e[t](vr.performance&&"function"==typeof vr.performance.now?vr.performance.now():Date.now()-br))},r),i}:""===t?vr.requestAnimationFrame:vr[t+"RequestAnimationFrame"],Mr=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!kr(t)),Er=kr(Mr),Or="string"!=typeof(n=Mr)?t=>{delete xr[t]}:""===n?vr.cancelAnimationFrame:vr[n+"CancelAnimationFrame"]||vr[n+"CancelRequestAnimationFrame"];vr.requestAnimationFrame=Er,vr.cancelAnimationFrame=Or,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Er,cancelAnimationFrame:Or}),(e=r=r||{}).COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>";var Sr,M,_r=function(){function g(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}g.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=g.prototype;return t.update=function(t,e){Bt(this.center,t),Bt(this.halfExtents,e),Kt(this.min,this.center,this.halfExtents),Wt(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Wt(this.center,e,t),Gt(this.center,this.center,.5),Kt(this.halfExtents,e,t),Gt(this.halfExtents,this.halfExtents,.5),Bt(this.min,t),Bt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,o,a,s,l,c,u,h,f,d,p,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],o=e[2],i=(r=this.halfExtents)[0],h=r[1],a=r[2],l=(f=t.center)[0],y=f[1],f=f[2],c=(t=t.halfExtents)[0],(d=y-(u=t[1]))<(s=p-h)&&(s=d),(d=p+h)<(p=y+u)&&(d=p),(y=f-(h=t[2]))<(u=o-a)&&(u=y),(p=o+a)<(t=f+h)&&(p=t),e[0]=.5*((o=(y=l-c)<(o=n-i)?y:o)+(a=(a=n+i)<(f=l+c)?f:a)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(a-o),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=o,this.min[1]=s,this.min[2]=u,this.max[0]=a,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,o=e[0],a=e[4],s=e[8],l=e[1],c=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(o),y=Math.abs(a),g=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),k=Math.abs(d);zt(n,e[12]+o*i[0]+a*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+h*i[0]+f*i[1]+d*i[2]),zt(r,p*t[0]+y*t[1]+g*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Kt(this.min,n,r),this.max=Wt(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new g,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Bt(m(),this.min):272===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):k(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Bt(m(),this.max):272===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):k(this.min[0],this.min[1],this.min[2])},g}(),Ar=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||k(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Vt(t,this.normal)-this.distance},e.normalize=function(){var t=1/Qt(this.normal);Gt(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&Ut(n,t,e,r),i},t}(),Pr=((n=Sr=Sr||{})[n.OUTSIDE=4294967295]="OUTSIDE",n[n.INSIDE=0]="INSIDE",n[n.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Ar)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],y=t[14],t=t[15];zt(this.planes[0].normal,i-e,l-o,f-c),this.planes[0].distance=t-d,zt(this.planes[1].normal,i+e,l+o,f+c),this.planes[1].distance=t+d,zt(this.planes[2].normal,i+n,l+a,f+u),this.planes[2].distance=t+p,zt(this.planes[3].normal,i-n,l-a,f-u),this.planes[3].distance=t-p,zt(this.planes[4].normal,i-r,l-s,f-h),this.planes[4].distance=t-y,zt(this.planes[5].normal,i+r,l+s,f+h),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Tr=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Lr=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),Nr=((e=M=M||{}).GROUP="g",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",sn(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function Cr(t){if(!t)throw new Error}function jr(t,e){if(t===e)throw new Error}function Fr(t){return"function"==typeof t}var Rr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Ir=sn(function(t){var t=Nr(t),e=Rr[t];return(null==e?void 0:e.alias)||t}),Dr={},Br=0;var zr="undefined"!=typeof window&&void 0!==window.document;function Wr(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function Hr(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function Gr(t,e){if(zr)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var y,Yr,Vr,qr,Ur="Method not implemented.",Xr="Use document.documentElement instead.",$r={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function E(){E=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function Zr(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Kr(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Zr(r,e,n,i,o,"next",t)}function o(t){Zr(r,e,n,i,o,"throw",t)}i(void 0)})}}function Jr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qr(t,e,n){e&&Jr(t.prototype,e),n&&Jr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function ti(){return(ti=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function s(t,e){t.prototype=Object.create(e.prototype),ei(t.prototype.constructor=t,e)}function ei(t,e){return(ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ni(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||(r[n]=t[n]);return r}function ri(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oi(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?ii(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ii(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n=y=y||{})[n.kUnknown=0]="kUnknown",n[n.kNumber=1]="kNumber",n[n.kPercentage=2]="kPercentage",n[n.kEms=3]="kEms",n[n.kPixels=4]="kPixels",n[n.kRems=5]="kRems",n[n.kDegrees=6]="kDegrees",n[n.kRadians=7]="kRadians",n[n.kGradians=8]="kGradians",n[n.kTurns=9]="kTurns",n[n.kMilliseconds=10]="kMilliseconds",n[n.kSeconds=11]="kSeconds",n[n.kInteger=12]="kInteger",(e=Yr=Yr||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=Vr=Vr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(e=qr=qr||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo";function ai(t){return t?"number"===t?y.kNumber:"percent"===t||"%"===t?y.kPercentage:(e=t,di.find(function(t){return t.name===e}).unit_type):y.kUnknown;var e}function si(t){var e=1;switch(t){case y.kPixels:case y.kDegrees:case y.kSeconds:break;case y.kMilliseconds:e=.001;break;case y.kRadians:e=180/Math.PI;break;case y.kGradians:e=.9;break;case y.kTurns:e=360}return e}function li(t){switch(t){case y.kNumber:case y.kInteger:return"";case y.kPercentage:return"%";case y.kEms:return"em";case y.kRems:return"rem";case y.kPixels:return"px";case y.kDegrees:return"deg";case y.kRadians:return"rad";case y.kGradians:return"grad";case y.kMilliseconds:return"ms";case y.kSeconds:return"s";case y.kTurns:return"turn"}return""}var ci,ui,hi,fi,di=[{name:"em",unit_type:y.kEms},{name:"px",unit_type:y.kPixels},{name:"deg",unit_type:y.kDegrees},{name:"rad",unit_type:y.kRadians},{name:"grad",unit_type:y.kGradians},{name:"ms",unit_type:y.kMilliseconds},{name:"s",unit_type:y.kSeconds},{name:"rem",unit_type:y.kRems},{name:"turn",unit_type:y.kTurns}],e=((n=ci=ci||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===y.kDegrees||t===y.kRadians||t===y.kGradians||t===y.kTurns},t.isLength=function(t){return t>=y.kEms&&t<y.kDegrees},t.isRelativeUnit=function(t){return t===y.kPercentage||t===y.kEms||t===y.kRems},t.isTime=function(t){return t===y.kSeconds||t===y.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(Vr.kNo,qr.kNo,"")},e.isNumericValue=function(){return this.getType()>=ci.kUnitType&&this.getType()<=ci.kClampType},t}()),n=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}s(t,n);var e=t.prototype;return e.getType=function(){return ci.kColorType},e.to=function(t){return this},t}(e),pi=((o=ui=ui||{})[o.Constant=0]="Constant",o[o.LinearGradient=1]="LinearGradient",o[o.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}s(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return ci.kColorType},t}(e)),yi=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}s(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return ci.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(e);(o=hi=hi||{}).kAdd="+",o.kSubtract="-",o.kMultiply="*",o.kDivide="/",o.kMin="min",o.kMax="max",o.kClamp="clamp",o.kInvalid="",(o=fi=fi||{})[o.kLength=0]="kLength",o[o.kAngle=1]="kAngle",o[o.kTime=2]="kTime",o[o.kFrequency=3]="kFrequency",o[o.kResolution=4]="kResolution",o[o.kFlex=5]="kFlex",o[o.kPercent=6]="kPercent",o[o.kNumBaseTypes=7]="kNumBaseTypes";function gi(t){return"number"==typeof t?new Ei(t,y.kNumber):t}var mi=function(){function t(t,e){void 0===t&&(t=y.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=fi.kPercent,this.hasPercentHint=!1,this.exponents=new Array(fi.kNumBaseTypes).fill(0),t!==y.kNumber&&this.setExponent(function(t){switch(jr(t,y.kNumber),t){case y.kEms:case y.kPixels:case y.kRems:return fi.kLength;case y.kMilliseconds:case y.kSeconds:return fi.kTime;case y.kDegrees:case y.kRadians:case y.kGradians:case y.kTurns:return fi.kAngle;case y.kPercentage:return fi.kPercent;default:return fi.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){jr(t,fi.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(fi.kPercent)),this.setExponent(fi.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return jr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return jr(t,fi.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(fi.kPercent,1)},e.matchesBaseTypePercentage=function(t){return jr(t,fi.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(fi.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(fi.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var o=0;o<fi.kNumBaseTypes;++o){var a=o;if(t.exponents[o]!==e.exponents[o]&&(a!==fi.kPercent&&(t.applyPercentHint(a),e.applyPercentHint(a)),t.exponents[o]!==e.exponents[o]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<fi.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),o=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}s(d,n);var t=d.prototype;return t.getType=function(){return ci.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vi(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=vi(e),i=(bi(ci.kSumType,r,this),wi(r,hi.kAdd));return i||Li.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=vi(e)).map(function(t){return t.negate()}),i=(bi(ci.kSumType,r,this),wi(r,hi.kAdd));return i||Li.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=vi(e),i=(bi(ci.kProductType,r,this),ki(r));return i||Ni.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=vi(e)).map(function(t){return t.invert()}),i=(bi(ci.kProductType,r,this),ki(r));return i||Ni.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=vi(e),i=(bi(ci.kMinType,r,this),wi(r,hi.kMin));return i||Pi.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=vi(e),i=(bi(ci.kMaxType,r,this),wi(r,hi.kMax));return i||Ti.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=xi(e[0]))?(t="string"==typeof t?ai(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o=i[r];if(!d.isValidUnit(ai(o)))return null}var a=this.sumValue();if(!a.length)return null;for(var s=[],l=oi(a);!(c=l()).done;){var c=xi(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),Cr(!!(a=Li.create(s))),a;for(var u=[],h=0,f=e;h<f.length;h++)!function(){var t=f[h],r=ai(t),t=(Cr(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new Ei(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Li.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(fi.kLength);return e&&(t.length=e),(e=this.type_.exponent(fi.kAngle))&&(t.angle=e),(e=this.type_.exponent(fi.kTime))&&(t.time=e),(e=this.type_.exponent(fi.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(fi.kResolution))&&(t.resolution=e),(e=this.type_.exponent(fi.kFlex))&&(t.flex=e),(e=this.type_.exponent(fi.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case fi.kLength:return"length";case fi.kAngle:return"angle";case fi.kTime:return"time";case fi.kFrequency:return"frequency";case fi.kResolution:return"resolution";case fi.kFlex:return"flex";case fi.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===y.kNumber||t==y.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Si.create(this)},t.invert=function(){return Oi.create(this)},d}(e);function vi(t){return t.map(gi)}function bi(t,e,n){Cr(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function xi(t){return 0===Object.keys(t.units).length?new Ei(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Ei(t.value,Number(Object.keys(t.units)[0])):null}function wi(t,e){Cr(!!t.length);var n=t[0]instanceof Ei?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof Ei?t[i]:null;if(!o||o.unit!==n.unit)return null;e===hi.kAdd?r+=o.value:e===hi.kMax?r=Math.max(r,o.value):e===hi.kMin&&(r=Math.min(r,o.value))}return new Ei(r,n.unit)}function ki(t){Cr(!!t.length);for(var e=y.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Ei?t[r]:null;if(!i)return null;if(i.unit!==y.kNumber){if(e!==y.kNumber)return null;e=i.unit}n*=i.value}return new Ei(n,e)}function Mi(t){switch(function(t){switch(t){case y.kNumber:case y.kInteger:return Yr.kUNumber;case y.kPercentage:return Yr.kUPercent;case y.kPixels:return Yr.kULength;case y.kMilliseconds:case y.kSeconds:return Yr.kUTime;case y.kDegrees:case y.kRadians:case y.kGradians:case y.kTurns:return Yr.kUAngle;default:return Yr.kUOther}}(t)){case Yr.kUNumber:return y.kNumber;case Yr.kULength:return y.kPixels;case Yr.kUPercent:return y.kPercentage;case Yr.kUTime:return y.kSeconds;case Yr.kUAngle:return y.kDegrees;default:return y.kUnknown}}var Ei=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?y.kNumber:e)?ai(e):e;return(n=r.call(this,new mi(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}s(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Mi(this.unit))!==Mi(t)||e===y.kUnknown?null:(e=si(this.unit)/si(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return ci.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==y.kNumber&&(r[t=this.unit,(e=Mi(t))===y.kUnknown?t:e]=1),n.push({value:this.value*si(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===y.kNumber?0===this.value?null:new n(1/this.value,this.unit):Oi.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case y.kUnknown:break;case y.kInteger:i=Number(this.value).toFixed(0);break;case y.kNumber:case y.kPercentage:case y.kEms:case y.kRems:case y.kPixels:case y.kDegrees:case y.kRadians:case y.kGradians:case y.kMilliseconds:case y.kSeconds:case y.kTurns:var r,i,o=this.value,a=li(this.unit);i=o<-999999||999999<o?(r=li(this.unit),!Number.isFinite(o)||Number.isNaN(o)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(Cr(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(o,r):o+(r||"")):""+o+a}return n+=i},n}(o),e=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.isUnitValue=function(){return!1},e}(o),Oi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}s(e,n),e.create=function(t){return new e(t,mi.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return ci.kInvertType},t.equals=function(t){return t.getType()===ci.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==qr.kNo&&(n+=t===Vr.kYes?"(":"calc("),n=this.value.buildCSSText(Vr.kYes,qr.kNo,n+="1 / "),e===qr.kNo&&(n+=")"),n},e}(e),Si=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}s(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return ci.kNegateType},t.equals=function(t){return t.getType()===ci.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==qr.kNo&&(n+=t===Vr.kYes?"(":"calc("),n=this.value.buildCSSText(Vr.kYes,qr.kNo,n+="-"),e===qr.kNo&&(n+=")"),n},e}(e);function _i(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function Ai(t){return Di[t]||(Di[t]=new yi(t)),Di[t]}var o=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}s(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(e),Pi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}s(e,i),e.create=function(t){return new e(t,_i(t,mi.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return ci.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=oi(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,o=oi(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Vr.kYes,qr.kYes,n);return n+=")"},e}(o),Ti=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}s(e,i),e.create=function(t){return new e(t,_i(t,mi.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return ci.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=oi(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,o=oi(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Vr.kYes,qr.kYes,n);return n+=")"},e}(o),Li=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}s(e,i),e.create=function(t){return new e(t,_i(t,mi.add))},e.numericTypeFromUnitMap=function(n){var r=new mi;return Object.keys(n).forEach(function(t){var e=n[t];r=mi.multiply(r,new mi(Number(t),e),!1),Cr(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(Cr(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return mi.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return ci.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(ti({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==qr.kNo&&(n+=t===Vr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Vr.kYes,qr.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=(o.getType()===ci.kNegateType?(n+=" - ",o.value):(n+=" + ",o)).buildCSSText(Vr.kYes,qr.kNo,n)}return e===qr.kNo&&(n+=")"),n},e}(o),Ni=function(i){function o(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}s(o,i),o.create=function(t){return new o(t,_i(t,mi.multiply))},o.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){jr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=o.prototype;return t.clone=function(){return new o(this.values,this.type_)},t.getType=function(){return ci.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:o.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==qr.kNo&&(n+=t===Vr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Vr.kYes,qr.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=(o.getType()===ci.kInvertType?(n+=" / ",o.value):(n+=" * ",o)).buildCSSText(Vr.kYes,qr.kNo,n)}return e===qr.kNo&&(n+=")"),n},o}(o),Ci=new Ei(0,"px"),ji=(new Ei(1,"px"),new Ei(0,"deg")),Fi=function(a){function t(t,e,n,r,i){var o;return void 0===r&&(r=1),void 0===i&&(i=!1),(o=a.call(this,"rgb")||this).r=void 0,o.g=void 0,o.b=void 0,o.alpha=void 0,o.isNone=void 0,o.r=t,o.g=e,o.b=n,o.alpha=r,o.isNone=i,o}s(t,a);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(n),Ri=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;b.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},Ii=new yi("unset"),e=new yi("initial"),o=new yi("inherit"),Di={"":Ii,unset:Ii,initial:e,inherit:o},Bi=new Fi(0,0,0,0,!0),zi=new Fi(0,0,0,0),Wi=sn(function(t,e,n,r){return new Fi(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),Hi=sn(function(t,e){return void 0===e&&(e=y.kNumber),new Ei(t,e)},function(t,e){return""+t+(e=void 0===e?y.kNumber:e)}),Gi=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Yi=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Vi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,qi=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Ui={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Xi=sn(function(t){t="angular"===t.type?Number(t.value):Ui[t.value]||0;return Hi(t,"deg")}),$i=sn(function(t){var e,n=50,r=50,i="%",o="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(o=null==t?void 0:t.type,r=Number(t.value))),{cx:Hi(n,i),cy:Hi(r,o)}}),Zi=sn(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return ls(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,o=(r[i-1].length=null!=(f=r[i-1].length)?f:{type:"%",value:"100"},1<i&&(r[0].length=null!=(f=r[0].length)?f:{type:"%",value:"0"}),0),a=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!_(c)&&!_(a)){for(var u=1;u<s-o;u++)r[o+u].length={type:"%",value:""+(a+(Number(c)-a)*u/(s-o))};o=s,a=Number(c)}}var h,f=t.map(function(t){return{offset:Hi(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new pi(ui.LinearGradient,{angle:n?Xi(n):ji,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=$i(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?Ai(n):Hi(n,h)),new pi(ui.RadialGradient,{cx:e,cy:t,size:h,steps:f})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=Gi.exec(t);if(n)return r=(null==(r=n[2].match(qi))?void 0:r.map(function(t){return t.split(":")}))||[],[new pi(ui.LinearGradient,{angle:Hi(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:Hi(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=Yi.exec(t);if(t)return t=(null==(t=t[4].match(qi))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:Hi(50,"%"),cy:Hi(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:Hi(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!rn(n))return[new pi(ui.RadialGradient,n)]}else if("p"===e){var r=t;if(r=Vi.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function Ki(t){return Je(t)&&t.image}var Ji=sn(function(t){var e;return Ki(t)?ti({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?zi:Zi(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=On(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),Wi.apply(void 0,e))});function Qi(t,e){if(t instanceof Fi&&e instanceof Fi)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(on(e[n],0,255));return e[3]=on(e[3],0,1),"rgba("+e.join(",")+")"}]}function to(t,e){if(_(e))return Hi(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return Hi(Number(e),"px");if(0<="deg".search(t))return Hi(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return Hi(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var eo=sn(function(t){return to(new RegExp("px","g"),t)}),no=(sn(function(t){return to(new RegExp("%","g"),t)}),sn(function(t){return an(t)||isFinite(Number(t))?Hi(Number(t),"px"):to(new RegExp("px|%|em|rem","g"),t)})),ro=sn(function(t){return to(new RegExp("deg|rad|grad|turn","g"),t)});function io(t){var e=0;return t.unit===y.kDegrees?e=t.value:t.unit===y.kRadians?e=Ka(Number(t.value)):t.unit===y.kTurns&&(e=360*Number(t.value)),e}function oo(t){return rn(t)?t.split(" ").map(function(t){return no(t)}):t.map(function(t){return no(t.toString())})}function ao(t,e,n){var r;return t.unit===y.kPixels?Number(t.value):t.unit===y.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,_r.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var so=function(t){return to(/deg|rad|grad|turn|px|%/g,t)},lo=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function co(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<lo.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return so(t)||Ji(t)})}),n.lastIndex===t.length)return r}return[]}function uo(t){return t.toString()}var ho=sn(function(t){return"number"==typeof t?Hi(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Hi(Number(t)):Hi(0)});function fo(t,e){return[t,e,uo]}function po(n,r){return function(t,e){return[t,e,function(t){return uo(on(t,n,r))}]}}function yo(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}sn(function(t){return(rn(t)?t.split(" "):t).map(ho)});var go=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=Re(e)}catch(t){n=Re(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,s=0;s<a;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],o=s;break;case"A":var h=function(t,e){var n=e[1],r=e[2],i=ln(Za(e[3]),2*Math.PI),o=e[4],a=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,h=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,f=u*u/(n*n)+h*h/(r*r);1<f&&(n*=Math.sqrt(f),r*=Math.sqrt(f));f=n*n*(h*h)+r*r*(u*u),f=f?Math.sqrt((n*n*(r*r)-f)/f):1;o===a&&(f*=-1);isNaN(f)&&(f=0);var d=r?f*n*h/r:0,f=n?f*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*f,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*f,p=[(u-d)/n,(h-f)/r],u=[(-1*u-d)/n,(-1*h-f)/r],d=Ds([1,0],p),h=Ds(p,u);Is(p,u)<=-1&&(h=Math.PI);1<=Is(p,u)&&(h=0);0===a&&0<h&&(h-=2*Math.PI);1===a&&h<0&&(h+=2*Math.PI);return{cx:s,cy:l,rx:Ts(t,[c,e])?0:n,ry:Ts(t,[c,e])?0:r,startAngle:d,endAngle:d+h,xRotation:i,arcFlag:o,sweepFlag:a}}(n,l);u.arcParams=h}"Z"===c?(n=i,r=t[o+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[o],e[o])&&(e[o].prePoint=n),u.currentPoint=n,e[o]&&Ts(n,e[o].currentPoint)&&(e[o].prePoint=u.prePoint);var f,d,p,y,g,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(f=[l[1],l[2]],u.startTangent=[b[0]-f[0],b[1]-f[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]]):"T"===c?(d=Ns((f=e[s-1]).currentPoint,b),"Q"===f.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(y=Ns((p=e[s-1]).currentPoint,b),g=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-y[0],b[1]-y[1]]):(u.command="SQ",u.startTangent=[b[0]-g[0],b[1]-g[1]]),u.endTangent=[n[0]-g[0],n[1]-g[1]]):"A"===c&&(y=Fs(u,0),b=y.x,g=y.y,c=Fs(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,g],u.endTangent=[m,c]),e.push(u)}return e}(n),o=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],s=a.currentPoint,l=a.params,c=a.prePoint,u=void 0;switch(a.command){case"Q":u=Un.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=Qn.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var h=a.arcParams;u=ar.box(h.cx,h.cy,h.rx,h.ry,h.xRotation,h.startAngle,h.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(a.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===a.command||"M"===a.command)&&a.prePoint&&a.nextPoint&&i.push(a)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var f=nn(n),d=nn(r),p=en(n),y=en(r);if(0!==i.length)for(var g=0;g<i.length;g++){var m=i[g],v=m.currentPoint,b=void 0;v[0]===f?(b=Ls(m,e),f-=b.xExtra):v[0]===p&&(b=Ls(m,e),p+=b.xExtra),v[1]===d?(b=Ls(m,e),d-=b.yExtra):v[1]===y&&(b=Ls(m,e),y+=b.yExtra)}return{x:f,y:d,width:p-f,height:y-d}}(i,0),a=o.x,s=o.y,l=o.width,o=o.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(a)?a:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(o)?o:0}}},mo=sn(go);function vo(t,e){t=(rn(t)?mo:go)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function bo(t,e,n){var r,i,o,a,s,l,c,u,h,f=t.curve,d=e.curve,t=(f&&0!==f.length||(f=Ge(t.absolutePath,!1),t.curve=f),d&&0!==d.length||(d=Ge(e.absolutePath,!1),e.curve=d),[f,d]),f=$e((t=f.length!==d.length?function t(e,n,r){var i,e=Ze(e),n=Ze(n),o=e.length,a=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(o,a),u=[s,l],h=[c-o,c-a],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=u[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(f,d):t)[0])!==$e(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):we(t[0]);return[f,(i=t[1],o=f,c=i.length-1,u=[],h=0,s=(a=i).length,l=s-1,(d=a.map(function(t,r){return a.map(function(t,e){var n=r+e;return 0===e||a[n]&&"M"===a[n][0]?(e=a[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),a[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=ze(i[(n+e)%c].slice(-2),o[e%c].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function xo(t,e){var n,r,i=rn(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,o=[],a=0,s=ur.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=a/s,r=zn.length(t[0],t[1],i[e+1][0],i[e+1][1]),a+=r,n[1]=a/s,o.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:o}}var wo=null;function ko(t){return function(e){var n=0;return t.map(function(t){return t===wo?e[n++]:t})}}function Mo(t){return t}var Eo={matrix:["NNNNNN",[wo,wo,0,0,wo,wo,0,0,0,0,1,0,wo,wo,0,1],Mo],matrix3d:["NNNNNNNNNNNNNNNN",Mo],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ko([wo,wo,new Ei(1)]),Mo],scalex:["N",ko([wo,new Ei(1),new Ei(1)]),ko([wo,new Ei(1)])],scaley:["N",ko([new Ei(1),wo,new Ei(1)]),ko([new Ei(1),wo])],scalez:["N",ko([new Ei(1),new Ei(1),wo])],scale3d:["NNN",Mo],skew:["Aa",null,Mo],skewx:["A",null,ko([wo,ji])],skewy:["A",null,ko([ji,wo])],translate:["Tt",ko([wo,wo,Ci]),Mo],translatex:["T",ko([wo,Ci,Ci]),ko([wo,Ci])],translatey:["T",ko([Ci,wo,Ci]),ko([Ci,wo])],translatez:["L",ko([Ci,Ci,wo])],translate3d:["TTL",Mo]};function Oo(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,o=e[1],a=Eo[o];if(!a)return[];var s=e[2].split(","),l=a[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var h=s[u],f=l[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?ji:ro(t)},N:ho,T:no,L:eo}[f.toUpperCase()](h):{a:ji,n:c[0],t:Ci}[f]))return[];c.push(d)}if(r.push({t:o,d:c}),n.lastIndex===t.length)return r}return[]}function So(t){switch(t.t){case"rotatex":return i=Za(io(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Za(io(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Za(io(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Za(io(t.d[3])),o=e*e+n*n+r*r,o=(0==o?(e=1,r=n=0):1!=o&&(e/=o=Math.sqrt(o),n/=o,r/=o),Math.sin(i/2)),a=o*Math.cos(i/2),o=o*o;return[1-2*(n*n+r*r)*o,2*(e*n*o+r*a),2*(e*r*o-n*a),0,2*(e*n*o-r*a),1-2*(e*e+r*r)*o,2*(n*r*o+e*a),0,2*(e*r*o+n*a),2*(n*r*o-e*a),1-2*(e*e+n*n)*o,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":a=Za(io(t.d[0])),o=Za(io(t.d[1]));return[1,Math.tan(o),0,0,Math.tan(a),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Za(io(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Za(io(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=ao(t.d[0],0,null)||0,n=ao(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=ao(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=ao(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=ao(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=ao(t.d[0],0,null)||0,n=ao(t.d[1],0,null)||0,r=ao(t.d[2],0,null)||0,1];case"perspective":o=ao(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,o?-1/o:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function _o(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Ao(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(ts,t))return;if(ft(es,ts),es[3]=0,es[7]=0,es[11]=0,es[15]=1,Math.abs(mt(es))<1e-8)return;var t=ts[3],a=ts[7],s=ts[11],l=ts[12],c=ts[13],u=ts[14],h=ts[15];if(0!==t||0!==a||0!==s){if(ns[0]=t,ns[1]=a,ns[2]=s,ns[3]=h,!gt(es,es))return;yt(es,es),ee(i,ns,es)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,ts),n[0]=Dt(d[0]),Yt(d[0],d[0]),r[0]=Vt(d[0],d[1]),is(d[1],d[1],d[0],1,-r[0]),n[1]=Dt(d[1]),Yt(d[1],d[1]),r[0]/=n[1],r[1]=Vt(d[0],d[2]),is(d[2],d[2],d[0],1,-r[1]),r[2]=Vt(d[1],d[2]),is(d[2],d[2],d[1],1,-r[2]),n[2]=Dt(d[2]),Yt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],qt(rs,d[1],d[2]),Vt(d[0],rs)<0)for(var f=0;f<3;f++)n[f]*=-1,d[f][0]*=-1,d[f][1]*=-1,d[f][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(o[0]=-o[0]);d[0][2]>d[2][0]&&(o[1]=-o[1]);d[1][0]>d[0][1]&&(o[2]=-o[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(So).reduce(_o),e,n,r,i,o),[[e,n,r,o,i]]}var Po=function(t,e,n,r,i){for(var o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],a=0;a<4;a++)o[a][3]=i[a];for(var s=0;s<3;s++)for(var l=0;l<3;l++)o[3][s]+=t[l]*o[l][s];var c=r[0],u=r[1],h=r[2],r=r[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(f[0][0]=1-2*(u*u+h*h),f[0][1]=2*(c*u-h*r),f[0][2]=2*(c*h+u*r),f[1][0]=2*(c*u+h*r),f[1][1]=1-2*(c*c+h*h),f[1][2]=2*(u*h-c*r),f[2][0]=2*(c*h-u*r),f[2][1]=2*(u*h+c*r),f[2][2]=1-2*(c*c+u*u),o=To(o,f),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],o=To(o,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],o=To(o,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],o=To(o,h));for(var d=0;d<3;d++)for(var p=0;p<3;p++)o[d][p]*=e[d];return 0==(r=o)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])};function To(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}function Lo(t){return t.toFixed(6).replace(".000000","")}function No(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Ao(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Ao(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=on(r,-1,1),[]);if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(r[0][3],i[0][3],t[5]);return Po(t[0],t[1],t[2],e,t[4]).map(Lo).join(",")}])}function Co(t){return t.replace(/[xy]/,"")}function jo(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var Fo=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function Ro(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?Hi(n):Hi(n,t.unit)})})}(n)}var o=[],a=[],s=[];if(r.length!==i.length)var l=No(r,i),o=[l[0]],a=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,h=i[c].t,f=r[c].d,d=i[c].d,p=Eo[u],y=Eo[h],g=void 0;if(Fo(u,h)){var m=No([r[c]],[i[c]]);o.push(m[0]),a.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===h)g=u;else if(p[2]&&y[2]&&Co(u)===Co(h))g=Co(u),f=p[2](f),d=y[2](d);else{if(!p[1]||!y[1]||jo(u)!==jo(h)){m=No(r,i);o=[m[0]],a=[m[1]],s=[["matrix",[m[2]]]];break}g=jo(u),f=p[1](f),d=y[1](d)}for(var v=[],b=[],x=[],w=0;w<f.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,l=Mi(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(a=c.value,s=l.value,o=li(t.unit)):(Ei.isLength(t.unit)||Ei.isLength(e.unit))&&(a=ao(t,i,n),s=ao(e,i,n),o="px"),[a,s,function(t){return(t=r?Math.max(t,0):t)+o}]}(f[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}o.push(v),a.push(b),s.push([g,x])}}return e&&(l=o,o=a,a=l),[o,a,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var Io=sn(function(t){var e;return rn(t)?"text-anchor"===t?[Hi(0,"px"),Hi(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[no(Do(e[0])),no(Do(e[1]))]):[Hi(t[0]||0,"px"),Hi(t[1]||0,"px")]});function Do(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=ro,this.mixer=fo}return t.prototype.calculator=function(t,e,n,r){return io(n)},t}(),e=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof yi&&(n=null),b.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&b.sceneGraphService.dirtifyToRoot(t)}),n},t}(),o=function(){function t(){this.parser=Ji,this.mixer=Qi}return t.prototype.calculator=function(t,e,n,r){return n instanceof yi?"none"===n.value?Bi:zi:n},t}(),a=function(){function t(){this.parser=co}return t.prototype.calculator=function(t,e,n){return n instanceof yi?[]:n},t}();function Bo(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function zo(){this.parser=Io}var Wo,v,Ho=function(){function t(){this.parser=no,this.mixer=fo}return t.prototype.calculator=function(t,e,n,r,i){if(!Ei.isRelativeUnit(n.unit))return n.value;if(n.unit===y.kPercentage)return 0;if(n.unit===y.kEms){if(r.parentNode){var o=Bo(r.parentNode);if(o)return o*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===y.kRems){if(null!=r&&null!=(o=r.ownerDocument)&&o.documentElement){o=Bo(r.ownerDocument.documentElement);if(o)return o*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),Go=function(){function t(){this.mixer=yo}var e=t.prototype;return e.parser=function(t){t=oo(an(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),Yo=function(){function t(){this.mixer=yo}var e=t.prototype;return e.parser=function(t){t=oo(an(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),Vo=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,o=i.cx,i=i.cy;_(o)||(l=o),_(i)||(c=i);break;case M.LINE:var o=t.parsedStyle,i=o.x1,a=o.x2,s=o.y1,o=o.y2,l=Math.min(i,a),c=Math.min(s,o),u=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:_(t.parsedStyle.x)||(l=t.parsedStyle.x),_(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),_(l)&&_(c)&&_(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(_(l)?e:l,_(c)?n:c,_(u)?r:u))},e}(Ho),qo=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof yi?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),Uo=function(){function t(){this.mixer=fo,this.parser=ho}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Xo=function(){function t(){this.parser=ho,this.mixer=po(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),$o=function(){function t(){this.parser=ho,this.mixer=po(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Zo=function(){function t(){this.parser=vo,this.mixer=bo}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof yi&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Lr(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===M.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),Ko=function(){function t(){this.parser=xo}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==M.POLYGON&&t.nodeName!==M.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),Jo=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=po(0,1/0),t}return s(t,i),t}(Ho),Qo=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof yi?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),ta=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,o=r.getAttribute("text");return o&&(i=o,"capitalize"===n.value?i=o.charAt(0).toUpperCase()+o.slice(1):"lowercase"===n.value?i=o.toLowerCase():"uppercase"===n.value&&(i=o.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),l=function(){function t(){this.tmpMat4=ut(),this.parser=Oo,this.mixer=Ro}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof yi?[]:n},e.postProcessor=function(t){os(t.parsedStyle.transform,t)},t}(),ea=function(){function t(){this.parser=ho}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),na=function(){function t(){this.registry={},this.define(M.CIRCLE,ka),this.define(M.ELLIPSE,Pa),this.define(M.RECT,Va),this.define(M.IMAGE,Fa),this.define(M.LINE,Ia),this.define(M.GROUP,La),this.define(M.PATH,Ba),this.define(M.POLYGON,Wa),this.define(M.POLYLINE,Ga),this.define(M.TEXT,Ua),this.define(M.HTML,Ca)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}(),ra=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Tr,this.page=new Tr,this.canvas=new Tr,this.viewport=new Tr,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(Ur)},Qr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),ia=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(ri(n),e),n}return s(t,r),t}(ra),oa=function(){function t(){this.emitter=new gr}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,o,a=cn(n)&&n||Je(n)&&n.capture,n=Je(n)&&n.once,s=Fr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=a?t+"capture":t,e=Fr(e)?e:e.handleEvent,l&&(o=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&o.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=cn(n)&&n||Je(n)&&n.capture,i=Fr(e)?void 0:e;return e=Fr(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new ia(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof ra))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),aa=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}s(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(Ur)},t.lookupNamespaceURI=function(t){throw new Error(Ur)},t.lookupPrefix=function(t){throw new Error(Ur)},t.normalize=function(){throw new Error(Ur)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[o=this];null!=(r=i.parentNode)?r:o.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,o=o.parentNode?(n.push(o.parentNode),o.parentNode):o;if(i!==o)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var a=n.length<e.length?e:n,s=a===e?n:e;if(a[a.length-s.length]===s[0])return a===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=a.length-s.length,c=s.length-1;0<=c;c--){var u,h=s[c],f=a[l+c];if(f!==h)return(u=h.parentNode.childNodes).indexOf(h)<u.indexOf(f)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:a===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},Qr(d,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=oi(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===M.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===M.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(oa),sa=(aa.DOCUMENT_POSITION_DISCONNECTED=1,aa.DOCUMENT_POSITION_PRECEDING=2,aa.DOCUMENT_POSITION_FOLLOWING=4,aa.DOCUMENT_POSITION_CONTAINS=8,aa.DOCUMENT_POSITION_CONTAINED_BY=16,aa.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,function(e){function t(){var t=e.call(this)||this;t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new b.AnimationTimeline(ri(t))}catch(t){}var r={};return pl.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=Fr(t)?t(M.GROUP):t)}),t.documentElement=new La({id:"g-root",style:r}),t.documentElement.ownerDocument=ri(t),t.documentElement.parentNode=ri(t),t.childNodes=[t.documentElement],t}s(t,e);var n=t.prototype;return n.createElement=function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?Ua:La),(t=new n(e)).ownerDocument=this,t)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error(Ur)},n.destroy=function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}},n.elementsFromBBox=function(t,e,n,r){var t=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),i=[];return t.forEach(function(t){var t=t.id,t=b.displayObjectPool.getByEntity(t),e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||i.push(t)}),i.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),i},n.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),o=i.width,i=i.height;return r<0||n<0||o<r||i<n?null:(i=(o=this.defaultView.viewport2Client({x:r,y:n})).x,o=o.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:o},picked:[]}).picked)&&t[0]||this.documentElement)},n.elementFromPoint=function(){var n=Kr(E().mark(function t(e,n){var r,i,o,a,s,l;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",null);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,l=s.picked,t.abrupt("return",l&&l[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),o=i.width,i=i.height;return r<0||n<0||o<r||i<n?[]:(i=(o=this.defaultView.viewport2Client({x:r,y:n})).x,o=o.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:o},picked:[]}).picked)[t.length-1]!==this.documentElement&&t.push(this.documentElement),t)},n.elementsFromPoint=function(){var n=Kr(E().mark(function t(e,n){var r,i,o,a,s,l;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",[]);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error(Xr)},n.insertBefore=function(t,e){throw new Error(Xr)},n.removeChild=function(t,e){throw new Error(Xr)},n.replaceChild=function(t,e,n){throw new Error(Xr)},n.append=function(){throw new Error(Xr)},n.prepend=function(){throw new Error(Xr)},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},Qr(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),t}(aa)),la=(Wo=Wo||{},Wo[Wo.Standard=0]="Standard",(_a=v=v||{}).DESTROY="destroy",_a.ATTR_MODIFIED="DOMAttrModified",_a.INSERTED="DOMNodeInserted",_a.REMOVED="removed",_a.MOUNTED="DOMNodeInsertedIntoDocument",_a.UNMOUNTED="DOMNodeRemovedFromDocument",_a.BOUNDS_CHANGED="bounds-changed",_a.RENDER_ORDER_CHANGED="render-order-changed",_a.CULLED="culled",function(c){function t(t,e,n,r,i,o,a,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=o,l.prevParsedValue=a,l.newParsedValue=s,l.type=t,l}return s(t,c),t}(ra)),ca=(la.ADDITION=2,la.MODIFICATION=1,la.REMOVAL=3,0),ua=new la(v.INSERTED,null,"","","",0,"",""),ha=new la(v.REMOVED,null,"","","",0,"",""),fa=new ia(v.DESTROY),da=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=ca++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Wo.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:k(0,0,0),localRotation:se(0,0,0,1),localScale:k(1,1,1),localTransform:ut(),localSkew:he(0,0),position:k(0,0,0),rotation:se(0,0,0,1),scaling:k(1,1,1),worldTransform:ut(),origin:k(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:Ii,opacity:Ii,fillOpacity:Ii,strokeOpacity:Ii,fill:Ii,stroke:Ii,transform:Ii,transformOrigin:Ii,visibility:Ii,pointerEvents:Ii,lineWidth:Ii,lineCap:Ii,lineJoin:Ii,increasedLineWidthForHitTesting:Ii,fontSize:Ii,fontFamily:Ii,fontStyle:Ii,fontWeight:Ii,fontVariant:Ii,textAlign:Ii,textBaseline:Ii,textTransform:Ii,zIndex:Ii,filter:Ii,shadowType:Ii},t.parsedStyle={},t.attributes={},t}s(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Ur)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return b.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),ua.relatedNode=this,t.dispatchEvent(ua),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return ha.relatedNode=this,t.dispatchEvent(ha),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),b.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return b.sceneGraphService.matches(t,this)},e.getElementById=function(t){return b.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return b.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return b.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return b.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return b.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return b.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(b.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(fa),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return b.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return b.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return b.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return b.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return b.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e=this.attributes[t];return void 0===e&&(t=Ir(t),e=this.attributes[t],_(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(Ur)},e.getAttributeNode=function(t){throw new Error(Ur)},e.getAttributeNodeNS=function(t,e){throw new Error(Ur)},e.hasAttributeNS=function(t,e){throw new Error(Ur)},e.removeAttributeNS=function(t,e){throw new Error(Ur)},e.removeAttributeNode=function(t){throw new Error(Ur)},e.setAttributeNS=function(t,e,n){throw new Error(Ur)},e.setAttributeNode=function(t){throw new Error(Ur)},e.setAttributeNodeNS=function(t){throw new Error(Ur)},e.toggleAttribute=function(t,e){throw new Error(Ur)},Qr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(aa),pa=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Tr,t.movement=new Tr,t.offset=new Tr,t.global=new Tr,t.screen=new Tr,t}s(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error(Ur)},Qr(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(ra),ya=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}s(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.clone=function(){return this.manager.clonePointerEvent(this)},t}(pa),ga=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return s(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(pa),ma=new la(v.ATTR_MODIFIED,null,null,null,null,la.MODIFICATION,null,null),va={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},ba={anchor:[0,0],fill:Bi,stroke:Bi,transform:[],zIndex:0,filter:[],shadowType:"outer"},xa=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],N=function(i){function a(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||M.GROUP,r.config.style=ti({},r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,ba,r.config.initialParsedStyle),Object.assign(r.attributes,va),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),b.displayObjectPool.add(r.entity,ri(r)),r}s(a,i);var t=a.prototype;return t.destroy=function(){i.prototype.destroy.call(this),b.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=ti({},this.attributes);for(n in r){var i=r[n];i instanceof a&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},t.initAttributes=function(t){var e=this.renderable;b.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:xa}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=Ir(t);un(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},t.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],o=this.parsedStyle[t],a=(b.styleValueRegistry.processProperties(this,((a={})[t]=e,a),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(ma.relatedNode=this,ma.prevValue=i,ma.newValue=e,ma.attrName=t,ma.prevParsedValue=o,ma.newParsedValue=a,this.isMutationObserved?this.dispatchEvent(ma):(ma.target=this).ownerDocument.defaultView.dispatchEvent(ma,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,o,a)},t.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new Lr(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return b.sceneGraphService.setOrigin(this,$a(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return b.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return b.sceneGraphService.setPosition(this,$a(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return b.sceneGraphService.setLocalPosition(this,$a(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return b.sceneGraphService.translate(this,$a(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return b.sceneGraphService.translateLocal(this,$a(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return b.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return b.sceneGraphService.getLocalPosition(this)},t.scale=function(t,e,n){return this.scaleLocal(t,e,n)},t.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=$a(t,e=e||t,n=n||t)),b.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=$a(t,e=e||t,n=n||t)),b.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return b.sceneGraphService.getLocalScale(this)},t.getScale=function(){return b.sceneGraphService.getScale(this)},t.getEulerAngles=function(){return Ka(Ja(m(),b.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return Ka(Ja(m(),b.sceneGraphService.getLocalRotation(this))[2])},t.setEulerAngles=function(t){return b.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return b.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return _(e)&&_(n)?b.sceneGraphService.rotateLocal(this,0,0,t):b.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return _(e)&&_(n)?b.sceneGraphService.rotate(this,0,0,t):b.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return b.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return b.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return b.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return b.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return b.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return b.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return b.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return b.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return b.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){b.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},t.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},t.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},t.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},t.getConfig=function(){return this.config},t.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1];return i?Je(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=St(m(),t),n=e[0],e=e[1],r=_t(m(),t),i=r[0],r=r[1],t=At(ne(),t),t=Ja(m(),t),o=t[0],t=t[2],a=(o=o||t,t=n,n=e,e=i,i=r,r=Math.cos(o),o=Math.sin(o),e*r),s=i*o,l=0,e=-e*o,o=i*r,i=0,r=t,t=n,n=1,c=new st(9);return c[0]=a,c[1]=s,c[2]=l,c[3]=e,c[4]=o,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=Qa(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},t.setLocalMatrix=function(t){var t=Qa(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.getCount=function(){return this.childElementCount},t.getParent=function(){return this.parentElement},t.getChildren=function(){return this.children},t.getFirst=function(){return this.firstElementChild},t.getLast=function(){return this.lastElementChild},t.getChildByIndex=function(t){return this.children[t]||null},t.add=function(t,e){return this.appendChild(t,e)},t.setClip=function(t){this.style.clipPath=t},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},t.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.setZIndex=function(t){return this.style.zIndex=t,this},Qr(a,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),a}(da),wa=["style"],ka=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,wa);return n.call(this,ti({type:M.CIRCLE,style:ti({cx:"",cy:"",r:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),Ma=["style"],Ea=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Ma),e=n.call(this,ti({style:ti({x:"",y:""},e)},t))||this;return e.isCustomElement=!0,e}return s(t,n),t}(N),Oa={},Sa=[],_a=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Oa[t]},e.getAll=function(){return Object.keys(Oa).map(function(t){return Oa[t]})},e.add=function(t,e){(Oa[t]=e).nodeName===M.HTML&&Sa.push(e)},e.remove=function(t){var e=Oa[t];e&&(delete Oa[t],e.nodeName===M.HTML)&&(t=Sa.indexOf(e),Sa.splice(t,1))},e.getHTMLs=function(){return Sa},t}(),Aa=["style"],Pa=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Aa);return n.call(this,ti({type:M.ELLIPSE,style:ti({cx:"",cy:"",rx:"",ry:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),Ta=["style"],La=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Ta);return n.call(this,ti({type:M.GROUP,style:ti({x:"",y:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),Na=["style"],Ca=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Na),e=n.call(this,ti({type:M.HTML,style:ti({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))||this;return e.cullable.enable=!1,e}s(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new _r).setMinMax(k(t,r,0),k(t+n.width,r+n.height,0)),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=gt(ut(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!_r.isEmpty(n))return(t=new _r).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(N),ja=["style"],Fa=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,ja);return n.call(this,ti({type:M.IMAGE,style:ti({x:"",y:"",img:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),Ra=["style"],Ia=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Ra),e=r.call(this,ti({type:M.LINE,style:ti({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,r);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i)&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,c=a.markerStartOffset,u=a.markerEndOffset,h=a.x1,f=a.x2,d=a.y1,p=a.y2,y=a.defX,a=a.defY,s=t?s:l;s&&s instanceof N&&(l=0,t=t?(r=h-y,i=d-a,e=f-h,n=p-d,o=c||0,this.markerStartAngle):(r=f-y,i=p-a,e=h-f,n=d-p,o=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*o,i+Math.sin(l)*o))},e.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,s=n.defX,n=n.defY,r=zn.pointAt(r,i,o,a,t),i=r.x,o=r.y,a=Xt(m(),k(i-s,o-n,0),e?this.getWorldTransform():this.getLocalTransform());return new Tr(a[0],a[1])},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return zn.length(e,n,r,t)},t}(N),Da=["style"],Ba=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Da),e=i.call(this,ti({type:M.PATH,style:ti({path:"",miterLimit:""},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,c=a.markerStartOffset,u=a.markerEndOffset,h=a.defX,a=a.defY,s=t?s:l;s&&s instanceof N&&(l=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=i[0]-t[0],i=i[1]-t[1],o=c||0,this.markerStartAngle):(c=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=c[0]-t[0],i=c[1]-t[1],o=u||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*o,n+Math.sin(l)*o))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&t instanceof N)for(var o=1;o<n.length-1;o++){var a=n[o].currentPoint,s=a[0],a=a[1],l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,a-i)}},e.getTotalLength=function(){return Ps(this)},e.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,n=Xe(n.path.absolutePath,t,O(O({},o),{bbox:!1,length:!0})).point,t=n.x,o=n.y,n=Xt(m(),k(t-r,o-i,0),e?this.getWorldTransform():this.getLocalTransform());return new Tr(n[0],n[1])},e.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*Ps(this),e)},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(N),za=["style"],Wa=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,za),e=i.call(this,ti({type:M.POLYGON,style:ti({points:"",miterLimit:"",isClosed:!0},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,c=a.markerStartOffset,u=a.markerEndOffset,h=a.points.points,f=a.defX,a=a.defY,s=t?s:l;s&&s instanceof N&&(i=h[l=0][0]-f,o=h[0][1]-a,c=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=c||0,this.markerStartAngle):(t=h.length,n=this.style.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-f,o=h[t-1][1]-a,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+c),s.setLocalPosition(i+Math.cos(l)*r,o+Math.sin(l)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&t instanceof N)for(var o=1;o<(this.style.isClosed?n.length:n.length-1);o++){var a=n[o][0]-r,s=n[o][1]-i,l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(a,s)}},t}(N),Ha=["style"],Ga=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Ha);return n.call(this,ti({type:M.POLYLINE,style:ti({points:"",miterLimit:"",isClosed:!1},e)},t))||this}s(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getPoint=function(n,t){void 0===t&&(t=!1);var e=this.parsedStyle,r=e.defX,i=e.defY,e=e.points,o=e.points,e=e.segments,a=0,s=0,e=(e.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(a=(n-t[0])/(t[1]-t[0]),s=e)}),zn.pointAt(o[s][0],o[s][1],o[s+1][0],o[s+1][1],a)),o=e.x,e=e.y,o=Xt(m(),k(o-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Tr(o[0],o[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}(Wa),Ya=["style"],Va=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,Ya);return n.call(this,ti({type:M.RECT,style:ti({x:"",y:"",width:"",height:"",radius:""},e)},t))||this}return s(t,n),t}(N),qa=["style"],Ua=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ni(t,qa);return n.call(this,ti({type:M.TEXT,style:ti({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))||this}s(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(N);function Xa(t){return void 0===t?0:360<t||t<-360?t%360:t}function $a(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),an(t)?k(t,e,n):Array.isArray(t)&&3===t.length?It(t):k(t[0],t[1]||e,t[2]||n)}function Za(t){return t*(Math.PI/180)}function Ka(t){return t*(180/Math.PI)}function Ja(t,e){return 16===e.length?(n=t,r=e,a=.5*Math.PI,s=(c=_t(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<a?-a<u?(i=Math.atan2(r[6]/l,r[10]/c),o=Math.atan2(r[1]/s,r[0]/s)):(o=0,i=-Math.atan2(r[4]/l,r[5]/l)):(o=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=o,n):(a=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(o=c*c))<(t=s*c-r*l)?(a[0]=Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):t<-.499995*n?(a[0]=-Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):(a[0]=Math.asin(2*(s*l-c*r)),a[1]=Math.atan2(2*(s*c+r*l),1-2*(u+o)),a[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),a);var n,r,i,o,a,s,l,c,u}function Qa(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o);r=Ka(Math.atan2(n,e));return[t[6],t[7],o,a,r]}var ts=ut(),es=ut(),ns=te(),d=[m(),m(),m()],rs=m();function is(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}function os(t,l){var c,u,h=this;return t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new N({}),t.forEach(function(t){var e,n,r,i,o,a,s=t.t,t=t.d;"scale"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(a[0],a[1],1)):"scalex"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(a[0],1,1)):"scaley"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,a[0],1)):"scalez"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,a[0])):"scale3d"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(a[0],a[1],a[2])):"translate"===s?(a=t||[Ci,Ci],l.translateLocal(a[0].value,a[1].value,0)):"translatex"===s?(a=t||[Ci],l.translateLocal(a[0].value,0,0)):"translatey"===s?(a=t||[Ci],l.translateLocal(0,a[0].value,0)):"translatez"===s?(a=t||[Ci],l.translateLocal(0,0,a[0].value)):"translate3d"===s?(a=t||[Ci,Ci,Ci],l.translateLocal(a[0].value,a[1].value,a[2].value)):"rotate"===s?(a=t||[ji],l.rotateLocal(0,0,a[0].value)):"rotatex"===s?(a=t||[ji],l.rotateLocal(a[0].value,0,0)):"rotatey"===s?(a=t||[ji],l.rotateLocal(0,a[0].value,0)):"rotatez"===s?(a=t||[ji],l.rotateLocal(0,0,a[0].value)):"rotate3d"!==s&&("skew"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Za(a[0]),Za(a[1]))):"skewx"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Za(a[0]),l.getLocalSkew()[1])):"skewy"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Za(a[0]))):"matrix"===s?(e=(a=t.map(function(t){return t.value}))[0],n=a[1],r=a[2],i=a[3],o=a[4],a=a[5],l.setLocalTransform(dt(h.tmpMat4,e,n,0,0,r,i,0,0,0,0,1,0,o+c,a+u,0,1))):"matrix3d"===s&&(dt.apply(Rt,[h.tmpMat4].concat(t.map(function(t){return t.value}))),h.tmpMat4[12]+=c,h.tmpMat4[13]+=u,l.setLocalTransform(h.tmpMat4)))})),l.getLocalTransform()}as={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},ss="";var as,ss,ls=function(t){return ss=t,us()};function cs(t){throw new Error(ss+": "+t)}function us(){var t=xs(hs);return 0<ss.length&&cs("Invalid input not EOF"),t}function hs(){return fs("linear-gradient",as.linearGradient,ps)||fs("repeating-linear-gradient",as.repeatingLinearGradient,ps)||fs("radial-gradient",as.radialGradient,ys)||fs("repeating-radial-gradient",as.repeatingRadialGradient,ys)||fs("conic-gradient",as.conicGradient,ys)}function fs(n,t,r){return ds(t,function(t){var e=r();return e&&!_s(as.comma)&&cs("Missing comma before color stops"),{type:n,orientation:e,colorStops:xs(ws)}})}function ds(t,e){t=_s(t);if(t)return _s(as.startCall)||cs("Missing ("),e=e(t),_s(as.endCall)||cs("Missing )"),e}function ps(){return Ss("directional",as.sideOrCorner,1)||Ss("angular",as.angleValue,1)}function ys(){var t,e,n=gs();return n&&((t=[]).push(n),e=ss,_s(as.comma))&&((n=gs())?t.push(n):ss=e),t}function gs(){var t,e=function(){var t=Ss("shape",/^(circle)/i,0);t&&(t.style=Os()||ms());return t}()||function(){var t=Ss("shape",/^(ellipse)/i,0);t&&(t.style=Ms()||ms());return t}();return e?e.at=vs():(t=ms())?(e=t,(t=vs())&&(e.at=t)):(t=bs())&&(e={type:"default-radial",at:t}),e}function ms(){return Ss("extent-keyword",as.extentKeywords,1)}function vs(){var t;if(Ss("position",/^at/,0))return(t=bs())||cs("Missing positioning value"),t}function bs(){var t={x:Ms(),y:Ms()};if(t.x||t.y)return{type:"position",value:t}}function xs(t){var e=t(),n=[];if(e)for(n.push(e);_s(as.comma);)(e=t())?n.push(e):cs("One extra comma");return n}function ws(){var t=Ss("hex",as.hexColor,1)||ds(as.rgbaColor,function(){return{type:"rgba",value:xs(ks)}})||ds(as.rgbColor,function(){return{type:"rgb",value:xs(ks)}})||Ss("literal",as.literalColor,0);return t||cs("Expected color definition"),t.length=Ms(),t}function ks(){return _s(as.number)[1]}function Ms(){return Ss("%",as.percentageValue,1)||Es()||Os()}function Es(){return Ss("position-keyword",as.positionKeywords,1)}function Os(){return Ss("px",as.pixelValue,1)||Ss("em",as.emValue,1)}function Ss(t,e,n){e=_s(e);if(e)return{type:t,value:e[n]}}function _s(t){var e=/^[\n\r\t\s]+/.exec(ss),e=(e&&As(e[0].length),t.exec(ss));return e&&As(e[0].length),e}function As(t){ss=ss.substring(t)}function Ps(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=Xe(t.parsedStyle.path.absolutePath,void 0,O(O({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function Ts(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ls(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,o=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),a=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((o+a-r)/(2*Math.sqrt(o)*Math.sqrt(a)));return!r||0===Math.sin(r)||(void(o=0)===n&&(n=1e-5),Math.abs(r-o)<n)?{xExtra:0,yExtra:0}:(a=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),o=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),a=a>Math.PI/2?Math.PI-a:a,o=o>Math.PI/2?Math.PI-o:o,{xExtra:Math.cos(r/2-a)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(o-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function Ns(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Cs(t,e,n,r,i,o,a,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=Za(r=ln(r,360)),t.x===a.x&&t.y===a.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-a.x)/2,c=(t.y-a.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==o?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+a.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+a.y)/2},l=js({x:1,y:0},a={x:(u.x-c)/e,y:(u.y-i)/n}),a=js(a,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!o&&0<a?a-=2*Math.PI:o&&a<0&&(a+=2*Math.PI),c=l+(a%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+a,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var js=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function Fs(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,o=r.ry,o=void 0===o?0:o,a=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=Cs({x:t.prePoint[0],y:t.prePoint[1]},i,o,a,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Cs({x:t.prePoint[0],y:t.prePoint[1]},i,o,a,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),o=i.x-l.x,a=i.y-l.y,s=Math.sqrt(o*o+a*a);return{x:-o/s,y:-a/s}}function Rs(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Is(t,e){return Rs(t)*Rs(e)?(t[0]*e[0]+t[1]*e[1])/(Rs(t)*Rs(e)):1}function Ds(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Is(t,e))}function Bs(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,i=e*i,a=n-t,t=n+t,s=r-e,e=r+e;return[["M",a,r],["C",a,r-i,n-o,s,n,s],["C",n+o,s,t,r-i,t,r],["C",t,r+i,n+o,e,n,e],["C",n-o,e,a,r+i,a,r],["Z"]]}function zs(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,s,l,c,u,h,f,d=[];switch(t.nodeName){case M.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case M.CIRCLE:var p=t.parsedStyle,y=p.r;d=Bs(y,y,p.cx,p.cy);break;case M.ELLIPSE:var y=t.parsedStyle;d=Bs(y.rx,y.ry,y.cx,y.cy);break;case M.POLYLINE:case M.POLYGON:p=t.parsedStyle.points;y=p.points,p=t.nodeName===M.POLYGON,y=y.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&y.push(["Z"]),d=y;break;case M.RECT:var g=t.parsedStyle,m=g.width,v=g.height,b=g.x,x=g.y,g=g.radius,w=g&&g.some(function(t){return 0!==t});n=m,r=v,b=b,x=x,d=(w=w&&g.map(function(t){return on(t,0,Math.min(Math.abs(m)/2,Math.abs(v)/2))}))?(s=(g=0<n?1:-1)+(a=0<r?1:-1)!=0?1:0,[["M",g*(i=w[0])+b,x],["L",n-g*(o=w[1])+b,x],o?["A",o,o,0,0,s,n+b,a*o+x]:null,["L",n+b,r-a*(o=w[2])+x],o?["A",o,o,0,0,s,n+b-g*o,r+x]:null,["L",b+g*(o=w[3]),r+x],o?["A",o,o,0,0,s,b,r+x-a*o]:null,["L",b,a*i+x],i?["A",i,i,0,0,s,g*i+b,x]:null,["Z"]].filter(function(t){return t})):[["M",b,x],["L",b+n,x],["L",b+n,x+r],["L",b,x+r],["Z"]];break;case M.PATH:w=t.parsedStyle.path.absolutePath;d=[].concat(w)}if(d.length)return l=d,c=e,u=(e=(e=t).parsedStyle).defX,h=void 0===u?0:u,f=void 0===(u=e.defY)?0:u,l.reduce(function(t,e){var n,r,i,o="";return"M"===e[0]||"L"===e[0]?(n=k(e[1]-h,e[2]-f,0),c&&Xt(n,n,c),o=""+e[0]+n[0]+","+n[1]):"Z"===e[0]?o=e[0]:"C"===e[0]?(n=k(e[1]-h,e[2]-f,0),r=k(e[3]-h,e[4]-f,0),i=k(e[5]-h,e[6]-f,0),c&&(Xt(n,n,c),Xt(r,r,c),Xt(i,i,c)),o=""+e[0]+n[0]+","+n[1]+","+r[0]+","+r[1]+","+i[0]+","+i[1]):"A"===e[0]?(n=k(e[6]-h,e[7]-f,0),c&&Xt(n,n,c),o=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+n[0]+","+n[1]):"Q"===e[0]&&(r=k(e[1]-h,e[2]-f,0),i=k(e[3]-h,e[4]-f,0),c&&(Xt(r,r,c),Xt(i,i,c)),o=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+"}"),t+o},"")}function Ws(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}function Hs(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function Gs(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function Ys(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function Vs(t){return el.setup(this,t),el.create(t)}function qs(t){return rl.setup(this,t),rl.create(t)}function Us(){throw new Error("tapAsync is not supported on a SyncHook")}function Xs(){throw new Error("tapPromise is not supported on a SyncHook")}function $s(t){return ol.setup(this,t),ol.create(t)}function Zs(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function Ks(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function Js(t){return sl.setup(this,t),sl.create(t)}var Qs=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=Hs,this.call=Hs,this._callAsync=Gs,this.callAsync=Gs,this._promise=Ys,this.promise=Ys,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e=oi(this.interceptors);!(n=e()).done;){var n=n.value;n.register&&void 0!==(n=n.register(t))&&(t=n)}return t},e.withOptions=function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}},e.isUsed=function(){return 0<this.taps.length||0<this.interceptors.length},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],o=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<o)){r++;break}}this.taps[r]=t},t}(),tl=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,o=t.onResult,n=t.onDone,e="",a=0;a<this.options.interceptors.length;a++){var s=this.options.interceptors[a];s.call&&(e+=this.getInterceptor(a)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:o&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=o(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=oi(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,o=e.rethrowIfPossible,a="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":o||(a=a+"var _hasError"+t+" = false;\ntry {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",o||(a=(a=(a=a+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h=(h=(h="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(h+=r("_result"+t)),i&&(h+=i()),a+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:h=h+"}\n"+"})"})+");\n";break;case"promise":a=(a=(a=(a+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),a=(a=a+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return a},e.callTapsSeries=function(t){var o=this,a=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),h=e||n,f="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==o.options.taps[n].type||20<p++)&&(p=0,f=(f+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(h?"return ":"")+"_next"+n+"();\n"}),d),i=o.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return f+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var o=this.options.taps.every(function(t){return"sync"===t.type}),r="";o||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var a=this.options.interceptors[i];a.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:a.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return o||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&o})+"} while(_loop);\n",o||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,o=t.onError,a=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:o,onResult:a,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onResult:a&&function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onDone:!a&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),el=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(tl)),nl=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=Vs,t._call=void 0,t.call=void 0,t}return s(t,n),t}(Qs),rl=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var i=this,o=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return o(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(tl)),il=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=qs,t._call=void 0,t.call=void 0,t}return s(t,n),t}(Qs),ol=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(tl)),al=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=Us,t.tapPromise=Xs,t.compile=$s,t}return s(t,n),t}(Qs),sl=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(tl)),ll=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=Zs,t.tapPromise=Ks,t.compile=Js,t}return s(t,n),t}(al),cl=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ul=/([\"\'])[^\'\"]+\1/;var hl,fl,dl,pl=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:r.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:r.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:r.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:r.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:r.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:r.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:r.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:r.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:r.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:r.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:r.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:r.FILTER},{n:"clipPath",syntax:r.DEFINED_PATH},{n:"textPath",syntax:r.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:r.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},l:!0,syntax:r.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:r.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:r.COORDINATE},{n:"cy",int:!0,d:"0",syntax:r.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:r.COORDINATE},{n:"y",int:!0,d:"0",syntax:r.COORDINATE},{n:"z",int:!0,d:"0",syntax:r.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:r.COORDINATE},{n:"y1",int:!0,l:!0,syntax:r.COORDINATE},{n:"z1",int:!0,l:!0,syntax:r.COORDINATE},{n:"x2",int:!0,l:!0,syntax:r.COORDINATE},{n:"y2",int:!0,l:!0,syntax:r.COORDINATE},{n:"z2",int:!0,l:!0,syntax:r.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:r.PATH,p:50},{n:"points",l:!0,syntax:r.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:r.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:r.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:r.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:r.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:r.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:r.NUMBER,d:function(t){return t===M.PATH||t===M.POLYGON||t===M.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:r.MARKER},{n:"markerEnd",syntax:r.MARKER},{n:"markerMid",syntax:r.MARKER},{n:"markerStartOffset",syntax:r.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:r.LENGTH,l:!0,int:!0,d:"0"}],yl={},gl=new WeakMap,ml={},vl=sn(function(t){return t.sort(function(t,e){return ml[t]-ml[e]})}),bl=m(),xl=m(),wl=m(),Qs=function(){function t(){var e=this;pl.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){yl[t]=e,ml[t]=e.p||0})},e.unregisterMetadata=function(t){delete yl[t]},e.getPropertySyntax=function(t){return b.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,o=t.skipUpdateAttribute,e=t.skipParse,a=t.forceUpdateGeometry,t=t.usedAttributes,s=a,a=Object.keys(r);a.forEach(function(t){var e=Ir(t);o||(n.attributes[e]=r[t]),!s&&null!=(t=yl[e])&&t.l&&(s=!0)}),e||a.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(a=vl(null!=t&&t.length?Array.from(new Set(a.concat(t))):a)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),a.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&a.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=yl[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=Ai(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Ai(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=yl[t],i="g-root"===n.id,o=e;if(r){var a=r.syntax,s=r.inh,r=r.d;if(e instanceof yi){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))_(r)||(e=this.parseProperty(t,Fr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),_(s)?void this.addUnresolveProperty(n,t):s}i=a&&this.getPropertySyntax(a);o=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof yi?e.value:e}return o},e.postProcessProperty=function(t,e){var t=yl[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=gl.get(t);n||(gl.set(t,[]),n=gl.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=gl.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=gl.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),gl.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,o,a,l,c,u,h,f,d,p,y,g,m,v=b.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new _r),s.renderBounds||(s.renderBounds=new _r),e=t.parsedStyle,d=(v=v.update(e,t)).width,f=v.height,p=void 0===(p=v.depth)?0:p,h=void 0===(h=v.offsetX)?0:h,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=f<0,p=zt(bl,Math.abs(d)/2,Math.abs(f)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,g=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,o=e.transformOrigin,a=e.anchor,t.nodeName===M.TEXT&&delete e.anchor,d=zt(xl,(1-2*(a&&a[0]||0))*d/2+h,(1-2*(a&&a[1]||0))*f/2+m,(1-2*(a&&a[2]||0))*p[2]+v),s.contentBounds.update(d,p),h=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,l&&!l.isNone&&Wt(p,p,zt(wl,f=((c||0)+(u||0))*h,f,0)),s.renderBounds.update(d,p),y&&g&&"inner"!==g&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,h=e.shadowOffsetY||0,f=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+h,y=l[1]+c+h,v[0]=Math.min(v[0],f),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,o,a=t.name,t=t.params;"blur"===a?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Wt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,k(i,i,0)))):"drop-shadow"===a&&(i=t[0].value,a=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,o=e[1]-t+a,t=n[1]+t+a,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],o),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),a=e.anchor,g=(n?-1:1)*ao(o[0],0,t),m=(r?-1:1)*ao(o[1],1,t),g-=(n?-1:1)*(a&&a[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(a&&a[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),b.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=yl[t];return!!t&&t.inh},t}();(tl=hl=hl||{})[tl.ORBITING=0]="ORBITING",tl[tl.EXPLORING=1]="EXPLORING",tl[tl.TRACKING=2]="TRACKING",(tl=fl=fl||{})[tl.DEFAULT=0]="DEFAULT",tl[tl.ROTATIONAL=1]="ROTATIONAL",tl[tl.TRANSLATIONAL=2]="TRANSLATIONAL",tl[tl.CINEMATIC=3]="CINEMATIC",(tl=dl=dl||{})[tl.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",tl[tl.PERSPECTIVE=1]="PERSPECTIVE";var kl,Ml,El="updated",tl=function(){function t(){this.canvas=void 0,this.eventEmitter=new gr,this.matrix=ut(),this.right=k(1,0,0),this.up=k(0,1,0),this.forward=k(0,0,1),this.position=k(0,0,1),this.focalPoint=k(0,0,0),this.distanceVector=k(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ut(),this.projectionMatrixInverse=ut(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=hl.EXPLORING,this.trackingMode=fl.DEFAULT,this.projectionMode=dl.PERSPECTIVE,this.frustum=new Pr,this.orthoMatrix=ut()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===dl.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===hl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===hl.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==hl.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return gt(ut(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ut(),[t,e,0]);this.jitteredProjectionMatrix=vt(ut(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===dl.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===dl.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===dl.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===dl.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===dl.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===dl.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=k(t.x-r,t.y-n,0),e=Vt(i,this.right)/Dt(this.right),r=Vt(i,this.up)/Dt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=dl.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,s,n=this.near*Math.tan(Za(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,o=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/o,r*=this.view.width/i,e*=this.view.height/o),i=this.projectionMatrix,l=(o=l)+r,n=(r=n)-e,e=this.far,a=2*t/(r-n),s=(l+o)/(l-o),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,xt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),gt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=dl.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,a=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=a*this.view.offsetY)-a*this.view.height),Ct(this.projectionMatrix,s,n,r,e,i,o),xt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),gt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=$a(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=k(0,1,0);return this.focalPoint=$a(t,e,n),this.trackingMode===fl.CINEMATIC&&(t=(r=Ht(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Dt(r),e=Ka(Math.asin(e/r)),r=90+Ka(Math.atan2(n,t)),kt(n=ut(),n,Za(r)),wt(n,n,Za(e)),i=Xt(m(),[0,1,0],n)),gt(this.matrix,jt(ut(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=Xa(t),this.computeMatrix(),this._getAxes(),this.type===hl.ORBITING||this.type===hl.EXPLORING?this._getPosition():this.type===hl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=Xa(t),this.computeMatrix(),this._getAxes(),this.type===hl.ORBITING||this.type===hl.EXPLORING?this._getPosition():this.type===hl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=Xa(t),this.computeMatrix(),this._getAxes(),this.type===hl.ORBITING||this.type===hl.EXPLORING?this._getPosition():this.type===hl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=re(ne(),[0,0,1],Za(this.roll)),e=(pt(this.matrix),re(ne(),[1,0,0],Za((this.rotateWorld&&this.type!==hl.TRACKING||this.type===hl.TRACKING?1:-1)*this.elevation))),n=re(ne(),[0,1,0],Za((this.rotateWorld&&this.type!==hl.TRACKING||this.type===hl.TRACKING?1:-1)*this.azimuth)),n=ie(ne(),n,e),n=ie(ne(),n,t),e=Tt(ut(),n);this.type===hl.ORBITING||this.type===hl.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===hl.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=$a(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Bt(this.right,$a(ee(te(),[1,0,0,0],this.matrix))),Bt(this.up,$a(ee(te(),[0,1,0,0],this.matrix))),Bt(this.forward,$a(ee(te(),[0,0,1,0],this.matrix))),Yt(this.right,this.right),Yt(this.up,this.up),Yt(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Dt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===hl.TRACKING||this.rotateWorld?(this.elevation=Ka(Math.asin(e/r)),this.azimuth=Ka(Math.atan2(-t,-n))):(this.elevation=-Ka(Math.asin(e/r)),this.azimuth=-Ka(Math.atan2(-t,-n)))},e._getPosition=function(){Bt(this.position,$a(ee(te(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=lt(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Ht(m(),this.focalPoint,this.position),this.distance=Dt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===dl.ORTHOGRAPHIC&&(t=this.position,e=re(ne(),[0,0,1],-this.roll*Math.PI/180),Pt(this.orthoMatrix,e,k((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),k(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ut(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(El))},e.rotate=function(t,e,n){throw new Error(Ur)},e.pan=function(t,e){throw new Error(Ur)},e.dolly=function(t){throw new Error(Ur)},e.createLandmark=function(t,e){throw new Error(Ur)},e.gotoLandmark=function(t,e){throw new Error(Ur)},t}(),Ol=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Sl=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),_l=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),Al=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Pl=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),Tl=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!rn(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Ll=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&o&&a&&s&&l&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===o||"middle"===o?(r=a/2,u=[.5,1]):"right"!==o&&"end"!==o||(r=a,u=[1,1]),o=0,"middle"===s?o=i[1]:"top"===s||"hanging"===s?o=2*i[1]:"alphabetic"===s?o=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(o=0),l&&(r+=l),c&&(o+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:o}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),Nl=function(){function t(t,e){var f=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new gr,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ut(),this.tmpVec3=m(),this.onPointerDown=function(){var e=Kr(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ya){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:n=t.sent,f.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?f.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,f.dispatchEvent(n,r?"rightdown":"mousedown")),f.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),f.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUp=function(){var e=Kr(E().mark(function t(e){var n,r,i,o,a,s,l;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ya){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,f.createPointerEvent(e);case 5:if(r=t.sent,f.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?f.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,f.dispatchEvent(r,i?"rightup":"mouseup")),i=f.trackingData(e.pointerId),s=f.findMountedTarget(i.pressTargetsByButton[e.button]),(l=s)&&!r.composedPath().includes(s)){for(o=s;o&&!r.composedPath().includes(o);)r.currentTarget=o,f.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?f.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(a=2===r.button,f.notifyTarget(r,a?"rightupoutside":"mouseupoutside")),aa.isNode(o)&&(o=o.parentNode);delete i.pressTargetsByButton[e.button],l=o}l&&((s=f.clonePointerEvent(r,"click")).target=l,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(l=i.clicksByButton[e.button]).target===s.target&&n-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=s.target,l.timeStamp=n,s.detail=l.clickCount,null!=(l=r.detail)&&l.preventClick||("mouse"!==s.pointerType&&"touch"!==s.pointerType||f.dispatchEvent(s,"click"),f.dispatchEvent(s,"pointertap")),f.freeEvent(s)),f.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerMove=function(){var e=Kr(E().mark(function t(e){var n,r,i,o,a,s,l,c,u,h;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ya){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=f.trackingData(e.pointerId),o=f.findMountedTarget(i.overTargets),i.overTargets&&o!==n.target)return l="mousemove"===e.type?"mouseout":"pointerout",t.next=12,f.createPointerEvent(e,l,o||void 0);t.next=23;break;case 12:if(a=t.sent,f.dispatchEvent(a,"pointerout"),r&&f.dispatchEvent(a,"mouseout"),n.composedPath().includes(o)){t.next=22;break}return t.next=18,f.createPointerEvent(e,"pointerleave",o||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,f.notifyTarget(s),r&&f.notifyTarget(s,"mouseleave"),aa.isNode(s.target)&&(s.target=s.target.parentNode);f.freeEvent(s);case 22:f.freeEvent(a);case 23:if(o===n.target){t.next=38;break}l="mousemove"===e.type?"mouseover":"pointerover",c=f.clonePointerEvent(n,l),f.dispatchEvent(c,"pointerover"),r&&f.dispatchEvent(c,"mouseover"),u=o&&aa.isNode(o)&&o.parentNode;case 29:if(u&&u!==(aa.isNode(f.rootTarget)&&f.rootTarget.parentNode)){if(u===n.target)return t.abrupt("break",35);t.next=32}else t.next=35;break;case 32:u=u.parentNode,t.next=29;break;case 35:if(!u||u===(aa.isNode(f.rootTarget)&&f.rootTarget.parentNode)){for((h=f.clonePointerEvent(n,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==o&&h.target!==(aa.isNode(f.rootTarget)&&f.rootTarget.parentNode);)h.currentTarget=h.target,f.notifyTarget(h),r&&f.notifyTarget(h,"mouseenter"),aa.isNode(h.target)&&(h.target=h.target.parentNode);f.freeEvent(h)}f.freeEvent(c);case 38:f.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&f.dispatchEvent(n,"touchmove"),r&&(f.dispatchEvent(n,"mousemove"),f.cursor=f.getCursor(n.target)),i.overTargets=n.composedPath(),f.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOut=function(){var e=Kr(E().mark(function t(e){var n,r,i,o,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ya){t.next=2;break}return t.abrupt("return");case 2:if((n=f.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=f.findMountedTarget(n.overTargets),t.next=8,f.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return o=t.sent,f.dispatchEvent(o),r&&f.dispatchEvent(o,"mouseout"),t.next=13,f.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((a=t.sent).eventPhase=a.AT_TARGET;a.target&&a.target!==(aa.isNode(f.rootTarget)&&f.rootTarget.parentNode);)a.currentTarget=a.target,f.notifyTarget(a),r&&f.notifyTarget(a,"mouseleave"),aa.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=null,f.freeEvent(o),f.freeEvent(a);case 19:f.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOver=function(){var e=Kr(E().mark(function t(e){var n,r,i,o;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ya){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),t.next=5,f.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,f.dispatchEvent(r,"pointerover"),i&&f.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(f.cursor=f.getCursor(r.target)),(o=f.clonePointerEvent(r,"pointerenter")).eventPhase=o.AT_TARGET;o.target&&o.target!==(aa.isNode(f.rootTarget)&&f.rootTarget.parentNode);)o.currentTarget=o.target,f.notifyTarget(o),i&&f.notifyTarget(o,"mouseenter"),aa.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=r.composedPath(),f.freeEvent(r),f.freeEvent(o);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var e=Kr(E().mark(function t(e){var n,r,i,o;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ya){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),r=f.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,f.createPointerEvent(e);case 6:if(i=t.sent,r){for(o=r;o;)i.currentTarget=o,f.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||f.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),aa.isNode(o)&&(o=o.parentNode);delete n.pressTargetsByButton[e.button]}f.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onWheel=function(){var e=Kr(E().mark(function t(e){var n;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof ga){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createWheelEvent(e);case 4:n=t.sent,f.dispatchEvent(n),f.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Tr(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new Tr(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.context.config,i=r.width,r=r.height,o=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=vt(this.tmpMatrix,n,o),o=zt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Xt(o,o,n),new Tr(o[0],o[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=vt(this.tmpMatrix,n,e),e=zt(this.tmpVec3,t.x,t.y,0),t=(Xt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Tr((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,n=this.rootTarget.defaultView||null,t.currentTarget=n,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;o<n.length;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)aa.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(){var e=Kr(E().mark(function t(e){var n,r,i,o;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,o=this.context.config,i=o.width,o=o.height,n<0||r<0||i<n||o<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e=this.context.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=oi(this.globalRuntime.displayObjectPool.getHTMLs());!(n=e()).done;){var n=n.value;if(-1<t.nativeEvent.composedPath().indexOf(n))return n}return null},e.pickTarget=function(){var e=Kr(E().mark(function t(e){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.createPointerEvent=function(){var r=Kr(E().mark(function t(e,n,r){var i,o;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=this.allocateEvent(ya),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r?t.next=11:(t.t0=r,t.next=20);break;case 11:if(t.t1=o,t.t1)t.next=19;else{if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18}break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.createWheelEvent=function(){var e=Kr(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(ga),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0)t.next=15;else{if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14}break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(ga);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(ya);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof ya&&e instanceof ya&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof pa&&e instanceof pa&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||aa.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=da.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=aa.isNode(e)&&e.parentNode}},t}(),Cl=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),jl=((Rl=kl=kl||{})[Rl.CAMERA_CHANGED=0]="CAMERA_CHANGED",Rl[Rl.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",Rl[Rl.NONE=2]="NONE",function(){function t(t,e){this.globalRuntime=void 0,this.context=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new ia(v.RENDER_ORDER_CHANGED),this.hooks={init:new nl,dirtycheck:new ll(["object"]),cull:new ll(["object","camera"]),beginFrame:new al([]),beforeRender:new al(["objectToRender"]),render:new al(["objectToRender"]),afterRender:new al(["objectToRender"]),endFrame:new al([]),destroy:new al([]),pick:new il(["result"]),pickSync:new ll(["result"]),pointerDown:new al(["event"]),pointerUp:new al(["event"]),pointerMove:new al(["event"]),pointerOut:new al(["event"]),pointerOver:new al(["event"]),pointerWheel:new al(["event"]),pointerCancel:new al(["event"])},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=Kr(E().mark(function t(){var e;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=ti({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e)}),t.next=4,this.hooks.init.promise();case 4:this.inited=!0;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(kl.CAMERA_CHANGED)},e.render=function(t){var e=this,n=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(n.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),n.renderReasons.size&&this.inited&&(this.renderDisplayObject(n.root,t,n),this.hooks.beginFrame.call(),n.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),n.renderListCurrentFrame=[],n.renderReasons.clear())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,i=i.enableCulling,o=(this.globalRuntime.styleValueRegistry.recalc(t),o?this.hooks.dirtycheck.call(t):t),o=(o&&(i=i?this.hooks.cull.call(o,this.context.camera):o)&&(this.stats.rendered++,n.renderListCurrentFrame.push(i)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),i=!1;o.dirty&&(o.sorted=t.childNodes.slice().sort(Wr),o.dirty=!(i=!0)),(o.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)}),i&&t.forEach(function(t){r.renderOrderChangedEvent.target=t,r.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.ownerDocument.defaultView.dispatchEvent(r.renderOrderChangedEvent,!0)})},e.destroy=function(){this.inited=!1,this.hooks.destroy.call()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(kl.DISPLAY_OBJECT_CHANGED)},t}()),Fl=/\[\s*(.*)=(.*)\s*\]/,Rl=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===o.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:o.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===o.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:o.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(Fl),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!_(t))&&t.toString?t.toString():""},t}(),Il=function(){function t(t){var a,i,o,r,s,l,c,u,h,n,f,d,y=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new ia(v.BOUNDS_CHANGED),this.rotate=(a=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));var i,o,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ae(r=ne(),e[0],e[1],e[2]),i=y.getRotation(t),o=y.getRotation(t.parentNode),le(a,o),oe(a,a),ie(r,a,r),ie(n.localRotation,r,i),ue(n.localRotation,n.localRotation),y.dirtifyLocal(t,n)):y.rotateLocal(t,e)}),this.rotateLocal=(i=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;ae(i,e[0],e[1],e[2]),ce(n.localRotation,n.localRotation,i),y.dirtifyLocal(t,n)}),this.setEulerAngles=(o=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ae(n.localRotation,e[0],e[1],e[2]),r=y.getRotation(t.parentNode),le(o,oe(ne(),r)),ce(n.localRotation,n.localRotation,o),y.dirtifyLocal(t,n)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));var i,o,a,s,l,c,u,h,f,d,p,n=t.transformable;Zt(e,m())||(i=r=e,o=n.localRotation,a=o[0],s=o[1],l=o[2],o=o[3],c=i[0],u=i[1],i=i[2],p=s*(d=a*u-s*c)-l*(f=l*c-a*i),l=l*(h=s*i-l*u)-a*d,a=a*f-s*h,f*=s=2*o,d*=s,l*=2,a*=2,r[0]=c+(h*=s)+(p*=2),r[1]=u+f+l,r[2]=i+d+a,Wt(n.localPosition,n.localPosition,e),y.dirtifyLocal(t,n))},this.setPosition=(r=ut(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Zt(y.getPosition(t),s)||(Bt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ft(r,e.worldTransform),gt(r,r),Xt(n.localPosition,s,r)):Bt(n.localPosition,s),y.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Zt(n.localPosition,l)||(Bt(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),h=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Zt(e="number"==typeof e?zt(u,e,n,r):e,c)||(Wt(h,y.getPosition(t),e),y.setPosition(t,h))}),this.setRotation=function(){var a=ne();return function(t,e,n,r,i){var o=t.transformable;"number"==typeof e&&(e=se(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),le(a,n),oe(a,a),ie(o.localRotation,a,e),ue(o.localRotation,o.localRotation),y.dirtifyLocal(t,o)):y.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ut(),f=m(),d=se(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Pt(t.localTransform,t.localRotation,t.localPosition,k(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=Pt(n,d,f,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):Pt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,_(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;Zt(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;ae(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=k(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=k(e[0],e[1],e[2]||n.localScale[2]);Zt(e,n.localScale)||(Bt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=se(e,n,r,i));n=t.transformable;le(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=he(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new la(v.ATTR_MODIFIED,t,n,n,e,la.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return St(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return At(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return _t(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=St(m(),e),r=At(ne(),e),e=_t(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return _r.isEmpty(e)?null:((n=n||new _r).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new _r},e.getBounds=function(t,e){var n,r,i=this,o=(void 0===e&&(e=!1),t.renderable);return o.boundsDirty||e||!o.bounds?!o.renderBoundsDirty&&e&&o.renderBounds?o.renderBounds:(n=e?o.renderBounds:o.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new _r).update(t.center,t.halfExtents))}),e&&(t=Hr(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new _r)&&(e?o.renderBounds=r:o.bounds=r),e?o.renderBoundsDirty=!1:o.boundsDirty=!1,r):o.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=ut(),r=(t.parentNode.transformable&&(n=gt(ut(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!_r.isEmpty(r))return(e=new _r).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(_r.isEmpty(i)||(r=new _r).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new Lr(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Lr((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?vt(e.worldTransform,n.worldTransform,e.localTransform):ft(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),Dl={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Bl=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,zl=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Wl=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Hl=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Wl.exec(e)&&!zl.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Dl.MetricsString+Dl.BaselineSymbol),o=Math.ceil(e.measureText(i).width),a=Math.ceil(e.measureText(Dl.BaselineSymbol).width),s=Dl.HeightMultiplier*a,a=a*Dl.BaselineMultiplier|0,l=(r.width=o,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,o,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,a),e.getImageData(0,0,o||1,s||1).data),r=l.length,c=4*o,u=0,h=0,f=!1,u=0;u<a;++u){for(var d=0;d<c;d+=4)if(255!==l[h+d]){f=!0;break}if(f)break;h+=c}for(n.ascent=a-u,h=r-c,f=!1,u=s;a<u;--u){for(var p=0;p<c;p+=4)if(255!==l[h+p]){f=!0;break}if(f)break;h-=c}return n.descent=u-a,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,h=(e.textPathSide,e.textPathStartOffset,e.leading),h=void 0===h?0:h,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=an(e)&&e+"px"||"16px",o=rn(n)?n.split(","):[n],a=o.length-1;0<=a;a--){var s=o[a].trim();!ul.test(s)&&cl.indexOf(s)<0&&(s='"'+s+'"'),o[a]=s}return r+" "+i+" "+t+" "+e+" "+o.join(",")}(e),d=this.measureFont(f,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=f,e.isOverflowing=!1;var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(y.length),m=0;if(!u){for(var v=0;v<y.length;v++){var b=p.measureText(y[v]).width+(y[v].length-1)*c;g[v]=b,m=Math.max(m,b)}var r=m+a,x=o||d.fontSize+a,i=Math.max(x,d.fontSize+a)+(y.length-1)*(x+h),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:r,height:i,lines:y,lineWidths:g,lineHeight:x+=h,maxLineWidth:m,fontProperties:d,lineMetrics:g.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Lr(n-a/2,w+e*x,t+a,x)})}}u.getTotalLength(),u.getPoint(0);for(var k=0;k<y.length;k++)p.measureText(y[k]).width,y[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,o=e.letterSpacing,a=e.maxLines,s=void 0===a?1/0:a,a=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+o,u="",h=("ellipsis"===a?u="...":a&&"clip"!==a&&(u=a),[]),f=0,d=0,p={},y=function(t){return r.getFromCache(t,o,p,l)},g=Array.from(u).reduce(function(t,e){return t+y(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=y(b);if(this.isNewline(b)){if(s<=++f){e.isOverflowing=!0;break}d=0,h[f]=""}else{if(0<d&&c<d+k){if(s<=f+1){if(e.isOverflowing=!0,0<g&&g<=c){for(var M=0,E=0,O=0;O<h[f].length;O++){var S=y(h[f][O]);if(c<M+S+g){E=O;break}M+=S}h[f]=(h[f]||"").slice(0,E)+u}break}if(d=0,h[++f]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(h=this.trimToBreakable(h),d=this.sumTextWidthByCache(h[f]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(h=this.trimByKinsokuShorui(h),d+=y(x||""))}d+=k,h[f]=(h[f]||"")+b}}return h.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=Dl.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Dl.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!Bl.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!Bl.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),b={},Ol=(Tl=new Tl,Pl=new Pl,(sw={})[M.CIRCLE]=new Ol,sw[M.ELLIPSE]=new Sl,sw[M.RECT]=Tl,sw[M.IMAGE]=Tl,sw[M.GROUP]=Tl,sw[M.LINE]=new _l,sw[M.TEXT]=new Ll(b),sw[M.POLYLINE]=Pl,sw[M.POLYGON]=Pl,sw[M.PATH]=new Al,sw[M.HTML]=null,sw[M.MESH]=null,sw),Ll=(Sl=new o,Tl=new Ho,(_l={})[r.PERCENTAGE]=null,_l[r.NUMBER]=new Uo,_l[r.ANGLE]=new n,_l[r.DEFINED_PATH]=new e,_l[r.PAINT]=Sl,_l[r.COLOR]=Sl,_l[r.FILTER]=new a,_l[r.LENGTH]=Tl,_l[r.LENGTH_PERCENTAGE]=Tl,_l[r.LENGTH_PERCENTAGE_12]=new Go,_l[r.LENGTH_PERCENTAGE_14]=new Yo,_l[r.COORDINATE]=new Vo,_l[r.OFFSET_DISTANCE]=new Xo,_l[r.OPACITY_VALUE]=new $o,_l[r.PATH]=new Zo,_l[r.LIST_OF_POINTS]=new Ko,_l[r.SHADOW_BLUR]=new Jo,_l[r.TEXT]=new Qo,_l[r.TEXT_TRANSFORM]=new ta,_l[r.TRANSFORM]=new l,_l[r.TRANSFORM_ORIGIN]=new zo,_l[r.Z_INDEX]=new ea,_l[r.MARKER]=new qo,_l),Pl=(b.CameraContribution=tl,b.AnimationTimeline=null,b.EasingFunction=null,b.offscreenCanvas=new Cl,b.displayObjectPool=new _a,b.sceneGraphSelector=new Rl,b.sceneGraphService=new Il(b),b.textService=new Hl(b),b.geometryUpdaterFactory=Ol,b.CSSPropertySyntaxFactory=Ll,b.styleValueRegistry=new Qs,b.layoutRegistry=null,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}()),Al=function(){function t(t){this.plugins=[],this.config=void 0,this.config=ti({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),Gl=function(){function o(t){this.strategies=void 0,this.strategies=t}return o.prototype.apply=function(t){var n=t.camera,e=t.renderingService,r=t.renderingContext,i=this.strategies;e.hooks.cull.tap(o.tag,function(e){var t;return e&&(t=e.cullable,0===i.length?t.visible=-1<r.unculledEntities.indexOf(e.entity):t.visible=i.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new ia(v.CULLED)),null))}),e.hooks.afterRender.tap(o.tag,function(t){t.cullable.visibilityPlaneMask=-1})},o}(),Yl=(Gl.tag="Culling",function(){function n(){}return n.prototype.apply=function(t){var e=t.renderingService;e.hooks.dirtycheck.tap(n.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},n}()),Vl=(Yl.tag="DirtyCheck",function(){function e(){var o=this;this.autoPreventDefault=!1,this.rootPointerEvent=new ya(null),this.rootWheelEvent=new ga(null),this.context=void 0,this.onPointerMove=function(t){var e,n=null==(e=o.context.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=oi(o.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,n);o.context.eventService.mapEvent(i)}o.setCursor(o.context.eventService.cursor)}}}var t=e.prototype;return t.apply=function(t){var o=this,t=(this.context=t).renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(){var e=Kr(E().mark(function t(e){var n;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.context.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(e.tag,function(t){t=o.normalizeWheelEvent(t);o.context.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(e.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){var e=o.normalizeToPointerEvent(t,a);!o.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=oi(e);!(r=n()).done;){var r=r.value,r=o.bootstrapEvent(o.rootPointerEvent,r,a);o.context.eventService.mapEvent(r)}o.setCursor(o.context.eventService.cursor)}}),t.hooks.pointerUp.tap(e.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){for(var e=o.context.contextService.getDomElement(),n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":"",r=oi(o.normalizeToPointerEvent(t,a));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,a);i.type+=n,o.context.eventService.mapEvent(i)}o.setCursor(o.context.eventService.cursor)}}),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)},t.getViewportXY=function(t){var e,n=t.offsetX,r=t.offsetY,i=t.clientX,t=t.clientY;return t=!this.context.config.supportsCSSTransform||_(n)||_(r)?(e=(i=this.context.eventService.client2Viewport(new Tr(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var n=this.getViewportXY(e),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.context.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=$r[t.type]||t.type),t},t.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.getViewportXY(t)),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.context.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];un(i.button)&&(i.button=0),un(i.buttons)&&(i.buttons=1),un(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),un(i.width)&&(i.width=i.radiusX||1),un(i.height)&&(i.height=i.radiusY||1),un(i.tiltX)&&(i.tiltX=0),un(i.tiltY)&&(i.tiltY=0),un(i.pointerType)&&(i.pointerType="touch"),un(i.pointerId)&&(i.pointerId=i.identifier||0),un(i.pressure)&&(i.pressure=i.force||.5),un(i.twist)&&(i.twist=0),un(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(un((e=t).isPrimary)&&(e.isPrimary=!0),un(e.width)&&(e.width=1),un(e.height)&&(e.height=1),un(e.tiltX)&&(e.tiltX=0),un(e.tiltY)&&(e.tiltY=0),un(e.pointerType)&&(e.pointerType="mouse"),un(e.pointerId)&&(e.pointerId=1),un(e.pressure)&&(e.pressure=.5),un(e.twist)&&(e.twist=0),un(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),ql=(Vl.tag="Event",[M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML]),Ul=function(){function t(){}var e=t.prototype;return e.isVisible=function(t,e){var n,r,i=e.cullable;return!i.enable||(n=e.getRenderBounds(),!_r.isEmpty(n)&&(t=t.getFrustum(),r=null==(r=e.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,n,r||Sr.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==Sr.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Sr.OUTSIDE||n===Sr.INSIDE)return n;for(var i=Sr.INSIDE,o=-1<ql.indexOf(t.nodeName),a=0,s=r.length;a<s;++a){var l=1<<a;if(0!=(n&l)&&(!o||4!==a&&5!==a)){var c=r[a],u=c.normal,c=c.distance;if(Vt(u,e.getPositiveFarPoint(r[a]))+c<0)return Sr.OUTSIDE;Vt(u,e.getNegativeFarPoint(r[a]))+c<0&&(i|=l)}}return i},t}(),Xl=function(){function c(){this.rBush=void 0,this.toSync=new Set}var t=c.prototype;return t.apply=function(t){function e(t){t.target.renderable.dirty=!0,a.dirtify()}function n(t){for(var e=t.detail.affectChildren,t=t.target,n=(e&&t.forEach(function(t){o.toSync.add(t)}),t);n;)n.renderable&&o.toSync.add(n),n=n.parentElement;a.dirtify()}function r(t){t=t.target,b.styleValueRegistry.recalc(t),b.sceneGraphService.dirtifyToRoot(t),a.dirtify()}function i(t){var e=(t=t.target).rBushNode;e.aabb&&o.rBush.remove(e.aabb),o.toSync.delete(t),b.sceneGraphService.dirtifyToRoot(t),a.dirtify()}var o=this,a=t.renderingService,s=t.renderingContext,t=t.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=t;a.hooks.init.tapPromise(c.tag,Kr(E().mark(function t(){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:l.addEventListener(v.MOUNTED,r),l.addEventListener(v.UNMOUNTED,i),l.addEventListener(v.ATTR_MODIFIED,e),l.addEventListener(v.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),a.hooks.destroy.tap(c.tag,function(){l.removeEventListener(v.MOUNTED,r),l.removeEventListener(v.UNMOUNTED,i),l.removeEventListener(v.ATTR_MODIFIED,e),l.removeEventListener(v.BOUNDS_CHANGED,n)}),a.hooks.endFrame.tap(c.tag,function(){o.syncRTree()})},t.syncRTree=function(){var a=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,o=(i&&i.aabb&&a.rBush.remove(i.aabb),t.getRenderBounds());o&&(e=(n=o.getMin())[0],n=n[1],r=(o=o.getMax())[0],o=o[1],i.aabb||(i.aabb={}),i.aabb.id=t.entity,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=o),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},c}(),$l=(Xl.tag="Prepare",(sw=Ml=Ml||{}).READY="ready",sw.BEFORE_RENDER="beforerender",sw.AFTER_RENDER="afterrender",sw.BEFORE_DESTROY="beforedestroy",sw.AFTER_DESTROY="afterdestroy",sw.RESIZE="resize",sw.DIRTY_RECTANGLE="dirtyrectangle",new ia(v.MOUNTED)),Zl=new ia(v.UNMOUNTED),Kl=new ia(Ml.BEFORE_RENDER),Jl=new ia(Ml.AFTER_RENDER),Ql=function(k){function t(t){var e=k.call(this)||this,n=(e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=N,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new sa,e.document.defaultView=ri(e),e.customElements=new na,t.container),r=t.canvas,i=t.offscreenCanvas,o=t.width,a=t.height,s=t.devicePixelRatio,l=t.renderer,c=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,y=t.supportsPointerEvents,g=t.supportsTouchEvents,m=t.supportsCSSTransform,v=t.isTouchEvent,t=t.isMouseEvent,b=(b=n,x=ri(e),b&&(b="string"==typeof b?b:b.id||Br++,Dr[b]&&Dr[b].destroy(),Dr[b]=x),o),x=a,w=s;return r&&(w=1<=(w=s||zr&&window.devicePixelRatio||1)?Math.ceil(w):1,b=o||("auto"===(o=Gr(s=r,"width"))?s.offsetWidth:parseFloat(o))||r.width/w,x=a||("auto"===(o=Gr(s=r,"height"))?s.offsetHeight:parseFloat(o))||r.height/w),e.devicePixelRatio=w,e.requestAnimationFrame=null!=f?f:Er.bind(globalThis),e.cancelAnimationFrame=null!=d?d:Or.bind(globalThis),e.supportsTouchEvents=null!=g?g:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=y?y:!!globalThis.PointerEvent,e.isTouchEvent=null!=v?v:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:b,height:x,renderer:l,offscreenCanvas:i,devicePixelRatio:w,cursor:u||"default",background:c||"transparent",createImage:p,document:h,supportsCSSTransform:m}),e.initDefaultCamera(b,x),Kr(E().mark(function t(){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new ia(Ml.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}s(t,k);var e=t.prototype;return e.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.initDefaultCamera=function(t,e){var n=this,r=new b.CameraContribution;r.setType(hl.EXPLORING,fl.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r.canvas=this,r.eventEmitter.on(El,function(){n.context.renderingContext.renderReasons.add(kl.CAMERA_CHANGED)}),this.context.camera=r},e.getConfig=function(){return this.context.config},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.context.camera},e.getContextService=function(){return this.context.contextService},e.getEventService=function(){return this.context.eventService},e.getRenderingService=function(){return this.context.renderingService},e.getRenderingContext=function(){return this.context.renderingContext},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new ia(Ml.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&this.document.destroy(),this.getRenderingService().destroy(),this.getContextService().destroy(),e||this.dispatchEvent(new ia(Ml.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.context.config,n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.context.camera),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===dl.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new ia(Ml.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.removeChildren=function(){this.document.documentElement.removeChildren()},e.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.render=function(){this.dispatchEvent(Kl),this.getRenderingService().render(this.getConfig()),this.dispatchEvent(Jl)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=Kr(E().mark(function t(e){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new w,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Vl,new Xl,new Yl,new Gl([new Ul])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(ti({},b,this.context)),this.context.renderingService=new jl(b,this.context),this.context.eventService=new Nl(b,this.context),this.context.eventService.init(),t.next=14,this.context.contextService.init();case 14:return t.next=16,this.context.renderingService.init();case 16:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 20:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init()})},e.setRenderer=function(){var e=Kr(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(Zl):(Zl.target=t,this.dispatchEvent(Zl,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent($l):($l.target=t,this.dispatchEvent($l,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},Qr(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(oa);function tc(t,e){return(tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}o=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).landmarks=[],t.landmarkAnimationID=void 0,t}t=i,(n=e).prototype=Object.create(t.prototype),tc(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=Xa(e),this.relAzimuth=Xa(t),this.relRoll=Xa(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===hl.EXPLORING){e=re(ne(),[1,0,0],Za((this.rotateWorld?1:-1)*this.relElevation)),t=re(ne(),[0,1,0],Za((this.rotateWorld?1:-1)*this.relAzimuth)),n=re(ne(),[0,0,1],Za(this.relRoll)),t=ie(ne(),t,e),t=ie(ne(),t,n),e=Tt(ut(),t);bt(this.matrix,this.matrix,[0,0,-this.distance]),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===hl.ORBITING||this.type===hl.EXPLORING?this._getPosition():this.type===hl.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=$a(t,e,0),e=It(this.position);return Wt(e,e,Gt(m(),this.right,t[0])),Wt(e,e,Gt(m(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=It(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===hl.ORBITING||this.type===hl.EXPLORING?this._getDistance():this.type===hl.TRACKING&&Wt(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.createLandmark=function(t,e){var e=e=void 0===e?{}:e,n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,o=new b.CameraContribution,n=(o.setType(this.type,void 0),o.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),o.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),o.setRoll(i||this.roll),o.setZoom(e||this.zoom),{name:t,matrix:ht(o.getWorldTransform()),right:It(o.right),up:It(o.up),forward:It(o.forward),position:It(o.getPosition()),focalPoint:It(o.getFocalPoint()),distanceVector:It(o.getDistanceVector()),distance:o.getDistance(),dollyingStep:o.getDollyingStep(),azimuth:o.getAzimuth(),elevation:o.getElevation(),roll:o.getRoll(),relAzimuth:o.relAzimuth,relElevation:o.relElevation,relRoll:o.relRoll,zoom:o.getZoom()});return this.landmarks.push(n),n},n.gotoLandmark=function(e,t){var n,s,r,i,l,c,u,h,f,d,p,y,g=this,o=(void 0===t&&(t={}),rn(e)?this.landmarks.find(function(t){return t.name===e}):e);o&&(n=void 0===(n=(t=an(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,l=.01,0===s?(this.syncFromLandmark(o),i&&i()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),c=o.position,u=o.focalPoint,h=o.zoom,f=o.roll,d=r||b.EasingFunction(n),y=function(){g.setFocalPoint(u),g.setPosition(c),g.setRoll(f),g.setZoom(h),g.computeMatrix(),g.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,o,a,e=e-(p=void 0===p?e:p);s<e||(n=d(e/s),r=m(),i=m(),o=1,a=0,Ut(r,g.focalPoint,u,n),Ut(i,g.position,c,n),a=g.roll*(1-n)+f*n,o=g.zoom*(1-n)+h*n,g.setFocalPoint(r),g.setPosition(i),g.setRoll(a),g.setZoom(o),Jt(r,u)+Jt(i,c)<=l)?y():(g.computeMatrix(),g.triggerUpdate(),e<s&&(g.landmarkAnimationID=g.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){this.matrix=ft(this.matrix,t.matrix),this.right=Bt(this.right,t.right),this.up=Bt(this.up,t.up),this.forward=Bt(this.forward,t.forward),this.position=Bt(this.position,t.position),this.focalPoint=Bt(this.focalPoint,t.focalPoint),this.distanceVector=Bt(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(tl);function ec(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function nc(t,e,n){e&&ec(t.prototype,e),n&&ec(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function rc(t,e){return(rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}b.CameraContribution=o;function ic(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Ac?Float32Array:Array)(11),t=0;t<11;++t)w[t]=Nc(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=Cc(r,b,x);if(.001<=i){for(var o=t,a=r,s=b,l=x,c=0;c<Oc;++c){var u=Cc(a,s,l);if(0===u)return a;a-=(Nc(a,s,l)-o)/u}return a}if(0===i)return r;for(var h,f,d=t,p=e,y=e+.1,g=b,m=x,v=0;0<(h=Nc(f=p+(y-p)/2,g,m)-d)?y=f:p=f,Math.abs(h)>Sc&&++v<_c;);return f}return function(t){return 0===t||1===t?t:Nc(r(t),e,n)}}function oc(t){return Math.pow(t,2)}function ac(t){return Math.pow(t,3)}function sc(t){return Math.pow(t,4)}function lc(t){return Math.pow(t,5)}function cc(t){return Math.pow(t,6)}function uc(t){return 1-Math.cos(t*Math.PI/2)}function hc(t){return 1-Math.sqrt(1-t*t)}function fc(t){return t*t*(3*t-2)}function dc(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}function pc(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=on(Number(void 0===n?1:n),1,10),e=on(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function yc(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,o=void 0===(o=e[2])?10:o,e=void 0===(e=e[3])?0:e,r=on(void 0===r?1:r,.1,1e3),i=on(i,.1,1e3),o=on(o,.1,1e3),e=on(e,.1,1e3),a=Math.sqrt(i/r),i=(o=o/(2*Math.sqrt(i*r)))<1?a*Math.sqrt(1-o*o):0,r=o<1?(o*a-e)/i:-e+a,e=n?n*t/1e3:t,e=o<1?Math.exp(-e*o*a)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*a);return 0===t||1===t?t:1-e}function gc(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(on(t,0,1)*n)/n}function mc(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return ic(n,r,i,e)(t)}function vc(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function bc(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function xc(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function wc(t){return t}var kc=function(i){var t,e;function n(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return e=i,(t=n).prototype=Object.create(e.prototype),rc(t.prototype.constructor=t,e),n}(ra),Mc=0,Ec=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+Mc++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}},e.persist=function(){throw new Error(Ur)},e.addEventListener=function(t,e,n){throw new Error(Ur)},e.removeEventListener=function(t,e,n){throw new Error(Ur)},e.dispatchEvent=function(t){throw new Error(Ur)},e.commitStyles=function(){throw new Error(Ur)},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new kc(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new kc(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},nc(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending)||this.resolveReadyPromise(),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),e=this.currentTime,this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),Oc=4,Sc=1e-7,_c=10,Ac="function"==typeof Float32Array,Pc=function(t,e){return 1-3*e+3*t},Tc=function(t,e){return 3*e-6*t},Lc=function(t){return 3*t},Nc=function(t,e,n){return((Pc(e,n)*t+Tc(e,n))*t+Lc(e))*t},Cc=function(t,e,n){return 3*Pc(e,n)*t*t+2*Tc(e,n)*t+Lc(e)},Ho=ic(.42,0,1,1),jc={steps:gc,"step-start":function(t){return gc(t,[1,"start"])},"step-end":function(t){return gc(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":mc,ease:function(t){return mc(t,[.25,.1,.25,1])},in:Ho,out:vc(Ho),"in-out":bc(Ho),"out-in":xc(Ho),"in-quad":oc,"out-quad":vc(oc),"in-out-quad":bc(oc),"out-in-quad":xc(oc),"in-cubic":ac,"out-cubic":vc(ac),"in-out-cubic":bc(ac),"out-in-cubic":xc(ac),"in-quart":sc,"out-quart":vc(sc),"in-out-quart":bc(sc),"out-in-quart":xc(sc),"in-quint":lc,"out-quint":vc(lc),"in-out-quint":bc(lc),"out-in-quint":xc(lc),"in-expo":cc,"out-expo":vc(cc),"in-out-expo":bc(cc),"out-in-expo":xc(cc),"in-sine":uc,"out-sine":vc(uc),"in-out-sine":bc(uc),"out-in-sine":xc(uc),"in-circ":hc,"out-circ":vc(hc),"in-out-circ":bc(hc),"out-in-circ":xc(hc),"in-back":fc,"out-back":vc(fc),"in-out-back":bc(fc),"out-in-back":xc(fc),"in-bounce":dc,"out-bounce":vc(dc),"in-out-bounce":bc(dc),"out-in-bounce":xc(dc),"in-elastic":pc,"out-elastic":vc(pc),"in-out-elastic":bc(pc),"out-in-elastic":xc(pc),spring:yc,"spring-in":yc,"spring-out":vc(yc),"spring-in-out":bc(yc),"spring-out-in":xc(yc)},Fc=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function Rc(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var Uo="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Ic=new RegExp("cubic-bezier\\("+Uo+","+Uo+","+Uo+","+Uo+"\\)"),Dc=/steps\(\s*(\d+)\s*\)/,Bc=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function zc(t){var e=Ic.exec(t);return e?ic.apply(void 0,e.slice(1).map(Number)):(e=Dc.exec(t))?Rc(Number(e[1]),0):(e=Bc.exec(t))?Rc(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):jc[Fc(t)]||jc.linear}function Wc(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var Hc=0,Gc=1,Yc=2,Vc=3;function qc(t,e,n){c=t,i=n;var r,i,o,a,s,l=null===(l=e)?Hc:(r=i.endTime,l<Math.min(i.delay,r)?Gc:l>=Math.min(i.delay+c+i.endDelay,r)?Yc:Vc),c=function(t,e,n,r,i){switch(r){case Gc:return"backwards"===e||"both"===e?0:null;case Vc:return n-i;case Yc:return"forwards"===e||"both"===e?t:null;case Hc:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,a=c,s=n.iterationStart,0===r?t!==Gc&&(s+=e):s+=a/r,e=t=s,a=n.iterationStart,s=l,o=n.iterations,c=c,i=i,e=a=0!==(a=e===1/0?a%1:e%1)||s!==Yc||0===o||0===c&&0!==i?a:1,s=n.iterations,o=e,c=t,i=l===Yc&&s===1/0?1/0:1===o?Math.floor(c)-1:Math.floor(c),a=n.direction,t=i,l=e,o="normal"===(s="normal"!==(s=a)&&"reverse"!==a&&(t=t,"alternate-reverse"===a&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?l:1-l,n.currentIteration=i,n.progress=o,n.easingFunction(o))}function Uc(t,e,n){var o=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var o;Xc(i)&&(o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:zc(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(o))}return n}(t,e),a=function(t,e){var n,r=[];for(n in t)for(var i=t[n],o=0;o<i.length-1;o++){var a=o,s=o+1,l=i[a].computedOffset,c=i[s].computedOffset,u=l,h=c;0===o&&(u=-1/0,0===c)&&(s=a),o===i.length-2&&(h=1/0,1===l)&&(a=s),r.push({applyFrom:u,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:n,interpolation:function(t,e,n,r){var i=yl[t];if(i&&i.syntax&&i.int){i=b.styleValueRegistry.getPropertySyntax(i.syntax);if(i){var o,a=b.styleValueRegistry.parseProperty(t,e,r),s=b.styleValueRegistry.parseProperty(t,n,r),a=b.styleValueRegistry.computeProperty(t,a,r),t=b.styleValueRegistry.computeProperty(t,s,r),s=i.mixer(a,t,r);if(s)return o=$c.apply(void 0,s),function(t){return 0===t?e:1===t?n:o(t)}}}return $c(!1,!0,function(t){return t?n:e})}(n,i[a].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(o,n);return function(r,i){if(null!==i)a.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in o)Xc(t)&&(r.style[t]=null)}}function Xc(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var $c=function(e,n,r){return function(t){return r(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var Zc=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=wc,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return nc(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=zc(t),this._easing=t}}]),t}();function Kc(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],o=(i=Array.isArray(i)?i:[i]).length,a=0;a<o;a++)n[a]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[a]=r),void 0!==i[a]&&null!==i[a]&&(n[a][e]=i[a]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,o=0;o<e.length;o++){var a=e[o].offset;if(_(a))n=!1;else{if(a<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=a}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,l=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),c=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(c)){for(var f=1;f<u-l;f++)e[l+f].computedOffset=c+(Number(h)-c)*f/(u-l);l=u,c=Number(h)}}return e}var Jc="backwards|forwards|both|none".split("|"),Qc="reverse|alternate|alternate-reverse".split("|");function tu(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new Zc,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===Jc.indexOf(n[t])||"direction"===t&&-1===Qc.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var eu=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=tu(n,!1),(this.timing.effect=this).timing.activeDuration=Wc(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Kc(e,this.timing),this.interpolations=Uc(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=qc(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=Kc(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})},t}();function nu(t,e){return Number(t.id)-Number(e.id)}n=function(){function t(t){var n=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(nu),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){t=new eu(t,e,n),e=new Ec(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(nu),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,o=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),a=[],s=[],l=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(a.push(t.effect),t.markTarget()):(o.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:l).push(t)}),(t=this.pendingEffects).push.apply(t,o),(t=this.pendingEffects).push.apply(t,a),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,l]},t}();function ru(t,e){return(ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iu(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function ou(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function au(t,e){var n,r,i=e.x1,o=e.y1,a=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,c=e.defY,c=void 0===c?0:c,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,y=0,g=0,m=0;u&&u instanceof N&&f&&(n=a-i,r=s-o,m=Math.atan2(r,n),d=Math.cos(m)*(f||0),p=Math.sin(m)*(f||0)),h&&h instanceof N&&e&&(n=i-a,r=o-s,m=Math.atan2(r,n),y=Math.cos(m)*(e||0),g=Math.sin(m)*(e||0)),t.moveTo(i-l+d,o-c+p),t.lineTo(a-l+y,s-c+g)}function su(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,e=e.path,u=e.absolutePath,h=e.segments,f=0,d=0,p=0,y=0,e=0;i&&i instanceof N&&l&&(r=(i=i.parentNode.getStartTangent())[0],i=i[1],n=r[0]-i[0],r=r[1]-i[1],e=Math.atan2(r,n),f=Math.cos(e)*(l||0),d=Math.sin(e)*(l||0)),s&&s instanceof N&&c&&(l=(i=s.parentNode.getEndTangent())[0],s=i[1],n=l[0]-s[0],r=l[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(c||0),y=Math.sin(e)*(c||0));for(var g=0;g<u.length;g++){var m=u[g],v=m[0],b=u[g+1],x=0===g&&(0!==f||0!==d),w=(g===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==y;switch(v){case"M":x?(t.moveTo(m[1]-o+f,m[2]-a+d),t.lineTo(m[1]-o,m[2]-a)):t.moveTo(m[1]-o,m[2]-a);break;case"L":w?t.lineTo(m[1]-o+p,m[2]-a+y):t.lineTo(m[1]-o,m[2]-a);break;case"Q":t.quadraticCurveTo(m[1]-o,m[2]-a,m[3]-o,m[4]-a),w&&t.lineTo(m[3]-o+p,m[4]-a+y);break;case"C":t.bezierCurveTo(m[1]-o,m[2]-a,m[3]-o,m[4]-a,m[5]-o,m[6]-a),w&&t.lineTo(m[5]-o+p,m[6]-a+y);break;case"A":var k,M,E=h[g].arcParams,O=E.cx,S=E.cy,_=E.rx,A=E.ry,P=E.startAngle,T=E.endAngle,L=E.xRotation,E=E.sweepFlag;t.ellipse?t.ellipse(O-o,S-a,_,A,L,P,T,!!(1-E)):(k=A<_?_:A,M=A<_?1:_/A,A=A<_?A/_:1,t.translate(O-o,S-a),t.rotate(L),t.scale(M,A),t.arc(0,0,k,P,T,!!(1-E)),t.scale(1/M,1/A),t.rotate(-L),t.translate(-(O-o),-(S-a))),w&&t.lineTo(m[6]-o+p,m[7]-a+y);break;case"Z":t.closePath()}}}function lu(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-o,f=u[0][1]-a,d=u[h-1][0]-o,p=u[h-1][1]-a,y=0,g=0,m=0,v=0,b=0;i&&i instanceof N&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),g=Math.sin(b)*(l||0)),s&&s instanceof N&&c&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),m=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+(y||m),f+(g||v));for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(d,p)}function cu(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-o,f=u[0][1]-a,d=u[h-1][0]-o,p=u[h-1][1]-a,y=0,g=0,m=0,v=0,b=0;i&&i instanceof N&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),g=Math.sin(b)*(l||0)),s&&s instanceof N&&c&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),m=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+y,f+g);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(d+m,p+v)}function uu(t,e){var n,r,i,o,a=e.radius,s=e.width,e=e.height,l=s,c=e;a&&a.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(a=a.map(function(t){return on(t,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}))[0],i=a[1],o=a[2],a=a[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,c-e*o),0!==o&&t.arc(l-s*o,c-e*o,o,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*a,c),0!==a&&t.arc(s*a,c-e*a,a,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,l,c)}b.EasingFunction=zc,b.AnimationTimeline=n;var hu=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),ru(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[M.CIRCLE]=iu,t[M.ELLIPSE]=ou,t[M.RECT]=uu,t[M.LINE]=au,t[M.POLYLINE]=cu,t[M.POLYGON]=lu,t[M.PATH]=su,t[M.TEXT]=void 0,t[M.GROUP]=void 0,t[M.IMAGE]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(Pl);function fu(){fu=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function du(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function pu(t,e){return(pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function gu(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?yu(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yu(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var mu=m(),vu=m(),bu=m(),xu=ut(),wu=function(){function s(){var a=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r){var i=a.pointInPathPickerFactory[t.nodeName];if(i){var n=gt(xu,n),e=Xt(vu,zt(bu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,o=t.parsedStyle.anchor;if(e[0]+=(o&&o[0]||0)*n[0]*2,e[1]+=(o&&o[1]||0)*n[1]*2,i(t,new Tr(e[0],e[1]),r,a.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=b.offscreenCanvas.getOrCreateContext(a.canvasConfig.offscreenCanvas),r=a.pathGeneratorFactory[t.nodeName];return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}var t=s.prototype;return t.apply=function(t){var n=this,e=t.config,r=t.renderingService,i=t.renderingContext,o=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,a=(this.canvasConfig=e,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=t,null==(e=i.root)?void 0:e.ownerDocument);r.hooks.pick.tapPromise(s.tag,function(){s=fu().mark(function t(e){return fu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(a,e));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){du(r,e,n,i,o,"next",t)}function o(t){du(r,e,n,i,o,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),r.hooks.pickSync.tap(s.tag,function(t){return n.pick(a,t)})},t.pick=function(t,e){for(var n=e.topmost,r=e.position,i=r.x,r=r.y,o=zt(mu,i,r,0),a=[],s=gu(t.elementsFromBBox(o[0],o[1],o[0],o[1]));!(l=s()).done;){var l=l.value,c=l.getWorldTransform();if(this.isHit(l,o,c,!1)){c=Hr(l);if(c){c=c.parsedStyle.clipPath;if(this.isHit(c,o,c.getWorldTransform(),!0)){if(n)return e.picked=[l],e;a.push(l)}}else{if(n)return e.picked=[l],e;a.push(l)}}}return e.picked=a,e},s}();function ku(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Mu(t,e){return Math.abs(t-e)<.001}function Eu(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Ou(t){return(t+2*Math.PI)%(2*Math.PI)}wu.tag="CanvasPicker";var Su={box:function(t,e,n,r){return Eu([t,n],[e,r])},length:ku,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?ku(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?ku(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){n=[n-t,r-e];return be(n,[0,0])?Math.sqrt((i-t)*(i-t)+(o-e)*(o-e)):(me(r=[-n[1],n[0]],r),Math.abs(ve([i-t,o-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function _u(t,e,n,r,i,o){for(var a=-1,s=1/0,l=[n,r],c=20,u=1/(c=o&&200<o?o/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=ku(l[0],l[1],p[0],p[1]);p<s&&(a=d,s=p)}if(0===a)return{x:t[0],y:e[0]};if(1===a)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(h<1e-4);y++){var g=a-h,m=a+h,v=[i.apply(void 0,t.concat([g])),i.apply(void 0,e.concat([g]))],v=ku(l[0],l[1],v[0],v[1]);0<=g&&v<s?(a=g,s=v):(g=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=ku(l[0],l[1],g[0],g[1]),m<=1&&v<s?(a=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([a])),y:i.apply(void 0,e.concat([a]))}}function Au(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Pu(t,e,n){n=t+n-2*e;return Mu(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Tu(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function Lu(t,e,n,r,i,o,a){var s=Au(t,n,i,a),l=Au(e,r,o,a),c=Su.pointAt(t,e,n,r,a),n=Su.pointAt(n,r,i,o,a);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,o]]}function Nu(t,e,n,r,i,o,a){return 0===a?(ku(t,e,n,r)+ku(n,r,i,o)+ku(t,e,i,o))/2:(e=(t=Lu(t,e,n,r,i,o,.5))[0],n=t[1],e.push(a-1),n.push(a-1),Nu.apply(void 0,e)+Nu.apply(void 0,n))}var Cu={box:function(t,e,n,r,i,o){var a=Pu(t,n,i)[0],s=Pu(e,r,o)[0],l=[t,i],c=[e,o];return void 0!==a&&l.push(Au(t,n,i,a)),void 0!==s&&c.push(Au(e,r,o,s)),Eu(l,c)},length:function(t,e,n,r,i,o){return Nu(t,e,n,r,i,o,3)},nearestPoint:function(t,e,n,r,i,o,a,s){return _u([t,n,i],[e,r,o],a,s,Au)},pointDistance:function(t,e,n,r,i,o,a,s){t=this.nearestPoint(t,e,n,r,i,o,a,s);return ku(t.x,t.y,a,s)},interpolationAt:Au,pointAt:function(t,e,n,r,i,o,a){return{x:Au(t,n,i,a),y:Au(e,r,o,a)}},divide:Lu,tangentAngle:function(t,e,n,r,i,o,a){t=Tu(t,n,i,a),n=Tu(e,r,o,a);return Ou(Math.atan2(n,t))}};function ju(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function Fu(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function Ru(t,e,n,r){var i,o,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Mu(r,0)?Mu(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Mu(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(o=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=o)&&o<=1&&t.push(o),t}function Iu(t,e,n,r,i,o,a,s,l){var c=ju(t,n,i,a,l),u=ju(e,r,o,s,l),h=Su.pointAt(t,e,n,r,l),n=Su.pointAt(n,r,i,o,l),r=Su.pointAt(i,o,a,s,l),i=Su.pointAt(h.x,h.y,n.x,n.y,l),o=Su.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,o.x,o.y,r.x,r.y,a,s]]}function Du(t,e,n,r,i,o,a,s,l){if(0===l){for(var c=[t,n,i,a],u=[e,r,o,s],h=0,f=c.length,d=0;d<f;d++)h+=ku(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=Iu(t,e,n,r,i,o,a,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return Du.apply(void 0,e)+Du.apply(void 0,n)}var Bu={extrema:Ru,box:function(t,e,n,r,i,o,a,s){for(var l=[t,a],c=[e,s],u=Ru(t,n,i,a),h=Ru(e,r,o,s),f=0;f<u.length;f++)l.push(ju(t,n,i,a,u[f]));for(var d=0;d<h.length;d++)c.push(ju(e,r,o,s,h[d]));return Eu(l,c)},length:function(t,e,n,r,i,o,a,s){return Du(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,l,c,u){return _u([t,n,i,a],[e,r,o,s],l,c,ju,u)},pointDistance:function(t,e,n,r,i,o,a,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,o,a,s,l,c,u);return ku(t.x,t.y,l,c)},interpolationAt:ju,pointAt:function(t,e,n,r,i,o,a,s,l){return{x:ju(t,n,i,a,l),y:ju(e,r,o,s,l)}},divide:Iu,tangentAngle:function(t,e,n,r,i,o,a,s,l){t=Fu(t,n,i,a,l),n=Fu(e,r,o,s,l);return Ou(Math.atan2(n,t))}};function zu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Wu(t,e,n,r,i,o){return t<=i&&i<=t+n&&e<=o&&o<=e+r}function Hu(t,e,n,r,i,o,a,s){var l=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return zu(t.x,t.y,a,s)<=o/2}function Gu(t,e,n,r,i,o,a){var s=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=o&&o<=l+h&&c-h<=a&&a<=u+h&&Su.pointToLine(t,e,n,r,o,a)<=i/2}function Yu(t,e,n,r,i){var o=t.length;if(!(o<2)){for(var a=0;a<o-1;a++)if(Gu(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[o-1];if(Gu(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var Vu=1e-6;function qu(t){return Math.abs(t)<Vu?0:t<0?-1:1}function Uu(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o,a,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(a=u,((s=[e,n])[0]-(o=c)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return!0;0<qu(c[1]-n)!=0<qu(u[1]-n)&&qu(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}function Xu(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=Uu(t[i],e,n));i++);return r}function $u(t,e,n){var t=t.parsedStyle,r=t.r,i=t.fill,o=t.stroke,a=t.lineWidth,s=t.increasedLineWidthForHitTesting,t=t.pointerEvents,a=((a||0)+(s||0))/2,s=zu(r,r,e.x,e.y),e=Ws(t,i,o),t=e[0],i=e[1];return t&&i||n?s<=r+a:t?s<=r:!!i&&r-a<=s&&s<=r+a}function Zu(t,e,n,r){return t/(n*n)+e/(r*r)}function Ku(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,o=t.fill,a=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,t=t.pointerEvents,c=e.x,e=e.y,t=Ws(t,o,a),o=t[0],a=t[1],t=((s||0)+(l||0))/2,s=(c-r)*(c-r),l=(e-i)*(e-i);return o&&a||n?Zu(s,l,r+t,i+t)<=1:o?Zu(s,l,r,i)<=1:!!a&&1<=Zu(s,l,r-t,i-t)&&Zu(s,l,r+t,i+t)<=1}function Ju(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,c=t.defX,u=t.defY;return!(!Ws(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!s)&&Gu(r,i,o,a,(s||0)+(l||0),e.x+(void 0===c?0:c),e.y+(void 0===u?0:u))}function Qu(t,e,n,r){var i=t.parsedStyle,o=i.lineWidth,a=i.increasedLineWidthForHitTesting,s=i.stroke,l=i.fill,c=i.defX,c=void 0===c?0:c,u=i.defY,u=void 0===u?0:u,h=i.path,i=Ws(i.pointerEvents,l,s),l=i[0],s=i[1],i=h.segments,f=h.hasArc,d=h.polylines,h=h.polygons,p=Ps(t),y=!1;return l||n?f?r(t,e):Xu(h,e.x+c,e.y+u)||Xu(d,e.x+c,e.y+u):s||n?function(t,e,n,r,i){for(var o=!1,a=e/2,s=0;s<t.length;s++){var l=t[s],c=l.currentPoint,u=l.params,h=l.prePoint,f=l.box;if(!f||Wu(f.x-a,f.y-a,f.width+e,f.height+e,n,r))switch(l.command){case"L":case"Z":if(o=Gu(h[0],h[1],c[0],c[1],e,n,r))return!0;break;case"Q":if(o=Cu.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(o=Bu.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2)return!0;break;case"A":l.cubicParams||(l.cubicParams=De(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=l.cubicParams,p=h,y=0;y<d.length;y+=6){var g=Bu.pointDistance(p[0],p[1],d[y],d[y+1],d[y+2],d[y+3],d[y+4],d[y+5],n,r,i),p=[d[y+4],d[y+5]];if(o=g<=e/2)return!0}}}return o}(i,(o||0)+(a||0),e.x+c,e.y+u,p):y}function th(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,o=t.lineWidth,a=t.increasedLineWidthForHitTesting,s=t.points,l=t.defX,l=void 0===l?0:l,c=t.defY,c=void 0===c?0:c,t=Ws(t.pointerEvents,i,r),i=t[0],r=!1;return r=(r=t[1]||n?Yu(s.points,(o||0)+(a||0),e.x+l,e.y+c,!0):r)||!i&&!n?r:Uu(s.points,e.x+l,e.y+c)}function eh(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,o=t.points,a=t.defX,s=t.defY;return!(!Ws(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!r)&&Yu(o.points,(r||0)+(i||0),e.x+(void 0===a?0:a),e.y+(void 0===s?0:s),!1)}function nh(t,e,n,r){var i,o,a,s,l,c,u,h,f,d=t.parsedStyle,p=d.radius,y=d.fill,g=d.stroke,m=d.lineWidth,v=d.increasedLineWidthForHitTesting,b=d.width,x=d.height,d=Ws(d.pointerEvents,y,g),y=d[0],g=d[1],d=(m||0)+(v||0);return p&&p.some(function(t){return 0!==t})?(m=!1,(g||n)&&(u=v=0,s=b,c=x,p=p.map(function(t){return on(t,0,Math.min(Math.abs(b)/2,Math.abs(x)/2))}),f=d,i=e.x,o=e.y,h=p[0],a=p[1],l=p[2],p=p[3],m=Gu(v+h,u,v+s-a,u,f,i,o)||Gu(v+s,u+a,v+s,u+c-l,f,i,o)||Gu(v+s-l,u+c,v+p,u+c,f,i,o)||Gu(v,u+c-p,v,u+h,f,i,o)||Hu(v+s-a,u+a,a,Math.PI,Math.PI,f,i,o)||Hu(v+s-l,u+c-l,l,0,Math.PI,f,i,o)||Hu(v+p,u+c-p,p,Math.PI,Math.PI,f,i,o)||Hu(v+h,u+h,h,Math.PI,Math.PI,f,i,o)),m||!y&&!n?m:r(t,e)):(a=d/2,y&&g||n?Wu(0-a,0-a,b+a,x+a,e.x,e.y):y?Wu(0,0,b,x,e.x,e.y):!!g&&(l=s=0,c=b,p=x,v=d,u=e.x,h=e.y,Wu(s-(f=v/2),l-f,c,v,u,h)||Wu(s+c-f,l-f,v,p,u,h)||Wu(s+f,l+p-f,c,v,u,h)||Wu(s-f,l+f,v,p,u,h)))}var rh=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),pu(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[M.CIRCLE]=$u,e[M.ELLIPSE]=Ku,e[M.RECT]=nh,e[M.LINE]=Ju,e[M.POLYLINE]=eh,e[M.POLYGON]=th,e[M.PATH]=Qu,e[M.TEXT]=t,e[M.GROUP]=null,e[M.IMAGE]=t,e[M.HTML]=null,e[M.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new wu)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Pl);function ih(){ih=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function oh(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function ah(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){oh(r,e,n,i,o,"next",t)}function o(t){oh(r,e,n,i,o,"throw",t)}i(void 0)})}}function sh(){return(sh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function lh(t,e){return(lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ch=function(){function r(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=ut(),this.dprMatrix=ut(),this.tmpMat4=ut(),this.vec3a=m(),this.vec3b=m(),this.vec3c=m(),this.vec3d=m(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t){function o(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function a(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function c(t){t.isVisible()&&!t.isCulled()&&(u.renderDisplayObject(t,y,d),u.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){c(t)})}var u=this,h=(this.context=t).config,f=t.camera,d=t.renderingService,p=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,y=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),g=p.root.ownerDocument.defaultView;d.hooks.init.tapPromise(r.tag,ah(ih().mark(function t(){var e,n,r,i;return ih().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:g.addEventListener(v.UNMOUNTED,o),g.addEventListener(v.CULLED,a),e=y.getDPR(),n=h.width,r=h.height,i=y.getContext(),u.clearRect(i,0,0,n*e,r*e,h.background);case 6:case"end":return t.stop()}},t)}))),d.hooks.destroy.tap(r.tag,function(){g.removeEventListener(v.UNMOUNTED,o),g.removeEventListener(v.CULLED,a)}),d.hooks.beginFrame.tap(r.tag,function(){var t=y.getContext(),e=y.getDPR(),n=h.width,r=h.height,i=u.canvasRendererPluginOptions,o=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,a=d.getStats(),s=a.total,a=a.rendered,s=a/s;u.clearFullScreen=d.disableDirtyRectangleRendering()||o<a&&i<s,t&&(t.resetTransform(),u.clearFullScreen)&&u.clearRect(t,0,0,n*e,r*e,h.background)});d.hooks.endFrame.tap(r.tag,function(){var t=y.getContext(),e=y.getDPR();if(Et(u.dprMatrix,k(e,e,1)),vt(u.vpMatrix,u.dprMatrix,f.getOrthoMatrix()),u.clearFullScreen)c(p.root);else{e=u.safeMergeAABB.apply(u,[u.mergeDirtyAABBs(u.renderQueue)].concat(u.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new _r;return i.setMinMax(k(e,n,0),k(r,t,0)),i})));if(u.removedRBushNodeAABBs=[],_r.isEmpty(e))return void(u.renderQueue=[]);var n=u.convertAABB2Rect(e),r=n.x,i=n.y,o=n.width,n=n.height,a=Xt(u.vec3a,k(r,i,0),u.vpMatrix),s=Xt(u.vec3b,k(r+o,i,0),u.vpMatrix),l=Xt(u.vec3c,k(r,i+n,0),u.vpMatrix),r=Xt(u.vec3d,k(r+o,i+n,0),u.vpMatrix),o=Math.min(a[0],s[0],r[0],l[0]),i=Math.min(a[1],s[1],r[1],l[1]),n=Math.max(a[0],s[0],r[0],l[0]),a=Math.max(a[1],s[1],r[1],l[1]),s=Math.floor(o),r=Math.floor(i),l=Math.ceil(n-o),n=Math.ceil(a-i);t.save(),u.clearRect(t,s,r,l,n,h.background),t.beginPath(),t.rect(s,r,l,n),t.clip(),t.setTransform(u.vpMatrix[0],u.vpMatrix[1],u.vpMatrix[4],u.vpMatrix[5],u.vpMatrix[12],u.vpMatrix[13]),h.renderer.getConfig().enableDirtyRectangleRenderingDebug&&g.dispatchEvent(new ia(Ml.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),u.searchDirtyObjects(e).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&u.renderDisplayObject(t,y,d)}),t.restore(),u.renderQueue.forEach(function(t){u.saveDirtyAABB(t)}),u.renderQueue=[]}u.restoreStack.forEach(function(){t.restore()}),u.restoreStack=[]}),d.hooks.render.tap(r.tag,function(t){u.clearFullScreen||u.renderQueue.push(t)})},t.clearRect=function(t,e,n,r,i,o){t.clearRect(e,n,r,i),o&&(t.fillStyle=o,t.fillRect(e,n,r,i))},t.renderDisplayObject=function(t,e,n){var r,e=e.getContext(),i=t.nodeName,o=this.restoreStack[this.restoreStack.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),this.restoreStack.pop()),this.context.styleRendererFactory[i]),i=this.pathGeneratorFactory[i],a=t.parsedStyle.clipPath;a&&(this.applyWorldTransform(e,a),r=this.pathGeneratorFactory[a.nodeName])&&(e.save(),this.restoreStack.push(t),e.beginPath(),r(e,a.parsedStyle),e.closePath(),e.clip()),o&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),i&&(e.beginPath(),i(e,t.parsedStyle),t.nodeName!==M.LINE)&&t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&e.closePath(),o&&(o.render(e,t.parsedStyle,t,n),e.restore()),t.renderable.dirty=!1},t.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},t.mergeDirtyAABBs=function(t){var n=new _r;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},t.searchDirtyObjects=function(t){var e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return this.rBush.search({minX:n,minY:e,maxX:r,maxY:t}).map(function(t){t=t.id;return b.displayObjectPool.getByEntity(t)})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new _r),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},t.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,o=n.opacity,a=n.lineDash,n=n.lineDashOffset;a&&t.setLineDash(a),_(n)||(t.lineDashOffset=n),_(o)||(t.globalAlpha*=o),_(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),_(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},t.applyWorldTransform=function(t,e,n){var r=0,i=0,o=(e.parsedStyle||{}).anchor,a=o&&o[0]||0,o=o&&o[1]||0;0===a&&0===o||(r=-a*((a=e.getGeometryBounds())&&2*a.halfExtents[0]||0),i=-o*(a&&2*a.halfExtents[1]||0)),n?(ft(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a),vt(this.tmpMat4,n,this.tmpMat4)):(ft(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a)),vt(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.safeMergeAABB=function(){for(var e=new _r,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},r}(),uh=(ch.tag="CanvasRenderer",function(){function t(t){this.imagePool=void 0,this.imagePool=t}var e=t.prototype;return e.render=function(t,e,n,r){var i=e.fill,o=e.fillRule,a=e.opacity,s=e.fillOpacity,l=e.stroke,c=e.strokeOpacity,u=e.lineWidth,h=e.lineCap,f=e.lineJoin,d=e.shadowType,p=e.shadowColor,y=e.shadowBlur,g=e.filter,e=e.miterLimit,m=!_(i)&&!i.isNone,v=!_(l)&&!l.isNone&&0<u,b=0===i.alpha,g=!(!g||!g.length),p=!_(p)&&0<y,y=n.nodeName,d="inner"===d,y=v&&p&&(y===M.PATH||y===M.LINE||y===M.POLYLINE||b||d);m&&(t.globalAlpha=a*s,y||hh(n,t,p),this.fill(t,n,i,o,r),y||this.clearShadowAndFilter(t,g,p)),v&&(t.globalAlpha=a*c,t.lineWidth=u,_(e)||(t.miterLimit=e),_(h)||(t.lineCap=h),_(f)||(t.lineJoin=f),y&&(d&&(t.globalCompositeOperation="source-atop"),hh(n,t,!0),d)&&(this.stroke(t,n,l,r),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,g,!0)),this.stroke(t,n,l,r))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&(n=t.filter,!_(n))&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r,i){var o=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=o.getColor(t,n,e),e.fill(r)}):(Ki(t)&&(e.fillStyle=this.getPattern(t,n,e,i)),e.fill(r))},e.stroke=function(e,n,t,r){var i=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=i.getColor(t,n,e),e.stroke()}):(Ki(t)&&(e.strokeStyle=this.getPattern(t,n,e,r)),e.stroke())},e.getPattern=function(t,e,n,r){return this.imagePool.getOrCreatePatternSync(t,n,function(){e.renderable.dirty=!0,r.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==ui.LinearGradient&&t.type!==ui.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(sh({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function hh(t,e,n){var r=t.parsedStyle,i=r.filter,o=r.shadowColor,a=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=o.toString(),e.shadowBlur=a||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}var fh=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,o=e.img,a=e.shadowColor,e=e.shadowBlur,o=rn(o)?this.imagePool.getImageSync(o):(r=r||o.width,i=i||o.height,o);if(o){hh(n,t,!_(a)&&0<e);try{t.drawImage(o,0,0,r,i)}catch(t){}}},t}(),dh=function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,o=e.textBaseline,a=e.lineJoin,s=e.miterLimit,l=e.letterSpacing,c=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,y=e.dx,g=e.dy,m=e.shadowColor,e=e.shadowBlur,v=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,M=(t.font=v,t.lineWidth=r,t.textAlign="middle"===i?"center":i,t.textBaseline=o,t.lineJoin=a,_(s)||(t.miterLimit=s),0),E=("middle"===o?M=-x/2-w/2:"bottom"===o||"alphabetic"===o||"ideographic"===o?M=-x:"top"!==o&&"hanging"!==o||(M=-w),y||0);M+=g||0,hh(n,t,!_(m)&&0<e);for(var O=0;O<b.length;O++){var S=r/2+E;M+=w,_(c)||c.isNone||!r||this.drawLetterSpacing(t,b[O],k[O],i,S,M,l,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[O],k[O],i,S,M,l,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,o,a,s,l,c,u){if(void 0===u&&(u=!1),0===a)u?this.strokeText(t,e,i,o,l):this.fillText(t,e,i,o,s,c);else{for(var h=t.textAlign,f=(t.textAlign="left",i),d=("center"===r||"middle"===r?f=i-n.width/2:"right"!==r&&"end"!==r||(f=i-n.width),Array.from(e)),p=t.measureText(e).width,y=0;y<d.length;++y){var g=d[y];u?this.strokeText(t,g,f,o,l):this.fillText(t,g,f,o,s,c),f+=p-(g=t.measureText(e.substring(y+1)).width)+a,p=g}t.textAlign=h}},e.fillText=function(t,e,n,r,i,o){var a,s=!_(i)&&1!==i;s&&(a=t.globalAlpha,t.globalAlpha=i*o),t.fillText(e,n,r),s&&(t.globalAlpha=a)},e.strokeText=function(t,e,n,r,i){var o,a=!_(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),a&&(t.globalAlpha=o)},t}(),ph=function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),lh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=sh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new uh(n),n=((t={})[M.CIRCLE]=r,t[M.ELLIPSE]=r,t[M.RECT]=r,t[M.IMAGE]=new fh(n),t[M.TEXT]=new dh,t[M.LINE]=r,t[M.POLYLINE]=r,t[M.POLYGON]=r,t[M.PATH]=r,t[M.GROUP]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new ch(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Pl);function yh(){yh=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function gh(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function mh(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){gh(r,e,n,i,o,"next",t)}function o(t){gh(r,e,n,i,o,"throw",t)}i(void 0)})}}function vh(t,e){return(vh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var bh=function(){function r(){this.context=void 0}return r.prototype.apply=function(t){function i(t){e.hooks.pointerWheel.call(t)}var o=this,e=t.renderingService,n=t.renderingContext,a=(this.context=t,n.root.ownerDocument.defaultView),s=function(t){e.hooks.pointerMove.call(t)},l=function(t){e.hooks.pointerUp.call(t)},c=function(t){e.hooks.pointerDown.call(t)},u=function(t){e.hooks.pointerOver.call(t)},h=function(t){e.hooks.pointerOut.call(t)},f=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,mh(yh().mark(function t(){var r;return yh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=o.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):a.supportsPointerEvents&&(r.style.touchAction="none"),a.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",c,!0),n.addEventListener("pointerleave",h,!0),n.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",l,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",c,!0),n.addEventListener("mouseout",h,!0),n.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=r).addEventListener("touchstart",c,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",f,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=o.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):a.supportsPointerEvents&&(n.style.touchAction=""),a.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",c,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",l,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",c,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=n).removeEventListener("touchstart",c,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",f,!0)),n.removeEventListener("wheel",i,!0)})},r}(),xh=(bh.tag="DOMInteraction",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),vh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new bh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Pl));function wh(){wh=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function kh(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Mh(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){kh(r,e,n,i,o,"next",t)}function o(t){kh(r,e,n,i,o,"throw",t)}i(void 0)})}}function Eh(t,e){return(Eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Oh=function(){function d(){this.context=void 0,this.$camera=void 0}var t=d.prototype;return t.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},t.apply=function(t){function i(t,e){e.style.transform=s.joinTransformMatrix(t.getWorldTransform())}function e(t){var e,n,r=t.target;r.nodeName===M.HTML&&(s.$camera||(s.$camera=s.createCamera(l)),e=s.getOrCreateEl(r),s.$camera.appendChild(e),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){s.updateAttribute(t,r)}),i(r,e))}function n(t){(t=t.target).nodeName===M.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&t.remove()}function r(t){var e=t.target;e.nodeName===M.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function o(t){var e;(t=t.target).nodeName===M.HTML&&(e=s.getOrCreateEl(t),i(t,e))}function a(){var t,e;s.$camera&&(t=(e=s.context.config).width,e=e.height,s.$camera.style.width=(t||0)+"px",s.$camera.style.height=(e||0)+"px")}var s=this,l=t.camera,c=t.renderingContext,u=t.renderingService,h=t.displayObjectPool,f=(this.context=t,c.root.ownerDocument.defaultView);u.hooks.init.tapPromise(d.tag,Mh(wh().mark(function t(){return wh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.getHTMLs().length&&(s.$camera=s.createCamera(l)),f.addEventListener(Ml.RESIZE,a),f.addEventListener(v.MOUNTED,e),f.addEventListener(v.UNMOUNTED,n),f.addEventListener(v.ATTR_MODIFIED,r),f.addEventListener(v.BOUNDS_CHANGED,o);case 6:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(d.tag,function(){s.$camera&&c.renderReasons.has(kl.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(l.getOrthoMatrix()))}),u.hooks.destroy.tap(d.tag,function(){s.$camera&&s.$camera.remove(),f.removeEventListener(Ml.RESIZE,a),f.removeEventListener(v.MOUNTED,e),f.removeEventListener(v.UNMOUNTED,n),f.removeEventListener(v.ATTR_MODIFIED,r),f.removeEventListener(v.BOUNDS_CHANGED,o)})},t.getId=function(t){return t.id||"g-html-"+t.entity},t.createCamera=function(t){var e,n,r=this.context.config,i=r.document,o=r.width,r=r.height,a=this.context.contextService.getDomElement(),s=a.parentNode;return s?((n=s.querySelector("#"+(e="g-canvas-camera")))||((n=i=(i||document).createElement("div")).id=e,i.style.position="absolute",i.style.left=(a.offsetLeft||0)+"px",i.style.top=(a.offsetTop||0)+"px",i.style.transformOrigin="left top",i.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.width=(o||0)+"px",i.style.height=(r||0)+"px",s.appendChild(i)),n):null},t.getOrCreateEl=function(t){var e=this.context.config.document,n=this.getId(t),r=this.$camera.querySelector("#"+n);return r||(r=(e||document).createElement("div"),(t.parsedStyle.$el=r).id=n,t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r},t.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;rn(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r;break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof Fi?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):Ki(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof Fi?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):Ki(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}},d}(),Sh=(Oh.tag="HTMLRendering",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),Eh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Oh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Pl));function _h(){_h=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function Ah(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ph(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Ah(r,e,n,i,o,"next",t)}function o(t){Ah(r,e,n,i,o,"throw",t)}i(void 0)})}}function Th(t,e){return(Th=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Lh=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i,o=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):zr&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,o.imageCache[r]=n)}))},e.getOrCreatePatternSync=function(t,e,n){var r,i,o=this.generatePatternKey(t);return o&&this.patternCache[o]?this.patternCache[o]:(i=t.image,r=t.repetition,t=t.transform,i=(n=rn(i)?this.getImageSync(i,n):i)&&e.createPattern(n,r),t&&(e=os(Oo(t)),i.setTransform({a:e[0],b:e[1],c:e[4],d:e[5],e:e[12],f:e[13]})),o&&i&&(this.patternCache[o]=i),i)},e.getOrCreateGradient=function(t,e){var r,n,i,o,a,s=this.generateGradientKey(t),l=t.type,c=t.steps,u=t.width,h=t.height,f=t.angle,d=t.cx,p=t.cy,t=t.size;return this.gradientCache[s]||(r=null,l===ui.LinearGradient?(n=u,i=h,f=Za((f=f).value),o=0+n/2,a=0+i/2,n=Math.abs(n*Math.cos(f))+Math.abs(i*Math.sin(f)),i={x1:o-Math.cos(f)*n/2,y1:a-Math.sin(f)*n/2,x2:o+Math.cos(f)*n/2,y2:a+Math.sin(f)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):l===ui.RadialGradient&&(o=u,a=h,f=p,n=t,l=(i=d).value,u=f.value,i.unit===y.kPercentage&&(l=i.value/100*o),f.unit===y.kPercentage&&(u=f.value/100*a),i=Math.max(ze([0,0],[l,u]),ze([0,a],[l,u]),ze([o,a],[l,u]),ze([o,0],[l,u])),n&&(n instanceof Ei?i=n.value:n instanceof yi&&("closest-side"===n.value?i=Math.min(l,o-l,u,a-u):"farthest-side"===n.value?i=Math.max(l,o-l,u,a-u):"closest-corner"===n.value&&(i=Math.min(ze([0,0],[l,u]),ze([0,a],[l,u]),ze([o,a],[l,u]),ze([o,0],[l,u]))))),r=e.createRadialGradient(p=(h={x:l,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(c.forEach(function(t){var e,n=t.offset,t=t.color;n.unit===y.kPercentage&&null!=(e=r)&&e.addColorStop(n.value/100,t.toString())}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,o=t.angle,a=t.cx,s=t.cy,t=t.size;return"gradient-"+e+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==s?void 0:s.toString())||0)+"-"+((null==t?void 0:t.toString())||0)+"-"+n+"-"+r+"-"+i.map(function(t){return""+t.offset+t.color}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;if(rn(e))return"pattern-"+e+"-"+t},t}(),Nh=function(){function s(){}return s.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===M.IMAGE&&(t=n.img,rn(t))&&o.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===M.IMAGE&&"img"===n&&rn(t)&&o.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var r=t.renderingService,i=t.renderingContext,o=t.imagePool,a=i.root.ownerDocument.defaultView;r.hooks.init.tapPromise(s.tag,Ph(_h().mark(function t(){return _h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a.addEventListener(v.MOUNTED,e),a.addEventListener(v.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){a.removeEventListener(v.MOUNTED,e),a.removeEventListener(v.ATTR_MODIFIED,n)})},s}(),Ch=(Nh.tag="LoadImage",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),Th(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new Lh(this.context.config),this.addRenderingPlugin(new Nh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Pl));function jh(){jh=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function Fh(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Rh(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Fh(r,e,n,i,o,"next",t)}function o(t){Fh(r,e,n,i,o,"throw",t)}i(void 0)})}}function Ih(t,e){t.prototype=Object.create(e.prototype),Dh(t.prototype.constructor=t,e)}function Dh(t,e){return(Dh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Bh=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var e=t.prototype;return e.init=function(){var t=Rh(jh().mark(function t(){var e,n;return jh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=this.canvasConfig,e=n.container,(n=n.canvas)?(this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):e&&(this.$container=rn(e)?document.getElementById(e):e,this.$container)&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n=1<=(n=this.canvasConfig.devicePixelRatio||zr&&window.devicePixelRatio||1)?Math.ceil(n):1;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,zr)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(kl.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=Rh(jh().mark(function t(e){var n,r;return jh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),zh=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-context-register",t}Ih(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=Bh},e.destroy=function(){delete this.context.ContextService},t}(Pl),Wh=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new zh),t.registerPlugin(new Ch),t.registerPlugin(new hu),t.registerPlugin(new ph),t.registerPlugin(new xh),t.registerPlugin(new rh),t.registerPlugin(new Sh),t}return Ih(t,e),t}(Al);function Hh(){Hh=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,o=n,a=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,a);if(n){if(n===h)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},y=(o(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},m(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},a}function Gh(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Yh(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Gh(r,e,n,i,o,"next",t)}function o(t){Gh(r,e,n,i,o,"throw",t)}i(void 0)})}}function Vh(){return(Vh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function qh(t,e){return(qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Uh=function(){function o(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return o.prototype.apply=function(t){function e(t){var e,o,a,s,l,c,u=t.target,h=u===d,f=h&&i?d:u.closest&&u.closest("[draggable=true]");f&&(e=function(){var e=Yh(Hh().mark(function t(e){var n,r,i;return Hh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o)t.next=8;else{if(n=e.timeStamp-a,r=ze([e.clientX,e.clientY],s),n<=m||r<=g)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",f.dispatchEvent(e),o=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],f.dispatchEvent(e),c=[e.clientX,e.clientY],h){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),o=!1,a=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){o&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",f.dispatchEvent(t),o=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,y=t.isDocumentDroppable,g=t.dragstartDistanceThreshold,m=t.dragstartTimeThreshold;n.hooks.init.tapPromise(o.tag,Yh(Hh().mark(function t(){return Hh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(o.tag,function(){r.removeEventListener("pointerdown",e)})},o}(),Xh=(Uh.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),qh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Uh(Vh({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(Pl)),$h=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Zh={}.toString,Kh=function(t,e){return Zh.call(t)==="[object "+e+"]"},Jh=function(t){return Kh(t,"Function")},Qh=function(t){return null==t},tf=function(t){return Array.isArray?Array.isArray(t):Kh(t,"Array")},ef=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function nf(t,e){if(t)if(tf(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(ef(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function rf(t){if(tf(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])}function of(t){if(tf(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])}var af=function(t){return"object"==typeof t&&null!==t},sf=function(t){if(!af(t)||!Kh(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},lf=function(t){return Kh(t,"String")};function cf(t,e,n){return t<e?e:n<t?n:t}var uf=function(t){return Kh(t,"Number")},hf=1e-5;function ff(t,e,n){return void 0===n&&(n=hf),Math.abs(t-e)<n}function df(t){return(t=mf(t)).charAt(0).toLowerCase()+t.substring(1)}var pf=function(t,e){if(tf(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=Jh(e)?e(o):o[e];r<a&&(n=o,r=a)}return n}},yf=function(t,e){if(tf(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=Jh(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},gf=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return nf(n,function(t,e){Jh(n)&&"prototype"===e||r.push(t)}),r},mf=function(t){return Qh(t)?"":t.toString()};function vf(t){return null===t}function bf(t){return void 0===t}function xf(t){return t instanceof Element||t instanceof HTMLDocument}var wf=function(t){t=mf(t);return t.charAt(0).toUpperCase()+t.substring(1)},kf={}.toString,Mf=function(t){return kf.call(t).replace(/^\[object /,"").replace(/]$/,"")},Ef=Object.prototype,Of=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ef)};function Sf(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function _f(t,e,n,r){return e&&Sf(t,e),n&&Sf(t,n),r&&Sf(t,r),t}var Af=function(t){if("object"!=typeof t||null===t)return t;if(tf(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=Af(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=Af(t[i]):e[i]=t[i];return e};function Pf(o,a){var s;if(Jh(o))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=a?a.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=o.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var Tf=5;var F=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||Tf,n){var a;n.hasOwnProperty(o)&&(null!==(a=n[o])&&sf(a)?(sf(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tf(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a))}}(t,e[r]);return t},Lf=function(t,e){if(!$h(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},Nf=Object.prototype.hasOwnProperty;function Cf(t,e,n){for(var r=0,i=lf(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function jf(e,t){var n;return null!==e&&sf(e)?(n={},nf(t,function(t){zf.call(e,t)&&(n[t]=e[t])}),n):{}}function Ff(t,r){return n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={},tf(t=t)||sf(t)?(i=e,nf(t,function(t,e){i=n(i,t,e)}),i):t;var n,e,i}function Rf(){}function If(t){return t}var Df,Bf=function(t,e){if(t===e)return!0;if(t&&e&&!lf(t)&&!lf(e)){if($h(t)||$h(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Bf(t[r],e[r]));r++);return n}if(af(t)||af(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=Bf(t[i[r]],e[i[r]]));r++);return n}}return!1},zf=Object.prototype.hasOwnProperty,Wf=function(n,r,i){function o(){u=!1===i.leading?0:Date.now(),a=null,c=n.apply(s,l),a||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(a&&(clearTimeout(a),a=null),u=t,c=n.apply(s,l),a||(s=l=null)):a||!1===i.trailing||(a=setTimeout(o,e)),c}var a,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(a),u=0,a=s=l=null},t};function Hf(t){return Qh(t)?0:($h(t)?t:Object.keys(t)).length}var Gf=Pf(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(Df=Df||document.createElement("canvas").getContext("2d")).font=[o,e,i,n+"px",r].join(" "),Df.measureText(lf(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}([t],gf(e=void 0===e?{}:e)).join("")});const Yf=()=>[["cartesian"]],Vf=(Yf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),qf=(Vf.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),Uf=(qf.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Xf=(Uf.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),$f=(Xf.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Zf=($f.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),Kf=(Zf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...Uf(),...Vf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Jf=(Kf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...Xf(),...Vf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Qf=(Jf.props={},()=>[["parallel",0,1,0,1]]),td=(Qf.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),ed=(td.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),nd=(ed.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),rd=(nd.props={},({value:e})=>t=>t.map(()=>e)),id=(rd.props={},({value:e})=>t=>t.map(e)),od=(id.props={},({value:e})=>t=>t.map(t=>t[e])),ad=(od.props={},({value:t})=>()=>t);function sd(t,e){return t.parent===e.parent?1:2}function ld(t,e){return t+e.x}function cd(t,e){return Math.max(t,e.y)}function ud(){var s=sd,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(ld,0)/e.length,t.y=1+n.reduce(cd,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),o=t.x-s(t,n)/2,a=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-o)/(a-o)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function hd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function fd(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=pd)):void 0===e&&(e=dd);for(var n,r,i,o,a,t=new md(t),s=[t];n=s.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;0<=o;--o)s.push(r=i[o]=new md(i[o])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(gd)}function dd(t){return t.children}function pd(t){return Array.isArray(t)?t[1]:null}function yd(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function gd(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function md(t){this.data=t,this.depth=this.height=0,this.parent=null}function vd(t){return null==t?null:bd(t)}function bd(t){if("function"!=typeof t)throw new Error;return t}function xd(){return 0}function wd(t){return function(){return t}}ad.props={},md.prototype=fd.prototype={constructor:md,count:function(){return this.eachAfter(hd)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,o=[this],a=-1;n=o.pop();)if(t.call(e,n,++a,this),r=n.children)for(i=r.length-1;0<=i;--i)o.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return fd(this).eachBefore(yd)},[Symbol.iterator]:function*(){var t,e,n,r,i,o=[this];do{for(e=o.reverse(),o=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length)}};const kd=4294967296;function Md(t,e){for(var n,r,i=0,o=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,a=[];i<o;)n=t[i],r&&Od(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return _d(t[0],t[1]);case 3:return Ad(t[0],t[1],t[2])}}(a=function(t,e){var n,r;if(Sd(e,t))return[e];for(n=0;n<t.length;++n)if(Ed(e,t[n])&&Sd(_d(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Ed(_d(t[n],t[r]),e)&&Ed(_d(t[n],e),t[r])&&Ed(_d(t[r],e),t[n])&&Sd(Ad(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(a,n)),i=0);return r}function Ed(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Od(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Sd(t,e){for(var n=0;n<e.length;++n)if(!Od(t,e[n]))return;return 1}function _d(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,o=e.y,e=e.r,a=i-n,s=o-r,l=e-t,c=Math.sqrt(a*a+s*s);return{x:(n+i+a/c*l)/2,y:(r+o+s/c*l)/2,r:(c+t+e)/2}}function Ad(t,e,n){var r=t.x,i=t.y,t=t.r,o=e.x,a=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-o,u=r-s,h=i-a,f=i-l,d=e-t,p=n-t,y=r*r+i*i-t*t,o=y-o*o-a*a+e*e,a=y-s*s-l*l+n*n,e=u*h-c*f,y=(h*a-f*o)/(2*e)-r,s=(f*d-h*p)/e,l=(u*o-c*a)/(2*e)-i,n=(c*p-u*d)/e,f=s*s+n*n-1,h=2*(t+y*s+l*n),o=y*y+l*l-t*t,a=-(1e-6<Math.abs(f)?(h+Math.sqrt(h*h-4*f*o))/(2*f):o/h);return{x:r+y+s*a,y:i+l+n*a,r:a}}function Pd(t,e,n){var r,i,o,a,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,a=t.r+n.r,(a*=a)<(i*=i)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*s-o*l,n.y=t.y-r*l+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-o*l,n.y=e.y+r*l+o*s)):(n.x=e.x+n.r,n.y=e.y)}function Td(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Ld(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Nd(t){this._=t,this.next=null,this.previous=null}function Cd(t,e){if(!(o=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,o,a,s,l,c,u,h,f,d=t[0];if(d.x=0,d.y=0,!(1<o))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<o))return d.r+r.r;Pd(r,d,i=t[2]),d=new Nd(d),r=new Nd(r),i=new Nd(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<o;++l){Pd(d._,r._,i=t[l]),i=new Nd(i),c=r.next,u=d.previous,h=r._.r,f=d._.r;do{if(h<=f){if(Td(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}h+=c._.r,c=c.next}else{if(Td(u._,i._)){((d=u).next=r).previous=d,--l;continue t}f+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,a=Ld(d);(i=i.next)!==r;)(s=Ld(i))<a&&(d=i,a=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Md(d,e),l=0;l<o;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function jd(t){return Math.sqrt(t.value)}function Fd(){var n=null,r=1,i=1,o=xd;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%kd)/kd}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Rd(n)).eachAfter(Id(o,.5,e)).eachBefore(Dd(1)):t.eachBefore(Rd(jd)).eachAfter(Id(xd,1,e)).eachAfter(Id(o,t.r/Math.min(r,i),e)).eachBefore(Dd(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=vd(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(o="function"==typeof t?t:wd(+t),e):o},e}function Rd(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Id(a,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,o=a(t)*s||0;if(o)for(n=0;n<i;++n)e[n].r+=o;if(r=Cd(e,l),o)for(n=0;n<i;++n)e[n].r-=o;t.r=r+o}}}function Dd(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Bd(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function zd(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,c=t.value&&(r-e)/t.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}var Wd={depth:-1},Hd={},Gd={};function Yd(t){return t.id}function Vd(t){return t.parentId}function qd(){var g,m=Yd,v=Vd;function e(n){var e,t,r,i,o,a,s,l,c=Array.from(n),u=m,h=v,f=new Map;if(null!=g){const p=c.map((t,e)=>{t=g(t,e,n),e=(t=""+t).length;return"/"===(t=Xd(t,e-1)&&!Xd(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),y=p.map(Ud);var d=new Set(p).add("");for(const r of y)d.has(r)||(d.add(r),p.push(r),y.push(Ud(r)),c.push(Gd));u=(t,e)=>p[e],h=(t,e)=>y[e]}for(r=0,e=c.length;r<e;++r)t=c[r],a=c[r]=new md(t),null!=(s=u(t,r,n))&&(s+="")&&(l=a.id=s,f.set(l,f.has(l)?Hd:a)),null!=(s=h(t,r,n))&&(s+="")&&(a.parent=s);for(r=0;r<e;++r)if(s=(a=c[r]).parent){if(!(o=f.get(s)))throw new Error("missing: "+s);if(o===Hd)throw new Error("ambiguous: "+s);o.children?o.children.push(a):o.children=[a],a.parent=o}else{if(i)throw new Error("multiple roots");i=a}if(!i)throw new Error("no root");if(null!=g){for(;i.data===Gd&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(a=c[t]).data===Gd;--t)a.data=null}if(i.parent=Wd,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(gd),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=vd(t),e):m},e.parentId=function(t){return arguments.length?(v=vd(t),e):v},e.path=function(t){return arguments.length?(g=vd(t),e):g},e}function Ud(t){let e=t.length;if(e<2)return"";for(;1<--e&&!Xd(t,e););return t.slice(0,e)}function Xd(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function $d(t,e){return t.parent===e.parent?1:2}function Zd(t){var e=t.children;return e?e[0]:t.t}function Kd(t){var e=t.children;return e?e[e.length-1]:t.t}function Jd(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function Qd(){var f=$d,l=1,c=1,u=null;function e(t){var e,n,r,i,o,a,s=function(t){for(var e,n,r,i,o,a=[t=new Jd(t,0)];e=a.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;0<=i;--i)a.push(n=e.children[i]=new Jd(r[i],i)),n.parent=e;return(t.parent=new Jd(null,0)).children=[t],t}(t);return s.eachAfter(h),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:f(e,n)/2,i=s-e.x,o=l/(n.x+s+i),a=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*o,t.y=t.depth*a})),t}function h(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,o=0,a=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=o,i.m+=o,o+=i.s+(a+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,o=t,a=e,s=i.parent.children[0],l=i.m,c=o.m,u=a.m,h=s.m;a=Kd(a),i=Zd(i),a&&i;)s=Zd(s),(o=Kd(o)).a=t,0<(r=a.z+u-i.z-l+f(a._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(a,t,n),t,r),l+=r,c+=r),u+=a.m,l+=i.m,h+=s.m,c+=o.m;a&&!Kd(o)&&(o.t=a,o.m+=u-c),i&&!Zd(s)&&(s.t=i,s.m+=l-h,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function tp(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,c=t.value&&(i-n)/t.value;++s<l;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}Jd.prototype=Object.create(md.prototype);e=(1+Math.sqrt(5))/2;function ep(t,e,n,r,i,o){for(var a,s,l,c,u,h,f,d,p,y,g,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=o-r;!(u=v[x++].value)&&x<w;);for(g=(h=f=u)*u*(y=Math.max(c/l,l/c)/(k*t)),p=Math.max(f/g,g/h);x<w;++x){if(u+=s=v[x].value,s<h&&(h=s),f<s&&(f=s),g=u*u*y,p<(d=Math.max(f/g,g/h))){u-=s;break}p=d}m.push(a={value:u,dice:l<c,children:v.slice(b,x)}),a.dice?zd(a,n,r,i,k?r+=c*u/k:o):tp(a,n,r,k?n+=l*u/k:i,o),k-=u,b=x}return m}var np=function e(o){function t(t,e,n,r,i){ep(o,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function rp(t,e,n,r,i){var o,a,y=t.children,s=y.length,g=new Array(s+1);for(g[0]=a=o=0;o<s;++o)g[o+1]=a+=y[o].value;!function t(e,n,r,i,o,a,s){if(n-1<=e)return(l=y[e]).x0=i,l.y0=o,l.x1=a,void(l.y1=s);var l=g[e],c=r/2+l,u=e+1,h=n-1;for(;u<h;){var f=u+h>>>1;g[f]<c?u=1+f:h=f}c-g[u-1]<g[u]-c&&e+1<u&&--u;var l=g[u]-l,d=r-l;{var p;s-o<a-i?(t(e,u,l,i,o,p=r?(i*d+a*l)/r:a,s),t(u,n,d,p,o,a,s)):(t(e,u,l,i,o,a,p=r?(o*d+s*l)/r:s),t(u,n,d,i,p,a,s))}}(0,s,t.value,e,n,r,i)}function ip(t,e,n,r,i){(1&t.depth?tp:zd)(t,e,n,r,i)}var op=function e(d){function t(t,e,n,r,i){if((o=t._squarify)&&o.ratio===d)for(var o,a,s,l,c,u=-1,h=o.length,f=t.value;++u<h;){for(s=(a=o[u]).children,l=a.value=0,c=s.length;l<c;++l)a.value+=s[l].value;a.dice?zd(a,e,n,r,f?n+=(i-n)*a.value/f:i):tp(a,e,n,f?e+=(r-e)*a.value/f:r,i),f-=a.value}else t._squarify=o=ep(d,t,e,n,r,i),o.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function ap(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function sp(t={}){return[...ap(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function lp(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function cp(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function up(t={}){return ap(t)}function hp(){return[{type:"maybeKey"}]}function fp(t,e){return t.getBandWidth(t.invert(e))}function dp(t,e,n={}){const{x:o,y:a,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:h=r,bandOffsetY:f=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),y=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?fp(l,o[e]):0;var r=p?fp(c,a[e]):0,e=y&&s?(fp(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function pp(t){return parseFloat(t)/100}function yp(t,e,n,r){const{x:i,y:o}=n,{width:a,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=o[t];return[["string"==typeof e?pp(e)*a:+e,"string"==typeof t?pp(t)*s:+t]]})]}function gp(e){return"function"==typeof e?e:t=>t[e]}function mp(t,e){return Array.from(t,gp(e))}function vp(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const o=mp(t,e),a=mp(t,n),s=mp(t,r);return{links:t.map((t,e)=>({target:a[e],source:o[e],value:s[e]})),nodes:i||Array.from(new Set([...o,...a]),t=>({key:t}))}}function bp(t,e){return t.getBandWidth(t.invert(e))}const xp=()=>(t,e,n,i)=>{const{x:o,y:a,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[h]=i.getSize(),f=r?r.map(t=>+t/h):null,d=r?(t,e,n)=>{t+=e/2,e=f[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=bp(c,o[t]),n=e*(u?bp(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+o[t]+e,[e,n]=d(e,n,t),r=+a[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};xp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...sp({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0}};const wp=()=>(t,e,n,r)=>{const{x:i,x1:o,y:a,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+a[t]],[+o[t],+a[t]],[+o[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function kp(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Mp(n){let o,a,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==o(e,e))return r;do{var i=n+r>>>1;a(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(o=kp,a=(t,e)=>kp(n(t),e),(t,e)=>n(t)-e):(o=n===kp||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Ep,a=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==o(e,e))return r;do{var i=n+r>>>1;a(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Ep(){return 0}wp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...sp({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0}};Sl=Mp(kp).right;const Op=Mp(function(t){return null===t?NaN:+t}).center;var Sp=Sl;function _p(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Ap(t,e){t=function(e,n){let r=0,i,o=0,a=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-o,o+=i/++r,a+=i*(t-o));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-o,o+=i/++r,a+=i*(s-o))}if(1<r)return a/(r-1)}(t,e);return t&&Math.sqrt(t)}function Pp(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var o of e)null!=(o=n(o,++t,e))&&(void 0===r?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}return[r,i]}class Tp{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],o=e+i,i=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);i&&(n[r++]=i),e=o}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,o=0;if(0<e){for(o=t[--e];0<e&&(n=o,r=t[--e],o=n+r,!(i=r-(o-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=o+r,r==n-o)&&(o=n)}return o}}class Lp extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Np(this,t))}has(t){return super.has(Np(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Np({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Cp(t){return t}function jp(t,...e){return Ip(t,Cp,Cp,e)}function Fp(t,e,...n){return Ip(t,Cp,e,n)}function Rp(t,e,...n){return Ip(t,Array.from,e,n)}function Ip(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new Lp,i=f[n++];let o=-1;for(const l of e){var a=i(l,++o,e),s=r.get(a);s?s.push(l):r.set(a,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Dp(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=zp(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>zp(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Bp(n))}function Bp(r=kp){if(r===kp)return zp;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function zp(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Wp=Array.prototype.slice;function Hp(t){return()=>t}var Gp=Math.sqrt(50),Yp=Math.sqrt(10),Vp=Math.sqrt(2);function qp(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(Gp<=n?10:Yp<=n?5:Vp<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(Gp<=n?10:Yp<=n?5:Vp<=n?2:1)}function Up(t){return Math.ceil(Math.log(_p(t))/Math.LN2)+1}function Xp(){var y=Cp,g=Pp,m=Up;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),o=0;o<r;++o)i[o]=y(t[o],o,t);var a=g(i),s=a[0],l=a[1],c=m(i,s,l);if(!Array.isArray(c)){var a=l,u=+c;if(g===Pp&&([s,l]=function(t,e,n){let r;for(;;){var i=qp(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,o,a,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(a=qp(n,r,t))||!isFinite(a))return[];if(0<a){let t=Math.round(n/a),e=Math.round(r/a);for(t*a<n&&++t,e*a>r&&--e,o=new Array(i=e-t+1);++s<i;)o[s]=(t+s)*a}else{a=-a;let t=Math.round(n*a),e=Math.round(r*a);for(t/a<n&&++t,e/a>r&&--e,o=new Array(i=e-t+1);++s<i;)o[s]=(t+s)/a}return e&&o.reverse(),o}(s,l,u))[0]<=s&&(n=qp(s,l,u)),c[c.length-1]>=l)if(l<=a&&g===Pp){const n=qp(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var h=c.length;c[0]<=s;)c.shift(),--h;for(;c[h-1]>l;)c.pop(),--h;var f,d,p=new Array(h+1);for(o=0;o<=h;++o)(f=p[o]=[]).x0=0<o?c[o-1]:s,f.x1=o<h?c[o]:l;if(isFinite(n)){if(0<n)for(o=0;o<r;++o)null!=(e=i[o])&&s<=e&&e<=l&&p[Math.min(h,Math.floor((e-s)/n))].push(t[o]);else if(n<0)for(o=0;o<r;++o)null!=(e=i[o])&&s<=e&&e<=l&&(d=Math.floor((s-e)*n),p[Math.min(h,d+(c[d]<=e))].push(t[o]))}else for(o=0;o<r;++o)null!=(e=i[o])&&s<=e&&e<=l&&p[Sp(c,e,0,h)].push(t[o]);return p}return e.value=function(t){return arguments.length?(y="function"==typeof t?t:Hp(t),e):y},e.domain=function(t){return arguments.length?(g="function"==typeof t?t:Hp([t[0],t[1]]),e):g},e.thresholds=function(t){return arguments.length?(m="function"==typeof t?t:Array.isArray(t)?Hp(Wp.call(t)):Hp(t),e):m},e}function $p(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function Zp(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function Kp(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function Jp(n,r,i=0,o=n.length-1,a){for(a=void 0===a?zp:Bp(a);i<o;){600<o-i&&(s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),Jp(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(o,Math.floor(r+(s-l)*c/s+u)),a));var s,l,c,u,h=n[r];let t=i,e=o;for(Qp(n,i,r),0<a(n[o],h)&&Qp(n,i,o);t<e;){for(Qp(n,t,e),++t,--e;a(n[t],h)<0;)++t;for(;0<a(n[e],h);)--e}0===a(n[i],h)?Qp(n,i,e):Qp(n,++e,o),e<=r&&(i=e+1),r<=e&&(o=e-1)}return n}function Qp(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function t0(t,e,n){var r;if(n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)return(e=+e)<=0||n<2?Kp(t):1<=e?$p(t):(n=(n-1)*e,(r=$p(Jp(t,e=Math.floor(n)).subarray(0,e+1)))+(Kp(t.subarray(e+1))-r)*(n-e))}function e0(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var o of e)null!=(o=n(o,++t,e))&&(o=+o)>=o&&(++r,i+=o)}if(r)return i/r}function n0(t,e){return t0(t,.5,e)}function r0(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function i0(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}function o0(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function a0(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function s0(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function l0(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function c0(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function u0(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function h0(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function f0(t){return c0(t)||s0(t)}const d0=(t,e,n,r)=>{var i;const{series:o,x:a,y:s}=n;var{x:n,y:e}=e;if(void 0===a||void 0===s)throw new Error("Missing encode for x or y channel.");var t=o?Array.from(jp(t,t=>o[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+a[t]+c,+s[t]+u]))),t]},p0=(t,e,n,i)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===o.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=o.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},y0=()=>(t,e,n,r)=>{return(u0(r)?p0:d0)(t,e,n,r)};y0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...sp({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...hp(),...cp(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const g0=y=>(t,e,n,a)=>{const{x:r,y:i,x1:o,y1:s,size:l,dx:c,dy:u}=n,[h,f]=a.getSize(),d=dp(e,n,y),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(o?(+r[t]+ +o[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/h,r=r/f,o=[e-i,n-r],e=[e+i,n+r];return[a.map(d(o,t)),a.map(d(e,t))]}):Array.from(t,t=>[a.map(d(p(t),t))])]};g0.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...sp({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...hp(),{type:"maybeSize"},...lp()]};const m0=s=>{const{cartesian:l=!1}=s;return l?yp:(t,e,n,r)=>{if(l)return yp(t,0,n,r);const{x:i,y:o}=n,a=dp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+o[t]];return[r.map(a(e,t))]})]}};m0.props={defaultShape:"text",defaultLabelShape:"label",channels:[...sp({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hp(),...lp()]};const v0=()=>(t,e,n,i)=>{const{x:o,y:a}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+o[t])),n=l.getBandWidth(l.invert(+a[t])),r=+o[t],t=+a[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};v0.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...sp({shapes:["rect","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...hp(),...lp()]};const b0=()=>(t,e,n,o)=>{const{x:a,y:s,y1:l,series:r}=n;n=r?Array.from(jp(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=o.map([+a[i],+s[i]]),r[n+t]=o.map([+a[i],+l[i]])}return r}),n]};b0.props={defaultShape:"area",defaultLabelShape:"label",channels:[...sp({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const x0=c=>(t,e,n,r)=>{const{x:i,y:o,x1:a=i,y1:s=o}=n,l=dp(e,n,c);e=t.map(t=>[r.map(l([+i[t],+o[t]],t)),r.map(l([+a[t],+s[t]],t))]);return[t,e]};x0.props={defaultShape:"link",defaultLabelShape:"label",channels:[...sp({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...hp(),...lp()]};const w0=s=>{var t=s["cartesian"];return t?yp:(t,e,n,r)=>{const{x:i,y:o}=n,a=dp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+o[t]];return[r.map(a(e,t))]})]}};w0.props={defaultShape:"image",defaultLabelShape:"label",channels:[...sp({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hp(),...lp()]};const k0=()=>(t,e,n,o)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<a.length;t++){var r=a[t][e];if(void 0===r)break;var i=s[t][e];n.push(o.map([+r,+i]))}return n});return[t,n]};k0.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...sp({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...hp(),...lp()]};const M0=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:h,y3:f,y4:d,series:p}=n,y=e.x,g=e.series;return[t,Array.from(t,t=>{var e=y.getBandWidth(y.invert(+l[t])),n=e*(g?g.getBandWidth(g.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,o,a]=[+c[t],+u[t],+h[t],+f[t],+d[t]];return[[e-n/2,a],[e+n/2,a],[e,a],[e,o],[e-n/2,o],[e+n/2,o],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},E0=(M0.props={defaultShape:"box",defaultLabelShape:"label",channels:[...sp({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:o,y:a,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+o[t]-r/2,+a[t]-n/2]),i.map([+o[t]+r/2,+a[t]+n/2])]});return[t,n]});E0.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...sp({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...hp(),...lp()]};const O0=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};O0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...up({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...hp()]};const S0=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};S0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...up({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...hp()]};const _0=(...t)=>x0(...t);function A0(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:o}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+e]}}function P0(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const o=A0("x",r,n,e.x),a=A0("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=o(t),[t,r]=a(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}_0.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...up({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...hp()]};const T0=()=>P0();T0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...up({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...hp()]};const L0=()=>P0({extendY:!0});L0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...up({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...hp()]};const N0=()=>P0({extendX:!0});function C0(t){return t.target.depth}function j0(t,e){return t.sourceLinks.length?t.depth:e-1}function F0(t){return function(){return t}}function R0(t,e){return D0(t.source,e.source)||t.index-e.index}function I0(t,e){return D0(t.target,e.target)||t.index-e.index}function D0(t,e){return t.y0-e.y0}function B0(t){return t.value}function z0(t){return t.index}function W0(t){return t.nodes}function H0(t){return t.links}function G0(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function Y0({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function V0(){let x=0,w=0,k=1,M=1,E=24,O=8,S,_=z0,A=j0,P,T,L,N=W0,C=H0,j=6;function e(e){e={nodes:N(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const y=new Map(i.map(t=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=G0(y,n)),"object"!=typeof r&&(r=t.target=G0(y,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const g of t)g.value=void 0===g.fixedValue?Math.max(o0(g.sourceLinks,B0),o0(g.targetLinks,B0)):g.fixedValue;{var o=e.nodes,a=o.length;let t=new Set(o),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>a)throw new Error("circular link");t=n,n=new Set}if(P){var s,l=Math.max($p(o,t=>t.depth)+1,0);for(let t=0;t<o.length;t++)(s=o[t]).depth=P.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max($p(t,t=>t.depth)+1,0),n=(k-x-E)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const o of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,o,e))));o.layer=i,o.x0=x+i*n,o.x1=o.x0+E,r[i]?r[i].push(o):r[i]=[o]}if(T)for(const a of r)a.sort(T);return r}(e),t=(S=Math.min(O,(M-w)/($p(u,t=>t.length)-1)),u),h=Kp(t,t=>(M-w-(t.length-1)*S)/o0(t,B0));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*h,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*h}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var f=m[t];f.y0+=e*(t+1),f.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(I0),n.sort(R0)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var o,a=n[e];for(const c of a){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:o,width:a}of t.sourceLinks){if(o===e)break;n-=a}return n}(c,s)*l,e+=l}0<e&&(o=(t/e-c.y0)*r,c.y0+=o,c.y1+=o,R(c))}void 0===T&&a.sort(D0),a.length&&F(a,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var o,a=n[t];for(const c of a){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:o,width:a}of e.targetLinks){if(o===t)break;n-=a}return n}(s,c)*l,e+=l}0<e&&(o=(t/e-c.y0)*r,c.y0+=o,c.y1+=o,R(c))}void 0===T&&a.sort(D0),a.length&&F(a,i)}}(u,d,p)}return Y0(e),e}function F(t,e){var n=t.length>>1,r=t[n];o(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),o(t,M,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],o=(e-i.y0)*r;1e-6<o&&(i.y0+=o,i.y1+=o),e=i.y1+S}}function o(t,e,n,r){for(;0<=n;--n){var i=t[n],o=(i.y1-e)*r;1e-6<o&&(i.y0-=o,i.y1-=o),e=i.y0-S}}function R({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(I0);for(const{target:{targetLinks:e}}of t)e.sort(R0)}}return e.update=function(t){return Y0(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:F0(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:F0(t),e):A},e.nodeDepth=function(t){return arguments.length?(P=t,e):P},e.nodeSort=function(t){return arguments.length?(T=t,e):T},e.nodeWidth=function(t){return arguments.length?(E=+t,e):E},e.nodePadding=function(t){return arguments.length?(O=S=+t,e):O},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:F0(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:F0(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],M=+t[1],e):[k-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[k,M]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}N0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...up({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...hp()]};const q0={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},U0={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Kp(t.sourceLinks,C0)-1:0},justify:j0};const X0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:o,nodeDepth:a,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},q0,h),l=V0().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(o).nodeDepth(a).nodeAlign("string"==(c=typeof(n=r))?U0[n]||j0:"function"==c?n:j0).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:o}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:o.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function $0(t){return t}function Z0(t=""){throw new Error(t)}function K0(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function J0(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return Q0(t,e)||{}}function Q0(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[df(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function ty(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}X0.props={};const ey=g=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:o=[],linkLabels:a=[],animate:s={}}=g,{links:t,nodes:l}=vp(t,e),c=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:h=u}=c,{links:i,nodes:t}=X0(Object.assign(Object.assign(Object.assign({},m),{nodeId:gp(u)}),i))({links:t,nodes:l});const f=J(r,"label"),{text:d=u,spacing:p=5}=f,y=K(f,["text","spacing"]);return[F({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:h}),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),y),...o],animate:"object"==typeof s?J(s,"node"):s,axis:!1}),F({},b,{data:i,encode:e,labels:a,style:Object.assign({fill:e.color?void 0:"#aaa"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s})]}},ny=(ey.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);ny.props={defaultShape:"path",defaultLabelShape:"label",channels:[...sp({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...hp()]};const ry=t=>t?parseInt(t):0;function iy(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||ry(t.width),e=e.clientHeight||ry(t.height),{width:(i={width:i-(ry(t.paddingLeft)+ry(t.paddingRight)),height:e-(ry(t.paddingLeft)+ry(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function oy(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:o=n,paddingBottom:n=n,margin:a=0,marginLeft:s=a,marginRight:l=a,marginTop:c=a,marginBottom:a=a,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-h-f,height:t-o-n-c-a-d-u}}function ay(t,e,n){const r=n["value"];var a,i,o,s,l,c,u,h,f,d,n=function(t,e){var n={treemapBinary:rp,treemapDice:zd,treemapSlice:tp,treemapSliceDice:ip,treemapSquarify:np,treemapResquarify:op};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?qd().path(p):qd():fd)(t));function y(t){return t.x0=t.y0=0,t.x1=o,t.y1=s,t.eachBefore(g),l=[0],i&&t.eachBefore(Bd),t}function g(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,o=t.y1-e;i<n&&(n=i=(n+i)/2),o<r&&(r=o=(r+o)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=o,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=h(t)-e)<n&&(n=i=(n+i)/2),(o-=f(t)-e)<r&&(r=o=(r+o)/2),a(t,n,r,i,o))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),a=np,i=!1,s=o=1,l=[0],d=f=h=u=c=xd,y.round=function(t){return arguments.length?(i=!!t,y):i},y.size=function(t){return arguments.length?(o=+t[0],s=+t[1],y):[o,s]},y.tile=function(t){return arguments.length?(a=bd(t),y):a},y.padding=function(t){return arguments.length?y.paddingInner(t).paddingOuter(t):y.paddingInner()},y.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:wd(+t),y):c},y.paddingOuter=function(t){return arguments.length?y.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):y.paddingTop()},y.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:wd(+t),y):u},y.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:wd(+t),y):h},y.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:wd(+t),y):f},y.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:wd(+t),y):d},y.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const sy=u=>t=>{var{width:t,height:e}=oy(t),{data:n,encode:r={},scale:i,style:o={},layout:a={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=ay(n,F({},c,a),r),n=J(o,"label");return[F({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:o,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},ly=(sy.props={composite:!0},u=>t=>{var{width:t,height:e}=oy(t),{data:n,encode:r={},scale:i={},style:o={},layout:a={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(tf(t)?qd().path(e.path):fd)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Fd().size(e.size).padding(e.padding)(n),n.descendants()})(n,F({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},a),F({},c.encode,r)),t=J(o,"label");return[F({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:o,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function cy(t,e){return Kp(t,t=>e[t])}function uy(t,e){return $p(t,t=>e[t])}function hy(t,e){const n=2.5*fy(t,e)-1.5*py(t,e);return Kp(t,t=>e[t]>=n?e[t]:NaN)}function fy(t,e){return t0(t,.25,t=>e[t])}function dy(t,e){return t0(t,.5,t=>e[t])}function py(t,e){return t0(t,.75,t=>e[t])}function yy(t,e){const n=2.5*py(t,e)-1.5*fy(t,e);return $p(t,t=>e[t]<=n?e[t]:NaN)}function gy(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],o=r["value"];return[Array.from(jp(t,t=>o[+t]).values()).flatMap(t=>{const e=hy(t,i),n=yy(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}ly.props={composite:!0};const my=a=>()=>{var{data:t,encode:e,style:n={}}=a,{extend:r=!1}=n,n=K(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},o={y1:fy,y2:dy,y3:py};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:cy},o),{y4:uy})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=J(n,"box"),n=J(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:hy},o),{y4:yy})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:gy}],encode:e,style:Object.assign({},n)}])},vy=(my.props={composite:!0},s=>{var t=s["cartesian"];return t?yp:(t,e,n,r)=>{const{x:i,y:o}=n,a=dp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+o[t]];return[r.map(a(e,t))]})]}});function by(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,o,a,s,l,c,u,h,f,d=t._root,p={data:r},y=t._x0,g=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(o=(y+m)/2))?y=o:m=o,(u=n>=(a=(g+v)/2))?g=a:v=a,!(d=(i=d)[h=u<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(o=(y+m)/2))?y=o:m=o,(u=n>=(a=(g+v)/2))?g=a:v=a,(h=u<<1|c)==(f=(a<=l)<<1|o<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function xy(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function wy(t){return t[0]}function ky(t){return t[1]}function My(t,e,n){e=new Ey(null==e?wy:e,null==n?ky:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Ey(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Oy(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}vy.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};a=My.prototype=Ey.prototype;function Sy(t){return function(){return t}}function _y(t){return 1e-6*(t()-.5)}function Ay(t){return t.index}function Py(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Ty(c){var u,h,o,a,f,d,s=Ay,n=function(t){return 1/Math.min(a[t.source.index],a[t.target.index])},r=Sy(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,o,a,s,l=0;l<n;++l)r=(i=c[l]).source,o=(i=i.target).x+i.vx-r.x-r.vx||_y(d),a=i.y+i.vy-r.y-r.vy||_y(d),o*=s=((s=Math.sqrt(o*o+a*a))-h[l])/s*t*u[l],a*=s,i.vx-=o*(s=f[l]),i.vy-=a*s,r.vx+=o*(s=1-s),r.vy+=a*s}function i(){if(o){var t,e=o.length,n=c.length,r=new Map(o.map((t,e)=>[s(t,e,o),t])),i=0;for(a=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Py(r,t.source)),"object"!=typeof t.target&&(t.target=Py(r,t.target)),a[t.source.index]=(a[t.source.index]||0)+1,a[t.target.index]=(a[t.target.index]||0)+1;for(i=0,f=new Array(n);i<n;++i)t=c[i],f[i]=a[t.source.index]/(a[t.source.index]+a[t.target.index]);u=new Array(n),l(),h=new Array(n),y()}}function l(){if(o)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function y(){if(o)for(var t=0,e=c.length;t<e;++t)h[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){o=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Sy(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Sy(+t),y(),e):r},e}a.copy=function(){var t,e,n=new Ey(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Oy(e));else n._root=Oy(r);return n},a.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return by(this.cover(e,n),e,n,t)},a.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),o=new Array(r),a=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<a&&(a=e),l<e&&(l=e),(o[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<a||c<s))for(this.cover(a,s).cover(l,c),u=0;u<r;++u)by(this,i[u],o[u],t[u]);return this},a.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||o<=e;)switch(s=(e<r)<<1|t<n,(a=new Array(4))[s]=c,c=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=o}return this},a.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},a.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},a.find=function(t,e,n){var r,i,o,a,s,l,c,u,h=this._x0,f=this._y0,d=this._x1,p=this._y1,y=[],g=this._root;for(g&&y.push(new xy(g,h,f,d,p)),null==n?n=1/0:(h=t-n,f=e-n,d=t+n,p=e+n,n*=n);r=y.pop();)!(g=r.node)||(s=r.x0)>d||(l=r.y0)>p||(a=r.x1)<h||(i=r.y1)<f||(g.length?(y.push(new xy(g[3],o=(s+a)/2,c=(l+i)/2,a,i),new xy(g[2],s,c,o,i),new xy(g[1],o,l,a,c),new xy(g[0],s,l,o,c)),(i=(c<=e)<<1|o<=t)&&(r=y[y.length-1],y[y.length-1]=y[y.length-1-i],y[y.length-1-i]=r)):(l=(a=t-+this._x.call(null,g.data))*a+(s=e-+this._y.call(null,g.data))*s)<n&&(h=t-(c=Math.sqrt(n=l)),f=e-c,d=t+c,p=e+c,u=g.data));return u},a.remove=function(t){if(!isNaN(o=+this._x.call(null,t))&&!isNaN(a=+this._y.call(null,t))){var e,n,r,i,o,a,s,l,c,u,h,f=this._root,d=this._x0,p=this._y0,y=this._x1,g=this._y1;if(f){if(f.length)for(;;){if((l=o>=(s=(d+y)/2))?d=s:y=s,(c=a>=(s=(p+g)/2))?p=s:g=s,!(f=(e=f)[u=c<<1|l]))return this;if(!f.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,h=u)}for(;f.data!==t;)if(!(f=(r=f).next))return this;(i=f.next)&&delete f.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f)):this._root=i}}return this},a.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},a.root=function(){return this._root},a.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},a.visit=function(t){var e,n,r,i,o,a,s,l=[],c=this._root;for(c&&l.push(new xy(c,this._x0,this._y0,this._x1,this._y1));o=l.pop();)!t(c=o.node,n=o.x0,r=o.y0,i=o.x1,o=o.y1)&&c.length&&(a=(n+i)/2,s=(r+o)/2,(e=c[3])&&l.push(new xy(e,a,s,i,o)),(e=c[2])&&l.push(new xy(e,n,s,a,o)),(e=c[1])&&l.push(new xy(e,a,r,i,s)),e=c[0])&&l.push(new xy(e,n,r,a,s));return this},a.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new xy(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,o,a,s,l,c,u,h=e.node;h.length&&(o=e.x0,a=e.y0,c=(o+(s=e.x1))/2,u=(a+(l=e.y1))/2,(i=h[0])&&n.push(new xy(i,o,a,c,u)),(i=h[1])&&n.push(new xy(i,c,a,s,u)),(i=h[2])&&n.push(new xy(i,o,u,c,l)),i=h[3])&&n.push(new xy(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},a.x=function(t){return arguments.length?(this._x=t,this):this._x},a.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ly={value:()=>{}};function Ny(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Cy(r)}function Cy(t){this._=t}function jy(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ly,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Cy.prototype=Ny.prototype={constructor:Cy,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=jy(i[n],t.name,e);else if(null==e)for(n in i)i[n]=jy(i[n],t.name,null);return this}for(;++a<s;)if(n=(n=(t=o[a]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Cy(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Fy,Ry,Iy=0,Dy=0,By=0,zy=1e3,Wy=0,Hy=0,Gy=0,Yy="object"==typeof performance&&performance.now?performance:Date,Vy="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qy(){return Hy||(Vy(Uy),Hy=Yy.now()+Gy)}function Uy(){Hy=0}function Xy(){this._call=this._time=this._next=null}function $y(t,e,n){var r=new Xy;return r.restart(t,e,n),r}function Zy(){Hy=(Wy=Yy.now())+Gy,Iy=Dy=0;try{qy(),++Iy;for(var t,e=Fy;e;)0<=(t=Hy-e._time)&&e._call.call(void 0,t),e=e._next;--Iy}finally{for(var n,r,i=Fy,o=1/(Iy=0);i;)i=i._call?(o>i._time&&(o=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Fy=r);Ry=n,Jy(o),Hy=0}}function Ky(){var t=Yy.now(),e=t-Wy;zy<e&&(Gy-=e,Wy=t)}function Jy(t){Iy||(Dy=Dy&&clearTimeout(Dy),24<t-Hy?(t<1/0&&(Dy=setTimeout(Zy,t-Yy.now()-Gy)),By=By&&clearInterval(By)):(By||(Wy=Yy.now(),By=setInterval(Ky,zy)),Iy=1,Vy(Zy)))}Xy.prototype=$y.prototype={constructor:Xy,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qy():+n)+(null==e?0:+e),this._next||Ry===this||(Ry?Ry._next=this:Fy=this,Ry=this),this._call=t,this._time=n,Jy()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jy())}};const Qy=4294967296;function tg(t){return t.x}function eg(t){return t.y}var ng=10,rg=Math.PI*(3-Math.sqrt(5));function ig(l){var o,a=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,h=new Map,t=$y(i),n=Ny("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Qy)/Qy}();function i(){f(),n.call("tick",o),a<e&&(t.stop(),n.call("end",o))}function f(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(a+=(c-a)*s,h.forEach(function(t){t(a)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return o}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=ng*Math.sqrt(.5+r),e=r*rg,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),o={tick:f,restart:function(){return t.restart(i),o},stop:function(){return t.stop(),o},nodes:function(t){return arguments.length?(l=t,d(),h.forEach(p),o):l},alpha:function(t){return arguments.length?(a=+t,o):a},alphaMin:function(t){return arguments.length?(e=+t,o):e},alphaDecay:function(t){return arguments.length?(s=+t,o):+s},alphaTarget:function(t){return arguments.length?(c=+t,o):c},velocityDecay:function(t){return arguments.length?(u=1-t,o):1-u},randomSource:function(t){return arguments.length?(r=t,h.forEach(p),o):r},force:function(t,e){return 1<arguments.length?(null==e?h.delete(t):h.set(t,p(e)),o):h.get(t)},find:function(t,e,n){var r,i,o,a=0,s=l.length;for(null==n?n=1/0:n*=n,a=0;a<s;++a)(r=(r=t-(i=l[a]).x)*r+(r=e-i.y)*r)<n&&(o=i,n=r);return o},on:function(t,e){return 1<arguments.length?(n.on(t,e),o):n.on(t)}}}function og(t,e,n){var i,l,c,u,h,r,f,d,p,{nodes:t,links:o}=t,{joint:e,nodeStrength:a,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,R=(r=Sy(-30),d=(f=1)/0,p=.81,y.initialize=function(t,e){i=t,c=e,I()},y.strength=function(t){return arguments.length?(r="function"==typeof t?t:Sy(+t),I(),y):r},y.distanceMin=function(t){return arguments.length?(f=t*t,y):Math.sqrt(f)},y.distanceMax=function(t){return arguments.length?(d=t*t,y):Math.sqrt(d)},y.theta=function(t){return arguments.length?(p=t*t,y):Math.sqrt(p)},y);function y(t){var e,n=i.length,r=My(i,tg,eg).visitAfter(D);for(u=t,e=0;e<n;++e)l=i[e],r.visit(B)}function I(){if(i){var t,e,n=i.length;for(h=new Array(n),t=0;t<n;++t)e=i[t],h[e.index]=+r(e,t,i)}}function D(t){var e,n,r,i,o,a=0,s=0;if(t.length){for(r=i=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(a+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;a+=h[e.data.index],e=e.next;);t.value=a}function B(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,o=t.y-l.y,a=r-e,s=i*i+o*o;if(a*a/p<s)return s<d&&(0===i&&(s+=(i=_y(c))*i),0===o&&(s+=(o=_y(c))*o),s<f&&(s=Math.sqrt(f*s)),l.vx+=i*t.value*u/s,l.vy+=o*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=_y(c))*i),0===o&&(s+=(o=_y(c))*o),s<f)&&(s=Math.sqrt(f*s));t.data!==l&&(a=h[t.data.index]*u/s,l.vx+=i*a,l.vy+=o*a),t=t.next;);}var g,m,v,b,x,w,k,M,E,O,S,_,A,P,n=Ty(o).id(gp(n)),T=("function"==typeof a&&R.strength(a),"function"==typeof s&&n.strength(s),ig(t).force("link",n).force("charge",R));function L(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+g(m[t],t,m))?0:+x(m[t],t,m)}}function C(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(E[n]-e.x)*M[n]*t}function j(){if(k){var t,e=k.length;for(M=new Array(e),E=new Array(e),t=0;t<e;++t)M[t]=isNaN(E[t]=+w(k[t],t,k))?0:+O(k[t],t,k)}}function F(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*P,r=(r/e-_)*P,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(P=1,null==S&&(S=0),null==_&&(_=0),F.initialize=function(t){A=t},F.x=function(t){return arguments.length?(S=+t,F):S},F.y=function(t){return arguments.length?(_=+t,F):_},F.strength=function(t){return arguments.length?(P=+t,F):P},F)):T.force("x",(O=Sy(.1),"function"!=typeof w&&(w=Sy(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(O="function"==typeof t?t:Sy(+t),j(),C):O},C.x=function(t){return arguments.length?(w="function"==typeof t?t:Sy(+t),j(),C):w},C)).force("y",(x=Sy(.1),"function"!=typeof g&&(g=Sy(null==g?0:+g)),L.initialize=function(t){m=t,N()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:Sy(+t),N(),L):x},L.y=function(t){return arguments.length?(g="function"==typeof t?t:Sy(+t),N(),L):g},L)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:o}}const ag=h=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:o=[],linkLabels:a=[],animate:s={}}=h,l=J(e,"node"),c=J(e,"link"),{links:t,nodes:u}=vp(t,e),{nodesData:t,linksData:u}=og({links:t,nodes:u},F({},{joint:!0},i),e);return[F({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:a,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),F({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...o],animate:"object"==typeof s?J(s,"node"):s})]},sg=(ag.props={composite:!0},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:o=["x","y"]}=u,[a,s]=o;var t=fd(t,t=>t.children).sum(t=>t[e]).sort(i),l=h();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[a]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[a]=[t.source[a],t.target[a]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),lg=t=>sg(ud)(t),cg=(lg.props={},t=>sg(Qd)(t)),ug=(cg.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},h={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},f={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:o=[],linkLabels:a=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=cg(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[F({},f,{data:l,encode:J(e,"link"),scale:J(n,"link"),labels:a,style:Object.assign({stroke:"#999"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s}),F({},h,{data:i,scale:J(n,"node"),encode:J(e,"node"),labels:[Object.assign(Object.assign({},d),J(r,"label")),...o],style:Object.assign({},J(r,"node")),animate:"object"==typeof s?J(s,"node"):s})]}});ug.props={composite:!0};var hg={},fg={},dg=34,pg=10,yg=13;function gg(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function mg(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function vg(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function bg(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+vg(-e,6):9999<e?"+"+vg(e,6):vg(e,4))+"-"+vg(t.getUTCMonth()+1,2)+"-"+vg(t.getUTCDate(),2)+(o?"T"+vg(n,2)+":"+vg(r,2)+":"+vg(i,2)+"."+vg(o,3)+"Z":i?"T"+vg(n,2)+":"+vg(r,2)+":"+vg(i,2)+"Z":r||n?"T"+vg(n,2)+":"+vg(r,2)+"Z":"")}function xg(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,o=0,a=0,s=i<=0,l=!1;function c(){if(s)return fg;if(l)return l=!1,hg;var t,e,n=o;if(r.charCodeAt(n)===dg){for(;o++<i&&r.charCodeAt(o)!==dg||r.charCodeAt(++o)===dg;);return(t=o)>=i?s=!0:(e=r.charCodeAt(o++))===pg?l=!0:e===yg&&(l=!0,r.charCodeAt(o)===pg)&&++o,r.slice(n+1,t-1).replace(/""/g,'"')}for(;o<i;){if((e=r.charCodeAt(t=o++))===pg)l=!0;else if(e===yg)l=!0,r.charCodeAt(o)===pg&&++o;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===pg&&--i,r.charCodeAt(i-1)===yg&&--i;(e=c())!==fg;){for(var u=[];e!==hg&&e!==fg;)u.push(e),e=c();t&&null==(u=t(u,a++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return a(e[t])}).join(r)})}function o(t){return t.map(a).join(r)}function a(t){return null==t?"":t instanceof Date?bg(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,o){var a,s;return(t=n(t,function(t,e){if(a)return a(t,e-1);var n,r,i;s=t,a=o?(r=o,i=gg(n=t),function(t,e){return r(i(t),e,n)}):gg(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?mg(t):e).map(a).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?mg(t):e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}function wg(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;kg&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const kg=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Mg=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:o=!0}=t;return()=>Me(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),xg(i).parse(t,o?wg:$0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Mg.props={};const Eg=t=>{const{fields:o,as:n=[]}=t;return t=>{if(!o||(e=o,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<o.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:o[t],[i]:n[o[t]]}));return e},[])}};Eg.props={};const Og=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)};function Sg(t,e,n){return Math.min(n,Math.max(e,t))}Og.props={};const _g=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=Sg(n,0,t.length-1),r=Sg(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},Ag=(_g.props={},t=>{t=t.fields;return _g({fields:t})});Ag.props={};const Pg=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Pg.props={};const Tg=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Lg=(Tg.props={},t=>{const e=t["value"];return()=>e}),Ng=(Lg.props={},t=>{const{callback:e=$0}=t;return t=>e(t)}),Cg=(Ng.props={},t=>{const{callback:e=$0}=t;return t=>Array.isArray(t)?t.map(e):t});Cg.props={};var jg=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Fg={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Rg(t){const{y:c,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:y,sourceWeight:g,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},Fg),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=y(t),t.sourceWeight=g(t),t.targetWeight=m(t)});const i=jp(r,t=>t.source),o=jp(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=o.has(t.id)?o.get(t.id):[];t.frequency=e.length+n.length,t.value=o0(e,t=>t.sourceWeight)+o0(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:jg[v])&&r.sort(n),!(n=(r=e).length))throw Z0("Invalid nodes: it's empty!");if(h){const a=f/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-f),e.height=u;var n=a+t,r=n+e.width,i=c-u/2,o=i+u;return e.x=[n,r,r,n],e.y=[i,i,o,o],t+e.width+2*a},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)return e.forEach(t=>{var e=p(t),n=y(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=jp(e,t=>t.source),l=jp(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],o=l.get(t)||[];let a=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+a,t.x[1]=n.x[0]+a+e,a+=e}),o.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+a,t.x[2]=n.x[0]+a+e,a+=e})})}(e,t),{nodes:e,edges:t}}}const Ig=e=>t=>Rg(e)(t),Dg=(Ig.props={},Math.PI/180),Bg=64,zg=2048;function Wg(t){return t.text}function Hg(){return"serif"}function Gg(){return"normal"}function Yg(t){return t.value}function Vg(){return 90*~~(2*Math.random())}function qg(){return 1}function Ug(){}function Xg(t,a,r,s){if(!a.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(Bg<<5)/c,zg/c);let i=0,o=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){a=r[s],l.save(),l.font=a.style+" "+a.weight+" "+~~((a.size+1)/c)+"px "+a.font;let t=l.measureText(a.text+"m").width*c,e=a.size<<1;if(a.rotate?(d=Math.sin(a.rotate*Dg),f=Math.cos(a.rotate*Dg),u=t*f,h=t*d,f=e*f,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(h+f),Math.abs(h-f))):t=t+31>>5<<5,e>n&&(n=e),i+t>=Bg<<5&&(i=0,o+=n,n=0),o+e>=zg)break;l.translate((i+(t>>1))/c,(o+(e>>1))/c),a.rotate&&l.rotate(a.rotate*Dg),l.fillText(a.text,0,0),a.padding&&(l.lineWidth=2*a.padding,l.strokeText(a.text,0,0)),l.restore(),a.width=t,a.height=e,a.xoff=i,a.yoff=o,a.x1=t>>1,a.y1=e>>1,a.x0=-a.x1,a.y0=-a.y1,a.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(Bg<<5)/c,zg/c).data,y=[];0<=--s;)if((a=r[s]).hasText){var g=a.width,m=g>>5;let n=a.y1-a.y0;for(let t=0;t<n*m;t++)y[t]=0;if(null==(i=a.xoff))return;o=a.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<g;t++){var v=m*e+(t>>5),b=p[(o+e)*(Bg<<5)+(i+t)<<2]?1<<31-t%32:0;y[v]|=b,r|=b}r?t=e:(a.y0++,n--,e--,o++)}a.y1=a.y0+t,a.sprite=y.slice(0,(a.y1-a.y0)*m)}}}function $g(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Zg(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Kg(){return document.createElement("canvas")}function Jg(t){return"function"==typeof t?t:function(){return t}}const Qg={archimedean:$g,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function t1(){let b=[256,256],r=Wg,i=Hg,p=Yg,y=Gg,g=Vg,m=qg,x=$g,w=Math.random,v=Ug,k=[],M=null,E=1/0;const O=Gg,S=Kg,_={};return _.start=function(){const[o,a]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(Bg<<5)/e,t.height=zg/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||Zg((b[0]>>5)*b[1]),c=k.length,u=[],h=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=O.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=g.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let f=-1,d=_.board?[{x:0,y:0},{x:o,y:a}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<E&&++f<c;){var i=h[f];i.x=o*(w()+.5)>>1,i.y=a*(w()+.5)>>1,Xg(s,i,h,f),i.hasText&&function(i,t,e){var n=t.x,r=t.y,o=Math.sqrt(b[0]*b[0]+b[1]*b[1]),a=x(b),s=w()<.5?1:-1;let l,c=-s,u,h;for(;(l=a(c+=s))&&(u=~~l[0],h=~~l[1],!(Math.min(Math.abs(u),Math.abs(h))>=o));)if(t.x=n+u,t.y=r+h,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,o=t.width>>5,e=t.x-(o<<4),a=127&e,s=32-a,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=o;t++)if((u<<s|(t<o?(u=i[e*o+t])>>>a:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var f=t.sprite,d=t.width>>5,p=b[0]>>5,y=t.x-(d<<4),g=127&y,m=32-g,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(y>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=f[e*d+t])>>>g:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}_._tags=u,_._bounds=d,f>=c&&(_.stop(),v.call(null,"end",{cloud:_,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),_},_.stop=function(){return M&&(clearInterval(M),M=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,o=Zg((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),a=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=a[l]&&250<=a[1+l]&&250<=a[2+l]?1<<31-t%32:0;o[s]|=l}_.board=o,_.hasImage=!0}},_.timeInterval=function(t){E=null==t?1/0:t},_.words=function(t){k=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=Jg(t)},_.font=function(t){i=Jg(t)},_.fontWeight=function(t){y=Jg(t)},_.rotate=function(t){g=Jg(t)},_.spiral=function(t){x=Qg[t]||t},_.fontSize=function(t){p=Jg(t)},_.padding=function(t){m=Jg(t)},_.random=function(t){w=Jg(t)},_.on=function(t){v=Jg(t)},_}const e1={size:[500,500],fontSize:[14,28]};function n1(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const r1=f=>h=>Me(void 0,void 0,void 0,function*(){var i,o,t=Object.assign({},e1,f),e=t1(),e=(i=e,o=t,yield{set(t,e,n){return void 0!==o[t]&&(e=e?e.call(null,o[t]):o[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return Me(this,void 0,void 0,function*(){var t;return void 0!==o[e]&&(t=n?yield n.call(null,o[e]):o[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=h.map(t=>t.value),n=t,t=[Kp(e),$p(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[o,a]=t;return a===o?()=>(i+r)/2:({value:t})=>(i-r)/(a-o)*(t-o)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",n1,e.createMask),e.words([...h]),e.start());const[r,a]=t.size;var t=[{x:0,y:0},{x:r,y:a}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=K(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+a/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?a:c})),t});function i1(e){return"string"==typeof e?t=>t[e]:e}r1.props={};const o1=t=>{const{join:e,on:n,select:i=[],as:o=i,unknown:a=NaN}=t;var[t,r]=n;const s=i1(r),l=i1(t),c=Fp(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[o[n]]=r?r[e]:a,t),{}))})};o1.props={};const a1=u=>c=>Me(void 0,void 0,void 0,function*(){var{width:t,height:e}=oy(c),{data:n,encode:r={},scale:i,style:o={},layout:a={}}=u,s=K(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield r1(Object.assign(Object.assign({},l),a))(e);return[F({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:o},s),{axis:!1}))]}),s1=(a1.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),l1=(s1.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),c1=(l1.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),u1=(c1.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),h1=(u1.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),f1=(h1.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),d1=(f1.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),p1=(d1.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),y1=(p1.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),g1=(y1.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),m1=(g1.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),v1=(m1.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),b1=(v1.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),x1=(b1.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),w1=(x1.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),k1=(w1.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),M1=(k1.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),E1=(M1.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),O1=(E1.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),S1=(O1.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function _1(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function A1(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function P1(t,e,n,r,i){let o=n||0,a=r||t.length;for(var s=i||(t=>t);o<a;){var l=Math.floor((o+a)/2);s(t[l])>e?a=l:o=l+1}return o}S1.props={};const T1=Math.sqrt(50),L1=Math.sqrt(10),N1=Math.sqrt(2);function C1(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=T1?10:n>=L1?5:n>=N1?2:1)*10**t:-(10**-t)/(n>=T1?10:n>=L1?5:n>=N1?2:1)}function j1(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=T1?r*=10:n>=L1?r*=5:n>=N1&&(r*=2),e<t?-r:r}const F1=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,o=t[r],a=t[i],s;return a<o&&([o,a]=[a,o],[r,i]=[i,r]),0<(s=C1(o,a,n))?(o=Math.floor(o/s)*s,a=Math.ceil(a/s)*s,s=C1(o,a,n)):s<0&&(o=Math.ceil(o*s)/s,a=Math.floor(a*s)/s,s=C1(o,a,n)),0<s?(t[r]=Math.floor(o/s)*s,t[i]=Math.ceil(a/s)*s):s<0&&(t[r]=Math.ceil(o*s)/s,t[i]=Math.floor(a*s)/s),t},R1=36e5,I1=864e5,D1=7*I1;I1,I1;function B1(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],o=Math.floor(n),a=r?c(t,n):c(t);+a<+e;s(a,o),l(a))i.push(new Date(+a));return i},duration:t}}Tl=B1(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Go=B1(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),Yo=B1(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),Vo=B1(R1,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+R1*e)},t=>t.getHours()),Xo=B1(I1,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+I1*e)},t=>t.getDate()-1);const z1=B1(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());$o=B1(D1,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+D1*e)},t=>{var e=z1.floor(t),t=new Date(+t);return Math.floor((+t-+e)/D1)}),Zo=B1(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const W1={millisecond:Tl,second:Go,minute:Yo,hour:Vo,day:Xo,week:$o,month:z1,year:Zo};Ko=B1(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Jo=B1(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),Qo=B1(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),ta=B1(R1,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+R1*e)},t=>t.getUTCHours()),l=B1(I1,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+I1*e)},t=>t.getUTCDate()-1);const H1=B1(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());ea=B1(D1,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+D1*e)},t=>{var e=H1.floor(t),t=new Date(+t);return Math.floor((+t-+e)/D1)}),qo=B1(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const G1={millisecond:Ko,second:Jo,minute:Qo,hour:ta,day:l,week:ea,month:H1,year:qo};function Y1(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:o,millisecond:a}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:o,second:a,millisecond:s}=t?G1:W1;return{tickIntervals:[[a,1],[a,5],[a,15],[a,30],[o,1],[o,5],[o,15],[o,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=P1(i,l,0,c,s);let h;return h=u===c?[o,j1(t/o.duration,e/o.duration,n)]:u?([c,o]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):o]):[a,Math.max(j1(t,e,n),1)]}const V1=(t,e,n,r,i)=>{var o=e<t,a=o?e:t,t=o?t:e,[e,n]=Y1(a,t,n,r,i),r=[e.floor(a,n),e.ceil(t,n)];return o?r.reverse():r};function q1(t){return!bf(t)&&!vf(t)&&!Number.isNaN(t)}const U1=e=>t=>-e(-t),X1=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?U1(t):t},$1=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?U1(n):n},Z1=(t,e,n,r)=>{var i=t<0,o=X1(r,i),r=$1(r,i),i=e<t,a=i?t:e,e=[r(Math.floor(o(i?e:t))),r(Math.ceil(o(a)))];return i?e.reverse():e};function K1(e,a){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:o}=this.getOptions(),r=a(r.map(t)),o=o?(n=i,t=>{t=n(t);return uf(t)?Math.round(t):t}):i;this.output=_1(o,r,e,t)},t.prototype.invert=void 0}}var J1,_l={exports:{}},Cl={exports:{}},Q1=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},tm=Array.prototype.concat,em=Array.prototype.slice,nm=Cl.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Q1(i)?e=tm.call(e,em.call(i)):e.push(i)}return e},rm=(nm.wrap=function(t){return function(){return t(nm(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),im=Cl.exports,om=Object.hasOwnProperty,am=Object.create(null);for(J1 in rm)om.call(rm,J1)&&(am[rm[J1]]=J1);var sm=_l.exports={to:{},get:{}};function lm(t,e,n){return Math.min(Math.max(e,t),n)}function cm(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}sm.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=sm.get.hsl(t),n="hsl";break;case"hwb":e=sm.get.hwb(t),n="hwb";break;default:e=sm.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},sm.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var o=2*n;i[n]=parseInt(e.slice(o,2+o),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:om.call(rm,e[1])?((i=rm[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=lm(i[n],0,255);return i[3]=lm(i[3],0,1),i},sm.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,lm(parseFloat(t[2]),0,100),lm(parseFloat(t[3]),0,100),lm(isNaN(e)?1:e,0,1)]):null},sm.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,lm(parseFloat(t[2]),0,100),lm(parseFloat(t[3]),0,100),lm(isNaN(e)?1:e,0,1)]):null},sm.to.hex=function(){var t=im(arguments);return"#"+cm(t[0])+cm(t[1])+cm(t[2])+(t[3]<1?cm(Math.round(255*t[3])):"")},sm.to.rgb=function(){var t=im(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},sm.to.rgb.percent=function(){var t=im(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},sm.to.hsl=function(){var t=im(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},sm.to.hwb=function(){var t=im(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},sm.to.keyword=function(t){return am[t.slice(0,3)]};var um=_l.exports;function hm(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function fm(t){var e,n,r,t=um.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*hm(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*hm(n,r,e),255*hm(n,r,e-1/3),t]):null):null}const dm=(e,n)=>t=>e*(1-t)+n*t,pm=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return dm(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=fm(n),c=fm(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,o,a,s]=n;return`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(a)}, ${s})`}}},ym=(t,e)=>{const n=dm(t,e);return t=>Math.round(n(t))};function gm({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function mm(t){return"object"==typeof t?t.valueOf():t}class vm extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=mm,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(gm({map:this.map,initKey:this.initKey},t))}has(t){return super.has(gm({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class bm{constructor(t){this.options=F({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=F({},this.options,t),this.rescale(t)}rescale(t){}}const xm=Symbol("defaultUnknown");function wm(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function km(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let o=r.get(t);if(void 0===o){if(i!==xm)return i;o=e.push(t)-1,r.set(t,o)}return n[o%n.length]}function Mm(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Em extends bm{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:xm}}map(t){return 0===this.domainIndexMap.size&&wm(this.domainIndexMap,this.getDomain(),this.domainKey),km({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&wm(this.rangeIndexMap,this.getRange(),this.rangeKey),km({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Mm(e),this.rangeKey=Mm(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Em(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function Om(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=o).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/l*r+1-1/l*i);const f=h*i/l;h-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=h/d.reduce((t,e)=>t+e);var c=new vm(e.map((t,e)=>{e=d[e]*p;return[t,a?Math.floor(e):e]})),y=new vm(e.map((t,e)=>{e=d[e]*p+f;return[t,a?Math.floor(e):e]})),h=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(u-(h-h/l*i))*s;let g=a?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=g,Math.round(1e12*v)/1e12);var v=e[t];g+=y.get(v)}return{valueBandWidth:c,valueStep:y,adjustedRange:m}}class Sm extends Em{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:xm,flex:[]}}clone(){return new Sm(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return Om(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:o}=t;let a,s,l=n[0];return n=n[1]-l,a=n/Math.max(1,2*t+(e-r)),i&&(a=Math.floor(a)),l+=(n-a*(e-r))*o,s=a*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*a),{valueStep:a,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const _m=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0<n)return[o];let s=C1(o,a,n);if(0===s||!Number.isFinite(s))return[];if(0<s){o=Math.ceil(o/s),a=Math.floor(a/s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*s}else{s=-s,o=Math.ceil(o*s),a=Math.floor(a*s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/s}return i};function Am(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Pm=[1,5,2,2.5,4,3],Tm=100*Number.EPSILON;const Lm=(n,r,t=5,i=!0,o=Pm,a=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,h,f,d,p,y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<o.length;t+=1){var m=o[t],v=(h=m,f=o,d=g,p=void 0,p=Hf(f),1-Lf(f,h)/(p-1)-d+1);if(a[0]*v+a[1]+a[2]+a[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(a[0]*v+a[1]+a[2]*b+a[3]<y.score)break;var x=(r-n)/(e+1)/g/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=g*m*10**t,k=(E=r,k=w*(e-1),(E-=n)<k?1-((k-E)/2)**2/(.1*E)**2:1);if(a[0]*v+a[1]*k+a[2]*b+a[3]<y.score)break;var M=Math.floor(r/w)*g-(e-1)*g,E=Math.ceil(n/w)*g;if(M<=E){var O=E-M;for(let t=0;t<=O;t+=1){var S=(M+t)*(w/g),_=S+w*(e-1),A=w,P=function(t,e,n,r,i,o){var a=Hf(e),e=Lf(e,t);let s=0;return t=(r%o+o)%o,1-e/(a-1)-n+(s=(t<Tm||o-t<Tm)&&r<=0&&0<=i?1:s)}(m,o,g,S,_,A),T=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(_-(N=S)),c=((c=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=a[0]*P+a[1]*T+a[2]*L+ +a[3];y.score<N&&(!i||S<=n&&r<=_)&&(y.lmin=S,y.lmax=_,y.lstep=A,y.score=N)}}t+=1}e+=1}}g+=1}var t=Am(y.lmax),e=Am(y.lmin),C=Am(y.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,F=new Array(j);F[0]=Am(e);for(let t=1;t<j;t+=1)F[t]=Am(F[t-1]+C);return F};class Nm extends bm{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Lm}}map(t){return q1(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Nm(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return uf(t)&&uf(r)?n(t,r,e):[]}}const Cm=(t,e,n)=>{var[t,r]=t,[e,i]=e;let o,a;return _1(a=t<r?(o=A1(t,r),n(e,i)):(o=A1(r,t),n(i,e)),o)},jm=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,o=new Array(i),a=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)o[t]=A1(s[t],s[t+1]),a[t]=e(l[t],l[t+1]);return t=>{var e=P1(r,t,1,i)-1,n=o[e];return _1(a[e],n)(t)}},Fm=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?jm:Cm)(t,e,r?ym:n)};class Rm extends bm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:dm,tickCount:5}}map(t){return q1(t)?this.output(t):this.options.unknown}invert(t){return q1(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return F1}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return If}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:o}=this.options,n=Fm(n.map(t),r,o,i);this.output=_1(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Fm(i,r.map(t),dm);this.input=_1(e,n,i)}}class Im extends Rm{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:pm,tickMethod:_m,tickCount:5}}chooseTransforms(){return[If,If]}clone(){return new Im(this.options)}}class Dm extends Sm{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:xm,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Dm(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Bm=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class zm extends Rm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:pm,tickMethod:_m,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[If,If]:(t=.5===r?Bm:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new zm(this.options)}}class Wm extends zm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:pm,tickMethod:_m,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new Wm(this.options)}}class Hm extends bm{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return q1(t)?(t=P1(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new Hm(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Gm=(t,e,n,r=10)=>{var i=t<0,o=$1(r,i),a=X1(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=a(l),h=a(c),f=[];if(!(r%1)&&h-u<n){if(u=Math.floor(u),h=Math.ceil(h),i)for(;u<=h;u+=1){var d=o(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&f.push(p)}}else for(;u<=h;u+=1){var y=o(u);for(let t=1;t<r;t+=1){var g=y*t;if(c<g)break;l<=g&&f.push(g)}}2*f.length<n&&(f=_m(l,c,n))}else f=_m(u,h,Math.min(h-u,n)).map(o);return s?f.reverse():f};class Ym extends Rm{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:pm,tickMethod:Gm,tickCount:5}}chooseNice(){return Z1}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[X1(t,e),$1(t,e)]}clone(){return new Ym(this.options)}}class Vm extends Hm{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Lm}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=F1(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new Vm(this.options)}}function qm(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class Um extends Hm{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Lm}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=qm(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new Um(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var Xm=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,$m=/\[([^]*?)\]/gm;function Zm(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Km(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o,a=i[r];for(o in a)t[o]=a[o]}return t}function Jm(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var Qm,_a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Rl=["January","February","March","April","May","June","July","August","September","October","November","December"],Il=Zm(Rl,3),tv=Km({},{dayNamesShort:Zm(_a,3),dayNames:_a,monthNamesShort:Il,monthNames:Rl,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),ev={D:function(t){return String(t.getDate())},DD:function(t){return Jm(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Jm(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Jm(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return Jm(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Jm(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Jm(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Jm(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Jm(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Jm(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Jm(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Jm(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Jm(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Jm(Math.floor(Math.abs(t)/60),2)+":"+Jm(Math.abs(t)%60,2)}},nv={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const rv=(t,e,n,r,i)=>{var o=e<t,a=o?e:t,t=o?t:e,[e,n]=Y1(a,t,n,r,i),r=e.range(a,new Date(+t+1),n,!0);return o?r.reverse():r};function iv(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class ov extends Rm{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:rv,interpolate:dm,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return V1}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:o,utc:t}=this.options,a=t?G1:W1,s=t?iv:If;return t=>{var e=s(t),t=o||function(t,e){var{second:e,minute:n,hour:r,day:i,week:o,month:a,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":a.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,a),n=void 0;if(void 0===t&&(t=nv.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=nv[t]||t).replace($m,function(t,e){return r.push(e),"@@@"}),Km(Km({},tv),n));return(t=t.replace(Xm,function(t){return ev[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new ov(this.options)}}var av;let sv=Qm=class extends Im{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:If,tickMethod:_m,tickCount:5}}constructor(t){super(t)}clone(){return new Qm(this.options)}};sv=Qm=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([K1(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return _1(dm(0,1),A1(t,e))})],sv);let lv=av=class extends Im{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:If,tickMethod:_m,tickCount:5}}constructor(t){super(t)}clone(){return new av(this.options)}};lv=av=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([K1(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=_1(dm(0,.5),A1(e,n)),o=_1(dm(.5,1),A1(n,r));return t=>(e>r?t<n?o:i:t<n?i:o)(t)})],lv);const cv=t=>new Sm(t),uv=(cv.props={},t=>new Im(t)),hv=(uv.props={},t=>new Em(t)),fv=(hv.props={},t=>new Nm(t)),dv=(fv.props={},t=>new Dm(t)),pv=(dv.props={},t=>new ov(t)),yv=(pv.props={},t=>new Ym(t)),gv=(yv.props={},t=>new zm(t)),mv=(gv.props={},t=>new Hm(t)),vv=(mv.props={},t=>new Um(t)),bv=(vv.props={},t=>new Vm(t)),xv=(bv.props={},t=>new Wm(t)),wv=(xv.props={},t=>new sv(t)),kv=(wv.props={},Math.PI),Mv=2*kv,Ev=1e-6,Ov=Mv-Ev;function Sv(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _v(){return new Sv}function Av(t){return function(){return t}}Sv.prototype=_v.prototype={constructor:Sv,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){var o,a,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),h=s-t,f=l-e,d=h*h+f*f;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>Ev&&(Math.abs(f*c-u*h)>Ev&&i?(a=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(a),o=Math.sqrt(d),d=(a=i*Math.tan((kv-Math.acos((a+d-r)/(2*l*o)))/2))/o,r=a/l,Math.abs(d-1)>Ev&&(this._+="L"+(t+d*h)+","+(e+d*f)),this._+="A"+i+","+i+",0,0,"+ +(h*s<f*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,c=e+s,u=1^o,o=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Ev||Math.abs(this._y1-c)>Ev)&&(this._+="L"+l+","+c),n&&((o=o<0?o%Mv+Mv:o)>Ov?this._+="A"+n+","+n+",0,1,"+u+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):o>Ev&&(this._+="A"+n+","+n+",0,"+ +(o>=kv)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Pv=Math.abs,Tv=Math.atan2,Lv=Math.cos,Nv=Math.max,Cv=Math.min,jv=Math.sin,Fv=Math.sqrt,Rv=1e-12,Iv=Math.PI,Dv=Iv/2,Bv=2*Iv;function zv(t){return 1<=t?Dv:t<=-1?-Dv:Math.asin(t)}function Wv(t){return t.innerRadius}function Hv(t){return t.outerRadius}function Gv(t){return t.startAngle}function Yv(t){return t.endAngle}function Vv(t){return t&&t.padAngle}function qv(t,e,n,r,i,o,a){var s=t-n,l=e-r,a=(a?o:-o)/Fv(s*s+l*l),l=a*l,a=-a*s,s=t+l,t=e+a,e=n+l,n=r+a,r=(s+e)/2,c=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,o=i-o,s=s*n-e*t,n=(h<0?-1:1)*Fv(Nv(0,o*o*f-s*s)),e=(s*h-u*n)/f,t=(-s*u-h*n)/f,d=(s*h+u*n)/f,s=(-s*u+h*n)/f,u=e-r,h=t-c,n=d-r,f=s-c;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-a,x11:e*(i/o-1),y11:t*(i/o-1)}}function Uv(){var A=Wv,P=Hv,T=Av(0),L=null,N=Gv,C=Yv,j=Vv,F=null;function e(){var t,e,n,r,i,o,a,s,l,c,u,h,f,d,p,y,g,m,v,b,x,w,k=+A.apply(this,arguments),M=+P.apply(this,arguments),E=N.apply(this,arguments)-Dv,O=C.apply(this,arguments)-Dv,S=Pv(O-E),_=E<O;if(F=F||(t=_v()),M<k&&(e=M,M=k,k=e),M>Rv?S>Bv-Rv?(F.moveTo(M*Lv(E),M*jv(E)),F.arc(0,0,M,E,O,!_),k>Rv&&(F.moveTo(k*Lv(O),k*jv(O)),F.arc(0,0,k,O,E,_))):(r=e=E,i=n=O,a=o=S,f=(u=j.apply(this,arguments)/2)>Rv&&(L?+L.apply(this,arguments):Fv(k*k+M*M)),w=x=s=Cv(Pv(M-k)/2,+T.apply(this,arguments)),f>Rv&&(h=zv(f/k*jv(u)),f=zv(f/M*jv(u)),(o-=2*h)>Rv?(r+=h*=_?1:-1,i-=h):(o=0,r=i=(E+O)/2),(a-=2*f)>Rv?(e+=f*=_?1:-1,n-=f):(a=0,e=n=(E+O)/2)),u=M*Lv(e),h=M*jv(e),f=k*Lv(i),E=k*jv(i),s>Rv&&(d=M*Lv(n),p=M*jv(n),y=k*Lv(r),g=k*jv(r),S<Iv)&&(O=function(t,e,n,r,i,o,a,s){var l=(s=s-o)*(n=n-t)-(a=a-i)*(r=r-e);if(!(l*l<Rv))return[t+(l=(a*(e-o)-s*(t-i))/l)*n,e+l*r]}(u,h,y,g,d,p,f,E))&&(S=u-O[0],v=h-O[1],b=d-O[0],m=p-O[1],v=1/jv((1<(S=(S*b+v*m)/(Fv(S*S+v*v)*Fv(b*b+m*m)))?0:S<-1?Iv:Math.acos(S))/2),b=Fv(O[0]*O[0]+O[1]*O[1]),x=Cv(s,(k-b)/(v-1)),w=Cv(s,(M-b)/(1+v))),a>Rv?w>Rv?(l=qv(y,g,u,h,M,w,_),c=qv(d,p,f,E,M,w,_),F.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?F.arc(l.cx,l.cy,w,Tv(l.y01,l.x01),Tv(c.y01,c.x01),!_):(F.arc(l.cx,l.cy,w,Tv(l.y01,l.x01),Tv(l.y11,l.x11),!_),F.arc(0,0,M,Tv(l.cy+l.y11,l.cx+l.x11),Tv(c.cy+c.y11,c.cx+c.x11),!_),F.arc(c.cx,c.cy,w,Tv(c.y11,c.x11),Tv(c.y01,c.x01),!_))):(F.moveTo(u,h),F.arc(0,0,M,e,n,!_)):F.moveTo(u,h),k>Rv&&o>Rv?x>Rv?(l=qv(f,E,d,p,k,-x,_),c=qv(u,h,y,g,k,-x,_),F.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?F.arc(l.cx,l.cy,x,Tv(l.y01,l.x01),Tv(c.y01,c.x01),!_):(F.arc(l.cx,l.cy,x,Tv(l.y01,l.x01),Tv(l.y11,l.x11),!_),F.arc(0,0,k,Tv(l.cy+l.y11,l.cx+l.x11),Tv(c.cy+c.y11,c.cx+c.x11),_),F.arc(c.cx,c.cy,x,Tv(c.y11,c.x11),Tv(c.y01,c.x01),!_))):F.arc(0,0,k,i,r,_):F.lineTo(f,E)):F.moveTo(0,0),F.closePath(),t)return F=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +P.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-Iv/2;return[Lv(e)*t,jv(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Av(+t),e):A},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Av(+t),e):P},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Av(+t),e):T},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:Av(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:Av(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:Av(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:Av(+t),e):j},e.context=function(t){return arguments.length?(F=null==t?null:t,e):F},e}function Xv(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function $v(t){this._context=t}function Zv(t){return new $v(t)}function Kv(t){return t[0]}function Jv(t){return t[1]}function Qv(a,s){var l=Av(!0),c=null,u=Zv,h=null;function e(t){var e,n,r,i=(t=Xv(t)).length,o=!1;for(null==c&&(h=u(r=_v())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===o&&((o=!o)?h.lineStart():h.lineEnd()),o&&h.point(+a(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return a="function"==typeof a?a:void 0===a?Kv:Av(a),s="function"==typeof s?s:void 0===s?Jv:Av(s),e.x=function(t){return arguments.length?(a="function"==typeof t?t:Av(+t),e):a},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Av(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:Av(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(h=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=h=null:h=u(c=t),e):c},e}function tb(u,h,f){var d=null,p=Av(!0),y=null,g=Zv,m=null;function e(t){var e,n,r,i,o,a=(t=Xv(t)).length,s=!1,l=new Array(a),c=new Array(a);for(null==y&&(m=g(o=_v())),e=0;e<=a;++e){if(!(e<a&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+h(i,e,t),m.point(d?+d(i,e,t):l[e],f?+f(i,e,t):c[e]))}if(o)return m=null,o+""||null}function t(){return Qv().defined(p).curve(g).context(y)}return u="function"==typeof u?u:void 0===u?Kv:Av(+u),h="function"==typeof h?h:Av(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?Jv:Av(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Av(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Av(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Av(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:Av(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:Av(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:Av(+t),e):f},e.lineX0=e.lineY0=function(){return t().x(u).y(h)},e.lineY1=function(){return t().x(u).y(f)},e.lineX1=function(){return t().x(d).y(h)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:Av(!!t),e):p},e.curve=function(t){return arguments.length?(g=t,null!=y&&(m=g(y)),e):g},e.context=function(t){return arguments.length?(null==t?y=m=null:m=g(y=t),e):y},e}$v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var eb=rb(Zv);function nb(t){this._curve=t}function rb(e){function t(t){return new nb(e(t))}return t._curve=e,t}function ib(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(rb(t)):e()._curve},t}function ob(){}function ab(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function sb(t,e){this._context=t,this._k=(1-e)/6}function lb(t,e){this._context=t,this._k=(1-e)/6}function cb(t,e,n){var r,i,o=t._x1,a=t._y1,s=t._x2,l=t._y2;t._l01_a>Rv&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),o=(o*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,a=(a*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>Rv&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(o,a,s,l,t._x2,t._y2)}function ub(t,e){this._context=t,this._alpha=e}nb.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},sb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ab(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ab(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new sb(t,n)}return t.tension=function(t){return e(+t)},t}(0),lb.prototype={areaStart:ob,areaEnd:ob,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ab(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new lb(t,n)}return t.tension=function(t){return e(+t)},t}(0),ub.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:cb(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var hb=function e(n){function t(t){return n?new ub(t,n):new sb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function fb(t,e){this._context=t,this._alpha=e}fb.prototype={areaStart:ob,areaEnd:ob,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:cb(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var db=function e(n){function t(t){return n?new fb(t,n):new lb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function pb(t){this._context=t}function yb(t){return new pb(t)}function gb(t,e){this._context=t,this._t=e}function mb(t){return new gb(t,.5)}function vb(t){return new gb(t,0)}function bb(t){return new gb(t,1)}function Q(t){return new xb([t],null,t,t.ownerDocument)}pb.prototype={areaStart:ob,areaEnd:ob,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},gb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class xb{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new xb(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new xb(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new xb([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],o=e(r,t);o.__data__=r,null!==i&&(o.__fromElements__=i),this._parent.appendChild(o),n.push(o)}return new xb(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var a=this._elements[t],s=e(a.__data__,t);a.appendChild(s),n.push(s)}return new xb(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new xb([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],o=[],a=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),h=jp(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var f=e[t],d=n(f,t),p=r(f,t);if(c.has(d)){var y=c.get(d);y.__data__=f,y.__facet__=!1,o.push(y),a.delete(y),c.delete(d)}else if(u.has(d)){y=u.get(d);y.__data__=f,y.__facet__=!0,o.push(y),u.delete(d)}else if(h.has(d)){const jp=h.get(d);s.push([f,jp]);for(const g of jp)a.delete(g);h.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],l.add(d),a.delete(d)):i.push(f)}var t=[new xb([],i,this._parent,this._document),new xb(o,null,this._parent,this._document),new xb(a,null,this._parent,this._document),new xb([],s,this._parent,this._document),new xb(l,null,this._parent,this._document)];return new xb(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new xb(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=xb.registry[t])?new e:Z0("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new xb([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function wb([t,e],[n,r]){return[t-n,e-r]}function kb([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Mb([t,e]){return Math.atan2(e,t)}function Eb([t,e]){return Mb([t,e])+Math.PI/2}function Ob(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);var t=n-e,s=i-r;return[e,r,t,s]}function Sb([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function _b(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Ab(t){return t.map((t,e)=>e)}function R(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function Pb(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*kb(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function Tb(t,e,n,r,i){e=Mb(wb(r,e))+Math.PI,n=Mb(wb(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function Lb(e,t,n,r="y",i="between"){const o="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Ab(o),[r,a]=Pp(t,t=>o[t]);const s=new Im({domain:[r,a],range:[0,100]}),l=t=>s.map(o[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function Nb(t){var[t,e,n,r]=t;return[r,t,e,n]}function Cb(t,e,n){var[e,r,,i]=a0(t)?Nb(e):e,[n,o]=n,t=t.getCenter(),a=Eb(wb(e,t)),r=Eb(wb(r,t)),n=r===a&&n!==o?r+2*Math.PI:r;return{startAngle:a,endAngle:0<=n-a?n:2*Math.PI+n,innerRadius:kb(i,t),outerRadius:kb(e,t)}}function jb(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function Fb(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}xb.registry={g:La,rect:Va,circle:ka,path:Ba,text:Ua,ellipse:Pa,image:Fa,line:Ia,polygon:Wa,polyline:Ga,html:Ca};const Rb=T=>{const{colorAttribute:L,first:N=!0,last:C=!0}=T,j=K(T,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),i=L,o=r[i],a=K(r,["symbol"==typeof i?i:i+""]),r=a.lineWidth||1,{stroke:i,radius:s=0,radiusTopLeft:l=s,radiusTopRight:c=s,radiusBottomRight:u=s,radiusBottomLeft:h=s,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:y=f,innerRadiusBottomLeft:f=f,inset:g=0,insetLeft:m=g,insetRight:v=g,insetBottom:b=g,insetTop:x=g,lineWidth:r="stroke"===L||i?r:0}=j,w=K(j,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:o=o,opacity:k}=e;if(!s0(n)&&!c0(n)){var[M,,E]=!!a0(n)?Nb(t):t;const[P,_]=M;var[E,M]=wb(E,M),O=(0<E?P:P+E)+m,S=(0<M?_:_+M)+x,E=Math.abs(E)-(m+v),m=Math.abs(M)-(x+b);return Q(new Va({})).call(R,a).style("lineWidth",r).style("x",O).style("y",S).style("width",E).style("height",m).style("stroke",void 0===i?o:i).style(Fb(T),k).style(L,o).style("radius",[N?l:d,N?c:p,C?u:y,C?h:f]).call(R,w).node()}const{y:_,y1:A}=e;v=n.getCenter(),M=Cb(n,t,[_,A]),x=Uv().cornerRadius(s).padAngle(g*Math.PI/180);return Q(new Ba({})).call(R,a).style("path",x(M)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",o||i).style("lineWidth",r).style(L,o).style(Fb(T),k).call(R,j).node()}},Ib=(Rb.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Rb(Object.assign({colorAttribute:"fill"},t))),Db=(Ib.props=Object.assign({},Rb.props),t=>Rb(Object.assign({colorAttribute:"stroke"},t)));Db.props=Object.assign({},Rb.props);const Bb=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,o]=t;if(a0(n)){const a=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,a,s,o]}const a=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,a,s,o]}}=t,l=K(t,["adjustPoints"]);return(t,e,n,r,i,...o)=>{var a=e["index"],a=i[a+1],t=s(t,a,n);return Rb(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...o)}};function zb(t,e,n){var[t,r,i,o]=t;if(a0(n)){const a=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,a,s,o]}const a=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,a,s,o]}Bb.props=Object.assign({},Rb.props);const Wb=t=>Bb(Object.assign({adjustPoints:zb},t));function Hb(t){const e="function"==typeof t?t:t.render;return class extends Ea{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Wb.props=Object.assign({},Rb.props);const Gb=Hb(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new Ba({})).style("d",e).call(R,r),Q(t).maybeAppend("line1",()=>new Ba({})).style("d",n).call(R,i)});const Yb=t=>{const{curve:u,gradient:h=!1,gradientColor:f="between",defined:d=t=>!Number.isNaN(t)&&null!=t,connectNulls:p=!1}=t,y=K(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),{stroke:i,lineWidth:o}=r,a=K(r,["stroke","lineWidth"]),{color:r=i,size:e=o,transform:i,seriesColor:o,seriesX:s,seriesY:l}=e,o=h&&o?Lb(o,s,l,h,f):r,s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),o&&{stroke:o}),e&&{lineWidth:e}),i&&{transform:i}),y),l=s0(n)?[...t,t[0]]:t;const c=Qv().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>d(t)&&d(e)).curve(u);var[r,a]=function(t,e){var n=[],r=[];let i=!1,o=null;for(const a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(l,d),o=J(y,"connect"),e=!!a.length;return(!e||p&&!Object.keys(o).length?Q(new Ba({})).style("d",c(r)).call(R,s):e&&!p?Q(new Ba({})).style("d",c(l)).call(R,s):Q(new Gb).style("style1",Object.assign(Object.assign({},s),o)).style("style2",s).style("d1",a.map(c).join(",")).style("d2",c(l))).node()}},Vb=(Yb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Yb(Object.assign({curve:Zv},t))),qb=(Vb.props=Object.assign({},Yb.props),t=>{var{alpha:e=.5}=t,t=K(t,["alpha"]);return Yb(Object.assign({curve:hb.alpha(e)},t))}),Ub=(qb.props=Object.assign({},Yb.props),t=>Yb(Object.assign({curve:bb},t))),Xb=(Ub.props=Object.assign({},Yb.props),t=>Yb(Object.assign({curve:vb},t))),$b=(Xb.props=Object.assign({},Yb.props),t=>Yb(Object.assign({curve:mb},t)));function Zb(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}$b.props=Object.assign({},Yb.props);var Kb=Object.freeze({__proto__:null,point:Zb,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const c=f=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=f,y=K(f,["colorAttribute","symbol","mode"]),g=Kb[t]||Zb;return(t,e,n,r)=>{var i,{mark:o,shape:a,defaultShape:s}=e,r=jb(r,o,a,s),o=d,a=r[o],s=r["lineWidth"],r=K(r,["symbol"==typeof o?o:o+"","lineWidth"]),o=y.stroke?s||1:s,{color:s=a,transform:a,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,h],[u,i]]=c,[(c+u)/2,(h+i)/2]),h=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||h0(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||y.r||r.r;return Q(new Ba).call(R,r).style("d",g(c,u,h)).style("lineWidth",o).style("transform",a).style("stroke",s).style(Fb(f),l).style(d,s).call(R,y).node()}},Jb=(c.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>c(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Qb=(Jb.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),t2=(Qb.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),e2=(t2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),n2=(e2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),r2=(n2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),i2=(r2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),o2=(i2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),a2=(o2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),s2=(a2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),l2=(s2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),c2=(l2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),u2=(c2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),h2=(u2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),f2=(h2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"point"},t))),d2=(f2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"square"},t))),p2=(d2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),y2=(p2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),g2=(y2.props=Object.assign({},c.props),t=>c(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),m2=(g2.props=Object.assign({},c.props),t=>{const{arrowSize:h="40%"}=t,f=K(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:o,color:a,transform:s}=e,r=jb(r,e,i,o),{fill:e,stroke:i}=r,o=K(r,["fill","stroke"]),[r,t]=t,[l,c]=Pb(r,t,{arrowSize:h}),u=_v();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),Q(new Ba).call(R,o).style("d",u.toString()).style("stroke",a||i).style("fill",a||e).style("transform",s).call(R,f).node()}});m2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};i(x2,v2=Ea),x2.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([Number(e)||0,Number(t)||0]),this.update(),this.bindEvents(this.attributes,this)},x2.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},x2.prototype.clear=function(){this.removeChildren()},x2.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},x2.prototype.bindEvents=function(t,e){};var v2,b2,Hl=x2;function x2(t){return v2.call(this,t)||this}function w2(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,w2)}function k2(){this.constructor=b2}b2=w2,Ol=Error,k2.prototype=Ol.prototype,b2.prototype=new k2,w2.buildMessage=function(t,e){var o={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],o[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var M2;function E2(t,e,n,r){var i,o,a=O2(r=void 0===r?"...":r,n),s=lf(t)?t:mf(t),l=e,c=[];if(O2(t,n)<=e)return t;for(;;){if(i=s.substr(0,16),l<(o=O2(i,n))+a)break;if(c.push(i),l-=o,!(s=s.substr(16)))return c.join("")}for(;;){if(i=s.substr(0,1),l<(o=O2(i,n))+a)break;if(c.push(i),l-=o,!(s=s.substr(1)))return c.join("")}return"".concat(c.join("")).concat(r)}var O2=Pf(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(M2=M2||document.createElement("canvas").getContext("2d")).font=[o,e,i,"".concat(n,"px"),r].join(" "),M2.measureText(lf(t)?t:"").width},function(t,e){return Ee([t],I(gf(e=void 0===e?{}:e)),!1).join("")});function S2(t,e){return"string"==typeof t?O2(t,e):t}var _2=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function A2(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function P2(t,e){e=Math.pow(10,e);return~~(t*e)/e}function T2(t){return t.toLocaleString()}function L2(t,e){return void 0===e&&(e=0),Math.abs(t)<1e3?String(t):"".concat(P2(t/1e3,e).toLocaleString(),"K")}var N2=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},C2=function(t,e,n){return 0<t&&Number.isFinite(t)?e:n},j2=function(t,e){return t*e},F2=Math.PI/180;function R2(t){if(uf(t))return[t,t,t,t];if(tf(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var I2=["default","active","selected","disabled","inactive"],D2={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function B2(t){var e;return t?null==t?void 0:t.default:(e=Af(t)||{},I2.forEach(function(t){t in e&&delete e[t]}),e)}function z2(t,e,n){return void 0===n&&(n=!1),e?(e=Cf(t,e),n?F({},B2(t),e):e):B2(t)||{}}function W2(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}G2.prototype.selectAll=function(t){return new G2("string"==typeof t?this.__parent__.querySelectorAll(t):t,null,this.__elements__[0],this.__document__)},G2.prototype.select=function(t){t="string"==typeof t?this.__parent__.querySelectorAll(t)[0]||null:t;return new G2([t],null,t,this.__document__)},G2.prototype.append=function(n){var r=this,t="function"==typeof n?n:function(){return t=n,r.__document__?r.__document__.createElement(t,{}):(e=G2.registry[t])?new e:new Error("Unknown node type: ".concat(t));var t,e},e=[];if(null!==this.__data__){for(var i=0;i<this.__data__.length;i++)(s=t(o=this.__data__[i],i)).__data__=o,this.__parent__.appendChild(s),e.push(s);return new G2(e,null,this.__parent__,this.__document__)}for(i=0;i<this.__elements__.length;i++){var o,a=this.__elements__[i],s=t(o=a.__data__,i);a.appendChild(s),e.push(s)}return new G2(e,null,e[0],this.__document__)},G2.prototype.data=function(t,n){void 0===n&&(n=function(t){return t});for(var e=[],r=[],i=new Map(this.__elements__.map(function(t,e){return[n(t.__data__,e),t]})),o=0;o<t.length;o++){var a,s=t[o],l=n(s,o);i.has(l)?((a=i.get(l)).__data__=s,r.push(a),i.delete(l)):e.push(s)}var c=Array.from(i.values()),c=[new G2([],e,this.__parent__,this.__document__),new G2(r,null,this.__parent__,this.__document__),new G2(c,null,this.__parent__,this.__document__)];return new G2(this.__elements__,null,this.__parent__,this.__document__,c)},G2.prototype.merge=function(t){return new G2(Ee(Ee([],I(this.__elements__),!1),I(t.__elements__),!1),null,this.__parent__,this.__document__)},G2.prototype.join=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this.__enter__),e=e(this.__update__),n=n(this.__exit__);return e.merge(t).merge(n)},G2.prototype.remove=function(){var n=Ee([],I(this.__elements__),!1);return this.__elements__.forEach(function(t){var e;t.parentNode&&(t.parentNode.removeChild(t),e=n.indexOf(t),n.splice(e,1),null!=(e=t.parentNode)&&e.removeChild(t),t.remove())}),new G2(n,null,this.__parent__,this.__document__)},G2.prototype.each=function(t){for(var e=0;e<this.__elements__.length;e++){var n,r=this.__elements__[e];r&&(n=r.__data__,t.call(r,n,e))}return this},G2.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))}),this},G2.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))}),this},G2.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},G2.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,Ee([this.__parent__,this],I(e),!1)),this},G2.prototype.node=function(){return this.__elements__[0]},G2.prototype.nodes=function(){return this.__elements__},G2.registry={g:La,rect:Va,circle:ka,path:Ba,text:Ua,ellipse:Pa,image:Fa,line:Ia,polygon:Wa,polyline:Ga,html:Ca};var H2=G2;function G2(t,e,n,r,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null]),this.__elements__=t=void 0===t?null:t,this.__data__=e,this.__parent__=n,this.__document__=r,this.__enter__=i[0],this.__update__=i[1],this.__exit__=i[2]}function S(t){return new H2([t],null,t,t.ownerDocument)}function A(t,e){var n,r;if(e)try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=I(o.value,2),s=a[0],l=a[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function D(t,e,n){return t.querySelector(e)?S(t).select(e):S(t).append(n)}function Y2(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function V2(t){var t=t.getLocalBounds(),t=I([t.min,t.max],2),e=I(t[0],2),n=e[0],e=e[1],t=I(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function q2(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}var U2=["year","month","day","hour","minute","second"],X2=["YYYY","MM","DD","hh","mm","ss"];function $2(t){return t instanceof Date?t:new Date(t)}function Z2(t){for(var e,t=I(t,2),n=t[0],t=t[1],n=U2.indexOf(n),r=U2.indexOf(t),i="",o=n;o<=r;o+=1)i+=X2[o],o<r&&(e="-",2===o?e=" ":2<o&&(e=":"),i+=e);return i}function K2(t,e){var n={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),hh:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},r=e;return Object.keys(n).forEach(function(t){var e=n[t];r=r.replace(t,"YYYY"===t?"".concat(e):"0".concat(e).slice(-2))}),r}function J2(t,e){t=new Date(t);return{year:function(t){t.setMonth(0),t.setHours(0,0,0,0)},month:function(t){t.setDate(1),t.setHours(0,0,0,0)},day:function(t){return t.setHours(0,0,0,0)},hour:function(t){return t.setMinutes(0,0,0)},minute:function(t){return t.setSeconds(0,0)},second:function(t){return t.setMilliseconds(0)}}[e](t),K2(t,Z2(["year",e]))}function Q2(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)tx(t,e[r]);return t}var tx=function(r,i,o,a){void 0===o&&(o=0),void 0===a&&(a=5),Object.entries(i).forEach(function(t){var t=I(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?sf(t)?(sf(r[e])||(n[e]={}),o<a?tx(r[e],t,o+1,a):n[e]=i[e]):tf(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function ex(t,e,n,r,i,o){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=o&&o<=Math.max(n,r))}function nx(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function rx(t,e){var t=I(t,2),n=t[0],t=t[1],e=I(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function ix(o){return void 0===o&&(o=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},o))})}}var ox=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function ax(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}Ll=ax;function sx(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function lx(t,e,n){return[["M",t-n,e],["L",t+n,e]]}Qs=lx;function cx(t){n="default",ef(e=t)&&e instanceof Image?n="image":Jh(e)?n="symbol":lf(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}i(hx,ux=Hl),hx.prototype.render=function(t,e){t.x,t.y;var r=t.symbol,n=t.size,i=void 0===n?16:n,o=K(t,["x","y","symbol","size"]),a=cx(r);a?D(e,".".concat(a,"-marker"),a).attr("className","marker ".concat(a,"-marker")).call(function(t){var e,n;"image"===a?(e=2*i,t.style("img",r).style("width",e).style("height",e).style("x",-i).style("y",-i)):(e=i/2,n=Jh(r)?r:hx.getSymbol(r),t.style("path",null==n?void 0:n(0,0,e)).call(A,o))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},hx.MARKER_SYMBOL_MAP=new Map,hx.registerSymbol=function(t,e){hx.MARKER_SYMBOL_MAP.set(t,e)},hx.getSymbol=function(t){return hx.MARKER_SYMBOL_MAP.get(t)};var ux,P=hx;function hx(){return null!==ux&&ux.apply(this,arguments)||this}P.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),P.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),P.registerSymbol("line",sx),P.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),P.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),P.registerSymbol("circle",ax),P.registerSymbol("point",Ll),P.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),P.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),P.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),P.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),P.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),P.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),P.registerSymbol("line",sx),P.registerSymbol("dot",lx),P.registerSymbol("dash",Qs),P.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),P.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),P.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),P.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),P.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});i(px,fx=Hl),px.prototype.render=function(t,e){var n,r,i=t.padding,o=t.marker,a=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,h=t.align,t=t.verticalAlign,i=I(R2(i),4),f=i[0],d=i[1],p=i[2],i=i[3],y=D(e,".tag-content","g").attr("className","tag-content").node(),g=D(y,".tag-marker",function(){return new P({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(o||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(g=g).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):g.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:g.style.y}),m=u.x,g=u.y,g=(D(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",g).style("text",Qh(a)?"":"".concat(a)).call(A,s).style("textBaseline","middle").call(function(t){a||t.remove()}),u=i,m=f,g=h||"start",s=t||"top",t=(h=y).getLocalBounds(),r=n=0,"start"===g&&(n=u),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),h.setLocalPosition([n,r]),y.getLocalBounds());D(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(y.style.zIndex||0)-1).style("x",g.min[0]-i).style("y",g.min[1]-f).style("width",null!==c?i+d+2*g.halfExtents[0]:0).style("height",null!==c?f+p+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(A,c)},px.defaultOptions={type:px.tag="tag",style:{padding:4,spacing:4}};var fx,dx=px;function px(t){return fx.call(this,F({},px.defaultOptions,t))||this}var yx,gx,mx={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},vx={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},bx={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}},xx=(i(wx,yx=Hl),Object.defineProperty(wx.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(wx.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,E2(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(wx.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=bf(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(wx.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),wx.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=F({},Cf(mx,[n,e]),z2(Cf(vx,[t,e]),r),z2(Cf(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in bx[e]&&(i[t]=Cf(bx,[e,t]))}),Object.keys(bx.strict[e]).forEach(function(t){i[t]=Cf(bx,["strict",e,t])}),F(i,z2(Cf(this.attributes,e),"disabled"))),i},wx.prototype.render=function(t,e){var n=t.padding,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),I(R2(n),4)),i=(n[0],n[1]),o=(n[2],n[3]),a=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=D(e,".marker",function(){return new P({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(O(O({},s),{symbol:r,x:o+l/2,y:a/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=D(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:o).style("y",a/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(A,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");D(e,".background","rect").attr("className","background").style("zIndex",-1).call(A,c).style("height",a).style("width",o+(l?l+t:0)+2*n.halfExtents[0]+i).node()},wx.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},wx.prototype.setState=function(t){this.update({state:t})},wx.prototype.hide=function(){this.style.visibility="hidden"},wx.prototype.show=function(){this.style.visibility="visible"},wx.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},wx.defaultOptions={type:wx.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},wx);function wx(t){var n=yx.call(this,Q2({},wx.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function kx(t){return gx.call(this,F({},kx.defaultOptions,t))||this}i(kx,gx=Hl),kx.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=I(R2(i),3),i=t[0],h=t[1],t=t[2],f=D(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,y=(f.node().removeChildren(),this),o=0;o<s.length;o++)!function(t){var e,n=s[t],r=new dx({className:"breadcrumb-item",style:O(O({x:d,y:p,text:Qh(n.text)?n.id:n.text,textStyle:l},jf(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(f.append(function(){return r}),r.getLocalBounds()),o=2*i.halfExtents[0],i=2*i.halfExtents[1],o=(d+=o,Qh(c)||c-h<d&&(r.attr({x:0,y:p+i}),d=o,p+=i),y.bindInnerEvents(r,n),u||{}),n=o.spacing,n=void 0===n?0:n,a=o.text,a=void 0===a?"/":a,o=o.style;t!==s.length-1&&(e=new Ua({className:"".concat(kx.tag,"-separator"),id:"".concat(kx.tag,"-separator-").concat(t),style:O(O(O(O({},D2),{x:d+n,y:p+i/2}),o),{text:a,textAlign:"end",textBaseline:"middle"})}),f.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(o)},kx.prototype.update=function(t){this.attr(F({},this.attributes,t)),this.render(this.attributes,this)},kx.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},kx.defaultOptions={type:kx.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:O(O({},D2),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(Ox,Mx=N),Ox.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Ox.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Ox.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},Ox.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new Ba({name:"line",style:t}))})},Ox.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new Ba({name:"area",style:t}))})};var Mx,Ex=Ox;function Ox(t){var e=this,n=t.style,t=K(t,["style"]);return(e=Mx.call(this,F({},{type:"lines",style:{width:0,height:0}},O({style:n},t)))||this).linesGroup=new La({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new La({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}i(Ax,Sx=N),Ax.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new Va({name:"column",style:t}))})})},Ax.prototype.update=function(t){this.attr(F({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Ax.prototype.clear=function(){this.removeChildren()};var Sx,_x=Ax;function Ax(t){var e=this,n=t.style,t=K(t,["style"]);return(e=Sx.call(this,F({},{type:"column",style:{width:0,height:0}},O({style:n},t)))||this).columnsGroup=new La({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Px(t){return 0===t.length?[0,0]:[of(yf(t,function(t){return of(t)||0})),rf(pf(t,function(t){return rf(t)||0}))]}function Tx(t){for(var e=Af(t),n=e[0].length,t=I([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],o=0;o<e.length;o+=1)for(var a=e[o],s=0;s<n;s+=1)0<=a[s]?(a[s]+=r[s],r[s]=a[s]):(a[s]+=i[s],i[s]=a[s]);return e}function Lx(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,o=t.length;i<o;i+=2)r.push([t[i],t[i+1]]);for(var a,s,l,c=function(t,e,n,r){var i,o=[],a=!!r;if(a){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=de([0,0],c,x=t[s]),u=pe([0,0],u,x)}for(var s=0,h=t.length;s<h;s+=1){var f,d,p,y,g,m,v,b,x=t[s];0!==s||n?s!==h-1||n?(f=t[[s?s-1:h-1,s-1][n?0:1]],d=t[n?(s+1)%h:s+1],m=ye(m=xe([0,0],d,f),m,e),0!==(g=(p=ge(x,f))+(y=ge(x,d)))&&(p/=g,y/=g),g=ye([0,0],m,-p),m=ye([0,0],m,y),v=fe([0,0],x,g),b=de([0,0],b=fe([0,0],x,m),pe([0,0],d,x)),b=pe([0,0],b,de([0,0],d,x)),v=de([0,0],v=fe([0,0],x,g=ye([0,0],g=xe([0,0],b,x),-p/y)),pe([0,0],f,x)),v=pe([0,0],v,de([0,0],f,x)),b=fe([0,0],x,m=ye([0,0],m=xe([0,0],x,v),y/p)),a&&(v=de([0,0],v=pe([0,0],v,c),u),b=de([0,0],b=pe([0,0],b,c),u)),o.push(i),o.push(v),i=b):(v=x,o.push(i),o.push(v)):i=x}return n&&o.push(o.shift()),o}(r,.4,e,n),u=r.length,h=[],i=0;i<u-1;i+=1)a=c[2*i],s=c[2*i+1],h.push(["C",a[0],a[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(a=c[u],s=c[u+1],h.push(["C",a[0],a[1],s[0],s[1],(l=r[0])[0],l[1]])),h}function Nx(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return Ee([e===n?"M":"L"],I(t),!1)});return e?t.reverse():t}function Cx(t,e){if(void 0===e&&(e=!1),t.length<=2)return Nx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];Bf(o,n.slice(-2))||n.push.apply(n,Ee([],I(o),!1))}var a=Lx(n,!1);return e?a.unshift(Ee(["M"],I(t[r-1]),!1)):a.unshift(Ee(["M"],I(t[0]),!1)),a}function jx(t,e,n){t=Af(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(Dx,Fx=Hl),Object.defineProperty(Dx.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Af(t),uf(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Dx.prototype,"data",{get:function(){return this.attributes.isStack?Tx(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Dx.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Dx.prototype,"baseline",{get:function(){var t=this.scales.y,e=I(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Dx.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Dx.prototype,"linesCfg",{get:function(){var t,n,r,i,o,e,a,s,l,c=this,u=this.attributes,h=u.areaStyle,f=u.isStack,d=u.lineStyle,p=u.smooth,u=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,n=(e={type:"line",x:e,y:t}).x,r=e.y,i=(e=I(r.getOptions().range||[0,0],2))[0],o=e[1],i<o&&(e=I([i,o],2),o=e[0],i=e[1]),t=y.map(function(t){return t.map(function(t,e){return[n.map(e),cf(r.map(t),o,i)]})}),e=[],h&&(y=this.baseline,e=f?(p?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=t[i],s=Cx(a),l=void 0,l=0===i?jx(s,e,n):(o=Cx(t[i-1],!0),a=a[0],o[0][0]="L",Ee(Ee(Ee([],I(s),!1),I(o),!1),[Ee(["M"],I(a),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=Nx(t[i]),s=void 0,s=0===i?jx(a,e,n):((o=Nx(t[i-1],!0))[0][0]="L",Ee(Ee(Ee([],I(a),!1),I(o),!1),[["Z"]],!1));r.push(s)}return r})(t,u,y):(a=p,s=u,l=y,t.map(function(t){return jx((a?Cx:Nx)(t),s,l)}))),{lines:t.map(function(t,e){return O({stroke:c.getColor(e),path:(p?Cx:Nx)(t)},d)}),areas:e.map(function(t,e){return O({path:t,fill:c.getColor(e)},h)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Dx.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,o=t.isStack,a=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=Tx(s));var e=this.createScales(s),l=e.x,c=e.y,e=I(Px(s),2),n=e[0],e=e[1],u=new Im({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.getBandWidth(),f=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return O(O({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:h,height:u.map(f[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Dx.prototype.render=function(t,e){this.containerShape=D(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=D(e,".".concat(r),function(){return new("line"===n?Ex:_x)({className:r,style:i})}).call(A,i).node()},Dx.prototype.update=function(t){this.attr(F({},this.attributes,t)),this.render(this.attributes,this)},Dx.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Dx.prototype.getColor=function(t){var e=this.attributes.color;return tf(e)?e[t%e.length]:Jh(e)?e.call(null,t):e},Dx.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,o=e.nice,o=void 0===o||o,a=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,c=I(Px(t),2),u=c[0],c=c[1];return{type:n,x:"line"===n?new Im({domain:[0,t[0].length-1],range:[0,l]}):new Sm({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new Im({domain:[null!=a?a:u,null!=e?e:c],range:[s,0],nice:o})}},Dx.tag="sparkline",Dx.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var Fx,Rx,Ix=Dx;function Dx(t){return Fx.call(this,F({},Dx.defaultOptions,t))||this}function Bx(){return null!==Rx&&Rx.apply(this,arguments)||this}function zx(e,n){return i(t,r=Ea),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(F({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,Q2({},{style:n},t))||this;return t.descriptor=e,t}var r}i(Bx,Rx=Ea);var Wx=zx({render:function(t,e){function n(t,e,n,r,i){D(h,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",h.style.stroke).style("strokeOpacity",h.style.strokeOpacity).style("lineWidth",h.style.lineWidth)}var r=t.size,i=t.radius,o=t.stroke,a=t.fill,s=t.lineWidth,l=t.orient,c=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,u=2.4*r,h=D(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-u/2).style("width",r).style("height",u).style("fill",a||"#fff").style("fillOpacity",c||1).style("stroke",o||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),a=1/3*r,c=2/3*r,o=.25*u,s=.75*u;n(0,a,o,a,s),n(0,c,o,c,s),h.setOrigin(r/2,u/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});i(qx,Hx=Hl),qx.prototype.render=function(t,e){var n,r,i,o=t.iconCfg,t=t.textCfg;i=e,o=((n=o)||{}).type,r="handle-icon ".concat(o,"-handle"),S(i).selectAll(".handle-icon").data(o?[o]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new P({className:r,name:"icon",style:n}):new Wx({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),D(e,".".concat(o="handle-text"),"text").attr("className",o).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(A,i)};var Hx,Gx,Yx,Vx=qx;function qx(){return null!==Hx&&Hx.apply(this,arguments)||this}function Ux(t){var o=Gx.call(this,F({},Ux.defaultOptions,t))||this;return o.onSelectionMouseenter=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onSelectionMouseleave=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onDragStart=function(i){return function(t){t.stopPropagation(),o.target=i,o.prevPos=o.getOrientVal(W2(t));var t=o.availableSpace,e=t.x,t=t.y,n=o.attributes,r=n.x,n=n.y;o.selectionStartPos=o.getRatio(o.prevPos-o.getOrientVal([e,t])-o.getOrientVal([r,n])),o.selectionWidth=0,o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd)}},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(W2(t)),e=t-o.prevPos;if(e){var n=o.getRatio(e);switch(o.target){case"start":o.setValuesOffset(n);break;case"end":o.setValuesOffset(0,n);break;case"selection":o.setValuesOffset(n,n);break;case"background":o.selectionWidth+=n,o.setValues([o.selectionStartPos,o.selectionStartPos+o.selectionWidth].sort())}o.prevPos=t}},o.onDragEnd=function(){o.removeEventListener("mousemove",o.onDragging),o.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchend",o.onDragEnd)},o.onValueChanged=function(t){t=new ia("valueChanged",{detail:{oldValue:t,value:o.getValues()}});o.dispatchEvent(t)},o.selectionStartPos=0,o.selectionWidth=0,o.prevPos=0,o.target="",o}function Xx(t){var a=Yx.call(this,F({},Xx.defaultOptions,t))||this;return a.onValueChanged=function(t){var e=a.style.value;t!==e&&(e=new ia("scroll",t={detail:{oldValue:t,value:e}}),a.dispatchEvent(e),e=new ia("valueChanged",t),a.dispatchEvent(e))},a.onTrackClick=function(t){var e=a.attributes.thumbLen,n=I(a.getLocalPosition(),2),r=n[0],n=n[1],i=I(a.padding,4),o=i[0],i=i[3],r=a.getOrientVal([r+i,n+o]),i=a.getOrientVal(W2(t))-e/2,n=a.valueOffset(i-r,!0);a.setValue(n)},a.onThumbMouseenter=function(){a.thumbShape.attr(a.getStyle("thumbStyle","active"))},a.onTrackMouseenter=function(){a.trackShape.attr(a.getStyle("trackStyle","active"))},a.onThumbMouseleave=function(){a.thumbShape.attr(a.getStyle("thumbStyle"))},a.onTrackMouseleave=function(){a.trackShape.attr(a.getStyle("trackStyle"))},a.onDragStart=function(t){t.stopPropagation(),a.prevPos=a.getOrientVal(W2(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchmove",a.onDragging),document.addEventListener("touchcancel",a.onDragEnd)},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(W2(t)),e=t-a.prevPos;a.setOffset(e),a.prevPos=t},a.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("touchcancel",a.onDragEnd)},a}i(Ux,Gx=Hl),Object.defineProperty(Ux.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Ux.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(Ux.prototype,"backgroundShapeCfg",{get:function(){return O(O({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(Ux.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=K(t,["padding"]),e=I(R2(e),4),n=e[0],r=e[1],i=e[2],e=e[3],o=this.availableSpace,a=o.width,o=o.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return O(O({x:s/2+e,y:s/2+n},t),{zIndex:0,width:a-s-e-r,height:o-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(Ux.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=I(R2(e),4),r=e[0],i=e[1],o=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Ux.prototype.getValues=function(){return this.values},Ux.prototype.setValues=function(t){this.values=t,this.update({values:t})},Ux.prototype.getNames=function(){return this.names},Ux.prototype.setNames=function(t){this.names=t},Ux.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return D(o,".".concat(t),function(){return new Vx({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=D(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(A,this.availableSpace).call(A,z2(i)).node(),o=(D(this.backgroundShape=e,".slider-sparkline",function(){return new Ix({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),D(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=D(o,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(A,this.calcMask()).call(A,z2(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},Ux.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,o=I(this.getValues(),2),a=o[0],o=o[1],t=I(t||[a,o],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=I([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?a===i&&o===t?[i,t]:[i,l+i]:r<t?o===r&&a===s?[s,r]:[r-l,r]:[P2(s,e),P2(t,e)]},Ux.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):z2(Cf(this.attributes,t),e,!0)},Ux.prototype.calcMask=function(t){var t=I(this.getSafetyValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},Ux.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=I(this.getSafetyValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},Ux.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,o=this.getHandleCfg(t),a=o.spacing,s=o.formatter,o=o.textStyle,l=this.getHandleSize(t),c=this.getSafetyValues(),u=this.availableSpace,h=u.width,u=u.height,f=this.calcMask(),d=f.x,p=f.y,y=f.width,f=f.height,r=I("start"===t?[r[0],c[0]]:[r[1],c[1]],2),c=s(r[0],r[1]),s=new Ua({style:O(O({},o),{text:c})}),r=Y2(s),o=r.width,r=r.height,s=(s.destroy(),0),g=0,l=l/2,m="center";return"horizontal"===i?(e=(i=a+l)+o/2,m="start"===t?(s=0<(n=d-i-o)?-e:e,0<n?"end":"start"):(s=(n=o<h-d-y-i)?e:-e,n?"start":"end")):(o=a+l,g="start"===t?r<p-l?-o:o:r<u-p-f-l?o:-o),{x:s,y:g,text:c,textAlign:m}},Ux.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return O(O({},e),this.calcHandleText(t))},Ux.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,o=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",O(O({},r),{cursor:o,size:t,symbol:i})):(e="default",O(O({},r),{cursor:o,size:t}));return O({orient:n,type:e},i)},Ux.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:O(O({},this.getHandleTextShapeCfg(t)),i)}},Ux.prototype.getHandleCfg=function(t){var e=Cf(this.attributes,"handle"),n=e.start,r=e.end,e=K(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),F({},e,i)},Ux.prototype.getHandleSize=function(t){var e,t=this.getHandleCfg(t).size;return t||(e=(t=this.attributes).width,t=t.height,Math.floor((this.getOrientVal([t,e])+4)/2.4))},Ux.prototype.getOrientVal=function(t){var t=I(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Ux.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=I(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},Ux.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Ux.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},Ux.defaultOptions={type:Ux.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},i(Xx,Yx=Hl),Object.defineProperty(Xx.prototype,"padding",{get:function(){return R2(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=I(this.padding,4),r=n[0],i=n[1],o=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=Cf(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),Xx.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,o=t.thumbStyle,a=t.value,s=t.thumbLen,t=t.orient,e=D(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(A,z2(i)).node(),n=this.valueOffset(a||0),r=this.availableSpace;this.thumbShape=D(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(A,z2(o)).node(),this.trackShape=e},Xx.prototype.getValue=function(){return this.style.value},Xx.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:cf(t,r,e)}),this.onValueChanged(n)},Xx.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},Xx.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*cf(t,i,n)},Xx.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),z2(Cf(this.attributes,t),e)},Xx.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},Xx.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Xx.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},Xx.defaultOptions={type:Xx.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};Object.defineProperty(Zx.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Zx.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Zx.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Zx.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Zx.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Zx.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Zx.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Zx.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Zx.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Zx.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Zx.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*a+l,t*r+s*a+e],[s*o-t*a+l,t*o+s*a+e],[s*o-t*i+l,t*o+s*i+e]].flat(1)},Zx.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Zx.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Zx.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var $x=Zx;function Zx(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function Kx(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=I(e=c,4))[0],r=e[1],i=e[2],e=e[3],o=(t=I(t,4))[0],a=t[1],i-=n,e-=r,s=t[2]-o,t=t[3]-a,0!=(l=i*t-s*e)&&(a=i*(i=r-a)-e*(r=n-o))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<a!=e&&l<n!=e;var e,n,r,i,o,a,s,l})}function Jx(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),o=i.min,a=i.max,i=i.halfExtents,s=o[0],l=2*i[0],i=2*i[1],o=o[1],c=a[0],a=a[1],u=0,h=0,f=s,d=o,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,u=+e.style.dx,h=+e.style.dy,"center"===p?f=(s+c)/2:"right"!==p&&"end"!==p||(f=c),"middle"===y?d=(o+a)/2:"bottom"!==y&&"baseline"!==y||(d=a)),I(n,4)),c=p[0],y=void 0===c?0:c,a=p[1],n=void 0===a?0:a,c=p[2],a=p[3];return t.set((u+=s)-(void 0===a?n:a),(h+=o)-y,u+l+n,h+i+(void 0===c?y:c)),e.setEulerAngles(r),t.rotatedPoints(r*F2,f,d)}function Qx(t,e,n){t=Jx(new $x,t,n),e=Jx(new $x,e,n);return Kx(e,[t[0],t[1],t[2],t[3]])||Kx(e,[t[0],t[1],t[4],t[5]])||Kx(e,[t[4],t[5],t[6],t[7]])||Kx(e,[t[2],t[3],t[6],t[7]])}function tw(t,e,n){return"top"===t||"bottom"===t?e:n}function ew(t,e,n){return"left"===t||"right"===t?e:n}function nw(t,e,n){return"outside"===t?e:n}var rw=function(t,e,n){return"left"===t?e:n},iw=function(t,e,n){return"right"===t?e:n},ow=function(t,e,n){return"left"===t||"top"===t||"inside"===t?e:n};function aw(t,r){var i;return Ee([],I(t.reduce(function(t,e,n){return n&&i&&Qx(i,e,r)?(t.add(i),t.add(e)):i=e,t},new Set)),!1)}var sw={style:{title:{content:"",rotate:void 0,maxLength:260},ticks:[],ticksThreshold:100,tickLine:{len:6},subTickLine:{len:4,count:0},label:{type:"text",alignTick:!0,tickPadding:2,margin:[0,0,0,0],overlapOrder:["autoRotate","autoEllipsis","autoHide"],autoRotate:!1,autoEllipsis:!1,autoHide:!1,autoHideTickLine:!0,showLast:!0,showFirst:!0,optionalAngles:[0,45,90],minLabel:0,minLength:14,maxLength:160,ellipsisStep:" "},verticalFactor:1}},lw=(F({},sw,{style:{type:"arc"}}),F({},sw,{style:{}}),{year:[["year","second"],["year","day"],["month","day"],["day","day"]],month:[["month","day"],["day","day"]],day:[["month","day"],["day","day"]],hour:[["hour","second"],["hour","minute"],["hour","hour"]],minute:[["minute","second"],["second","second"]],second:[["second","second"]]});function cw(t,r){for(var i,o=t.map(function(t,e){return[t.id,{text:t.style.text,value:t.style.tip||t.style.text,idx:e}]}),a=new Map(o),e=yf(o,function(t){t=I(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,n=pf(o,function(t){t=I(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,s=(n=n,e=I([$2(e=e),$2(n)],2),n=e[0],e=e[1],n.getFullYear()!==e.getFullYear()?"year":n.getMonth()!==e.getMonth()?"month":n.getDay()!==e.getDay()?"day":n.getHours()!==e.getHours()?"hour":n.getMinutes()!==e.getMinutes()?"minute":"second"),l=new Date("1970-01-01 00:00:00"),c=_2(t[0]),u=0;u<lw[s].length;u+=1){var h=lw[s][u];if(Gf(K2(l,Z2(h)),c)<r){i=h;break}i=h}return function(t,e){var n,e=a.get(e.id).idx;return 0===e?t:(e=null==(e=o[e-1])?void 0:e[1].text,t=new Date(t),n=i,J2(new Date(e),s)!==J2(t,s)&&(n=function(t,e,n,r){for(var i=[],o=I(t,2)[1],a=U2.indexOf(o),s=0;s<=a;s+=1){var l=[U2[s],o];if(Gf(K2(e,Z2(l)),r)<n){i=l;break}}return i}(i,t,r,c)),K2(t,Z2(n)))}}function uw(a,s,t){if(!(s.length<=1))for(var e=t.ellipsisStep,n=t.minLength,r=t.maxLength,i=t.margin,l=void 0===i?[]:i,c=t.labelType,u=_2(s[0]),o=S2(e,u)||1,h=S2(n,u)||1,i=S2(r,u),f=(!Qh(i)&&i!==1/0||(i=Math.max.apply(null,s.map(function(t){return t.getBBox().width}))),Date.now()),d=s.slice(),t=I(l,4),e=(t[0],t[1]),p=void 0===e?0:e,n=(t[2],t[3]),y=void 0===n?p:n,g=function(e){var t,n,r,i,o;return(d=aw(s,l)).length<1||300<Date.now()-f?{value:void 0}:(o=function(t,e){return""},n=tw(a,e-y-p,e),o="time"===c?cw(s,n):"number"===c?(n=n,r=(t=s).map(function(t,e){return{text:t.style.text,value:Number(t.style.tip||t.style.text)}}),r=Number(pf(r,function(t){t=t.text;return(null==t?void 0:t.length)||0}).value),t=_2(t[0]),i=T2(r),Gf(i,t)<=n?function(t,e){return T2(Number(t))}:(i=L2(r),Gf(i,t)<=n?function(t,e){return L2(Number(t),1)}:function(t,e){return Number(t).toExponential()})):function(t){return E2(t,e,u)},void d.forEach(function(t,e){var n=t.style.tip||t.style.text,n=(t.style.tip=n,o.call(null,n,t));t.attr("text",n)}))},m=i;h+o<m;m-=o){var v=g(m);if("object"==typeof v)return v.value}}var hw=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};function fw(t,e,n){var r=e.length;if(!(r<=1||2===r&&null!=n&&n.showFirst&&null!=n&&n.showLast)){var i,o,a,s=hw,l=2,c=e.slice(),u=e.slice(),h=Date.now(),f=Math.min.apply(null,e.map(function(t){return t.getBBox().width}))||1;for("top"!==t&&"bottom"!==t||(t=V2(e[0]).left,e=V2(e[r-1]).right,e=Math.abs(e-t)||1,l=Math.max(Math.floor(r*f/e),l)),null!=n&&n.showFirst&&(i=c.splice(0,1)[0]),null!=n&&n.showLast&&(o=c.splice(-1,1)[0],c.reverse());aw((o?Ee(Ee([o],I(u),!1),[i],!1):Ee([i],I(u),!1)).filter(function(t){return ox(t)}),null==n?void 0:n.margin).length;)if(o&&!i&&l%2==0?c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}):o&&i&&c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}),u=s(((a=c).forEach(function(t){return t.style.visibility="visible"}),a),{seq:l}),l++,200<Date.now()-h)return}}function dw(o,t,e){for(var n=e.optionalAngles,a=void 0===n?[0,45,90]:n,r=e.margin,i=function(i){if(t.forEach(function(t){return e=o,t=t,n=a[i],t.setEulerAngles(n),void(n&&(r=ow(e,-1,1),e=rw(e,"end",iw(e,"start",C2(j2(r,n),"left",N2(j2(r,n),"right")))),t.style.textAlign=e));var e,n,r}),aw(t,r).length<1)return"break"},s=0;s<a.length&&"break"!==i(s);s++);}var pw=new Map([["autoHide",{getDefault:function(){return fw},equidistance:fw,greedy:function(t,e,n){var r,i=e.length;i<=1||2===i&&null!=n&&n.showFirst&&null!=n&&n.showLast||e.slice().forEach(function(t,e){e&&r&&Qx(r,t,null==n?void 0:n.margin)?e===i-1&&null!=n&&n.showLast?r.style.visibility="hidden":t.style.visibility="hidden":r=t})}}],["autoRotate",{getDefault:function(){return dw}}],["autoEllipsis",{getDefault:function(){return uw},ellipsis:uw}]]);function yw(t,e,n){var r,t=Array.from(t||[]).map(function(t,e){return O({id:"".concat(e)},t)}),i=t.length,o=t;return"number"==typeof e&&e<i&&(r=Math.ceil(i/e),o=t.filter(function(t,e){return e%r==0||e===i-1})),n&&1!==o[o.length-1].value&&o.push({value:1,id:"append"}),o}function gw(a,s){return function(i){var t,o;a&&(t=void 0===(t=a.overlapOrder)?[]:t,o=O({labelType:a.type},jf(a,["optionalAngles","minLength","maxLength","ellipsisStep","showFirst","showLast","margin"])),t.forEach(function(t){var e,n=pw.get(t),r=a[t];n&&r&&(t=t,e=a)&&("autoRotate"!==t||Qh(e.rotate))&&(t=n.getDefault(),"function"==typeof r?t=r:"object"==typeof r?(t=n[r.type]||Rf,o=O(O({},o),r.cfg)):"string"==typeof r&&(t=n[r]||Rf),t(s,i,o))}))}}function mw(t,n,e){e&&t.forEach(function(t,e){e=n[e];e&&(e.style.visibility=t.style.visibility)})}function vw(t,e,n,r,i,o){D(t,".axis-title","text").attr("className","axis-title").style("text",(null==o?void 0:o.content)||"").style("x",e).style("y",n).style("fill","black").style("fontSize",12).style("fontWeight","lighter").style("textAlign",r).style("textBaseline",i).style("transform","rotate(".concat((null==o?void 0:o.rotate)||0,"deg)")).style("visibility",o?"visible":"hidden").call(A,(null==o?void 0:o.style)||{})}function bw(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function xw(t,n,r,e){void 0===e&&(e=""),S(t).selectAll(".axis-".concat(e,"tick")).data(r?n:[],function(t){return t.id}).join(function(t){return t.append(function(t){return new Ia({className:"axis-".concat(e,"tick"),style:t})}).style("stroke","#416180").style("lineWidth",.5).style("strokeOpacity","sub"===e?.45:.65).style("visibility","visible").each(function(t,e){this.attr(t),bw(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),bw(this,e,n,null==r?void 0:r.style)}).style("visibility","visible")},function(t){return t.remove()})}function ww(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function kw(t,e){var n=_2(t),e=S2(e,n);t.attr("tip",null),ox(e)&&e<2*t.getBounds().halfExtents[0]&&(e=E2(t.style.text||"",e,n,"..."),t.attr("tip",t.style.text),t.attr("text",e))}function Mw(t,e,n,r,i){S(t).selectAll(".".concat(e)).data(n,function(t){return t.id}).join(function(t){return t.append("text").attr("className",e).style("fontFamily","sans-serif").style("fontSize",12).style("fontWeight","normal").call(A,i||{}).each(function(t,e){this.attr(t),kw(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),ww(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),kw(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),ww(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()})}function Ew(t,e,n){Mw(t,"axis-label",(n=void 0===n?{}:n)?e:[],n,{fill:"#000",fontWeight:"lighter"})}function Ow(t,e,n,r,i,o){D(t,".axis-".concat(e,"-arrow"),function(){return new P({})}).attr("className","axis-arrow$$ axis-".concat(e,"-arrow")).style("visibility",o?"visible":"hidden").style("symbol","axis-arrow").style("x",n).style("y",r).style("size",8).style("lineWidth",.5).style("fill","grey").style("stroke","grey").style("fillOpacity",.85).style("strokeOpacity",.85).style("transformOrigin","left").style("transform","rotate(".concat(i,"deg)")).call(A,o||{})}function Sw(t,e,n,r){var i,o,a,s;void 0===r&&(r={}),D(t,".axis-line","path").attr("className","axis-line").style("visibility",r?"visible":"hidden").style("stroke","grey").style("lineWidth",.5).style("strokeOpacity",.85).style("path",e).call(A,(null==r?void 0:r.style)||{}),n&&(r=(e=(null==r?void 0:r.arrow)||{}).start,e=e.end,n=I(n,2),i=(o=I(n[0],2))[0],o=o[1],a=(n=I(n[1],2))[0],n=n[1],s=Math.atan((n-o)/(a-i))/Math.PI*180/2,i===a?s=n<o?45:-45:o===n&&(s=a<i?0:90),Ow(t,"start",i,o,s,r),Ow(t,"end",a,n,s+90,e))}function _w(t,e,n,r){var i,o,a,s,l;return e?(o=t[0],a=e,s=(o=I(o,2))[0],o=o[1],s=(a=I(a,2))[0]-s,a=a[1]-o,i=Math.sqrt(s*s+a*a),l=r?0:1,n?"M".concat(e[0],",").concat(e[1]-i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]+i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]-i," Z"):t.reduce(function(t,e,n){return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(l,",")).concat(e[0],",").concat(e[1])},"")):""}function Aw(t,e,n,r,i){return"circle"===e?_w(t,n,r,i):(e=t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},""),"".concat(e).concat(r?"Z":""))}i(Lw,Pw=Hl),Lw.prototype.render=function(t,e){var n,r,i,o,a=t.items,s=void 0===a?[]:a,l=t.type,c=t.center,a=t.lineStyle,u=t.alternateColor,h=t.closed,t=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:Aw(t.points,l,c,h)}}),f=(n=t,r={style:a},S(e).selectAll(".grid-line").data(n,function(t){return t.id}).join(function(t){return t.append("path").attr("className","grid-line").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){this.attr(t),bw(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),bw(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()}),[]);if(u)for(var d=Array.isArray(u)?u:[u,"transparent"],p=0;p<s.length-1;p++){0===p&&2<s[0].points.length&&(y=Aw(s[0].points,l,c),f.push({path:y,fill:d[f.length%2]}));var y=Aw(s[p].points,l,c,h),g=Aw(s[p+1].points.slice().reverse(),l,c,h,!0),m=void 0,m=h?"".concat(y," ").concat(g):"".concat(y," L").concat(g.slice(1)," Z");f.push({path:m,fill:d[f.length%2]})}i=f,S(e).selectAll(".grid-region").data(i,function(t,e){return e}).join(function(t){return t.append("path").attr("className","grid-region").each(function(t,e){this.attr(t),bw(this,e,i,null==o?void 0:o.style)})},function(t){return t.each(function(t,e){this.attr(t),bw(this,e,i,null==o?void 0:o.style)})},function(t){return t.remove()})};var Pw,Tw=Lw;function Lw(){return null!==Pw&&Pw.apply(this,arguments)||this}function Nw(t,e){e?D(t,".axis-grid",function(){return new Tw({})}).attr("className","axis-grid").call(function(t){return t.node().update(e)}):(t=t.querySelector(".axis-grid"))&&t.remove()}function Cw(t,e,n,r){void 0===r&&(r=0);var t=I(t,2),i=I(t[0],2),o=i[0],i=i[1],t=I(t[1],2),a=t[0],t=t[1],e=I([e*(a-o)+o,e*(t-i)+i],2),s=e[0],e=e[1],a=me([0,0],[Math.abs(a-o),-Math.abs(t-i)]),o=ow(n,-1,1),n=I(ye([0,0],(t=a,!(i=[])?(i[0]=t[1],i[1]=-1*t[0]):(i[0]=-1*t[1],i[1]=t[0]),i),r),2),a=n[0],t=n[1];return[[s,e],[s+j2(o,a),e+j2(o,t)]]}function jw(a,s,t,e,n){var l=(null==n?void 0:n.len)||0,c=t,n=e||{},u=n.formatter,t=n.tickPadding,h=void 0===t?0:t,e=n.offset,f=void 0===e?0:e,t=n.alignTick,d=void 0===t||t,e=n.rotate,p=void 0===e?0:e,y=ow(c,-1,1);return Array.from(a).map(function(t,e){var n=t.value,r=(d||(n=((e===a.length-1?1:null==(r=a[e+1])?void 0:r.value)+n)/2+(i||0)/2),I(Cw(s,n,c,l+h),2)),i=I(r[1],2),n=i[0],i=i[1],e=u?u(t,e):t.text,o=tw(c,"center",rw(c,"end","start"));return p&&(o=rw(c,"end",iw(c,"start",C2(j2(y,p),"left",N2(j2(y,p),"right"))))),{id:"label-".concat(t.id),data:t,x:n+tw(c,f,0),y:i+ew(c,f,0),text:e,textAlign:o,textBaseline:ew(c,"middle","top"===c?"bottom":"top"),transform:"rotate(".concat(p||0,"deg)")}})}P.registerSymbol("axis-arrow",function(t,e,n){var r=t+2*n;return[["M",t,e],["L",r,e],["L",r-n,e-n],["L",r+n,e],["L",r-n,e+n],["L",r,e]]});var Fw=zx({render:function(t,e){var n=t.startPos,r=t.endPos,i=t.verticalFactor,o=t.ticksThreshold,a=t.appendTick,s=t.axisLine,l=t.ticks,l=void 0===l?[]:l,c=t.label,c=void 0===c?{}:c,u=t.tickLine,h=t.subTickLine,f=t.title,t=t.grid,n=[n||[0,0],r||[0,0]],r=I(n,2),d=I(r[0],2),p=d[0],d=d[1],r=I(r[1],2),y=r[0],r=r[1],g=me([0,0],[y-p,r-d]),g=(void 0===(g=g)&&(g=[0,0]),void 0===(i=i||1)&&(i=1),Math.abs(g[0])>Math.abs(g[1])?1===i?"bottom":"top":-1===i?"left":"right"),i=yw(l,o,a);Nw(e,t);Sw(D(e,".axis-line-group","g").attr("className","axis-line-group").node(),"M".concat(p,",").concat(d," L").concat(y,",").concat(r),n,s);l=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=g,b=(null==u?void 0:u.len)||0;xw(l,Array.from(i).map(function(t){var e=I(Cw(m,t.value,v,b),2),n=I(e[0],2),r=n[0],n=n[1],e=I(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),u);var m,v,b,o="axis-subtick-group",a=D(e,".".concat(o),"g").attr("className",o).node();x=i,w=n,k=g,M=null==h?void 0:h.count,E=null==h?void 0:h.len,void 0===M&&(M=0),void 0===E&&(E=0);xw(a,Array.from(x).map(function(a,s){return s===x.length-1?[]:Array(M).fill(null).map(function(t,e){var n=(((null==(n=x[s+1])?void 0:n.value)||1)-a.value)/(M+1),n=a.value+n*(e+1),n=I(Cw(w,n,k,E),2),r=I(n[0],2),i=r[0],r=r[1],n=I(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),h,"sub");var x,w,k,M,E,O,S,_,t="axis-label-group",p=D(e,".".concat(t),"g").attr("className",t).node(),d=(Ew(p,jw(i,n,g,c,u),c),p.querySelectorAll(".axis-label")),y=p.querySelectorAll(".axis-tick"),r=(gw(c,g)(d),mw(d,y,null==c?void 0:c.autoHideTickLine),I(l.getBounds().halfExtents,2)),o=r[0],a=r[1],h=I(p.getBounds().halfExtents,2),t=h[0],i=h[1],d=+((null==(u=null==s?void 0:s.style)?void 0:u.lineWidth)||0),c=(y=g,c=2*(o+t)+d,l=2*(a+i)+d,r=f,h=(p=I(p=n,2))[0],p=p[1],s=(h=I(h,2))[0],h=h[1],u=(p=I(p,2))[0],p=p[1],g=Math.min(s,u),o=Math.max(s,u),t=Math.min(h,p),a=Math.max(h,p),i=g,d=t,O=n=0,S="bottom",_="start","left"===y||"right"===y?(n=c+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(d=(h+p)/2),"end"===(null==r?void 0:r.titleAnchor)&&(d=a,S="top"),"left"===y&&(_="end",n*=-1)):(O=l+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(i=(s+u)/2,_="center"),"end"===(null==r?void 0:r.titleAnchor)&&(i=o,_="end"),"top"===y&&(O*=-1),"bottom"===y&&(S="top")),void 0!==(null==r?void 0:r.positionX)&&(i=g+r.positionX,_="start"),void 0!==(null==r?void 0:r.positionY)&&(d=t+r.positionY,S="bottom"),{x:i+n,y:d+O,textAlign:_,textBaseline:S});vw(e,c.x,c.y,c.textAlign,c.textBaseline,f)}},sw.style),Rw=Math.PI,Iw=Math.abs,Dw=Math.cos,Bw=Math.sin,zw=I([2*Rw],1)[0];function Ww(t,e,n,r,i){void 0===i&&(i=0);var t=I(t,2),o=t[0],t=t[1],n=n*F2,a=e*Dw(n),s=e*Bw(n),r=ow(r,-1,1);return[[o+a,t+s],[o+(e+j2(r,i))*Dw(n),t+(e+j2(r,i))*Bw(n)]]}function Hw(t){var e;return ff(t[0],0)?e="center":0<t[0]?e="start":t[0]<0&&(e="end"),e}function Gw(t,f,d,p,y,e,g,m){void 0===m&&(m=0);var v=e,b=ow(v,-1,1),e=g.tickPadding,x=void 0===e?0:e,w=g.formatter,k=g.align,M=g.rotate;return Array.from(t).map(function(t,e){var n,r=(d-f)*t.value+f,i=m+x,o=270<=(o=r)?(o-360)%360:o,a=I(Ww(y,p,r,v,i),2),a=I(a[1],2),s=a[0],a=a[1],l=w?w(t,e):t.text,c="center",u="baseline",h=[j2(b,s-y[0]),j2(b,a-y[1])];return"radial"===k?(u="middle",(90<=o||o<-90)&&(o+=180),c=Hw(h),ff(o,-90)&&(c=nw(v,"start","end")),ff(o,270)&&(c=nw(v,"end","start"))):"tangential"===k?(c="center",u="bottom",0<=o&&o<180?(o+=270,e="function"==typeof(null==g?void 0:g.style)?g.style(t,e):null!=(e=null==(e=null==g?void 0:g.style)?void 0:e.fontSize)?e:14,r=I(Ww(y,p,r,v,i+e),2),s=(i=I(r[1],2))[0],a=i[1]):o+=90):(o=null!=M?M:0,c=Hw(h),ff((e=h)[1],0)?n="middle":0<e[1]?n="top":e[1]<0&&(n="bottom"),u=n),{id:"label-".concat(t.id),x:s,y:a,text:l,textAlign:c,textBaseline:u,transform:"rotate(".concat((o||0).toFixed(0),"deg)"),data:t}})}var Yw,Vw=zx({render:function(t,e){var n=t.startAngle,n=void 0===n?0:n,r=t.endAngle,r=void 0===r?0:r,i=t.center,o=t.radius,a=t.axisLine,s=t.tickLine,l=t.subTickLine,c=t.label,c=void 0===c?{}:c,u=t.ticks,R=t.title,h=t.grid,f=t.ticksThreshold,d=t.appendTick,t=t.verticalFactor,u=yw(void 0===u?[]:u,f,d),f=-1===t?"inside":"outside",d=(Nw(e,h),D(e,".axis-line-group","g").attr("className","axis-line-group").node());t=i,h=o,g=n/180*Math.PI,F=r/180*Math.PI,void 0===h&&(h=0),void 0===g&&(g=0),void 0===F&&(F=0),p=(t=I(t=void 0===t?[0,0]:t,2))[0],t=t[1],C=(j=I([h,h],2))[0],j=j[1],M=(E=I([p+h*Dw(g),t+h*Bw(g)],2))[0],E=E[1],y=(h=I([p+h*Dw(F),t+h*Bw(F)],2))[0],h=h[1];Sw(d,(d=Iw(F-g))===zw?"M".concat(p,",").concat(t-j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t+j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t-j):(d=Rw<d?1:0,F=F<g?0:1,"M".concat(p,",").concat(t,",L").concat(M,",").concat(E,",A").concat(C,",").concat(j,",0,").concat(d,",").concat(F,",").concat(y,",").concat(h,",L").concat(p,",").concat(t)),void 0,a);var p,y,g=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=r,b=o,x=i,w=f,void 0===(k=null==s?void 0:s.len)&&(k=0);xw(g,Array.from(u).map(function(t){var e=(v-m)*t.value+m,e=I(Ww(x,b,e,w,k),2),n=I(e[0],2),r=n[0],n=n[1],e=I(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),s);var m,v,b,x,w,k,M="axis-subtick-group",E=D(e,".".concat(M),"g").attr("className",M).node();O=u,S=n,_=r,A=o,P=i,T=f,L=null==l?void 0:l.count,N=null==l?void 0:l.len,void 0===L&&(L=0),void 0===N&&(N=0);xw(E,Array.from(O).map(function(a,s){return Array(L).fill(null).map(function(t,e){var n=(((null==(n=O[s+1])?void 0:n.value)||1+O[0].value)-a.value)/(L+1),n=a.value+n*(e+1),n=I(Ww(P,A,(_-S)*n+S,T,N),2),r=I(n[0],2),i=r[0],r=r[1],n=I(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),l,"sub");var O,S,_,A,P,T,L,N,C="axis-label-group",j=D(e,".".concat(C),"g").attr("className",C).node(),d=(Ew(j,Gw(u,n,r,o,i,f,c,null==s?void 0:s.len),c),j.querySelectorAll(".axis-label")),F=j.querySelectorAll(".axis-tick");gw(c,f)(d),mw(d,F,null==c?void 0:c.autoHideTickLine),vw(e,i[0],i[1],"center","middle",R)}},Q2({startAngle:-90,endAngle:270,center:[0,0],label:{tickPadding:2,style:{},align:"normal"}},sw.style||{})),qw=(i(Uw,Yw=Ea),Uw.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Uw.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t)),t.disabled&&(this.active=!1,this.disabled=!0),this.render()},Uw.prototype.setState=function(t){"disabled"===t?(this.active=!1,this.disabled=!0):this.disabled=!1,this.render()},Uw.prototype.render=function(){var t=this.style,e=t.size,e=void 0===e?8:e,n=t.symbol,r=t.markerStyle,t=t.backgroundStyle,i=I(R2(this.style.margin),4),o=i[0],a=i[1],s=i[2],i=i[3],l=I(R2(this.style.padding),4),c=l[0],u=l[1],h=l[2],l=l[3],u=(e-u-l)/2,h=(e-c-h)/2,a=(D(this,".container","rect").attr("className","container").style("x",-(u+l+i)).style("y",-(h+c+o)).style("width",e+a+i).style("height",e+o+s).style("fill","transparent").style("cursor",this.disabled?"not-allowed":"pointer").style("zIndex",1),t||{}),i=a.active,o=a.disabled,s=K(a,["active","disabled"]),t=(D(this,".background","rect").attr("className","background").style("x",-(u+l)).style("y",-(h+c)).style("width",e).style("height",e).call(A,s).call(A,this.active?i:{}).call(A,this.disabled?o:{}),"function"==typeof n?n:Uw.getSymbol(n||"")),a=r||{},l=a.active,c=a.disabled,e=K(a,["active","disabled"]);D(this,".marker","path").attr("className","marker").style("x",0).style("y",0).style("path",null==t?void 0:t(0,0,Math.min(u,h))).call(A,e).call(A,this.active?l:{}).call(A,this.disabled?c:{})},Uw.prototype.bindEvents=function(){var e=this,n=S(this).select(".marker"),r=S(this).select(".background");S(this).on("pointerup",function(){e.disabled||(e.active=!0)}),S(this).on("pointermove",function(){var t;e.disabled||(e.active=!0,A(n,null==(t=e.style.markerStyle)?void 0:t.active),A(r,null==(t=e.style.backgroundStyle)?void 0:t.active))}),S(this).on("pointerout",function(){e.disabled||(e.active=!1,A(n,Ff(e.style.markerStyle||{},["active"])),A(r,Ff(e.style.backgroundStyle||{},["active"])))})},Uw.MARKER_SYMBOL_MAP=new Map,Uw.registerSymbol=function(t,e){Uw.MARKER_SYMBOL_MAP.set(t,e)},Uw.getSymbol=function(t){return Uw.MARKER_SYMBOL_MAP.get(t)},Uw);function Uw(t){t=Yw.call(this,t)||this;return t.active=!1,t.disabled=!1,t.disabled=t.style.disabled||!1,t}qw.registerSymbol("timeline-prev-button",function(t,e,n){return[["M",t+n,e+n],["L",t,e],["L",t+n,e-n],["M",t,e+n],["L",t-n,e],["L",t,e-n]]}),qw.registerSymbol("timeline-next-button",function(t,e,n){return[["M",t,e+n],["L",t+n,e],["L",t,e-n],["M",t-n,e+n],["L",t,e],["L",t-n,e-n]]}),qw.registerSymbol("timeline-play-button",function(t,e,n){return[["M",t+2,e+3],["L",t+2,e-3],["M",t-2,e+3],["L",t-2,e-3]]}),qw.registerSymbol("timeline-stop-button",function(t,e,n){return[["M",t+3,e],["L",t-1.5,e-1.5*Math.sqrt(3)],["L",t-1.5,e+1.5*Math.sqrt(3)],["Z"]]});var oa={margin:[2,4],markerStyle:{stroke:"#bfbfbf",active:{stroke:"#3471F9"}},backgroundStyle:{fill:"transparent"}},Xw={x:0,y:0,data:[],width:500,height:40,selection:[0,0],orient:"horizontal",singleModeControl:{width:56,size:12,labelStyle:{text:"单一时间",fontSize:10,dx:4}},speedControl:{width:32,markerSize:4,speeds:[1,2,3,4,5],labelStyle:{fontFamily:"sans-serif",fill:"rgba(0,0,0,0.45)",fontStyle:"normal",fontWeight:500,fontSize:10,textBaseline:"top"},formatter:function(t){return"".concat(t.toFixed(1),"x")}},controlPosition:"bottom",controlButton:{spacing:14,prevBtn:O(O({},oa),{symbol:"timeline-prev-btn",padding:0,size:8}),nextBtn:O(O({},oa),{symbol:"timeline-next-btn",padding:0,size:8}),playBtn:{margin:4,padding:0,size:20,symbol:"",markerStyle:{stroke:"#bfbfbf",fill:"#bfbfbf",active:{stroke:"#3471F9",fill:"#3471F9"}},backgroundStyle:{stroke:"#bfbfbf",lineWidth:1,fill:"#F7F7F7",active:{fill:"rgba(52, 113, 249, 0.1)",stroke:"#3471F9"}}}},padding:[0,8],playAxis:{appendPadding:[4,0],handleStyle:{r:3,lineWidth:1},label:{position:1,tickPadding:2,tickLine:{len:4,style:{stroke:"rgba(0,0,0,0.25)",lineWidth:1}},style:{fontSize:10,fillOpacity:1,fill:"rgba(0,0,0,0.45)"}},loop:!1},playInterval:2e3,autoPlay:!1},$w=F({},{x:0,y:0,data:[],length:120,orient:"horizontal",selection:0,selectionStyle:{fill:"#5B8FF9",fillOpacity:.15},loop:!1,playInterval:1e3},Xw.playAxis),Zw={axisLine:null,label:{autoRotate:!1,rotate:0,autoHide:!0,autoHideTickLine:!1,autoEllipsis:!0,minLength:50,alignTick:!0}};function Kw(t,e){void 0===t&&(t=[]);var t=I(Array.of(t).flat(),2),n=t[0],n=void 0===n?0:n,t=t[1];return e?[n,n]:[n,void 0===t?n:t]}i(Qw,Jw=Ea),Qw.prototype.update=function(t){var e=F({},this.attributes,t=void 0===t?{}:t),t=(t.selection&&(this.selection=Kw(t.selection,e.singleMode)),t.singleMode&&(this.selection=Kw(e.selection,t.singleMode)),this.playTimer);t&&this.stop(),this.attr(e),this.render(),t&&this.play()},Qw.prototype.play=function(){var r=this,t=this.style,e=t.data,i=t.loop,o=t.singleMode,a=t.playMode,s=e.length,t=this.style.playInterval;Qh(t)&&(t=$w.playInterval),this.playTimer&&clearInterval(this.playTimer),this.playTimer=setInterval(function(){var t,e,n;!i&&r.selection[1]>=s-1?r.stop(!0):o?(t=(r.selection[0]+1)%s,r.setSelection({start:t,end:t})):(t=r.selection[0],n=r.selection[1],e=r.selection[1]-r.selection[0],n=s-1<=n?"increase"===a?t:(t=0,e):("increase"!==a&&(t=(t+1)%s),(n+1)%s),r.setSelection({start:t,end:n}))},t)},Qw.prototype.stop=function(t){clearInterval(this.playTimer),this.playTimer=void 0,t&&this.dispatchEvent(new ia("timelineStopped",{selection:this.selection}))},Qw.prototype.prev=function(){var t,e=I(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n-1+r)%r:0===n?(t=r-(e-n)-1,r-1):(t=n-1,e-1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},Qw.prototype.next=function(){var t,e=I(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n+1)%r:e===r-1?(t=0,e-n):(t=n+1,e+1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},Qw.prototype.getSelection=function(){return this.selection},Object.defineProperty(Qw.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Qw.prototype.ifH=function(t,e){return"horizontal"===this.orient?"function"==typeof t?t():t:"function"==typeof e?e():e},Qw.prototype.destroy=function(){Jw.prototype.destroy.call(this),this.playTimer&&clearInterval(this.playTimer),this.playTimer=void 0};var Jw,tl=Qw;function Qw(){var t=null!==Jw&&Jw.apply(this,arguments)||this;return t.selection=[0,0],t}function tk(t,e){return new Dm({domain:t.map(function(t,e){return e}),range:e,padding:.1})}function ek(t,e,n){n=tk(n,[0,e]).getStep(),e=0<t?Math.ceil:Math.floor;return 0<n?e(t/n):0}function nk(t,e,n){return tk(n,[0,e]).map(t)}i(ok,rk=tl),ok.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(ok.prototype,"styles",{get:function(){return F({},ok.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),ok.prototype.setSelection=function(t){var e,n,r=t.start,t=t.end,i=this.styles,o=i.data,o=void 0===o?[]:o,i={duration:i.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},a=this.ifH("cx","cy"),s=S(this).select(".slider-start-handle").node();void 0!==r&&(n=nk(r,this.style.length,o),this.startHandleAnimation=s.animate([((e={})[a]=s.style[a],e),((s={})[a]=n,s)],i)),void 0!==t&&(e=S(this).select(".slider-end-handle").node(),n=nk(t,this.style.length,o),this.endHandleAnimation=e.animate([((s={})[a]=e.style[a],s),((o={})[a]=n,o)],i)),this.selection=[null!=r?r:this.selection[0],null!=t?t:this.selection[1]],this.dispatchEvent(new ia("selectionChanged",{detail:{selection:this.selection}}))},ok.prototype.render=function(){var e=this,n=this.styles,t=I(this.ifH([n.length,n.size],[n.size,n.length]),2),r=t[0],i=t[1],t=D(this,".slider-background","line").attr("className","slider-background").style("x1",0).style("y1",0).style("x2",this.ifH(r,0)).style("y2",this.ifH(0,i)).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(t=n.backgroundStyle)?void 0:t.fill).style("strokeOpacity",null==(t=n.backgroundStyle)?void 0:t.fillOpacity).node(),o=tk(n.data,[0,1]),a=I(this.selection.map(function(t){return o.map(t)}),2),s=a[0],s=void 0===s?0:s,a=a[1],a=void 0===a?s:a,l=this.ifH(s*r,0),c=this.ifH(a*r,0),s=this.ifH(0,s*i),a=this.ifH(0,a*i),u=(D(t,".slider-selection","line").attr("className","slider-selection").style("x1",l).style("y1",s).style("x2",c).style("y2",a).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(h=n.selectionStyle)?void 0:h.fill).style("strokeOpacity",null==(h=n.selectionStyle)?void 0:h.fillOpacity).style("visibility",n.singleMode?"hidden":"visible").call(A,n.selectionStyle),"running"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.pause(),D(t,".slider-start-handle","circle").attr("className","slider-start-handle").style("cx",l).style("cy",s).call(A,n.handleStyle),"paused"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.play(),"running"===(null==(l=this.endHandleAnimation)?void 0:l.playState)&&this.endHandleAnimation.pause(),D(t,".slider-end-handle","circle").attr("className","slider-end-handle").style("cx",c).style("cy",a).style("visibility",n.singleMode?"hidden":"visible").call(A,n.handleStyle),"paused"===(null==(s=this.endHandleAnimation)?void 0:s.playState)&&this.endHandleAnimation.play(),n.data.map(function(t,e){return{value:o.map(e),text:t.date}})),h=n.label||{},l=h.position,f=void 0===l?-1:l,d=h.tickLine,p=K(h,["position","tickLine"]);D(t,".slider-axis",function(){return new Fw({className:"slider-axis"})}).call(function(t){return t.node().update(F({},Zw,{startPos:[f*e.ifH(0,r+2),f*e.ifH(i+2,0)],endPos:[e.ifH(r,0)+f*e.ifH(0,r+2),e.ifH(0,i)+f*e.ifH(i+2,0)],ticks:u,verticalFactor:f,tickLine:null===n.label?null:d,label:null===n.label?null:p}))})},ok.prototype.bindEvents=function(){var t=S(this).select(".slider-background"),r=(this.dragHandle(t,"start"),this.dragHandle(t,"end"),this.dragSelection(t),t.select(".slider-selection").node()),e=t.select(".slider-start-handle").node(),t=t.select(".slider-end-handle").node();e.addEventListener(v.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x1":"y1"]=t)}),t.addEventListener(v.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x2":"y2"]=t)})},ok.prototype.dragHandle=function(n,o){function t(t){var e,n,r,i;c&&(c=!1,t=ek(s?l.ifH(t.x-s[0],t.y-s[1]):0,l.style.length,l.style.data),s=void 0,e=(n=I(l.selection,2))[0],n=n[1],r=l.style.data.length-1,"start"===o?e===n&&0<t?(i=cf(0,e+t,r),l.setSelection({start:i,end:i})):l.setSelection({start:cf(e+t,0,n)}):e===n&&t<0?(i=cf(0,n+t,r),l.setSelection({start:i,end:i})):l.setSelection({end:cf(n+t,e,r)}),l.playTimer)&&l.play()}var a,s,l=this,c=!1;n.on("pointerdown",function(t){l.playTimer&&clearInterval(l.playTimer);var e=n.select(".slider-".concat(o,"-handle")).node();t.target===e&&(c=!0,s=[t.x,t.y],a=[t.x,t.y])}.bind(this)).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e,n,r,i;c&&(e=l.styles.length,n=S(l).select(".slider-".concat(o,"-handle")).node(),r=l.ifH(t.x-a[0],t.y-a[1]),i=n.getLocalPosition(),"vertical"===l.orient?n.style.cy=cf(i[1]+r,0,e):n.style.cx=cf(i[0]+r,0,e),a=[t.x,t.y])})},ok.prototype.dragSelection=function(t){function e(t){l.playTimer&&clearInterval(l.playTimer),t.target===o&&(h=!0,i=[t.x,t.y],s=[t.x,t.y])}function n(t){var e;h&&(h=!1,t=ek(i?l.ifH(t.x-i[0],t.y-i[1]):0,l.style.length,l.style.data),i=void 0,e=l.selection[1]-l.selection[0],t=cf(l.selection[1]+t,e,l.style.data.length-1),l.setSelection({start:t-e,end:t}),l.playTimer)&&l.play()}function r(t){var e,n,r,i,o,a;h&&(e=l.styles.length,n=l.ifH(t.x-s[0],t.y-s[1]),r=(a=I(c.getLocalPosition(),2))[0],a=a[1],i=(o=I(u.getLocalPosition(),2))[0],o=o[1],"vertical"===l.orient?(c.style.cy=cf(a+n,0,e-(o=o-a)),u.style.cy=c.style.cy+o):(a=i-r,c.style.cx=cf(r+n,0,e),u.style.cx=c.style.cx+a),s=[t.x,t.y])}var s,i,l=this,o=t.select(".slider-selection").node(),c=t.select(".slider-start-handle").node(),u=t.select(".slider-end-handle").node(),h=!1;t.on("mousedown",e.bind(this)).on("touchstart",e.bind(this)).on("mouseup",n.bind(this)).on("mouseupoutside",n.bind(this)).on("touchend",n.bind(this)).on("touchendoutside",n.bind(this)).on("mousemove",r.bind(this)).on("touchmove",r.bind(this))},ok.defaultOptions={style:F({},$w,{tag:"slider-axis",size:3,handleStyle:{r:3,stroke:"#8AADF3",strokeOpacity:.75,lineWidth:1,fill:"#fff",fillOpacity:1},backgroundStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{cursor:"grabbing"}})};var rk,ik=ok;function ok(t){t=rk.call(this,F({},ok.defaultOptions,t))||this;return t.startHandleAnimation=null,t.endHandleAnimation=null,t.selection=Kw(t.style.selection,t.style.singleMode),t}function ak(t,e){return new Sm({domain:t.map(function(t,e){return e}),range:e,paddingOuter:0,paddingInner:0})}i(ck,sk=tl),ck.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(ck.prototype,"styles",{get:function(){return F({},ck.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),ck.prototype.setSelection=function(t){var e,n=I(this.selection,2),r=n[0],n=n[1];this.selection=Kw([null!=(e=t.start)?e:r,null!=(e=t.end)?e:n],this.style.singleMode),this.dispatchEvent(new ia("selectionChanged",{detail:{selection:this.selection}})),this.render()},ck.prototype.render=function(){var i=this,r=this.styles,o=r.size,a=r.spacing,t=I(this.ifH(["x","y","width","height"],["y","x","height","width"]),4),s=t[0],l=t[1],c=t[2],u=t[3],t=D(this,".slider-background","rect").attr("className","slider-background").style("x",0).style("y",0).style(c,r.length).style(u,o+a).call(A,r.backgroundStyle).node(),h=this.getCellScale(),f=h.getBandWidth(),e=r.data.map(function(t,e){var n;return O(((n={})[s]=h.map(e),n[l]=a/2,n[c]=f-r.cellGap,n[u]=o,n),r.cellStyle)}),e=(S(t).selectAll(".cell").data(e).join(function(t){return t.append("rect").attr("className","cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()}),e.filter(function(t,e){var n=I(i.selection,2),r=n[0],n=n[1];return r<=e&&e<=n}).map(function(t){return O(O({},t),r.selectionStyle)})),n={duration:this.style.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},d=(S(t).selectAll(".selected-cell").data(e).join(function(t){return t.append("rect").attr("className","selected-cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.animate([t],n)})},function(t){return t.remove()}),r.length-2*r.spacing+r.cellGap),p=ak(r.data,[0,d]),y=r.data.map(function(t,e){return{value:(p.map(e)+(f-r.cellGap)/2)/d,text:t.date}}),e=r.label||{},g=e.position,m=void 0===g?-1:g,v=e.tickLine,b=K(e,["position","tickLine"]),g=-1===m?-2:r.spacing+o+2,x=[r.spacing,g],w=[a+d,g];"vertical"===this.orient&&(x=[x[1],x[0]],w=[w[1],w[0]]),D(t,".slider-axis",function(){return new Fw({className:"slider-axis",style:Zw})}).call(function(t){return t.node().update({startPos:x,endPos:w,ticks:y,verticalFactor:m,tickLine:null===r.label?null:v,label:null===r.label?null:b})})},ck.prototype.bindEvents=function(){this.dragSelection()},ck.prototype.getCellScale=function(){var t=this.styles.cellGap,e=this.styles.length,n=this.styles.spacing;return ak(this.style.data,[n,e-n+t])},ck.prototype.dragSelection=function(){function t(){r=!1,i.playTimer&&i.play()}var n,i=this,o=S(this).select(".slider-background"),r=!1,a=this.styles.spacing,s=function(t){var e=I(o.node().getPosition(),2),n=e[0],e=e[1],n=i.ifH(n+4,e+a),e=i.styles.cellGap,r=i.getCellScale().getStep();return Math.floor((t-n+e)/r)};o.on("pointerdown",function(t){i.playTimer&&clearInterval(i.playTimer),r=!0,n=i.ifH(t.x,t.y);t=s(n);i.setSelection({start:t,end:t})}).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e;r&&(t=s(i.ifH(t.x,t.y)),e=(t=I((e=n?s(n):t)<t?[e,t]:[t,e],2))[0],t=t[1],i.setSelection({start:e,end:t}))})},ck.defaultOptions={style:F({},$w,{tag:"cell-axis",backgroundStyle:{fill:"#416180",fillOpacity:.05},size:16,spacing:4,cellGap:2,cellStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{fillOpacity:.45},label:{autoHideTickLine:!0}})};var sk,lk=ck;function ck(t){t=sk.call(this,F({},ck.defaultOptions,t))||this;return t.selection=Kw(t.style.selection,t.style.singleMode),t}function uk(t,e){return[1.43,2.79,4.89,7.57,11.66][t]/11.66*e}var hk,o=F({},Xw.speedControl,{markerFill:"#8c8c8c",spacing:1,lineStyle:{stroke:"#bfbfbf",lineWidth:1}}),fk=(i(dk,hk=Ea),dk.prototype.connectedCallback=function(){this.render(),this.bindEvents()},dk.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(dk.prototype,"styles",{get:function(){return F({},dk.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),dk.prototype.render=function(){var t=this.styles,e=t.initialSpeed,n=t.markerSize,r=t.markerFill,i=t.lineStyle,o=t.speeds,a=t.labelStyle,s=t.spacing,t=t.formatter,t=void 0===t?function(t){return"".concat(t)}:t,e=o.indexOf(e),l=2*n,c=uk(e=-1===e?0:e,2*l),u=n*Math.tan(Math.PI/6)*2,r=(D(this,".speed-marker","path").attr("className","speed-marker").style("fill",r).style("path",[["M",0,c-u/2],["L",n,c],["L",0,c+u/2],["Z"]]),n-.5),c=D(this,".line-group","rect").attr("className","line-group").style("x",r).style("y",0).style("width",l).style("height",2*l).style("cursor","pointer").style("fill","transparent").node(),u=o.reduce(function(t,e,n){n=uk(n,2*l);return t.push(["M",0,n],["L",l,n]),t},[]);D(c,".speed-path","path").attr("className","speed-path").style("path",u).call(A,i),D(this,".speed-label","text").attr("className","speed-label").style("x",r+l+s).style("y",2).style("text",t(o[e])).call(A,a)},dk.prototype.bindEvents=function(){var e=this,t=this.querySelector(".line-group");t.addEventListener("pointerdown",function(t){return e.onClick(t)}),t.addEventListener("touchmove",function(t){return e.onClick(t)})},dk.prototype.onClick=function(t){var o,e=this.styles,a=e.speeds,n=e.markerSize,e=e.formatter,e=void 0===e?function(t){return"".concat(t)}:e,s=2*n*2,n=this.querySelector(".line-group"),r=S(this).select(".speed-label").node(),i=S(this).select(".speed-marker").node();t.currentTarget===n&&(o=t.y-n.getBBox().y,-1!==(t=a.findIndex(function(t,e){var n=uk(e,s),r=uk(e-1,s),i=uk(e+1,s);return 0===e?o<n+(uk(1,s)-n)/2:e===a.length-1?n-(n-r)/2<o:(e=[n-(n-r)/2,n+(i-n)/2])[0]<=o&&o<e[1]})))&&(r.setAttribute("text",e(a[t])),i.setLocalPosition(0,uk(t,s)-s/8),this.dispatchEvent(new ia("speedChanged",{detail:{speed:a[t]}})))},dk.tag="speed-control",dk.defaultOptions={style:o},dk);function dk(t){return hk.call(this,F({},dk.defaultOptions,t))||this}i(mk,pk=Ea),mk.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(mk.prototype,"styles",{get:function(){return F({},mk.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),mk.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t)),Qh(t.active)||(this.active=t.active),this.render()},mk.prototype.render=function(){var t,e=this.styles,n=e.size,r=e.buttonStyle,i=e.labelStyle,e=e.symbol,o=r.active,r=K(r,["active"]),r=D(this,".button","rect").attr("className","button").style("x",0).style("y",0).style("width",n).style("height",n).call(A,r).call(A,this.active?o:{}).node();D(r,".symbol","path").attr("className","symbol").style("x",n/2).style("y",n/2).style("path",[["M",(o=n/2)-(t=r=n/2)/7*4,r-t/14],["L",o-t/7,r+t/7*3],["L",o+t/7*4,r-t/7*3]]).style("lineWidth",1).style("lineCap","round").style("stroke","transparent").style("cursor","pointer").call(A,this.active?null==e?void 0:e.active:{}),D(this,".label","text").attr("className","label").style("x",n).style("y",n/2).call(A,i)},mk.prototype.bindEvents=function(){var t=this;S(this).select(".button").on("pointerdown",function(){t.dispatchEvent(new ia("singleModeChanged",{detail:{active:!t.active}}))})},mk.defaultOptions={style:{size:12,buttonStyle:{fill:"transparent",stroke:"#000",strokeOpacity:.15,cursor:"pointer",lineWidth:1,radius:2,active:{stroke:"#3471F9",fill:"#3471F9",strokeOpacity:1}},symbol:{active:{stroke:"#fff"}},labelStyle:{text:"",textAlign:"left",textBaseline:"middle",fill:"#000",fillOpacity:.65},cursor:"pointer"}};var pk,yk,gk=mk;function mk(t){t=pk.call(this,F({},mk.defaultOptions,t))||this;return t.active=!1,t.active=t.style.active||!1,t}function vk(t,e,n){var r,i,o,a,s,n=F({},Xw,n),l=n.type,c=n.playAxis,u=n.controlButton,h=n.speedControl,f=n.singleModeControl,d=(null==(d=null==c?void 0:c.label)?void 0:d.position)||-1,p=null!=(p=null==c?void 0:c.spacing)?p:(null==(p=null==(p=lk.defaultOptions)?void 0:p.style)?void 0:p.spacing)||0,y=(null==c?void 0:c.size)||("cell"===l?null==(y=null==(y=lk.defaultOptions)?void 0:y.style)?void 0:y.size:null==(y=null==(y=ik.defaultOptions)?void 0:y.style)?void 0:y.size)||4,p=(y+="cell"===l?p:0,I(R2(null==c?void 0:c.appendPadding),4)),g=p[0],m=p[1],v=p[2],p=p[3],b=(null==u?void 0:u.spacing)||0,x=vf(u)||vf(null==u?void 0:u.playBtn)?0:null==(x=null==u?void 0:u.playBtn)?void 0:x.size,w=vf(u)||vf(null==u?void 0:u.prevBtn)?0:null==(w=null==u?void 0:u.prevBtn)?void 0:w.size,u=vf(u)||vf(null==u?void 0:u.nextBtn)?0:null==(u=null==u?void 0:u.nextBtn)?void 0:u.size,k=x/2+w/2+b,M=x/2+u/2+b,E=null===h?0:null==h?void 0:h.markerSize,O=2*E,h=null===h?0:null==h?void 0:h.width,S=2*O+E/2,_=null===f?0:null==f?void 0:f.width,f=null===f?0:(null==f?void 0:f.size)+2;return"vertical"===n.orient?{axis:{x:(n=p+(-1===d?30:0))+("cell"===l?0:y/2),y:i=(r=w+b+x/2)+x/2+b+g,length:(o=(s=(a=e-f)-4-S)-b-u/2)-b-u/2-v-i},prevBtn:{x:i=n+y/2,y:w/2,size:w},playBtn:{x:i,y:r,size:x},nextBtn:{x:i,y:o,size:u},speedControl:{x:n-h/2,y:s,size:h},singleModeControl:{x:0,y:a}}:(i=(r=e-_)-8-h,o=c,s=(o=F({},Xw.playAxis,o).label)?((null==(n=o.tickLine)?void 0:n.len)||0)+(o.tickPadding||0)+(Number(o.style.fontSize)||0)+2:0,a=(-1===d?s:0)+("cell"===l?0:y/2)+g,"bottom"===t?{axis:{x:p,y:a,length:e-(p+m)},playBtn:{x:_=e/2,y:c=a+(1===d?s:0)+y+x/2+v,size:x},prevBtn:{x:_-k,y:c,size:w},nextBtn:{x:_+M,y:c,size:u},speedControl:{x:i,y:n=a+(1===d?s:0)+y+v,size:h},singleModeControl:{x:r,y:n+O-f/2}}:(g="cell"===l?a+y/2:a,e="cell"===l&&-1===d?s+y-S:1===d?a+E/2:a-S,"left"===t?{axis:{x:n=(v=(c=(_=w/2)+k)+M)+u/2+p,y:a,length:i-m-n},prevBtn:{x:_,y:g,size:w},playBtn:{x:c,y:g,size:x},nextBtn:{x:v,y:g,size:u},speedControl:{x:i,y:e,size:h},singleModeControl:{x:r,y:e+O-f/2}}:{axis:{x:p,y:a,length:(y=(s=(l=i-(u/2+b))-M)-k)-w/2-m-p},playBtn:{x:s,y:g,size:x},prevBtn:{x:y,y:g,size:w},nextBtn:{x:l,y:g,size:u},speedControl:{x:i,y:e,size:h},singleModeControl:{x:r,y:e+O-f/2}}))}function bk(t){t=yk.call(this,F({},{style:Xw},t))||this;return t.speed=1,t.singleMode=!1,t.playing=!1,t.selection=[0,0],t.singleMode=t.style.singleMode||!1,t.selection=Kw(t.style.selection,t.singleMode),t}function xk(t){var e,n={left:0,top:0,width:0,height:0};return"html"===(null==t?void 0:t.tagName)?n={left:0,top:0,width:(e=t.style).width,height:e.height}:t&&(t=(e=t.getLocalBounds()).min,e=e.halfExtents,n={left:t[0],top:t[1],width:2*e[0],height:2*e[1]}),{left:0,top:0,right:n.width,bottom:n.height}}function wk(t,n){var r,e,i,o;return n?(r=n.useHTML,e=n.style,i="legend-title ".concat(r?"html":"text","-title"),o="<span>".concat((null==n?void 0:n.content)||"","</span>"),D(t,".".concat(i),function(){return r?new Ca({className:i,style:{innerHTML:o}}):new Ua({className:i,style:e})}).call(function(t){var e;r?t.style("width",null!=(e=n.width)?e:80).style("height",null!=(e=n.height)?e:20).style("innerHTML",o):t.style("fontSize",12).style("textBaseline","top").style("text",n.content||"")}).call(A,e).node()):((t=t.querySelector(".legend-title"))&&t.remove(),null)}function kk(t,e,n,r){return D(t,".".concat(e),"g").attr("className",e).style("x",n).style("y",r).node()}function Mk(t,e,n,r,i){D(t,".".concat(e),"rect").attr("className",e).style("zIndex",-1).style("width",n).style("height",r).call(A,i||{}).node()}i(bk,yk=Ea),bk.prototype.connectedCallback=function(){this.render(),this.bindEvents()},bk.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t)),void 0!==t.singleMode&&(this.singleMode=t.singleMode),t.selection&&(this.selection=Kw(t.selection,this.singleMode)),this.render()},Object.defineProperty(bk.prototype,"styles",{get:function(){return F({},Xw,this.attributes)},enumerable:!1,configurable:!0}),bk.prototype.render=function(){var e=this,t=this.styles,n=t.width,r=t.height,i=t.controlPosition,o=t.speedControl,a=t.singleModeControl,t=I(R2(this.styles.padding),4),s=t[0],s=void 0===s?0:s,l=t[1],l=void 0===l?0:l,c=t[2],t=t[3],t=void 0===t?l:t,u=D(this,".container","g").attr("className","container").style("x",t).style("y",s).node(),h=vk(i,"vertical"===this.style.orient?r-(s+c):n-(t+l),this.styles);this.renderAxis(u,h),this.renderControlButton(u,h),D(u,".timeline-speed-control",function(){return new fk({})}).attr("className","timeline-speed-control").call(function(t){null===o?t.remove():t.node().update(O(O({x:h.speedControl.x,y:h.speedControl.y},o),{initialSpeed:e.speed}))}),D(u,".timeline-single-control",function(){return new gk({})}).attr("className","timeline-single-control").call(function(t){null===a?t.remove():t.node().update(O(O({x:h.singleModeControl.x,y:h.singleModeControl.y},a),{active:e.singleMode}))})},bk.prototype.renderAxis=function(t,e){var n=this,r=this.styles.data,i=this.styles.type||"slider",o=S(t).select(".timeline-axis").node(),a="cell"===i?lk:ik;o&&o.style.tag!=="".concat(i,"-axis")&&(o.remove(),this.removeChild(o)),D(t,".timeline-axis",function(){return new a({})}).attr("className","timeline-axis").call(function(t){t.node().update(O({x:e.axis.x,y:e.axis.y,length:e.axis.length,data:r,selection:n.selection,orient:n.style.orient,playInterval:n.style.playInterval/n.speed,singleMode:n.singleMode},n.style.playAxis||{})),t.node().update({handleStyle:{cursor:"vertical"===n.style.orient?"ns-resize":"ew-resize"}})}).node()},bk.prototype.renderControlButton=function(t,n){var e,r=this,i=n.playBtn.size||0,o=n.prevBtn.size||0,a=(null==(e=n.nextBtn)?void 0:e.size)||0;D(t,".timeline-prev-btn",function(){return new qw({})}).attr("className","timeline-prev-btn").call(function(t){var e;o?(t.node().update(O(O({},(null==(e=r.style.controlButton)?void 0:e.prevBtn)||{}),{x:n.prevBtn.x,y:n.prevBtn.y,size:o,symbol:"timeline-prev-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),D(t,".timeline-play-btn",function(){return new qw({})}).attr("className","timeline-play-btn").call(function(t){var e;i?(t.node().update({backgroundStyle:{radius:(n.playBtn.size||0)/2}}),t.node().update(O(O({},(null==(e=r.style.controlButton)?void 0:e.playBtn)||{}),{x:n.playBtn.x,y:n.playBtn.y,size:i,symbol:r.playing?"timeline-play-button":"timeline-stop-button"}))):t.remove()}),D(t,".timeline-next-btn",function(){return new qw({})}).attr("className","timeline-next-btn").call(function(t){var e;a?(t.node().update(O(O({},(null==(e=r.style.controlButton)?void 0:e.nextBtn)||{}),{x:n.nextBtn.x,y:n.nextBtn.y,size:a,symbol:"timeline-next-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),this.style.autoPlay&&!this.playing&&(this.playing=!0,S(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.play()}),S(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-play-button"})})),!this.style.autoPlay&&this.playing&&(this.playing=!1,S(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.stop()}),S(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-stop-button"})}))};var Ho={style:{x:0,y:0,padding:0,orient:"horizontal",backgroundStyle:{fill:"transparent",lineWidth:0},title:{content:"",spacing:4,align:"left",style:{fontWeight:"bold",fontFamily:"sans-serif",fontSize:12,textAlign:"top",textBaseline:"top",fill:"#2C3542"}},label:{style:{fill:"#2C3542",fillOpacity:.65,fontSize:12}}}},Ek={symbol:"circle",size:8},Ok={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},Sk={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},_k=F({},Ho,{style:{type:"category",items:[],maxWidth:void 0,maxHeight:void 0,maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!(bk.prototype.bindEvents=function(){var e=this,n=S(this).select(".timeline-axis").node(),r=S(this).select(".timeline-play-btn").node();r&&S(r).on("pointerdown",function(t){e.playing?(e.playing=!1,n.stop(),r.update({symbol:"timeline-stop-button"})):(e.playing=!0,n.play(),r.update({symbol:"timeline-play-button"}))}),S(this).on("timelineStopped",function(){e.playing=!1,null!=r&&r.update({symbol:"timeline-stop-button"})}),S(this).on("speedChanged",function(t){e.speed=t.detail.speed,n.update({playInterval:e.style.playInterval/e.speed})}),S(this).select(".timeline-prev-btn").on("pointerdown",function(){return n.prev()}),S(this).select(".timeline-next-btn").on("pointerdown",function(){return n.next()}),S(this).on("singleModeChanged",function(t){e.singleMode=t.detail.active,e.selection=Kw(e.selection,e.singleMode),e.render()}),S(this).on("selectionChanged",function(t){e.selection=t.detail.selection})}),pageNavigator:{loop:!1}}}),Ak={width:100,height:20,type:"color",chunked:!1,ticks:[],isGradient:"auto",backgroundColor:"#c5c5c5"},Pk={spacing:4,formatter:function(t){return String(t)},align:"rail",flush:!0,maxLength:30},Tk={size:25,stroke:"#c5c5c5",fill:"#fff",lineWidth:1},Lk=F({},Ho,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],label:Pk,rail:Ak,slidable:!0,indicator:{size:8,spacing:10,padding:5,backgroundStyle:{fill:"#262626","background-color":"#262626","border-radius":"5px"},text:{style:{color:"white","font-size":"12px"}}}}}),Nk="legend-item-";function Ck(t,e){t&&(t.setAttribute("tip",t.style.text),null!=t)&&t.attr("text",e||"")}function jk(n,t){return void 0===n&&(n={}),(t=void 0===t?"":t).split("-").reduce(function(t,e){return O(O({},t),Cf(n,e,{}))},{})}i(Ik,Fk=Hl),Ik.prototype.setState=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n=new Set((this.state||"").split("-"));e?n.add(t):n.delete(t),this.state=Ee([],I(n),!1).join("-"),this.update()},Ik.prototype.getState=function(){return this.state},Ik.prototype.update=function(t){Fk.prototype.update.call(this,t=void 0===t?{}:t),t.state&&(this.state=t.state)},Object.defineProperty(Ik.prototype,"styles",{get:function(){return F({},Ik.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Ik.prototype.render=function(t,e){var n,r,i,o,a,s,l=this,c=this.styles,u=c.backgroundStyle,h=c.itemMarker,f=c.padding,d=c.itemName,p=c.itemValue,c=c.maxItemWidth,y=this.styles.itemHeight,f=I(R2(f),4),g=f[0],m=f[1],v=f[2],f=f[3],b=Number((null==h?void 0:h.size)||0),x=(Qh(y)&&(y=Math.max.call(null,b,Number((null==(x=null==d?void 0:d.style)?void 0:x.fontSize)||0),Number((null==(x=null==p?void 0:p.style)?void 0:x.fontSize)||0))+(g+v)),D(this,".".concat(Nk,"container"),"g").attr("className","".concat(Nk,"container")).style("x",f).style("y",y/2).node()),w=(D(x,".".concat(Nk,"marker"),function(){return new P({})}).attr("className","".concat(Nk,"marker")).call(function(t){h?t.node().update(O(O({x:b/2,y:0,size:b,symbol:h.symbol},h.style||{}),jk(h.style,l.state))):t.remove()}),b?b+((null==d?void 0:d.spacing)||0):0),g=D(x,".".concat(Nk,"name"),"text").attr("className","".concat(Nk,"name")).call(function(t){d?t.node().attr(O(O({x:w,y:0,tip:"",text:(null==d?void 0:d.content)||"",textBaseline:"middle",textAlign:"left"},d.style||{}),jk(d.style,l.state))):t.remove()}).node(),k=w,v=(g&&!g.destroyed&&(k=g.getLocalBounds().max[0]),D(x,".".concat(Nk,"value"),"text").attr("className","".concat(Nk,"value")).call(function(t){p?t.node().attr(O(O(O({x:k+(p.spacing||0),y:0,tip:"",text:(null==p?void 0:p.content)||"",textAlign:"left"},p.style||{}),jk(p.style,l.state)),{textBaseline:"middle"})):t.remove()}).node()),M=(Qh(c)||(g=null!=g&&g.destroyed?null:g,v=null!=v&&v.destroyed?null:v,n=c-w-(f+m),(g||v)&&"number"==typeof n&&(Number(n)<=0?(Ck(g,""),Ck(v,"")):g&&v?(a=g.getLocalBounds(),i=v.getLocalBounds(),n<(r=2*a.halfExtents[0])+(M=2*i.halfExtents[0])+(i=r&&M?i.min[0]-a.max[0]:0)&&(o=(a=I([.5*n,.5*n],2))[0],a=a[1],s=E=!0,r<=o?(a=n-(r+i),E=!1):M<=a&&(o=n-(M+i),s=!1),E&&(Ck(g,E2(g.style.text,o,_2(g))),v.attr("x",Number(g.style.x)+o+i)),s)&&Ck(v,E2(v.style.text,a,_2(v)))):n<2*(r=g||v).getLocalBounds().halfExtents[0]&&Ck(r,E2(r.style.text,n,_2(r))))),x.getLocalBounds()),E=Math.max(2*M.halfExtents[0]+m+f,this.styles.itemWidth||0);Qh(c)||(E=Math.min(c,E)),D(this,".".concat(Nk,"background"),"rect").attr("className","".concat(Nk,"background")).style("x",M.min[0]-f).style("y",0).style("width",E).style("height",y).style("zIndex",-1).call(A,u).call(A,jk(u,this.state))},Ik.defaultOptions={style:{id:"",value:{},itemMarker:{size:8,symbol:"circle",style:{fill:"#d3d2d3",fillOpacity:1,lineWidth:0,active:{cursor:"pointer"}}},itemName:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",fontSize:12,opacity:1,active:{cursor:"pointer"}}},itemValue:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",opacity:1,fontSize:12,active:{cursor:"pointer"}}}}};var Fk,Rk=Ik;function Ik(t){t=Fk.call(this,F({},Ik.defaultOptions,t))||this;return t.state="default",t.state=t.style.state||"selected",t}function Dk(t,o,a){void 0===a&&(a=0);var s=0,l=0,c=0;return t.reduce(function(t,e){var n=I(e.getLocalBounds().halfExtents,2),r=n[0],n=n[1],i="horizontal"===o?[t,0]:[0,t];return e.setLocalPosition(i[0],i[1]),l=Math.max(l,2*n),c=Math.max(c,2*r),(s="horizontal"===o?t+2*r:t+2*n)+a},0),{totalSize:s,maxItemWidth:c,maxItemHeight:l}}qw.registerSymbol("left",function(t,e,n){return[["M",t-n*Math.sin(Math.PI/3),e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),qw.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n*Math.sin(Math.PI/3),e],["L",t-n,e+n],["Z"]]}),qw.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n*Math.sin(Math.PI/3)],["L",t+n,e+n],["Z"]]}),qw.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n*Math.sin(Math.PI/3)],["Z"]]});i(Wk,Bk=Ea),Wk.prototype.connectedCallback=function(){this.container=this.appendChild(new La),this.clipView=new Ba({style:{path:[]}}),this.container.appendChild(this.clipView),this.render(),this.bindEvents()},Wk.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(Wk.prototype,"styles",{get:function(){return F({},Wk.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Wk.prototype.render=function(){this.renderButtonGroup();var t=this.style.items,t=void 0===t?[]:t;this.items=S(this.container).selectAll(".legend-item").data(t||[],function(t,e){return t.id||e}).join(function(t){return t.append(function(t){return new Rk({id:t.id,className:"legend-item",style:t})})},function(t){return t.each(function(t){this.update(t)})},function(t){return t.remove()}).nodes(),this.adjustLayout()},Wk.prototype.bindEvents=function(){this.prevButton.addEventListener("pointerdown",this.prev.bind(this)),this.nextButton.addEventListener("pointerdown",this.next.bind(this))},Wk.prototype.ifHorizontal=function(t,e){return"vertical"===this.style.orient?"function"==typeof e?e():e:"function"==typeof t?t():t},Wk.prototype.renderButtonGroup=function(){var t=this.styles,e=t.pageButtonStyle,n=void 0===e?{}:e,e=t.pageTextStyle,t=D(this,".page-button-group",function(){return new La({className:"page-button-group"})}).node(),r="page-prev-button",i="page-next-button";this.prevButton=D(t,"#".concat(r),function(){return new qw({})}).attr("id",r).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),D(t,".page-info","text").attr("className","page-info").call(A,e),this.nextButton=D(t,"#".concat(i),function(){return new qw({})}).attr("id",i).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),this.updatePageButtonSymbol()},Object.defineProperty(Wk.prototype,"pageInfoBounds",{get:function(){var t,e,n,r,i=this.querySelector(".page-info");return i?(r=(t=this.styles).pageFormatter,t=t.pageInfoSpacing,e=i.style.visibility,i.style.visibility="hidden",i.style.text=r(1,this.styles.items.length),n=(r=I(i.getLocalBounds().halfExtents,2))[0],r=r[1],i.style.visibility=e,{width:2*(n+t),height:2*(r+t)}):{width:0,height:0}},enumerable:!1,configurable:!0}),Wk.prototype.layoutButton=function(t){var e,n=this.style.pageInfoSpacing,r=this.pageInfoBounds.height,n=this.pageInfoBounds.width+2*(void 0===n?0:n),i=I(this.querySelector(".page-button-group").childNodes,3),o=i[0],a=i[1],i=i[2];"horizontal"===t?(t=2*o.getLocalBounds().halfExtents[0],e=2*i.getLocalBounds().halfExtents[0],o.style.x=t/2,i.style.x=t+n+e/2,a.style.x=(Number(o.style.x)+Number(i.style.x))/2,o.style.y=0,i.style.y=0,a.style.y=0):(t=2*o.getLocalBounds().halfExtents[1],n=2*i.getLocalBounds().halfExtents[1],o.style.y=-(r+t)/2,i.style.y=(r+n)/2,a.style.y=0,e=this.pageInfoBounds.width/2,o.style.x=e,i.style.x=e,a.style.x=e)},Wk.prototype.showButtonGroup=function(){this.querySelector(".page-button-group").style.visibility="visible"},Wk.prototype.resetPageCfg=function(){this.querySelector(".page-button-group").style.visibility="hidden",this.container.style.clipPath=null,this.currPage=void 0,this.maxPages=void 0,this.pageOffsets=[],this.container.style.transform="translate(0,0)",this.clipView&&(this.clipView.style.transform="translate(0,0)")},Wk.prototype.adjustLayout=function(){var t,e,n,r;this.resetPageCfg(),this.items.length<=1||(t=(n=I(R2(this.style.spacing),2))[0],n=n[1],t=this.ifHorizontal(t,n),t=(n=Dk(this.items,this.style.orient||"horizontal",t)).totalSize,e=n.maxItemWidth,n=n.maxItemHeight,r=this.ifHorizontal(this.style.maxWidth,this.style.maxHeight),!Qh(r)&&r!==1/0&&r<t&&(this.style.autoWrap&&"vertical"!==this.style.orient?(this.layoutButton("vertical"),this.adjustHorizontalWrap(e,n,r)):(this.layoutButton("horizontal"),this.adjustFlip(e,n,r))))},Wk.prototype.adjustFlip=function(t,e,n){this.showButtonGroup();var r=this.querySelector(".page-button-group"),i=this.style.pageSpacing,o=this.prevButton.style.size||Wk.defaultOptions.style.pageButtonSize,a=r.getLocalBounds(),s=2*a.halfExtents[0],a=2*a.halfExtents[1],e=I(this.ifHorizontal([n-(s+i),e],[t,n-(a+i)]),2),l=e[0],c=e[1];this.clipView.style.path="M-1,0 L".concat(l,",0 L").concat(l,",").concat(c," L-1,").concat(c," Z"),this.container.style.clipPath=this.clipView,r.style.x=this.ifHorizontal(n-s,0),r.style.y=this.ifHorizontal(c/2-1,c+o+i);for(var u="x"===this.ifHorizontal("x","y")?0:1,h=[0],f=1,d=0;d<this.items.length;d++){var p=this.items[d].getLocalBounds(),y=p.min;p.max[u]-function(t){if($h(t))return t[t.length-1]}(h)>this.ifHorizontal(l,c)+4&&(0!==y[u]&&h.push(y[u]),f+=1)}this.maxPages=f,this.currPage=1,this.pageOffsets=h,this.updatePageNavigatorState()},Wk.prototype.adjustHorizontalWrap=function(t,c,e){this.showButtonGroup();var n,r=this.querySelector(".page-button-group"),i=this.style,o=i.pageSpacing,o=void 0===o?0:o,a=i.cols,i=this.pageInfoBounds.width,u=this.style.maxRows||2,s=r.getLocalBounds(),s=Math.max(2*s.halfExtents[0],i),i=e-(s+o),l=c*u;function h(t,e){for(var n=1,r=0,i=[0],o=0;o<e.length;o++){var a=e[o],s=a.getLocalBounds(),l=s.min;s.max[0]-r>t&&(n+=1,r=l[0],n%u==1)&&i.push((n-1)*c),a.setLocalPosition(l[0]-r,(n-1)*c)}return i}a&&u&&(a*u<=this.items.length&&(i=e),n=e/a),this.clipView.style.path="M-1,0 L".concat(i,",0 L").concat(i,",").concat(l," L-1,").concat(l," Z"),this.container.style.clipPath=this.clipView;var f=[];if(a&&n)for(var d=I(R2(this.style.spacing),1)[0],p=0,y=0,g=0;g<this.items.length;g+=a){y=0,(p+=1)%u==1&&f.push(Math.floor(p/u)*l);for(var m=0;m<a&&g+m<this.items.length;m++)this.items[g+m].update({x:y,y:(p-1)*c,maxItemWidth:n-d}),y+=n}else 1===(f=h(i,this.items)).length&&(d=(o=I(R2(this.style.spacing),2))[0],i=o[1],y=this.ifHorizontal(d,i),Dk(this.items,this.style.orient||"horizontal",y),h(e,this.items));this.maxPages=f.length,this.currPage=1,this.pageOffsets=f,this.maxPages<=1?this.resetPageCfg():(r.style.x=e-s,r.style.y=l/2-2,this.updatePageNavigatorState())},Wk.prototype.updatePageNavigatorState=function(){this.updatePageInfo(),this.currPage===this.maxPages?this.nextButton.setState("disabled"):this.nextButton.setState("default"),1===this.currPage?this.prevButton.setState("disabled"):this.prevButton.setState("default")},Wk.prototype.updatePageButtonSymbol=function(){var t=this.style.autoWrap,t=this.ifHorizontal(t?1:0,1);this.prevButton.update({symbol:["left","up"][t]}),this.nextButton.update({symbol:["right","down"][t]})},Wk.prototype.updatePageInfo=function(){var t=this.styles.pageFormatter;S(this).select(".page-info").style("text",this.currPage&&this.maxPages?t(this.currPage,this.maxPages):"")},Wk.prototype.finished=function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},Wk.prototype.prev=function(){var t,e;this.maxPages&&this.currPage&&(t=this.style.loop,(e=this.currPage-1)<1&&(e=t?this.maxPages:1),this.goTo(e))},Wk.prototype.next=function(){var t,e,n;this.maxPages&&this.currPage&&(t=this.style.loop,e=this.maxPages,n=this.currPage+1,this.goTo(n=e<n?t?1:e:n))},Wk.prototype.goTo=function(t){var e,n,r,i,o=this;t!==this.currPage&&"idle"===this.playState&&(e=(i=this.style).effect,n=i.duration,i=i.autoWrap,r=(i=I(this.ifHorizontal(i?[0,-this.pageOffsets[t-1]]:[-this.pageOffsets[t-1],0],[0,-this.pageOffsets[t-1]]),2))[0],i=i[1],this.playState="running",this.clipView.animate([{transform:this.clipView.style.transform},{transform:"translate(".concat(-r,"px,").concat(-i,"px)")}],{duration:n,easing:e,fill:"both"}),this.container.animate([{transform:this.container.style.transform},{transform:"translate(".concat(r,"px,").concat(i,"px)")}],{duration:n,easing:e,fill:"both"}),Promise.all(this.clipView.getAnimations().map(function(t){return t.finished})).then(function(){o.currPage=t,o.updatePageNavigatorState(),o.resolveFinishedPromise(),o.playState="idle"}),this.finished())},Wk.defaultOptions={style:{spacing:[4,0],effect:"easeQuadInOut",duration:320,maxRows:2,maxCols:2,pageButtonSize:10,pageInfoSpacing:2,pageFormatter:function(t,e){return"".concat(t,"/").concat(e)},pageButtonStyle:{size:10,margin:0,padding:0,markerStyle:{fill:"black",cursor:"pointer",disabled:{fill:"#d9d9d9",cursor:"not-allowed"}},backgroundStyle:{cursor:"pointer",fill:"transparent",disabled:{cursor:"not-allowed"}}},pageTextStyle:{fontSize:12,textBaseline:"middle",textAlign:"center"}}};var Bk,zk=Wk;function Wk(t){t=Bk.call(this,F({},Wk.defaultOptions,t))||this;return t.items=[],t.maxPages=void 0,t.currPage=void 0,t.pageOffsets=[],t.playState="idle",t}function Hk(t){var e=t.items,i=t.maxWidth,o=t.maxItemWidth,a=t.itemMarker,s=t.itemName,l=t.itemValue,n=t.reverse,c=t.itemWidth,u=t.itemHeight,h=t.itemPadding,f=t.itemBackgroundStyle,d=e.slice();return n&&d.reverse(),d.map(function(t,e){return{id:t.id||"legend-item-".concat(e),state:t.state||"default",value:t,maxItemWidth:of([null!=o?o:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE]),itemMarker:(r=Jh(a)?a(t,e,d):a,F({},Ek,{symbol:t.marker,style:{fill:t.color,stroke:t.color}},r)),itemName:(r=F({},{formatter:function(){return t.name}},s),n=r.formatter,r=K(r,["formatter"]),F({},Ok,{content:n(t,e,d)},r)),itemValue:(n=F({},{formatter:function(){return t.value}},l),r=n.formatter,n=K(n,["formatter"]),F({},Sk,{content:r(t,e,d)},n)),itemWidth:c,itemHeight:u,padding:h,backgroundStyle:f};var n,r})}i(Vk,Gk=Hl),Vk.prototype.render=function(e,t){var n=e.padding,r=e.title,i=e.inset,o=e.orient,a=void 0===o?"horizontal":o,s=e.spacing,l=e.autoWrap,c=e.maxRows,u=e.maxWidth,h=e.maxHeight,f=e.cols,d=e.pageNavigator,o=e.backgroundStyle,o=void 0===o?{}:o,n=I(R2(n),4),p=n[0],y=n[1],g=n[2],n=n[3],m=kk(t,"legend-container",n,p),v=wk(m,r),r=(null==r?void 0:r.spacing)||0,i=I(R2(i),4),b=i[0],i=i[3],v=xk(v),i=(D(kk(m,"legend-inner-group",v.left+i,v.bottom+b+r),".category-items",function(){return new zk({})}).attr("className","category-items").call(function(t){t.node().update(O({orient:a,items:Hk(e),spacing:s,autoWrap:l,maxRows:c,maxWidth:u,maxHeight:h,cols:f},d||{}))}).node(),m.getLocalBounds()),v=i.min,b=i.max,r=b[0]-v[0],m=b[1]-v[1];Mk(t,"legend-background",Math.min(r+y+n,u||Number.MAX_VALUE),Math.min(m+p+g,h||Number.MAX_VALUE),o)},Vk.prototype.getItem=function(t){return this.querySelector("[id=".concat(t,"]"))},Vk.prototype.setItemState=function(t,e,n){void 0===n&&(n=!0),null!=(t=this.getItem(t))&&t.setState(e,n)},Vk.prototype.getItemsStates=function(){return this.querySelectorAll(".legend-item").map(function(t){return{id:t.id,state:t.getState()}})};var Gk,Yk=Vk;function Vk(t){return Gk.call(this,F({},_k,t))||this}function qk(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}P.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),P.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=t+.4*r;return[["M",t,e],["L",o,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",o,e-i],["Z"],["M",o,e+(n=n/6)],["L",t+r-2,e+n],["M",o,e-n],["L",t+r-2,e-n]]}),P.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=e+.4*r;return[["M",t,e],["L",t-i,o],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,o],["Z"],["M",t-(n=n/6),o],["L",t-n,e+r-2],["M",t+n,o],["L",t+n,e+r-2]]});i($k,Uk=Ea),$k.prototype.connectedCallback=function(){this.draw()},$k.prototype.attributeChangedCallback=function(){this.draw()},$k.prototype.draw=function(){this.updateBackground(),this.updateTrack()},$k.prototype.updateBackground=function(){var t=this.style.backgroundColor;this.path.style.path=this.getRailPath(),this.path.attr({fill:t,fillOpacity:.45})},$k.prototype.updateTrack=function(){var t=this.style.fill,e=(this.track.style.path=this.getRailPath(),this.getClipPath());(this.track.style.clipPath=e)&&this.track.appendChild(e),this.track.style.fill=t},Object.defineProperty($k.prototype,"box",{get:function(){var t=this.style,e=t.orient,n=t.size,t=t.length;return qk(e,[t,n],[n,t])},enumerable:!1,configurable:!0}),$k.prototype.getRailPath=function(){var t=this.style.type,e=I(this.box,2),n=e[0],e=e[1];return"size"===t?[["M",0,e],["L",0+n,0],["L",0+n,e]]:[["M",0,e],["L",0,0],["L",0+n,0],["L",0+n,e]]},$k.prototype.getClipPath=function(){var t,e,n,r,i=this.style,o=i.orient,i=i.selection;return i?(r=(t=I(this.box,2))[0],t=t[1],n=(i=I(i,2))[0],i=i[1],e=qk(o,n*r,0),n=qk(o,0,n*t),r=qk(o,i*r,r),o=qk(o,t,i*t),new Ba({style:{path:[["M",e,n],["L",e,o],["L",r,o],["L",r,n]]}})):null};var Uk,Xk=$k;function $k(t){t=Uk.call(this,Q2({},{style:Ak},t=void 0===t?{}:t))||this;return t.path=t.appendChild(new Ba({className:"rail-path"})),t.track=t.appendChild(new Ba({className:"rail-path"})),t}i(Jk,Zk=Hl),Jk.prototype.render=function(t,e){var n=t.textStyle,r=t.visibility,i=t.symbol,o=t.size,a=t.fill,s=t.stroke,l=t.lineWidth;i&&"hidden"!==r?(D(e,".handle",function(){return new P({})}).attr("className","handle").call(function(t){t.node().update({symbol:i,size:o,fill:a,stroke:s,lineWidth:l})}),D(e,".handle-text","text").attr("className","handle-text").call(A,n)):(null!=(t=e.querySelector(".handle"))&&t.remove(),null!=(r=e.querySelector(".handle-text"))&&r.remove())};var Zk,Kk=Jk;function Jk(){return null!==Zk&&Zk.apply(this,arguments)||this}i(e5,Qk=Ea),e5.prototype.connectedCallback=function(){this.init(),this.bindEvents()},e5.prototype.attributeChangedCallback=function(t,e,n){"textStyle"!==t&&"padding"!==t&&"position"!==t||this.init()},e5.prototype.hide=function(){this.style.visibility="hidden"},e5.prototype.show=function(){this.style.visibility="visible"},e5.prototype.init=function(){var t=this.style,e=t.textStyle;"top"===t.position?this.text.attr(O({textAlign:"center"},e)):this.text.attr(O({textAlign:"left"},e))},e5.prototype.updateBackground=function(){var t,e,n=this.text.getLocalBounds(),r=n.min,n=n.max,i=Math.min(n[0]-r[0],40),r=[r[0]-4,r[1]-2,r[0]+i+4,n[1]+2],o=(i=this.style.position,r=(n=I(n=r,4))[0],e=n[1],o=n[2],n=n[3],"top"===i?[["M",r,n],["L",r,e],["L",o,e],["L",o,n],["L",r+(i=o-r)/2+(t=cf(10,i/3,i/2))/2,n],["L",r+i/2,n+4],["L",r+i/2-t/2,n],["L",r,n]]:[["M",r,e],["L",o,e],["L",o,n],["L",r,n],["L",r,e+(i=n-e)/2+(t=cf(6,i/3,i/2))/2],["L",r-4,e+i/2],["L",r,e+i/2-t/2],["L",r,e]]);this.background.style.path=o},e5.prototype.bindEvents=function(){var t=this;this.text.addEventListener(v.BOUNDS_CHANGED,function(){t.updateBackground()})};var Qk,t5=e5;function e5(t){t=Qk.call(this,Q2({},{style:{visibility:"hidden"}},t=void 0===t?{}:t))||this;return t.background=t.appendChild(new Ba({style:{lineCap:"round",fill:"#262626",lineWidth:1,stroke:"#333"}})),t.text=t.appendChild(new Ua({style:{text:"",fill:"#fff",fontSize:10,textBaseline:"middle"}})),t}function n5(t,e){var t=I(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}function r5(t,e,n,r,i){var o=I(qk(t,["dx","dy"],["dy","dx"]),2),a=o[0],o=o[1],s={};return s[a]=e,s[o]="start"===n?-i:r+i,s.textAlign=qk(t,"center","start"===n?"right":"left"),s.textBaseline=qk(t,"start"===n?"bottom":"top","middle"),s}function i5(t,e){var n,s,l,c,r,i,o,u=t.min,h=t.max,a=t.handle,f=t.orient,d=void 0===f?"horizontal":f;return null===t.label||a?[]:(s=Q2({size:24,length:200},Ak,t.rail||{}),f=Q2({},Pk,t.label||{}),l=f.align,c=f.spacing,"rail"===l?(t=(a=I(qk(d,["dx","dy"],["dy","dx"]),2))[0],f=a[1],r=(a=I(qk(d,["right","left"],["center","center"]),2))[0],a=a[1],i=(o=I(qk(d,["middle","middle"],["bottom","top"]),2))[0],o=o[1],[((n={id:"legend-label-0",text:"".concat(u)})[t]=-c,n[f]=s.size/2,n.textAlign=r,n.textBaseline=i,n),((r={id:"legend-label-1",text:"".concat(h)})[t]=s.length+c,r[f]=s.size/2,r.textAlign=a,r.textBaseline=o,r)]):e.map(function(t,e){a=t,n=u,r=h,i=s;var n,r,i,o=(o=void 0!==o&&o)?a*(r-n)/i.length:P2((a-n)*(n<r?i.length/(r-n):0),2),a=r5(d,o,l,s.size,c);return O({id:"legend-label-".concat(e),text:"".concat(t)},a)}))}var o5=Pf(function(t){return t.sort(function(t,e){return t-e})},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return JSON.stringify(t)});i(h5,a5=Hl),h5.prototype.render=function(t,e){var n=t.padding,r=t.title,i=t.inset,o=(t.orient,t.backgroundStyle),o=void 0===o?{}:o,a=t.maxWidth,s=t.maxHeight,l=t.label,n=I(R2(n),4),c=n[0],u=n[1],h=n[2],n=n[3],f=kk(e,"legend-container",n,c),d=wk(f,r),r=(null==r?void 0:r.spacing)||0,i=I(R2(i),4),p=i[0],i=i[3],d=xk(d),i=kk(f,"legend-inner-group",d.left+i,d.bottom+p+r),d=i5(t,this.ticks),p=(Mw(i,"legend-label",d,l,{fill:"#2C3542",fillOpacity:.65,fontWeight:"normal"}),this.drawInner(),f.getLocalBounds()),r=p.min,t=p.max,i=t[0]-r[0],d=t[1]-r[1];Mk(e,"legend-background",Math.min(i+u+n,a||Number.MAX_VALUE),Math.min(d+c+h,s||Number.MAX_VALUE),o)},h5.prototype.drawInner=function(){this.drawRail(),this.drawHandles(),this.createIndicator()},Object.defineProperty(h5.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(h5.prototype,"selection",{get:function(){var t=this.style,e=t.min,n=t.max;return[t.start||e,t.end||n]},enumerable:!1,configurable:!0}),Object.defineProperty(h5.prototype,"labelsCfg",{get:function(){var t=this.style.label;return Q2({},Pk,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(h5.prototype,"railCfg",{get:function(){var t=this.style.rail;return Q2({size:24,length:200},Ak,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(h5.prototype,"handleCfg",{get:function(){var t=this.style,e=t.handle,t=t.label;return Q2({},Tk,e||{},{textStyle:this.labelsCfg.style,spacing:this.labelsCfg.spacing,visibility:e&&null!==t?"visible":"hidden"})},enumerable:!1,configurable:!0}),h5.prototype.ifHorizontal=function(t,e){return qk(this.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Object.defineProperty(h5.prototype,"color",{get:function(){var t,e,i,o,a,n=this.style.color,n=Array.from(void 0===n?[]:n),r=n.length;return r?this.railCfg.chunked?(t=this.ticks,e=this.orient,i=Array.from(n),o=i.length,a=t.length,t.reduce(function(t,e,n){var r=i[n%o];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===e?"0":"270",")"))):n.reduce(function(t,e,n){return t+" ".concat(n/(r-1),":").concat(e)},"l(".concat(this.ifHorizontal("0","270"),")")):""},enumerable:!1,configurable:!0}),Object.defineProperty(h5.prototype,"slidable",{get:function(){return!!this.style.handle},enumerable:!1,configurable:!0}),Object.defineProperty(h5.prototype,"ticks",{get:function(){var t=this.style,e=t.min,t=t.max;return o5(Ee(Ee([e],I(this.railCfg.ticks||[]),!1),[t],!1))},enumerable:!1,configurable:!0}),h5.prototype.drawRail=function(){var t=this.style,e=t.orient,n=t.min,t=t.max,r=I(this.selection,2),i=r[0],r=r[1],o=this.querySelector(".legend-inner-group");this.rail=S(this.rail||o.appendChild(new Xk)).attr("className","legend-rail").call(A,O(O({},this.railCfg),{fill:this.color,orient:e})).style("selection",this.slidable?[(i-n)/(t-n),(r-n)/(t-n)]:void 0).node()},h5.prototype.drawHandles=function(){var t=I(this.selection,2),e=t[0],t=t[1];this.startHandle=this.drawHandle("start",e),this.endHandle=this.drawHandle("end",t)},h5.prototype.drawHandle=function(t,e){var n=this,r=this.labelsCfg,i=r.align,r=r.spacing,o=this.railCfg.size,a=this.handleCfg.size,s=this.getOffset(e),l=r5(this.orient,s,i,o,-a/3),c=l.dx,u=l.dy,h=r5(this.orient,s,i,o,"start"===i?r:a/3+r),l="start"===t?this.startHandle:this.endHandle,s=this.querySelector(".legend-inner-group");return S(l||s.appendChild(new Kk({}))).attr("className","legend-handle-".concat(t)).call(function(t){return t.node().update(O(O({},n.handleCfg),{x:c,y:u,symbol:n.ifHorizontal("horizontalHandle","verticalHandle"),textStyle:O({text:"".concat(null!=e?e:""),x:+h.dx-+c,y:+h.dy-+u,textAlign:h.textAlign,textBaseline:h.textBaseline},n.handleCfg.textStyle)}))}).node()},h5.prototype.createIndicator=function(){this.indicator=this.appendChild(new t5({zIndex:2,className:"legend-indicator",style:{position:this.ifHorizontal("top","right")}}))},h5.prototype.bindEvents=function(){var n=this,t=new Map;t.set("rail",this.rail),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){t.addEventListener("mousedown",n.onDragStart(e)),t.addEventListener("touchstart",n.onDragStart(e))}),this.startHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.endHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.rail.addEventListener("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},h5.prototype.showIndicator=function(t,e){var n,r,i,o,a,s,l;void 0===e&&(e="".concat(t)),"number"!=typeof t?this.hideIndicator():(this.indicator.show(),l=this.querySelector(".legend-container"),n=(r=this.style).min,r=r.max,t=cf(t,n,r),n=this.ifHorizontal(this.getOffset(t),this.railCfg.size+12),r=this.ifHorizontal(-14,this.getOffset(t)),i=(t=this.rail.getBBox()).x,t=t.y,o=(a=l.getBBox()).x,a=a.y,s=(l=I(l.getLocalPosition(),2))[0],l=l[1],this.indicator.style.x=i-o+s+n,this.indicator.style.y=t-a+l+r,this.indicator.style.textStyle={text:e})},h5.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.hide()},h5.prototype.onDragEnd=function(){this.style.cursor="default",this.removeEventListener("mousemove",this.onDragging),this.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd)},h5.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},h5.prototype.setSelection=function(t,e){this.updateSelection(t,e)},h5.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,o,a,s,l=I(this.selection,2),c=l[0],l=l[1],t=I([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.style),c=n.min,l=n.max,u=I((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=I(n,2))[0],n=n[1],o=(c=I(c,2))[0],c=c[1],a=(l=I(l,2))[0],l=l[1],c=(o=I([o,c],2))[0],s=(o=o[1])-c,o<c&&(c=(u=I([o,c],2))[0],o=u[1]),n-i<s?[i,n]:c<i?a===i&&l===o?[i,o]:[i,s+i]:n<o?l===n&&a===c?[c,n]:[n-s,n]:[P2(c,r),P2(o,r)]),2),e=u[0],t=u[1];this.update({start:e,end:t}),this.dispatchSelection()},Object.defineProperty(h5.prototype,"step",{get:function(){var t=this.attributes,e=t.step,n=t.min,t=t.max;return bf(e)?P2(.01*(t-n),0):e},enumerable:!1,configurable:!0}),h5.prototype.getTickValue=function(t){return this.railCfg.chunked?n5(this.ticks,t).tick:(e=this.step,(n=this.style.min)+Math.round((t-n)/e)*e);var e,n},h5.prototype.getValueByCanvasPoint=function(t,e){var n=this.style,r=n.min,n=n.max,i=I(this.rail.getPosition(),2),o=i[0],i=i[1],o=this.ifHorizontal(o,i),i=this.ifHorizontal.apply(this,Ee([],I(W2(t)),!1));return cf(this.getOffset(i-o,!0)+r,r,n)},h5.prototype.getOffset=function(t,e){var n=this.style,r=n.min,n=n.max;return(e=void 0!==e&&e)?t*(n-r)/this.railCfg.length:P2((t-r)*(r<n?this.railCfg.length/(n-r):0),2)},h5.prototype.dispatchSelection=function(){var t=new ia("valueChanged",{detail:{value:this.selection}});this.dispatchEvent(t)},h5.prototype.dispatchIndicated=function(t,e){t=new ia("onIndicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([ix(20)],h5.prototype,"dispatchSelection",null),t([ix(20)],h5.prototype,"dispatchIndicated",null);var a5,s5,l5,c5,u5=h5;function h5(t){var o=a5.call(this,Q2({type:"continuous-legend"},Lk,t))||this;return o.onHovering=function(t){t.stopPropagation();var e,t=o.getValueByCanvasPoint(t);Cf(o.attributes,["rail","chunked"])?(e=n5(o.ticks,t).range,o.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),o.dispatchIndicated(t,e)):(e=o.getTickValue(t),o.showIndicator(e),o.dispatchIndicated(e))},o.onDragStart=function(e){return function(t){t.stopPropagation(),o.slidable&&(o.target=e,o.prevValue=o.getTickValue(o.getValueByCanvasPoint(t)),o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),o.addEventListener("mouseleave",o.onDragEnd),o.addEventListener("mouseup",o.onDragEnd),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd))}},o.onDragging=function(t){var e=o.target,n=(o.updateMouse(),I(o.selection,2)),r=n[0],n=n[1],t=o.getTickValue(o.getValueByCanvasPoint(t)),i=t-o.prevValue;"start"===e?r!==t&&o.updateSelection(t,n):"end"===e?n!==t&&o.updateSelection(r,t):"rail"===e&&0!=i&&(o.prevValue=t,o.updateSelection(i,i,!0))},o}function f5(t){s5||(s5=document.createElement("table"),c5=document.createElement("tr"),l5=/^\s*<(\w+|!)[^>]*>/,c5={tr:document.createElement("tbody"),tbody:s5,thead:s5,tfoot:s5,td:c5,th:c5,"*":document.createElement("div")});var e=l5.test(t)&&RegExp.$1,e=(e&&e in c5||(e="*"),c5[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var d5,Uo="tooltip",p5="tooltip-title",y5="tooltip-list",n="tooltip-list-item",Al="tooltip-list-item-name",Pl="tooltip-list-item-marker",e="tooltip-list-item-name-label",Sl="tooltip-list-item-value",a="tooltip-crosshair-x",Tl="tooltip-crosshair-y",Go={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},Vo=((Yo={})[".".concat(Uo)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},Yo[".".concat(p5)]={color:"rgba(0, 0, 0, 0.45)"},Yo[".".concat(y5)]={margin:"0px","list-style-type":"none",padding:"0px"},Yo[".".concat(n)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},Yo[".".concat(Pl)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},Yo[".".concat(Al)]={display:"flex","align-items":"center","max-width":"216px"},Yo[".".concat(e)]=O({flex:1},Go),Yo[".".concat(Sl)]=O({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Go),Yo[".".concat(a)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},Yo[".".concat(Tl)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},Yo),g5=(i(m5,d5=Hl),Object.defineProperty(m5.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(m5.prototype,"position",{set:function(t){var t=I(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(m5.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(m5.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,o=t.index,t=K(t,["name","value","color","index"]);return O({name:n,value:r,color:i,index:void 0===o?e:o},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(m5.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(f5((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty(m5.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return lf(t)?q2(t):xf(t)?t:Jh(t)?q2(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),m5.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},m5.prototype.update=function(t){this.attr(F({},this.attributes,t)),this.render(this.attributes,this)},m5.prototype.clear=function(){this.element.innerHTML=""},m5.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},m5.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},m5.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},m5.prototype.initShape=function(){var t=this.attributes.template.container;this.element=f5(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},m5.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(p5)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=y5,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=I(t,2),e=t[0],n=t[1];Ee([r],I(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},m5.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=I(e.offset,2),i=e[0],o=e[1],e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=I(c,2),n=e[0],e=e[1],t=I(a[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+o)*t]}),c},m5.prototype.setOffsetPosition=function(t){var t=I(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,o=n.x,n=n.y;this.element.style.left="".concat(r+o+e,"px"),this.element.style.top="".concat(i+n+t,"px")},m5.prototype.updatePosition=function(){this.throttleUpdatePosition()},m5.prototype.autoPosition=function(t){var e,n,r,i,o,a,s,t=I(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,h=c.y,f=c.autoPosition,c=c.bounding;return f?(e=(f=this.element).offsetWidth,f=f.offsetHeight,h=(u=I([u+l,h+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,o={left:h<s,right:s+c.width<h+e,top:u<i,bottom:i+c.height<u+f},a=[],n.split("-").forEach(function(t){a.push(o[t]?r[t]:t)}),s=a.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},m5.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},m5.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},m5.tag="tooltip",m5.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(Uo,'"></div>'),title:'<div class="'.concat(p5,'"></div>'),item:'<li class="'.concat(n,'" data-index={index}>\n <span class="').concat(Al,'">\n <span class="').concat(Pl,'" style="background:{color}"></span>\n <span class="').concat(e,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Sl,'" title="{value}">{value}</span>\n </li>')},style:Vo}},m5);function m5(t){var e=d5.call(this,F({},m5.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=Wf(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var v5,b5={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function x5(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function w5(t){return v5.call(this,F({},w5.defaultOptions,t))||this}i(w5,v5=Hl),w5.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,o=t.spacing,r=t.disabled,a=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=D(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=Cf(b5,n,b5.default),c=n.sizeStyle,u=n.tagStyle,h=r?"no-drop":"pointer",n=a?"#1890FF":"#00000040",f=c,d=a?t:s,p=((t||s)&&D(e,".switch-tag",function(){return new dx({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(F({cursor:h,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);f=O(O({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:f.height},n={width:i,height:r},i=f.radius,r=a,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===a?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),D(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",h).style("fillOpacity",r?.4:1).call(A,f).node()),y=D(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(A,f).node();D(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",h).call(function(t){var e,t=t.node(),n=x5(p,o,a),r=x5(p,o,!a);t.attr("x")&&!Bf(n,r)&&i.checked!==a?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=y.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),y.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!a},w5.defaultOptions={type:w5.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var k5,Xo={text:"",type:"primary",height:20,width:20,buttonStyle:{default:{lineWidth:0,fill:"#fff"},active:{fill:"#fff"},disabled:{fill:"#fff"}},markerStyle:{default:{fill:"black",size:10},disabled:{fill:"#8c8c8c"}}};function M5(t){var t=k5.call(this,F({},M5.defaultOptions,t))||this,e=(t.playState="idle",t.attributes),n=e.view,e=e.initPageNum;return t.currPage=e,t.view=n,t.init(),t}i(M5,k5=Hl),Object.defineProperty(M5.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"maxPages",{get:function(){var t=this.attributes,e=t.pageWidth,n=t.pageHeight,r=t.orient,i=t.pageLimit;return t.pageCallback||i!==1/0?i:"horizontal"===r?Math.ceil(this.width/e):Math.ceil(this.height/n)},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"view",{get:function(){return this.fullView},set:function(t){var e=this.attributes,n=e.width,e=e.height;t.setLocalPosition(0,0),this.fullView=t,n&&e||(e=(n=Y2(t)).width,t=n.height,this.width=e,this.height=t)},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"width",{get:function(){var t=this.attributes.width;return t||this.viewWidth},set:function(t){this.viewWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"height",{get:function(){var t=this.attributes.height;return t||this.viewHeight},set:function(t){this.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"btnPosition",{get:function(){var t;return null!=(t=this.style.button)&&t.position?this.style.button.position:"horizontal"===this.style.orient?"right":"bottom"},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"defaultShape",{get:function(){return["left","right","left-right"].includes(this.btnPosition)?["left","right"]:["up","down"]},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"buttonCfg",{get:function(){var t=I(this.defaultShape,2),e=t[0],t=t[1],n=this.attributes.button,r=n.prev,n=n.next;return{prev:O({marker:e},r),next:O({marker:t},n)}},enumerable:!1,configurable:!0}),M5.prototype.render=function(t,e){},M5.prototype.init=function(){this.initShape(),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},M5.prototype.update=function(t){var e=t.view;e&&(this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.currPage=this.attributes.initPageNum,this.view=e,this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack()),this.attr(F({},this.attributes,t)),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},M5.prototype.clear=function(){this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.fullView=void 0,this.removeChildren()},M5.prototype.destroy=function(){this.removeChildren(),k5.prototype.destroy.call(this)},M5.prototype.goTo=function(t){var e,n,r,i,o,a,s,l,c,u,h=this;return"idle"===this.playState&&(e=(n=this.attributes).effect,n=n.duration,r=(c=this.calcRelativePagingOffset(t)).viewFromX,i=c.viewFromY,o=c.viewToX,a=c.viewToY,u=c.clipFromX,s=c.clipFromY,l=c.clipToX,c=c.clipToY,this.playState="running",this.clipView.animate([{transform:"translate(".concat(u,"px, ").concat(s,"px)")},{transform:"translate(".concat(l,"px, ").concat(c,"px)")}],{duration:n,easing:e,fill:"both"}),null!=(u=this.view.animate([{transform:"translate(".concat(r,"px, ").concat(i,"px)")},{transform:"translate(".concat(o,"px, ").concat(a,"px)")}],{duration:n,easing:e,fill:"both"})))&&u.finished.then(function(){h.currPage=t,h.updateButtonState(),h.resolveFinishedPromise(),h.playState="idle"}),this.finished},M5.prototype.prev=function(){var t=this.attributes.loop,e=this.currPage-1;return e<1&&(e=t?this.maxPages:1),this.goTo(e)},M5.prototype.next=function(){var t=this.attributes.loop,e=this.maxPages,n=this.currPage+1;return this.goTo(n=e<n?t?1:e:n)},M5.prototype.initShape=function(){this.clipView=new Va({name:"clipView",style:{x:0,y:0,width:0,height:0}}),this.view.style.clipPath=this.clipView,this.view.appendChild(this.clipView),this.appendChild(this.view),this.view.toBack();var t=I(this.defaultShape,2),e=t[0],t=t[1];this.prevButton=new xx({name:"prevButton",style:O(O({},M5.defaultOptions.style.button.prev),{marker:e,onClick:this.prev.bind(this)})}),this.appendChild(this.prevButton),this.nextButton=new xx({name:"nextButton",style:O(O({},M5.defaultOptions.style.button.next),{marker:t,onClick:this.next.bind(this)})}),this.appendChild(this.nextButton),this.paginationGroup=new La({name:"paginationGroup"}),this.appendChild(this.paginationGroup)},M5.prototype.updateView=function(){var t=this.getClipViewSpace(this.currPage),e=t.width,t=t.height;this.clipView.attr({width:e,height:t}),this.view.setLocalPosition(0,0),this.clipView.setLocalPosition(0,0)},M5.prototype.updateButton=function(){var t=this.buttonCfg,e=t.prev,t=t.next;e&&this.prevButton.update(e),t&&this.nextButton.update(t)},M5.prototype.updateButtonState=function(){this.attributes.loop?(this.nextButton.setState("default"),this.prevButton.setState("default")):(this.nextButton.setState(this.currPage===this.maxPages?"disabled":"default"),this.prevButton.setState(1===this.currPage?"disabled":"default"))},M5.prototype.getClipViewSpace=function(t){var e=this.attributes,n=e.orient,r=e.pageWidth,i=e.pageHeight,e=e.pageCallback,o={x:0,y:0,width:r,height:i},a=this.maxPages;return e?O(O({},o),e(t)):(a<t||t<1||("vertical"===n?o.y=(t-1)*i:"horizontal"===n&&(o.x=(t-1)*r)),o)},M5.prototype.absolute2Relative=function(t,e){var n=this.currPage,n=this.getClipViewSpace(n);return[t+n.x,e+n.y]},M5.prototype.getViewPosition=function(t){var e=this.getClipViewSpace(1),n=e.x,e=e.y,t=this.getClipViewSpace(t),n=I([-t.x+n,-t.y+e],2);return{x:n[0],y:n[1]}},M5.prototype.getRelativeViewPosition=function(t){var t=this.getViewPosition(t),e=t.x,t=t.y,e=I(this.absolute2Relative(e,t),2);return{x:e[0],y:e[1]}},M5.prototype.calcRelativePagingOffset=function(t){var e=I(this.absolute2Relative.apply(this,Ee([],I(this.view.getLocalPosition().slice(0,2)),!1)),2),n=e[0],e=e[1],t=this.getRelativeViewPosition(t),r=t.x,t=t.y,i=I([-n,-e],2),o=i[0],i=i[1],a=I([-r,-t],2);return{viewFromX:n,viewFromY:e,viewToX:r,viewToY:t,clipFromX:o,clipFromY:i,clipToX:a[0],clipToY:a[1]}},M5.prototype.adjustLayout=function(){this.adjustButton()},M5.prototype.adjustButton=function(){var t,e=this.attributes,n=e.button,r=e.pageWidth,e=e.pageHeight,i=this.btnPosition,n=(null==n?void 0:n.spacing)||0,o=Y2(this.prevButton),a=o.width,o=o.height,s=Y2(this.nextButton),l=s.width,s=s.height,c=0,u=0,h=0,f=0;"left-right"===i?(c=-(n+a),u=(e-o)/2,h=n+r,f=(e-s)/2):"top-bottom"===i?(c=(r-a)/2,u=-(n+o),h=(r-l)/2,f=n+e):"top"===i?(c=(r-n)/2-a,u=-(n+(t=rf([o,s]))),h=(r+n)/2,f=-(n+t)):"bottom"===i?(c=(r-n)/2-a,h=(r+n)/2,f=u=n+e):"left"===i?(c=(h=-(n+l))-(n+a),f=u=(e-(t=rf([o,s])))/2):"right"===i&&(h=(c=n+r)+a,f=u=(e-(t=rf([o,s])))/2),this.prevButton.setLocalPosition(c,u),this.nextButton.setLocalPosition(h,f)},M5.defaultOptions={type:M5.tag="page-navigator",style:{x:0,y:0,effect:"linear",duration:200,orient:"horizontal",initPageNum:1,pageLimit:1/0,loop:!1,button:{prev:O({spacing:0},Xo),next:O({spacing:0},Xo),style:{default:{},active:{},disabled:{}},spacing:5},pagination:{type:"currTotal",style:{default:{},active:{}},separator:"/",spacing:5}}},P.registerSymbol("left",function(t,e,n){return[["M",t-n,e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),P.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]}),P.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n],["L",t+n,e+n],["Z"]]}),P.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n],["Z"]]});var E5,O5,S5,_5,$o={text:{text:""},lineStyle:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,lineDash:[5,5]}},Zo=Q2({},$o,{type:"line",text:{position:"start",align:"center",verticalAlign:"bottom"}}),Ko=Q2({},$o,{type:"circle",defaultRadius:0}),Jo=Q2({},$o,{type:"polygon",defaultRadius:0,startAngle:0}),Qo=(i(A5,E5=Hl),Object.defineProperty(A5.prototype,"localPointer",{get:function(){var t=I(this.getPosition(),2),e=t[0],t=t[1],n=I(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(A5.prototype,"tagCfg",{get:function(){var t=this.attributes.text;return t.position,K(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(A5.prototype,"crosshairCfg",{get:function(){var t=this.attributes.lineStyle;return O(O({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),A5.prototype.render=function(t,e){var n=this,e=D(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=D(e,".crosshair-tag",function(){return new dx({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=D(e,".crosshair-path","path").attr("className","crosshair-path").call(A,this.crosshairCfg).node(),this.adjustLayout()},A5.prototype.update=function(t){this.attr(F({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},A5.prototype.setPointer=function(t){this.pointer=t},A5.defaultOptions={type:A5.tag="crosshair-base",style:$o},A5);function A5(t){return E5.call(this,F({},A5.defaultOptions,t))||this}function P5(t){return O5.call(this,Q2({},P5.defaultOptions,t))||this}function T5(t){return S5.call(this,Q2({},T5.defaultOptions,t))||this}function L5(t){return _5.call(this,Q2({},L5.defaultOptions,t))||this}i(P5,O5=Qo),Object.defineProperty(P5.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=I(t.startPos,2),n=e[0],e=e[1],t=I(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(P5.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=I(this.getPosition(),2))[0],e=e[1],[(n=I(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(P5.prototype,"isVertical",{get:function(){var t=this.attributes,e=I(t.startPos,2),n=e[0],e=e[1],t=I(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(P5.prototype,"tagShapeSpace",{get:function(){var t=Y2(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),P5.prototype.update=function(t){O5.prototype.update.call(this,t)},P5.prototype.setPointer=function(t){O5.prototype.setPointer.call(this,t),this.adjustPosition()},P5.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},P5.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},P5.prototype.adjustPosition=function(){var t=I(this.localPointer,2),e=t[0],t=t[1],n=I(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},P5.prototype.adjustTag=function(){var t,e,n=this.attributes,r=n.text,i=I(n.startPos,2),o=i[0],i=i[1],n=I(n.endPos,2),a=n[0],n=n[1];r&&""!==r?(this.tagShape.show(),r=r.position,e=(t=this.tagShapeSpace).width,t=t.height,o=(a=I(this.getOrientVal({start:[-e/2,t/2],end:[a-o+e/2,t/2]},{start:[0,0],end:[0,n-i+t]})[r],2))[0],e=a[1],this.tagShape.setLocalPosition(o,e)):this.tagShape.hide()},P5.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},P5.defaultOptions={type:P5.tag="line-crosshair",style:Zo},t([ix(20)],P5.prototype,"setPointer",null),i(T5,S5=Qo),Object.defineProperty(T5.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),T5.prototype.update=function(t){S5.prototype.update.call(this,t)},T5.prototype.setPointer=function(t){var t=I(t,2),e=t[0],t=t[1],e=(S5.prototype.setPointer.call(this,[e,t]),I(this.localPointer,2)),t=e[0],e=e[1],n=I(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},T5.prototype.adjustLayout=function(){this.tagShape.hide()},T5.prototype.createCirclePath=function(t){var e=this.attributes,n=I(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return ax(r,n,t||e)},T5.defaultOptions={type:T5.tag="circle-crosshair",style:Ko},t([ix(20)],T5.prototype,"setPointer",null),i(L5,_5=Qo),Object.defineProperty(L5.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),L5.prototype.update=function(t){_5.prototype.update.call(this,t)},Object.defineProperty(L5.prototype,"points",{get:function(){for(var t,e,n,r,i,o,a=this.attributes,s=a.startAngle,l=a.sides,c=2*Math.PI/l,u=[1,0],h=[],f=0;f<l;f+=1)h.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*f,o=i=void 0,i=e[0]-n[0],e=e[1]-n[1],o=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*o+n[0],t[1]=i*o+e*r+n[1],t));return h},enumerable:!1,configurable:!0}),L5.prototype.setPointer=function(t){var t=I(t,2),e=t[0],t=t[1],e=(_5.prototype.setPointer.call(this,[e,t]),I(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=I(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=rx(n,[t,e])/rx(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},L5.prototype.adjustLayout=function(){this.tagShape.hide()},L5.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=I(t.center,2),o=t[0],a=t[1],t=this.points.map(function(t,e){var t=I(t,2),t=I(ye([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",o+n,a+t]});return t.push(["Z"]),t},L5.prototype.intersection=function(t){for(var e,n,r,i,o,a,s,l,t=I(t,2),c=t[0],u=t[1],h=this.points,t=I(this.attributes.center,2),f=t[0],d=t[1],p=1;p<=h.length;p+=1){var y=I(h[p-1],2),g=y[0],y=y[1],m=I(h[p%h.length],2),v=m[0],m=m[1],g=(i=[f,d],g=[g+f,y+d],y=[v+f,m+d],l=s=a=o=m=v=void 0,m=(r=I(r=[c,u],2))[0],r=r[1],o=(i=I(i,2))[0],i=i[1],a=(g=I(g,2))[0],g=g[1],s=(y=I(y,2))[0],y=y[1],l=[],(y-g)*(o-m)==(i-r)*(s-a)?(i-r)*(a-m)==(g-r)*(o-m)&&(ex(m,o,r,i,a,g)&&nx(l,a,g),ex(m,o,r,i,s,y)&&nx(l,s,y),ex(a,s,g,y,m,r)&&nx(l,m,r),ex(a,s,g,y,o,i))&&nx(l,o,i):(v=(m*(i-r)+g*(o-m)-r*(o-m)-a*(i-r))/((s-a)*(i-r)-(o-m)*(y-g)),0<=(y=(a*(y-g)+r*(s-a)-g*(s-a)-m*(y-g))/((o-m)*(y-g)-(s-a)*(i-r)))&&y<=1&&0<=v&&v<=1&&(l[0]=m+y*(o-m),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=I(g,2))[0],n=s[1])}return[e,n]},L5.defaultOptions={type:L5.tag="polygon-crosshair",style:Jo},t([ix(20)],L5.prototype,"setPointer",null);i(F5,N5=N),Object.defineProperty(F5.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&tf(t)?t.map(function(t){return tf(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(F5.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(F5.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(F5.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(F5.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(F5.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(F5.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=I(t,2),n=t[0],t=t[1];return"wavy"===t?O({path:r.getWavyPath(n)},i):"double"===t?O({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},O(O({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),F5.prototype.update=function(t){var e=this;this.attr(Q2({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new Ba({style:t}))})},F5.prototype.clear=function(){this.removeChildren()},F5.prototype.getLinePos=function(t){var e=I(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,o=i.height,i=i.fontSize,a=I([0,0],2),s=a[0],a=a[1],a=("overline"===t?(s=(n=I([0,o*n-i/2],2))[0],n):"line-through"===t?(s=(n=I([0,o*r],2))[0],n):(s=(t=I([0,o*e+i/2],2))[0],t))[1];return[s,a]},F5.prototype.getLinePath=function(t){var e=this.attributes.width,t=I(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},F5.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=I(this.getLinePos(t),2),o=i[0],i=i[1],a=I([0,0],2),s=a[0],a=a[1];return"line-through"===t&&(s=(e=I([-.5,.5],2))[0],a=e[1]),"underline"===t?(s=(e=I([0,1],2))[0],a=e[1]):"overline"===t&&(s=(e=I([1,0],2))[0],a=e[1]),[["M",o,i+n*s],["L",o+r,i+n*s],["M",o,i+n*a],["L",o+r,i+n*a]]},F5.prototype.getWavyPath=function(t){return[]},F5.tag="decoration",F5.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var N5,C5,j5=F5;function F5(t){t=N5.call(this,Q2({},F5.defaultOptions,t))||this;return t.update({}),t}function R5(t){t=C5.call(this,Q2({},R5.defaultOptions,t))||this;return t.init(),t}i(R5,C5=Hl),Object.defineProperty(R5.prototype,"textWidth",{get:function(){var e=this;return rf(this.renderText.split("\n").map(function(t){return O2(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"textHeight",{get:function(){return Y2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"height",{get:function(){var t=this.attributes.height;return uf(t)&&0!==t?t:Y2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return A2(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:A2(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return E2(t,uf(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&uf(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"font",{get:function(){return jf(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return O(O(O({},D2),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return O({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return Q2({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(R5.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),R5.prototype.init=function(){this.initShape(),this.update({})},R5.prototype.update=function(t){this.attr(Q2({},this.attributes,t)),this.render()},R5.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new j5({style:t}))})},R5.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},R5.prototype.initShape=function(){this.backgroundShape=new Va({name:"background",style:{width:0,height:0}}),this.decorationGroup=new La({name:"decoration-group"}),this.textShape=new Ua({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},R5.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&uf(n)&&"clip"===e&&(this.clipRect=new Va({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},R5.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;uf(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},R5.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},R5.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},R5.defaultOptions={type:R5.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var I5,ta=O(O({},D2),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),D5={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},B5={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function z5(t){return I5.call(this,F({},z5.defaultOptions,t))||this}i(z5,I5=Hl),z5.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,o=t.checked,t=t.spacing,o=(this.checked=!!o,D(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=_f({},this.checked?D5.selected:D5.default,r),r=_f({},B5,i),t=(this.checkboxBoxShape=D(o,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(o.style.zIndex||0)-1).call(A,e).node(),D(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(A,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;D(o,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(A,n)},z5.defaultOptions={type:z5.tag="checkbox",style:{x:0,y:0,label:O({text:""},ta),spacing:4,checked:!1}};var W5="gui-poptip",H5="gui-poptip-arrow",G5="gui-poptip-text",Y5=((l={})[".".concat(W5)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},l[".".concat(G5)]={"text-align":"center"},l[".".concat(W5,"[data-position='top']")]={transform:"translate(-50%, -100%)"},l[".".concat(W5,"[data-position='left']")]={transform:"translate(-100%, -50%)"},l[".".concat(W5,"[data-position='right']")]={transform:"translate(0, -50%)"},l[".".concat(W5,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},l[".".concat(W5,"[data-position='top-left']")]={transform:"translate(0,-100%)"},l[".".concat(W5,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},l[".".concat(W5,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},l[".".concat(W5,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},l[".".concat(W5,"[data-position='right-top']")]={transform:"translate(0, 0)"},l[".".concat(W5,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},l[".".concat(W5,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},l[".".concat(W5,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},l[".".concat(H5)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},l[".".concat(W5,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},l["[data-position='top'] .".concat(H5)]={bottom:"-2px"},l[".".concat(W5,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},l["[data-position='left'] .".concat(H5)]={right:"-2px"},l[".".concat(W5,"[data-position='right']")]={transform:"translate(5px, -50%)"},l["[data-position='right'] .".concat(H5)]={left:"-2px"},l[".".concat(W5,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},l["[data-position='bottom'] .".concat(H5)]={top:"-2px"},l[".".concat(W5,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},l["[data-position='top-left'] .".concat(H5)]={left:"10px",bottom:"-2px"},l[".".concat(W5,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},l["[data-position='top-right'] .".concat(H5)]={right:"10px",bottom:"-2px"},l[".".concat(W5,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},l["[data-position='left-top'] .".concat(H5)]={right:"-2px",top:"8px"},l[".".concat(W5,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},l["[data-position='left-bottom'] .".concat(H5)]={right:"-2px",bottom:"8px"},l[".".concat(W5,"[data-position='right-top']")]={transform:"translate(5px, 0)"},l["[data-position='right-top'] .".concat(H5)]={left:"-2px",top:"8px"},l[".".concat(W5,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},l["[data-position='right-bottom'] .".concat(H5)]={left:"-2px",bottom:"8px"},l[".".concat(W5,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},l["[data-position='bottom-left'] .".concat(H5)]={top:"-2px",left:"8px"},l[".".concat(W5,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},l["[data-position='bottom-right'] .".concat(H5)]={top:"-2px",right:"8px"},l),V5=void 0;var q5;function U5(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function X5(t){var n,r;return n=U5,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(V5,t)}(t)}function $5(t){t=q5.call(this,F({style:{id:"gui-poptip"}},$5.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i($5,q5=Hl),Object.defineProperty($5.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),$5.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},$5.prototype.update=function(t){this.attr(F({},this.style,t)),this.render(this.attributes,this)},$5.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(a=(i="function"==typeof l?l.call(null,t):l).html,o=i.target,i=K(i,["html","target"]),n=_f({},u.style,i),!o&&!1!==o||(e=o),"string"==typeof a)&&(r=a),n.position),o=n.arrowPointAtCenter,a=n.follow,n=n.offset;e?(e=(t=I(function(t,e,n,r,i,o){if(void 0===i&&(i=!1),o=void 0===o?!1:o)return[t,e];var a=(o=n.getBoundingClientRect()).x,s=o.y,l=o.width,c=o.height;switch(r){case"top":return i?[a+l/2,s]:[t,s];case"left":return i?[a,s+c/2]:[a,e];case"bottom":return i?[a+l/2,s+c]:[t,s+c];case"right":return i?[a+l,s+c/2]:[a+l,e];case"top-right":case"right-top":return[a+l,s];case"left-bottom":case"bottom-left":return[a,s+c];case"right-bottom":case"bottom-right":return[a+l,s+c];default:return[a,s]}}(t.clientX,t.clientY,e,i,o,a),2))[0],o=t[1],u.showTip(e,o,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},$5.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=I(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},$5.prototype.clear=function(){this.container.innerHTML=""},$5.prototype.destroy=function(){var t,e=this;Ee([],I(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},$5.prototype.showTip=function(t,e,n){var r,i=Cf(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(G5)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},$5.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},$5.prototype.getContainer=function(){return this.container},$5.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(W5).concat(t?" ".concat(t):"")},$5.prototype.initShape=function(){var t=this,e=this.style.id;this.container=X5(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},$5.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(H5,'"></span>'));t.innerHTML=n,lf(r)?t.innerHTML+=r:r&&xf(r)&&t.appendChild(r),e&&(t.getElementsByClassName(G5)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},$5.prototype.applyStyles=function(){var t,e=Q2({},Y5,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=I(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=I(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},$5.prototype.setOffsetPosition=function(t,e,n){var n=I(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},$5.tag="poptip",$5.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:Y5,template:'<div class="'.concat(G5,'"></div>')}};function Z5(r,t,e,n){var[[t,i],[o,a]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,o=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(o=e),r<0&&(o=r),[i,o]}(r);if(t===o&&i===a)return Qv()([[0,0],[s,l]]);s=[[t-o,i-a]].concat(e).concat([[0,0]]);const c=[n[0]-o,n[1]-a],[u,h]=s;return l=c,t=u,i=h,e=kb(l,t),t=kb(t,i),i=kb(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(o=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[o,0])),Qv()(s)}const K5=Hb(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:o=r,background:a,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=K(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),h=J(e,"background"),f=h["padding"],h=K(h,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=K(d,["points"]),i=[[+i,+o],[+n,+r]],o=Q(t).maybeAppend("text","text").call(R,e).node(),n=Z5(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(R,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,o=t.parentNode,a=o.getEulerAngles(),{min:t,halfExtents:s}=(o.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return o.setEulerAngles(a),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(o,f)).call(R,a?h:{}).node(),i,p,u),r=l&&new P({id:"startMarker",style:J(e,"startMarker")}),o=c&&new P({id:"endMarker",style:J(e,"endMarker")});Q(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",o).call(R,s?d:{})}),J5=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),{color:i,text:o="",fontSize:a,rotate:e=0,transform:s=""}=e,o={text:String(o),stroke:i,fill:i,fontSize:a},[[i,a]]=t;return Q(new K5).style("x",i).style("y",a).call(R,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(R,o).call(R,l).node()}};J5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Q5=Hb(t=>{var e=K(t.attributes,["class","x","y"]);const n=J(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",o,a],["Z"]]};var[i,o]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(Q(t).maybeAppend("marker",()=>new P({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",o).call(R,e)}),tM=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),{color:i,text:o=""}=e,a={text:String(o),stroke:i,fill:i},[[e,o]]=t;return Q(new Q5).call(R,r).style("x",e).style("y",o).call(R,a).call(R,s).node()}},eM=(tM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Hb(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new Ba({})).style("d",n).call(R,i),Q(t).maybeAppend("area-path",()=>new Ba({})).style("d",e).call(R,r)}));const nM=t=>{const{curve:u,gradient:h=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:d=!1}=t,p=K(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:o}=e,n=jb(n,r,i,o),r=n["fill"],i=K(n,["fill"]),{color:o=r,seriesColor:n,seriesX:r,seriesY:a}=e,s=(e=e,s0(s=c)?(e=e["transform"],`translate(${(s=s.getCenter())[0]}, ${s[1]}) `+(e||"")):""),e=h&&n?Lb(n,r,a,h):o;const l=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:e,fill:e}),s&&{transform:s}),p);var[n,r]=function(e,n){var r=[],i=[],o=[];let a=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,h=e[t],f=e[t+l];[...h,...f].some(t=>!n(t))?a=!0:(r.push(h),i.push(f),a&&s&&(a=!1,[c,u]=s,o.push([c,h,u,f])),s=[h,f])}return[r.concat(i),o]}(t,f),a=J(p,"connect"),o=!!r.length,i=t=>Q(new Ba({})).style("d",t).call(R,l).node();return s0(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=tb().curve(eb),e=t.curve,o=t.lineX0,a=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ib(o())},delete t.lineX0,t.lineEndAngle=function(){return ib(a())},delete t.lineX1,t.lineInnerRadius=function(){return ib(s())},delete t.lineY0,t.lineOuterRadius=function(){return ib(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(rb(t)):e()._curve},t.angle((t,e)=>Eb(wb(r[e],n))).outerRadius((t,e)=>kb(r[e],n)).innerRadius((t,e)=>kb(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,o,a,s,l},!o||d&&!Object.keys(a).length?i(e(n)):o&&!d?i(e(t)):Q(new eM).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},a),p)).style("areaPath",e(t)).style("connectPath",r.map(e).join("")).node()):(s=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return tb().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f)).curve(u)(n)},!o||d&&!Object.keys(a).length?i(s(n)):o&&!d?i(s(t)):Q(new eM).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},a),p)).style("areaPath",s(t)).style("connectPath",r.map(s).join("")).node())}},rM=(nM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},o=>(t,e,n,r)=>{var i=s0(n)?yb:Zv;return nM(Object.assign({curve:i},o))(t,e,n,r)}),iM=(rM.props=Object.assign({},nM.props),t=>{const{alpha:o=.5}=t,a=K(t,["alpha"]);return(t,e,n,r)=>{var i=s0(n)?db:hb;return nM(Object.assign({curve:i.alpha(o)},a))(t,e,n,r)}}),oM=(iM.props=Object.assign({},nM.props),i=>(t,e,n,r)=>nM(Object.assign({curve:mb},i))(t,e,n,r)),aM=(oM.props=Object.assign({},nM.props),t=>{const l=t["arrowSize"],c=K(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:o,shape:a,defaultShape:s}=e,r=jb(r,o,a,s),o=r["stroke"],a=K(r,["stroke"]),{color:s=o,transform:r}=e,[e,o]=t,t=_v();return t.moveTo(...e),t.lineTo(...o),l&&([e,i]=Pb(e,o,{arrowSize:l}),t.moveTo(...o),t.lineTo(...e),t.moveTo(...o),t.lineTo(...i)),Q(new Ba).call(R,a).style("d",t.toString()).style("stroke",s).style("transform",r).call(R,c).node()}}),sM=(aM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),i=r["stroke"],o=K(r,["stroke"]),{color:a=i,transform:r}=e,[e,i]=t,t=_v();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),Q(new Ba).call(R,o).style("d",t.toString()).style("stroke",a).style("transform",r).call(R,s).node()}});sM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const lM=t=>{const{cornerRatio:u=1/3}=t,h=K(t,["cornerRatio"]);return(t,e,n,r)=>{var i,o,{mark:a,shape:s,defaultShape:l}=e,r=jb(r,a,s,l),a=r["stroke"],s=K(r,["stroke"]),{color:l=a,transform:r}=e,[e,a]=t,c=(t=e,e=a,a=n,n=u,o=_v(),s0(a)?(i=kb(t,c=a.getCenter()),i=(kb(e,c)-i)*n+i,o.moveTo(t[0],t[1]),Tb(o,t,e,c,i)):a0(a)?(o.moveTo(t[0],t[1]),o.lineTo(t[0]+(e[0]-t[0])*n,t[1]),o.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(o.moveTo(t[0],t[1]),o.lineTo(t[0],t[1]+(e[1]-t[1])*n),o.lineTo(e[0],t[1]+(e[1]-t[1])*n)),o.lineTo(e[0],e[1]),o);return Q(new Ba).call(R,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(R,h).node()}},cM=(lM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),i=r["stroke"],o=K(r,["stroke"]),{color:a=i,transform:r}=e,[e,i]=t,t=_v();return t.moveTo(e[0],e[1]),s0(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):Tb(t,e,i,Sb(e,i),kb(e,i)/2),Q(new Ba).call(R,o).style("d",t.toString()).style("stroke",a).style("transform",r).call(R,s).node()}}),uM=(cM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),i=r["stroke"],o=K(r,["stroke"]),{color:a=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return Q(new Fa).call(R,o).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",a).style("transform",i).call(R,u).node()}});uM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const hM=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:o,color:a,transform:s}=e,r=jb(r,e,i,o),{fill:e,stroke:i}=r,o=K(r,["fill","stroke"]),r=function(i,t){const o=_v();if(s0(t)){const a=t.getCenter();t=[...i,i[0]];const s=t.map(t=>kb(t,a));return t.forEach((t,e)=>{var n,r;0===e?o.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?Tb(o,r,t,a,n):o.lineTo(t[0],t[1]))}),o.closePath(),o}return n=o,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return Q(new Ba).call(R,o).style("d",r.toString()).style("stroke",a||i).style("fill",a||e).style("transform",s).call(R,l).node()}};hM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const fM=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:o,color:a,transform:s}=e,r=jb(r,e,i,o),{fill:e,stroke:i}=r,o=K(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,o]=t,a=_v();return s0(e)?(n=kb(e=e.getCenter(),t),a.moveTo(t[0],t[1]),a.quadraticCurveTo(e[0],e[1],i[0],i[1]),Tb(a,i,o,e,n),a.quadraticCurveTo(e[0],e[1],r[0],r[1]),Tb(a,r,t,e,n),a.closePath()):(a.moveTo(t[0],t[1]),a.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(t[0],t[1]),a.closePath()),a}(t,n);return Q(new Ba).call(R,o).style("d",r.toString()).style("fill",a||e).style("stroke",a||i).style("transform",s).call(R,l).node()}};fM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const dM=t=>{const g=K(t,[]);return(t,e,n,r)=>{var i,o,a,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=jb(r,e,h,f),{fill:e,stroke:h}=r,f=K(r,["fill","stroke"]),y=(r=t,t=n,n=_v(),s0(t)?([i,o]=t=t.getCenter(),a=Mb(wb(r[0],t)),s=Mb(wb(r[1],t)),y=kb(t,r[2]),l=kb(t,r[3]),c=kb(t,r[8]),u=kb(t,r[10]),t=kb(t,r[11]),n.moveTo(...r[0]),n.arc(i,o,y,a,s),n.arc(i,o,y,s,a,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,o,l,a,s),n.lineTo(...r[6]),n.arc(i,o,u,s,a,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,o,c,a,s),n.arc(i,o,c,s,a,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,o,t,a,s),n.arc(i,o,t,s,a,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return Q(new Ba).call(R,f).style("d",y.toString()).style("stroke",h).style("fill",d||e).style("transform",p).call(R,g).node()}};dM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const pM=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),{stroke:i,lineWidth:o}=r,a=K(r,["stroke","lineWidth"]),{color:r=i,size:i=o}=e,t=(o=t,s0(t=n)?(t=t.getCenter(),Uv()({startAngle:0,endAngle:2*Math.PI,outerRadius:kb(o[0],t),innerRadius:kb(o[1],t)})):Qv().x(t=>t[0]).y(t=>t[1])(o)),o=(o=n,n=e.transform,s0(o)?([o,e]=o.getCenter(),`translate(${o}, ${e}) `+(n||"")):n);return Q(new Ba({})).call(R,a).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",o).call(R,s).node()}};function yM(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}pM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const gM=Hb(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=K(e,["points","class","endMarker","direction"]),i=J(e,"endMarker"),n=(n=n,Qv().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new P({className:"marker",style:Object.assign(Object.assign({},i),{symbol:yM})}):null).call(R,e)});const mM=t=>{const{offset:s=0,connectLength1:l}=t,c=K(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=jb(r,i,o,a),{fill:i,stroke:o=i,connectLength1:a=l}=r,i=K(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[o,a]]=e;if(a0(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,a],[o+l,a]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[o,s],[o,a+l]]}(n,t,s,a);return Q(new gM).call(R,i).style("points",n).style("stroke",r||o).style("transform",e).call(R,c).node()}};function vM(t,e,o,n){var r=o["bounds"];const[[a,s],[i,l]]=r,c=i-a,u=l-s;r=t=>{var{x:e,y:n}=t,r=ty(o.x,c),i=ty(o.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+a,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function bM(r,i,t,e){var{y:t,y1:n,autoRotate:o,rotateToAlignArc:a}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:h}=Cb(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=wM(f,o,a),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?xM(s,f,n):Sb(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function xM(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function wM(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function kM(r,t,e,n){const{y:i,y1:o,autoRotate:a,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:h=.5,offset:f=0}=e,d=Cb(n,t,[i,o]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),y=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?h:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+f]})();const g=0<Math.sin(y)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=xM(p,y,t),[e,r]=xM(p,y,e),i=l?g*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:l,connectorPoints:m,dx:l?+u*g:0},v=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},v(e,"x0","y0")),v(t)),(e=r,v=0<g||l0(n),t=wM(y,a,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function MM(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(l0(r)?bM:f0(r)?kM:vM)(t,e,n,r)}mM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var EM=Object.freeze({__proto__:null,top:MM,bottom:MM,right:MM,left:MM,topLeft:MM,topRight:MM,bottomLeft:MM,bottomRight:MM,inside:MM,outside:MM,area:function(t,e,n,r){var i=e.length/2;const o=e.slice(0,i),a=e.slice(i);var e=Zp(o,(t,e)=>Math.abs(t[1]-a[e][1])),i=(l=t=>[o[t][0],(o[t][1]+a[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=Mb(wb(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function OM(t,e,n,r){var i=e["position"],i=(o=n,void 0!==(i=i)?i:f0(o)?"inside":a0(o)?"right":"top"),o=r["inside"===i?"innerLabel":"label"],r=Object.assign({},o,e),e=EM[i.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(i,t,r,n));throw new Error("Unknown position: "+i)}const SM=t=>(t,e,n,r)=>{var i=e["text"],o=K(e,["text","x","y"]),t=OM(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=K(t,["rotate","transform"]);return Q(new K5).call(R,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(R,o).node()},_M=(SM.props={},t=>{const s=t["colorAttribute"],l=K(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:o,defaultShape:a}=e,r=K(jb(r,i,o,a),["stroke"]),{d:i,color:o}=e;return Q(new Ba).call(R,r).style("d",i).style(s,o).call(R,l).node()}}),AM=(_M.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>_M(Object.assign({colorAttribute:"fill"},t))),PM=(AM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>_M(Object.assign({fill:"none",colorAttribute:"stroke"},t))),TM=(PM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const o=t["render"],a=K(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return o(Object.assign(Object.assign({},a),{x:t,y:i}))}}),LM=(TM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),NM={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},CM="#416180",jM=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:LM[100],enter:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:CM,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:CM,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:CM,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:CM,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:CM,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:CM,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:CM,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:CM,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:CM,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:LM[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:LM[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:LM[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:LM[25],tickLineLineWidth:1,tickLineLength:4,labelFill:LM[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:LM[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:LM[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:LM[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:LM[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:LM[100],navButtonFillOpacity:1,navPageNumFill:LM[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:LM[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:LM[6],handleMarkerStroke:LM[25],handleMarkerLineWidth:1,handleLabelFill:LM[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:LM[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:CM,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:NM[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:CM,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:LM[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:LM[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:LM[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:LM[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},FM=(jM.props={},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),RM={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},IM="#F9FBFD",DM=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:RM[100],enter:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:RM[65],fontSize:12,connectorStroke:IM,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:IM,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:IM,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:IM,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:IM,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:IM,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:IM,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:IM,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:IM,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:RM[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:RM[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:RM[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:RM[25],tickLineLineWidth:1,tickLineLength:4,labelFill:RM[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:RM[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:RM[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:RM[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:RM[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:RM[100],navButtonFillOpacity:1,navPageNumFill:RM[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:RM[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:RM[6],handleMarkerStroke:RM[25],handleMarkerLineWidth:1,handleLabelFill:RM[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:RM[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:IM,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:FM[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:IM,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:RM[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:RM[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:RM[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:RM[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function BM(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}DM.props={};var zM,WM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function HM(t){var e;if(e=WM.exec(t))return new GM({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function GM(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function YM(t,e){var n,e=BM(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}HM.prototype=GM.prototype,GM.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var VM={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>YM(100*t,e),r:YM,s:function(t,e){var n,r,i=BM(t,e);return i?(n=i[0],(i=(i=i[1])-(zM=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+BM(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function qM(t){return t}var UM,XM,$M=Array.prototype.map,ZM=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function KM(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?qM:(s=$M.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,o=s[0],a=0;0<n&&0<o&&(e<a+o+1&&(o=Math.max(1,e-a)),r.push(t.substring(n-=o,n+o)),!((a+=o+1)>e));)o=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?qM:(e=$M.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),o=void 0===t.percent?"%":t.percent+"",O=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function a(t){var c=(t=HM(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,y=t.precision,g=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):VM[m]||(void 0===y&&(y=12),g=!0,m="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?o:"",x=VM[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,o=b;if("c"===m)o=x(t)+o,t="";else{var a=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((a=a&&0==+t&&"+"!==h?!1:a)?"("===h?h:O:"-"===h||"("===h?"":h)+i,o=("s"===m?ZM[8+zM/3]:"")+o+(a&&"("===h?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){o=(46===r?M+t.slice(e+1):t.slice(e))+o,t=t.slice(0,e);break}}p&&!f&&(t=k(t,1/0));var s=i.length+t.length+o.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&f&&(t=k(l+t,l.length?d-o.length:1/0),l=""),u){case"<":t=i+t+o+l;break;case"=":t=i+l+t+o;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+o+l.slice(s);break;default:t=l+i+t+o}return E(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:a,formatPrefix:function(t,e){var n=a(((t=HM(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=BM(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=ZM[8+e/3];return function(t){return n(r*t)+i}}}}function JM(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function QM(o,t,e,n,r,i,a,s){void 0===e&&void 0===i||o.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=o).getTicks?i.getTicks():t?([c,l]=Pp(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=o.getFormatter)?void 0:l.call(o))||n,h=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:o,insetRight:a}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[o,a,e];const s=new Im({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(a,s),f=function(r,i){const{width:o,height:a}=i.getOptions();return t=>{var e,n;return h0(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Im({domain:[0,o],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Im({domain:[0,a],range:[0,1]}).map(n)):t):t}}(a,s);return s0(s)||a0(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=o.getBandWidth)?void 0:i.call(o,t))/2||0,i=h(o.map(t)+i);return{value:a0(s)&&null!=(r=o.getTicks)&&r.call(o)?1-i:i,text:u(t,e,n)}}),l0(s)&&"arcY"===a?i.map(({value:t,text:e})=>({value:1-t,text:e})):i):c.map((t,e,n)=>{var r=(null==(r=o.getBandWidth)?void 0:r.call(o,t))/2||0;return{value:f(h(o.map(t)+r)),text:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n)}})}function tE(t,e,n,r,i){var o;return s0(o=n)&&a0(o)||u0(n)?[]:t.map(t=>{t=function(t,e,n,r,i){var[r,o]=r,[i,a]=i,[n,s]=JM(n);let l,c,u,h;return"bottom"===e||"top"===e?(l=c=r+(i-r)*t,u=o,h="bottom"===e?o-s:o+s):(u=h=o+(a-o)*t,l=r,c="left"===e?r+n:r-n),[[l,u],[c,h]]}(t.value,e,n,r,i);return{points:s0(n)?[t[0]]:t}})}ea=KM({thousands:",",grouping:[3],currency:["$",""]}),UM=ea.format,ea.formatPrefix;const eE=t=>{const{position:u,labelFormatter:h=t=>""+t,tickFilter:f,tickCount:d,tickMethod:p}=t,y=K(t,["position","labelFormatter","tickFilter","tickCount","tickMethod"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:o,width:a,height:s}=i,i=[i+a/2,o+s/2],o=QM(t,e,d,h,f,p,u,n),t=Math.min(a,s)/2,[e,a]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),{grid:c=!1}=y,c=c?function(t,e,n,r,i,o,a){const[s,l]=e;var[e,a]=JM(a),e=Math.min(e,a)/2;const c=i*e,u=o*e;return t.map(({value:t})=>{var t=(r-n)*t+n,e=Math.cos(t*Math.PI/180),t=Math.sin(t*Math.PI/180);return{points:[[s+c*e,l+c*t],[s+u*e,l+u*t]]}})}(o,i,e,a,s,l,n):[];return new Vw({style:F({},{center:i,radius:t,startAngle:e,endAngle:a,ticks:o,verticalFactor:"arc"===u?1:-1,axisLine:{style:Object.assign({lineWidth:0,strokeOpacity:0},J(y,"line"))},grid:{items:c,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.1,lineDash:[0,0]},J(y,"grid"))},tickLine:{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},J(y,"tick"))},label:{align:"arcInner"===u?"radial":"tangential",tickPadding:2,style:J(y,"label")}})})}},nE=v=>{const{position:b,title:x,labelFormatter:w=t=>""+t,direction:k="left",tickCount:M,tickFilter:E,tickMethod:O,titleAnchor:S}=v,_=K(v,["position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod","titleAnchor"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{startPos:o,endPos:a,labelOffset:s,titlePosition:l,titlePadding:c,titleRotate:u,verticalFactor:h,titleOffsetY:f,labelAlign:d,axisLine:p,label:y=void 0===v.label||v.label,tickLine:g=void 0===v.tickLine||v.tickLine}=function(t,e,n){var{x:n,y:r,width:i,height:o}=n;return"bottom"===t?{startPos:[n,r],endPos:[n+i,r],labelOffset:8,titlePosition:"end",titlePadding:2,titleRotate:0,verticalFactor:1}:"left"===t||"centerHorizontal"===t?{startPos:[n+i,r],endPos:[n+i,r+o],titlePosition:"center",titlePadding:6,titleRotate:-90,labelAlign:"end",labelOffset:4,verticalFactor:-1}:"right"===t?{startPos:[n,r],endPos:[n,r+o],titlePosition:"center",titlePadding:16,titleRotate:-90,labelAlign:"start",labelOffset:4,verticalFactor:1}:"arcY"===t?{startPos:[n,r],endPos:[n+i,r+o],titlePosition:"start",titlePadding:4,titleOffsetY:-5,titleRotate:0,labelOffset:"left"===e?4:"right"===e?-4:0,verticalFactor:-1,labelAlign:"center"===e?"center":"right"===e?"start":void 0,axisLine:!1}:{startPos:[n,r+o],endPos:[n+i,r+o],titlePosition:"end",titlePadding:2,titleRotate:0,labelOffset:4,verticalFactor:-1}}(b,k,i),e=QM(t,e,M,w,E,O,b,n),l="arcY"===b||t.getTicks?l:"center",[,m]=n.getCenter(),{grid:t=!!t.getTicks}=_,t=t?tE(e,b,n,o,a):[],n=J(_,"line");return new Fw({style:F(Object.assign({startPos:o,endPos:a,verticalFactor:h,ticks:e,label:y?Object.assign(Object.assign({tickPadding:s,autoHide:!1,autoRotate:!0},J(_,"label")),{style:Object.assign(Object.assign({},d&&{textAlign:d}),J(_,"label"))}):null,axisLine:p||Object.keys(n).length?{stroke:"#BFBFBF",style:n}:null,grid:Object.assign({items:t,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.05,lineDash:[0,0]},J(_,"grid"))},"arcY"===b&&{type:"circle",center:[i.x,m+i.y],closed:!0}),tickLine:g?{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},J(_,"tick"))}:null},x&&{title:{content:(o=x,Array.isArray(o)?o.join(", "):""+o),titleAnchor:S||l,style:Object.assign({fontWeight:"bold",fillOpacity:1,dy:f,textAnchor:l},J(_,"title")),titlePadding:c,rotate:u}}))})}},rE=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?UM(e):e;const o=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?eE:nE)(o)(t,e,n,r)},iE=(rE.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>rE(t)),oE=(iE.props=Object.assign(Object.assign({},rE.props),{defaultPosition:"bottom"}),t=>rE(t)),aE=(oE.props=Object.assign(Object.assign({},rE.props),{defaultPosition:"left"}),t=>{const{position:c,labelFormatter:u=t=>""+t,dx:h=0,dy:f=0,title:d,cols:p=void 0,autoWrap:y=!1}=t,g=K(t,["position","labelFormatter","dx","dy","title","cols","autoWrap"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:o,width:a,height:s}=i,t=t.map(t=>({id:t,name:u(t),color:e.map(t)})),l=y&&p?a/p:void 0,t=F({},Object.assign(Object.assign({items:t,x:i+h,y:o+f,orient:["right","left","arcCenter"].includes(c)?"vertical":"horizontal",maxWidth:a,maxHeight:s,autoWrap:y,maxItemWidth:l,itemWidth:l,spacing:[8,0],itemName:{style:{fontSize:12,fillOpacity:1,fill:"#000",fontWeight:"lighter",active:{fillOpacity:.8},inactive:{fill:"#d8d8d8"},unchecked:{fill:"#d8d8d8"}}}},d&&{title:{content:Array.isArray(d)?d[0]:d,style:{fontSize:12,fontWeight:"bold",fillOpacity:1}}}),{itemMarker:{size:8,symbol:"circle",style:{fillOpacity:1,inactive:{fillOpacity:.2},unchecked:{fill:"#d8d8d8",stroke:"#d8d8d8"}}},itemBackgroundStyle:{fill:"transparent"}}),Object.assign({},g));return new Yk({className:"category-legend",style:t})}}),sE=(aE.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const c=t["title"];return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:o}=i,a=(null==(a=e.getTicks)?void 0:a.call(e))||[],[s,l]=t;return new u5({style:Object.assign(Object.assign({x:i,y:o,rail:{length:120,size:12,ticks:a},min:s,max:l,indicator:null,handle:null},c&&{title:{content:Array.isArray(c)?c[0]:c,style:{fontSize:12}}}),{color:t.map(t=>e.map(t))})})}});function lE(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}sE.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};XM={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:o}=t;t=lE(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(R,r||{}).node().getLocalBounds();lE(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===o||void 0===o?void 0:o.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},o))})}};const cE=class extends Ea{constructor(t){super(t),this.descriptor=XM}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(F({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},uE=t=>{const{text:o,style:a,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new cE({style:F({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:a,text:o,subtitle:s,subtitleStyle:l})})}};uE.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class hE{constructor(t){this.$value=t}static of(t){return new hE(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function fE(t,e,n){return hE.of({}).call(dE,t).call(dE,e).call(dE,n).value()}function dE(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function pE(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const yE=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],gE=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=a0(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(a+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],a=(o.setOrigin(r),o.animate(t,fE(i,n,u)));return a.finished.then(()=>o.setOrigin(0,0)),a}},mE=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=a0(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(o.setOrigin(r),o.animate(s,fE(i,n,u)));return l.finished.then(()=>o.setOrigin(0,0)),l}},vE=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=a0(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(a+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],a=(o.setOrigin(r),o.animate(t,fE(i,n,u)));return a.finished.then(()=>o.setOrigin(0,0)),a}},bE=u=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:c}=o.style,[r,t]=a0(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(o.setOrigin(r),o.animate(s,fE(i,n,u)));return l.finished.then(()=>o.setOrigin(0,0)),l}},xE=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:o,strokeOpacity:a,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:s}],fE(i,n,l))},wE=(xE.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:o,strokeOpacity:a,opacity:s}=t.style;return t.animate([{fillOpacity:o,strokeOpacity:a,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],fE(i,n,l))});function kE(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function ME(t,e){var[n,r,i,t]=kE(t),o=Math.ceil(Math.sqrt(e/(t/i))),a=[],s=t/Math.ceil(e/o);let l=0,c=e;for(;0<c;){var u=Math.min(c,o),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+l*s;a.push(function(t){var[t,e,n,r]=t;return`
2
2
  M ${t} ${e}
3
3
  L ${t+n} ${e}
4
4
  L ${t+n} ${e+r}
5
5
  L ${t} ${e+r}
6
6
  Z
7
- `}([f,d,h,s]))}c-=u,l+=1}return a}function Wx(t,e,n,r){var i=oa(e),o=oa(n);return void 0===i||void 0===o?null:(i=[Object.assign({path:i},jx(e,Ix)),Object.assign({path:o},jx(n,Ix))],e=t.animate(i,r),t.style.transform="scale(1, 1)",t.style.transform="none",e)}Gx.props={};const Yx=y=>(t,e,n,r,i)=>{[o="pack"]=[y.split];var o="function"==typeof o?o:Hx,i=Nx(i,n,y),n=t["length"],a=e["length"];if(1===n&&1===a||1<n&&1<a)return[s]=t,[c]=e,Wx(s,s,c,i);if(1===n&&1<a){var[s]=t;{var l=s,c=e,u=i,s=o;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Wx(t,new T({style:{path:d[e],fill:l.style.fill}}),t,u)})}}if(1<n&&1===a){var[n]=e;{var a=t,h=n,f=i;const p=(e=o)(h,a.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=h.style,e=h.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],f);return[...a.map((t,e)=>{return Wx(t,t,new T({style:{path:p[e],fill:h.style.fill}}),f)}),e]}}return null},Vx=(Yx.props={},y=>{return ri({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:n.NUMBER}),(t,e,n,r,i)=>{const[o]=t;if(!hd(r))return Rx(y)(t,e,n,r,i);const a=r.getCenter();var{__data__:t,style:e}=o,{radius:e=0}=e,{points:t,y:s,y1:l}=t;const c=ky().cornerRadius(e),u=pg(r,t,[s,l]),{startAngle:h,endAngle:f}=u,d=new T({}),p=t=>{d.attr({d:c(t),transform:`translate(${a[0]}, ${a[1]})`});t=oa(d);return d.style.transform="none",t};e=[{waveInArcAngle:h+1e-4},{waveInArcAngle:f}],r=o.animate(e,Nx(i,n,y));return r.onframe=function(){o.style.path=p(Object.assign(Object.assign({},u),{endAngle:Number(o.style.waveInArcAngle)}))},r.onfinish=function(){o.style.path=p(Object.assign(Object.assign({},u),{endAngle:f}))},r}}),qx=(Vx.props={},c=>{return(t,e,n,r,i)=>{const[o]=t;var{transform:t,fillOpacity:a,strokeOpacity:s,opacity:l}=o.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:a,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:a,strokeOpacity:s,opacity:l}],{width:a,height:s}=o.getBoundingClientRect(),l=(o.setOrigin([a/2,s/2]),o.animate(t,Nx(i,n,c)));return l.finished.then(()=>o.setOrigin(0,0)),l}}),Xx=c=>{return(t,e,n,r,i)=>{const[o]=t;var{transform:t,fillOpacity:a,strokeOpacity:s,opacity:l}=o.style,a=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:a,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=o.getBoundingClientRect(),t=(o.setOrigin([s/2,l/2]),o.animate(a,Nx(i,n,c)));return t.finished.then(()=>o.setOrigin(0,0)),t}};function Ux(t){return $(t).selectAll("."+K).nodes()}function $x(t){return $(t).select("."+J).node()}function Zx(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,o]}=t.getBounds();return e<t||i<e||(n<r||o<n)?null:[e-t,n-r]}function Kx(t){return t&&0!==Object.keys(t).length?t:{activeLineWidth:1,activeStroke:"#000"}}function Jx(){return t=>t.__data__.color}function Qx(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function tw(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function ew(a,s=(t,e)=>t){const l="__states__",c="__ordinal__",i=t=>{var{[l]:e=[],[c]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),Qy(a,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var o=t.getAttribute(r),i=s(i,t);t.setAttribute(r,i),r in n||(n[r]=o)}t[c]=n}},o=t=>{t[l]||(t[l]=[])};return{setState:(t,...e)=>{o(t),t[l]=[...e],i(t)},removeState:(t,...e)=>{o(t);for(const r of e){var n=t[l].indexOf(r);-1!==r&&t[l].splice(n,1)}i(t)},hasState:(t,e)=>(o(t),-1!==t[l].indexOf(e))}}function nw(r,i){const o=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=o.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function rw(l,t){var{valueof:c=(t,e)=>t}=t,u=U(t,["valueof"]);const h="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=ny();const[a,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),sg(u,t=>c(t,a))),{fill:o=a.getAttribute("fill")}=i,i=U(i,["fill"]),r=new T({className:h+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:o},i)});l.appendChild(r)}}},t=>{t=t||h;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function iw(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:o=!1}=e,e=U(e,["elements","datum","groupKey","link"]);const a=n(t),s=new Set(a),l=$f(a,i);n=nw(a,r);const[c,u]=rw(t,Object.assign({elements:a,valueof:n},Qy(e,"link"))),{setState:h,removeState:f}=ew(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of a)e.has(n)?h(n,"active"):h(n,"inactive");o&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of a)f(e,"inactive","active");o&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function ow(n){return t=>{var{container:t,view:e}=t;return iw(t,Object.assign(Object.assign({},Kx(n)),{elements:Ux,datum:tw(e)}))}}function aw(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return iw(t,Object.assign(Object.assign({},Kx(n)),{elements:Ux,datum:tw(e),groupKey:Qx(e)}))}}function sw(n){return t=>{var{container:t,view:e}=t;return iw(t,Object.assign(Object.assign(Object.assign({},n),Kx(n)),{elements:Ux,datum:tw(e),groupKey:Jx()}))}}function lw(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=U(e,["elements","datum","groupKey","link","single"]);const h=n(t),f=new Set(h),d=$f(h,l);n=nw(h,r);const[p,y]=rw(t,Object.assign({elements:h,valueof:n},Qy(e,"link"))),{setState:g,removeState:i,hasState:m}=ew(e,n),v=()=>{for(const t of h)i(t,"selected","unselected");c&&y()},o=t=>{t=t.target;if(!f.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of h)n.has(i)?g(i,"selected"):g(i,"unselected");c&&(y(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const o=new Set(r);if(m(e,"selected")){if(!h.some(t=>!o.has(t)&&m(t,"selected")))return v();for(const a of r)g(a,"unselected");c&&y(t)}else{e=r.some(t=>m(t,"selected"));for(const s of h)o.has(s)?g(s,"selected"):m(s,"selected")||g(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",o),()=>{t.removeEventListener("click",o)}}function cw(n){return t=>{var{container:t,view:e}=t;return lw(t,Object.assign(Object.assign({},Kx(n)),{elements:Ux,datum:tw(e)}))}}function uw(n){return t=>{var{container:t,view:e}=t;return lw(t,Object.assign(Object.assign({},Kx(n)),{elements:Ux,datum:tw(e),groupKey:Qx(e)}))}}function hw(n){return t=>{var{container:t,view:e}=t;return lw(t,Object.assign(Object.assign({},Kx(n)),{elements:Ux,datum:tw(e),groupKey:Jx()}))}}function fw(t){var{wait:M=20,leading:S,trailing:O=!1,labelFormatter:_=t=>""+t}=t,P=U(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:o,scale:a,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([,n])=>{return Object.fromEntries(r.map(e=>{var t=n.channels.find(t=>t.name===e);return[e,t?t.value:void 0]}))});return t}(o,"line",["x","y","series"]);if(!t)return;const{y:f,x:d,series:l=[]}=t;t=f.map((t,e)=>e);const c=Jf(t.map(t=>d[t])),u=N({},e),h=u.marks.find(t=>"line"===t.type);t=ed(Zf(t,t=>ed(t,t=>+f[t])/rd(t,t=>+f[t]),t=>l[t]).values());N(h,{scale:{y:{domain:[1/t,t]}}});const p=$x(r),y=r.getElementsByClassName(K);const g=$f(r.getElementsByClassName(tt),t=>t.__data__.key.split("-")[0]),m=new ws({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},Qy(P,"rule"))}),v=new As({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},Qy(P,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Wf(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",_(e))};let w;var k;const E=ff(t=>{t=Zx(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of y){var{seriesIndex:o,key:a}=u.__data__,s=o[Gf(t=>d[+t]).center(o,i)],l=[0,r.map(1)],s=[0,r.map(f[s]/f[o[0]])],[,o]=n.map(l),[,l]=n.map(s),c=o-l,s=(u.setAttribute("transform",`translate(0, ${c})`),g.get(a)||[]);for(const h of s)h.setAttribute("dy",c)}}},M,{leading:S,trailing:O});return k=[0,0],me(this,void 0,void 0,function*(){var t=a["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(h),t.groupBy="color",t.basis=(t,e)=>{return e[t[Gf(t=>d[+t]).center(t,n)]]},t=yield i(u);w=t.view}),p.addEventListener("pointerenter",E),p.addEventListener("pointermove",E),p.addEventListener("pointerleave",E),()=>{m.remove(),p.removeEventListener("pointerenter",E),p.removeEventListener("pointermove",E),p.removeEventListener("pointerleave",E)}}}function dw({wait:s=30,leading:l,trailing:c=!1}){return t=>{const{options:e,update:r,container:n}=t,i=$x(n),o=N({},e,{animate:!1}),a=ff(t=>{var e,n,t=Zx(i,t);t&&([t,e]=t,(n=function(t){var{coordinate:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinate=e,n)}(o)).focusX=t,n.focusY=e,n.isVisual=!0,r(o))},s,{leading:l,trailing:c});return i.addEventListener("pointerenter",a),i.addEventListener("pointermove",a),i.addEventListener("pointerleave",a),()=>{i.removeEventListener("pointerenter",a),i.removeEventListener("pointermove",a),i.removeEventListener("pointerleave",a)}}}function pw(n){return(t,...e)=>N({},n(t,...e),t)}function yw(n){return(t,...e)=>N({},t,n(t,...e))}function gw(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=U(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const mw=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map(t=>{var e=t["data"],t=U(t,["data"]);return Object.assign(Object.assign({},t),{data:gw(e,a),x:n,y:r,width:i,height:o})})},vw=(mw.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:o}=e,[a,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var f=r.map(t=>h*(t/u)),d=[];let p=e[a]||0;for(let t=0;t<f.length;t+=1){var y=n[t],g=y["data"],y=U(y,["data"]),g=gw(g,o);d.push(Object.assign({[a]:p,[s]:f[t],[c]:e[c]||0,[l]:e[l],data:g},y)),p+=f[t]+i}return d}),bw=(vw.props={},()=>t=>{var e=t["children"],t=U(t,["children"]);if(!Array.isArray(e))return[];const{data:o,scale:a={},axis:s={},legend:l={}}=t,n=U(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=U(t,["data","scale","axis","legend"]);return Object.assign({data:gw(e,o),scale:N({},a,n),axis:!(!r||!s)&&N({},s,r),legend:!(!i||!l)&&N({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),xw=(bw.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:o,paddingBottom:a,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:k,x:E,y:M,key:S,frame:O,title:_,labelTransform:P}=t,t=U(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform"]);return[{type:"standardView",x:E,y:M,key:S,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:o,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,paddingBottom:a,theme:x,coordinate:b,component:w,interaction:k,frame:O,title:_,labelTransform:P,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:S+"-0",data:v})]}]}),ww=(xw.props={},pw(t=>{const{encode:e,data:i,scale:o,shareSize:a=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!a)return{};const n=$f(i,t=>t[e]);var t=(null==(t=null===o||void 0===o?void 0:o[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),kw=pw(t=>{const{data:e,scale:n}=t;var r=[t];let i,o,a;for(;r.length;){const{children:u,encode:h={},scale:n={},legend:f={}}=r.shift();var s=h["color"],l=n["color"],c=f["color"];void 0!==s&&(i=s),void 0!==l&&(o=l),void 0!==c&&(a=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:N({},o,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,field:i,type:"ordinal"})},legend:{color:N({},a)}}}),Ew=pw(()=>({animate:{enter:{type:"fadeIn"}}})),Mw=yw(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Sw=yw(()=>({type:"cell"})),Ow=yw(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],o=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&o.length){var a=[];for(const s of i)for(const l of o)a.push({[n]:s,[r]:l});return a}return i.length?i.map(t=>({[n]:t})):o.length?o.map(t=>({[r]:t})):void 0}}]}}}),_w=yw((t,c=function(t){t=t.points;return ag(t)},E=function(o){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?Pw(o,e):(t=e.length?void 0:null,N({title:r===i-1&&void 0,grid:t},o))}},M=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?Pw(r,e):(n=e.length?void 0:null,N({title:0===t&&void 0,grid:n},r))}},S={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:h=!1}=t,P=e["value"],{x:T,y:A}=n;t=r.color;const L=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:m}=n,{domain:o,field:a}=r.getOptions(),{domain:s,field:l}=i.getOptions();e=lg(t);const v=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const b=n.map(([n,r])=>t=>{var{[a]:t,[l]:e}=t,t=void 0===T||t===n,e=void 0===A||e===r;return t&&e}).map(t=>P.filter(t)),x=h?ed(b,t=>t.length):void 0,w=n.map(([t,e])=>({columnField:a,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:l,rowIndex:s.indexOf(e),rowValue:e,rowValuesLength:s.length})),k=w.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=v[c],p=w[c],y=b[c];return k[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=U(t,["scale","key","facet","axis","legend"]),o=null==(o=null==e?void 0:e.y)?void 0:o.guide,a=null==(a=null==e?void 0:e.x)?void 0:a.guide,s={x:{tickCount:T?5:void 0},y:{tickCount:A?5:void 0}},r=r?y:0===y.length?[]:P,l={color:{domain:L}},a={x:Tw(a,E)(p,r),y:Tw(o,M)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+g+O,y:h+m+_,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:x,scale:N(s,e,l),axis:N({},i,a),legend:!1},t),S)})})}}});function Pw(t,e){return e.length?N({title:!1,tickLine:null,label:null,subTickLine:null},t):N({title:!1,tickLine:null,label:null,subTickLine:null,grid:null},t)}function Tw(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const Aw=()=>t=>{return[Lx.of(t).call(Sw).call(kw).call(Ew).call(ww).call(Mw).call(Ow).call(_w).value()]},Lw=(Aw.props={},pw(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),Nw=yw(t=>{const{data:E,children:c,x:M=0,y:S=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,{domain:o,field:a}=r.getOptions(),{domain:s,field:l}=i.getOptions();e=lg(t);const b=t.map(({points:t})=>ag(t)),x=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),w=x.map(([t,e])=>({columnField:a,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:l,rowIndex:s.indexOf(e),rowValue:e,rowValuesLength:s.length})),k=w.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=b[c],[p,y]=x[c],g=w[c];return k[c].map(t=>{var n,r,{scale:e,key:i,encode:o,axis:a}=t,t=U(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return Pw(r,e)})(g,E),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return Pw(n,e)})(g,E)};return Object.assign({data:E,key:i+"-"+c,x:u+m+M,y:h+v+S,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:N({x:{facet:!1},y:{facet:!1}},e),axis:N({x:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5},y:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5}},a,l),legend:!1,encode:N({},o,{x:p,y:y})},t)})})}}}),Cw=yw(t=>{var e=t["encode"],t=U(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=U(e,["position","x","y"]),o=[];for(const a of[r].flat(1))for(const s of[i].flat(1))o.push({$x:a,$y:s});return Object.assign(Object.assign({},t),{data:o,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const jw=()=>t=>{return[Lx.of(t).call(Sw).call(kw).call(Nw).call(Cw).call(Ew).call(Mw).call(Lw).value()]},Iw=pw(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Rw=pw(t=>({coordinate:[{type:"polar"}]})),Fw=t=>{var e=t["encode"],t=U(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function Dw(t){return t=>null}function Bw(t){var t=t["points"],[t,e,n,r]=t,i=rg(t,r),t=ng(t,r),r=ng(e,n),r=(e=r,r=ig(r=t),e=ig(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),o=i*Math.sqrt(2),[n,a]=n,t=og(t)+r/2,r=i*e;return[n+r*Math.sin(t)-o/2,a+r*Math.cos(t)-o/2,o,o]}const zw=()=>t=>{return[Lx.of(t).call(Sw).call(Fw).call(kw).call(Rw).call(Ow).call(_w,Bw,Dw,Dw,{frame:!1}).call(Ew).call(Mw).call(Iw).value()]};const Gw=()=>t=>{const{children:e=[],duration:o=1e3,iterationCount:l=1,direction:c="normal",easing:a="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],h=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=o,n=a,r=[t];r.length;){var i=r.pop(),i=(i.animate=N({enter:{duration:e},update:{duration:e,type:"morphing",easing:n,fill:"both"},exit:{duration:e}},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,o=t,a=u,s=void 0,s=[0,a],a=[1-a,1];var[n,r]="normal"===n?s:"reverse"===n?a:"alternate"===n?o%2==0?s:a:"reverse-alternate"===n?o%2==0?a:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield h[i]),e=i}t++}var o,a,s}};function Hw(t,e){if(null!==t)return{type:"column",value:t,field:e}}function Ww(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function Yw(t,e){return new Array(t.length).fill(e)}function Vw(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function qw(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=Vw(t,i);if(null!==n)return[n,r]}return[null,null]}Gw.props={};const Xw=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,N({},e,{encode:{y1:Hw(Yw(t,0))}})]};function Uw(t,e,n){const r=n["encode"],i=(n=t,(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=Vw(r,t))?void 0:t[0]]}).filter(([,t])=>Jy(t)));return Array.from($f(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function $w(t){var o,r;return Array.isArray(t)?(o=t,(i,t,e)=>(n,r)=>o.reduce((t,e)=>0!==t?t:zf(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>nk(t=>r(e[t]))):"series"===t?Jw:"value"===t?Qw:"sum"===t?tk:"maxIndex"===t?ek:()=>null}function Zw(t,e){for(const n of t)n.sort(e)}function Kw(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function Jw(t,e,n){return nk(t=>n[t])}function Qw(t,e,n){return nk(t=>e[t])}function tk(t,n,e){t=lg(t),t=Array.from($f(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return nk(t=>r.get(e[t]))}function ek(t,n,e){t=lg(t),t=Array.from($f(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,nd(e,t=>n[t])]));return nk(t=>r.get(e[t]))}function nk(n){return(t,e)=>zf(n(t),n(e))}Xw.props={};const rk=(t={})=>{const{groupBy:k="x",orderBy:E=null,reverse:M=!1,y:S="y",series:O=!0}=t;return(t,e)=>{var{data:n,encode:r}=e,[i,o]=Vw(r,"y"),[a,s]=Vw(r,"y1"),[r]=O?qw(r,"series","color"):Vw(r,"color"),l=Uw(k,t,e),n=$w(E)(n,i,r),c=(n&&Zw(l,n),new Array(t.length)),u=new Array(t.length),h=new Array(t.length);for(const v of l){M&&v.reverse();var f=a?+a[v[0]]:0,d=[],p=[];for(const b of v){var y=h[b]=+i[b]-f;y<0?p.push(b):0<=y&&d.push(b)}let t=f;for(const x of p.reverse()){var g=h[x];t=c[x]=(u[x]=t)+g}let e=f;for(const w of d){var m=h[w];0<m?e=c[w]=(u[w]=e)+m:c[w]=u[w]=e}}r="y"===S?c:u;return[t,N({},e,{encode:{y:Hw(r,o),y1:Hw(u,s)}})]}};function ik(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}rk.props={};const ok=o=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(ik)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=o["series"],r=i?["x","series"]:"x",rk({groupBy:r})(t,e,n))},ak=(ok.props={},()=>(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=Vw(n,"x"),[t,N({},e,{encode:{title:Hw(r,n)}})])}),sk=(ak.props={},t=>{const o=t["channel"];return(t,e)=>{const i=e["encode"];var n=i["tooltip"];return void 0!==n?[t,e]:(n=Object.entries(i).filter(([t])=>t.startsWith(o)).flatMap(([t])=>{var e=new RegExp(o+"(\\d*)").exec(t)[1],[n,r]=Vw(i,t),t=[[t,Hw(n)]];return n&&null!==r&&t.push(["tooltip"+e,Hw(n,r)]),t}),[t,N({},e,{encode:Object.fromEntries(n)})])}}),lk=(sk.props={},()=>sk({channel:"position"})),ck=(lk.props={},()=>sk({channel:"y"})),uk=(ck.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,N({},e,{encode:{x:Hw(Yw(t,0))},scale:{x:{guide:null}}})]}),hk=(uk.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,N({},e,{encode:{y:Hw(Yw(t,0))},scale:{y:{guide:null}}})]}),fk=(hk.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,N({},e,{encode:{size:Ww(Yw(t,3))}})]}),dk=(fk.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=U(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,N({},e,{encode:{key:Hw(r)}})]}),pk=(dk.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=Vw(n,"color"),[t,N({},e,{encode:{series:Hw(r,i)}})])}),yk=(pk.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Oh)?[t,e]:[t,N({},e,{encode:{y:Hw(n)}})]}),gk=(yk.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(Oh)?[t,e]:[t,N({},e,{encode:{x:Hw(n)}})]}),mk=(gk.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=Vw(n,"y"),[t,N({},e,{encode:{y1:Hw([...r])}})])}),vk=(mk.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=Vw(n,"x"),[t,N({},e,{encode:{x1:Hw([...r])}})])}),bk=(vk.props={},()=>(t,e)=>[t,N({scale:{x:{padding:0},y:{padding:0}}},e)]),xk=(bk.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:h,padding:f}=t;return U(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[o]=Vw(r,"y"),[r]=qw(r,"series","color"),a=Kw(r,i),i=Uw(c,t,e),n=$w(h)(n,o,r),s=(n&&Zw(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=a[t]}return[t,N({},e,{scale:{series:{domain:a,paddingInner:f}},encode:{series:Hw(s)}})]}}),wk=(xk.props={},t=>{const{by:d=["x"]}=t;return(n,t)=>{const e=t["encode"];var r=e["enterDuration"];if(void 0===r)return[n,t];r=d.map(t=>[t,Vw(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,h]of r){var o=[];for(const n of i){var a=Array.from($f(n,t=>h[t]).values());o.push(...a)}i=o}const[s]=Vw(e,"enterDuration");var[l]=qw(e,"enterDelay",Yw(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=ed(n,t=>+s[t]);for(const f of n)c[f]=+l[f]+e;e+=u}return[n,N({},t,{encode:{enterDuration:Ww(s),enterDelay:Ww(c)}})]}});wk.props={};const kk=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=U(n,["x"]),o=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Vw(n,t)[0]]),[,a]=o.find(([t])=>"y"===t),s=o.map(([t])=>[t,new Array(e.length)]),i=Uw(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>rd(t,t=>e[+t]),max:(t,e)=>ed(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>sd(t,t=>e[+t]),median:(t,e)=>ld(t,t=>e[+t]),sum:(t,e)=>cd(t,t=>e[+t]),deviation:(t,e)=>Yf(t,t=>e[+t])}[r]||ed;for(const e of i){var c=l(e,a);for(const f of e)for(let t=0;t<o.length;t++){var[,u]=o[t],[,h]=s[t];h[f]=+u[f]/c}}return[e,N({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,Hw(e,Vw(n,t)[1])]))})]}};function Ek(t,e,n){return null===t?[-.5,.5]:(t=Kw(t,e),[-(e=new e0({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function Mk(t,e,n){return e*(1-t)+n*t}kk.props={};const Sk=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[o]=Vw(n,"x"),[n]=Vw(n,"y");const a=Ek(o,r,l),s=Ek(n,i,c);o=t.map(()=>Mk(u(),...s)),r=t.map(()=>Mk(u(),...a));return[t,N({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:Hw(o),dx:Hw(r)}})]}},Ok=(Sk.props={},(t={})=>{const{padding:o=0,random:a=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=Vw(n,"x");const i=Ek(n,r,o);n=t.map(()=>Mk(a(),...i));return[t,N({scale:{x:{padding:.5}}},e,{encode:{dx:Hw(n)}})]}}),_k=(Ok.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=U(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Vw(n,t)[0]]);var o=i.map(([t])=>[t,new Array(e.length)]),a=Uw(y,e,t),s=new Array(a.length);for(let t=0;t<a.length;t++){const e=a[t];var[l,c]=Vf(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<a.length;t++){var h=u-s[t];const e=a[t];for(const p of e)for(let t=0;t<i.length;t++){var[,f]=i[t],[,d]=o[t];d[p]=+f[p]+h}}return[e,N({},t,{encode:Object.fromEntries(o.map(([t,e])=>[t,Hw(e,Vw(n,t)[1])]))})]}}),Pk=(_k.props={},(t={})=>{const{groupBy:u="x",series:h=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=Vw(n,"y");var[,i]=Vw(n,"y1"),n=(h?qw(n,"series","color"):Vw(n,"color"),Uw(u,t,e)),o=new Array(t.length);for(const c of n){var a=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...a.filter((t,e)=>e!==n));o[s]=r[s]>l?l:r[s]}}return[t,N({},e,{encode:{y1:Hw(o,i)}})]}});function Tk(t,e){return[t[0]]}function Ak(t,e){return[t[t.length-1]]}function Lk(t,e){return[t[nd(t,t=>e[t])]]}function Nk(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}(t,t=>e[t])]]}Pk.props={};const Ck=(t={})=>{const{groupBy:s="series"}=t,l=U(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=Uw(s,t,e),[r,i]=Object.entries(l)[0];const[o]=Vw(n,r),a="function"==typeof(n=i)?n:{first:Tk,last:Ak,max:Lk,min:Nk}[n]||Tk;return[t.flatMap(t=>a(t,o)),e]}},jk=(Ck.props={},(t={})=>{var e=t["selector"],t=U(t,["selector"]);return Ck(Object.assign({x:e},t))}),Ik=(jk.props={},(t={})=>{var e=t["selector"],t=U(t,["selector"]);return Ck(Object.assign({y:e},t))});function Rk(e){return t=>null===t?e:e+" of "+t}function Fk(){return[(t,e)=>sd(t,t=>+e[t]),Rk("mean")]}function Dk(){return[(t,e)=>ld(t,t=>+e[t]),Rk("median")]}function Bk(){return[(t,e)=>ed(t,t=>+e[t]),Rk("max")]}function zk(){return[(t,e)=>rd(t,t=>+e[t]),Rk("min")]}function Gk(){return[(t,e)=>t.length,Rk("count")]}function Hk(){return[(t,e)=>cd(t,t=>+e[t]),Rk("sum")]}function Wk(){return[(t,e)=>e[t[0]],Rk("first")]}function Yk(){return[(t,e)=>e[t[t.length-1]],Rk("last")]}Ik.props={};const Vk=(t={})=>{var n;const{channel:e=["x","y"],groupBy:i=(n=e,(t,e)=>Uw(n,t,e))}=t,o=U(t,["channel","groupBy"]);return(t,e)=>{const{data:a,encode:s}=e,l=i(t,e);var t=Object.entries(o).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:Fk,max:Bk,count:Gk,first:Wk,last:Yk,sum:Hk,min:zk,median:Dk}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,o]=Vw(s,t);return[t,Hw(l.map(t=>n(t,null!==i&&void 0!==i?i:a)),(null==r?void 0:r(o))||o)]}),n=Object.keys(s).map(t=>{const[e,n]=Vw(s,t);return[t,Hw(l.map(t=>e[t[0]]),n)]}),r=l.map(t=>a[t[0]]);return[lg(l),N({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},qk=(Vk.props={},(t={})=>Vk(Object.assign(Object.assign({},t),{channel:["x","color"]}))),Xk=(qk.props={},(t={})=>Vk(Object.assign(Object.assign({},t),{channel:["y","color"]}))),Uk=(Xk.props={},(t={})=>Vk(Object.assign(Object.assign({},t),{channel:["y","color"]})));Uk.props={};const $k=(t={})=>{const{reverse:s=!1,slice:l,channel:c}=t,u=U(t,["reverse","slice","channel"]);return(t,e)=>{var n=e["encode"];const[r]=Vw(n,c);var i,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[o]=Vw(n,r);if("function"==typeof i)return t=>i(t,o);if("max"===i)return t=>ed(t,t=>+o[t]);if("min"===i)return t=>rd(t,t=>+o[t]);if("sum"===i)return t=>cd(t,t=>+o[t]);if("median"===i)return t=>ld(t,t=>+o[t]);if("mean"===i)return t=>sd(t,t=>+o[t]);if("first"===i)return t=>o[t[0]];if("last"===i)return t=>o[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(c,u,n),n=(o=t,a=t=>r[t],(2!==(i=n).length?Jf(Zf(o,i,a),([t,e],[n,r])=>zf(e,r)||zf(t,n)):Jf($f(o,a),([t,e],[n,r])=>i(e,r)||zf(t,n))).map(([t])=>t)),o=(s&&n.reverse(),"number"==typeof l?[0,l]:l),a=l?n.slice(...o):n;return[t,N(e,{scale:{[c]:{domain:a}}})]}},Zk=($k.props={},(t={})=>$k(Object.assign(Object.assign({},t),{channel:"x"}))),Kk=(Zk.props={},(t={})=>$k(Object.assign(Object.assign({},t),{channel:"color"}))),Jk=(Kk.props={},(t={})=>$k(Object.assign(Object.assign({},t),{channel:"y"})));Jk.props={};const Qk=(t={})=>{const{field:a,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=Vw(r,"x");var o,n=a?(n=n,"string"==typeof(o=a)?n.map(t=>t[o]):n.map(o)):Vw(r,s)[0],r=function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>cd(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),r=(n=[t=>i[t]],Kf(t,Array.from,r,n).map(t=>t[1]));return[t,N({},e,{scale:{x:{flex:r}}})]}};function t5(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:o}=n;let l=Math.ceil(Math.sqrt(e/(o/i))),c=i/l,u=Math.ceil(e/l),a=u*c;for(;a>o;)l+=1,c=i/l,u=Math.ceil(e/l),a=u*c;const h=o-u*c,f=u<=1?0:h/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(o-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=ag(t),o=e%l,e=Math.floor(e/l),a=o*c,s=(u-e-1)*c+h,r=c/r,i=c/i;return`translate(${a-t+d*o}, ${s-n-f*e-p}) scale(${r}, ${i})`})}Qk.props={};const e5=()=>(t,e)=>[t,N({},e,{modifier:t5,axis:!1})];e5.props={};var n5={},r5={},i5=34,o5=10,a5=13;function s5(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function l5(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function c5(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function u5(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+c5(-e,6):9999<e?"+"+c5(e,6):c5(e,4))+"-"+c5(t.getUTCMonth()+1,2)+"-"+c5(t.getUTCDate(),2)+(o?"T"+c5(n,2)+":"+c5(r,2)+":"+c5(i,2)+"."+c5(o,3)+"Z":i?"T"+c5(n,2)+":"+c5(r,2)+":"+c5(i,2)+"Z":r||n?"T"+c5(n,2)+":"+c5(r,2)+"Z":"")}function h5(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,o=0,a=0,s=i<=0,l=!1;function c(){if(s)return r5;if(l)return l=!1,n5;var t,e,n=o;if(r.charCodeAt(n)===i5){for(;o++<i&&r.charCodeAt(o)!==i5||r.charCodeAt(++o)===i5;);return(t=o)>=i?s=!0:(e=r.charCodeAt(o++))===o5?l=!0:e===a5&&(l=!0,r.charCodeAt(o)===o5)&&++o,r.slice(n+1,t-1).replace(/""/g,'"')}for(;o<i;){if((e=r.charCodeAt(t=o++))===o5)l=!0;else if(e===a5)l=!0,r.charCodeAt(o)===o5&&++o;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===o5&&--i,r.charCodeAt(i-1)===a5&&--i;(e=c())!==r5;){for(var u=[];e!==n5&&e!==r5;)u.push(e),e=c();t&&null==(u=t(u,a++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return a(e[t])}).join(r)})}function o(t){return t.map(a).join(r)}function a(t){return null==t?"":t instanceof Date?u5(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,o){var a,s;return(t=n(t,function(t,e){if(a)return a(t,e-1);var n,r,i;s=t,a=o?(r=o,i=s5(n=t),function(t,e){return r(i(t),e,n)}):s5(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?l5(t):e).map(a).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?l5(t):e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}function f5(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;d5&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const d5=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),p5=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:o=!0}=t;return()=>me(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),h5(i).parse(t,o?f5:$y);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};p5.props={};const y5=t=>{const{fields:o,as:n=[]}=t;return t=>{if(!o||(e=o,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<o.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:o[t],[i]:n[o[t]]}));return e},[])}};function g5(t,r){return t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]})}function m5(t){return null!=t&&!Number.isNaN(t)}y5.props={};const v5=t=>{var{fields:t=[]}=t;const e=g5(t,m5);return t=>t.filter(n=>e.every(([t,e=m5])=>e(n[t])))};function b5(t,e,n){return Math.min(n,Math.max(e,t))}v5.props={};const x5=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=b5(n,0,t.length-1),r=b5(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},w5=(x5.props={},t=>{t=t.fields;return x5({fields:t})});w5.props={};const k5=t=>{const r=t["map"];return t=>{var e;return r&&(e=r,0!==Object.keys(e).length)?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t}},E5=(k5.props={},t=>{var{fields:t=[]}=t;const e=g5(t,!0);return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}}),M5=(E5.props={},t=>{const e=t["value"];return()=>e}),S5=(M5.props={},t=>{const{callback:e=$y}=t;return t=>e(t)}),O5=(S5.props={},t=>{const{callback:e=$y}=t;return t=>Array.isArray(t)?t.map(e):t});function _5(t,e){return t.parent===e.parent?1:2}function P5(t,e){return t+e.x}function T5(t,e){return Math.max(t,e.y)}function A5(){var s=_5,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(P5,0)/e.length,t.y=1+n.reduce(T5,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),o=t.x-s(t,n)/2,a=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-o)/(a-o)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function L5(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function N5(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=j5)):void 0===e&&(e=C5);for(var n,r,i,o,a,t=new F5(t),s=[t];n=s.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;0<=o;--o)s.push(r=i[o]=new F5(i[o])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(R5)}function C5(t){return t.children}function j5(t){return Array.isArray(t)?t[1]:null}function I5(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function R5(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function F5(t){this.data=t,this.depth=this.height=0,this.parent=null}function D5(t,e){return t.parent===e.parent?1:2}function B5(t){var e=t.children;return e?e[0]:t.t}function z5(t){var e=t.children;return e?e[e.length-1]:t.t}function G5(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function H5(){var f=D5,l=1,c=1,u=null;function e(t){var e,n,r,i,o,a,s=function(t){for(var e,n,r,i,o,a=[t=new G5(t,0)];e=a.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;0<=i;--i)a.push(n=e.children[i]=new G5(r[i],i)),n.parent=e;return(t.parent=new G5(null,0)).children=[t],t}(t);return s.eachAfter(h),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:f(e,n)/2,i=s-e.x,o=l/(n.x+s+i),a=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*o,t.y=t.depth*a})),t}function h(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,o=0,a=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=o,i.m+=o,o+=i.s+(a+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,o=t,a=e,s=i.parent.children[0],l=i.m,c=o.m,u=a.m,h=s.m;a=z5(a),i=B5(i),a&&i;)s=B5(s),(o=z5(o)).a=t,0<(r=a.z+u-i.z-l+f(a._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(a,t,n),t,r),l+=r,c+=r),u+=a.m,l+=i.m,h+=s.m,c+=o.m;a&&!z5(o)&&(o.t=a,o.m+=u-c),i&&!B5(s)&&(s.t=i,s.m+=l-h,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}O5.props={},F5.prototype=N5.prototype={constructor:F5,count:function(){return this.eachAfter(L5)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,o=[this],a=-1;n=o.pop();)if(t.call(e,n,++a,this),r=n.children)for(i=r.length-1;0<=i;--i)o.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return N5(this).eachBefore(I5)},[Symbol.iterator]:function*(){var t,e,n,r,i,o=[this];do{for(e=o.reverse(),o=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length)}},G5.prototype=Object.create(F5.prototype);const W5=h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:o=["x","y"]}=u,[a,s]=o;var t=N5(t,t=>t.children).sum(t=>t[e]).sort(i),l=h();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[a]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[a]=[t.source[a],t.target[a]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}},Y5=t=>W5(A5)(t),V5=(Y5.props={},t=>W5(H5)(t));function q5(t){return t.target.depth}function X5(t,e){return t.sourceLinks.length?t.depth:e-1}function U5(t){return function(){return t}}function $5(t,e){return K5(t.source,e.source)||t.index-e.index}function Z5(t,e){return K5(t.target,e.target)||t.index-e.index}function K5(t,e){return t.y0-e.y0}function J5(t){return t.value}function Q5(t){return t.index}function tE(t){return t.nodes}function eE(t){return t.links}function nE(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function rE({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function iE(){let x=0,w=0,k=1,E=1,M=24,S=8,O,_=Q5,P=X5,T,A,L,N=tE,C=eE,j=6;function e(e){e={nodes:N(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const y=new Map(i.map(t=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=nE(y,n)),"object"!=typeof r&&(r=t.target=nE(y,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const g of t)g.value=void 0===g.fixedValue?Math.max(cd(g.sourceLinks,J5),cd(g.targetLinks,J5)):g.fixedValue;{var o=e.nodes,a=o.length;let t=new Set(o),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>a)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max(ed(o,t=>t.depth)+1,0);for(let t=0;t<o.length;t++)(s=o[t]).depth=T.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(ed(t,t=>t.depth)+1,0),n=(k-x-M)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const o of t){var i=Math.max(0,Math.min(e-1,Math.floor(P.call(null,o,e))));o.layer=i,o.x0=x+i*n,o.x1=o.x0+M,r[i]?r[i].push(o):r[i]=[o]}if(A)for(const a of r)a.sort(A);return r}(e),t=(O=Math.min(S,(E-w)/(ed(u,t=>t.length)-1)),u),h=rd(t,t=>(E-w-(t.length-1)*O)/cd(t,J5));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*h,e=v.y1+O;for(const b of v.sourceLinks)b.width=b.value*h}e=(E-e+O)/(m.length+1);for(let t=0;t<m.length;++t){var f=m[t];f.y0+=e*(t+1),f.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Z5),n.sort($5)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var o,a=n[e];for(const c of a){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*O/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+O}for(var{target:o,width:a}of t.sourceLinks){if(o===e)break;n-=a}return n}(c,s)*l,e+=l}0<e&&(o=(t/e-c.y0)*r,c.y0+=o,c.y1+=o,R(c))}void 0===A&&a.sort(K5),a.length&&I(a,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var o,a=n[t];for(const c of a){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*O/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+O}for(var{source:o,width:a}of e.targetLinks){if(o===t)break;n-=a}return n}(s,c)*l,e+=l}0<e&&(o=(t/e-c.y0)*r,c.y0+=o,c.y1+=o,R(c))}void 0===A&&a.sort(K5),a.length&&I(a,i)}}(u,d,p)}return rE(e),e}function I(t,e){var n=t.length>>1,r=t[n];o(t,r.y0-O,n-1,e),i(t,r.y1+O,1+n,e),o(t,E,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],o=(e-i.y0)*r;1e-6<o&&(i.y0+=o,i.y1+=o),e=i.y1+O}}function o(t,e,n,r){for(;0<=n;--n){var i=t[n],o=(i.y1-e)*r;1e-6<o&&(i.y0-=o,i.y1-=o),e=i.y0-O}}function R({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(Z5);for(const{target:{targetLinks:e}}of t)e.sort($5)}}return e.update=function(t){return rE(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:U5(t),e):_},e.nodeAlign=function(t){return arguments.length?(P="function"==typeof t?t:U5(t),e):P},e.nodeDepth=function(t){return arguments.length?(T=t,e):T},e.nodeSort=function(t){return arguments.length?(A=t,e):A},e.nodeWidth=function(t){return arguments.length?(M=+t,e):M},e.nodePadding=function(t){return arguments.length?(S=O=+t,e):S},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:U5(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:U5(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],E=+t[1],e):[k-x,E-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],E=+t[1][1],e):[[x,w],[k,E]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}V5.props={};const oE={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},aE={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?rd(t.sourceLinks,q5)-1:0},justify:X5};const sE=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:o,nodeDepth:a,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},oE,h),l=iE().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(o).nodeDepth(a).nodeAlign("string"==(c=typeof(n=r))?aE[n]||X5:"function"==c?n:X5).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:o}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:o.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};sE.props={};var lE=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const cE={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function uE(t){const{y:c,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:y,sourceWeight:g,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},cE),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=y(t),t.sourceWeight=g(t),t.targetWeight=m(t)});const i=$f(r,t=>t.source),o=$f(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=o.has(t.id)?o.get(t.id):[];t.frequency=e.length+n.length,t.value=cd(e,t=>t.sourceWeight)+cd(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:lE[v])&&r.sort(n),!(n=(r=e).length))throw Zy("Invalid nodes: it's empty!");if(h){const a=f/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-f),e.height=u;var n=a+t,r=n+e.width,i=c-u/2,o=i+u;return e.x=[n,r,r,n],e.y=[i,i,o,o],t+e.width+2*a},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)return e.forEach(t=>{var e=p(t),n=y(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=$f(e,t=>t.source),l=$f(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],o=l.get(t)||[];let a=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+a,t.x[1]=n.x[0]+a+e,a+=e}),o.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+a,t.x[2]=n.x[0]+a+e,a+=e})})}(e,t),{nodes:e,edges:t}}}const hE=e=>t=>uE(e)(t),fE=(hE.props={},Math.PI/180),dE=64,pE=2048;function yE(t){return t.text}function gE(){return"serif"}function mE(){return"normal"}function vE(t){return t.value}function bE(){return 90*~~(2*Math.random())}function xE(){return 1}function wE(){}function kE(t,a,r,s){if(!a.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(dE<<5)/c,pE/c);let i=0,o=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){a=r[s],l.save(),l.font=a.style+" "+a.weight+" "+~~((a.size+1)/c)+"px "+a.font;let t=l.measureText(a.text+"m").width*c,e=a.size<<1;if(a.rotate?(d=Math.sin(a.rotate*fE),f=Math.cos(a.rotate*fE),u=t*f,h=t*d,f=e*f,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(h+f),Math.abs(h-f))):t=t+31>>5<<5,e>n&&(n=e),i+t>=dE<<5&&(i=0,o+=n,n=0),o+e>=pE)break;l.translate((i+(t>>1))/c,(o+(e>>1))/c),a.rotate&&l.rotate(a.rotate*fE),l.fillText(a.text,0,0),a.padding&&(l.lineWidth=2*a.padding,l.strokeText(a.text,0,0)),l.restore(),a.width=t,a.height=e,a.xoff=i,a.yoff=o,a.x1=t>>1,a.y1=e>>1,a.x0=-a.x1,a.y0=-a.y1,a.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(dE<<5)/c,pE/c).data,y=[];0<=--s;)if((a=r[s]).hasText){var g=a.width,m=g>>5;let n=a.y1-a.y0;for(let t=0;t<n*m;t++)y[t]=0;if(null==(i=a.xoff))return;o=a.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<g;t++){var v=m*e+(t>>5),b=p[(o+e)*(dE<<5)+(i+t)<<2]?1<<31-t%32:0;y[v]|=b,r|=b}r?t=e:(a.y0++,n--,e--,o++)}a.y1=a.y0+t,a.sprite=y.slice(0,(a.y1-a.y0)*m)}}}function EE(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function ME(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function SE(){return document.createElement("canvas")}function OE(t){return"function"==typeof t?t:function(){return t}}const _E={archimedean:EE,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function PE(){let b=[256,256],r=yE,i=gE,p=vE,y=mE,g=bE,m=xE,x=EE,w=Math.random,v=wE,k=[],E=null,M=1/0;const S=mE,O=SE,_={};return _.start=function(){const[o,a]=b,s=((t=O()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(dE<<5)/e,t.height=pE/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||ME((b[0]>>5)*b[1]),c=k.length,u=[],h=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=S.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=g.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let f=-1,d=_.board?[{x:0,y:0},{x:o,y:a}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<M&&++f<c;){var i=h[f];i.x=o*(w()+.5)>>1,i.y=a*(w()+.5)>>1,kE(s,i,h,f),i.hasText&&function(i,t,e){var n=t.x,r=t.y,o=Math.sqrt(b[0]*b[0]+b[1]*b[1]),a=x(b),s=w()<.5?1:-1;let l,c=-s,u,h;for(;(l=a(c+=s))&&(u=~~l[0],h=~~l[1],!(Math.min(Math.abs(u),Math.abs(h))>=o));)if(t.x=n+u,t.y=r+h,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,o=t.width>>5,e=t.x-(o<<4),a=127&e,s=32-a,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=o;t++)if((u<<s|(t<o?(u=i[e*o+t])>>>a:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var f=t.sprite,d=t.width>>5,p=b[0]>>5,y=t.x-(d<<4),g=127&y,m=32-g,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(y>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=f[e*d+t])>>>g:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}_._tags=u,_._bounds=d,f>=c&&(_.stop(),v.call(null,"end",{cloud:_,words:u,bounds:d}))}return E&&clearInterval(E),E=setInterval(n,0),n(),_},_.stop=function(){return E&&(clearInterval(E),E=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,o=ME((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),a=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=a[l]&&250<=a[1+l]&&250<=a[2+l]?1<<31-t%32:0;o[s]|=l}_.board=o,_.hasImage=!0}},_.timeInterval=function(t){M=null==t?1/0:t},_.words=function(t){k=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=OE(t)},_.font=function(t){i=OE(t)},_.fontWeight=function(t){y=OE(t)},_.rotate=function(t){g=OE(t)},_.spiral=function(t){x=_E[t]||t},_.fontSize=function(t){p=OE(t)},_.padding=function(t){m=OE(t)},_.random=function(t){w=OE(t)},_.on=function(t){v=OE(t)},_}const TE={size:[500,500],fontSize:[14,28]};function AE(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const LE=f=>h=>me(void 0,void 0,void 0,function*(){var i,o,t=Object.assign({},TE,f),e=PE(),e=(i=e,o=t,yield{set(t,e,n){return void 0!==o[t]&&(e=e?e.call(null,o[t]):o[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return me(this,void 0,void 0,function*(){var t;return void 0!==o[e]&&(t=n?yield n.call(null,o[e]):o[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=h.map(t=>t.value),n=t,t=[rd(e),ed(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[o,a]=t;return a===o?()=>(i+r)/2:({value:t})=>(i-r)/(a-o)*(t-o)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",AE,e.createMask),e.words([...h]),e.start());const[r,a]=t.size;var t=[{x:0,y:0},{x:r,y:a}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=U(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+a/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?a:c})),t});LE.props={};var Rs="object"==typeof rn&&rn&&rn.Object===Object&&rn,hs="object"==typeof self&&self&&self.Object===Object&&self,Hs=Rs||hs||Function("return this")(),Vs=Hs.Symbol,Ks=Object.prototype,NE=Ks.hasOwnProperty,CE=Ks.toString,jE=Vs?Vs.toStringTag:void 0;var IE=Object.prototype.toString;var RE="[object Null]",FE="[object Undefined]",DE=Vs?Vs.toStringTag:void 0;function BE(t){if(null==t)return void 0===t?FE:RE;if(DE&&DE in Object(t)){var e=t,n=NE.call(e,jE),r=e[jE];try{var i=!(e[jE]=void 0)}catch(t){}var o=CE.call(e);return i&&(n?e[jE]=r:delete e[jE]),o}return IE.call(t)}function zE(t){return null!=t&&"object"==typeof t}var GE=Array.isArray;function HE(t){return t}var WE="[object AsyncFunction]",YE="[object Function]",VE="[object GeneratorFunction]",qE="[object Proxy]";function XE(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var UE=/^(?:0|[1-9]\d*)$/;var $E=9007199254740991;function ZE(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=$E}function KE(t){return null!=t&&ZE(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=BE(t))==YE||e==VE||e==WE||e==qE}(t)}var JE=Object.prototype;function QE(t){return zE(t)&&"[object Arguments]"==BE(t)}var qs=Object.prototype,tM=qs.hasOwnProperty,eM=qs.propertyIsEnumerable,nM=QE(function(){return arguments}())?QE:function(t){return zE(t)&&tM.call(t,"callee")&&!eM.call(t,"callee")};var zs="object"==typeof x&&x&&!x.nodeType&&x,va=zs&&"object"==typeof module&&module&&!module.nodeType&&module,W1=va&&va.exports===zs?Hs.Buffer:void 0,rM=(W1?W1.isBuffer:void 0)||function(){return!1},iM={};iM["[object Float32Array]"]=iM["[object Float64Array]"]=iM["[object Int8Array]"]=iM["[object Int16Array]"]=iM["[object Int32Array]"]=iM["[object Uint8Array]"]=iM["[object Uint8ClampedArray]"]=iM["[object Uint16Array]"]=iM["[object Uint32Array]"]=!0,iM["[object Arguments]"]=iM["[object Array]"]=iM["[object ArrayBuffer]"]=iM["[object Boolean]"]=iM["[object DataView]"]=iM["[object Date]"]=iM["[object Error]"]=iM["[object Function]"]=iM["[object Map]"]=iM["[object Number]"]=iM["[object Object]"]=iM["[object RegExp]"]=iM["[object Set]"]=iM["[object String]"]=iM["[object WeakMap]"]=!1;var oM,ba="object"==typeof x&&x&&!x.nodeType&&x,aM=ba&&"object"==typeof module&&module&&!module.nodeType&&module,sM=aM&&aM.exports===ba&&Rs.process,r=function(){try{var t=aM&&aM.require&&aM.require("util").types;return t?t:sM&&sM.binding&&sM.binding("util")}catch(t){}}(),lo=r&&r.isTypedArray,lM=lo?(oM=lo,function(t){return oM(t)}):function(t){return zE(t)&&ZE(t.length)&&!!iM[BE(t)]},cM=Object.prototype.hasOwnProperty;function uM(t,e){var n,r,i,o,a=GE(t),s=!a&&nM(t),l=!a&&!s&&rM(t),c=!a&&!s&&!l&&lM(t),u=a||s||l||c,h=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],f=h.length;for(n in t)!e&&!cM.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(o=void 0,o=typeof(r=n),(i=null==(i=f)?9007199254740991:i)&&("number"==o||"symbol"!=o&&UE.test(r))&&-1<r&&r%1==0&&r<i))||h.push(n);return h}hM=Object.keys,fM=Object;var hM,fM,dM=function(t){return hM(fM(t))},pM=Object.prototype.hasOwnProperty;function yM(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||JE))return dM(t);var e,n,r,i=[];for(r in Object(t))pM.call(t,r)&&"constructor"!=r&&i.push(r);return i}function gM(t){return(KE(t)?uM:yM)(t)}var mM,vM=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[mM?a:++r];if(!1===e(i[s],s,i))break}return t};xM=function(t,e){return t&&vM(t,e,gM)};function bM(t,e){if(null!=t){if(!KE(t))return xM(t,e);for(var n=t.length,r=wM?n:-1,i=Object(t);(wM?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var xM,wM;function kM(t,e){(GE(t)?XE:bM)(t,"function"==typeof(t=e)?t:HE)}function EM(t,e,n){return e<=t&&t<=n}var MM;function SM(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function OM(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var o,a,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(a=u,((s=[e,n])[0]-(o=c)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return 1;0<SM(c[1]-n)!=0<SM(u[1]-n)&&SM(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function _M(t){for(var e,n,r=[],i=t.length,o=0;o<i-1;o++){var a=t[o],s=t[o+1];r.push({from:{x:a[0],y:a[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function PM(t,c){var u=!1;return kM(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,o=n.y-e.y,a=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(a*a+t*t)*(s*s+r*r)<(n=a*r-t*s)*n&&EM(r=(i*r-o*s)/n,0,1)&&EM((i*t-o*a)/n,0,1)?{x:e.x+r*a,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,o,a,s,l}),u}function TM(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function AM(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}const LM=()=>n=>{var r=[];n.sort((t,e)=>t.style.priority-e.style.priority);for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var o=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,o,t=TM(e),a=TM(n);if(t=t,!((a=a).minX>t.maxX||a.maxX<t.minX||a.minY>t.maxY||a.maxY<t.minY))return r=!1,kM(n,function(t){if(OM(e,t[0],t[1]))return!(r=!0)}),r?1:(kM(e,function(t){if(OM(n,t[0],t[1]))return!(r=!0)}),r||(i=_M(e),a=_M(n),o=!1,kM(a,function(t){if(PM(i,t))return!(o=!0)}),o))}}(AM(i),AM(o))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function NM(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const CM=t=>{const{maxIter:k=10,maxError:E=.1,padding:M=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[y,g]=NM(),[m,v]=NM();var o,a,s,l,[c,t]=NM(),[u,n]=NM();for(const b of i){var{min:r,max:h}=b.getRenderBounds();const[x,y]=r;var[r,h]=h;g(b,y),v(b,y),t(b,h-y),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>zf(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var f=i[n];let t=n+1,e;for(;(e=i[t])&&([[o,a],[s,l]]=[u(f),u(e)],!(o<l&&s<a));)t+=1;if(e){const y=m(f);var d=c(f),p=m(e),d=p-(y+d);d<M&&(d=(M-d)/2,r=Math.max(r,d),v(f,y-d),v(e,p+d))}}if(r<E)break}for(const w of i)w.style.y+=m(w)-y(w)}return i}};function jM(){return{"data.fetch":p5,"data.inline":M5,"data.sortBy":E5,"data.filterBy":v5,"data.pick":w5,"data.rename":k5,"data.subset":x5,"data.fold":y5,"data.custom":S5,"data.map":O5,"data.cluster":Y5,"data.tree":V5,"data.sankey":sE,"data.arc":hE,"data.wordCloud":LE,"transform.maybeZeroY1":Xw,"transform.maybeZeroX":uk,"transform.maybeStackY":ok,"transform.maybeTitleX":ak,"transform.maybeTooltipY":ck,"transform.maybeTooltipPosition":lk,"transform.maybeSeries":pk,"transform.maybeZeroPadding":bk,"transform.stackY":rk,"transform.dodgeX":xk,"transform.jitter":Sk,"transform.jitterX":Ok,"transform.symmetryY":_k,"transform.diffY":Pk,"transform.stackEnter":wk,"transform.normalizeY":kk,"transform.select":Ck,"transform.selectX":jk,"transform.selectY":Ik,"transform.groupX":qk,"transform.groupY":Xk,"transform.groupColor":Uk,"transform.group":Vk,"transform.maybeSize":fk,"transform.maybeZeroY":hk,"transform.maybeKey":dk,"transform.sortX":Zk,"transform.sortY":Jk,"transform.sortColor":Kk,"transform.flexX":Qk,"transform.maybeTupleY":yk,"transform.maybeTupleX":gk,"transform.maybeIdentityY":mk,"transform.maybeIdentityX":vk,"transform.pack":e5,"coordinate.cartesian":yf,"coordinate.polar":gf,"coordinate.helix":mf,"coordinate.transpose":vf,"coordinate.theta":kf,"coordinate.reflect":bf,"coordinate.reflectX":xf,"coordinate.reflectY":wf,"coordinate.parallel":Mf,"coordinate.fisheye":Sf,"coordinate.fisheyeX":Of,"coordinate.fisheyeY":_f,"coordinate.radial":Ef,"encode.constant":Pf,"encode.field":Af,"encode.transform":Tf,"encode.column":Lf,"mark.interval":Df,"mark.rect":Bf,"mark.line":vd,"mark.point":bd,"mark.text":xd,"mark.cell":wd,"mark.area":kd,"mark.link":Ed,"mark.image":Md,"mark.polygon":Sd,"mark.box":Od,"mark.vector":_d,"mark.lineX":Td,"mark.lineY":Pd,"mark.connector":Ad,"mark.range":Cd,"mark.rangeX":jd,"mark.rangeY":Id,"palette.category10":Rd,"palette.category20":Fd,"palette.sequentialBlue":Dd,"palette.sequentialDarkBlue":Bd,"palette.sequentialGreen":zd,"palette.sequentialDarkGreen":Gd,"palette.sequentialGrey":Hd,"palette.sequentialOrange":Wd,"palette.sequentialPink":Yd,"palette.sequentialRed":Vd,"palette.sequentialYellow":qd,"palette.sequentialPurple":Xd,"palette.sequentialYellowOrange":Ud,"palette.sequentialYellowGreen":$d,"palette.sequentialPinkPurple":Zd,"palette.sequentialGreenBlue":Kd,"palette.divergingGreenYellow":Jd,"palette.divergingRedBlue":Qd,"palette.divergingGreenRed":tp,"palette.divergingRedPurple":ep,"scale.linear":B0,"scale.ordinal":z0,"scale.band":D0,"scale.identity":G0,"scale.point":H0,"scale.time":W0,"scale.log":Y0,"scale.pow":V0,"scale.sqrt":$0,"scale.threshold":q0,"scale.quantile":X0,"scale.quantize":U0,"scale.sequential":Z0,"shape.interval.rect":mg,"shape.interval.hollow":vg,"shape.interval.funnel":bg,"shape.interval.pyramid":wg,"shape.rect.rect":mg,"shape.rect.hollow":vg,"shape.cell.cell":mg,"shape.cell.hollow":vg,"shape.line.line":Sg,"shape.line.hv":_g,"shape.line.vh":Pg,"shape.line.hvh":Tg,"shape.line.smooth":Og,"shape.point.bowtie":Ng,"shape.point.cross":Cg,"shape.point.diamond":jg,"shape.point.hexagon":Ig,"shape.point.hollowBowtie":Rg,"shape.point.hollowDiamond":Fg,"shape.point.hollowHexagon":Dg,"shape.point.hollow":Bg,"shape.point.hollowSquare":zg,"shape.point.hollowTriangle":Gg,"shape.point.hollowTriangleDown":Hg,"shape.point.hyphen":Wg,"shape.point.line":Yg,"shape.point.plus":Vg,"shape.point.point":qg,"shape.point.square":Xg,"shape.point.tick":Ug,"shape.point.triangle":$g,"shape.point.triangleDown":Zg,"shape.text.text":P2,"shape.area.area":C2,"shape.area.smooth":j2,"shape.area.step":I2,"shape.link.smooth":F2,"shape.link.vhv":D2,"shape.link.arc":B2,"shape.link.link":R2,"shape.image.image":z2,"shape.polygon.polygon":G2,"shape.polygon.ribbon":H2,"shape.box.box":W2,"shape.vector.vector":Kg,"shape.label.label":nx,"shape.text.badge":A2,"shape.lineX.line":Y2,"shape.lineY.line":Y2,"shape.connector.connector":$2,"shape.range.range":mg,"shape.rangeX.range":mg,"shape.rangeY.range":mg,"theme.light":rx,"theme.dark":ix,"component.axisX":Mx,"component.axisY":Sx,"component.legendCategory":Ox,"component.legendContinuous":_x,"component.title":Ax,"animation.scaleInX":Rx,"animation.scaleOutX":Fx,"animation.scaleInY":Dx,"animation.scaleOutY":Bx,"animation.waveIn":Vx,"animation.fadeIn":zx,"animation.fadeOut":Gx,"animation.zoomIn":qx,"animation.zoomOut":Xx,"animation.morphing":Yx,"interaction.elementActive":ow,"interaction.elementActiveByX":aw,"interaction.elementActiveByColor":sw,"interaction.elementSelect":cw,"interaction.elementSelectByX":uw,"interaction.elementSelectByColor":hw,"interaction.fisheye":dw,"interaction.chartIndex":fw,"composition.spaceLayer":mw,"composition.spaceFlex":vw,"composition.mark":xw,"composition.view":bw,"composition.facetRect":Aw,"composition.repeatMatrix":jw,"composition.facetCircle":zw,"composition.timingKeyframe":Gw,"labelTransform.hideOverlap":LM,"labelTransform.dodgeY":CM}}function IM(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}(u=MM=MM||{}).BEFORE_RENDER="beforerender",u.AFTER_RENDER="afterrender",u.BEFORE_PAINT="beforepaint",u.AFTER_PAINT="afterpaint",u.BEFORE_CHANGE_DATA="beforechangedata",u.AFTER_CHANGE_DATA="afterchangedata",u.BEFORE_CLEAR="beforeclear",u.AFTER_CLEAR="afterclear",u.BEFORE_DESTROY="beforedestroy",u.AFTER_DESTROY="afterdestroy",u.BEFORE_CHANGE_SIZE="beforechangesize",u.AFTER_CHANGE_SIZE="afterchangesize";const RM=t=>parseInt(t);function FM(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||RM(t.width),e=e.clientHeight||RM(t.height),{width:(i={width:i-(RM(t.paddingLeft)+RM(t.paddingRight)),height:e-(RM(t.paddingLeft)+RM(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function DM(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Zy("Unknown Component: "+t)};return[t=>{var e=t["type"],t=U(t,["type"]);return r(e)(Object.assign({},t))},r]}function g(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}po=g("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),uo=g("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Ds=g("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),co=g("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),ho=g("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),e=g("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),t=g("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Is=g("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),oo=g("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Bs=g("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function BM(t,e,n){(t.prototype=e.prototype=n).constructor=t}function zM(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function GM(){}var HM=1/.7,Fs="\\s*([+-]?\\d+)\\s*",yo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",WM=/^#([0-9a-f]{3,8})$/,YM=new RegExp(`^rgb\\(${Fs},${Fs},${Fs}\\)$`),VM=new RegExp(`^rgb\\(${go},${go},${go}\\)$`),qM=new RegExp(`^rgba\\(${Fs},${Fs},${Fs},${yo}\\)$`),XM=new RegExp(`^rgba\\(${go},${go},${go},${yo}\\)$`),UM=new RegExp(`^hsl\\(${yo},${go},${go}\\)$`),$M=new RegExp(`^hsla\\(${yo},${go},${go},${yo}\\)$`),ZM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function KM(){return this.rgb().formatHex()}function JM(){return this.rgb().formatRgb()}function QM(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=WM.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?t3(e):3===n?new i3(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?e3(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?e3(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=YM.exec(t))?new i3(e[1],e[2],e[3],1):(e=VM.exec(t))?new i3(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qM.exec(t))?e3(e[1],e[2],e[3],e[4]):(e=XM.exec(t))?e3(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=UM.exec(t))?u3(e[1],e[2]/100,e[3]/100,1):(e=$M.exec(t))?u3(e[1],e[2]/100,e[3]/100,e[4]):ZM.hasOwnProperty(t)?t3(ZM[t]):"transparent"===t?new i3(NaN,NaN,NaN,0):null}function t3(t){return new i3(t>>16&255,t>>8&255,255&t,1)}function e3(t,e,n,r){return new i3(t=r<=0?e=n=NaN:t,e,n,r)}function n3(t){return(t=t instanceof GM?t:QM(t))?new i3((t=t.rgb()).r,t.g,t.b,t.opacity):new i3}function r3(t,e,n,r){return 1===arguments.length?n3(t):new i3(t,e,n,null==r?1:r)}function i3(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function o3(){return"#"+c3(this.r)+c3(this.g)+c3(this.b)}function a3(){var t=s3(this.opacity);return(1===t?"rgb(":"rgba(")+l3(this.r)+`, ${l3(this.g)}, `+l3(this.b)+(1===t?")":`, ${t})`)}function s3(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function l3(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function c3(t){return((t=l3(t))<16?"0":"")+t.toString(16)}function u3(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new f3(t,e,n,r)}function h3(t){var e,n,r,i,o,a,s,l;return t instanceof f3?new f3(t.h,t.s,t.l,t.opacity):(t=t instanceof GM?t:QM(t))?t instanceof f3?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=NaN,l=((o=Math.max(e,n,r))+i)/2,(s=o-i)?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=0<l&&l<1?0:a,new f3(a,s,l,t.opacity)):new f3}function f3(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function d3(t){return(t=(t||0)%360)<0?t+360:t}function p3(t){return Math.max(0,Math.min(1,t||0))}function y3(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}BM(GM,QM,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:KM,formatHex:KM,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return h3(this).formatHsl()},formatRgb:JM,toString:JM}),BM(i3,r3,zM(GM,{brighter(t){return t=null==t?HM:Math.pow(HM,t),new i3(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new i3(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new i3(l3(this.r),l3(this.g),l3(this.b),s3(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:o3,formatHex:o3,formatHex8:function(){return"#"+c3(this.r)+c3(this.g)+c3(this.b)+c3(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:a3,toString:a3})),BM(f3,function(t,e,n,r){return 1===arguments.length?h3(t):new f3(t,e,n,null==r?1:r)},zM(GM,{brighter(t){return t=null==t?HM:Math.pow(HM,t),new f3(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new f3(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new i3(y3(240<=t?t-240:120+t,n,e),y3(t,n,e),y3(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new f3(d3(this.h),p3(this.s),p3(this.l),s3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=s3(this.opacity);return(1===t?"hsl(":"hsla(")+d3(this.h)+`, ${100*p3(this.s)}%, ${100*p3(this.l)}%`+(1===t?")":`, ${t})`)}}));const g3=Math.PI/180,m3=180/Math.PI;var v3=1.78277,b3=-.29227,x3=-.90649,w3=1.97294,k3=w3*x3,E3=w3*v3,M3=v3*b3- -.14861*x3;function S3(t,e,n,r){return 1===arguments.length?(i=t)instanceof O3?new O3(i.h,i.s,i.l,i.opacity):(o=(i=i instanceof i3?i:n3(i)).r/255,a=i.g/255,l=i.b/255,l=(w3*(a-(o=(M3*l+k3*o-E3*a)/(M3+k3-E3)))-b3*(a=l-o))/x3,new O3((l=(s=Math.sqrt(l*l+a*a)/(w3*o*(1-o)))?Math.atan2(l,a)*m3-120:NaN)<0?l+360:l,s,o,i.opacity)):new O3(t,e,n,null==r?1:r);var i,o,a,s,l}function O3(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}BM(O3,S3,zM(GM,{brighter(t){return t=null==t?HM:Math.pow(HM,t),new O3(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new O3(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*g3,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new i3(255*(e+n*(-.14861*r+v3*t)),255*(e+n*(b3*r+x3*t)),255*(e+w3*r*n),this.opacity)}}));var _3=t=>()=>t;function P3(e,n){return function(t){return e+t*n}}function T3(o){return 1==(o=+o)?A3:function(t,e){return e-t?(n=t,r=e,i=o,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):_3(isNaN(t)?e:t);var n,r,i}}function A3(t,e){var n=e-t;return n?P3(t,n):_3(isNaN(t)?e:t)}!function t(e){var a=T3(e);function n(e,t){var n=a((e=r3(e)).r,(t=r3(t)).r),r=a(e.g,t.g),i=a(e.b,t.b),o=A3(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=o(t),e+""}}return n.gamma=t,n}(1);L3=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],o=0<n?s[n-1]:2*r-i,a=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*o+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*a)/6}};var L3,N3=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a=0;a<n;++a)e=r3(t[a]),r[a]=e.r||0,i[a]=e.g||0,o[a]=e.b||0;return r=L3(r),i=L3(i),o=L3(o),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e+""}};function C3(s){return function t(a){function e(e,t){var n=s((e=S3(e)).h,(t=S3(t)).h),r=A3(e.s,t.s),i=A3(e.l,t.l),o=A3(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,a)),e.opacity=o(t),e+""}}return a=+a,e.gamma=t,e}(1)}C3(function(t,e){var n=e-t;return n?P3(t,180<n||n<-180?n-360*Math.round(n/360):n):_3(isNaN(t)?e:t)});var mo=C3(A3),o=t=>N3(t[t.length-1]),vo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(g),xo=o(vo),bo=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(g),wo=o(bo),a=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(g),js=o(a),fo=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(g),rn=o(fo),hs=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(g),Ks=o(hs),Vs=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(g),qs=o(Vs),va=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(g),zs=o(va),Hs=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(g),W1=o(Hs),ba=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(g),Rs=o(ba),r=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(g),lo=o(r),u=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(g),Fs=o(u),go=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(g),yo=o(go),j3=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(g),I3=o(j3),R3=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(g),F3=o(R3),D3=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(g),B3=o(D3),z3=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(g),G3=o(z3),H3=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(g),W3=o(H3),Y3=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(g),V3=o(Y3),q3=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(g),X3=o(q3),U3=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(g),$3=o(U3),Z3=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(g),K3=o(Z3),J3=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(g),Q3=o(J3),t4=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(g),e4=o(t4),n4=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(g),r4=o(n4),i4=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(g),o4=o(i4),a4=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(g),s4=o(a4),l4=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(g),o=o(l4);var c4=mo(S3(300,.5,0),S3(-240,.5,1)),u4=mo(S3(-100,.75,.35),S3(80,1.5,.8)),mo=mo(S3(260,.75,.35),S3(80,1.5,.8)),h4=S3();var f4=r3(),d4=Math.PI/3,p4=2*Math.PI/3;function y4(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var g4=y4(g("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),m4=y4(g("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),v4=y4(g("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),b4=y4(g("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),x4=Object.freeze({__proto__:null,schemeCategory10:po,schemeAccent:uo,schemeDark2:Ds,schemePaired:co,schemePastel1:ho,schemePastel2:e,schemeSet1:t,schemeSet2:Is,schemeSet3:oo,schemeTableau10:Bs,interpolateBrBG:xo,schemeBrBG:vo,interpolatePRGn:wo,schemePRGn:bo,interpolatePiYG:js,schemePiYG:a,interpolatePuOr:rn,schemePuOr:fo,interpolateRdBu:Ks,schemeRdBu:hs,interpolateRdGy:qs,schemeRdGy:Vs,interpolateRdYlBu:zs,schemeRdYlBu:va,interpolateRdYlGn:W1,schemeRdYlGn:Hs,interpolateSpectral:Rs,schemeSpectral:ba,interpolateBuGn:lo,schemeBuGn:r,interpolateBuPu:Fs,schemeBuPu:u,interpolateGnBu:yo,schemeGnBu:go,interpolateOrRd:I3,schemeOrRd:j3,interpolatePuBuGn:F3,schemePuBuGn:R3,interpolatePuBu:B3,schemePuBu:D3,interpolatePuRd:G3,schemePuRd:z3,interpolateRdPu:W3,schemeRdPu:H3,interpolateYlGnBu:V3,schemeYlGnBu:Y3,interpolateYlGn:X3,schemeYlGn:q3,interpolateYlOrBr:$3,schemeYlOrBr:U3,interpolateYlOrRd:K3,schemeYlOrRd:Z3,interpolateBlues:Q3,schemeBlues:J3,interpolateGreens:e4,schemeGreens:t4,interpolateGreys:r4,schemeGreys:n4,interpolatePurples:o4,schemePurples:i4,interpolateReds:s4,schemeReds:a4,interpolateOranges:o,schemeOranges:l4,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:c4,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return h4.h=360*t-100,h4.s=1.5-1.5*e,h4.l=.8-.9*e,h4+""},interpolateWarm:u4,interpolateCool:mo,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,f4.r=255*(e=Math.sin(t))*e,f4.g=255*(e=Math.sin(t+d4))*e,f4.b=255*(e=Math.sin(t+p4))*e,f4+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:g4,interpolateMagma:m4,interpolateInferno:v4,interpolatePlasma:b4});function w4(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function k4(t,e,n,r,i){var o=t[0],t=t[1],a=lt();return o=[o,t],(t=a)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=o[0],t[7]=o[1],t[8]=1,t}function E4(t,e,n,r,i){var o=new f0({range:[e,e+r]}),a=new f0({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[o.map(e),a.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[o.invert(e),a.invert(t)]}}}function M4(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function S4(t,e,n,r,i){return t[0]}function O4(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],t=t[3],l=new f0({range:[s,t]}),c=new f0({range:[o,a]}),u=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=w4(Math.atan2(t,e),o,a);return[c.invert(t),l.invert(n)]}}}function _4(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function P4(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return j4.apply(void 0,I4([[-1,-1]],e,!1))}function T4(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return j4.apply(void 0,I4([[-1,1]],e,!1))}function A4(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return j4.apply(void 0,I4([[1,-1]],e,!1))}function L4(t,e,n,r,i){var o,t=t[0],a=lt();return a=a,t=t,o=Math.sin(t),t=Math.cos(t),a[0]=t,a[1]=o,a[2]=0,a[3]=-o,a[4]=t,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a}function N4(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=(t[3]-s)/(+a/(2*Math.PI)+1),c=l/(2*Math.PI),u=new f0({range:[s,s+.99*l]}),h=new f0({range:[o,a]}),f=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*f)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=w4(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,o,a),e=n-c*t;return[h.invert(t),u.invert(e)]}}}function C4(t,e,n,r,i){var s=t[0],l=t[1],o=t[2],t=t[3],c=new f0({range:[o,t]});return{transform:function(t){for(var e=[],n=t.length,r=new d0({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var o=t[i],a=r.map(i),o=c.map(o);e.push(a,o)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var j4=function(t,e,n,r,i){var o=t[0],t=t[1],a=lt();return o=[o,t],(t=a)[0]=o[0],t[1]=0,t[2]=0,t[3]=0,t[4]=o[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},I4=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function R4(t){return 1/Math.tan(t)}function F4(t,e,n,r,i){var o=R4(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*o,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*o,t]}}}function D4(t,e,n,r,i){var o=R4(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*o]},untransform:function(t){var e=t[0];return[e,t[1]-e*o]}}}function B4(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r,r=o?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function z4(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(o?-1:1))+e}function G4(t,e,n){return n?new f0({range:[0,1],domain:[0,e]}).map(t):t}function H4(t,e,n,r,i){var o=t[0],a=t[1],t=t[2],s=G4(o,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[B4(e,s,a,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[z4(e,s,a,0,1),t]}}}function W4(t,e,n,r,i){var o=t[0],a=t[1],t=t[2],s=G4(o,i,void 0!==t&&t);return{transform:function(t){return[t[0],B4(t[1],s,a,0,1)]},untransform:function(t){return[t[0],z4(t[1],s,a,0,1)]}}}function Y4(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],t=t[4],c=G4(o,r,t=void 0!==t&&t),u=G4(a,i,t);return{transform:function(t){var e=t[0],t=t[1];return[B4(e,c,s,0,1),B4(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[z4(e,c,s,0,1),z4(t,u,l,0,1)]}}}function V4(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new f0({range:[0,r]}),u=new f0({range:[0,i]}),h=t?o:c.map(o),f=t?a:u.map(a);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=B4(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=z4(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var q4=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},X4=(U4.prototype.update=function(t){this.options=N({},this.options,t),this.recoordinate()},U4.prototype.clone=function(){return new U4(this.options)},U4.prototype.getOptions=function(){return this.options},U4.prototype.clear=function(){this.update({transformations:[]})},U4.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},U4.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},U4.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:q4(q4([],n,!0),[q4([],t,!0)],!1)}),this},U4.prototype.map=function(t){return this.output(t)},U4.prototype.invert=function(t){return this.input(t)},U4.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},U4.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?q4([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],o=[],i=function(t,e){return o.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},a=0,s=e;a<s.length;a++){var l,c,u,h,f=s[a],d=f[0],f=f.slice(1),p=this.transformers[d];p&&(l=(h=this.options).x,c=h.y,u=h.width,h=h.height,p=p(q4([],f,!0),l,c,u,h),(f=p)instanceof Float32Array||f instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||lf,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):lf}.apply(void 0,o)},U4.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,s,l,c,u,h,f,d,p=lt();return e&&t.reverse(),t.forEach(function(t){return ct(p,p,t)}),e&&(e=t=p,(d=new st(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=(e=e[8])*o-a*l,f=d*c+n*(u=-e*i+a*s)+r*(h=l*i-o*s))&&(t[0]=c*(f=1/f),t[1]=(-e*n+r*l)*f,t[2]=(a*n-r*o)*f,t[3]=u*f,t[4]=(e*d-r*s)*f,t[5]=(-a*d+r*i)*f,t[6]=h*f,t[7]=(-l*d+n*s)*f,t[8]=(o*d-n*i)*f),function(t){t=[t[0],t[1],1];return Vt(t,t,p),[t[0],t[1]]}},U4);function U4(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:E4,translate:k4,custom:M4,matrix:S4,polar:O4,transpose:_4,scale:j4,"shear.x":F4,"shear.y":D4,reflect:P4,"reflect.x":T4,"reflect.y":A4,rotate:L4,helix:N4,parallel:C4,fisheye:Y4,"fisheye.x":H4,"fisheye.y":W4,"fisheye.circular":V4},this.update(t)}function $4(t){return void 0!==t.find(t=>"polar"===t.type)}function Z4(t){return void 0!==t.find(t=>"helix"===t.type)}function K4(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function J4(t){return void 0!==t.find(t=>"theta"===t.type)}function Q4(t){return void 0!==t.find(t=>"radial"===t.type)}function tS(t,e,n,r,i,o,a){var s,l,c,u=t["scaleName"],t=function(t,e,n,r,i,o){var{name:a,field:s}=t,{field:s=s,guide:l={}}=e,c=function(t,e){var{scale:t,name:n,value:r,visual:i}=t,{type:e,domain:o,range:a}=e;return void 0!==e?e:i?"identity":void 0!==t?t:function(t){return t.some(t=>"object"==typeof t&&!(t instanceof Date)&&null!==t)}(r)?"identity":"string"==typeof a?"linear":2<(o||a||[]).length?oS(n):void 0===o?sS(r)?oS(n):lS(r)?"time":"linear":sS(o)?oS(n):lS(r)?"time":"linear"}(t,e);if("string"!=typeof c)return e;var u=function(t,e,n){var r=e["value"],e=n["domain"];if(void 0!==e)return e;var{domainMax:i,domainMin:o}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"threshold":var[a,s]=function(t,e){var{zero:e=!1}=e;if(0===t.length)return[];let n=1/0,r=-1/0;for(const i of t)Jy(i)&&(n=Math.min(n,+i),r=Math.max(r,+i));return e?[Math.min(0,n),r]:[n,r]}(r,n);return[o||a,i||s];case"band":case"ordinal":case"point":return aS(r);case"quantile":return function(t){return aS(t).sort()}(r);case"sequential":var[a,s]=function(t){var[t,e]=Vf(t,t=>+t);return[t<0?-e:t,e]}(r);return[o||a,i||s];default:return[]}}(c,t,e);return Object.assign(Object.assign(Object.assign({},e),function(t,e,n,r){var i=e["name"];switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Wp,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:J4(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,i,r,n);case"sequential":return function(t){const{palette:e,offset:n}=t,r=Vh(e),i=x4["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(c,t,e,n)),{domain:u,range:function(t,e,n,r,i,o,a){var s=n["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var l=e["name"],{rangeMin:c,rangeMax:u}=n;switch(t){case"linear":case"time":case"log":case"sqrt":var h=iS(e,n,r,o,a),[h,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"size"===t?[1,10]:[0,1]}(l,h);return[c||h,u||f];case"band":case"point":return[c||0,u||1];case"ordinal":h=iS(e,n,r,o,a);return"color"===l?h:i;case"sequential":return;default:return[]}}(c,t,e,u,r,i,o),guide:l,name:a,field:s,type:c})}(t,e,n,r,i,a),e=t["independent"];return e?t:o.has(u)?(n=o.get(u),r=t,{type:a,domain:e,range:s}=i=n,{type:r,domain:l,range:c}=r,"string"==typeof a&&"string"==typeof r&&(i.type=function(t,e){return uS(t,e,"linear","identity")?"identity":uS(t,e,"band","point")?"band":t}(a,r),i.domain=function(t,e,n){switch(t){case"linear":case"pow":case"log":return hS(e,n);case"band":case"ordinal":return fS(e,n);default:return e}}(a,e,l),i.range=function(t,e,n){switch(t){case"linear":case"band":case"pow":case"log":return hS(e,n);case"ordinal":return fS(e,n);default:return e}}(a,s,c)),n):(o.set(u,t),t)}function eS(t,e){var t=t.map(t=>t[e]).filter(({facet:t=!0})=>t),n=t.flatMap(t=>t.domain),r=t.every(nS)?Vf(n):t.every(rS)?Array.from(new Set(n)):null;if(null!==r)for(const i of t)i.domain=r}function nS(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function rS(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function iS(t,e,n,r,i){var[i]=DM("palette",i),t=t["value"],{defaultCategory10:r,defaultCategory20:o}=r,t=cg(t).length<=r.length?r:o,{palette:r,offset:o}=e;return function(t,n,r=t=>t){if(!t)return null;var t=Vh(t),e=x4["scheme"+t];if(!e)return null;if(!e.some(Array.isArray))return e;e=e[n.length];if(e)return e;const i=x4["interpolate"+t];return n.map((t,e)=>i(r(e/n.length)))}(r,n,o)||i({type:r||t})}function oS(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function aS(t){return Array.from(new Set(t))}function sS(t){return t.some(t=>{t=typeof t;return"string"==t||"boolean"==t})}function lS(t){return t.some(t=>t instanceof Date)}function cS(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||"enterDelay"===t||"enterDuration"===t||"updateDelay"===t||"updateDuration"===t||"exitDelay"===t||"exitDuration"===t}function uS(t,e,n,r){return t===n&&e===r||t===r&&e===n}function hS(t,e){var[t,n]=t,[e,r]=e;return[Math.min(+t,+e),Math.max(+n,+r)]}function fS(t,e){return Array.from(new Set([...t,...e]))}function dS(t,e,n){var{scale:r={},transform:i=[]}=e,e=U(e,["scale","transform"]);return[t,Object.assign(Object.assign({},e),{scale:r,transform:i})]}function pS(t,i,o){return me(this,void 0,void 0,function*(){var t=o["library"],e=i["data"],[t]=DM("data",t),n=function(t){if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=U(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>me(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),$y)}([U(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?lg(n):[],Object.assign(Object.assign({},i),{data:n})]})}function yS(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,o,a={};for([i,o]of Object.entries(r))if(Array.isArray(o))for(let t=0;t<o.length;t++)a[""+i+(0===t?"":t)]=o[t];else a[i]=o;return[t,Object.assign(Object.assign({},e),{encode:a})]}function gS(t,e,n){const{encode:r,data:i}=e;var o;return r?(o=sg(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return Jy(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:o})]):[t,e]}function mS(t,e,n){var r=e["encode"];return r?(r=sg(r,(t,e)=>{var n=t["type"];return"constant"!==n||cS(e)?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function vS(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const o=function(t){const[n]=DM("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=sg(r,t=>o(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function bS(l,t,e){var n,r=t["encode"],i=U(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],o=U(t,["value"]);for(let e=0;e<i.length;e++){var a=i[e];if(Array.isArray(a))for(let t=0;t<a.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=a[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},o)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function xS(t,e,n){const{axis:r={},legend:i={}}=e,o=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var a="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return N(e,{scale:Object.assign(Object.assign({},Object.fromEntries(a.map(t=>[t,{guide:o(r,t)}]))),{color:{guide:o(i,"color")},size:{guide:o(i,"size")}})}),[t,e]}function wS(d,p,y,g,m,v){return me(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return me(this,void 0,void 0,function*(){var t=c["library"],[t]=DM("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[dS,pS,yS,gS,mS,vS,bS,xS,...e.map(t),...r.map(t),...n.map(t)];let i=[],o=s;for(const a of e)[i,o]=yield a(i,o,c);return[i,o]})}(d,p,{library:v}),{data:n,encode:r,scale:i={}}=e;if(!1===Array.isArray(n))return null;n=p.channels;const o=$f(Object.entries(r).filter(([,t])=>Jy(t)),([t])=>{return null==(t=/([^\d]+)\d*$/.exec(t))?void 0:t[1]}),a=n.filter(t=>{var{name:t,required:e}=t;if(o.has(t))return!0;if(e)throw new Error(`Missing encoding for channel: ${t}.`);return!1}).flatMap(a=>{var t=a["name"];return o.get(t).map(t=>{var{independent:e=!1,name:n,scaleName:r}=i=a,i=U(i,["independent","name","scaleName"]),[t,o]=t;return Object.assign(Object.assign(Object.assign({},i),o),{name:t,scaleName:null!=r?r:e?t:n})})});var s={},{coordinate:l=[]}=m,r=$f(a,t=>t.scaleName);for(const[f,a]of r.entries()){var c=p["shapes"],u=function(t){var e={};for(const i of t){var{value:n=[]}=e,{value:r=[]}=i;Object.assign(e,i),e.value=[...n,...r]}return e.field=cg(t.flatMap(t=>t.field).filter(Jy)),e}(a),{[f]:h={}}=i;s[f]=tS(u,h,l,c,g,y,v)}return[Object.assign(Object.assign({},e),{scale:s}),Object.assign(Object.assign({},p),{channels:a,index:t})]})}function kS(t,n,e){var r,{component:i=[],coordinate:o=[],title:a,theme:s}=n,[,l]=DM("component",e),e=t.filter(({guide:t,name:e})=>!(null===t||function(t){var{marks:t=[]}=t;return t.some(t=>"object"==typeof t.adjust)}(n)&&cS(e))),c=[...i];a&&(t=l("title")["props"],{defaultPosition:i,defaultOrder:t,defaultSize:r}=t,s=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(N({size:r},s,r="string"==typeof a?{text:a}:a)),c.push(Object.assign({type:"title",position:i,order:t,size:s},r)));for(const x of e){var u=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return K4(e)&&$4(e)||Z4(e)||J4(e)?null:t.startsWith("x")?K4(e)?"axisY":"axisX":t.startsWith("y")?K4(e)?"axisX":"axisY":t.startsWith("position")&&!$4(e)?"axisY":null}(x,o);if(null!==u){var h=l(u)["props"],{defaultPosition:f,defaultSize:d,defaultOrder:p}=h,{guide:h,name:y,field:g}=x;for(const w of Array.isArray(h)?h:[h]){var m=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],K4(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&$4(i)&&!K4(i)||"axisY"===e&&$4(i)&&K4(i)||"axisY"===e&&J4(i)||"axisY"===e&&Z4(i)||"axisY"===e&&Q4(i))return"bottom"===r.position?"arcInner":"arc";if($4(i)&&("axisX"===e||"axisY"===e))return"arcY";if(Q4(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&$4(i)&&"center"===r.position)return"arcCenter"}return n}(y,u,f,w,o),{size:v=d,order:b=p}=w;c.push(Object.assign(Object.assign({title:g},w),{position:m,order:b,size:v,type:u,scale:x}))}}}return c}function ES(t,e,n,r){var[i]=DM("scale",r),[r]=DM("component",r),{scale:o,bbox:a}=t,t=U(t,["scale","bbox"]),i=o?i(o):null,{field:o,domain:s}=o||{},o={field:o,domain:s,bbox:a};return r(t)(i,o,e,n)}function MS(t,e){var t=function(t,e){var n=$f(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,o={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var a="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(l);if(void 0===o[a])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);o[a]=s}else o[a]=30}return o}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o}=t,{width:e,height:a,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:h=c,insetBottom:f=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:y=d,marginTop:g=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:a,insetLeft:u,insetTop:h,insetBottom:f,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:a-i-o-g-y,marginLeft:p,marginBottom:y,marginTop:g,marginRight:d,x:s,y:l})}function SS(t,e,n){var R=$f(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:F,marginLeft:i,marginTop:o,marginBottom:D,marginRight:B,innerHeight:a,innerWidth:s,height:z,width:G}=n,t=t+i,i=r+o,r=n+B,o=F+D,H={top:[t,0,s,i,0,!0,zf],right:[G-r,i,r,a,1,!1,zf],bottom:[t,z-o,s,o,0,!1,zf],left:[0,i,t,a,1,!0,zf],centerHorizontal:[t,i,s,a,-1,null,null],centerVertical:[t,i,s,a,-1,null,null],arc:[t,i,s,a,-1,null,null],arcY:[t,i,s,a,-1,null,null],arcInner:[t,i,s,a,-1,null,null],center:[t,i,s,a,-1,null,null],arcCenter:[t,i,s,a,-1,null,null]};for(const[I,t]of R.entries()){var l=H[I];if("centerHorizontal"===I)!function(e,t,n){const[r,i,,o]=n,a=new Array(e.length+1).fill(0),s=t.map(a),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:o}}}(t,e,l);else if("centerVertical"===I)!function(e,t,n){const[r,i,o]=n,a=new Array(e.length+1).fill(0),s=t.map(a),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:o,height:u}}}(t,e,l);else if("arc"===I){p=d=f=h=u=c=void 0;var c=t,u=l,[h,f,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:h,y:f,width:d,height:p}}else if("arcY"===I){E=k=w=x=b=m=g=v=u=y=void 0;var y=t,u=e,[g,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=OS(u),k=x-w*(v=v/2),E=(w-u)*v;for(let t=0;t<y.length;t++)y[t].bbox={x:b+g,y:k+m,width:0,height:E}}else if("arcInner"===I){A=T=P=_=v=O=S=w=x=M=void 0;var M=t,x=e,[S,O,,w]=w=l,[v,_]=x.getCenter(),[x]=OS(x),P=x*(w=w/2),T=v-P,A=_-P;for(let t=0;t<M.length;t++)M[t].bbox={x:S+T,y:O+A,width:2*P,height:2*P}}else if("arcCenter"===I){q=V=j=C=Y=W=N=_=L=void 0;var L=t,_=e,[N,W,Y,C]=N=l,[_]=OS(_),j=C/2*_/Math.sqrt(2),V=N+Y/2,q=W+C/2;for(let t=0;t<L.length;t++)L[t].bbox={x:V-j,y:q-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,o,a,s,l]=t,[c,u,h,f,d,p,y,g]=0===a?["y",r,"x",e,"height",o,"width",i]:["x",e,"y",r,"width",i,"height",o],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[h]:f,[d]:b,[y]:g},e+=b*(s?-1:1)}}(t,l)}}function OS(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function _S(T,A,L){return me(this,void 0,void 0,function*(){const[n]=DM("composition",L);var[t]=DM("interaction",L);const e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Jy)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var o=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},a=[];const s=new Map;for(var l=new Map,c=[T],u=[];c.length;){var h=c.shift();if(i(h)){var f=l.get(h),[f,d]=f?LS(f,h,L):yield TS(h,L),p=(s.set(f,h),a.push(f),d.flatMap(o));if(c.push(...p),p.every(i)){var y=yield Promise.all(p.map(t=>AS(t,L)));eS(f=(f=y).flatMap(t=>Array.from(t.keys())).map(t=>t.scale),"x"),eS(f,"y");for(let t=0;t<p.length;t++){var g=p[t],m=y[t];l.set(g,m)}}}else{d="mark"===r(h)?h:yield function(r,i){return me(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=U(r,["data"]);return null==e?r:([,{data:e}]=yield pS(0,{data:e},t),Object.assign({data:e},n))})}(h,L),f=o(d);Array.isArray(f)?c.push(...f):"function"==typeof f&&u.push(f())}}var v=T["on"];IM(v,MM.BEFORE_PAINT);const b=new Map,x=[];A.selectAll(zS(j)).data(a,t=>t.key).join(t=>t.append("g").attr("className",j).attr("id",t=>t.key).call(PS).each(function(t){NS(t,$(this),x,L),b.set(t,this)}),t=>t.call(PS).each(function(t){NS(t,$(this),x,L)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,o){return r=>me(this,void 0,void 0,function*(){var[t,e]=yield TS(r,o);NS(t,i,[],o);for(const n of e)_S(n,i,o);return{options:r,view:t}})}($(e),L)}));for(const O of w){const T=O["options"];var k=T["interaction"];for(const _ of([k=[]]=[k],k))t(_)(O,w)}const{width:E,height:M}=T;for(const P of u){var S=new Promise(e=>me(this,void 0,void 0,function*(){for(const t of P)yield _S(Object.assign({width:E,height:M},t),A,L);e()}));x.push(S)}return IM(v,MM.AFTER_PAINT),Promise.all(x)})}function PS(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function TS(t,e){return me(this,void 0,void 0,function*(){return LS(yield AS(t,e),t,e)})}function AS(u,h){return me(this,void 0,void 0,function*(){var[t]=DM("theme",h),[,e]=DM("mark",h),{theme:n,marks:r}=u,i=t(RS(n)),o=new Map,a=new Map;for(const c of r){var s,{type:l=Zy("G2Mark type is required.")}=c,l=e(l)["props"],l=yield wS(c,l,a,i,u,h);l&&([l,s]=l,o.set(l,s))}return o})}function LS(t,e,n){var[r]=DM("mark",n);const[i]=DM("scale",n);var o,a,[s]=DM("theme",n),{key:l,frame:c=!1,theme:u,style:h={}}=e,s=s(RS(u)),u=Array.from(t.keys()),u=new Set(u.flatMap(t=>Object.values(t.scale))),u=kS(Array.from(u),e,n),f=MS(u,e),d=function(t,e,n){var[n]=DM("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:o,insetTop:a,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinate:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new X4(Object.assign(Object.assign({},t),{x:o+c,y:a+u,width:i-o-s,height:r-l-a,transformations:e.map(n).flat()}))}(f,e,n),e=c?N({mainlineWidth:1,mainStroke:"#000"},h):h,p=(SS(u,d,f),{}),y=[];for([o,a]of t.entries()){const{scale:b,children:x,dataDomain:w,modifier:k,key:E}=o;var{index:g,channels:m}=a,v=sg(b,t=>{var e=t["relations"],[e]=function(a){if(!a||!Array.isArray(a))return[$y,$y];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=a.filter(([t])=>"function"==typeof t);var e=a.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),o=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>o.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,v);const M=function(t,e){var n,r,i,o={};for({scaleName:n,value:r,name:i}of t){const a=e[n];o[i]=r.map(t=>a.map(t))}return o}(m,v),[S,O,_]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var o=e[t],a=n[t];a.every(([t,e])=>Jy(t)&&Jy(e))&&(r.push(o),i.push(a))}return[r,i]}(r(o)(g,v,M,d));m=w||S.length;const P=k?k(O,m,f):[];g=S.map((t,e)=>{var n={points:O[e],transform:P[e],index:t,markKey:E};for(const[r,i]of Object.entries(M))n[r]=i[t],_&&(n["series"+Vh(r)]=_[e].map(t=>i[t]));return _&&(n.seriesIndex=_[e]),n}),m=(a.data=g,a.index=S,null==x?void 0:x(g,v,f));y.push(...m||[])}return[{layout:f,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},y]}function NS(Y,V,q,X){me(this,void 0,void 0,function*(){const{components:R,theme:n,layout:t,markState:e,coordinate:r,key:i,style:F}=Y,{width:D,height:B}=t,z=U(t,["x","y","width","height"]),o=["view","plot","main","content"];var a,s,l=o.map((t,e)=>e);const c=o.map(t=>tg(F,t)),G=["a","margin","padding","inset"].map(t=>Qy(z,t)),u=t=>t.style("x",t=>y[t].x).style("y",t=>y[t].y).style("width",t=>y[t].width).style("height",t=>y[t].height).each(function(t){var e,n,r=$(this),t=c[t];for([e,n]of Object.entries(t))r.style(e,n)});let h=0,f=0,d=D,p=B;const y=l.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=G[t];return h+=t,f+=e,d-=t+r,p-=e+n,{x:h,y:f,width:d,height:p}});V.selectAll(zS(et)).data(l.filter(t=>Jy(c[t])),t=>o[t]).join(t=>t.append("rect").attr("className",et).style("zIndex",-2).call(u),t=>t.call(u),t=>t.remove()),V.selectAll(zS(Q)).data(R,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",Q).append(t=>ES(t,r,n,X)),t=>t.each(function(t){var t=ES(t,r,n,X)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),V.selectAll(zS(J)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",J).call(FS).call(BS,Array.from(e.keys())),t=>t.call(FS).call(BS,Array.from(e.keys())));for([a,s]of e.entries()){var H=s["data"];const{key:i,class:E}=a,M=function(s,t,e,n){const[l]=DM("shape",n),c=s["data"],{defaultShape:u,data:r}=t,h=r.map(t=>t.points),{theme:f,coordinate:d}=e,{type:p,style:y={}}=s;return(t,e)=>{var{shape:n=u,points:r,seriesIndex:i}=t,t=U(t,["shape","points","seriesIndex"]),t=Object.assign(Object.assign({},t),{shape:n,mark:p,defaultShape:u,index:e});const o=i?i.map(t=>c[t]):c[e],a=i||e;i=sg(y,t=>CS(t,o,a,c));return l(Object.assign(Object.assign({},i),{type:DS(s,n)}))(r,t,d,f,h)}}(a,s,Y,X),S=(g=a,m=s,jS("enter",g,m,Y,X)),O=(g=a,m=s,jS("update",g,m,Y,X)),_=(g=a,m=s,jS("exit",g,m,Y,X));var g=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(V,E,"element"),m=V.select("#"+i).selectAll(zS(K)).selectFacetAll(g).data(H,t=>t.key,t=>t.groupKey).join(t=>t.append(M).attr("className",K).transition(function(t){return S(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(o=n.parentNode.parentNode,s=r.parentNode,[o,a]=i(o),[i,s]=i(s),o=`translate(${o-i}, ${a-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+o).trimStart(),r.append(n));var n,r,i,o,a=M(t,e),s=O(t,[this],[a]);return null===s&&Ky(this,a),s})}),t=>t.transition(function(t){return _(t,[this])}).remove(),t=>t.append(M).attr("className",K).transition(function(t){var e=this["__fromElements__"],t=O(t,e,[this]);return new eg(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new eg([],this.__toData__,this.parentNode).append(M).attr("className",K).nodes();return O(t,[this],e)}).remove()).transitions();q.push(...m)}{var v=Y,b=V,x=X,w,k;const[P]=DM("labelTransform",x),{markState:T,labelTransform:A}=v,L=b.select(zS(Z)).node(),N=new Map,C=new Map,j=Array.from(T.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=DM("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:h,coordinate:f}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=sg(U(t,["formatter"]),t=>CS(t,r,e,l)),{shape:o=c,text:a}=t,t=U(t,["shape","text"]),i="string"==typeof i?dx(i):i,i=Object.assign(Object.assign({},t),{text:i(a)});return s(Object.assign({type:"label."+o},t))(n,i,f,h,u)}}(t,e,v,x),o=b.select("#"+r).selectAll(zS(K)).nodes();return n.flatMap((e,n)=>{const r=U(e,["transform"]);return o.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:o,key:a,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:o}=(e.destroy(),r);return[i,o]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:a+"-"+r,bounds:l,index:s,points:o})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[o[e]],index:t,points:o}));return t?t(c):c}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),I=$(L).selectAll(zS(tt)).data(j,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",tt),t=>t.each(function(t){Ky(this,N.get(t)(t))}),t=>t.remove()).nodes(),W=$f(I,t=>C.get(t.__data__));for([w,k]of W){var{transform:w=[]}=w;(function(t){return t.reduce((e,n)=>t=>n(e(t)),$y)})(w.map(P))(k)}A&&A(I)}})}function CS(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function jS(a,t,e,n,r){var[,i]=DM("shape",r);const[s]=DM("animation",r);r=e.defaultShape;const{theme:o,coordinate:l}=n;e=`default${Vh(a)}Animation`;const{[e]:c}=i(DS(t,r)).props,{[a]:u={}}=t.animate||{},{[a]:h={}}=o;return(t,e,n)=>{var{[a+"Type"]:t,[a+"Delay"]:r,[a+"Duration"]:i,[a+"Easing"]:o}=t,t=Object.assign({type:t||c},u);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:o},l,h),Array.isArray(t)?Promise.all(t.map(IS)):IS(t)):null}}function IS(t){return t.finished.then(()=>{t.cancel()})}function RS(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function FS(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function DS(t,e){t=t.type;return t+"."+e}function BS(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(zS(w)).data(e,t=>t.key).join(t=>t.append("g").attr("className",w).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(zS(Z)).node()||t.append("g").attr("className",Z)}function zS(...t){return t.map(t=>"."+t).join("")}function GS(t){for(var t=N({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,o,a=r.shift(),{children:s=[]}=(void 0===a.key&&(o=e.get(a),i=n.get(a),o=null===o?"0":o.key+"-"+i,a.key=o),a);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,a),n.set(l,t),r.push(l)}}return t}function HS(t,e={},n){const{width:r=640,height:i=480,autoFit:o=!1,on:a}=t,s=GS(t),{canvas:l=(f=r,u=i,h=new fh,h.registerPlugin(new bh),new ll({width:f,height:u,container:document.createElement("div"),renderer:h})),library:c=jM()}=e;var u,h,f;e.canvas=l,e.library=c,o&&!e.bindAutoFit&&(VS(t,e),e.bindAutoFit=!0),l.resize(r,i),IM(a,MM.BEFORE_RENDER);const d=$(l.document.documentElement);return l.ready.then(()=>_S(Object.assign(Object.assign({},s),{width:r,height:i}),d,c)).then(n).then(()=>IM(a,MM.AFTER_RENDER)),"string"==typeof(f=l.getConfig().container)?document.getElementById(f):f}function WS(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),VS(t,e),(i=r)&&(n?delete i[n]:i={})}const YS=(i,o={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=o["canvas"],{width:r,height:n}=FM(r.getConfig().container,n,t,e);HS(Object.assign(Object.assign({},i),{width:r,height:n}),o)},a=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},a),n&&r.apply(t,e)};var r,a,s,l};function VS(t,e={}){var n=t["autoFit"];n&&window.addEventListener("resize",YS(t,e))}function qS(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class XS{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return qS(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return qS(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function US(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function $S(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function ZS(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function KS(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?Sh(e)?n.concat(e):n.push(e):r[t]=Sh(e)?e:[e],this.attr(i,r))}}function JS(r){return t=>{for(const n of r){var e=n["type"];"value"===e?US(t,n):"array"===e?$S(t,n):"object"===e?ZS(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&KS(t,n)}return t}}function QS(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}po=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"key",type:"value"},{name:"class",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"frame",type:"value"},{name:"facet",type:"value"},{name:"adjust",type:"value"},{name:"coordinate",type:"array"},{name:"interaction",type:"array"},{name:"paddingLeft",type:"value"},{name:"paddingRight",type:"value"},{name:"paddingBottom",type:"value"},{name:"paddingTop",type:"value"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"}];let tO=class extends XS{constructor(){super({},"interval")}},eO=(tO=ge([JS(po)],tO),class extends XS{constructor(){super({},"rect")}}),nO=(eO=ge([JS(po)],eO),class extends XS{constructor(){super({},"point")}}),rO=(nO=ge([JS(po)],nO),class extends XS{constructor(){super({},"area")}}),iO=(rO=ge([JS(po)],rO),class extends XS{constructor(){super({},"line")}}),oO=(iO=ge([JS(po)],iO),class extends XS{constructor(){super({},"cell")}}),aO=(oO=ge([JS(po)],oO),class extends XS{constructor(){super({},"vector")}}),sO=(aO=ge([JS(po)],aO),class extends XS{constructor(){super({},"link")}}),lO=(sO=ge([JS(po)],sO),class extends XS{constructor(){super({},"polygon")}});lO=ge([JS(po)],lO);uo=ge([JS(po)],class extends XS{constructor(){super({},"image")}});let cO=class extends XS{constructor(){super({},"text")}},uO=(cO=ge([JS(po)],cO),class extends XS{constructor(){super({},"box")}}),hO=(uO=ge([JS(po)],uO),class extends XS{constructor(){super({},"lineX")}}),fO=(hO=ge([JS(po)],hO),class extends XS{constructor(){super({},"lineY")}}),dO=(fO=ge([JS(po)],fO),class extends XS{constructor(){super({},"range")}}),pO=(dO=ge([JS(po)],dO),class extends XS{constructor(){super({},"rangeX")}}),yO=(pO=ge([JS(po)],pO),class extends XS{constructor(){super({},"rangeY")}}),gO=(yO=ge([JS(po)],yO),class extends XS{constructor(){super({},"connector")}});gO=ge([JS(po)],gO);Ds={interval:tO,rect:eO,point:nO,area:rO,line:iO,cell:oO,vector:aO,link:sO,polygon:lO,image:uo,text:cO,box:uO,lineX:hO,lineY:fO,range:dO,rangeX:pO,rangeY:yO,connector:gO};let mO=class extends XS{constructor(){super({},"view")}},vO=(mO=ge([JS([{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"coordinate"},{type:"array",name:"interaction"},{type:"object",name:"theme"},...QS(Ds)])],mO),class extends XS{constructor(){super({},"spaceLayer")}}),bO=(vO=ge([JS([{type:"value",name:"data"},{type:"value",name:"key"},...QS(Ds)])],vO),class extends XS{constructor(){super({},"spaceFlex")}}),xO=(bO=ge([JS([{type:"value",name:"data"},{type:"value",name:"key"},{type:"value",name:"padding"},{type:"value",name:"ratio"},{type:"value",name:"direction"},...QS(Ds)])],bO),class extends XS{constructor(){super({},"facetRect")}}),wO=(xO=ge([JS([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},{type:"value",name:"shareData"},{type:"value",name:"shareSize"},...QS(Ds)])],xO),class extends XS{constructor(){super({},"facetCircle")}}),kO=(wO=ge([JS([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},...QS(Ds)])],wO),class extends XS{constructor(){super({},"repeatMatrix")}}),EO=(kO=ge([JS([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},...QS(Ds)])],kO),class extends XS{constructor(){super({},"timingKeyframe")}});EO=ge([JS([{type:"value",name:"key"},{type:"value",name:"direction"},{type:"value",name:"easing"},{type:"value",name:"iterationCount"},{type:"value",name:"duration"},...QS(Ds)])],EO);var MO={view:mO,spaceLayer:vO,spaceFlex:bO,facetRect:xO,facetCircle:wO,repeatMatrix:kO,timingKeyframe:EO};for(const _O of Object.values(MO))JS(QS(MO))(_O);const SO=jM();function OO(t){return Object.assign(Object.assign({},t.value),{type:t.type})}co=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array"},{name:"interaction",type:"array"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},...QS(Ds),...Object.entries(MO).map(([t,e])=>({type:"container",name:t,ctor:e}))];x.Chart=class extends XS{constructor(t={}){var e=t["container"];super(U(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:SO}}render(){this._context.canvas||({width:r=640,height:o=480,renderer:a,plugins:t,autoFit:e}=this.options(),{width:e,height:n}=FM(this._container,e,r,o),this.width(e),this.height(n),this._context.canvas=([e,n,r,i=new fh,o=[]]=[document.createElement("div"),r,o,a,t],o.push(new bh),o.forEach(t=>i.registerPlugin(t)),new ll({container:e,width:n,height:r,renderer:i})));var t,e,n,r,i,o,a=HS(this.options(),this._context);return a.parentNode!==this._container&&this._container.append(a),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t),n=[e],r=new Map;for(r.set(e,OO(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var o=OO(s),{children:a=[]}=i;a.push(o),n.push(s),r.set(s,o),i.children=a}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];IM(n,MM.BEFORE_DESTROY),WS(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),IM(n,MM.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];IM(e,MM.BEFORE_CLEAR),WS(t,this._context),IM(e,MM.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=FM(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;IM(i,MM.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),IM(i,MM.AFTER_CHANGE_SIZE)}},x.Chart=ge([JS(co)],x.Chart),x.AREA_CLASS_NAME=et,x.COMPONENT_CLASS_NAME=Q,x.ELEMENT_CLASS_NAME=K,x.LABEL_CLASS_NAME=tt,x.LABEL_LAYER_CLASS_NAME=Z,x.MAIN_LAYER_CLASS_NAME=w,x.PLOT_CLASS_NAME=J,x.VIEW_CLASS_NAME=j,x.createLibrary=jM,x.destroy=WS,x.register=function(t,e){Object.assign(SO,{[t]:e})},x.render=HS,x.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:o}=t;var t=GS(t),{library:a=jM(),group:s=new ys}=e;if(function(t){if(!Mh(t)){if(xh(t))return!t.length;var e,n=Xh(t);if("Map"===n||"Set"===n)return!t.size;if($h(t))return!Object.keys(t).length;for(e in t)if(nf.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=$(s);return e.group=s,e.library=a,IM(o,MM.BEFORE_RENDER),_S(Object.assign(Object.assign({},t),{width:r,height:i}),l,a).then(n).then(()=>IM(o,MM.AFTER_RENDER)),s},Object.defineProperty(x,"__esModule",{value:!0})});
7
+ `}([f,d,h,s]))}c-=u,l+=1}return a}function EE(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function OE(t,e,n,r){var i,o,a,s,l,c,u,h,f,d=e["nodeName"],p=n["nodeName"],y=zs(e),g=zs(n);return d===p&&"path"!==d||(void 0===y||void 0===g)?(o=n,p=r,[d,f,a,l]=kE(i=e),[u,h,s,c]=kE(o),u-=d,d=h-f,h=s/a,f=c/l,s=[Object.assign({transform:"translate(0, 0) scale(1, 1)"},pE(i,yE)),Object.assign({transform:`translate(${u}, ${d}) scale(${h}, ${f})`},pE(o,yE))],(a=i.animate(s,p)).finished.then(()=>EE(o,i)),a):(c=y,d="path"===(u=(l=t)["nodeName"])?l:(EE(u=new Ba({style:Object.assign(Object.assign({},pE(l,yE)),{d:c})}),l),u),h=[Object.assign({path:y},pE(e,yE)),Object.assign({path:g},pE(n,yE))],f=d.animate(h,r),d.style.transform="scale(1, 1)",d.style.transform="none",f)}wE.props={};const SE=y=>(t,e,n,r,i)=>{[o="pack"]=[y.split];var o="function"==typeof o?o:ME,i=fE(i,n,y),n=t["length"],a=e["length"];if(1===n&&1===a||1<n&&1<a)return[s]=t,[c]=e,OE(s,s,c,i);if(1===n&&1<a){var[s]=t;{var l=s,c=e,u=i,s=o;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return OE(t,new Ba({style:Object.assign({path:d[e]},pE(l,yE))}),t,u)})}}if(1<n&&1===a){var[n]=e;{var a=t,h=n,f=i;const p=(e=o)(h,a.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=h.style,e=h.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],f);return[...a.map((t,e)=>{return OE(t,t,new Ba({style:{path:p[e],fill:h.style.fill}}),f)}),e]}}return null},_E=(SE.props={},b=>{return Ri({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:r.NUMBER}),(t,e,n,r,i)=>{const[o]=t;if(!s0(r))return gE(b)(t,e,n,r,i);const a=r.getCenter();var{__data__:t,style:e}=o,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:h}=e,{points:e,y:t,y1:f}=(K(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=Uv().cornerRadius(s).padAngle(l*Math.PI/180),p=Cb(r,e,[t,f]),{startAngle:y,endAngle:g}=p,m=new Ba({}),v=t=>{m.attr({d:d(t),transform:`translate(${a[0]}, ${a[1]})`});t=zs(m);return m.style.transform="none",t};s=[{waveInArcAngle:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:y+1e-4,fillOpacity:c,strokeOpacity:u,opacity:h,offset:.01},{waveInArcAngle:g,fillOpacity:c,strokeOpacity:u,opacity:h}],l=o.animate(s,fE(i,n,b));return l.onframe=function(){o.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(o.style.waveInArcAngle)}))},l.onfinish=function(){o.style.path=v(Object.assign(Object.assign({},p),{endAngle:g}))},l}}),AE=(_E.props={},c=>{return(t,e,n,r,i)=>{const[o]=t;var{transform:t,fillOpacity:a,strokeOpacity:s,opacity:l}=o.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:a,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:a,strokeOpacity:s,opacity:l}],{width:a,height:s}=o.getBoundingClientRect(),l=(o.setOrigin([a/2,s/2]),o.animate(t,fE(i,n,c)));return l.finished.then(()=>o.setOrigin(0,0)),l}}),PE=c=>{return(t,e,n,r,i)=>{const[o]=t;var{transform:t,fillOpacity:a,strokeOpacity:s,opacity:l}=o.style,a=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:a,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=o.getBoundingClientRect(),t=(o.setOrigin([s/2,l/2]),o.animate(a,fE(i,n,c)));return t.finished.then(()=>o.setOrigin(0,0)),t}},TE=a=>(t,e,n,r,i)=>{var[t]=t,o=(null==(o=t.getTotalLength)?void 0:o.call(t))||0;return t.animate([{lineDash:[0,o]},{lineDash:[o,0]}],fE(i,n,a))},LE=(TE.props={},l=>(t,e,n,r,i)=>{const[o]=t;var{height:t,width:a}=o.getBoundingClientRect();const s=new Ba({style:{path:`M0,0L${a},0L${a},${t}L0,${t}Z`}});o.appendChild(s),o.style.clipPath=s;a=gE(l)([s],e,n,r,i);return a.finished.then(()=>{s.remove(),o.style.clipPath=null}),a}),NE=(LE.props={},l=>(t,e,n,r,i)=>{const[o]=t;var{height:t,width:a}=o.getBoundingClientRect();const s=new Ba({style:{path:`M0,0L${a},0L${a},${t}L0,${t}Z`}});o.appendChild(s),o.style.clipPath=s;a=vE(l)([s],e,n,r,i);return a.finished.then(()=>{s.remove(),o.style.clipPath=null}),a});function CE(t){return Q(t).selectAll("."+et).nodes()}function jE(t){return Q(t).select("."+nt).node()}function FE(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,o]}=t.getBounds();return e<t||i<e||(n<r||o<n)?null:[e-t,n-r]}function RE(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function IE(){return t=>t.__data__.color}function DE(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function BE(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function zE(a,s=(t,e)=>t){const l="__states__",c="__ordinal__",i=t=>{var{[l]:e=[],[c]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),J(a,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var o=t.getAttribute(r),i=s(i,t);t.setAttribute(r,i),r in n||(n[r]=o)}t[c]=n}},o=t=>{t[l]||(t[l]=[])};return{setState:(t,...e)=>{o(t),t[l]=[...e],i(t)},removeState:(t,...e)=>{o(t);for(const r of e){var n=t[l].indexOf(r);-1!==r&&t[l].splice(n,1)}i(t)},hasState:(t,e)=>(o(t),-1!==t[l].indexOf(e))}}function WE(r,i){const o=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=o.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function HE(l,t){var{valueof:c=(t,e)=>t}=t,u=K(t,["valueof"]);const h="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=_v();const[a,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),_b(u,t=>c(t,a))),{fill:o=a.getAttribute("fill")}=i,i=K(i,["fill"]),r=new Ba({className:h+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:o},i)});l.appendChild(r)}}},t=>{t=t||h;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function GE(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:o=!1}=e,e=K(e,["elements","datum","groupKey","link"]);const a=n(t),s=new Set(a),l=jp(a,i);n=WE(a,r);const[c,u]=HE(t,Object.assign({elements:a,valueof:n},J(e,"link"))),{setState:h,removeState:f}=zE(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of a)e.has(n)?h(n,"highlighted"):h(n,"unhighlighted");o&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of a)f(e,"unhighlighted","highlighted");o&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function YE(n){return t=>{var{container:t,view:e}=t;return GE(t,Object.assign(Object.assign({},RE(n)),{elements:CE,datum:BE(e)}))}}function VE(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return GE(t,Object.assign(Object.assign({},RE(n)),{elements:CE,datum:BE(e),groupKey:DE(e)}))}}function qE(n){return t=>{var{container:t,view:e}=t;return GE(t,Object.assign(Object.assign(Object.assign({},n),RE(n)),{elements:CE,datum:BE(e),groupKey:IE()}))}}function UE(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=K(e,["elements","datum","groupKey","link","single"]);const h=n(t),f=new Set(h),d=jp(h,l);n=WE(h,r);const[p,y]=HE(t,Object.assign({elements:h,valueof:n},J(e,"link"))),{setState:g,removeState:i,hasState:m}=zE(e,n),v=()=>{for(const t of h)i(t,"selected","unselected");c&&y()},o=t=>{t=t.target;if(!f.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of h)n.has(i)?g(i,"selected"):g(i,"unselected");c&&(y(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const o=new Set(r);if(m(e,"selected")){if(!h.some(t=>!o.has(t)&&m(t,"selected")))return v();for(const a of r)g(a,"unselected");c&&y(t)}else{e=r.some(t=>m(t,"selected"));for(const s of h)o.has(s)?g(s,"selected"):m(s,"selected")||g(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",o),()=>{t.removeEventListener("click",o)}}function XE(n){return t=>{var{container:t,view:e}=t;return UE(t,Object.assign(Object.assign({},RE(n)),{elements:CE,datum:BE(e)}))}}function $E(n){return t=>{var{container:t,view:e}=t;return UE(t,Object.assign(Object.assign({},RE(n)),{elements:CE,datum:BE(e),groupKey:DE(e)}))}}function ZE(n){return t=>{var{container:t,view:e}=t;return UE(t,Object.assign(Object.assign({},RE(n)),{elements:CE,datum:BE(e),groupKey:IE()}))}}function KE(t){var{wait:E=20,leading:O,trailing:S=!1,labelFormatter:_=t=>""+t}=t,A=K(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:o,scale:a,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(o,"line",["x","y","series"]);if(!t)return;const{y:f,x:d,series:l=[]}=t;t=f.map((t,e)=>e);const c=Dp(t.map(t=>d[t])),u=F({},e),h=u.marks.find(t=>"line"===t.type);t=$p(Fp(t,t=>$p(t,t=>+f[t])/Kp(t,t=>+f[t]),t=>l[t]).values());F(h,{scale:{y:{domain:[1/t,t]}}});const p=jE(r),y=r.getElementsByClassName(et);const g=jp(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),m=new Ia({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),v=new Ua({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},J(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Op(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",_(e))};let w;var k;const M=Wf(t=>{t=FE(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of y){var{seriesIndex:o,key:a}=u.__data__,s=o[Mp(t=>d[+t]).center(o,i)],l=[0,r.map(1)],s=[0,r.map(f[s]/f[o[0]])],[,o]=n.map(l),[,l]=n.map(s),c=o-l,s=(u.setAttribute("transform",`translate(0, ${c})`),g.get(a)||[]);for(const h of s)h.setAttribute("dy",c)}}},E,{leading:O,trailing:S});return k=[0,0],Me(this,void 0,void 0,function*(){var t=a["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(h);t.groupBy="color",t.basis=(t,e)=>{return e[t[Mp(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function JE({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=jE(n),o=F({},e);for(const s of o.marks)s.animate=!1;const a=Wf(t=>{var e,n,t=FE(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(o)).focusX=t,n.focusY=e,n.isVisual=!0,r(o))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",a),i.addEventListener("pointermove",a),i.addEventListener("pointerleave",a),()=>{i.removeEventListener("pointerenter",a),i.removeEventListener("pointermove",a),i.removeEventListener("pointerleave",a)}}}function QE(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[o,a]}=t.getBounds(),e=new g5({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:o-r,height:a-i},position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r),{items:e,title:o}=e;i.show(),i.update({x:n,y:r,items:e,title:o}),t.tooltipElement=i}function t3(t){t=t.tooltipElement;t&&t.hide()}function e3(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>J0(t)))}function n3(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function r3(n,o,a,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(J0),t=t.flatMap((r,t)=>{var t=n[t],e=K(r,["title"]);const i=n3(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=a[t].getOptions();return Object.assign({color:i,name:function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e;return t&&t.invert?t.invert(e):n&&n.invert?n.invert(r):null}(a,r)||n,value:void 0===e?e:""+e},e3(o({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function i3(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function o3(t,e){return void 0===t?e:t}function a3(l,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:c,coordinate:u,showCrosshairs:h,item:f}=t,t=K(t,["elements","wait","leading","trailing","scale","coordinate","showCrosshairs","item"]);const d=e(l),[,p]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(l),y=new Map(d.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Dp(e)]})),g=J(t,"crosshairs"),o=Wf(t=>{const r=FE(l,t);var t=l.getBounds(),e=t.min[0],t=t.min[1];if(r){var n=d.map(t=>{var e=y.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[df(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=u.invert(t);return Op(e,t)})(r,e)),{x:e,y:n}=t;return[t,u.map([e,n])]}),i=n.map(t=>t[0]),n=n.map(t=>t[1]),i=r3(d,f,c,i);if(QE(l,i,r[0]+e,r[1]+t),h){i=l,e=n,n=(t=Object.assign(Object.assign({},g),{height:p}))["height"],t=K(t,["height"]);const o=e=e0(e.map(t=>t[0])),a=e,s=n;(n=i.ruleY||(e=new Ia({style:Object.assign({x1:o,x2:a,y1:0,y2:s,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),i.appendChild(e),e)).style.x1=o,n.style.x2=a,n.style.y1=0,n.style.y2=s,i.ruleY=n}}},n,{leading:r,trailing:i}),a=()=>{var t;t3(l),h&&(t=l).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return l.addEventListener("pointerenter",o),l.addEventListener("pointermove",o),l.addEventListener("pointerleave",a),()=>{l.removeEventListener("pointerover",o),l.removeEventListener("pointerout",o),l.removeEventListener("pointerleave",a)}}function s3(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:o=!1,groupKey:a=t=>t,item:s}){t=t(r);const l=new Set(t),c=jp(t,a),u=Wf(t=>{var e,n=t["target"];l.has(n)&&(n=a(n),n=1===(n=c.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=K(n,["title"]);const o=n3(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=i[t].getOptions();return Object.assign({color:o,name:n,value:void 0===e?e:""+e},e3(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):r3(n,s,i),{offsetX:t,offsetY:e}=t,QE(r,n,t,e))},e,{leading:n,trailing:o}),h=t=>{t=t.target;l.has(t)&&t3(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",h),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",h)}}function l3(t){const{shared:a,showCrosshairs:s,series:l,item:c=()=>({})}=t,u=K(t,["shared","showCrosshairs","series","name","item"]);return t=>{var{container:t,view:e}=t,{scale:n,markState:r,coordinate:i}=e,o=i3(r,"seriesTooltip"),r=i3(r,"showCrosshairs"),t=jE(t);return o3(l,o)?a3(t,Object.assign(Object.assign({},u),{elements:CE,scale:n,coordinate:i,showCrosshairs:o3(s,r),item:c})):s3(t,Object.assign(Object.assign({},u),{elements:CE,scale:n,coordinate:i,groupKey:a?DE(e):void 0,item:c}))}}function c3(n){return(t,...e)=>F({},n(t,...e),t)}function u3(n){return(t,...e)=>F({},t,n(t,...e))}function h3(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=K(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}NE.props={};const f3=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map(t=>{var e=t["data"],t=K(t,["data"]);return Object.assign(Object.assign({},t),{data:h3(e,a),x:n,y:r,width:i,height:o})})},d3=(f3.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:o}=e,[a,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var f=r.map(t=>h*(t/u)),d=[];let p=e[a]||0;for(let t=0;t<f.length;t+=1){var y=n[t],g=y["data"],y=K(y,["data"]),g=h3(g,o);d.push(Object.assign({[a]:p,[s]:f[t],[c]:e[c]||0,[l]:e[l],data:g},y)),p+=f[t]+i}return d}),p3=(d3.props={},()=>t=>{var e=t["children"],t=K(t,["children"]);if(!Array.isArray(e))return[];const{data:o,scale:a={},axis:s={},legend:l={}}=t,n=K(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=K(t,["data","scale","axis","legend"]);return Object.assign({data:h3(e,o),scale:F({},a,n),axis:!(!r||!s)&&F({},s,r),legend:!(!i||!l)&&F({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),y3=(p3.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:o,paddingBottom:a,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:k,x:M,y:E,key:O,frame:S,title:_,labelTransform:A}=t,t=K(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform"]);return[{type:"standardView",x:M,y:E,key:O,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:o,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,paddingBottom:a,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:_,labelTransform:A,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:O+"-0",data:v})]}]}),g3=(y3.props={},c3(t=>{const{encode:e,data:i,scale:o,shareSize:a=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!a)return{};const n=jp(i,t=>t[e]);var t=(null==(t=null===o||void 0===o?void 0:o[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),m3=c3(t=>{const{data:e,scale:n}=t;var r=[t];let i,o,a;for(;r.length;){const{children:u,encode:h={},scale:n={},legend:f={}}=r.shift();var s=h["color"],l=n["color"],c=f["color"];void 0!==s&&(i=s),void 0!==l&&(o=l),void 0!==c&&(a=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:F({},o,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:F({title:i},a)}}}),v3=c3(()=>({animate:{enterType:"fadeIn"}})),b3=u3(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),x3=u3(()=>({type:"cell"})),w3=u3(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],o=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&o.length){var a=[];for(const s of i)for(const l of o)a.push({[n]:s,[r]:l});return a}return i.length?i.map(t=>({[n]:t})):o.length?o.map(t=>({[r]:t})):void 0}}]}}}),k3=u3((t,c=function(t){t=t.points;return Ob(t)},w=function(o){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?M3(o,e):(t=e.length?void 0:null,F({title:r===i-1&&void 0,grid:t},o))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?M3(r,e):(n=e.length?void 0:null,F({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:E=0,y:O=0,shareData:h=!1}=t,S=e["value"],{x:_,y:A}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:m}=n,o=r.getOptions()["domain"],a=i.getOptions()["domain"];e=Ab(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[_]:t,[A]:e}=t,t=void 0===_||t===n,e=void 0===A||e===r;return t&&e}).map(t=>S.filter(t)),v=h?$p(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:_,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:A,rowIndex:a.indexOf(e),rowValue:e,rowValuesLength:a.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],p=b[c],y=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=K(t,["scale","key","facet","axis","legend"]),o=null==(o=null==e?void 0:e.y)?void 0:o.guide,a=null==(a=null==e?void 0:e.x)?void 0:a.guide,s={x:{tickCount:_?5:void 0},y:{tickCount:A?5:void 0}},r=r?y:0===y.length?[]:S,l={color:{domain:P}},a={x:E3(a,w)(p,r),y:E3(o,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+g+E,y:h+m+O,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:F(s,e,l),axis:F({},i,a),legend:!1},t),M)})})}}});function M3(t,e){return e.length?F({title:!1,tickLine:null,label:null,subTickLine:null},t):F({title:!1,tickLine:null,label:null,subTickLine:null,grid:null},t)}function E3(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const O3=()=>t=>{return[hE.of(t).call(x3).call(m3).call(v3).call(g3).call(b3).call(w3).call(k3).value()]},S3=(O3.props={},c3(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),_3=u3(t=>{const{data:w,children:c,x:k=0,y:M=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,o=r.getOptions()["domain"],a=i.getOptions()["domain"];e=Ab(t);const s=t.map(({points:t})=>Ob(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:e,rowIndex:a.indexOf(e),rowValue:e,rowValuesLength:a.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],[p,y]=l[c],g=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:o,axis:a}=t,t=K(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return M3(r,e)})(g,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return M3(n,e)})(g,w)};return Object.assign({data:w,key:i+"-"+c,x:u+m+k,y:h+v+M,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:F({x:{facet:!1},y:{facet:!1}},e),axis:F({x:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5},y:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5}},a,l),legend:!1,encode:F({},o,{x:p,y:y})},t)})})}}}),A3=u3(t=>{var e=t["encode"],t=K(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=K(e,["position","x","y"]),o=[];for(const a of[r].flat(1))for(const s of[i].flat(1))o.push({$x:a,$y:s});return Object.assign(Object.assign({},t),{data:o,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const P3=()=>t=>{return[hE.of(t).call(x3).call(m3).call(_3).call(A3).call(v3).call(b3).call(S3).value()]},T3=c3(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),L3=c3(t=>({coordinates:[{type:"polar"}]})),N3=t=>{var e=t["encode"],t=K(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function C3(t){return t=>null}function j3(t){var t=t["points"],[t,e,n,r]=t,i=kb(t,r),t=wb(t,r),r=wb(e,n),r=(e=r,r=Mb(r=t),e=Mb(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),o=i*Math.sqrt(2),[n,a]=n,t=Eb(t)+r/2,r=i*e;return[n+r*Math.sin(t)-o/2,a+r*Math.cos(t)-o/2,o,o]}const F3=()=>t=>{return[hE.of(t).call(x3).call(N3).call(m3).call(L3).call(w3).call(k3,j3,C3,C3,{frame:!1}).call(v3).call(b3).call(T3).value()]};const R3=()=>t=>{const{children:e=[],duration:o=1e3,iterationCount:l=1,direction:c="normal",easing:a="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],h=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=o,n=a,r=[t];r.length;){var i=r.pop(),i=(i.animate=F({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,o=t,a=u,s=void 0,s=[0,a],a=[1-a,1];var[n,r]="normal"===n?s:"reverse"===n?a:"alternate"===n?o%2==0?s:a:"reverse-alternate"===n?o%2==0?a:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield h[i]),e=i}t++}var o,a,s}};function I3(t,e){if(null!==t)return{type:"column",value:t,field:e}}function D3(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function B3(t,e){var n=[];for(const r of t)n[r]=e;return n}function z3(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function W3(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=z3(t,i);if(null!==n)return[n,r]}return[null,null]}function H3(t){return!(t instanceof Date)&&"object"==typeof t}R3.props={};const G3=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,F({},e,{encode:{y1:I3(B3(t,0))}})]};function Y3(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=z3(r,t))?void 0:t[0]]}).filter(([,t])=>J0(t));return Array.from(jp(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function V3(t){var o,r;return Array.isArray(t)?(o=t,(i,t,e)=>(n,r)=>o.reduce((t,e)=>0!==t?t:kp(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>J3(t=>r(e[t]))):"series"===t?X3:"value"===t?$3:"sum"===t?Z3:"maxIndex"===t?K3:()=>null}function q3(t,e){for(const n of t)n.sort(e)}function U3(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function X3(t,e,n){return J3(t=>n[t])}function $3(t,e,n){return J3(t=>e[t])}function Z3(t,n,e){t=Ab(t),t=Array.from(jp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return J3(t=>r.get(e[t]))}function K3(t,n,e){t=Ab(t),t=Array.from(jp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Zp(e,t=>n[t])]));return J3(t=>r.get(e[t]))}function J3(n){return(t,e)=>kp(n(t),n(e))}G3.props={};const Q3=(t={})=>{const{groupBy:P="x",orderBy:T=null,reverse:L=!1,y:N="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[o,a]=z3(r,"y"),[s,l]=z3(r,"y1"),[r]=j?W3(r,"series","color"):z3(r,"color"),c=Y3(P,t,e),n=V3(T)(n,o,r),u=(n&&q3(c,n),new Array(t.length)),h=new Array(t.length),f=new Array(t.length),d=[],p=[];for(const O of c){L&&O.reverse();var y=s?+s[O[0]]:0,g=[],m=[];for(const S of O){var v=f[S]=+o[S]-y;v<0?m.push(S):0<=v&&g.push(S)}var b=0<g.length?g:m,x=0<m.length?m:g;let t=g.length-1,e=0;for(;0<t&&0===o[b[t]];)t--;for(;e<x.length-1&&0===o[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=y;for(const _ of m.reverse()){var w=f[_];n=u[_]=(h[_]=n)+w}let r=y;for(const A of g){var k=f[A];0<k?r=u[A]=(h[A]=r)+k:u[A]=h[A]=r}}const M=new Set(d),E=new Set(p);r="y"===N?u:h,n="y"===C?u:h;return[t,F({},e,{encode:{y:I3(r,a),y1:I3(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>E.has(e)},i)})]}};function tO(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}Q3.props={};const eO=o=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(tO)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=o["series"],r=i?["x","series"]:"x",Q3({groupBy:r})(t,e,n))},nO=(eO.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=z3(n,i),[t,F({},e,{encode:{title:I3(r,n)}})])}}),rO=(nO.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,F({},e,{encode:{x:I3(B3(t,0))},scale:{x:{guide:null}}})]}),iO=(rO.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,F({},e,{encode:{y:I3(B3(t,0))},scale:{y:{guide:null}}})]}),oO=(iO.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,F({},e,{encode:{size:D3(B3(t,3))}})]}),aO=(oO.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=K(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,F({},e,{encode:{key:I3(r)}})]}),sO=(aO.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=z3(n,"color"),[t,F({},e,{encode:{series:I3(r,i)}})])}),lO=(sO.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(H3)?[t,e]:[t,F({},e,{encode:{y:I3(n)}})]}),cO=(lO.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(H3)?[t,e]:[t,F({},e,{encode:{x:I3(n)}})]}),uO=(cO.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=z3(n,"y"),[t,F({},e,{encode:{y1:I3([...r])}})])}),hO=(uO.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=z3(n,"x"),[t,F({},e,{encode:{x1:I3([...r])}})])}),fO=(hO.props={},t=>{const o=t["channel"];return(t,e)=>{const r=e["encode"];var n=r["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(o)?o:[o];let i=0;n=n.flatMap(e=>Object.entries(r).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{var[e,n]=z3(r,t),t=[[t,I3(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),I3(e,n)]),i++),t}));return[t,F({},e,{encode:Object.fromEntries(n)})]}}),dO=(fO.props={},()=>(t,e)=>[t,F({scale:{x:{padding:0},y:{padding:0}}},e)]),pO=(dO.props={},()=>(t,e)=>{var{style:n={}}=e,r=K(e,["data","style"]),{x:i,y:o}=n,n=K(n,["x","y"]);return null==i||null==o?[t,e]:[[0],F({},r,{data:[0],cartesian:!0,encode:{x:I3([i||0]),y:I3([o||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),yO=(pO.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,F({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),gO=(yO.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(H3)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,F({},e,{encode:{x:I3(n),y:I3(r)}})])}),mO=(gO.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,F({},e,{encode:{series:D3(B3(t,void 0))}})]:[t,e]}),vO=(mO.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:h,padding:f}=t;return K(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[o]=z3(r,"y"),[r]=W3(r,"series","color"),a=U3(r,i),i=Y3(c,t,e),n=V3(h)(n,o,r),s=(n&&q3(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=a[t]}return[t,F({},e,{scale:{series:{domain:a,paddingInner:f}},encode:{series:I3(s)}})]}}),bO=(vO.props={},t=>{const{groupBy:p=["x"],reducer:y=(t,e)=>e[t[0]],orderBy:g=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,z3(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,h]of r){var o=[];for(const n of i){var a=Array.from(jp(n,t=>h[t]).values());o.push(...a)}i=o}if(g){const[f]=z3(e,g);f&&i.sort((t,e)=>y(t,f)-y(e,f)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[B3(n,r)]:W3(e,"enterDuration",B3(n,r));var[l]=W3(e,"enterDelay",B3(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=$p(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,F({},t,{encode:{enterDuration:D3(s),enterDelay:D3(c)}})]}});bO.props={};const xO=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=K(n,["x"]),o=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,z3(n,t)[0]]),[,a]=o.find(([t])=>"y"===t),s=o.map(([t])=>[t,new Array(e.length)]),i=Y3(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>Kp(t,t=>e[+t]),max:(t,e)=>$p(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>e0(t,t=>e[+t]),median:(t,e)=>n0(t,t=>e[+t]),sum:(t,e)=>o0(t,t=>e[+t]),deviation:(t,e)=>Ap(t,t=>e[+t])}[r]||$p;for(const e of i){var c=l(e,a);for(const f of e)for(let t=0;t<o.length;t++){var[,u]=o[t],[,h]=s[t];h[f]=+u[f]/c}}return[e,F({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,I3(e,z3(n,t)[1])]))})]}};function wO(t,e,n){return null===t?[-.5,.5]:(t=U3(t,e),[-(e=new Sm({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function kO(t,e,n){return e*(1-t)+n*t}xO.props={};const MO=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[o]=z3(n,"x"),[n]=z3(n,"y");const a=wO(o,r,l),s=wO(n,i,c);o=t.map(()=>kO(u(),...s)),r=t.map(()=>kO(u(),...a));return[t,F({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:I3(o),dx:I3(r)}})]}},EO=(MO.props={},(t={})=>{const{padding:o=0,random:a=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=z3(n,"x");const i=wO(n,r,o);n=t.map(()=>kO(a(),...i));return[t,F({scale:{x:{padding:.5}}},e,{encode:{dx:I3(n)}})]}}),OO=(EO.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=K(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,z3(n,t)[0]]);var o=i.map(([t])=>[t,new Array(e.length)]),a=Y3(y,e,t),s=new Array(a.length);for(let t=0;t<a.length;t++){const e=a[t];var[l,c]=Pp(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<a.length;t++){var h=u-s[t];const e=a[t];for(const p of e)for(let t=0;t<i.length;t++){var[,f]=i[t],[,d]=o[t];d[p]=+f[p]+h}}return[e,F({},t,{encode:Object.fromEntries(o.map(([t,e])=>[t,I3(e,z3(n,t)[1])]))})]}}),SO=(OO.props={},(t={})=>{const{groupBy:u="x",series:h=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=z3(n,"y");var[,i]=z3(n,"y1"),n=(h?W3(n,"series","color"):z3(n,"color"),Y3(u,t,e)),o=new Array(t.length);for(const c of n){var a=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...a.filter((t,e)=>e!==n));o[s]=r[s]>l?l:r[s]}}return[t,F({},e,{encode:{y1:I3(o,i)}})]}});function _O(t,e){return[t[0]]}function AO(t,e){return[t[t.length-1]]}function PO(t,e){return[t[Zp(t,t=>e[t])]]}function TO(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}(t,t=>e[t])]]}SO.props={};const LO=(t={})=>{const{groupBy:s="series"}=t,l=K(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=Y3(s,t,e),[r,i]=Object.entries(l)[0];const[o]=z3(n,r),a="function"==typeof(n=i)?n:{first:_O,last:AO,max:PO,min:TO}[n]||_O;return[t.flatMap(t=>a(t,o)),e]}},NO=(LO.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return LO(Object.assign({x:e},t))}),CO=(NO.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return LO(Object.assign({y:e},t))});function jO(e){return t=>null===t?e:e+" of "+t}function FO(){return[(t,e)=>e0(t,t=>+e[t]),jO("mean")]}function RO(){return[(t,e)=>n0(t,t=>+e[t]),jO("median")]}function IO(){return[(t,e)=>$p(t,t=>+e[t]),jO("max")]}function DO(){return[(t,e)=>Kp(t,t=>+e[t]),jO("min")]}function BO(){return[(t,e)=>t.length,jO("count")]}function zO(){return[(t,e)=>o0(t,t=>+e[t]),jO("sum")]}function WO(){return[(t,e)=>e[t[0]],jO("first")]}function HO(){return[(t,e)=>e[t[t.length-1]],jO("last")]}CO.props={};const GO=(t={})=>{const i=t["groupBy"],o=K(t,["groupBy"]);return(t,e)=>{const{data:a,encode:s}=e,l=i(t,e);var t=Object.entries(o).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:FO,max:IO,count:BO,first:WO,last:HO,sum:zO,min:DO,median:RO}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,o]=z3(s,t);return[t,I3(l.map(t=>n(t,null!==i&&void 0!==i?i:a)),(null==r?void 0:r(o))||o)]}),n=Object.keys(s).map(t=>{const[e,n]=z3(s,t);return[t,I3(l.map(t=>e[t[0]]),n)]}),r=l.map(t=>a[t[0]]);return[Ab(l),F({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},YO=(GO.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=K(t,["channels"]);return GO(Object.assign(Object.assign({},e),{groupBy:(t,e)=>Y3(n,t,e)}))}),VO=(YO.props={},(t={})=>YO(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),qO=(VO.props={},(t={})=>YO(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),UO=(qO.props={},(t={})=>YO(Object.assign(Object.assign({},t),{channels:["color"]})));UO.props={};const XO=(t={})=>{const{reverse:s=!1,slice:l,channel:c}=t,u=K(t,["reverse","slice","channel"]);return(t,e)=>{var n=e["encode"];const[r]=z3(n,c);var i,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[o]=z3(n,r);if("function"==typeof i)return t=>i(t,o);if("max"===i)return t=>$p(t,t=>+o[t]);if("min"===i)return t=>Kp(t,t=>+o[t]);if("sum"===i)return t=>o0(t,t=>+o[t]);if("median"===i)return t=>n0(t,t=>+o[t]);if("mean"===i)return t=>e0(t,t=>+o[t]);if("first"===i)return t=>o[t[0]];if("last"===i)return t=>o[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(c,u,n),n=(o=t,a=t=>r[t],(2!==(i=n).length?Dp(Fp(o,i,a),([t,e],[n,r])=>kp(e,r)||kp(t,n)):Dp(jp(o,a),([t,e],[n,r])=>i(e,r)||kp(t,n))).map(([t])=>t)),o=(s&&n.reverse(),"number"==typeof l?[0,l]:l),a=l?n.slice(...o):n;return[t,F(e,{scale:{[c]:{domain:a}}})]}},$O=(XO.props={},(t={})=>XO(Object.assign(Object.assign({},t),{channel:"x"}))),ZO=($O.props={},(t={})=>XO(Object.assign(Object.assign({},t),{channel:"color"}))),KO=(ZO.props={},(t={})=>XO(Object.assign(Object.assign({},t),{channel:"y"})));KO.props={};const JO=(t={})=>{const{field:a,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=z3(r,"x");var o,n=a?(n=n,"string"==typeof(o=a)?n.map(t=>t[o]):n.map(o)):z3(r,s)[0],r=Rp(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>o0(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,F({},e,{scale:{x:{flex:r}}})]}};function QO(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:o}=n;let l=Math.ceil(Math.sqrt(e/(o/i))),c=i/l,u=Math.ceil(e/l),a=u*c;for(;a>o;)l+=1,c=i/l,u=Math.ceil(e/l),a=u*c;const h=o-u*c,f=u<=1?0:h/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(o-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Ob(t),o=e%l,e=Math.floor(e/l),a=o*c,s=(u-e-1)*c+h,r=c/r,i=c/i;return`translate(${a-t+d*o}, ${s-n-f*e-p}) scale(${r}, ${i})`})}JO.props={};const tS=()=>(t,e)=>[t,F({},e,{modifier:QO,axis:!1})],eS=(tS.props={},"thresholds");function nS(t){var[e,n]=Pp(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(_p(t))/(3.49*Ap(t)))))}const rS=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=K(t,["groupChannels","binChannels"]),u={};return GO(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(eS)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=z3(n,t);return t}),o=J(c,eS),a=t.filter(e=>i.every(t=>J0(t[e]))),r=[...s.map(t=>{var[t]=z3(n,t);return t}).filter(J0).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=o[t]||nS(n),e=Xp().thresholds(e).value(t=>+n[t])(a);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(jp(a,e=>r.map(t=>t(e)).join("-")).values())}}))},iS=(rS.props={},(t={})=>{var e=t["thresholds"];return rS(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});iS.props={};var qo="object"==typeof pn&&pn&&pn.Object===Object&&pn,Cl="object"==typeof self&&self&&self.Object===Object&&self,_l=qo||Cl||Function("return this")(),_a=_l.Symbol,Il=Object.prototype,oS=Il.hasOwnProperty,aS=Il.toString,sS=_a?_a.toStringTag:void 0;var lS=Object.prototype.toString;var cS="[object Null]",uS="[object Undefined]",hS=_a?_a.toStringTag:void 0;function fS(t){if(null==t)return void 0===t?uS:cS;if(hS&&hS in Object(t)){var e=t,n=oS.call(e,sS),r=e[sS];try{var i=!(e[sS]=void 0)}catch(t){}var o=aS.call(e);return i&&(n?e[sS]=r:delete e[sS]),o}return lS.call(t)}function dS(t){return null!=t&&"object"==typeof t}var pS=Array.isArray;function yS(t){return t}var gS="[object AsyncFunction]",mS="[object Function]",vS="[object GeneratorFunction]",bS="[object Proxy]";function xS(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var wS=/^(?:0|[1-9]\d*)$/;var kS=9007199254740991;function MS(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=kS}function ES(t){return null!=t&&MS(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=fS(t))==mS||e==vS||e==gS||e==bS}(t)}var OS=Object.prototype;function SS(t){return dS(t)&&"[object Arguments]"==fS(t)}var Rl=Object.prototype,_S=Rl.hasOwnProperty,AS=Rl.propertyIsEnumerable,PS=SS(function(){return arguments}())?SS:function(t){return dS(t)&&_S.call(t,"callee")&&!AS.call(t,"callee")};var Ol="object"==typeof h&&h&&!h.nodeType&&h,Ll=Ol&&"object"==typeof module&&module&&!module.nodeType&&module,Qs=Ll&&Ll.exports===Ol?_l.Buffer:void 0,TS=(Qs?Qs.isBuffer:void 0)||function(){return!1},LS={};LS["[object Float32Array]"]=LS["[object Float64Array]"]=LS["[object Int8Array]"]=LS["[object Int16Array]"]=LS["[object Int32Array]"]=LS["[object Uint8Array]"]=LS["[object Uint8ClampedArray]"]=LS["[object Uint16Array]"]=LS["[object Uint32Array]"]=!0,LS["[object Arguments]"]=LS["[object Array]"]=LS["[object ArrayBuffer]"]=LS["[object Boolean]"]=LS["[object DataView]"]=LS["[object Date]"]=LS["[object Error]"]=LS["[object Function]"]=LS["[object Map]"]=LS["[object Number]"]=LS["[object Object]"]=LS["[object RegExp]"]=LS["[object Set]"]=LS["[object String]"]=LS["[object WeakMap]"]=!1;var NS,sw="object"==typeof h&&h&&!h.nodeType&&h,CS=sw&&"object"==typeof module&&module&&!module.nodeType&&module,jS=CS&&CS.exports===sw&&qo.process,oa=function(){try{var t=CS&&CS.require&&CS.require("util").types;return t?t:jS&&jS.binding&&jS.binding("util")}catch(t){}}(),tl=oa&&oa.isTypedArray,FS=tl?(NS=tl,function(t){return NS(t)}):function(t){return dS(t)&&MS(t.length)&&!!LS[fS(t)]},RS=Object.prototype.hasOwnProperty;function IS(t,e){var n,r,i,o,a=pS(t),s=!a&&PS(t),l=!a&&!s&&TS(t),c=!a&&!s&&!l&&FS(t),u=a||s||l||c,h=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],f=h.length;for(n in t)!e&&!RS.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(o=void 0,o=typeof(r=n),(i=null==(i=f)?9007199254740991:i)&&("number"==o||"symbol"!=o&&wS.test(r))&&-1<r&&r%1==0&&r<i))||h.push(n);return h}DS=Object.keys,BS=Object;var DS,BS,zS=function(t){return DS(BS(t))},WS=Object.prototype.hasOwnProperty;function HS(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||OS))return zS(t);var e,n,r,i=[];for(r in Object(t))WS.call(t,r)&&"constructor"!=r&&i.push(r);return i}function GS(t){return(ES(t)?IS:HS)(t)}var YS,VS=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[YS?a:++r];if(!1===e(i[s],s,i))break}return t};US=function(t,e){return t&&VS(t,e,GS)};function qS(t,e){if(null!=t){if(!ES(t))return US(t,e);for(var n=t.length,r=XS?n:-1,i=Object(t);(XS?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var US,XS;function $S(t,e){(pS(t)?xS:qS)(t,"function"==typeof(t=e)?t:yS)}function ZS(t,e,n){return e<=t&&t<=n}function KS(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function JS(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var o,a,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(a=u,((s=[e,n])[0]-(o=c)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return 1;0<KS(c[1]-n)!=0<KS(u[1]-n)&&KS(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function QS(t){for(var e,n,r=[],i=t.length,o=0;o<i-1;o++){var a=t[o],s=t[o+1];r.push({from:{x:a[0],y:a[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function t4(t,c){var u=!1;return $S(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,o=n.y-e.y,a=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(a*a+t*t)*(s*s+r*r)<(n=a*r-t*s)*n&&ZS(r=(i*r-o*s)/n,0,1)&&ZS((i*t-o*a)/n,0,1)?{x:e.x+r*a,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,o,a,s,l}),u}function e4(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function n4(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function r4(t){return t.style.priority||0}const i4=()=>(n,t)=>{var r=[];n.sort((t,e)=>kp(r4(t),r4(e)));for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var o=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,o,t=e4(e),a=e4(n);if(t=t,!((a=a).minX>t.maxX||a.maxX<t.minX||a.minY>t.maxY||a.maxY<t.minY))return r=!1,$S(n,function(t){if(JS(e,t[0],t[1]))return!(r=!0)}),r?1:($S(e,function(t){if(JS(n,t[0],t[1]))return!(r=!0)}),r||(i=QS(e),a=QS(n),o=!1,$S(a,function(t){if(t4(i,t))return!(o=!0)}),o))}}(n4(i),n4(o))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function o4(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const a4=t=>{const{maxIter:k=10,maxError:M=.1,padding:E=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[y,g]=o4(),[m,v]=o4();var o,a,s,l,[c,t]=o4(),[u,n]=o4();for(const b of i){var{min:r,max:h}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,y]=r;var[r,h]=h;g(b,y),v(b,y),t(b,h-y),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>kp(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var f=i[n];let t=n+1,e;for(;(e=i[t])&&([[o,a],[s,l]]=[u(f),u(e)],!(o<l&&s<a));)t+=1;if(e){const y=m(f);var d=c(f),p=m(e),d=p-(y+d);d<E&&(d=(E-d)/2,r=Math.max(r,d),v(f,y-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-y(w)}return i}},s4=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(f0(e)){var{x:n,width:r}=e.getOptions();const o=e.getCenter();e=ty(i,r);const a=n+e,s=n+r-e;t.forEach(t=>{var{x:e,x0:n,y0:r}=t.style,e=e<=o[0]?a-e:s-e,{x:e,y:i}=(t.style.x+=e,t.style),n=wb([n,r],o),r=wb([0,i],o),i=n[1]?n[0]*r[1]/n[1]+o[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},l4=t=>(t,e)=>{if(f0(e)){const o=e.getCenter(),a=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,kb(o,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=Eb([e-o[0],n-o[1]]),n=r?i*(Math.sin(e)<0?-1:1):0,r=o[0]+Math.sin(e)*a,i=o[1]-Math.cos(e)*a;t.style.x=r+n,t.style.y=i,t.style.connectorPoints=[[-n,0]]})}return t};var T=1e-6,c4=1e-12,L=Math.PI,u4=L/2,h4=L/4,f4=2*L,d4=180/L,p4=L/180,y4=Math.abs,g4=Math.atan,m4=Math.atan2,C=Math.cos,v4=Math.ceil,b4=Math.exp,x4=Math.log,w4=Math.pow,j=Math.sin,k4=Math.sign||function(t){return 0<t?1:t<0?-1:0},M4=Math.sqrt,E4=Math.tan;function O4(t){return 1<t?0:t<-1?L:Math.acos(t)}function S4(t){return 1<t?u4:t<-1?-u4:Math.asin(t)}function _4(){}function A4(t,e){t&&T4.hasOwnProperty(t.type)&&T4[t.type](t,e)}var P4={Feature:function(t,e){A4(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)A4(n[r].geometry,e)}},T4={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){L4(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)L4(n[r],e,0)},Polygon:function(t,e){N4(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)N4(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)A4(n[r],e)}};function L4(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function N4(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)L4(t[n],e,1);e.polygonEnd()}function C4(t,e){t&&P4.hasOwnProperty(t.type)?P4[t.type](t,e):A4(t,e)}function j4(t){return[m4(t[1],t[0]),S4(t[2])]}function F4(t){var e=t[0],t=t[1],n=C(t);return[n*C(e),n*j(e),j(t)]}function R4(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I4(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function D4(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function B4(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function z4(t){var e=M4(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function W4(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function H4(t,e){return[y4(t)>L?t+Math.round(-t/f4)*f4:t,e]}function G4(t,e,n){return(t%=f4)?e||n?W4(V4(t),q4(e,n)):V4(t):e||n?q4(e,n):H4}function Y4(n){return function(t,e){return[L<(t+=n)?t-f4:t<-L?t+f4:t,e]}}function V4(t){var e=Y4(t);return e.invert=Y4(-t),e}function q4(t,e){var i=C(t),o=j(t),a=C(e),s=j(e);function n(t,e){var n=C(e),r=C(t)*n,t=j(t)*n,n=j(e),e=n*i+r*o;return[m4(t*a-e*s,r*i-n*o),S4(e*a+t*s)]}return n.invert=function(t,e){var n=C(e),r=C(t)*n,t=j(t)*n,n=j(e),e=n*a-t*s;return[m4(t*a+n*s,r*i+e*o),S4(e*i-r*o)]},n}function U4(t,e){(e=F4(e))[0]-=t,z4(e);t=O4(-e[1]);return((-e[2]<0?-t:t)+f4-T)%f4}function X4(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:_4,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function $4(t,e){return y4(t[0]-e[0])<T&&y4(t[1]-e[1])<T}function Z4(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function K4(t,e,n,r,o){var a,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if($4(r,i)){if(!r[2]&&!i[2]){for(o.lineStart(),a=0;a<e;++a)o.point((r=t[a])[0],r[1]);return void o.lineEnd()}i[0]+=2*T}s.push(n=new Z4(r,t,null,!0)),l.push(n.o=new Z4(r,null,n,!1)),s.push(n=new Z4(i,t,null,!1)),l.push(n.o=new Z4(i,null,n,!0))}}),s.length){for(l.sort(e),J4(s),J4(l),a=0,i=l.length;a<i;++a)l[a].e=n=!n;for(var c,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;c=f.z,o.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,i=c.length;a<i;++a)o.point((u=c[a])[0],u[1]);else r(f.x,f.n.x,1,o);f=f.n}else{if(d)for(c=f.p.z,a=c.length-1;0<=a;--a)o.point((u=c[a])[0],u[1]);else r(f.x,f.p.x,-1,o);f=f.p}}while(c=(f=f.o).z,d=!d,!f.v);o.lineEnd()}}}function J4(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function Q4(t){return y4(t[0])<=L?t[0]:k4(t[0])*((y4(t[0])+L)%f4-L)}function t_(g,m,v,b){return function(s){var l,c,u,n=m(s),h=X4(),f=m(h),d=!1,e={point:r,lineStart:i,lineEnd:o,polygonStart:function(){e.point=p,e.lineStart=a,e.lineEnd=y,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=o,c=r0(c);var t=function(t,e){var n=Q4(e),r=e[1],e=j(r),i=[j(n),-C(n),0],o=0,a=0,s=new Tp;1===e?r=u4+T:-1===e&&(r=-u4-T);for(var l=0,c=t.length;l<c;++l)if(h=(u=t[l]).length)for(var u,h,f=u[h-1],d=Q4(f),p=f[1]/2+h4,y=j(p),g=C(p),m=0;m<h;++m,d=b,y=w,g=x,f=v){var v=u[m],b=Q4(v),x=v[1]/2+h4,w=j(x),x=C(x),k=b-d,M=0<=k?1:-1,E=M*k,O=L<E,S=y*w;s.add(m4(S*M*j(E),g*x+S*C(E))),o+=O?k+M*f4:k,O^n<=d^n<=b&&(z4(S=I4(F4(f),F4(v))),z4(E=I4(i,S)),(M=(O^0<=k?-1:1)*S4(E[2]))<r||r===M&&(S[0]||S[1]))&&(a+=O^0<=k?1:-1)}return(o<-T||o<T&&s<-c4)^1&a}(l,b);c.length?(d||(s.polygonStart(),d=!0),K4(c,n_,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){g(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function o(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),f.point(t,e)}function a(){f.lineStart(),u=[]}function y(){p(u[0][0],u[0][1]),f.lineEnd();var t,e,n,r,i=f.clean(),o=h.result(),a=o.length;if(u.pop(),l.push(u),u=null,a)if(1&i){if(0<(e=(n=o[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<a&&2&i&&o.push(o.pop().concat(o.shift())),c.push(o.filter(e_))}return e}}function e_(t){return 1<t.length}function n_(t,e){return((t=t.x)[0]<0?t[1]-u4-T:u4-t[1])-((e=e.x)[0]<0?e[1]-u4-T:u4-e[1])}H4.invert=H4;var r_=t_(function(){return 1},function(c){var u,h=NaN,f=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,o,a,s=0<t?L:-L,l=y4(t-h);y4(l-L)<T?(c.point(h,f=0<(f+e)/2?u4:-u4),c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),c.point(t,f),u=0):d!==s&&L<=l&&(y4(h-d)<T&&(h-=d*T),y4(t-s)<T&&(t-=s*T),l=f,i=e,a=j((n=h)-(r=t)),f=y4(a)>T?g4((j(l)*(o=C(i))*j(r)-j(i)*(r=C(l))*j(n))/(r*o*a)):(l+i)/2,c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),u=0),c.point(h=t,f=e),d=s},lineEnd:function(){c.lineEnd(),h=f=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*u4,r.point(-L,i),r.point(0,i),r.point(L,i),r.point(L,0),r.point(L,-i),r.point(0,-i),r.point(-L,-i),r.point(-L,0),r.point(-L,i)):y4(t[0]-e[0])>T?(t=t[0]<e[0]?L:-L,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-L,-u4]);function i_(d){var y=C(d),p=6*p4,h=0<y,f=y4(y)>T;function g(t,e){return C(t)*C(e)>y}function m(t,e,n){var r,i,o,a,s,l,c,u=[1,0,0],h=I4(F4(t),F4(e)),f=R4(h,h),d=h[0],p=f-d*d;return p?(r=I4(u,h),D4(u=B4(u,y*f/p),B4(h,-y*d/p)),(p=(h=R4(u,f=r))*h-(d=R4(f,f))*(R4(u,u)-1))<0?void 0:(D4(p=B4(f,(-h-(r=M4(p)))/d),u),p=j4(p),n?(i=t[0],o=e[0],a=t[1],e=e[1],o<i&&(c=i,i=o,o=c),!(l=y4((s=o-i)-L)<T)&&e<a&&(c=a,a=e,e=c),(l||s<T?l?0<a+e^p[1]<(y4(p[0]-i)<T?a:e):a<=p[1]&&p[1]<=e:L<s^(i<=p[0]&&p[0]<=o))?(D4(c=B4(f,(-h+r)/d),u),[p,j4(c)]):void 0):p)):!n&&t}function v(t,e){var n=h?d:L-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return t_(g,function(o){var a,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=g(t,e),t=h?i?0:v(t,e):i?v(t+(t<0?L:-L),e):0;!a&&(c=l=i)&&o.lineStart(),i===l||(n=m(a,r))&&!$4(a,n)&&!$4(r,n)||(r[2]=1),i!==l?(u=0,i?(o.lineStart(),n=m(r,a),o.point(n[0],n[1])):(n=m(a,r),o.point(n[0],n[1],2),o.lineEnd()),a=n):f&&a&&h^i&&(t&s||!(e=m(r,a,!0))||(u=0,h?(o.lineStart(),o.point(e[0][0],e[0][1]),o.point(e[1][0],e[1][1]),o.lineEnd()):(o.point(e[1][0],e[1][1]),o.lineEnd(),o.lineStart(),o.point(e[0][0],e[0][1],3)))),!i||a&&$4(a,r)||o.point(r[0],r[1]),a=r,l=i,s=t},lineEnd:function(){l&&o.lineEnd(),a=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,o=p,a=n,n=t,s=e;if(o){var l=C(r),c=j(r),u=a*o;null==n?(n=r+a*f4,s=r-u/2):(n=U4(l,n),s=U4(l,s),(0<a?n<s:s<n)&&(n+=a*f4));for(var h,f=n;0<a?s<f:f<s;f-=u)h=j4([l,-c*C(f),-c*j(f)]),i.point(h[0],h[1])}},h?[0,-d]:[-L,d-L])}var o_=1e9,a_=-o_;function s_(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(t,e,n,r){var i=0,o=0;if(null==t||(i=a(t,n))!==(o=a(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==o;);else r.point(e[0],e[1])}function a(t,e){return y4(t[0]-m)<T?0<e?0:3:y4(t[0]-b)<T?0<e?2:1:y4(t[1]-v)<T?0<e?1:0:0<e?3:2}function M(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,h,o,a,s,l,c,u,f,d,p,y=r,t=X4(),e={point:n,lineStart:function(){e.point=g,h&&h.push(o=[]);d=!0,f=!1,c=u=NaN},lineEnd:function(){i&&(g(a,s),l&&f&&t.rejoin(),i.push(t.result()));e.point=n,f&&y.lineEnd()},polygonStart:function(){y=t,i=[],h=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=h.length;e<n;++e)for(var r,i,o=h[e],a=1,s=o.length,l=o[0],c=l[0],u=l[1];a<s;++a)r=c,i=u,l=o[a],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=r0(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&K4(i,M,t,k,r),r.polygonEnd());y=r,i=h=o=null}};function n(t,e){w(t,e)&&y.point(t,e)}function g(t,e){var n,r,i=w(t,e);h&&o.push([t,e]),d?(a=t,s=e,d=!1,(l=i)&&(y.lineStart(),y.point(t,e))):i&&f?y.point(t,e):!function(t,e,n,r,i,o){var a=t[0],s=t[1],l=0,c=1,u=e[0]-a,h=e[1]-s,n=n-a;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-a,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,h||!(0<n)){if(n/=h,h<0){if(n<l)return;n<c&&(c=n)}else if(0<h){if(c<n)return;l<n&&(l=n)}if(n=o-s,h||!(n<0)){if(n/=h,h<0){if(c<n)return;l<n&&(l=n)}else if(0<h){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=a+l*u,t[1]=s+l*h),c<1&&(e[0]=a+c*u,e[1]=s+c*h),1}}}}}(n=[c=Math.max(a_,Math.min(o_,c)),u=Math.max(a_,Math.min(o_,u))],r=[t=Math.max(a_,Math.min(o_,t)),e=Math.max(a_,Math.min(o_,e))],m,v,b,x)?i&&(y.lineStart(),y.point(t,e),p=!1):(f||(y.lineStart(),y.point(n[0],n[1])),y.point(r[0],r[1]),i||y.lineEnd(),p=!1),c=t,u=e,f=i}return e}}function l_(t,e,n){var r=i0(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function c_(t,e,n){var r=i0(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function u_(){return y=p=10,g=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[f(o).concat(d(l).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<o&&(t=o,o=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[o,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],n<r&&(t=r,r=n,n=t),a<s&&(t=s,s=a,a=t),e.precision(v)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(g=+t[0],m=+t[1],e):[g,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],y=+t[1],e):[p,y]},e.precision=function(t){return arguments.length?(v=+t,u=l_(s,a,90),h=c_(r,n,v),f=l_(c,l,90),d=c_(o,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return i0(v4(o/g)*g,i,g).map(f).concat(i0(v4(c/m)*m,l,m).map(d)).concat(i0(v4(r/p)*p,n,p).filter(function(t){return y4(t%g)>T}).map(u)).concat(i0(v4(s/y)*y,a,y).filter(function(t){return y4(t%m)>T}).map(h))}var n,r,i,o,a,s,l,c,u,h,f,d,p,y,g,m,v}var h_,f_,d_,p_,y_=t=>t,g_=new Tp,m_=new Tp,v_={point:_4,lineStart:_4,lineEnd:_4,polygonStart:function(){v_.lineStart=b_,v_.lineEnd=k_},polygonEnd:function(){v_.lineStart=v_.lineEnd=v_.point=_4,g_.add(y4(m_)),m_=new Tp},result:function(){var t=g_/2;return g_=new Tp,t}};function b_(){v_.point=x_}function x_(t,e){v_.point=w_,h_=d_=t,f_=p_=e}function w_(t,e){m_.add(p_*t-d_*e),d_=t,p_=e}function k_(){w_(h_,f_)}var M_=v_,E_=1/0,O_=E_,S_=-E_,__=S_;var A_,P_,T_,L_,N_={point:function(t,e){t<E_&&(E_=t);S_<t&&(S_=t);e<O_&&(O_=e);__<e&&(__=e)},lineStart:_4,lineEnd:_4,polygonStart:_4,polygonEnd:_4,result:function(){var t=[[E_,O_],[S_,__]];return S_=__=-(O_=E_=1/0),t}},C_=0,j_=0,F_=0,R_=0,I_=0,D_=0,B_=0,z_=0,W_=0,H_={point:G_,lineStart:Y_,lineEnd:U_,polygonStart:function(){H_.lineStart=X_,H_.lineEnd=$_},polygonEnd:function(){H_.point=G_,H_.lineStart=Y_,H_.lineEnd=U_},result:function(){var t=W_?[B_/W_,z_/W_]:D_?[R_/D_,I_/D_]:F_?[C_/F_,j_/F_]:[NaN,NaN];return C_=j_=F_=R_=I_=D_=B_=z_=W_=0,t}};function G_(t,e){C_+=t,j_+=e,++F_}function Y_(){H_.point=V_}function V_(t,e){H_.point=q_,G_(T_=t,L_=e)}function q_(t,e){var n=t-T_,r=e-L_,n=M4(n*n+r*r);R_+=n*(T_+t)/2,I_+=n*(L_+e)/2,D_+=n,G_(T_=t,L_=e)}function U_(){H_.point=G_}function X_(){H_.point=Z_}function $_(){K_(A_,P_)}function Z_(t,e){H_.point=K_,G_(A_=T_=t,P_=L_=e)}function K_(t,e){var n=t-T_,r=e-L_,n=M4(n*n+r*r);R_+=n*(T_+t)/2,I_+=n*(L_+e)/2,D_+=n,B_+=(n=L_*t-T_*e)*(T_+t),z_+=n*(L_+e),W_+=3*n,G_(T_=t,L_=e)}var J_=H_;function Q_(t){this._context=t}Q_.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,f4)}},result:_4};var t6,e6,n6,r6,i6,o6=new Tp,a6={point:_4,lineStart:function(){a6.point=s6},lineEnd:function(){t6&&l6(e6,n6),a6.point=_4},polygonStart:function(){t6=!0},polygonEnd:function(){t6=null},result:function(){var t=+o6;return o6=new Tp,t}};function s6(t,e){a6.point=l6,e6=r6=t,n6=i6=e}function l6(t,e){r6-=t,i6-=e,o6.add(M4(r6*r6+i6*i6)),r6=t,i6=e}var c6=a6;function u6(){this._string=[]}function h6(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function f6(e,n){var r,i,o=4.5;function a(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),C4(t,r(i))),i.result()}return a.area=function(t){return C4(t,r(M_)),M_.result()},a.measure=function(t){return C4(t,r(c6)),c6.result()},a.bounds=function(t){return C4(t,r(N_)),N_.result()},a.centroid=function(t){return C4(t,r(J_)),J_.result()},a.projection=function(t){return arguments.length?(r=null==t?(e=null,y_):(e=t).stream,a):e},a.context=function(t){return arguments.length?(i=null==t?(n=null,new u6):new Q_(n=t),"function"!=typeof o&&i.pointRadius(o),a):n},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),a):o},a.projection(e).context(n)}function d6(r){return function(t){var e,n=new p6;for(e in r)n[e]=r[e];return n.stream=t,n}}function p6(){}function y6(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),C4(n,t.stream(N_)),e(N_.result()),null!=r&&t.clipExtent(r),t}function g6(i,o,t){return y6(i,function(t){var e=o[1][0]-o[0][0],n=o[1][1]-o[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+o[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+o[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function m6(t,e,n){return g6(t,[[0,0],e],n)}function v6(r,i,t){return y6(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function b6(i,o,t){return y6(i,function(t){var e=+o,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}u6.prototype={_radius:4.5,_circle:h6(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=h6(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){var t;return this._string.length?(t=this._string.join(""),this._string=[],t):null}},p6.prototype={constructor:p6,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var x6=16,w6=C(30*p4);function k6(t,e){return+e?(_=t,A=e,function(r){var n,i,o,a,s,l,c,u,h,f,d,p,y={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),y.lineStart=v},polygonEnd:function(){r.polygonEnd(),y.lineStart=e}};function t(t,e){t=_(t,e),r.point(t[0],t[1])}function e(){u=NaN,y.point=g,r.lineStart()}function g(t,e){var n=F4([t,e]),e=_(t,e);P(u,h,c,f,d,p,u=e[0],h=e[1],c=t,f=n[0],d=n[1],p=n[2],x6,r),r.point(u,h)}function m(){y.point=t,r.lineEnd()}function v(){e(),y.point=b,y.lineEnd=x}function b(t,e){g(n=t,e),i=u,o=h,a=f,s=d,l=p,y.point=g}function x(){P(u,h,c,f,d,p,i,o,n,a,s,l,x6,r),y.lineEnd=m,m()}return y}):(n=t,d6({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,_,A;function P(t,e,n,r,i,o,a,s,l,c,u,h,f,d){var p,y,g,m,v,b,x,w,k,M,E=a-t,O=s-e,S=E*E+O*O;4*A<S&&f--&&(g=o+h,x=S4(g/=m=M4((p=r+c)*p+(y=i+u)*y+g*g)),v=y4(y4(g)-1)<T||y4(n-l)<T?(n+l)/2:m4(y,p),b=(x=_(v,x))[0],x=x[1],A<(M=O*(w=b-t)-E*(k=x-e))*M/S||.3<y4((E*w+O*k)/S-.5)||r*c+i*u+o*h<w6)&&(P(t,e,n,r,i,o,b,x,v,p/=m,y/=m,g,f,d),d.point(b,x),P(b,x,v,p,y,g,a,s,l,c,u,h,f,d))}}var M6=d6({point:function(t,e){this.stream.point(t*p4,e*p4)}});function E6(t,n,r,i,o,e){var a,s,l,c,u,h,f,d,p,y,g,m;return e?(h=C(e),e=j(e),f=h*t,d=e*t,p=h/t,y=e/t,g=(e*r-h*n)/t,m=(e*n+h*r)/t,b.invert=function(t,e){return[i*(p*t-y*e+g),o*(m-y*t-p*e)]},b):(a=t,s=n,l=r,c=i,u=o,v.invert=function(t,e){return[(t-s)/a*c,(l-e)/a*u]},v);function v(t,e){return[s+a*(t*=c),l-a*(e*=u)]}function b(t,e){return[f*(t*=i)-d*(e*=o)+n,r-d*t-f*e]}}function O6(t){return S6(function(){return t})()}function S6(t){var e,r,n,i,o,a,s,l,c,u,h=150,f=480,d=250,p=0,y=0,g=0,m=0,v=0,b=0,x=1,w=1,k=null,M=r_,E=null,O=y_,S=.5;function _(t){return l(t[0]*p4,t[1]*p4)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*d4,t[1]*d4]}function P(){var t=E6(h,0,0,x,w,b).apply(null,e(p,y)),t=E6(h,f-t[0],d-t[1],x,w,b);return r=G4(g,m,v),s=W4(e,t),l=W4(r,s),a=k6(s,S),T()}function T(){return c=u=null,_}return _.stream=function(t){return c&&u===t?c:c=M6((n=r,d6({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(a(O(u=t))))));var n},_.preclip=function(t){return arguments.length?(M=t,k=void 0,T()):M},_.postclip=function(t){return arguments.length?(O=t,E=n=i=o=null,T()):O},_.clipAngle=function(t){return arguments.length?(M=+t?i_(k=t*p4):(k=null,r_),T()):k*d4},_.clipExtent=function(t){return arguments.length?(O=null==t?(E=n=i=o=null,y_):s_(E=+t[0][0],n=+t[0][1],i=+t[1][0],o=+t[1][1]),T()):null==E?null:[[E,n],[i,o]]},_.scale=function(t){return arguments.length?(h=+t,P()):h},_.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],P()):[f,d]},_.center=function(t){return arguments.length?(p=t[0]%360*p4,y=t[1]%360*p4,P()):[p*d4,y*d4]},_.rotate=function(t){return arguments.length?(g=t[0]%360*p4,m=t[1]%360*p4,v=2<t.length?t[2]%360*p4:0,P()):[g*d4,m*d4,v*d4]},_.angle=function(t){return arguments.length?(b=t%360*p4,P()):b*d4},_.reflectX=function(t){return arguments.length?(x=t?-1:1,P()):x<0},_.reflectY=function(t){return arguments.length?(w=t?-1:1,P()):w<0},_.precision=function(t){return arguments.length?(a=k6(s,S=t*t),T()):M4(S)},_.fitExtent=function(t,e){return g6(_,t,e)},_.fitSize=function(t,e){return m6(_,t,e)},_.fitWidth=function(t,e){return v6(_,t,e)},_.fitHeight=function(t,e){return b6(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&A,P()}}function _6(t){var e=0,n=L/3,r=S6(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*p4,n=t[1]*p4):[e*d4,n*d4]},t}function A6(t,e){var n,r,i,o=j(t),a=(o+j(e))/2;return y4(a)<T?(n=C(t),s.invert=function(t,e){return[t/n,S4(e*n)]},s):(i=M4(r=1+o*(2*a-o))/a,l.invert=function(t,e){var e=i-e,n=m4(t,y4(e))*k4(e);return e*a<0&&(n-=L*k4(t)*k4(e)),[n/a,S4((r-(t*t+e*e)*a*a)/(2*a))]},l);function s(t,e){return[t*n,j(e)/n]}function l(t,e){e=M4(r-2*a*j(e))/a;return[e*j(t*=a),i-e*C(t)]}}function P6(){return _6(A6).scale(155.424).center([0,33.6442])}function T6(){return P6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function L6(i){return function(t,e){var n=C(t),r=C(e),n=i(n*r);return n===1/0?[2,0]:[n*r*j(t),n*j(e)]}}function N6(o){return function(t,e){var n=M4(t*t+e*e),r=o(n),i=j(r),r=C(r);return[m4(t*i,n*r),S4(n&&e*i/n)]}}var C6=L6(function(t){return M4(2/(1+t))});C6.invert=N6(function(t){return 2*S4(t/2)});var j6=L6(function(t){return(t=O4(t))&&t/j(t)});function F6(t,e){return[t,x4(E4((u4+e)/2))]}function R6(r){var i,o,a,s=O6(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function h(){var e,t=L*l(),n=s((e=G4((e=s.rotate())[0]*p4,e[1]*p4,2<e.length?e[2]*p4:0),function(t){return(t=e.invert(t[0]*p4,t[1]*p4))[0]*=d4,t[1]*=d4,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===F6?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,o),a]]:[[u,Math.max(n[1]-t,i)],[o,Math.min(n[1]+t,a)]])}return s.scale=function(t){return(arguments.length?(l(t),h):l)()},s.translate=function(t){return(arguments.length?(n(t),h):n)()},s.center=function(t){return(arguments.length?(e(t),h):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=o=a=null:(u=+t[0][0],i=+t[0][1],o=+t[1][0],a=+t[1][1]),h()):null==u?null:[[u,i],[o,a]]},h()}function I6(t){return E4((u4+t)/2)}function D6(t,e){var n=C(t),i=t===e?j(t):x4(n/C(e))/x4(I6(e)/I6(t)),o=n*w4(I6(t),i)/i;return i?(r.invert=function(t,e){var e=o-e,n=k4(i)*M4(t*t+e*e),r=m4(t,y4(e))*k4(e);return e*i<0&&(r-=L*k4(t)*k4(e)),[r/i,2*g4(w4(o/n,1/i))-u4]},r):F6;function r(t,e){0<o?e<-u4+T&&(e=-u4+T):u4-T<e&&(e=u4-T);e=o/w4(I6(e),i);return[e*j(i*t),o-e*C(i*t)]}}function B6(t,e){return[t,e]}function z6(t,e){var n=C(t),r=t===e?j(t):(n-C(e))/(e-t),i=n/r+t;return y4(r)<T?B6:(o.invert=function(t,e){var e=i-e,n=m4(t,y4(e))*k4(e);return e*r<0&&(n-=L*k4(t)*k4(e)),[n/r,i-k4(r)*M4(t*t+e*e)]},o);function o(t,e){e=i-e,t*=r;return[e*j(t),i-e*C(t)]}}j6.invert=N6(function(t){return t}),F6.invert=function(t,e){return[t,2*g4(b4(e))-u4]},B6.invert=B6;var W6=1.340264,H6=-.081106,G6=893e-6,Y6=.003796,V6=M4(3)/2;function q6(t,e){var e=S4(V6*j(e)),n=e*e,r=n*n*n;return[t*C(e)/(V6*(W6+3*H6*n+r*(7*G6+9*Y6*n))),e*(W6+H6*n+r*(G6+Y6*n))]}function U6(t,e){var n=C(e),r=C(t)*n;return[n*j(t)/r,j(e)/r]}function X6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function $6(t,e){return[C(e)*j(t),j(e)]}function Z6(t,e){var n=C(e),r=1+C(t)*n;return[n*j(t)/r,j(e)/r]}function K6(t,e){return[x4(E4((u4+e)/2)),-t]}q6.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(W6+H6*i+o*(G6+Y6*i))-e)/(W6+3*H6*i+o*(7*G6+9*Y6*i)))*r)*i*i,!(y4(n)<c4));++a);return[V6*t*(W6+3*H6*i+o*(7*G6+9*Y6*i))/C(r),S4(j(r)/V6)]},U6.invert=N6(g4),X6.invert=function(t,e){var n=e,r=25;do{var i=n*n,o=i*i}while(n-=o=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-e)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o))),y4(o)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},$6.invert=N6(S4),Z6.invert=N6(function(t){return 2*g4(t)}),K6.invert=function(t,e){return[-e,2*g4(b4(t))-u4]};var J6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,o,a,r,s=T6(),l=P6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=P6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function h(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(o.point(e,t),r)||(a.point(e,t),r)}function f(){return e=n=null,h}return h.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},h.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},h.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),h.translate(s.translate())):s.scale()},h.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),o=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),a=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),f()):s.translate()},h.fitExtent=function(t,e){return g6(h,t,e)},h.fitSize=function(t,e){return m6(h,t,e)},h.fitWidth=function(t,e){return v6(h,t,e)},h.fitHeight=function(t,e){return b6(h,t,e)},h.scale(1070)},geoAlbers:T6,geoAzimuthalEqualArea:function(){return O6(C6).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:C6,geoAzimuthalEquidistant:function(){return O6(j6).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:j6,geoConicConformal:function(){return _6(D6).scale(109.5).parallels([30,30])},geoConicConformalRaw:D6,geoConicEqualArea:P6,geoConicEqualAreaRaw:A6,geoConicEquidistant:function(){return _6(z6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:z6,geoEqualEarth:function(){return O6(q6).scale(177.158)},geoEqualEarthRaw:q6,geoEquirectangular:function(){return O6(B6).scale(152.63)},geoEquirectangularRaw:B6,geoGnomonic:function(){return O6(U6).scale(144.049).clipAngle(60)},geoGnomonicRaw:U6,geoIdentity:function(){var r,i,e,n,o,a,s,l=1,c=0,u=0,h=1,f=1,d=0,p=null,y=1,g=1,m=d6({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=y_;function b(){return y=l*h,g=l*f,a=s=null,x}function x(t){var e,n=t[0]*y,t=t[1]*g;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/y,t/g]},x.stream=function(t){return a&&s===t?a:a=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=o=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=o=null,y_):s_(p=+t[0][0],e=+t[0][1],n=+t[1][0],o=+t[1][1]),b()):null==p?null:[[p,e],[n,o]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=j(d=t%360*p4),r=C(d),b()):d*d4},x.reflectX=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return g6(x,t,e)},x.fitSize=function(t,e){return m6(x,t,e)},x.fitWidth=function(t,e){return v6(x,t,e)},x.fitHeight=function(t,e){return b6(x,t,e)},x},geoProjection:O6,geoProjectionMutator:S6,geoMercator:function(){return R6(F6).scale(961/f4)},geoMercatorRaw:F6,geoNaturalEarth1:function(){return O6(X6).scale(175.295)},geoNaturalEarth1Raw:X6,geoOrthographic:function(){return O6($6).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:$6,geoStereographic:function(){return O6(Z6).scale(250).clipAngle(142)},geoStereographicRaw:Z6,geoTransverseMercator:function(){var t=R6(K6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:K6});function Q6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function tA(t,e,n,r){var i,o,a,s,l,c,{outline:e=(e=e.filter(nA),e.find(t=>t.sphere)?{type:"Sphere"}:Q6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,a=e,{x:c,y:l,width:o,height:s}=c=n,i.fitExtent([[c,l],[o,s]],a)):"fitWidth"===r&&(i=t,c=e,{width:l,height:o}=l=n,[[l,c],[s,a]]=f6(i.fitWidth(l,c)).bounds(c),a=Math.ceil(a-c),c=Math.min(Math.ceil(s-l),a),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(o-a)/2,i.scale(s).translate([l,c]).precision(.2))}function eA(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[u_()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function nA(t){return"geoPath"===t.type}var rA,o=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,f=K(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+wf(t);if(e=J6[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(eA);let y;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var o,a,s,l={x:t,y:e,width:n,height:r},c=(tA(i,p,l,f),i),l=f;for([a,s]of Object.entries(l))null!=(o=c[a])&&o.call(c,s);y=f6(i);const u=new Im({domain:[t,t+n]}),h=new Im({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),h.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),h.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return nA(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>y(t)})})):t;var e})})]},Ho=(o.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:o,key:a}=t,t=K(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:a+"-0",data:{value:e},scale:n,encode:r,style:i,animate:o}]})]});Ho.props={};const iA={"composition.geoView":o,"composition.geoPath":Ho};function oA(){return Object.assign({"data.fetch":Mg,"data.inline":Lg,"data.sortBy":Tg,"data.filter":Og,"data.pick":Ag,"data.rename":Pg,"data.subset":_g,"data.fold":Eg,"data.custom":Ng,"data.map":Cg,"data.cluster":lg,"data.tree":cg,"data.sankey":X0,"data.arc":Ig,"data.wordCloud":r1,"data.join":o1,"transform.maybeZeroY1":G3,"transform.maybeZeroX":rO,"transform.maybeStackY":eO,"transform.maybeTitle":nO,"transform.maybeSeries":sO,"transform.maybeZeroPadding":dO,"transform.stackY":Q3,"transform.binX":iS,"transform.bin":rS,"transform.dodgeX":vO,"transform.jitter":MO,"transform.jitterX":EO,"transform.symmetryY":OO,"transform.diffY":SO,"transform.stackEnter":bO,"transform.normalizeY":xO,"transform.select":LO,"transform.selectX":NO,"transform.selectY":CO,"transform.groupX":VO,"transform.groupY":qO,"transform.groupColor":UO,"transform.group":YO,"transform.maybeSize":oO,"transform.maybeZeroY":iO,"transform.maybeKey":aO,"transform.sortX":$O,"transform.sortY":KO,"transform.sortColor":ZO,"transform.flexX":JO,"transform.maybeTupleY":lO,"transform.maybeTupleX":cO,"transform.maybeIdentityY":uO,"transform.maybeIdentityX":hO,"transform.maybeTuple":gO,"transform.maybeVisualPosition":pO,"transform.maybeFunctionAttribute":yO,"transform.maybeGradient":mO,"transform.maybeTooltip":fO,"transform.pack":tS,"coordinate.cartesian":Yf,"coordinate.polar":Vf,"coordinate.helix":qf,"coordinate.transpose":Uf,"coordinate.theta":Kf,"coordinate.reflect":Xf,"coordinate.reflectX":$f,"coordinate.reflectY":Zf,"coordinate.parallel":Qf,"coordinate.fisheye":td,"coordinate.fisheyeX":ed,"coordinate.fisheyeY":nd,"coordinate.radial":Jf,"encode.constant":rd,"encode.field":od,"encode.transform":id,"encode.column":ad,"mark.interval":xp,"mark.rect":wp,"mark.line":y0,"mark.point":g0,"mark.text":m0,"mark.cell":v0,"mark.area":b0,"mark.link":x0,"mark.image":w0,"mark.polygon":k0,"mark.box":M0,"mark.vector":E0,"mark.lineX":S0,"mark.lineY":O0,"mark.connector":_0,"mark.range":T0,"mark.rangeX":L0,"mark.rangeY":N0,"mark.sankey":ey,"mark.path":ny,"mark.treemap":sy,"mark.pack":ly,"mark.boxplot":my,"mark.shape":vy,"mark.forceGraph":ag,"mark.tree":ug,"mark.wordCloud":a1,"palette.category10":s1,"palette.category20":l1,"palette.sequentialBlue":c1,"palette.sequentialDarkBlue":u1,"palette.sequentialGreen":h1,"palette.sequentialDarkGreen":f1,"palette.sequentialGrey":d1,"palette.sequentialOrange":p1,"palette.sequentialPink":y1,"palette.sequentialRed":g1,"palette.sequentialYellow":m1,"palette.sequentialPurple":v1,"palette.sequentialYellowOrange":b1,"palette.sequentialYellowGreen":x1,"palette.sequentialPinkPurple":w1,"palette.sequentialGreenBlue":k1,"palette.divergingGreenYellow":M1,"palette.divergingRedBlue":E1,"palette.divergingGreenRed":O1,"palette.divergingRedPurple":S1,"scale.linear":uv,"scale.ordinal":hv,"scale.band":cv,"scale.identity":fv,"scale.point":dv,"scale.time":pv,"scale.log":yv,"scale.pow":gv,"scale.sqrt":xv,"scale.threshold":mv,"scale.quantile":vv,"scale.quantize":bv,"scale.sequential":wv,"shape.interval.rect":Ib,"shape.interval.hollow":Db,"shape.interval.funnel":Bb,"shape.interval.pyramid":Wb,"shape.rect.rect":Ib,"shape.rect.hollow":Db,"shape.cell.cell":Ib,"shape.cell.hollow":Db,"shape.line.line":Vb,"shape.line.hv":Ub,"shape.line.vh":Xb,"shape.line.hvh":$b,"shape.line.smooth":qb,"shape.point.bowtie":Jb,"shape.point.cross":Qb,"shape.point.diamond":t2,"shape.point.hexagon":e2,"shape.point.hollowBowtie":n2,"shape.point.hollowDiamond":r2,"shape.point.hollowHexagon":i2,"shape.point.hollow":o2,"shape.point.hollowSquare":a2,"shape.point.hollowTriangle":s2,"shape.point.hollowTriangleDown":l2,"shape.point.hyphen":c2,"shape.point.line":u2,"shape.point.plus":h2,"shape.point.point":f2,"shape.point.square":d2,"shape.point.tick":p2,"shape.point.triangle":y2,"shape.point.triangleDown":g2,"shape.text.text":J5,"shape.area.area":rM,"shape.area.smooth":iM,"shape.area.step":oM,"shape.link.smooth":sM,"shape.link.vhv":lM,"shape.link.arc":cM,"shape.link.link":aM,"shape.image.image":uM,"shape.polygon.polygon":hM,"shape.polygon.ribbon":fM,"shape.box.box":dM,"shape.vector.vector":m2,"shape.label.label":SM,"shape.text.badge":tM,"shape.lineX.line":pM,"shape.lineY.line":pM,"shape.shape.shape":TM,"shape.connector.connector":mM,"shape.range.range":Ib,"shape.rangeX.range":Ib,"shape.rangeY.range":Ib,"shape.path.path":AM,"shape.path.hollow":PM,"theme.light":jM,"theme.dark":DM,"component.axisX":iE,"component.axisY":oE,"component.legendCategory":aE,"component.legendContinuous":sE,"component.title":uE,"animation.scaleInX":gE,"animation.scaleOutX":mE,"animation.scaleInY":vE,"animation.scaleOutY":bE,"animation.waveIn":_E,"animation.fadeIn":xE,"animation.fadeOut":wE,"animation.zoomIn":AE,"animation.zoomOut":PE,"animation.pathIn":TE,"animation.morphing":SE,"animation.growInX":LE,"animation.growInY":NE,"interaction.elementHighlight":YE,"interaction.elementHighlightByX":VE,"interaction.elementHighlightByColor":qE,"interaction.elementSelect":XE,"interaction.elementSelectByX":$E,"interaction.elementSelectByColor":ZE,"interaction.fisheye":JE,"interaction.chartIndex":KE,"interaction.tooltip":l3,"composition.spaceLayer":f3,"composition.spaceFlex":d3,"composition.mark":y3,"composition.view":p3,"composition.facetRect":O3,"composition.repeatMatrix":P3,"composition.facetCircle":F3,"composition.timingKeyframe":R3,"labelTransform.hideOverlap":i4,"labelTransform.dodgeY":a4,"labelTransform.spider":s4,"labelTransform.surround":l4},iA)}function aA(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function sA(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Z0("Unknown Component: "+t)};return[t=>{var e=t["type"],t=K(t,["type"]);return r(e)(Object.assign({},t))},r]}function u(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(Go=rA=rA||{}).BEFORE_RENDER="beforerender",Go.AFTER_RENDER="afterrender",Go.BEFORE_PAINT="beforepaint",Go.AFTER_PAINT="afterpaint",Go.BEFORE_CHANGE_DATA="beforechangedata",Go.AFTER_CHANGE_DATA="afterchangedata",Go.BEFORE_CLEAR="beforeclear",Go.AFTER_CLEAR="afterclear",Go.BEFORE_DESTROY="beforedestroy",Go.AFTER_DESTROY="afterdestroy",Go.BEFORE_CHANGE_SIZE="beforechangesize",Go.AFTER_CHANGE_SIZE="afterchangesize";a=u("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Tl=u("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Yo=u("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Uo=u("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),n=u("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Al=u("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Pl=u("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),e=u("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Sl=u("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Vo=u("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function lA(t,e,n){(t.prototype=e.prototype=n).constructor=t}function cA(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function uA(){}var hA=1/.7,Xo="\\s*([+-]?\\d+)\\s*",$o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fA=/^#([0-9a-f]{3,8})$/,dA=new RegExp(`^rgb\\(${Xo},${Xo},${Xo}\\)$`),pA=new RegExp(`^rgb\\(${Zo},${Zo},${Zo}\\)$`),yA=new RegExp(`^rgba\\(${Xo},${Xo},${Xo},${$o}\\)$`),gA=new RegExp(`^rgba\\(${Zo},${Zo},${Zo},${$o}\\)$`),mA=new RegExp(`^hsl\\(${$o},${Zo},${Zo}\\)$`),vA=new RegExp(`^hsla\\(${$o},${Zo},${Zo},${$o}\\)$`),bA={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xA(){return this.rgb().formatHex()}function wA(){return this.rgb().formatRgb()}function kA(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=fA.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?MA(e):3===n?new _A(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?EA(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?EA(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=dA.exec(t))?new _A(e[1],e[2],e[3],1):(e=pA.exec(t))?new _A(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yA.exec(t))?EA(e[1],e[2],e[3],e[4]):(e=gA.exec(t))?EA(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=mA.exec(t))?CA(e[1],e[2]/100,e[3]/100,1):(e=vA.exec(t))?CA(e[1],e[2]/100,e[3]/100,e[4]):bA.hasOwnProperty(t)?MA(bA[t]):"transparent"===t?new _A(NaN,NaN,NaN,0):null}function MA(t){return new _A(t>>16&255,t>>8&255,255&t,1)}function EA(t,e,n,r){return new _A(t=r<=0?e=n=NaN:t,e,n,r)}function OA(t){return(t=t instanceof uA?t:kA(t))?new _A((t=t.rgb()).r,t.g,t.b,t.opacity):new _A}function SA(t,e,n,r){return 1===arguments.length?OA(t):new _A(t,e,n,null==r?1:r)}function _A(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function AA(){return"#"+NA(this.r)+NA(this.g)+NA(this.b)}function PA(){var t=TA(this.opacity);return(1===t?"rgb(":"rgba(")+LA(this.r)+`, ${LA(this.g)}, `+LA(this.b)+(1===t?")":`, ${t})`)}function TA(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function LA(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function NA(t){return((t=LA(t))<16?"0":"")+t.toString(16)}function CA(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new FA(t,e,n,r)}function jA(t){var e,n,r,i,o,a,s,l;return t instanceof FA?new FA(t.h,t.s,t.l,t.opacity):(t=t instanceof uA?t:kA(t))?t instanceof FA?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=NaN,l=((o=Math.max(e,n,r))+i)/2,(s=o-i)?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=0<l&&l<1?0:a,new FA(a,s,l,t.opacity)):new FA}function FA(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function RA(t){return(t=(t||0)%360)<0?t+360:t}function IA(t){return Math.max(0,Math.min(1,t||0))}function DA(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}lA(uA,kA,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xA,formatHex:xA,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jA(this).formatHsl()},formatRgb:wA,toString:wA}),lA(_A,SA,cA(uA,{brighter(t){return t=null==t?hA:Math.pow(hA,t),new _A(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new _A(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _A(LA(this.r),LA(this.g),LA(this.b),TA(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:AA,formatHex:AA,formatHex8:function(){return"#"+NA(this.r)+NA(this.g)+NA(this.b)+NA(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:PA,toString:PA})),lA(FA,function(t,e,n,r){return 1===arguments.length?jA(t):new FA(t,e,n,null==r?1:r)},cA(uA,{brighter(t){return t=null==t?hA:Math.pow(hA,t),new FA(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new FA(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new _A(DA(240<=t?t-240:120+t,n,e),DA(t,n,e),DA(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new FA(RA(this.h),IA(this.s),IA(this.l),TA(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=TA(this.opacity);return(1===t?"hsl(":"hsla(")+RA(this.h)+`, ${100*IA(this.s)}%, ${100*IA(this.l)}%`+(1===t?")":`, ${t})`)}}));const BA=Math.PI/180,zA=180/Math.PI;var WA=1.78277,HA=-.29227,GA=-.90649,YA=1.97294,VA=YA*GA,qA=YA*WA,UA=WA*HA- -.14861*GA;function XA(t,e,n,r){return 1===arguments.length?(i=t)instanceof $A?new $A(i.h,i.s,i.l,i.opacity):(o=(i=i instanceof _A?i:OA(i)).r/255,a=i.g/255,l=i.b/255,l=(YA*(a-(o=(UA*l+VA*o-qA*a)/(UA+VA-qA)))-HA*(a=l-o))/GA,new $A((l=(s=Math.sqrt(l*l+a*a)/(YA*o*(1-o)))?Math.atan2(l,a)*zA-120:NaN)<0?l+360:l,s,o,i.opacity)):new $A(t,e,n,null==r?1:r);var i,o,a,s,l}function $A(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}lA($A,XA,cA(uA,{brighter(t){return t=null==t?hA:Math.pow(hA,t),new $A(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new $A(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*BA,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new _A(255*(e+n*(-.14861*r+WA*t)),255*(e+n*(HA*r+GA*t)),255*(e+YA*r*n),this.opacity)}}));var ZA=t=>()=>t;function KA(e,n){return function(t){return e+t*n}}function JA(o){return 1==(o=+o)?QA:function(t,e){return e-t?(n=t,r=e,i=o,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):ZA(isNaN(t)?e:t);var n,r,i}}function QA(t,e){var n=e-t;return n?KA(t,n):ZA(isNaN(t)?e:t)}!function t(e){var a=JA(e);function n(e,t){var n=a((e=SA(e)).r,(t=SA(t)).r),r=a(e.g,t.g),i=a(e.b,t.b),o=QA(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=o(t),e+""}}return n.gamma=t,n}(1);tP=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],o=0<n?s[n-1]:2*r-i,a=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*o+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*a)/6}};var tP,eP=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a=0;a<n;++a)e=SA(t[a]),r[a]=e.r||0,i[a]=e.g||0,o[a]=e.b||0;return r=tP(r),i=tP(i),o=tP(o),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e+""}};function nP(s){return function t(a){function e(e,t){var n=s((e=XA(e)).h,(t=XA(t)).h),r=QA(e.s,t.s),i=QA(e.l,t.l),o=QA(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,a)),e.opacity=o(t),e+""}}return a=+a,e.gamma=t,e}(1)}nP(function(t,e){var n=e-t;return n?KA(t,180<n||n<-180?n-360*Math.round(n/360):n):ZA(isNaN(t)?e:t)});var Ko=nP(QA),Qo=t=>eP(t[t.length-1]),Jo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(u),ta=Qo(Jo),l=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(u),Hl=Qo(l),ea=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(u),pn=Qo(ea),Cl=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(u),Il=Qo(Cl),_a=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(u),Rl=Qo(_a),Ll=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(u),Ol=Qo(Ll),_l=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(u),Qs=Qo(_l),sw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(u),qo=Qo(sw),oa=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(u),tl=Qo(oa),o=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(u),Ho=Qo(o),Go=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(u),Xo=Qo(Go),Zo=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(u),$o=Qo(Zo),rP=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(u),iP=Qo(rP),oP=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(u),aP=Qo(oP),sP=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(u),lP=Qo(sP),cP=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(u),uP=Qo(cP),hP=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(u),fP=Qo(hP),dP=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(u),pP=Qo(dP),yP=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(u),gP=Qo(yP),mP=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(u),vP=Qo(mP),bP=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(u),xP=Qo(bP),wP=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(u),kP=Qo(wP),MP=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(u),EP=Qo(MP),OP=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(u),SP=Qo(OP),_P=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(u),AP=Qo(_P),PP=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(u),TP=Qo(PP),LP=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(u),Qo=Qo(LP);var NP=Ko(XA(300,.5,0),XA(-240,.5,1)),CP=Ko(XA(-100,.75,.35),XA(80,1.5,.8)),Ko=Ko(XA(260,.75,.35),XA(80,1.5,.8)),jP=XA();var FP=SA(),RP=Math.PI/3,IP=2*Math.PI/3;function DP(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var BP=DP(u("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),zP=DP(u("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),WP=DP(u("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),HP=DP(u("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),GP=Object.freeze({__proto__:null,schemeCategory10:a,schemeAccent:Tl,schemeDark2:Yo,schemePaired:Uo,schemePastel1:n,schemePastel2:Al,schemeSet1:Pl,schemeSet2:e,schemeSet3:Sl,schemeTableau10:Vo,interpolateBrBG:ta,schemeBrBG:Jo,interpolatePRGn:Hl,schemePRGn:l,interpolatePiYG:pn,schemePiYG:ea,interpolatePuOr:Il,schemePuOr:Cl,interpolateRdBu:Rl,schemeRdBu:_a,interpolateRdGy:Ol,schemeRdGy:Ll,interpolateRdYlBu:Qs,schemeRdYlBu:_l,interpolateRdYlGn:qo,schemeRdYlGn:sw,interpolateSpectral:tl,schemeSpectral:oa,interpolateBuGn:Ho,schemeBuGn:o,interpolateBuPu:Xo,schemeBuPu:Go,interpolateGnBu:$o,schemeGnBu:Zo,interpolateOrRd:iP,schemeOrRd:rP,interpolatePuBuGn:aP,schemePuBuGn:oP,interpolatePuBu:lP,schemePuBu:sP,interpolatePuRd:uP,schemePuRd:cP,interpolateRdPu:fP,schemeRdPu:hP,interpolateYlGnBu:pP,schemeYlGnBu:dP,interpolateYlGn:gP,schemeYlGn:yP,interpolateYlOrBr:vP,schemeYlOrBr:mP,interpolateYlOrRd:xP,schemeYlOrRd:bP,interpolateBlues:kP,schemeBlues:wP,interpolateGreens:EP,schemeGreens:MP,interpolateGreys:SP,schemeGreys:OP,interpolatePurples:AP,schemePurples:_P,interpolateReds:TP,schemeReds:PP,interpolateOranges:Qo,schemeOranges:LP,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:NP,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return jP.h=360*t-100,jP.s=1.5-1.5*e,jP.l=.8-.9*e,jP+""},interpolateWarm:CP,interpolateCool:Ko,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,FP.r=255*(e=Math.sin(t))*e,FP.g=255*(e=Math.sin(t+RP))*e,FP.b=255*(e=Math.sin(t+IP))*e,FP+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:BP,interpolateMagma:zP,interpolateInferno:WP,interpolatePlasma:HP});function YP(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function VP(t,e,n,r,i){var o=t[0],t=t[1],a=lt();return o=[o,t],(t=a)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=o[0],t[7]=o[1],t[8]=1,t}function qP(t,e,n,r,i){var o=new Im({range:[e,e+r]}),a=new Im({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[o.map(e),a.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[o.invert(e),a.invert(t)]}}}function UP(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function XP(t,e,n,r,i){return t[0]}function $P(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],t=t[3],l=new Im({range:[s,t]}),c=new Im({range:[o,a]}),u=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=YP(Math.atan2(t,e),o,a);return[c.invert(t),l.invert(n)]}}}function ZP(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function KP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return r8.apply(void 0,i8([[-1,-1]],e,!1))}function JP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return r8.apply(void 0,i8([[-1,1]],e,!1))}function QP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return r8.apply(void 0,i8([[1,-1]],e,!1))}function t8(t,e,n,r,i){var o,t=t[0],a=lt();return a=a,t=t,o=Math.sin(t),t=Math.cos(t),a[0]=t,a[1]=o,a[2]=0,a[3]=-o,a[4]=t,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a}function e8(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=(t[3]-s)/(+a/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Im({range:[s,s+.99*l]}),h=new Im({range:[o,a]}),f=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*f)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=YP(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,o,a),e=n-c*t;return[h.invert(t),u.invert(e)]}}}function n8(t,e,n,r,i){var s=t[0],l=t[1],o=t[2],t=t[3],c=new Im({range:[o,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Dm({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var o=t[i],a=r.map(i),o=c.map(o);e.push(a,o)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var r8=function(t,e,n,r,i){var o=t[0],t=t[1],a=lt();return o=[o,t],(t=a)[0]=o[0],t[1]=0,t[2]=0,t[3]=0,t[4]=o[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i8=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o8(t){return 1/Math.tan(t)}function a8(t,e,n,r,i){var o=o8(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*o,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*o,t]}}}function s8(t,e,n,r,i){var o=o8(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*o]},untransform:function(t){var e=t[0];return[e,t[1]-e*o]}}}function l8(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r,r=o?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function c8(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(o?-1:1))+e}function u8(t,e,n){return n?new Im({range:[0,1],domain:[0,e]}).map(t):t}function h8(t,e,n,r,i){var o=t[0],a=t[1],t=t[2],s=u8(o,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[l8(e,s,a,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[c8(e,s,a,0,1),t]}}}function f8(t,e,n,r,i){var o=t[0],a=t[1],t=t[2],s=u8(o,i,void 0!==t&&t);return{transform:function(t){return[t[0],l8(t[1],s,a,0,1)]},untransform:function(t){return[t[0],c8(t[1],s,a,0,1)]}}}function d8(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],t=t[4],c=u8(o,r,t=void 0!==t&&t),u=u8(a,i,t);return{transform:function(t){var e=t[0],t=t[1];return[l8(e,c,s,0,1),l8(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[c8(e,c,s,0,1),c8(t,u,l,0,1)]}}}function p8(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Im({range:[0,r]}),u=new Im({range:[0,i]}),h=t?o:c.map(o),f=t?a:u.map(a);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=l8(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=c8(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var y8=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},g8=(m8.prototype.update=function(t){this.options=F({},this.options,t),this.recoordinate()},m8.prototype.clone=function(){return new m8(this.options)},m8.prototype.getOptions=function(){return this.options},m8.prototype.clear=function(){this.update({transformations:[]})},m8.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},m8.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},m8.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:y8(y8([],n,!0),[y8([],t,!0)],!1)}),this},m8.prototype.map=function(t){return this.output(t)},m8.prototype.invert=function(t){return this.input(t)},m8.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},m8.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?y8([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],o=[],i=function(t,e){return o.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},a=0,s=e;a<s.length;a++){var l,c,u,h,f=s[a],d=f[0],f=f.slice(1),p=this.transformers[d];p&&(l=(h=this.options).x,c=h.y,u=h.width,h=h.height,p=p(y8([],f,!0),l,c,u,h),(f=p)instanceof Float32Array||f instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||If,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):If}.apply(void 0,o)},m8.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,s,l,c,u,h,f,d,p=lt();return e&&t.reverse(),t.forEach(function(t){return ct(p,p,t)}),e&&(e=t=p,(d=new st(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=(e=e[8])*o-a*l,f=d*c+n*(u=-e*i+a*s)+r*(h=l*i-o*s))&&(t[0]=c*(f=1/f),t[1]=(-e*n+r*l)*f,t[2]=(a*n-r*o)*f,t[3]=u*f,t[4]=(e*d-r*s)*f,t[5]=(-a*d+r*i)*f,t[6]=h*f,t[7]=(-l*d+n*s)*f,t[8]=(o*d-n*i)*f),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},m8);function m8(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:qP,translate:VP,custom:UP,matrix:XP,polar:$P,transpose:ZP,scale:r8,"shear.x":a8,"shear.y":s8,reflect:KP,"reflect.x":JP,"reflect.y":QP,rotate:t8,helix:e8,parallel:n8,fisheye:d8,"fisheye.x":h8,"fisheye.y":f8,"fisheye.circular":p8},this.update(t)}function v8(t){return void 0!==t.find(t=>"polar"===t.type)}function b8(t){return void 0!==t.find(t=>"helix"===t.type)}function x8(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function w8(t){return void 0!==t.find(t=>"theta"===t.type)}function k8(t){return void 0!==t.find(t=>"radial"===t.type)}function M8(t,e,n,r,i,o){var a,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:"string"==typeof i?"linear":2<(r||i||[]).length?A8(t):void 0===r?L8(e)?A8(t):N8(e)?"time":P8(t,i):L8([r])?A8(t):N8(e)?"time":P8(t,i)}(t,e,n);return"string"!=typeof l?n:(a=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:o}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[a,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const o of i)J0(o)&&(n=Math.min(n,+o),r=Math.max(r,+o));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[o||a,i||s];case"band":case"ordinal":case"point":return T8(e);case"quantile":return function(t){return T8(t).sort()}(e);case"sequential":var[a,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)J0(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[o||a,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=pm,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:w8(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=wf(e),i=GP["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:a,range:function(t,e,n,r,i,o,a){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=_8(n,r,i,o,a),[u,h]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||h];case"band":case"point":return[l||0,c||1];case"ordinal":return _8(n,r,i,o,a);case"sequential":return;default:return[]}}(l,t,e,n,a,i,o),guide:s,name:t,type:l}))}function E8(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(O8)?Pp(e):t.every(S8)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function O8(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function S8(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function _8(t,e,n,r,i){var[i]=sA("palette",i),{defaultCategory10:r,defaultCategory20:o}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:o),{palette:r,offset:o}=e;return function(t,n,r=t=>t){if(!t)return null;const e=wf(t),i=GP["scheme"+e],o=GP["interpolate"+e];if(!i&&!o)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>o(r(e/n.length)))}(r,n,o)||i({type:r||t})}function A8(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function P8(t,e){return"color"!==t||e?"linear":"sequential"}function T8(t){return Array.from(new Set(t.flat()))}function L8(t){return C8(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function N8(t){return C8(t,t=>t instanceof Date)}function C8(t,e){for(const n of t)if(n.some(e))return!0;return!1}function j8(t,e,n){var{encode:r={},scale:i={},transform:o=[]}=e,e=K(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:o})]}function F8(t,i,o){return Me(this,void 0,void 0,function*(){var t=o["library"],e=i["data"],[t]=sA("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=K(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>Me(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),$0)}([K(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Ab(n):[],Object.assign(Object.assign({},i),{data:n})]})}function R8(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,o,a={};for([i,o]of Object.entries(r))if(Array.isArray(o))for(let t=0;t<o.length;t++)a[""+i+(0===t?"":t)]=o[t];else a[i]=o;return[t,Object.assign(Object.assign({},e),{encode:a})]}function I8(t,e,n){const{encode:r,data:i}=e;var o;return r?(o=_b(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return J0(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:o})]):[t,e]}function D8(t,e,n){var r=e["encode"];return r?(r=_b(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function B8(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const o=function(t){const[n]=sA("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=_b(r,t=>o(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function z8(l,t,e){var n,r=t["encode"],i=K(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],o=K(t,["value"]);for(let e=0;e<i.length;e++){var a=i[e];if(Array.isArray(a))for(let t=0;t<a.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=a[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},o)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function W8(t,e,n){const{axis:r={},legend:i={}}=e,o=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var a="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return F(e,{scale:Object.assign(Object.assign({},Object.fromEntries(a.map(t=>[t,{guide:o(r,t)}]))),{color:{guide:o(i,"color")},size:{guide:o(i,"size")}})}),[t,e]}function H8(t,e,n){var r=e["animate"];return r||void 0===r||F(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function G8(s,l,c){return Me(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return Me(this,void 0,void 0,function*(){var t=c["library"],[t]=sA("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[j8,F8,R8,I8,D8,B8,z8,H8,W8,...e.map(t),...r.map(t),...n.map(t)];let i=[],o=s;for(const a of e)[i,o]=yield a(i,o,c);return[i,o]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],o=Rp(Object.entries(n).filter(([,t])=>J0(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var a=i.filter(t=>{const{name:e,required:n}=t;if(o.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return o.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:o=!1,key:a=l||t,type:r=r?"identity":s}=i,i=K(i,["independent","key","type"]);return{name:t,values:e,scaleKey:o?Symbol("independent"):a,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:a})]})}function Y8(t,e,n){var r,{component:e=[],coordinates:i=[],title:o,theme:a}=e,[,s]=sA("component",n),n=t.filter(({guide:t})=>null!==t),l=[...e];o&&(t=s("title")["props"],{defaultPosition:e,defaultOrder:t,defaultSize:r}=t,a=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(F({size:r},a,r="string"==typeof o?{text:o}:o)),l.push(Object.assign({type:"title",position:e,order:t,size:a},r)));for(const b of n){var c=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return x8(e)&&v8(e)||b8(e)||w8(e)?null:t.startsWith("x")?x8(e)?"axisY":"axisX":t.startsWith("y")?x8(e)?"axisX":"axisY":t.startsWith("position")&&!v8(e)?"axisY":null}(b,i);if(null!==c){var u=s(c)["props"],{defaultPosition:h,defaultSize:f,defaultOrder:d}=u,{guide:u,name:p,field:y}=b;for(const x of Array.isArray(u)?u:[u]){var g=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],x8(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&v8(i)&&!x8(i)||"axisY"===e&&v8(i)&&x8(i)||"axisY"===e&&w8(i)||"axisY"===e&&b8(i)||"axisY"===e&&k8(i))return"bottom"===r.position?"arcInner":"arc";if(v8(i)&&("axisX"===e||"axisY"===e))return"arcY";if(k8(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&v8(i)&&"center"===r.position)return"arcCenter"}return n}(p,c,h,x,i),{size:m=f,order:v=d}=x;l.push(Object.assign(Object.assign({title:y},x),{position:g,order:v,size:m,type:c,scale:b}))}}}return l}function V8(t,e,n,r){var[i]=sA("scale",r),[r]=sA("component",r),{scale:o,bbox:a}=t,t=K(t,["scale","bbox"]),i=o?i(o):null,{field:o,domain:s}=o||{},o={field:o,domain:s,bbox:a};return r(t)(i,o,e,n)}function q8(t,e){var t=function(t,e){var n=jp(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,o={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var a="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(l);if(void 0===o[a])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);o[a]=s}else o[a]=30}return o}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o}=t,{width:e,height:a,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:h=c,insetBottom:f=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:y=d,marginTop:g=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:a,insetLeft:u,insetTop:h,insetBottom:f,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:a-i-o-g-y,marginLeft:p,marginBottom:y,marginTop:g,marginRight:d,x:s,y:l})}function U8(t,e,n){var R=jp(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:I,marginLeft:i,marginTop:o,marginBottom:D,marginRight:B,innerHeight:a,innerWidth:s,height:z,width:W}=n,t=t+i,i=r+o,r=n+B,o=I+D,H={top:[t,0,s,i,0,!0,kp],right:[W-r,i,r,a,1,!1,kp],bottom:[t,z-o,s,o,0,!1,kp],left:[0,i,t,a,1,!0,kp],centerHorizontal:[t,i,s,a,-1,null,null],centerVertical:[t,i,s,a,-1,null,null],arc:[t,i,s,a,-1,null,null],arcY:[t,i,s,a,-1,null,null],arcInner:[t,i,s,a,-1,null,null],center:[t,i,s,a,-1,null,null],arcCenter:[t,i,s,a,-1,null,null]};for(const[F,t]of R.entries()){var l=H[F];if("centerHorizontal"===F)!function(e,t,n){const[r,i,,o]=n,a=new Array(e.length+1).fill(0),s=t.map(a),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:o}}}(t,e,l);else if("centerVertical"===F)!function(e,t,n){const[r,i,o]=n,a=new Array(e.length+1).fill(0),s=t.map(a),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:o,height:u}}}(t,e,l);else if("arc"===F){p=d=f=h=u=c=void 0;var c=t,u=l,[h,f,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:h,y:f,width:d,height:p}}else if("arcY"===F){M=k=w=x=b=m=g=v=u=y=void 0;var y=t,u=e,[g,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=X8(u),k=x-w*(v=v/2),M=(w-u)*v;for(let t=0;t<y.length;t++)y[t].bbox={x:b+g,y:k+m,width:0,height:M}}else if("arcInner"===F){T=P=A=_=v=S=O=w=x=E=void 0;var E=t,x=e,[O,S,,w]=w=l,[v,_]=x.getCenter(),[x]=X8(x),A=x*(w=w/2),P=v-A,T=_-A;for(let t=0;t<E.length;t++)E[t].bbox={x:O+P,y:S+T,width:2*A,height:2*A}}else if("arcCenter"===F){q=V=j=C=Y=G=N=_=L=void 0;var L=t,_=e,[N,G,Y,C]=N=l,[_]=X8(_),j=C/2*_/Math.sqrt(2),V=N+Y/2,q=G+C/2;for(let t=0;t<L.length;t++)L[t].bbox={x:V-j,y:q-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,o,a,s,l]=t,[c,u,h,f,d,p,y,g]=0===a?["y",r,"x",e,"height",o,"width",i]:["x",e,"y",r,"width",i,"height",o],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[h]:f,[d]:b,[y]:g},e+=b*(s?-1:1)}}(t,l)}}function X8(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function $8(P,T,L,N){return Me(this,void 0,void 0,function*(){const[n]=sA("composition",L);var[t]=sA("interaction",L);const e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(J0)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var o=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},a=[];const s=new Map;for(var l=new Map,c=[P],u=[];c.length;){var h=c.shift();if(i(h)){var f=l.get(h),[f,d]=f?Q8(f,h,L):yield K8(h,L),p=(s.set(f,h),a.push(f),d.flatMap(o));if(c.push(...p),p.every(i)){var y=yield Promise.all(p.map(t=>J8(t,L)));E8(f=(f=y).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),E8(f,"y");for(let t=0;t<p.length;t++){var g=p[t],m=y[t];l.set(g,m)}}}else{d="mark"===r(h)?h:yield oT(h,L),f=o(d);Array.isArray(f)?c.push(...f):"function"==typeof f&&u.push(f())}}var v=P["on"];aA(v,rA.BEFORE_PAINT);const b=new Map,x=[];T.selectAll(cT(B)).data(a,t=>t.key).join(t=>t.append("g").attr("className",B).attr("id",t=>t.key).call(Z8).each(function(t){tT(t,Q(this),x,L),b.set(t,this)}),t=>t.call(Z8).each(function(t){tT(t,Q(this),x,L)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,o,a){return r=>Me(this,void 0,void 0,function*(){var[t,e]=yield K8(r,o);tT(t,i,[],o);for(const n of e)$8(n,i,o,a);return{options:r,view:t}})}(Q(e),L,N)}));for(const S of w){const P=S["options"];for(const _ of function(t){var{interactions:t=[]}=t;return t}(P))t(_)(S,w)}const{width:k,height:M}=P;var E=[];for(const A of u){var O=new Promise(e=>Me(this,void 0,void 0,function*(){for(const t of A)yield $8(Object.assign({width:k,height:M},t),T,L,N);e()}));E.push(O)}N.animations=x,aA(v,rA.AFTER_PAINT);v=x.filter(J0).map(rT).map(t=>t.finished);return Promise.all([...v,...E])})}function Z8(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function K8(t,e){return Me(this,void 0,void 0,function*(){return Q8(yield J8(t,e),t,e)})}function J8(v,b){return Me(this,void 0,void 0,function*(){var[t]=sA("theme",b);const[i,o]=sA("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,a=t(iT(e)),s=new Map,l=[];for(const p of n){var c=yield oT(p,b);l.push(c)}for(const y of yield Promise.all(l.map(r=>Me(this,void 0,void 0,function*(){const{type:t=Z0("G2Mark type is required."),key:n}=r;var e=o(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,h=y["type"],h=o(h)["props"],h=yield G8(y,h,b);h&&([h,u]=h,s.set(h,u))}for(const g of jp(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var f=g.reduce((t,{scale:e})=>F(t,e),{}),d=g[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(J0)));const v=F({guide:{title:0===d.length?void 0:d},field:d[0]},f);d=g[0]["name"];const m=M8(d,g.flatMap(({values:t})=>t.map(t=>t.value)),v,r,a,b);g.forEach(t=>t.scale=m)}return s})}function Q8(t,e,n){var[r]=sA("mark",n);const[i]=sA("scale",n);var o,a,[s]=sA("theme",n),{key:l,frame:c=!1,theme:u,style:h={}}=e,s=s(iT(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=Y8(Array.from(u),e,n),f=q8(u,e),d=function(t,e,n){var[n]=sA("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:o,insetTop:a,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new g8(Object.assign(Object.assign({},t),{x:o+c,y:a+u,width:i-o-s,height:r-l-a,transformations:e.map(n).flat()}))}(f,e,n),e=c?F({mainlineWidth:1,mainStroke:"#000"},h):h,p=(U8(u,d,f),{}),y=[];for([o,a]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:k}=o;var{index:g,channels:m}=a,v=_b(Object.fromEntries(m.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(a){if(!a||!Array.isArray(a))return[$0,$0];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=a.filter(([t])=>"function"==typeof t);var e=a.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),o=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>o.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,v);const M=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:o,value:a}=c;n[o]=a.map(t=>l.map(t))}}return n}(m,v),[E,O,S]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var o=e[t],a=n[t];a.every(([t,e])=>J0(t)&&J0(e))&&(r.push(o),i.push(a))}return[r,i]}(r(o)(g,v,M,d));m=x||E.length;const _=w?w(O,m,f):[];g=E.map((t,e)=>{var n={points:O[e],transform:_[e],index:t,markKey:k};for(const[r,i]of Object.entries(M))n[r]=i[t],S&&(n["series"+wf(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),m=(a.data=g,a.index=E,null==b?void 0:b(g,v,f));y.push(...m||[])}return[{layout:f,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},y]}function tT(U,X,$,Z){Me(this,void 0,void 0,function*(){const{components:R,theme:n,layout:t,markState:e,coordinate:r,key:i,style:I}=U,{width:D,height:B}=t,z=K(t,["x","y","width","height"]),o=["view","plot","main","content"];var a,s,l,c=o.map((t,e)=>e);const u=o.map(t=>Q0(Object.assign({},n,I),t)),W=["a","margin","padding","inset"].map(t=>J(z,t)),h=t=>t.style("x",t=>g[t].x).style("y",t=>g[t].y).style("width",t=>g[t].width).style("height",t=>g[t].height).each(function(t){var e,n,r=Q(this),t=u[t];for([e,n]of Object.entries(t))r.style(e,n)});let f=0,d=0,p=D,y=B;const g=c.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return f+=t,d+=e,p-=t+r,y-=e+n,{x:f,y:d,width:p,height:y}}),m=(X.selectAll(cT(ot)).data(c.filter(t=>J0(u[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ot).style("zIndex",-2).call(h),t=>t.call(h),t=>t.remove()),X.selectAll(cT(rt)).data(R,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>V8(t,r,n,Z)),t=>t.each(function(t){var t=V8(t,r,n,Z)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:o,updateDuration:a=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:h,exitDuration:f=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=o,updateDuration:y=a,updateDelay:g=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=f,exitDelay:w=d,exitType:k=h}=M;void 0!==p&&!p||(e=Math.max(e,y+g),n=Math.min(n,g)),void 0!==k&&!k||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),v=X.selectAll(cT(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(aT).call(lT,Array.from(e.keys())),t=>t.call(lT,Array.from(e.keys())).call(t=>{if(!m)return aT(t);{const[l,c]=m;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:o,innerWidth:a,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:o,width:a,height:s}],{delay:l,duration:c,fill:"both"})})}})).transitions();$.push(...v.flat());for([a,s]of e.entries()){var H=s["data"];const{key:i,class:O}=a,S=function(l,t,e,n){const[c]=sA("shape",n),u=l["data"],{defaultShape:h,data:r}=t,f=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:y,style:g={}}=l;return(t,e)=>{var{shape:n=h}=g,{shape:n=n,points:r,seriesIndex:i,index:o}=t,t=K(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:y,defaultShape:h,index:e});const a=i?i.map(t=>u[t]):u[o],s=i||o;e=_b(g,t=>eT(t,a,s,u));return c(Object.assign(Object.assign({},e),{type:sT(l,n)}))(r,t,p,d,f)}}(a,s,U,Z),_=(b=a,l=s,nT("enter",b,l,U,Z)),A=(b=a,l=s,nT("update",b,l,U,Z)),P=(b=a,l=s,nT("exit",b,l,U,Z));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,O,"element");const v=X.select("#"+i).selectAll(cT(et)).selectFacetAll(b).data(H,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return _(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(o=n.parentNode.parentNode,s=r.parentNode,[o,a]=i(o),[i,s]=i(s),o=`translate(${o-i}, ${a-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+o).trimStart(),r.append(n));var n,r,i,o,a=S(t,e),s=A(t,[this],[a]);return null===s&&K0(this,a),s})}),t=>t.transition(function(t){return P(t,[this])}).remove(),t=>t.append(S).attr("className",et).transition(function(t){var e=this["__fromElements__"],t=A(t,e,[this]);return new xb(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new xb([],this.__toData__,this.parentNode).append(S).attr("className",et).nodes();return A(t,[this],e)}).remove()).transitions();$.push(...v.flat())}{var x=U,w=X,k=Z,M,E;const[T]=sA("labelTransform",k),{markState:G,labelTransform:L}=x,Y=w.select(cT(tt)).node(),N=new Map,C=new Map,V=Array.from(G.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=sA("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:h,coordinate:f}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=_b(K(t,["formatter"]),t=>eT(t,r,e,l)),{shape:o=c,text:a}=t,t=K(t,["shape","text"]),i="string"==typeof i?UM(i):i,i=Object.assign(Object.assign({},t),{text:i(a)});return s(Object.assign({type:"label."+o},t))(n,i,f,h,u)}}(t,e,x,k),o=w.select("#"+r).selectAll(cT(et)).nodes();return n.flatMap((e,n)=>{const r=K(e,["transform"]);return o.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:o,key:a,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:o}=(e.destroy(),r);return[i,o]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:a+"-"+r,bounds:l,index:s,points:o})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[o[e]],index:t,points:o}));return t?t(c):c}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),j=Q(Y).selectAll(cT(it)).data(V,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",it),t=>t.each(function(t){K0(this,N.get(t)(t))}),t=>t.remove()).nodes(),q=jp(j,t=>C.get(t.__data__)),F=x["coordinate"];for([M,E]of q){var{transform:M=[]}=M;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),$0)})(M.map(T))(E,F)}L&&L(j,F)}})}function eT(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function nT(a,t,e,n,r){var[,i]=sA("shape",r);const[s]=sA("animation",r);r=e.defaultShape;const{theme:o,coordinate:l}=n;e=`default${wf(a)}Animation`;const{[e]:c}=i(sT(t,r)).props,{[a]:u={}}=o,h=J(t.animate||{},a);return(t,e,n)=>{var{[a+"Type"]:t,[a+"Delay"]:r,[a+"Duration"]:i,[a+"Easing"]:o}=t,t=Object.assign({type:t||c},h);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:o},l,u),Array.isArray(t)?t:[t]):null}}function rT(t){return t.finished.then(()=>{t.cancel()}),t}function iT(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function oT(r,i){return Me(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=K(r,["data"]);return null==e?r:([,{data:e}]=yield F8(0,{data:e},t),Object.assign({data:e},n))})}function aT(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function sT(t,e){t=t.type;return t+"."+e}function lT(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(cT(f)).data(e,t=>t.key).join(t=>t.append("g").attr("className",f).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(cT(tt)).node()||t.append("g").attr("className",tt)}function cT(...t){return t.map(t=>"."+t).join("")}function uT(t){for(var t=F({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,o,a=r.shift(),{children:s=[]}=(void 0===a.key&&(o=e.get(a),i=n.get(a),o=null===o?"0":o.key+"-"+i,a.key=o),a);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,a),n.set(l,t),r.push(l)}}return t}function hT(t,e={},n){const{width:r=640,height:i=480,autoFit:o=!1,on:a}=t,s=uT(t),{canvas:l=(u=r,h=i,f=new Wh,f.registerPlugin(new Xh),new Ql({width:u,height:h,container:document.createElement("div"),renderer:f})),library:c=oA()}=e;var u,h,f;e.canvas=l,e.library=c,o&&!e.bindAutoFit&&([u,h={}]=[t,e],u.autoFit&&window.addEventListener("resize",dT(u,h)),e.bindAutoFit=!0),l.resize(r,i),aA(a,rA.BEFORE_RENDER);const d=Q(l.document.documentElement);return l.ready.then(()=>$8(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>aA(a,rA.AFTER_RENDER)),"string"==typeof(f=l.getConfig().container)?document.getElementById(f):f}function fT(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",dT(i,t)),(e=r)&&(n?delete e[n]:e={})}const dT=(i,o={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=o["canvas"],{width:r,height:n}=iy(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&hT(t,o)},a=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},a),n&&r.apply(t,e)};var r,a,s,l};function pT(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class yT{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return pT(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return pT(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function gT(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function mT(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function vT(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function bT(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?tf(e)?n.concat(e):n.push(e):r[t]=tf(e)?e:[e],this.attr(i,r))}}function xT(r){return t=>{for(const n of r){var e=n["type"];"value"===e?gT(t,n):"array"===e?mT(t,n):"object"===e?vT(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&bT(t,n)}return t}}function wT(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}a=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"}];let kT=class extends yT{constructor(){super({},"interval")}},MT=(kT=t([xT(a)],kT),class extends yT{constructor(){super({},"rect")}}),ET=(MT=t([xT(a)],MT),class extends yT{constructor(){super({},"point")}}),OT=(ET=t([xT(a)],ET),class extends yT{constructor(){super({},"area")}}),ST=(OT=t([xT(a)],OT),class extends yT{constructor(){super({},"line")}}),_T=(ST=t([xT(a)],ST),class extends yT{constructor(){super({},"cell")}}),AT=(_T=t([xT(a)],_T),class extends yT{constructor(){super({},"vector")}}),PT=(AT=t([xT(a)],AT),class extends yT{constructor(){super({},"link")}}),TT=(PT=t([xT(a)],PT),class extends yT{constructor(){super({},"polygon")}});TT=t([xT(a)],TT);Tl=t([xT(a)],class extends yT{constructor(){super({},"image")}});let LT=class extends yT{constructor(){super({},"text")}},NT=(LT=t([xT(a)],LT),class extends yT{constructor(){super({},"box")}}),CT=(NT=t([xT(a)],NT),class extends yT{constructor(){super({},"lineX")}}),jT=(CT=t([xT(a)],CT),class extends yT{constructor(){super({},"lineY")}}),FT=(jT=t([xT(a)],jT),class extends yT{constructor(){super({},"range")}}),RT=(FT=t([xT(a)],FT),class extends yT{constructor(){super({},"rangeX")}}),IT=(RT=t([xT(a)],RT),class extends yT{constructor(){super({},"rangeY")}}),DT=(IT=t([xT(a)],IT),class extends yT{constructor(){super({},"connector")}}),BT=(DT=t([xT(a)],DT),class extends yT{constructor(){super({},"shape")}}),zT=(BT=t([xT(a)],BT),class extends yT{constructor(){super({},"sankey")}}),WT=(zT=t([xT([...a,{name:"layout",type:"value"}])],zT),class extends yT{constructor(){super({},"treemap")}}),HT=(WT=t([xT([...a,{name:"layout",type:"value"}])],WT),class extends yT{constructor(){super({},"boxplot")}}),GT=(HT=t([xT(a)],HT),class extends yT{constructor(){super({},"pack")}}),YT=(GT=t([xT([...a,{name:"layout",type:"value"}])],GT),class extends yT{constructor(){super({},"forceGraph")}}),VT=(YT=t([xT([...a,{name:"layout",type:"value"}])],YT),class extends yT{constructor(){super({},"tree")}}),qT=(VT=t([xT([...a,{name:"layout",type:"value"}])],VT),class extends yT{constructor(){super({},"wordCloud")}});qT=t([xT([...a,{name:"layout",type:"object"}])],qT);Yo={interval:kT,rect:MT,point:ET,area:OT,line:ST,cell:_T,vector:AT,link:PT,polygon:TT,image:Tl,text:LT,box:NT,lineX:CT,lineY:jT,range:FT,rangeX:RT,rangeY:IT,connector:DT,sankey:zT,treemap:WT,boxplot:HT,shape:BT,pack:GT,forceGraph:YT,tree:VT,wordCloud:qT};let UT=class extends yT{constructor(){super({},"view")}},XT=(UT=t([xT([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...wT(Yo)])],UT),class extends yT{constructor(){super({},"spaceLayer")}}),$T=(XT=t([xT([{type:"value",name:"data"},...wT(Yo)])],XT),class extends yT{constructor(){super({},"spaceFlex")}}),ZT=($T=t([xT([{type:"value",name:"data"},...wT(Yo)])],$T),class extends yT{constructor(){super({},"facetRect")}}),KT=(ZT=t([xT([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...wT(Yo)])],ZT),class extends yT{constructor(){super({},"facetCircle")}}),JT=(KT=t([xT([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...wT(Yo)])],KT),class extends yT{constructor(){super({},"repeatMatrix")}}),QT=(JT=t([xT([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...wT(Yo)])],JT),class extends yT{constructor(){super({},"timingKeyframe")}}),tL=(QT=t([xT([...wT(Yo)])],QT),class extends yT{constructor(){super({},"geoView")}}),eL=(tL=t([xT([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...wT(Yo)])],tL),class extends yT{constructor(){super({},"geoPath")}});eL=t([xT([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...wT(Yo)])],eL);var nL={view:UT,spaceLayer:XT,spaceFlex:$T,facetRect:ZT,facetCircle:KT,repeatMatrix:JT,timingKeyframe:QT,geoView:tL,geoPath:eL};for(const oL of Object.values(nL))xT(wT(nL))(oL);const rL=oA();function iL(t){return Object.assign(Object.assign({},t.value),{type:t.type})}Uo=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...wT(Yo),...Object.entries(nL).map(([t,e])=>({type:"container",name:t,ctor:e}))];h.Chart=class extends yT{constructor(t={}){var e=t["container"];super(K(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:rL}}render(){this._context.canvas||({width:r=640,height:o=480,renderer:a,plugins:t,autoFit:e}=this.options(),{width:e,height:n}=iy(this._container,e,r,o),this.width(e),this.height(n),this._context.canvas=([e,n,r,i=new Wh,o=[]]=[document.createElement("div"),r,o,a,t],o.push(new Xh),o.forEach(t=>i.registerPlugin(t)),new Ql({container:e,width:n,height:r,renderer:i})));var t,e,n,r,i,o,a=hT(this.options(),this._context);return a.parentNode!==this._container&&this._container.append(a),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,iL(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var o=iL(s),{children:a=[]}=i;a.push(o),n.push(s),r.set(s,o),i.children=a}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];aA(n,rA.BEFORE_DESTROY),fT(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),aA(n,rA.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];aA(e,rA.BEFORE_CLEAR),fT(t,this._context),aA(e,rA.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=iy(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;aA(i,rA.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),aA(i,rA.AFTER_CHANGE_SIZE)}},h.Chart=t([xT(Uo)],h.Chart),h.AREA_CLASS_NAME=ot,h.COMPONENT_CLASS_NAME=rt,h.ELEMENT_CLASS_NAME=et,h.LABEL_CLASS_NAME=it,h.LABEL_LAYER_CLASS_NAME=tt,h.MAIN_LAYER_CLASS_NAME=f,h.PLOT_CLASS_NAME=nt,h.VIEW_CLASS_NAME=B,h.createLibrary=oA,h.destroy=fT,h.register=function(t,e){Object.assign(rL,{[t]:e})},h.render=hT,h.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:o}=t;var t=uT(t),{library:a=oA(),group:s=new La}=e;if(function(t){if(!Qh(t)){if($h(t))return!t.length;var e,n=Mf(t);if("Map"===n||"Set"===n)return!t.size;if(Of(t))return!Object.keys(t).length;for(e in t)if(Nf.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=Q(s);return e.group=s,e.library=a,aA(o,rA.BEFORE_RENDER),$8(Object.assign(Object.assign({},t),{width:r,height:i}),l,a,e).then(n).then(()=>aA(o,rA.AFTER_RENDER)),s},Object.defineProperty(h,"__esModule",{value:!0})});