@visactor/vchart-extension 2.0.0-alpha.0 → 2.0.0-alpha.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 (739) hide show
  1. package/build/index.js +14841 -4920
  2. package/build/index.min.js +2 -2
  3. package/cjs/charts/3d/arc-3d.d.ts +11 -0
  4. package/cjs/charts/3d/arc-3d.js +30 -0
  5. package/cjs/charts/3d/arc-3d.js.map +1 -0
  6. package/cjs/charts/3d/enum.d.ts +33 -0
  7. package/cjs/charts/3d/enum.js +28 -0
  8. package/cjs/charts/3d/enum.js.map +1 -0
  9. package/cjs/charts/3d/interface.d.ts +13 -0
  10. package/cjs/charts/3d/interface.js +6 -0
  11. package/cjs/charts/3d/interface.js.map +1 -0
  12. package/cjs/charts/3d/layout.d.ts +21 -0
  13. package/cjs/charts/3d/layout.js +97 -0
  14. package/cjs/charts/3d/layout.js.map +1 -0
  15. package/cjs/charts/3d/plugin.d.ts +12 -0
  16. package/cjs/charts/3d/plugin.js +35 -0
  17. package/cjs/charts/3d/plugin.js.map +1 -0
  18. package/cjs/charts/3d/pyramid-3d.d.ts +11 -0
  19. package/cjs/charts/3d/pyramid-3d.js +31 -0
  20. package/cjs/charts/3d/pyramid-3d.js.map +1 -0
  21. package/cjs/charts/3d/rect-3d.d.ts +13 -0
  22. package/cjs/charts/3d/rect-3d.js +36 -0
  23. package/cjs/charts/3d/rect-3d.js.map +1 -0
  24. package/cjs/charts/3d/util.d.ts +3 -0
  25. package/cjs/charts/3d/util.js +19 -0
  26. package/cjs/charts/3d/util.js.map +1 -0
  27. package/cjs/charts/axis-3d/band-axis.d.ts +46 -0
  28. package/cjs/charts/axis-3d/band-axis.js +27 -0
  29. package/cjs/charts/axis-3d/band-axis.js.map +1 -0
  30. package/cjs/charts/axis-3d/index.d.ts +1 -0
  31. package/cjs/charts/axis-3d/index.js +14 -0
  32. package/cjs/charts/axis-3d/index.js.map +1 -0
  33. package/cjs/charts/axis-3d/linear-axis.d.ts +42 -0
  34. package/cjs/charts/axis-3d/linear-axis.js +32 -0
  35. package/cjs/charts/axis-3d/linear-axis.js.map +1 -0
  36. package/cjs/charts/axis-3d/log-axis.d.ts +46 -0
  37. package/cjs/charts/axis-3d/log-axis.js +27 -0
  38. package/cjs/charts/axis-3d/log-axis.js.map +1 -0
  39. package/cjs/charts/axis-3d/symlog-axis.d.ts +46 -0
  40. package/cjs/charts/axis-3d/symlog-axis.js +27 -0
  41. package/cjs/charts/axis-3d/symlog-axis.js.map +1 -0
  42. package/cjs/charts/axis-3d/theme.d.ts +2 -0
  43. package/cjs/charts/axis-3d/theme.js +10 -0
  44. package/cjs/charts/axis-3d/theme.js.map +1 -0
  45. package/cjs/charts/axis-3d/time-axis.d.ts +45 -0
  46. package/cjs/charts/axis-3d/time-axis.js +26 -0
  47. package/cjs/charts/axis-3d/time-axis.js.map +1 -0
  48. package/cjs/charts/axis-3d/util.d.ts +2 -0
  49. package/cjs/charts/axis-3d/util.js +45 -0
  50. package/cjs/charts/axis-3d/util.js.map +1 -0
  51. package/cjs/charts/bar-3d/animation.d.ts +1 -0
  52. package/cjs/charts/bar-3d/animation.js +17 -0
  53. package/cjs/charts/bar-3d/animation.js.map +1 -0
  54. package/cjs/charts/bar-3d/chart-spec-transformer.d.ts +6 -0
  55. package/cjs/charts/bar-3d/chart-spec-transformer.js +19 -0
  56. package/cjs/charts/bar-3d/chart-spec-transformer.js.map +1 -0
  57. package/cjs/charts/bar-3d/chart.d.ts +13 -0
  58. package/cjs/charts/bar-3d/chart.js +25 -0
  59. package/cjs/charts/bar-3d/chart.js.map +1 -0
  60. package/cjs/charts/bar-3d/constant.d.ts +12 -0
  61. package/cjs/charts/bar-3d/constant.js +15 -0
  62. package/cjs/charts/bar-3d/constant.js.map +1 -0
  63. package/cjs/charts/bar-3d/index.d.ts +5 -0
  64. package/cjs/charts/bar-3d/index.js +23 -0
  65. package/cjs/charts/bar-3d/index.js.map +1 -0
  66. package/cjs/charts/bar-3d/interface.d.ts +13 -0
  67. package/cjs/charts/bar-3d/interface.js +6 -0
  68. package/cjs/charts/bar-3d/interface.js.map +1 -0
  69. package/cjs/charts/bar-3d/series-spec-transformer.d.ts +5 -0
  70. package/cjs/charts/bar-3d/series-spec-transformer.js +15 -0
  71. package/cjs/charts/bar-3d/series-spec-transformer.js.map +1 -0
  72. package/cjs/charts/bar-3d/series.d.ts +17 -0
  73. package/cjs/charts/bar-3d/series.js +28 -0
  74. package/cjs/charts/bar-3d/series.js.map +1 -0
  75. package/cjs/charts/bar-3d/theme.d.ts +2 -0
  76. package/cjs/charts/bar-3d/theme.js +19 -0
  77. package/cjs/charts/bar-3d/theme.js.map +1 -0
  78. package/cjs/charts/conversion-funnel/arrow-data-transform.js.map +1 -1
  79. package/cjs/charts/conversion-funnel/constants.d.ts +21 -0
  80. package/cjs/charts/conversion-funnel/constants.js +24 -0
  81. package/cjs/charts/conversion-funnel/constants.js.map +1 -0
  82. package/cjs/charts/conversion-funnel/conversion-funnel-transformer.d.ts +2 -3
  83. package/cjs/charts/conversion-funnel/conversion-funnel-transformer.js +7 -6
  84. package/cjs/charts/conversion-funnel/conversion-funnel-transformer.js.map +1 -1
  85. package/cjs/charts/conversion-funnel/conversion-funnel.d.ts +0 -21
  86. package/cjs/charts/conversion-funnel/conversion-funnel.js +2 -19
  87. package/cjs/charts/conversion-funnel/conversion-funnel.js.map +1 -1
  88. package/cjs/charts/conversion-funnel/index.js.map +1 -1
  89. package/cjs/charts/conversion-funnel/interface.js +1 -1
  90. package/cjs/charts/conversion-funnel/interface.js.map +1 -1
  91. package/cjs/charts/conversion-funnel/util.d.ts +1 -1
  92. package/cjs/charts/conversion-funnel/util.js +1 -1
  93. package/cjs/charts/conversion-funnel/util.js.map +1 -1
  94. package/cjs/charts/funnel-3d/chart.d.ts +12 -0
  95. package/cjs/charts/funnel-3d/chart.js +25 -0
  96. package/cjs/charts/funnel-3d/chart.js.map +1 -0
  97. package/cjs/charts/funnel-3d/constant.d.ts +80 -0
  98. package/cjs/charts/funnel-3d/constant.js +31 -0
  99. package/cjs/charts/funnel-3d/constant.js.map +1 -0
  100. package/cjs/charts/funnel-3d/index.d.ts +4 -0
  101. package/cjs/charts/funnel-3d/index.js +22 -0
  102. package/cjs/charts/funnel-3d/index.js.map +1 -0
  103. package/cjs/charts/funnel-3d/interface.d.ts +18 -0
  104. package/cjs/charts/funnel-3d/interface.js +6 -0
  105. package/cjs/charts/funnel-3d/interface.js.map +1 -0
  106. package/cjs/charts/funnel-3d/series-spec-transformer.d.ts +5 -0
  107. package/cjs/charts/funnel-3d/series-spec-transformer.js +16 -0
  108. package/cjs/charts/funnel-3d/series-spec-transformer.js.map +1 -0
  109. package/cjs/charts/funnel-3d/series.d.ts +99 -0
  110. package/cjs/charts/funnel-3d/series.js +83 -0
  111. package/cjs/charts/funnel-3d/series.js.map +1 -0
  112. package/cjs/charts/funnel-3d/theme.d.ts +1 -0
  113. package/cjs/charts/funnel-3d/theme.js +10 -0
  114. package/cjs/charts/funnel-3d/theme.js.map +1 -0
  115. package/cjs/charts/histogram-3d/chart.d.ts +12 -0
  116. package/cjs/charts/histogram-3d/chart.js +31 -0
  117. package/cjs/charts/histogram-3d/chart.js.map +1 -0
  118. package/cjs/charts/histogram-3d/index.d.ts +2 -0
  119. package/cjs/charts/histogram-3d/index.js +21 -0
  120. package/cjs/charts/histogram-3d/index.js.map +1 -0
  121. package/cjs/charts/histogram-3d/interface.d.ts +5 -0
  122. package/cjs/charts/histogram-3d/interface.js +6 -0
  123. package/cjs/charts/histogram-3d/interface.js.map +1 -0
  124. package/cjs/charts/image-cloud/image-cloud-transformer.d.ts +6 -0
  125. package/cjs/charts/image-cloud/image-cloud-transformer.js +19 -0
  126. package/cjs/charts/image-cloud/image-cloud-transformer.js.map +1 -0
  127. package/cjs/charts/image-cloud/image-cloud.d.ts +12 -0
  128. package/cjs/charts/image-cloud/image-cloud.js +24 -0
  129. package/cjs/charts/image-cloud/image-cloud.js.map +1 -0
  130. package/cjs/charts/image-cloud/index.d.ts +2 -0
  131. package/cjs/charts/image-cloud/index.js +21 -0
  132. package/cjs/charts/image-cloud/index.js.map +1 -0
  133. package/cjs/charts/image-cloud/interface.d.ts +6 -0
  134. package/cjs/charts/image-cloud/interface.js +6 -0
  135. package/cjs/charts/image-cloud/interface.js.map +1 -0
  136. package/cjs/charts/image-cloud/series/animation.d.ts +23 -0
  137. package/cjs/charts/image-cloud/series/animation.js +100 -0
  138. package/cjs/charts/image-cloud/series/animation.js.map +1 -0
  139. package/cjs/charts/image-cloud/series/constant.d.ts +76 -0
  140. package/cjs/charts/image-cloud/series/constant.js +25 -0
  141. package/cjs/charts/image-cloud/series/constant.js.map +1 -0
  142. package/cjs/charts/image-cloud/series/image-cloud.d.ts +137 -0
  143. package/cjs/charts/image-cloud/series/image-cloud.js +196 -0
  144. package/cjs/charts/image-cloud/series/image-cloud.js.map +1 -0
  145. package/cjs/charts/image-cloud/series/index.d.ts +2 -0
  146. package/cjs/charts/image-cloud/series/index.js +21 -0
  147. package/cjs/charts/image-cloud/series/index.js.map +1 -0
  148. package/cjs/charts/image-cloud/series/interface.d.ts +25 -0
  149. package/cjs/charts/image-cloud/series/interface.js +6 -0
  150. package/cjs/charts/image-cloud/series/interface.js.map +1 -0
  151. package/cjs/charts/image-cloud/series/tooltip-helper.d.ts +10 -0
  152. package/cjs/charts/image-cloud/series/tooltip-helper.js +30 -0
  153. package/cjs/charts/image-cloud/series/tooltip-helper.js.map +1 -0
  154. package/cjs/charts/pictogram/element-highlight-by-graphic-name.d.ts +12 -0
  155. package/cjs/charts/pictogram/element-highlight-by-graphic-name.js +53 -0
  156. package/cjs/charts/pictogram/element-highlight-by-graphic-name.js.map +1 -0
  157. package/cjs/charts/pictogram/element-select-by-graphic-name.d.ts +8 -0
  158. package/cjs/charts/pictogram/element-select-by-graphic-name.js +31 -0
  159. package/cjs/charts/pictogram/element-select-by-graphic-name.js.map +1 -0
  160. package/cjs/charts/pictogram/index.d.ts +5 -0
  161. package/cjs/charts/pictogram/index.js +23 -0
  162. package/cjs/charts/pictogram/index.js.map +1 -0
  163. package/cjs/charts/pictogram/interface.d.ts +6 -0
  164. package/cjs/charts/pictogram/interface.js +6 -0
  165. package/cjs/charts/pictogram/interface.js.map +1 -0
  166. package/cjs/charts/pictogram/pictogram-transformer.d.ts +8 -0
  167. package/cjs/charts/pictogram/pictogram-transformer.js +24 -0
  168. package/cjs/charts/pictogram/pictogram-transformer.js.map +1 -0
  169. package/cjs/charts/pictogram/pictogram.d.ts +12 -0
  170. package/cjs/charts/pictogram/pictogram.js +25 -0
  171. package/cjs/charts/pictogram/pictogram.js.map +1 -0
  172. package/cjs/charts/pictogram/series/constant.d.ts +73 -0
  173. package/cjs/charts/pictogram/series/constant.js +22 -0
  174. package/cjs/charts/pictogram/series/constant.js.map +1 -0
  175. package/cjs/charts/pictogram/series/interface.d.ts +13 -0
  176. package/cjs/charts/pictogram/series/interface.js +6 -0
  177. package/cjs/charts/pictogram/series/interface.js.map +1 -0
  178. package/cjs/charts/pictogram/series/pictogram-transformer.d.ts +4 -0
  179. package/cjs/charts/pictogram/series/pictogram-transformer.js +23 -0
  180. package/cjs/charts/pictogram/series/pictogram-transformer.js.map +1 -0
  181. package/cjs/charts/pictogram/series/pictogram.d.ts +129 -0
  182. package/cjs/charts/pictogram/series/pictogram.js +296 -0
  183. package/cjs/charts/pictogram/series/pictogram.js.map +1 -0
  184. package/cjs/charts/pictogram/series/svg-source.d.ts +7 -0
  185. package/cjs/charts/pictogram/series/svg-source.js +38 -0
  186. package/cjs/charts/pictogram/series/svg-source.js.map +1 -0
  187. package/cjs/charts/pictogram/series/tooltip-helper.d.ts +7 -0
  188. package/cjs/charts/pictogram/series/tooltip-helper.js +26 -0
  189. package/cjs/charts/pictogram/series/tooltip-helper.js.map +1 -0
  190. package/cjs/charts/pictogram/series/transform.d.ts +76 -0
  191. package/cjs/charts/pictogram/series/transform.js +150 -0
  192. package/cjs/charts/pictogram/series/transform.js.map +1 -0
  193. package/cjs/charts/pie-3d/animation.d.ts +1 -0
  194. package/cjs/charts/pie-3d/animation.js +17 -0
  195. package/cjs/charts/pie-3d/animation.js.map +1 -0
  196. package/cjs/charts/pie-3d/chart-spec-transformer.d.ts +6 -0
  197. package/cjs/charts/pie-3d/chart-spec-transformer.js +18 -0
  198. package/cjs/charts/pie-3d/chart-spec-transformer.js.map +1 -0
  199. package/cjs/charts/pie-3d/chart.d.ts +13 -0
  200. package/cjs/charts/pie-3d/chart.js +25 -0
  201. package/cjs/charts/pie-3d/chart.js.map +1 -0
  202. package/cjs/charts/pie-3d/constant.d.ts +70 -0
  203. package/cjs/charts/pie-3d/constant.js +19 -0
  204. package/cjs/charts/pie-3d/constant.js.map +1 -0
  205. package/cjs/charts/pie-3d/index.d.ts +5 -0
  206. package/cjs/charts/pie-3d/index.js +23 -0
  207. package/cjs/charts/pie-3d/index.js.map +1 -0
  208. package/cjs/charts/pie-3d/interface.d.ts +17 -0
  209. package/cjs/charts/pie-3d/interface.js +6 -0
  210. package/cjs/charts/pie-3d/interface.js.map +1 -0
  211. package/cjs/charts/pie-3d/series-spec-transformer.d.ts +5 -0
  212. package/cjs/charts/pie-3d/series-spec-transformer.js +16 -0
  213. package/cjs/charts/pie-3d/series-spec-transformer.js.map +1 -0
  214. package/cjs/charts/pie-3d/series.d.ts +88 -0
  215. package/cjs/charts/pie-3d/series.js +42 -0
  216. package/cjs/charts/pie-3d/series.js.map +1 -0
  217. package/cjs/charts/pie-3d/theme.d.ts +2 -0
  218. package/cjs/charts/pie-3d/theme.js +19 -0
  219. package/cjs/charts/pie-3d/theme.js.map +1 -0
  220. package/cjs/charts/range-column-3d/chart-spec-transformer.d.ts +5 -0
  221. package/cjs/charts/range-column-3d/chart-spec-transformer.js +19 -0
  222. package/cjs/charts/range-column-3d/chart-spec-transformer.js.map +1 -0
  223. package/cjs/charts/range-column-3d/chart.d.ts +13 -0
  224. package/cjs/charts/range-column-3d/chart.js +31 -0
  225. package/cjs/charts/range-column-3d/chart.js.map +1 -0
  226. package/cjs/charts/range-column-3d/constant.d.ts +19 -0
  227. package/cjs/charts/range-column-3d/constant.js +19 -0
  228. package/cjs/charts/range-column-3d/constant.js.map +1 -0
  229. package/cjs/charts/range-column-3d/index.d.ts +5 -0
  230. package/cjs/charts/range-column-3d/index.js +23 -0
  231. package/cjs/charts/range-column-3d/index.js.map +1 -0
  232. package/cjs/charts/range-column-3d/interface.d.ts +8 -0
  233. package/cjs/charts/range-column-3d/interface.js +6 -0
  234. package/cjs/charts/range-column-3d/interface.js.map +1 -0
  235. package/cjs/charts/range-column-3d/series-spec-transformer.d.ts +6 -0
  236. package/cjs/charts/range-column-3d/series-spec-transformer.js +17 -0
  237. package/cjs/charts/range-column-3d/series-spec-transformer.js.map +1 -0
  238. package/cjs/charts/range-column-3d/series.d.ts +30 -0
  239. package/cjs/charts/range-column-3d/series.js +27 -0
  240. package/cjs/charts/range-column-3d/series.js.map +1 -0
  241. package/cjs/charts/ranking-bar/interface.js +1 -1
  242. package/cjs/charts/ranking-bar/interface.js.map +1 -1
  243. package/cjs/charts/ranking-bar/ranking-bar-transformer.js +1 -1
  244. package/cjs/charts/ranking-bar/ranking-bar-transformer.js.map +1 -1
  245. package/cjs/charts/ranking-bar/ranking-bar.js +1 -1
  246. package/cjs/charts/ranking-bar/ranking-bar.js.map +1 -1
  247. package/cjs/charts/ranking-list/constant.d.ts +2 -0
  248. package/cjs/charts/ranking-list/constant.js +75 -0
  249. package/cjs/charts/ranking-list/constant.js.map +1 -0
  250. package/cjs/charts/ranking-list/interface.d.ts +74 -0
  251. package/cjs/charts/ranking-list/interface.js +6 -0
  252. package/cjs/charts/ranking-list/interface.js.map +1 -0
  253. package/cjs/charts/ranking-list/ranking-list-transformer.d.ts +460 -0
  254. package/cjs/charts/ranking-list/ranking-list-transformer.js +383 -0
  255. package/cjs/charts/ranking-list/ranking-list-transformer.js.map +1 -0
  256. package/cjs/charts/ranking-list/ranking-list.d.ts +16 -0
  257. package/cjs/charts/ranking-list/ranking-list.js +34 -0
  258. package/cjs/charts/ranking-list/ranking-list.js.map +1 -0
  259. package/cjs/charts/ranking-list/utils.d.ts +7 -0
  260. package/cjs/charts/ranking-list/utils.js +51 -0
  261. package/cjs/charts/ranking-list/utils.js.map +1 -0
  262. package/cjs/charts/sequence-scatter-kde/constant.d.ts +3 -0
  263. package/cjs/charts/sequence-scatter-kde/constant.js +7 -0
  264. package/cjs/charts/sequence-scatter-kde/constant.js.map +1 -0
  265. package/cjs/charts/sequence-scatter-kde/interface.d.ts +29 -0
  266. package/cjs/charts/sequence-scatter-kde/interface.js +6 -0
  267. package/cjs/charts/sequence-scatter-kde/interface.js.map +1 -0
  268. package/cjs/charts/sequence-scatter-kde/sequence-scatter-kde-transformer.d.ts +6 -0
  269. package/cjs/charts/sequence-scatter-kde/sequence-scatter-kde-transformer.js +142 -0
  270. package/cjs/charts/sequence-scatter-kde/sequence-scatter-kde-transformer.js.map +1 -0
  271. package/cjs/charts/sequence-scatter-kde/sequence-scatter-kde.d.ts +16 -0
  272. package/cjs/charts/sequence-scatter-kde/sequence-scatter-kde.js +34 -0
  273. package/cjs/charts/sequence-scatter-kde/sequence-scatter-kde.js.map +1 -0
  274. package/cjs/charts/sequence-scatter-kde/utils.d.ts +9 -0
  275. package/cjs/charts/sequence-scatter-kde/utils.js +42 -0
  276. package/cjs/charts/sequence-scatter-kde/utils.js.map +1 -0
  277. package/cjs/charts/sequence-scatter-link/interface.d.ts +59 -0
  278. package/cjs/charts/sequence-scatter-link/interface.js +6 -0
  279. package/cjs/charts/sequence-scatter-link/interface.js.map +1 -0
  280. package/cjs/charts/sequence-scatter-link/sequence-scatter-link-transformer.d.ts +6 -0
  281. package/cjs/charts/sequence-scatter-link/sequence-scatter-link-transformer.js +328 -0
  282. package/cjs/charts/sequence-scatter-link/sequence-scatter-link-transformer.js.map +1 -0
  283. package/cjs/charts/sequence-scatter-link/sequence-scatter-link.d.ts +16 -0
  284. package/cjs/charts/sequence-scatter-link/sequence-scatter-link.js +34 -0
  285. package/cjs/charts/sequence-scatter-link/sequence-scatter-link.js.map +1 -0
  286. package/cjs/charts/sequence-scatter-pixel/constant.d.ts +3 -0
  287. package/cjs/charts/sequence-scatter-pixel/constant.js +7 -0
  288. package/cjs/charts/sequence-scatter-pixel/constant.js.map +1 -0
  289. package/cjs/charts/sequence-scatter-pixel/interface.d.ts +29 -0
  290. package/cjs/charts/sequence-scatter-pixel/interface.js +6 -0
  291. package/cjs/charts/sequence-scatter-pixel/interface.js.map +1 -0
  292. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.d.ts +4 -0
  293. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.js +68 -0
  294. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.js.map +1 -0
  295. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel.d.ts +16 -0
  296. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel.js +34 -0
  297. package/cjs/charts/sequence-scatter-pixel/sequence-scatter-pixel.js.map +1 -0
  298. package/cjs/charts/sequence-scatter-pixel/utils.d.ts +3 -0
  299. package/cjs/charts/sequence-scatter-pixel/utils.js +54 -0
  300. package/cjs/charts/sequence-scatter-pixel/utils.js.map +1 -0
  301. package/cjs/charts/word-cloud-3d/animation.d.ts +4 -0
  302. package/cjs/charts/word-cloud-3d/animation.js +24 -0
  303. package/cjs/charts/word-cloud-3d/animation.js.map +1 -0
  304. package/cjs/charts/word-cloud-3d/chart-spec-transformer.d.ts +5 -0
  305. package/cjs/charts/word-cloud-3d/chart-spec-transformer.js +17 -0
  306. package/cjs/charts/word-cloud-3d/chart-spec-transformer.js.map +1 -0
  307. package/cjs/charts/word-cloud-3d/chart.d.ts +14 -0
  308. package/cjs/charts/word-cloud-3d/chart.js +31 -0
  309. package/cjs/charts/word-cloud-3d/chart.js.map +1 -0
  310. package/cjs/charts/word-cloud-3d/index.d.ts +4 -0
  311. package/cjs/charts/word-cloud-3d/index.js +22 -0
  312. package/cjs/charts/word-cloud-3d/index.js.map +1 -0
  313. package/cjs/charts/word-cloud-3d/interface.d.ts +22 -0
  314. package/cjs/charts/word-cloud-3d/interface.js +6 -0
  315. package/cjs/charts/word-cloud-3d/interface.js.map +1 -0
  316. package/cjs/charts/word-cloud-3d/series.d.ts +37 -0
  317. package/cjs/charts/word-cloud-3d/series.js +80 -0
  318. package/cjs/charts/word-cloud-3d/series.js.map +1 -0
  319. package/cjs/charts/word-cloud-3d/theme.d.ts +2 -0
  320. package/cjs/charts/word-cloud-3d/theme.js +14 -0
  321. package/cjs/charts/word-cloud-3d/theme.js.map +1 -0
  322. package/cjs/components/bar-link/bar-link.d.ts +1 -1
  323. package/cjs/components/bar-link/bar-link.js +5 -5
  324. package/cjs/components/bar-link/bar-link.js.map +1 -1
  325. package/cjs/components/bar-link/constant.js.map +1 -1
  326. package/cjs/components/bar-link/index.js +2 -1
  327. package/cjs/components/bar-link/index.js.map +1 -1
  328. package/cjs/components/bar-link/type.js.map +1 -1
  329. package/cjs/components/bar-link/util.d.ts +3 -4
  330. package/cjs/components/bar-link/util.js +10 -10
  331. package/cjs/components/bar-link/util.js.map +1 -1
  332. package/cjs/components/map-label/index.d.ts +2 -0
  333. package/cjs/components/map-label/index.js +21 -0
  334. package/cjs/components/map-label/index.js.map +1 -0
  335. package/cjs/components/map-label/layout.d.ts +23 -0
  336. package/cjs/components/map-label/layout.js +154 -0
  337. package/cjs/components/map-label/layout.js.map +1 -0
  338. package/cjs/components/map-label/map-label-transformer.d.ts +5 -0
  339. package/cjs/components/map-label/map-label-transformer.js +16 -0
  340. package/cjs/components/map-label/map-label-transformer.js.map +1 -0
  341. package/cjs/components/map-label/map-label.d.ts +53 -0
  342. package/cjs/components/map-label/map-label.js +266 -0
  343. package/cjs/components/map-label/map-label.js.map +1 -0
  344. package/cjs/components/map-label/theme.d.ts +2 -0
  345. package/cjs/components/map-label/theme.js +63 -0
  346. package/cjs/components/map-label/theme.js.map +1 -0
  347. package/cjs/components/map-label/type.d.ts +39 -0
  348. package/cjs/components/map-label/type.js +6 -0
  349. package/cjs/components/map-label/type.js.map +1 -0
  350. package/cjs/components/series-break/constant.js +1 -2
  351. package/cjs/components/series-break/constant.js.map +1 -1
  352. package/cjs/components/series-break/index.js.map +1 -1
  353. package/cjs/components/series-break/series-break.js.map +1 -1
  354. package/cjs/components/series-break/type.js.map +1 -1
  355. package/cjs/components/series-break/util.d.ts +2 -2
  356. package/cjs/components/series-break/util.js.map +1 -1
  357. package/cjs/components/series-label/constant.js.map +1 -1
  358. package/cjs/components/series-label/index.js.map +1 -1
  359. package/cjs/components/series-label/series-label.js +2 -2
  360. package/cjs/components/series-label/series-label.js.map +1 -1
  361. package/cjs/components/series-label/type.js.map +1 -1
  362. package/cjs/components/series-label/util.js +4 -4
  363. package/cjs/components/series-label/util.js.map +1 -1
  364. package/cjs/index.d.ts +13 -0
  365. package/cjs/index.js +19 -3
  366. package/cjs/index.js.map +1 -1
  367. package/cjs/type/index.js.map +1 -1
  368. package/cjs/type/type.js.map +1 -1
  369. package/cjs/utils/element.js.map +1 -1
  370. package/cjs/utils/math.js.map +1 -1
  371. package/esm/charts/3d/arc-3d.d.ts +11 -0
  372. package/esm/charts/3d/arc-3d.js +25 -0
  373. package/esm/charts/3d/arc-3d.js.map +1 -0
  374. package/esm/charts/3d/enum.d.ts +33 -0
  375. package/esm/charts/3d/enum.js +36 -0
  376. package/esm/charts/3d/enum.js.map +1 -0
  377. package/esm/charts/3d/interface.d.ts +13 -0
  378. package/esm/charts/3d/interface.js +2 -0
  379. package/esm/charts/3d/interface.js.map +1 -0
  380. package/esm/charts/3d/layout.d.ts +21 -0
  381. package/esm/charts/3d/layout.js +87 -0
  382. package/esm/charts/3d/layout.js.map +1 -0
  383. package/esm/charts/3d/plugin.d.ts +12 -0
  384. package/esm/charts/3d/plugin.js +31 -0
  385. package/esm/charts/3d/plugin.js.map +1 -0
  386. package/esm/charts/3d/pyramid-3d.d.ts +11 -0
  387. package/esm/charts/3d/pyramid-3d.js +26 -0
  388. package/esm/charts/3d/pyramid-3d.js.map +1 -0
  389. package/esm/charts/3d/rect-3d.d.ts +13 -0
  390. package/esm/charts/3d/rect-3d.js +32 -0
  391. package/esm/charts/3d/rect-3d.js.map +1 -0
  392. package/esm/charts/3d/util.d.ts +3 -0
  393. package/esm/charts/3d/util.js +10 -0
  394. package/esm/charts/3d/util.js.map +1 -0
  395. package/esm/charts/axis-3d/band-axis.d.ts +46 -0
  396. package/esm/charts/axis-3d/band-axis.js +25 -0
  397. package/esm/charts/axis-3d/band-axis.js.map +1 -0
  398. package/esm/charts/axis-3d/index.d.ts +1 -0
  399. package/esm/charts/axis-3d/index.js +19 -0
  400. package/esm/charts/axis-3d/index.js.map +1 -0
  401. package/esm/charts/axis-3d/linear-axis.d.ts +42 -0
  402. package/esm/charts/axis-3d/linear-axis.js +30 -0
  403. package/esm/charts/axis-3d/linear-axis.js.map +1 -0
  404. package/esm/charts/axis-3d/log-axis.d.ts +46 -0
  405. package/esm/charts/axis-3d/log-axis.js +25 -0
  406. package/esm/charts/axis-3d/log-axis.js.map +1 -0
  407. package/esm/charts/axis-3d/symlog-axis.d.ts +46 -0
  408. package/esm/charts/axis-3d/symlog-axis.js +25 -0
  409. package/esm/charts/axis-3d/symlog-axis.js.map +1 -0
  410. package/esm/charts/axis-3d/theme.d.ts +2 -0
  411. package/esm/charts/axis-3d/theme.js +6 -0
  412. package/esm/charts/axis-3d/theme.js.map +1 -0
  413. package/esm/charts/axis-3d/time-axis.d.ts +45 -0
  414. package/esm/charts/axis-3d/time-axis.js +24 -0
  415. package/esm/charts/axis-3d/time-axis.js.map +1 -0
  416. package/esm/charts/axis-3d/util.d.ts +2 -0
  417. package/esm/charts/axis-3d/util.js +39 -0
  418. package/esm/charts/axis-3d/util.js.map +1 -0
  419. package/esm/charts/bar-3d/animation.d.ts +1 -0
  420. package/esm/charts/bar-3d/animation.js +11 -0
  421. package/esm/charts/bar-3d/animation.js.map +1 -0
  422. package/esm/charts/bar-3d/chart-spec-transformer.d.ts +6 -0
  423. package/esm/charts/bar-3d/chart-spec-transformer.js +11 -0
  424. package/esm/charts/bar-3d/chart-spec-transformer.js.map +1 -0
  425. package/esm/charts/bar-3d/chart.d.ts +13 -0
  426. package/esm/charts/bar-3d/chart.js +25 -0
  427. package/esm/charts/bar-3d/chart.js.map +1 -0
  428. package/esm/charts/bar-3d/constant.d.ts +12 -0
  429. package/esm/charts/bar-3d/constant.js +11 -0
  430. package/esm/charts/bar-3d/constant.js.map +1 -0
  431. package/esm/charts/bar-3d/index.d.ts +5 -0
  432. package/esm/charts/bar-3d/index.js +10 -0
  433. package/esm/charts/bar-3d/index.js.map +1 -0
  434. package/esm/charts/bar-3d/interface.d.ts +13 -0
  435. package/esm/charts/bar-3d/interface.js +2 -0
  436. package/esm/charts/bar-3d/interface.js.map +1 -0
  437. package/esm/charts/bar-3d/series-spec-transformer.d.ts +5 -0
  438. package/esm/charts/bar-3d/series-spec-transformer.js +7 -0
  439. package/esm/charts/bar-3d/series-spec-transformer.js.map +1 -0
  440. package/esm/charts/bar-3d/series.d.ts +17 -0
  441. package/esm/charts/bar-3d/series.js +30 -0
  442. package/esm/charts/bar-3d/series.js.map +1 -0
  443. package/esm/charts/bar-3d/theme.d.ts +2 -0
  444. package/esm/charts/bar-3d/theme.js +15 -0
  445. package/esm/charts/bar-3d/theme.js.map +1 -0
  446. package/esm/charts/conversion-funnel/arrow-data-transform.js.map +1 -1
  447. package/esm/charts/conversion-funnel/constants.d.ts +21 -0
  448. package/esm/charts/conversion-funnel/constants.js +25 -0
  449. package/esm/charts/conversion-funnel/constants.js.map +1 -0
  450. package/esm/charts/conversion-funnel/conversion-funnel-transformer.d.ts +2 -3
  451. package/esm/charts/conversion-funnel/conversion-funnel-transformer.js +4 -3
  452. package/esm/charts/conversion-funnel/conversion-funnel-transformer.js.map +1 -1
  453. package/esm/charts/conversion-funnel/conversion-funnel.d.ts +0 -21
  454. package/esm/charts/conversion-funnel/conversion-funnel.js +0 -25
  455. package/esm/charts/conversion-funnel/conversion-funnel.js.map +1 -1
  456. package/esm/charts/conversion-funnel/index.js.map +1 -1
  457. package/esm/charts/conversion-funnel/interface.js +1 -1
  458. package/esm/charts/conversion-funnel/interface.js.map +1 -1
  459. package/esm/charts/conversion-funnel/util.d.ts +1 -1
  460. package/esm/charts/conversion-funnel/util.js +1 -1
  461. package/esm/charts/conversion-funnel/util.js.map +1 -1
  462. package/esm/charts/funnel-3d/chart.d.ts +12 -0
  463. package/esm/charts/funnel-3d/chart.js +25 -0
  464. package/esm/charts/funnel-3d/chart.js.map +1 -0
  465. package/esm/charts/funnel-3d/constant.d.ts +80 -0
  466. package/esm/charts/funnel-3d/constant.js +25 -0
  467. package/esm/charts/funnel-3d/constant.js.map +1 -0
  468. package/esm/charts/funnel-3d/index.d.ts +4 -0
  469. package/esm/charts/funnel-3d/index.js +8 -0
  470. package/esm/charts/funnel-3d/index.js.map +1 -0
  471. package/esm/charts/funnel-3d/interface.d.ts +18 -0
  472. package/esm/charts/funnel-3d/interface.js +2 -0
  473. package/esm/charts/funnel-3d/interface.js.map +1 -0
  474. package/esm/charts/funnel-3d/series-spec-transformer.d.ts +5 -0
  475. package/esm/charts/funnel-3d/series-spec-transformer.js +8 -0
  476. package/esm/charts/funnel-3d/series-spec-transformer.js.map +1 -0
  477. package/esm/charts/funnel-3d/series.d.ts +99 -0
  478. package/esm/charts/funnel-3d/series.js +84 -0
  479. package/esm/charts/funnel-3d/series.js.map +1 -0
  480. package/esm/charts/funnel-3d/theme.d.ts +1 -0
  481. package/esm/charts/funnel-3d/theme.js +4 -0
  482. package/esm/charts/funnel-3d/theme.js.map +1 -0
  483. package/esm/charts/histogram-3d/chart.d.ts +12 -0
  484. package/esm/charts/histogram-3d/chart.js +30 -0
  485. package/esm/charts/histogram-3d/chart.js.map +1 -0
  486. package/esm/charts/histogram-3d/index.d.ts +2 -0
  487. package/esm/charts/histogram-3d/index.js +4 -0
  488. package/esm/charts/histogram-3d/index.js.map +1 -0
  489. package/esm/charts/histogram-3d/interface.d.ts +5 -0
  490. package/esm/charts/histogram-3d/interface.js +2 -0
  491. package/esm/charts/histogram-3d/interface.js.map +1 -0
  492. package/esm/charts/image-cloud/image-cloud-transformer.d.ts +6 -0
  493. package/esm/charts/image-cloud/image-cloud-transformer.js +11 -0
  494. package/esm/charts/image-cloud/image-cloud-transformer.js.map +1 -0
  495. package/esm/charts/image-cloud/image-cloud.d.ts +12 -0
  496. package/esm/charts/image-cloud/image-cloud.js +22 -0
  497. package/esm/charts/image-cloud/image-cloud.js.map +1 -0
  498. package/esm/charts/image-cloud/index.d.ts +2 -0
  499. package/esm/charts/image-cloud/index.js +4 -0
  500. package/esm/charts/image-cloud/index.js.map +1 -0
  501. package/esm/charts/image-cloud/interface.d.ts +6 -0
  502. package/esm/charts/image-cloud/interface.js +2 -0
  503. package/esm/charts/image-cloud/interface.js.map +1 -0
  504. package/esm/charts/image-cloud/series/animation.d.ts +23 -0
  505. package/esm/charts/image-cloud/series/animation.js +94 -0
  506. package/esm/charts/image-cloud/series/animation.js.map +1 -0
  507. package/esm/charts/image-cloud/series/constant.d.ts +76 -0
  508. package/esm/charts/image-cloud/series/constant.js +23 -0
  509. package/esm/charts/image-cloud/series/constant.js.map +1 -0
  510. package/esm/charts/image-cloud/series/image-cloud.d.ts +137 -0
  511. package/esm/charts/image-cloud/series/image-cloud.js +198 -0
  512. package/esm/charts/image-cloud/series/image-cloud.js.map +1 -0
  513. package/esm/charts/image-cloud/series/index.d.ts +2 -0
  514. package/esm/charts/image-cloud/series/index.js +4 -0
  515. package/esm/charts/image-cloud/series/index.js.map +1 -0
  516. package/esm/charts/image-cloud/series/interface.d.ts +25 -0
  517. package/esm/charts/image-cloud/series/interface.js +2 -0
  518. package/esm/charts/image-cloud/series/interface.js.map +1 -0
  519. package/esm/charts/image-cloud/series/tooltip-helper.d.ts +10 -0
  520. package/esm/charts/image-cloud/series/tooltip-helper.js +22 -0
  521. package/esm/charts/image-cloud/series/tooltip-helper.js.map +1 -0
  522. package/esm/charts/pictogram/element-highlight-by-graphic-name.d.ts +12 -0
  523. package/esm/charts/pictogram/element-highlight-by-graphic-name.js +49 -0
  524. package/esm/charts/pictogram/element-highlight-by-graphic-name.js.map +1 -0
  525. package/esm/charts/pictogram/element-select-by-graphic-name.d.ts +8 -0
  526. package/esm/charts/pictogram/element-select-by-graphic-name.js +25 -0
  527. package/esm/charts/pictogram/element-select-by-graphic-name.js.map +1 -0
  528. package/esm/charts/pictogram/index.d.ts +5 -0
  529. package/esm/charts/pictogram/index.js +10 -0
  530. package/esm/charts/pictogram/index.js.map +1 -0
  531. package/esm/charts/pictogram/interface.d.ts +6 -0
  532. package/esm/charts/pictogram/interface.js +2 -0
  533. package/esm/charts/pictogram/interface.js.map +1 -0
  534. package/esm/charts/pictogram/pictogram-transformer.d.ts +8 -0
  535. package/esm/charts/pictogram/pictogram-transformer.js +18 -0
  536. package/esm/charts/pictogram/pictogram-transformer.js.map +1 -0
  537. package/esm/charts/pictogram/pictogram.d.ts +12 -0
  538. package/esm/charts/pictogram/pictogram.js +22 -0
  539. package/esm/charts/pictogram/pictogram.js.map +1 -0
  540. package/esm/charts/pictogram/series/constant.d.ts +73 -0
  541. package/esm/charts/pictogram/series/constant.js +23 -0
  542. package/esm/charts/pictogram/series/constant.js.map +1 -0
  543. package/esm/charts/pictogram/series/interface.d.ts +13 -0
  544. package/esm/charts/pictogram/series/interface.js +2 -0
  545. package/esm/charts/pictogram/series/interface.js.map +1 -0
  546. package/esm/charts/pictogram/series/pictogram-transformer.d.ts +4 -0
  547. package/esm/charts/pictogram/series/pictogram-transformer.js +19 -0
  548. package/esm/charts/pictogram/series/pictogram-transformer.js.map +1 -0
  549. package/esm/charts/pictogram/series/pictogram.d.ts +129 -0
  550. package/esm/charts/pictogram/series/pictogram.js +305 -0
  551. package/esm/charts/pictogram/series/pictogram.js.map +1 -0
  552. package/esm/charts/pictogram/series/svg-source.d.ts +7 -0
  553. package/esm/charts/pictogram/series/svg-source.js +33 -0
  554. package/esm/charts/pictogram/series/svg-source.js.map +1 -0
  555. package/esm/charts/pictogram/series/tooltip-helper.d.ts +7 -0
  556. package/esm/charts/pictogram/series/tooltip-helper.js +18 -0
  557. package/esm/charts/pictogram/series/tooltip-helper.js.map +1 -0
  558. package/esm/charts/pictogram/series/transform.d.ts +76 -0
  559. package/esm/charts/pictogram/series/transform.js +144 -0
  560. package/esm/charts/pictogram/series/transform.js.map +1 -0
  561. package/esm/charts/pie-3d/animation.d.ts +1 -0
  562. package/esm/charts/pie-3d/animation.js +11 -0
  563. package/esm/charts/pie-3d/animation.js.map +1 -0
  564. package/esm/charts/pie-3d/chart-spec-transformer.d.ts +6 -0
  565. package/esm/charts/pie-3d/chart-spec-transformer.js +10 -0
  566. package/esm/charts/pie-3d/chart-spec-transformer.js.map +1 -0
  567. package/esm/charts/pie-3d/chart.d.ts +13 -0
  568. package/esm/charts/pie-3d/chart.js +26 -0
  569. package/esm/charts/pie-3d/chart.js.map +1 -0
  570. package/esm/charts/pie-3d/constant.d.ts +70 -0
  571. package/esm/charts/pie-3d/constant.js +13 -0
  572. package/esm/charts/pie-3d/constant.js.map +1 -0
  573. package/esm/charts/pie-3d/index.d.ts +5 -0
  574. package/esm/charts/pie-3d/index.js +10 -0
  575. package/esm/charts/pie-3d/index.js.map +1 -0
  576. package/esm/charts/pie-3d/interface.d.ts +17 -0
  577. package/esm/charts/pie-3d/interface.js +2 -0
  578. package/esm/charts/pie-3d/interface.js.map +1 -0
  579. package/esm/charts/pie-3d/series-spec-transformer.d.ts +5 -0
  580. package/esm/charts/pie-3d/series-spec-transformer.js +8 -0
  581. package/esm/charts/pie-3d/series-spec-transformer.js.map +1 -0
  582. package/esm/charts/pie-3d/series.d.ts +88 -0
  583. package/esm/charts/pie-3d/series.js +45 -0
  584. package/esm/charts/pie-3d/series.js.map +1 -0
  585. package/esm/charts/pie-3d/theme.d.ts +2 -0
  586. package/esm/charts/pie-3d/theme.js +15 -0
  587. package/esm/charts/pie-3d/theme.js.map +1 -0
  588. package/esm/charts/range-column-3d/chart-spec-transformer.d.ts +5 -0
  589. package/esm/charts/range-column-3d/chart-spec-transformer.js +11 -0
  590. package/esm/charts/range-column-3d/chart-spec-transformer.js.map +1 -0
  591. package/esm/charts/range-column-3d/chart.d.ts +13 -0
  592. package/esm/charts/range-column-3d/chart.js +32 -0
  593. package/esm/charts/range-column-3d/chart.js.map +1 -0
  594. package/esm/charts/range-column-3d/constant.d.ts +19 -0
  595. package/esm/charts/range-column-3d/constant.js +13 -0
  596. package/esm/charts/range-column-3d/constant.js.map +1 -0
  597. package/esm/charts/range-column-3d/index.d.ts +5 -0
  598. package/esm/charts/range-column-3d/index.js +10 -0
  599. package/esm/charts/range-column-3d/index.js.map +1 -0
  600. package/esm/charts/range-column-3d/interface.d.ts +8 -0
  601. package/esm/charts/range-column-3d/interface.js +2 -0
  602. package/esm/charts/range-column-3d/interface.js.map +1 -0
  603. package/esm/charts/range-column-3d/series-spec-transformer.d.ts +6 -0
  604. package/esm/charts/range-column-3d/series-spec-transformer.js +9 -0
  605. package/esm/charts/range-column-3d/series-spec-transformer.js.map +1 -0
  606. package/esm/charts/range-column-3d/series.d.ts +30 -0
  607. package/esm/charts/range-column-3d/series.js +24 -0
  608. package/esm/charts/range-column-3d/series.js.map +1 -0
  609. package/esm/charts/ranking-bar/interface.js +1 -1
  610. package/esm/charts/ranking-bar/interface.js.map +1 -1
  611. package/esm/charts/ranking-bar/ranking-bar-transformer.js +1 -1
  612. package/esm/charts/ranking-bar/ranking-bar-transformer.js.map +1 -1
  613. package/esm/charts/ranking-bar/ranking-bar.js +1 -1
  614. package/esm/charts/ranking-bar/ranking-bar.js.map +1 -1
  615. package/esm/charts/ranking-list/constant.d.ts +2 -0
  616. package/esm/charts/ranking-list/constant.js +69 -0
  617. package/esm/charts/ranking-list/constant.js.map +1 -0
  618. package/esm/charts/ranking-list/interface.d.ts +74 -0
  619. package/esm/charts/ranking-list/interface.js +2 -0
  620. package/esm/charts/ranking-list/interface.js.map +1 -0
  621. package/esm/charts/ranking-list/ranking-list-transformer.d.ts +460 -0
  622. package/esm/charts/ranking-list/ranking-list-transformer.js +383 -0
  623. package/esm/charts/ranking-list/ranking-list-transformer.js.map +1 -0
  624. package/esm/charts/ranking-list/ranking-list.d.ts +16 -0
  625. package/esm/charts/ranking-list/ranking-list.js +27 -0
  626. package/esm/charts/ranking-list/ranking-list.js.map +1 -0
  627. package/esm/charts/ranking-list/utils.d.ts +7 -0
  628. package/esm/charts/ranking-list/utils.js +41 -0
  629. package/esm/charts/ranking-list/utils.js.map +1 -0
  630. package/esm/charts/sequence-scatter-kde/constant.d.ts +3 -0
  631. package/esm/charts/sequence-scatter-kde/constant.js +6 -0
  632. package/esm/charts/sequence-scatter-kde/constant.js.map +1 -0
  633. package/esm/charts/sequence-scatter-kde/interface.d.ts +29 -0
  634. package/esm/charts/sequence-scatter-kde/interface.js +2 -0
  635. package/esm/charts/sequence-scatter-kde/interface.js.map +1 -0
  636. package/esm/charts/sequence-scatter-kde/sequence-scatter-kde-transformer.d.ts +6 -0
  637. package/esm/charts/sequence-scatter-kde/sequence-scatter-kde-transformer.js +137 -0
  638. package/esm/charts/sequence-scatter-kde/sequence-scatter-kde-transformer.js.map +1 -0
  639. package/esm/charts/sequence-scatter-kde/sequence-scatter-kde.d.ts +16 -0
  640. package/esm/charts/sequence-scatter-kde/sequence-scatter-kde.js +28 -0
  641. package/esm/charts/sequence-scatter-kde/sequence-scatter-kde.js.map +1 -0
  642. package/esm/charts/sequence-scatter-kde/utils.d.ts +9 -0
  643. package/esm/charts/sequence-scatter-kde/utils.js +34 -0
  644. package/esm/charts/sequence-scatter-kde/utils.js.map +1 -0
  645. package/esm/charts/sequence-scatter-link/interface.d.ts +59 -0
  646. package/esm/charts/sequence-scatter-link/interface.js +2 -0
  647. package/esm/charts/sequence-scatter-link/interface.js.map +1 -0
  648. package/esm/charts/sequence-scatter-link/sequence-scatter-link-transformer.d.ts +6 -0
  649. package/esm/charts/sequence-scatter-link/sequence-scatter-link-transformer.js +321 -0
  650. package/esm/charts/sequence-scatter-link/sequence-scatter-link-transformer.js.map +1 -0
  651. package/esm/charts/sequence-scatter-link/sequence-scatter-link.d.ts +16 -0
  652. package/esm/charts/sequence-scatter-link/sequence-scatter-link.js +28 -0
  653. package/esm/charts/sequence-scatter-link/sequence-scatter-link.js.map +1 -0
  654. package/esm/charts/sequence-scatter-pixel/constant.d.ts +3 -0
  655. package/esm/charts/sequence-scatter-pixel/constant.js +6 -0
  656. package/esm/charts/sequence-scatter-pixel/constant.js.map +1 -0
  657. package/esm/charts/sequence-scatter-pixel/interface.d.ts +29 -0
  658. package/esm/charts/sequence-scatter-pixel/interface.js +2 -0
  659. package/esm/charts/sequence-scatter-pixel/interface.js.map +1 -0
  660. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.d.ts +4 -0
  661. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.js +64 -0
  662. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel-transformer.js.map +1 -0
  663. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel.d.ts +16 -0
  664. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel.js +28 -0
  665. package/esm/charts/sequence-scatter-pixel/sequence-scatter-pixel.js.map +1 -0
  666. package/esm/charts/sequence-scatter-pixel/utils.d.ts +3 -0
  667. package/esm/charts/sequence-scatter-pixel/utils.js +46 -0
  668. package/esm/charts/sequence-scatter-pixel/utils.js.map +1 -0
  669. package/esm/charts/word-cloud-3d/animation.d.ts +4 -0
  670. package/esm/charts/word-cloud-3d/animation.js +18 -0
  671. package/esm/charts/word-cloud-3d/animation.js.map +1 -0
  672. package/esm/charts/word-cloud-3d/chart-spec-transformer.d.ts +5 -0
  673. package/esm/charts/word-cloud-3d/chart-spec-transformer.js +9 -0
  674. package/esm/charts/word-cloud-3d/chart-spec-transformer.js.map +1 -0
  675. package/esm/charts/word-cloud-3d/chart.d.ts +14 -0
  676. package/esm/charts/word-cloud-3d/chart.js +29 -0
  677. package/esm/charts/word-cloud-3d/chart.js.map +1 -0
  678. package/esm/charts/word-cloud-3d/index.d.ts +4 -0
  679. package/esm/charts/word-cloud-3d/index.js +8 -0
  680. package/esm/charts/word-cloud-3d/index.js.map +1 -0
  681. package/esm/charts/word-cloud-3d/interface.d.ts +22 -0
  682. package/esm/charts/word-cloud-3d/interface.js +2 -0
  683. package/esm/charts/word-cloud-3d/interface.js.map +1 -0
  684. package/esm/charts/word-cloud-3d/series.d.ts +37 -0
  685. package/esm/charts/word-cloud-3d/series.js +74 -0
  686. package/esm/charts/word-cloud-3d/series.js.map +1 -0
  687. package/esm/charts/word-cloud-3d/theme.d.ts +2 -0
  688. package/esm/charts/word-cloud-3d/theme.js +10 -0
  689. package/esm/charts/word-cloud-3d/theme.js.map +1 -0
  690. package/esm/components/bar-link/bar-link.d.ts +1 -1
  691. package/esm/components/bar-link/bar-link.js +1 -1
  692. package/esm/components/bar-link/bar-link.js.map +1 -1
  693. package/esm/components/bar-link/constant.js.map +1 -1
  694. package/esm/components/bar-link/index.js +2 -1
  695. package/esm/components/bar-link/index.js.map +1 -1
  696. package/esm/components/bar-link/type.js.map +1 -1
  697. package/esm/components/bar-link/util.d.ts +3 -4
  698. package/esm/components/bar-link/util.js +10 -11
  699. package/esm/components/bar-link/util.js.map +1 -1
  700. package/esm/components/map-label/index.d.ts +2 -0
  701. package/esm/components/map-label/index.js +4 -0
  702. package/esm/components/map-label/index.js.map +1 -0
  703. package/esm/components/map-label/layout.d.ts +23 -0
  704. package/esm/components/map-label/layout.js +143 -0
  705. package/esm/components/map-label/layout.js.map +1 -0
  706. package/esm/components/map-label/map-label-transformer.d.ts +5 -0
  707. package/esm/components/map-label/map-label-transformer.js +10 -0
  708. package/esm/components/map-label/map-label-transformer.js.map +1 -0
  709. package/esm/components/map-label/map-label.d.ts +53 -0
  710. package/esm/components/map-label/map-label.js +265 -0
  711. package/esm/components/map-label/map-label.js.map +1 -0
  712. package/esm/components/map-label/theme.d.ts +2 -0
  713. package/esm/components/map-label/theme.js +57 -0
  714. package/esm/components/map-label/theme.js.map +1 -0
  715. package/esm/components/map-label/type.d.ts +39 -0
  716. package/esm/components/map-label/type.js +2 -0
  717. package/esm/components/map-label/type.js.map +1 -0
  718. package/esm/components/series-break/constant.js +1 -2
  719. package/esm/components/series-break/constant.js.map +1 -1
  720. package/esm/components/series-break/index.js.map +1 -1
  721. package/esm/components/series-break/series-break.js.map +1 -1
  722. package/esm/components/series-break/type.js.map +1 -1
  723. package/esm/components/series-break/util.d.ts +2 -2
  724. package/esm/components/series-break/util.js.map +1 -1
  725. package/esm/components/series-label/constant.js.map +1 -1
  726. package/esm/components/series-label/index.js.map +1 -1
  727. package/esm/components/series-label/series-label.js +1 -1
  728. package/esm/components/series-label/series-label.js.map +1 -1
  729. package/esm/components/series-label/type.js.map +1 -1
  730. package/esm/components/series-label/util.js +4 -4
  731. package/esm/components/series-label/util.js.map +1 -1
  732. package/esm/index.d.ts +13 -0
  733. package/esm/index.js +27 -1
  734. package/esm/index.js.map +1 -1
  735. package/esm/type/index.js.map +1 -1
  736. package/esm/type/type.js.map +1 -1
  737. package/esm/utils/element.js.map +1 -1
  738. package/esm/utils/math.js.map +1 -1
  739. package/package.json +10 -9
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@visactor/vchart"),require("@visactor/vutils")):"function"==typeof define&&define.amd?define(["exports","@visactor/vchart","@visactor/vutils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).VChartExtension={},t.VChart,t.VUtils)}(this,(function(t,e,i){"use strict";class s extends e.BaseChartSpecTransformer{transformSpec(t){const{timeData:e,timeNodes:s}=function(t){const{xField:e,yField:s,timeField:n,data:r,topN:a=10,icon:o}=t,l=new Set,h=new Map;return r.sort(((t,i)=>Number(i[e])-Number(t[e]))),r.forEach((t=>{const e=t[n];i.isValid(e)&&l.add(e),h.has(e)||h.set(e,[]);const r=h.get(e);if(r.length<a){const e=Object.assign({},t);o&&o[e[s]]&&(e.icon=o[e[s]]),r.push(e)}})),{timeData:h,timeNodes:Array.from(l).sort()}}(t),{interval:a,xField:o,yField:l,color:h,icon:c,iconPosition:d,iconShape:u,timeLabel:p,label:f,nameLabel:g,xAxis:m,yAxis:y}=t,b=a||1e3,x=Math.min(b,500);if(t.type="common",t.data=[{id:"timeData",values:e.get(s[0])},{id:"time",values:[{time:s[0]}]}],t.color={specified:Object.assign({},h)},t.region=[{clip:!0}],t.series=[{type:"bar",id:"ranking-bar",dataId:"timeData",direction:"horizontal",yField:l,xField:o,seriesField:l,extensionMark:[],label:n(f,Object.assign(Object.assign({},g),{yField:l}))}],t.axes=function(t={},e={}){const i={orient:"left",type:"band",inverse:!0,label:{style:e.label},domainLine:{style:e.domainLine},grid:{style:e.grid}},s={orient:"bottom",type:"linear",nice:!1,animation:!0,label:{style:t.label},domainLine:{style:t.domainLine},grid:{style:t.grid},innerOffset:{right:"10%"}};t.label&&(s.label=t.label);return[i,s]}(m,y),t.player={type:"continuous",auto:!0,loop:!1,interval:b,specs:s.map((t=>({data:[{id:"timeData",values:e.get(t)},{id:"time",values:[{time:t}]}]})))},t.tooltip={visible:!1},t.customMark=[],function(t,{interval:e,exchangeDuration:i}){t.animationAppear=!1,t.animationUpdate={bar:[{type:"update",options:{excludeChannels:["y"]},easing:"linear",duration:e},{channel:["y"],easing:"circInOut",duration:i}],axis:{duration:e,easing:"linear"}},t.animationEnter={bar:[{type:"moveIn",duration:i,easing:"cubicInOut",options:{direction:"y",orient:"negative",point:(t,e,i)=>({y:i.groupHeight+e.getBounds().height()})}}]},t.animationExit={bar:[{type:"moveOut",duration:i,easing:"cubicInOut",options:{direction:"y",orient:"negative"}}]}}(t,{interval:b,exchangeDuration:x}),p&&!1===p.visible||t.customMark.push(function(t={}){return{type:"text",dataId:"time",style:Object.assign({textBaseline:"bottom",fontSize:200,textAlign:"end",fontWeight:600,text:t=>t.time,x:(t,e)=>{var i;return(null===(i=e.vchart.getChart().getCanvasRect())||void 0===i?void 0:i.width)-50},y:(t,e)=>{var i;return(null===(i=e.vchart.getChart().getCanvasRect())||void 0===i?void 0:i.height)-80},fill:"grey",fillOpacity:.5},t)}}(p.style)),c){const e=function(t="bar-end",e="circle",{interval:i,exchangeDuration:s}){return{type:"symbol",dataId:"timeData",style:{symbolType:e,stroke:"white",lineWidth:1,size:(t,e)=>{var i,s;const n=e.vchart,r=null===(i=n.getChart())||void 0===i?void 0:i.getSeriesInIndex(0)[0];if(n&&r){const t=null!==(s=r.getYAxisHelper().getBandwidth(0))&&void 0!==s?s:0;return Math.max(t-4,0)}return 10},background:t=>t.icon,x:(e,i)=>{var s,n;const r=i.vchart,a=null===(s=r.getChart())||void 0===s?void 0:s.getSeriesInIndex(0)[0];if(r&&a){const i=null!==(n=a.getYAxisHelper().getBandwidth(0))&&void 0!==n?n:0;return"bar-start"===t?i/2:"axis"===t?-i/2:a.dataToPositionX(e)-i/2}},y:(t,e)=>{var i,s;const n=e.vchart,r=null===(i=n.getChart())||void 0===i?void 0:i.getSeriesInIndex(0)[0];if(n&&r){const e=null!==(s=r.getYAxisHelper().getBandwidth(0))&&void 0!==s?s:0;return r.dataToPositionY(t)+e/2}},scaleY:"rect"===e?1.2:1},animationUpdate:r(i,s),animationEnter:[{type:"moveIn",duration:s,easing:"cubicInOut",options:{direction:"y",orient:"negative",point:(t,e,i)=>({y:i.groupHeight+e.getBounds().height()})}}],animationExit:[{type:"moveOut",duration:s,easing:"cubicInOut",options:{direction:"y",orient:"negative"}}]}}(d,u,{interval:b,exchangeDuration:x});t.series[0].extensionMark.push(e)}super.transformSpec(t)}}function n(t={},e){var i,s,n,r;const a=[];return!1!==t.visible&&a.push({visible:!0,overlap:!1,style:Object.assign({fill:"rgb(64, 64, 64)"},t.style),smartInvert:{fillStrategy:(null===(i=t.style)||void 0===i?void 0:i.fill)?"null":void 0,strokeStrategy:(null===(s=t.style)||void 0===s?void 0:s.stroke)?"null":void 0}}),e.visible&&a.push({visible:!0,overlap:!1,style:Object.assign({},e.style),smartInvert:{fillStrategy:(null===(n=e.style)||void 0===n?void 0:n.fill)?"null":void 0,strokeStrategy:(null===(r=e.style)||void 0===r?void 0:r.stroke)?"null":void 0},position:"bar-end"===e.position?"inside-right":"inside-left",formatter:`{${e.yField}}`}),a}function r(t,e){return[{duration:e,easing:"cubicInOut",channel:["y"]},{options:{excludeChannels:["y"]},channel:["x","x2","x1"],easing:"linear",duration:t}]}class a extends e.BaseChart{constructor(){super(...arguments),this.type="rankingBar",this.transformerConstructor=s}init(){this.isValid()&&super.init()}isValid(){var t,e,i,s;const{xField:n,yField:r,timeField:a,data:o}=this._spec;return n&&r&&a?!!o||(null===(s=(i=this._option).onError)||void 0===s||s.call(i,"Data is required"),!1):(null===(e=(t=this._option).onError)||void 0===e||e.call(t,"Missing Required Config: `xField`, `yField`, `timeField` "),!1)}}a.type="rankingBar",a.view="singleDefault",a.transformerConstructor=s;const o=(t,e)=>{var i,s;if(!(null==e?void 0:e.fields))return t;if(0===t.length)return t;const n=e.fields,r=t[0],a={},o=[];for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const l=n[e];if(!l.type){let s=r;e in r||(s=null!==(i=t.find((t=>e in t)))&&void 0!==i?i:r),l.type="number"==typeof s[e]?"linear":"ordinal"}let h;if("number"==typeof l.sortIndex&&(h={key:e,type:l.type,index:l.sortIndex,sortIndex:{},sortIndexCount:0,sortReverse:!0===l.sortReverse},o.push(h)),(null===(s=l.domain)||void 0===s?void 0:s.length)>0)if("ordinal"===l.type){l._domainCache={},a[e]=l;const t={};l.domain.forEach(((e,i)=>{t[e]=i,l._domainCache[e]=i})),h&&(h.sortIndex=t,h.sortIndexCount=l.domain.length)}else l.domain.length>=2&&(a[e]=l)}return Object.keys(a).length>0&&(t=t.filter((t=>{for(const e in a){const i=a[e];if("ordinal"===i.type){if(!(t[e]in i._domainCache))return!1}else if(i.domain[0]>t[e]||i.domain[1]<t[e])return!1}return!0}))),o.sort(((t,e)=>t.index-e.index)),t.sort(((t,e)=>function(t,e,i){for(let s=0;s<i.length;s++){const n=i[s];let r=0;if("ordinal"===n.type?(void 0===n.sortIndex[e[n.key]]&&(n.sortIndex[e[n.key]]=n.sortIndexCount++),void 0===n.sortIndex[t[n.key]]&&(n.sortIndex[t[n.key]]=n.sortIndexCount++),r=n.sortIndex[t[n.key]]-n.sortIndex[e[n.key]]):"linear"===n.type&&(r=t[n.key]-e[n.key]),n.sortReverse&&(r=-r),0!==r)return r}return 0}(t,e,o))),t};let l=0;const h="_data-view-diff-rank";class c{constructor(t,e){var s=this;let n;this.dataSet=t,this.options=e,this.isDataView=!0,this.target=new i.EventEmitter,this.parseOption=null,this.transformsArr=[],this.isRunning=!1,this.rawData={},this.history=!1,this.parserData={},this.latestData={},this._fields=null,this.reRunAllTransform=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pushHistory:!0,emitMessage:!0};return s.isRunning=!0,s.resetTransformData(),s.transformsArr.forEach((e=>{s.executeTransform(e,{pushHistory:t.pushHistory,emitMessage:!1}),s.isLastTransform(e)&&s.diffLastData()})),s.isRunning=!1,!1!==t.emitMessage&&s.target.emit("change",[]),s},this.markRunning=()=>{this.isRunning=!0,this.target.emit("markRunning",[])},n=(null==e?void 0:e.name)?e.name:function(){return l>1e8&&(l=0),(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"dataset")+"_"+l++}("dataview"),this.name=n,(null==e?void 0:e.history)&&(this.history=e.history,this.historyData=[]),this.dataSet.setDataView(n,this),this.setFields(null==e?void 0:e.fields)}parse(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var s;this.isRunning=!0,i&&this.target.emit("beforeParse",[]),e&&(this.parseOption=e);const n=this.cloneParseData(t,e);if(null==e?void 0:e.type){const t=(null!==(s=this.dataSet.getParser(e.type))&&void 0!==s?s:this.dataSet.getParser("bytejson"))(n,e.options,this);this.rawData=n,this.parserData=t,this.history&&this.historyData.push(n,t),this.latestData=t}else this.parserData=n,this.rawData=n,this.history&&this.historyData.push(n),this.latestData=n;return this.isRunning=!1,i&&this.target.emit("afterParse",[]),this}transform(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.isRunning=!0,t&&t.type){let i=!0;if("fields"===t.type){this._fields=t.options.fields;const e=this.transformsArr.findIndex((e=>e.type===t.type));e>=0&&(i=!1,this.transformsArr[e].options.fields=this._fields)}if(i&&this.transformsArr.push(t),e){const e=this.isLastTransform(t);this.executeTransform(t),e&&this.diffLastData()}}return this.sortTransform(),this.isRunning=!1,this}isLastTransform(t){return this.transformsArr[this.transformsArr.length-1]===t}sortTransform(){this.transformsArr.length>=2&&this.transformsArr.sort(((t,e)=>{var i,s;return(null!==(i=t.level)&&void 0!==i?i:0)-(null!==(s=e.level)&&void 0!==s?s:0)}))}executeTransform(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{pushHistory:!0,emitMessage:!0};const{pushHistory:i,emitMessage:s}=e,n=this.dataSet.getTransform(t.type)(this.latestData,t.options);this.history&&!1!==i&&this.historyData.push(n),this.latestData=n,!1!==s&&this.target.emit("change",[])}resetTransformData(){this.latestData=this.parserData,this.history&&(this.historyData.length=0,this.historyData.push(this.rawData,this.parserData))}enableDiff(t){this._diffData=!0,this._diffKeys=t,this._diffMap=new Map,this._diffRank=0}disableDiff(){this._diffData=!1,this._diffMap=null,this._diffRank=null}resetDiff(){this._diffMap=new Map,this._diffRank=0}diffLastData(){var t;if(!this._diffData)return;if(!this.latestData.forEach)return;if(!(null===(t=this._diffKeys)||void 0===t?void 0:t.length))return;const e=this._diffRank+1;if(0===this._diffRank)this.latestData.forEach((t=>{t[h]=e,this._diffMap.set(this._diffKeys.reduce(((e,i)=>e+t[i]),""),t)})),this.latestDataAUD={add:Array.from(this.latestData),del:[],update:[]};else{let t;this.latestDataAUD={add:[],del:[],update:[]},this.latestData.forEach((i=>{i[h]=e,t=this._diffKeys.reduce(((t,e)=>t+i[e]),""),this._diffMap.get(t)?this.latestDataAUD.update.push(i):this.latestDataAUD.add.push(i),this._diffMap.set(t,i)})),this._diffMap.forEach(((t,i)=>{t[h]<e&&(this.latestDataAUD.del.push(t),this._diffMap.delete(i))}))}this._diffRank=e}cloneParseData(t,e){let s=!1;return t instanceof c||!0!==(null==e?void 0:e.clone)||(s=!0),s?i.cloneDeep(t):t}parseNewData(t,e){this.parse(t,e||this.parseOption),this.reRunAllTransform()}updateRawData(t,e){const i=this.cloneParseData(t,e);this.rawData=i,this.parserData=i,this.latestData=i,this.reRunAllTransform()}getFields(){var t;return this._fields?this._fields:"dataview"===(null===(t=this.parseOption)||void 0===t?void 0:t.type)&&1===this.rawData.length&&this.rawData[0].getFields?this.rawData[0].getFields():null}setFields(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._fields=t&&e?i.merge({},this._fields,t):t;const s=this.transformsArr.find((t=>"fields"===t.type));!i.isNil(this._fields)&&i.isNil(s)?(this.dataSet.registerTransform("fields",o),this.transform({type:"fields",options:{fields:this._fields}},!1)):s&&(s.options.fields=this._fields)}destroy(){this.dataSet.removeDataView(this.name),this._diffMap=null,this._diffRank=null,this.latestData=null,this.rawData=null,this.parserData=null,this.transformsArr=null,this.target=null}}
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@visactor/vchart"),require("@visactor/vutils")):"function"==typeof define&&define.amd?define(["exports","@visactor/vchart","@visactor/vutils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).VChartExtension={},t.VChart,t.VUtils)}(this,(function(t,e,i){"use strict";class s extends e.BaseChartSpecTransformer{transformSpec(t){const{timeData:e,timeNodes:s}=function(t){const{xField:e,yField:s,timeField:n,data:r,topN:a=10,icon:o}=t,l=new Set,h=new Map;return r.sort(((t,i)=>Number(i[e])-Number(t[e]))),r.forEach((t=>{const e=t[n];i.isValid(e)&&l.add(e),h.has(e)||h.set(e,[]);const r=h.get(e);if(r.length<a){const e=Object.assign({},t);o&&o[e[s]]&&(e.icon=o[e[s]]),r.push(e)}})),{timeData:h,timeNodes:Array.from(l).sort()}}(t),{interval:a,xField:o,yField:l,color:h,icon:c,iconPosition:d,iconShape:u,timeLabel:p,label:g,nameLabel:f,xAxis:m,yAxis:y}=t,b=a||1e3,v=Math.min(b,500);if(t.type="common",t.data=[{id:"timeData",values:e.get(s[0])},{id:"time",values:[{time:s[0]}]}],t.color={specified:Object.assign({},h)},t.region=[{clip:!0}],t.series=[{type:"bar",id:"ranking-bar",dataId:"timeData",direction:"horizontal",yField:l,xField:o,seriesField:l,extensionMark:[],label:n(g,Object.assign(Object.assign({},f),{yField:l}))}],t.axes=function(t={},e={}){const i={orient:"left",type:"band",inverse:!0,label:{style:e.label},domainLine:{style:e.domainLine},grid:{style:e.grid}},s={orient:"bottom",type:"linear",nice:!1,animation:!0,label:{style:t.label},domainLine:{style:t.domainLine},grid:{style:t.grid},innerOffset:{right:"10%"}};t.label&&(s.label=t.label);return[i,s]}(m,y),t.player={type:"continuous",auto:!0,loop:!1,interval:b,specs:s.map((t=>({data:[{id:"timeData",values:e.get(t)},{id:"time",values:[{time:t}]}]})))},t.tooltip={visible:!1},t.customMark=[],function(t,{interval:e,exchangeDuration:i}){t.animationAppear=!1,t.animationUpdate={bar:[{type:"update",options:{excludeChannels:["y"]},easing:"linear",duration:e},{channel:["y"],easing:"circInOut",duration:i}],axis:{duration:e,easing:"linear"}},t.animationEnter={bar:[{type:"moveIn",duration:i,easing:"cubicInOut",options:{direction:"y",orient:"negative",point:(t,e,i)=>({y:i.groupHeight+e.getBounds().height()})}}]},t.animationExit={bar:[{type:"moveOut",duration:i,easing:"cubicInOut",options:{direction:"y",orient:"negative"}}]}}(t,{interval:b,exchangeDuration:v}),p&&!1===p.visible||t.customMark.push(function(t={}){return{type:"text",dataId:"time",style:Object.assign({textBaseline:"bottom",fontSize:200,textAlign:"end",fontWeight:600,text:t=>t.time,x:(t,e)=>{var i;return(null===(i=e.vchart.getChart().getCanvasRect())||void 0===i?void 0:i.width)-50},y:(t,e)=>{var i;return(null===(i=e.vchart.getChart().getCanvasRect())||void 0===i?void 0:i.height)-80},fill:"grey",fillOpacity:.5},t)}}(p.style)),c){const e=function(t="bar-end",e="circle",{interval:i,exchangeDuration:s}){return{type:"symbol",dataId:"timeData",style:{symbolType:e,stroke:"white",lineWidth:1,size:(t,e)=>{var i,s;const n=e.vchart,r=null===(i=n.getChart())||void 0===i?void 0:i.getSeriesInIndex(0)[0];if(n&&r){const t=null!==(s=r.getYAxisHelper().getBandwidth(0))&&void 0!==s?s:0;return Math.max(t-4,0)}return 10},background:t=>t.icon,x:(e,i)=>{var s,n;const r=i.vchart,a=null===(s=r.getChart())||void 0===s?void 0:s.getSeriesInIndex(0)[0];if(r&&a){const i=null!==(n=a.getYAxisHelper().getBandwidth(0))&&void 0!==n?n:0;return"bar-start"===t?i/2:"axis"===t?-i/2:a.dataToPositionX(e)-i/2}},y:(t,e)=>{var i,s;const n=e.vchart,r=null===(i=n.getChart())||void 0===i?void 0:i.getSeriesInIndex(0)[0];if(n&&r){const e=null!==(s=r.getYAxisHelper().getBandwidth(0))&&void 0!==s?s:0;return r.dataToPositionY(t)+e/2}},scaleY:"rect"===e?1.2:1},animationUpdate:r(i,s),animationEnter:[{type:"moveIn",duration:s,easing:"cubicInOut",options:{direction:"y",orient:"negative",point:(t,e,i)=>({y:i.groupHeight+e.getBounds().height()})}}],animationExit:[{type:"moveOut",duration:s,easing:"cubicInOut",options:{direction:"y",orient:"negative"}}]}}(d,u,{interval:b,exchangeDuration:v});t.series[0].extensionMark.push(e)}super.transformSpec(t)}}function n(t={},e){var i,s,n,r;const a=[];return!1!==t.visible&&a.push({visible:!0,overlap:!1,style:Object.assign({fill:"rgb(64, 64, 64)"},t.style),smartInvert:{fillStrategy:(null===(i=t.style)||void 0===i?void 0:i.fill)?"null":void 0,strokeStrategy:(null===(s=t.style)||void 0===s?void 0:s.stroke)?"null":void 0}}),e.visible&&a.push({visible:!0,overlap:!1,style:Object.assign({},e.style),smartInvert:{fillStrategy:(null===(n=e.style)||void 0===n?void 0:n.fill)?"null":void 0,strokeStrategy:(null===(r=e.style)||void 0===r?void 0:r.stroke)?"null":void 0},position:"bar-end"===e.position?"inside-right":"inside-left",formatter:`{${e.yField}}`}),a}function r(t,e){return[{duration:e,easing:"cubicInOut",channel:["y"]},{options:{excludeChannels:["y"]},channel:["x","x2","x1"],easing:"linear",duration:t}]}class a extends e.BaseChart{constructor(){super(...arguments),this.type="rankingBar",this.transformerConstructor=s}init(){this.isValid()&&super.init()}isValid(){var t,e,i,s;const{xField:n,yField:r,timeField:a,data:o}=this._spec;return n&&r&&a?!!o||(null===(s=(i=this._option).onError)||void 0===s||s.call(i,"Data is required"),!1):(null===(e=(t=this._option).onError)||void 0===e||e.call(t,"Missing Required Config: `xField`, `yField`, `timeField` "),!1)}}a.type="rankingBar",a.view="singleDefault",a.transformerConstructor=s;const o=1e3,l="#21252c",h={labelLayout:"top",bar:{style:{cornerRadius:5}},barBackground:{type:"rect",style:{fill:"rgba(33,37,44,0.1)",cornerRadius:5}},rankingIcon:{visible:!0,style:{fill:l,size:20}},nameLabel:{visible:!0,style:{fontSize:20,fontWeight:"normal",fill:l,textBaseline:"middle"}},orderLabel:{visible:!0,style:{fontSize:20,fontWeight:"normal",fill:l,textBaseline:"middle"}},valueLabel:{visible:!0,style:{fontSize:20,fontWeight:"normal",fill:l,textBaseline:"middle"}},pageSize:5,scrollSize:1,animationAppear:{enable:!0,type:"grow",duration:o,easing:"linear"},animationUpdate:{enable:!0,type:"grow",duration:o,easing:"linear"},animationNormal:{interval:o}},c="dataKey",d="VCHART_ORDER",u="SUPPLY_DATA_KEY";class p extends e.CommonChartSpecTransformer{constructor(){super(...arguments),this.formatMap={},this.paginateDataArr=t=>{const{scrollSize:e=1,pageSize:i=5}=t,s=this.originalData,n={};let r=0;for(let a=0;a<s.length;a+=e)if(r++,n[`page${r}`]=s.slice(a,a+i),a+i-1>=s.length-1){s.push(...Array.from({length:a+i-s.length},(e=>({[t.yField]:100*Math.random(),[t.xField]:null,[u]:!0}))));break}return{orderCount:r,result:n}},this.processRankingData=t=>{const e=[];t.data.forEach(((t,e)=>t[d]=e+1<10?`0${e+1}`:e+1));const i=this.paginateDataArr(t).result,s=this.paginateDataArr(t).orderCount;this.orderCount=s;const n=t.pageSize-i[`page${s}`].length;return i[`page${s}`].push(...Array.from({length:n},(e=>({[t.yField]:100*Math.random(),[t.xField]:null,[u]:!0})))),Object.keys(i).forEach((s=>{e.push({data:[{id:"datas",values:i[s].map((e=>Object.assign(Object.assign({},e),{[c]:e[t.yField]})))},{id:"order",values:[{order:s}]}]})})),e}}isSpecValid(t){const{xField:e,yField:i,data:s}=t;return!!(e&&i&&s&&0!==s.length)}transformSpec(t){var e;super.transformSpec(t),this.isSpecValid(t)?(this.normalizeSpec(t),this.upgradeTextMeasure(t),this.upgradeFormatMap(t),this.processData(t),this.transformBaseSpec(t),this.transformAnimationSpec(t),this.transformAxesSpec(t),t.extensionMark=[this.generateBarBackground(t),...this.generateDecorateHaloIcons(t),this.generateRankingIcon(t),this.generateNameLabel(t),this.generateOrderLabel(t),this.generateValueLabel(t)],this.transformPaddingSpec(t),null===(e=t.customTransformSpec)||void 0===e||e.call(t,t),super.transformSpec(t)):t.series=[]}normalizeSpec(t){(function t(e,i){for(const s in i)"__proto__"!==s&&"constructor"!==s&&"prototype"!==s&&"object"==typeof i[s]&&null!==i[s]?(e.hasOwnProperty(s)||(e[s]=Array.isArray(i[s])?[]:{}),t(e[s],i[s])):e.hasOwnProperty(s)||"object"!=typeof e||(e[s]=i[s]);return e})(t,h),((t,e)=>{e.forEach((e=>{var s,n,r,a,o,l,h;i.isArray(t[e])?null===(s=t[e])||void 0===s||s.forEach(((i,s)=>{var n,r,a;t[e][s]=Object.assign(Object.assign({},i),{style:Object.assign(Object.assign({},null==i?void 0:i.style),{visible:null===(a=null!==(r=null===(n=null==i?void 0:i.style)||void 0===n?void 0:n.visible)&&void 0!==r?r:null==i?void 0:i.visible)||void 0===a||a})})})):t[e]=Object.assign(Object.assign({},t[e]),{style:Object.assign(Object.assign({},null===(n=t[e])||void 0===n?void 0:n.style),{visible:null===(h=null!==(o=null===(a=null===(r=t[e])||void 0===r?void 0:r.style)||void 0===a?void 0:a.visible)&&void 0!==o?o:null===(l=t[e])||void 0===l?void 0:l.visible)||void 0===h||h})})}))})(t,["barBackground","rankingIcon","decorateHaloIcons","orderLabel","nameLabel","valueLabel"])}upgradeTextMeasure(t){var e,s,n,r,a,o,l,h,c;null===(e=this.nameLabelTextMeasure)||void 0===e||e.release(),null===(s=this.valueLabelTextMeasure)||void 0===s||s.release(),null===(n=this.orderLabelTextMeasure)||void 0===n||n.release(),this.nameLabelTextMeasure=new i.TextMeasure({defaultFontParams:null!==(a=null===(r=t.nameLabel)||void 0===r?void 0:r.style)&&void 0!==a?a:{}}),this.valueLabelTextMeasure=new i.TextMeasure({defaultFontParams:null!==(l=null===(o=t.valueLabel)||void 0===o?void 0:o.style)&&void 0!==l?l:{}}),this.orderLabelTextMeasure=new i.TextMeasure({defaultFontParams:null!==(c=null===(h=t.orderLabel)||void 0===h?void 0:h.style)&&void 0!==c?c:{}})}upgradeFormatMap(t){this.formatMap[t.yField]=t.nameLabel.formatMethod,this.formatMap[t.xField]=t.valueLabel.formatMethod,this.formatMap[d]=t.orderLabel.formatMethod}processData(t){var e;(null===(e=t.data[0])||void 0===e?void 0:e.values)||(this.originalData=t.data,this.originalSpec=i.cloneDeep(t),this.dataSpecs=this.processRankingData(t),t.data=this.dataSpecs[0].data)}transformBaseSpec(t){var e,i,s;t.type="common",t.dataKey=c,t.series=[{type:"bar",direction:"horizontal",xField:t.xField,yField:t.yField,barWidth:null!==(i=null===(e=t.bar)||void 0===e?void 0:e.height)&&void 0!==i?i:10,bar:Object.assign(Object.assign({},t.bar),{style:Object.assign(Object.assign({},null===(s=t.bar)||void 0===s?void 0:s.style),{x1:0,visible:e=>{var i,s;return!e[u]&&(null===(s=null===(i=t.bar)||void 0===i?void 0:i.style)||void 0===s||s)}})})}]}transformAnimationSpec(t){var e,i,s;t.animationUpdate.enable&&this.orderCount>1&&(t.player=Object.assign({specs:this.dataSpecs,auto:!0,visible:!1,interval:(null!==(i=null===(e=t.animationNormal)||void 0===e?void 0:e.interval)&&void 0!==i?i:1e3)+(null!==(s=t.animationUpdate.duration)&&void 0!==s?s:1e3)/2,loop:!0},t.player),t.animationExit=this.getAnimationExit(this.originalSpec),t.animationEnter=this.getAnimationEnter(this.originalSpec),t.animationUpdate=this.getAnimationUpdate(this.originalSpec)),t.animationNormal=this.originalSpec.animationNormal,t.animationAppear=this.getAnimationAppear(this.originalSpec,"rect")}transformAxesSpec(t){const{min:e,max:i}=((t,e)=>{let i,s;const n=t.map((t=>t[e])).filter((t=>null!=t));if(0===n.length)i=0,s=1;else{i=Math.min(...n)-(Math.max(...n)-Math.min(...n))/3,s=(Math.max(...n)-i)/.8+i;const t=10,e=i;i===s&&(i=e-t,s=(4*e+t)/4)}return{min:i,max:s}})(this.originalData,t.xField);t.axes=[{orient:"left",type:"band",visible:!1,inverse:!0,paddingOuter:.5},{orient:"bottom",label:{visible:!0},type:"linear",visible:!1,min:e,max:i}]}generateBarBackground(t){var e;return{type:t.barBackground.type,dataId:"data",visible:!0,dataKey:c,zIndex:-99,state:null===(e=t.barBackground)||void 0===e?void 0:e.state,style:Object.assign(Object.assign({x:(e,i)=>"symbol"===t.barBackground.type?i.getRegion().getLayoutRect().width/2:0,y:(e,i)=>i.valueToY([e[t.yField]])+i.yBandwidth()/2-("symbol"===t.barBackground.type?0:t.bar.height/2),size:(e,i)=>[i.getRegion().getLayoutRect().width,t.bar.height],width:(t,e)=>e.getRegion().getLayoutRect().width,height:t.bar.height},t.barBackground.style),{visible:e=>!e[u]&&t.barBackground.style.visible}),animation:!0,animationEnter:this.getAnimationEnter(this.originalSpec),animationExit:this.getAnimationExit(this.originalSpec),animationAppear:this.getAnimationAppear(this.originalSpec,"barBack"),animationUpdate:this.getAnimationUpdate(this.originalSpec)}}generateDecorateHaloIcons(t){var e;return null===(e=t.decorateHaloIcons)||void 0===e?void 0:e.map((e=>({type:"symbol",dataId:"data",visible:!0,dataKey:c,state:null==e?void 0:e.state,style:Object.assign(Object.assign({x:(e,i)=>{if(void 0!==e[t.xField]&&null!==e[t.xField])return i.valueToX([e[t.xField]])},y:(e,i)=>i.valueToY([e[t.yField]])+i.yBandwidth()/2},e.style),{visible:t=>!t[u]&&e.style.visible}),animation:!0,animationEnter:this.getAnimationEnter(this.originalSpec),animationExit:this.getAnimationExit(this.originalSpec),animationAppear:this.getAnimationAppear(this.originalSpec,"symbol"),animationUpdate:this.getAnimationUpdate(this.originalSpec)})))}generateRankingIcon(t){return{type:"symbol",dataId:"data",visible:!0,dataKey:c,state:t.rankingIcon.state,style:Object.assign(Object.assign({x:e=>"bothEnd"===t.labelLayout?-(10+this.nameLabelTextMeasure.fullMeasure(this.formatDatum(t.yField,e)).width+(t.orderLabel.style.visible?5+this.orderLabelTextMeasure.fullMeasure(this.formatDatum(d,e)).width:0)+8):5,y:(e,i)=>"bothEnd"===t.labelLayout?i.valueToY([e[t.yField]])+i.yBandwidth()/2:i.valueToY([e[t.yField]])+i.yBandwidth()/2-t.bar.height/2-5-Math.max(this.nameLabelTextMeasure.fullMeasure(this.formatDatum(t.yField,e)).height,this.orderLabelTextMeasure.fullMeasure(this.formatDatum(d,e)).height)/2},t.rankingIcon.style),{lineWidth:0,stroke:null,visible:e=>!e[u]&&t.rankingIcon.style.visible}),animation:!0,animationEnter:this.getAnimationEnter(this.originalSpec),animationExit:this.getAnimationExit(this.originalSpec),animationAppear:this.getAnimationAppear(this.originalSpec,"text"),animationUpdate:this.getAnimationUpdate(this.originalSpec)}}generateNameLabel(t){var e;return{type:"text",dataId:"data",dataKey:c,state:null===(e=t.nameLabel)||void 0===e?void 0:e.state,style:Object.assign(Object.assign({text:e=>this.formatDatum(t.yField,e),x:()=>{var e;return"bothEnd"===t.labelLayout?-10:(t.rankingIcon.style.visible?8+(null!==(e=t.rankingIcon.style.size)&&void 0!==e?e:10):0)+(t.orderLabel.style.visible?5+this.getMaxDataLabelLens(t,d,this.orderLabelTextMeasure):0)},y:(e,i)=>"bothEnd"===t.labelLayout?i.valueToY([e[t.yField]])+i.yBandwidth()/2:i.valueToY([e[t.yField]])+i.yBandwidth()/2-t.bar.height/2-5},t.nameLabel.style),{textAlign:"bothEnd"===t.labelLayout?"right":"left",textBaseline:"bothEnd"===t.labelLayout?"middle":"bottom",visible:e=>!e[u]&&t.nameLabel.style.visible}),animation:!0,animationEnter:this.getAnimationEnter(this.originalSpec),animationExit:this.getAnimationExit(this.originalSpec),animationAppear:this.getAnimationAppear(this.originalSpec,"text"),animationUpdate:this.getAnimationUpdate(this.originalSpec)}}generateOrderLabel(t){var e;return{type:"text",dataId:"data",dataKey:c,state:null===(e=t.orderLabel)||void 0===e?void 0:e.state,style:Object.assign(Object.assign({text:t=>this.formatDatum(d,t),x:e=>{var i;return"bothEnd"===t.labelLayout?-(10+this.nameLabelTextMeasure.fullMeasure(this.formatDatum(t.yField,e)).width+5):t.rankingIcon.style.visible?8+(null!==(i=t.rankingIcon.style.size)&&void 0!==i?i:10):0},y:(e,i)=>"bothEnd"===t.labelLayout?i.valueToY([e[t.yField]])+i.yBandwidth()/2:i.valueToY([e[t.yField]])+i.yBandwidth()/2-t.bar.height/2-5},t.orderLabel.style),{textAlign:"bothEnd"===t.labelLayout?"right":"left",textBaseline:"bothEnd"===t.labelLayout?"middle":"bottom",visible:e=>!e[u]&&t.orderLabel.style.visible}),animation:!0,animationEnter:this.getAnimationEnter(this.originalSpec),animationExit:this.getAnimationExit(this.originalSpec),animationAppear:this.getAnimationAppear(this.originalSpec,"text"),animationUpdate:this.getAnimationUpdate(this.originalSpec)}}generateValueLabel(t){var e;return{type:"text",dataId:"data",visible:!0,dataKey:c,state:null===(e=t.valueLabel)||void 0===e?void 0:e.state,style:Object.assign(Object.assign({text:e=>this.formatDatum(t.xField,e),x:(e,i)=>"bothEnd"===t.labelLayout?i.getRegion().getLayoutRect().width+5:i.getRegion().getLayoutRect().width,y:(e,i)=>"bothEnd"===t.labelLayout?i.valueToY([e[t.yField]])+i.yBandwidth()/2:i.valueToY([e[t.yField]])+i.yBandwidth()/2-t.bar.height/2-5},t.valueLabel.style),{textAlign:"bothEnd"===t.labelLayout?"left":"right",textBaseline:"bothEnd"===t.labelLayout?"middle":"bottom",visible:e=>!e[u]&&t.valueLabel.style.visible}),animation:!0,animationEnter:this.getAnimationEnter(this.originalSpec),animationExit:this.getAnimationExit(this.originalSpec),animationAppear:this.getAnimationAppear(this.originalSpec,"text"),animationUpdate:this.getAnimationUpdate(this.originalSpec)}}transformPaddingSpec(t){var e;const i=t.decorateHaloIcons.length>0?Math.max(...t.decorateHaloIcons.map((t=>{var e,i;return null!==(i=null===(e=t.style)||void 0===e?void 0:e.size)&&void 0!==i?i:18}))):0;t.padding=Object.assign({left:"bothEnd"===t.labelLayout?10+this.getMaxDataLabelLens(t,t.yField,this.nameLabelTextMeasure)+(t.orderLabel.style.visible?5+this.getMaxDataLabelLens(t,d,this.orderLabelTextMeasure):0)+(t.rankingIcon.style.visible?8+(null!==(e=t.rankingIcon.style.size)&&void 0!==e?e:10):0)+5:5+i/2,right:"bothEnd"===t.labelLayout?5+this.getMaxDataLabelLens(t,t.xField,this.valueLabelTextMeasure)+5:15,top:0,bottom:0},t.padding)}getMaxDataLabelLens(t,e,i){const s=this.originalData.map((t=>t[u]?0:i.fullMeasure(this.formatDatum(e,t)).width));return Math.max(...s)}formatDatum(t,e){var i;return(null===(i=this.formatMap)||void 0===i?void 0:i[t])?this.formatMap[t](e[t],e):e[t]}getLabelWidth(t,e){return e+t}getAnimationExit(t){var e,i,s,n,r;return!1!==(null===(e=t.animationUpdate)||void 0===e?void 0:e.enable)&&{type:"moveOut",options:{direction:"y",orient:"negative",point:(e,i)=>({y:i.getGraphicAttribute("y")-t.height/(t.pageSize+1)*Math.min(t.scrollSize,t.pageSize)})},duration:null!==(s=null===(i=t.animationUpdate)||void 0===i?void 0:i.duration)&&void 0!==s?s:1e3,easing:null!==(r=null===(n=t.animationUpdate)||void 0===n?void 0:n.easing)&&void 0!==r?r:"linear"}}getAnimationEnter(t){var e,i,s,n,r;return!1!==(null===(e=t.animationUpdate)||void 0===e?void 0:e.enable)&&{type:"moveIn",options:{direction:"y",orient:"negative",excludeChannels:["y"],point:(e,i)=>({y:i.getGraphicAttribute("y")+t.height/(t.pageSize+1)*Math.min(t.scrollSize,t.pageSize)})},duration:null!==(s=null===(i=t.animationUpdate)||void 0===i?void 0:i.duration)&&void 0!==s?s:1e3,easing:null!==(r=null===(n=t.animationUpdate)||void 0===n?void 0:n.easing)&&void 0!==r?r:"linear"}}getAnimationAppear(t,e){var i,s,n,r,a,o,l,h,c,d,u,p,g;return!1!==(null===(i=t.animationAppear)||void 0===i?void 0:i.enable)&&("rect"===e?{type:"growWidthIn",oneByOne:!1,duration:null!==(n=null===(s=t.animationAppear)||void 0===s?void 0:s.duration)&&void 0!==n?n:1e3,easing:null!==(a=null===(r=t.animationAppear)||void 0===r?void 0:r.easing)&&void 0!==a?a:"linear",options:{}}:"symbol"===e?{channel:{x:{from:0,to:(t,e)=>e.getGraphicAttribute("x")}},duration:null!==(l=null===(o=t.animationAppear)||void 0===o?void 0:o.duration)&&void 0!==l?l:1e3,easing:null!==(c=null===(h=t.animationAppear)||void 0===h?void 0:h.easing)&&void 0!==c?c:"linear"}:{channel:{opacity:{from:0,to:1}},duration:null!==(u=null===(d=t.animationAppear)||void 0===d?void 0:d.duration)&&void 0!==u?u:1e3,easing:null!==(g=null===(p=t.animationAppear)||void 0===p?void 0:p.easing)&&void 0!==g?g:"linear"})}getAnimationUpdate(t){var e,i,s,n;return!1!==t.animationUpdate.enable&&{duration:null!==(i=null===(e=t.animationUpdate)||void 0===e?void 0:e.duration)&&void 0!==i?i:1e3,easing:null!==(n=null===(s=t.animationUpdate)||void 0===s?void 0:s.easing)&&void 0!==n?n:"linear"}}}class g extends e.BaseChart{constructor(){super(...arguments),this.type="rankingList",this.transformerConstructor=p}init(){this.isValid()&&super.init()}isValid(){var t,e,i,s;const{xField:n,yField:r,data:a}=this._spec;return n&&r?!!a||(null===(s=(i=this._option).onError)||void 0===s||s.call(i,"Data is required"),!1):(null===(e=(t=this._option).onError)||void 0===e||e.call(t,"Missing Required Config: `xField`, `yField` "),!1)}}g.type="rankingList",g.view="singleDefault",g.transformerConstructor=p;const f=(t,e)=>{var s,n;if(!(null==e?void 0:e.fields))return t;if(0===t.length)return t;const r=e.fields,a=t[0],o={},l=[];for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const h=r[e];if(h.sort&&(i.isValidNumber(h.sortIndex)||(h.sortIndex=0),i.isValid(h.sortReverse)||(h.sortReverse="desc"===h.sort)),!h.type){let i=a;e in a||(i=null!==(s=t.find((t=>e in t)))&&void 0!==s?s:a),h.type="number"==typeof i[e]?"linear":"ordinal"}let c;if("number"==typeof h.sortIndex&&(c={key:e,type:h.type,index:h.sortIndex,sortIndex:{},sortIndexCount:0,sortReverse:!0===h.sortReverse},l.push(c)),(null===(n=h.domain)||void 0===n?void 0:n.length)>0)if("ordinal"===h.type){h._domainCache={},o[e]=h;const t={};h.domain.forEach(((e,i)=>{t[e]=i,h._domainCache[e]=i})),c&&(c.sortIndex=t,c.sortIndexCount=h.domain.length)}else h.domain.length>=2&&(o[e]=h)}return Object.keys(o).length>0&&(t=t.filter((t=>{for(const e in o){const i=o[e];if("ordinal"===i.type){if(!(t[e]in i._domainCache))return!1}else if(i.domain[0]>t[e]||i.domain[1]<t[e])return!1}return!0}))),l.sort(((t,e)=>t.index-e.index)),t.sort(((t,e)=>function(t,e,i){for(let s=0;s<i.length;s++){const n=i[s];let r=0;if("ordinal"===n.type?(void 0===n.sortIndex[e[n.key]]&&(n.sortIndex[e[n.key]]=n.sortIndexCount++),void 0===n.sortIndex[t[n.key]]&&(n.sortIndex[t[n.key]]=n.sortIndexCount++),r=n.sortIndex[t[n.key]]-n.sortIndex[e[n.key]]):"linear"===n.type&&(r=t[n.key]-e[n.key]),n.sortReverse&&(r=-r),0!==r)return r}return 0}(t,e,l))),t};let m=0;class y{constructor(t,e){var s=this;let n;this.dataSet=t,this.options=e,this.isDataView=!0,this.target=new i.EventEmitter,this.parseOption=null,this.transformsArr=[],this.isRunning=!1,this.rawData={},this.history=!1,this.parserData={},this.latestData={},this._fields=null,this.reRunAllTransform=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=s.latestData;return s.isRunning=!0,s.resetTransformData(),s.transformsArr.forEach((e=>{s.executeTransform(e,{pushHistory:t.pushHistory,emitMessage:!1})})),s.isRunning=!1,!1===t.emitMessage||t.skipEqual&&i.isEqual(e,s.latestData)||s.target.emit("change",{latestData:s.latestData}),s},this.markRunning=()=>{this.isRunning=!0,this.target.emit("markRunning",[])},n=(null==e?void 0:e.name)?e.name:function(){return m>1e8&&(m=0),(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"dataset")+"_"+m++}("dataview"),this.name=n,(null==e?void 0:e.history)&&(this.history=e.history,this.historyData=[]),this.dataSet.setDataView(n,this),this.setFields(null==e?void 0:e.fields)}parse(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var s;this.isRunning=!0,i&&this.target.emit("beforeParse",[]),e&&(this.parseOption=e);const n=this.cloneParseData(t,e);if(null==e?void 0:e.type){const t=(null!==(s=this.dataSet.getParser(e.type))&&void 0!==s?s:this.dataSet.getParser("bytejson"))(n,e.options,this);this.rawData=n,this.parserData=t,this.history&&this.historyData.push(n,t),this.latestData=t}else this.parserData=n,this.rawData=n,this.history&&this.historyData.push(n),this.latestData=n;return this.isRunning=!1,i&&this.target.emit("afterParse",[]),this}transform(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.isRunning=!0,t&&t.type){let i=!0;if("fields"===t.type){this._fields=t.options.fields;const e=this.transformsArr.findIndex((e=>e.type===t.type));e>=0&&(i=!1,this.transformsArr[e].options.fields=this._fields)}i&&this.transformsArr.push(t),e&&this.executeTransform(t)}return this.sortTransform(),this.isRunning=!1,this}sortTransform(){this.transformsArr.length>=2&&this.transformsArr.sort(((t,e)=>{var i,s;return(null!==(i=t.level)&&void 0!==i?i:0)-(null!==(s=e.level)&&void 0!==s?s:0)}))}executeTransform(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{pushHistory:s,emitMessage:n,skipEqual:r}=e,a=this.dataSet.getTransform(t.type),o=this.latestData,l=a(o,t.options);this.history&&!1!==s&&this.historyData.push(l),this.latestData=l,!1===n||r&&i.isEqual(o,this.latestData)||this.target.emit("change",{latestData:this.latestData})}resetTransformData(){this.latestData=this.parserData,this.history&&(this.historyData.length=0,this.historyData.push(this.rawData,this.parserData))}cloneParseData(t,e){let s=!1;return t instanceof y||!0!==(null==e?void 0:e.clone)||(s=!0),s?i.cloneDeep(t):t}parseNewData(t,e){this.parse(t,e||this.parseOption),this.reRunAllTransform()}updateRawData(t,e){const i=this.cloneParseData(t,e);this.rawData=i,this.parserData=i,this.latestData=i,this.reRunAllTransform()}getFields(){var t;return this._fields?this._fields:"dataview"===(null===(t=this.parseOption)||void 0===t?void 0:t.type)&&1===this.rawData.length&&this.rawData[0].getFields?this.rawData[0].getFields():null}setFields(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._fields=t&&e?i.merge({},this._fields,t):t;const s=this.transformsArr.find((t=>"fields"===t.type));!i.isNil(this._fields)&&i.isNil(s)?(this.dataSet.registerTransform("fields",f),this.transform({type:"fields",options:{fields:this._fields}},!1)):s&&(s.options.fields=this._fields)}destroy(){this.dataSet.removeDataView(this.name),this.latestData=null,this.rawData=null,this.parserData=null,this.transformsArr=null,this.target=null}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,4 +12,4 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function d(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(t);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(i[s[n]]=t[s[n]])}return i}class u extends e.FunnelChart.transformerConstructor{transformSpec(t){const{conversionArrow:e,extensionMark:i=[],funnelBackground:s}=t;if(e&&e.arrows&&e.arrows.length){const t=function(t){const{arrows:e}=t,i=d(t,["arrows"]),s=e.filter((t=>"left"===t.position)),n=e.filter((t=>"right"===t.position)),r=p(n,i),a=p(s,i),o=[];r&&(r.name="arrowRight",o.push(r));a&&(a.name="arrowLeft",o.push(a));return o}(e);t&&t.length&&i.push(...t)}if(s&&s.visible){const t=function(t){const{style:e={}}=t,i=d(t,["style"]);return Object.assign(Object.assign({type:"rect"},i),{dataIndex:0,zIndex:0,style:Object.assign(Object.assign(Object.assign({},S),e),{x:0,y:(t,e)=>e.getPoints(t)[0].y,width:(t,e)=>{const i=e.getRegion(),{width:s}=i.getLayoutRect();return s},height:(t,e)=>{const i=e.getPoints(t),s=i[0];return i[3].y-s.y}})})}(s);t&&i.push(t)}t.extensionMark=i,super.transformSpec(t)}_getDefaultSeriesSpec(t){const e=super._getDefaultSeriesSpec(t);return e.conversionArrow=t.conversionArrow,e.funnelBackground=t.funnelBackground,e}}function p(t,e){if(0===(null==t?void 0:t.length))return null;const{line:s,symbol:n,text:r,margin:a}=e,o=[],l={type:"group",children:[]},h=function(t={},e){const{style:i={}}=t,s=d(t,["style"]),n=(t,e)=>{var i,s;const{from:n,to:r}=t,{vchart:a}=e,o=null===(s=null===(i=null==a?void 0:a.getChart())||void 0===i?void 0:i.getSeriesData())||void 0===s?void 0:s.latestData;return!(r>o.length-1||n>o.length-1)};return Object.assign(Object.assign({type:"polygon",interactive:!1},s),{dataKey:t=>`${t.id}`,style:Object.assign(Object.assign(Object.assign({},A),i),{renderable:n,points:(t,i)=>{if(!n(t,i))return[];let s=t.layout.points;return s=f(t,i,e),s}})})}(s,a);h&&o.push(h);const c=function(t={},e){const{style:i={}}=t,s=d(t,["style"]);return Object.assign(Object.assign({type:"symbol",interactive:!1,dataKey:t=>`${t.id}`},s),{style:Object.assign(Object.assign(Object.assign({},B),i),{x:(t,i)=>{var s,n;let r=t.layout.points;return r=f(t,i,e),null!==(n=null===(s=r[(null==r?void 0:r.length)-1])||void 0===s?void 0:s.x)&&void 0!==n?n:NaN},y:(t,i)=>{var s,n;let r=t.layout.points;return r=f(t,i,e),null!==(n=null===(s=r[(null==r?void 0:r.length)-1])||void 0===s?void 0:s.y)&&void 0!==n?n:NaN},angle:t=>"left"===t.position?90:-90})})}(n,a);c&&o.push(c);const u=function(t={},e){const{style:s={},formatMethod:n,textMargin:r=4}=t,a=d(t,["style","formatMethod","textMargin"]);return Object.assign(Object.assign({type:"text",dataKey:t=>`${t.id}`,interactive:!1,animation:!1},a),{style:Object.assign(Object.assign(Object.assign({},T),{text:(t,e)=>{var s,r,a,o,l,h,c;const{text:d}=t;let u=d;if(i.isFunction(n)){const{vchart:i}=e,{from:p,to:f}=t,{field:g}=t.context,m=null!==(a=null===(r=null===(s=null==i?void 0:i.getChart())||void 0===s?void 0:s.getSeriesData())||void 0===r?void 0:r.latestData)&&void 0!==a?a:[],y=null!==(c=null===(h=null===(l=null===(o=null==i?void 0:i.getChart())||void 0===o?void 0:o.getAllSeries()[0])||void 0===l?void 0:l.getViewData())||void 0===h?void 0:h.latestData)&&void 0!==c?c:[],b=y.find((t=>t[g]===m[p][g])),x=y.find((t=>t[g]===m[f][g]));u=n(d,{arrow:t,from:b,to:x})}return u},x:(t,i)=>{var s,n;let a=t.layout.points;return a=f(t,i,e),null!==(n=(null===(s=a[1])||void 0===s?void 0:s.x)+("left"===t.position?-r:r))&&void 0!==n?n:NaN},y:(t,i)=>{var s,n,r;let a=t.layout.points;return a=f(t,i,e),null!==(r=((null===(s=a[1])||void 0===s?void 0:s.y)+(null===(n=a[2])||void 0===n?void 0:n.y))/2)&&void 0!==r?r:NaN},textAlign:t=>"left"===t.position?"right":"left",textBaseline:"middle"}),s)})}(r,a);return u&&o.push(u),l.children=o,l}function f(t,e,i){var s,n,r,a,o;const{vchart:l}=e,{from:h,to:c}=t,{field:d}=t.context,u=null===(n=null===(s=null==l?void 0:l.getChart())||void 0===s?void 0:s.getSeriesData())||void 0===n?void 0:n.latestData,p=null===(o=null===(a=null===(r=null==l?void 0:l.getChart())||void 0===r?void 0:r.getAllSeries()[0])||void 0===a?void 0:a.getViewData())||void 0===o?void 0:o.latestData;let f=[];if(u&&u.length){const s=p.find((t=>t[d]===u[h][d])),n=p.find((t=>t[d]===u[c][d])),r=p[0];if(s&&n&&r){f=function(t,e,i,s,n=12){const{layout:r,distance:a,position:o}=t,{level:l,fromIndex:h,toIndex:c,fromTotal:d,toTotal:u}=r,p="right"===o,f=p?e[1]:e[0],g=p?e[2]:e[3],m=Math.abs(f.y-g.y),y=p?i[1]:i[0],b=p?i[2]:i[3],x=Math.abs(y.y-b.y),v=p?s[1]:s[0],_=m/(d+1),A=x/(u+1),B=f.y+_*(h+1),T=y.y+A*(c+1),S=p?-1:1,w=[{x:f.x-n*S,y:B},{x:v.x-(n+(l+1)*a)*S,y:B},{x:v.x-(n+(l+1)*a)*S,y:T},{x:y.x-n*S,y:T}];return w}(t,e.getPoints(s),e.getPoints(n),e.getPoints(r),i),t.layout.points=f}}return f}function g(t,e){const{from:i,to:s}=t,{from:n,to:r}=e;return s>n&&r>i}function m(t,e){const{from:i,to:s}=t,{from:n,to:r}=e;return i===n&&s===r}const y=(t,e)=>{var s,n,r;if(!t||!(null===(s=t.arrows)||void 0===s?void 0:s.length))return[];const{arrows:a}=t,o=function(t,e){return t.filter((t=>i.isValidNumber(t.from*t.to))).map(((t,i)=>{const{from:s,to:n,position:r="right"}=t;return Object.assign(Object.assign({},t),{position:r,distance:t.distance||40,from:Math.min(s,n),to:Math.max(s,n),span:Math.abs(s-n),isLayout:!1,context:{field:e},layout:{level:0},id:`${s}-${n}-${r}-${i}`})}))}(a,e.categoryField),l=o.filter((t=>"left"===t.position)),h=o.filter((t=>"right"===t.position));return[...null!==(n=b(l))&&void 0!==n?n:[],...null!==(r=b(h))&&void 0!==r?r:[]]};function b(t){if(0===(null==t?void 0:t.length))return null;const e=new Map;return t.forEach((t=>{const s=e.get(t.from);if(i.isValid(s)){const e=s.fromArrows.find((e=>m(e,t)));e?t.layout.duplicateNode=e:s.degree+=1,s.fromArrows.push(t)}else e.set(t.from,{fromArrows:[t],toArrows:[],totalArrows:[],degree:1});const n=e.get(t.to);if(i.isValid(n)){const e=n.toArrows.find((e=>m(e,t)));e?t.layout.duplicateNode=e:n.degree+=1,n.toArrows.push(t)}else e.set(t.to,{toArrows:[t],fromArrows:[],totalArrows:[],degree:1})})),e.forEach((t=>{t.fromArrows.sort(((t,e)=>e.span-t.span)),t.toArrows.sort(((t,e)=>t.span-e.span)),t.totalArrows=[...t.toArrows,...t.fromArrows]})),t.sort(((t,e)=>t.span-e.span)).forEach((s=>{var n;const r=t.filter((t=>t.layout.isLayout)),a=i.maxInArray(r,((t,e)=>t.layout.level-e.layout.level));let o=null!==(n=null==a?void 0:a.layout.level)&&void 0!==n?n:0;for(;o>=0;){if(r.some((t=>t.layout.level===o&&g(t,s)))){o+=1;break}--o}s.layout.level=Math.max(0,o),s.layout.fromTotal=e.get(s.from).degree,s.layout.toTotal=e.get(s.to).degree;const l=s.layout.duplicateNode;l?(s.layout.fromIndex=l.layout.fromIndex,s.layout.toIndex=l.layout.toIndex):(s.layout.fromIndex=x(s,e.get(s.from).totalArrows),s.layout.toIndex=x(s,e.get(s.to).totalArrows)),s.layout.isLayout=!0})),t}function x(t,e){let i=0,s=0;for(let n=0;n<e.length;n++){const r=e[n];if(r===t){i=n-s;break}r.layout.duplicateNode&&s++}return i}class v extends e.FunnelChart{constructor(){super(...arguments),this.type="conversionFunnel",this.transformerConstructor=u}}v.type="conversionFunnel",v.transformerConstructor=u;class _ extends e.FunnelSeries{initData(){var t;super.initData();const{conversionArrow:i}=this._spec;i&&(null===(t=i.arrows)||void 0===t?void 0:t.length)&&(this._arrowData=new c(this._dataSet,{name:`${e.PREFIX}_series_${this.id}_arrowData`}),this._dataSet.getTransform("conversionArrow")||this._dataSet.registerTransform("conversionArrow",y),this._arrowData.parse(i).transform({type:"conversionArrow",options:{categoryField:this._spec.categoryField}}))}afterCompile(){var t;null===(t=super.afterCompile)||void 0===t||t.call(this);const e=this.getMarkInName("arrowRight");e&&e.getMarks().forEach((t=>{t.setDataView(this._arrowData),t.compileData(),t.setTransform([{type:"filter",callback:t=>"right"===t.position}])}));const i=this.getMarkInName("arrowLeft");i&&i.getMarks().forEach((t=>{t.setDataView(this._arrowData),t.compileData(),t.setTransform([{type:"filter",callback:t=>"left"===t.position}])}))}}const A={cornerRadius:4,stroke:"black",strokeOpacity:1,lineWidth:1,closePath:!1,pickable:!1},B={symbolType:"triangle",size:8,scaleX:.7,fill:"black"},T={fill:"#606773",fontSize:12},S={fill:"#eff1f9"};class w{static GenAutoIncrementId(){return w.auto_increment_id++}}w.auto_increment_id=0;class P{constructor(t){this.id=w.GenAutoIncrementId(),this.registry=t}}const M="named",O="inject",C="inversify:tagged",k="inversify:paramtypes";class L{constructor(t,e){this.key=t,this.value=e}toString(){return this.key===M?`named: ${String(this.value).toString()} `:`tagged: { key:${this.key.toString()}, value: ${String(this.value)} }`}}var E=function(t){var e;return function(t){const e="function"==typeof Symbol&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=Object.getPrototypeOf(Function),s=("object"==typeof process&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL,Map),n=new WeakMap;function r(t,e,i){let r=n.get(t);if(h(r)){if(!i)return;r=new s,n.set(t,r)}let a=r.get(e);if(h(a)){if(!i)return;a=new s,r.set(e,a)}return a}function a(t,e,i){if(o(t,e,i))return!0;const s=g(e);return!c(s)&&a(t,s,i)}function o(t,e,i){const s=r(e,i,!1);return!h(s)&&!!s.has(t)}function l(t,e,i){if(o(t,e,i))return function(t,e,i){const s=r(e,i,!1);if(!h(s))return s.get(t)}(t,e,i);const s=g(e);return c(s)?void 0:l(t,s,i)}function h(t){return void 0===t}function c(t){return null===t}function d(t){return"object"==typeof t?null!==t:"function"==typeof t}function u(t,i){switch(function(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}const s=3===i?"string":5===i?"number":"default",n=function(t,e){const i=t[e];if(null!=i){if(!f(i))throw new TypeError;return i}}(t,e);if(void 0!==n){const e=n.call(t,s);if(d(e))throw new TypeError;return e}return function(t,e){if("string"===e){const e=t.toString;if(f(e)){const i=e.call(t);if(!d(i))return i}const i=t.valueOf;if(f(i)){const e=i.call(t);if(!d(e))return e}}else{const e=t.valueOf;if(f(e)){const i=e.call(t);if(!d(i))return i}const i=t.toString;if(f(i)){const e=i.call(t);if(!d(e))return e}}throw new TypeError}(t,"default"===s?"number":s)}function p(t){const e=u(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function f(t){return"function"==typeof t}function g(t){const e=Object.getPrototypeOf(t);if("function"!=typeof t||t===i)return e;if(e!==i)return e;const s=t.prototype,n=s&&Object.getPrototypeOf(s);if(null==n||n===Object.prototype)return e;const r=n.constructor;return"function"!=typeof r||r===t?e:r}t("defineMetadata",(function(t,e,i,s){if(!d(i))throw new TypeError;return n=t,a=e,void r(i,s,!0).set(n,a);var n,a})),t("hasMetadata",(function(t,e,i){if(!d(e))throw new TypeError;return h(i)||(i=p(i)),a(t,e,i)})),t("hasOwnMetadata",(function(t,e,i){if(!d(e))throw new TypeError;return h(i)||(i=p(i)),o(t,e,i)})),t("getMetadata",(function(t,e,i){if(!d(e))throw new TypeError;return h(i)||(i=p(i)),l(t,e,i)}))}((e=t,function(t,i){"function"!=typeof e[t]&&Object.defineProperty(e,t,{configurable:!0,writable:!0,value:i})})),t}({});function I(t,e,i,s){!function(t,e,i,s){const n=[s];let r={};E.hasOwnMetadata(t,e)&&(r=E.getMetadata(t,e));let a=r[i];void 0===a&&(a=[]),a.push(...n),r[i]=a,E.defineMetadata(t,r,e)}(C,t,i.toString(),s)}function R(t){return(e,i,s)=>{I(e,0,s,t)}}const U=(D=O,t=>(e,i,s)=>R(new L(D,t))(e,i,s));var D;function N(){return function(t){return E.defineMetadata(k,null,t),t}}function j(t){return R(new L(M,t))}const F="Singleton",z="Transient",W="ConstantValue",G="DynamicValue",$="Factory",Y="Function",V="Instance",X="Invalid";class H{constructor(t,e){this.id=w.GenAutoIncrementId(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=X,this.constraint=t=>!0,this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.dynamicValue=null}clone(){const t=new H(this.serviceIdentifier,this.scope);return t.activated=t.scope===F&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.provider=this.provider,t.constraint=this.constraint,t.cache=this.cache,t}}class K{getConstructorMetadata(t){return{compilerGeneratedMetadata:E.getMetadata(k,t),userGeneratedMetadata:E.getMetadata(C,t)||{}}}getPropertiesMetadata(t){throw new Error("暂未实现")}}const q=(Z=M,t=>{const e=e=>{if(null==e)return!1;if(e.key===Z&&e.value===t)return!0;if(null==e.constructorArgsMetadata)return!1;const i=e.constructorArgsMetadata;for(let e=0;e<i.length;e++)if(i[e].key===Z&&i[e].value===t)return!0;return!1};return e.metaData=new L(Z,t),e});var Z;class J{constructor(t){this._binding=t}inRequestScope(){throw new Error("暂未实现")}inSingletonScope(){return this._binding.scope=F,this}inTransientScope(){return this._binding.scope=z,this}whenTargetNamed(t){return this._binding.constraint=q(t),this}}class Q{constructor(t){this._binding=t}to(t){return this._binding.type=V,this._binding.implementationType=t,new J(this._binding)}toSelf(){const t=this._binding.serviceIdentifier;return this.to(t)}toDynamicValue(t){return this._binding.type=G,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new J(this._binding)}toConstantValue(t){return this._binding.type=W,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=F,new J(this._binding)}toFactory(t){return this._binding.type=$,this._binding.factory=t,this._binding.scope=F,new J(this._binding)}toService(t){this.toDynamicValue((e=>e.container.get(t)))}}const tt=Symbol("ContributionProvider");class et{constructor(t,e){this.serviceIdentifier=t,this.container=e}getContributions(){return this.caches||(this.caches=[],this.container&&this.container.isBound(this.serviceIdentifier)&&this.caches.push(...this.container.getAll(this.serviceIdentifier))),this.caches}}function it(t,e){t(tt).toDynamicValue((t=>{let{container:i}=t;return new et(e,i)})).inSingletonScope().whenTargetNamed(e)}class st{constructor(t,e){this._args=t,this.name=e,this.taps=[]}tap(t,e){this._tap("sync",t,e)}unTap(t,e){const i="string"==typeof t?t.trim():t.name;i&&(this.taps=this.taps.filter((t=>!(t.name===i&&(!e||t.fn===e)))))}_parseOptions(t,e,i){let s;if("string"==typeof e)s={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof s.name||""===s.name)throw new Error("Missing name for tap");return s=Object.assign({type:t,fn:i},s),s}_tap(t,e,i){this._insert(this._parseOptions(t,e,i))}_insert(t){let e;"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let i=0;"number"==typeof t.stage&&(i=t.stage);let s=this.taps.length;for(;s>0;){s--;const t=this.taps[s];this.taps[s+1]=t;const n=t.stage||0;if(e){if(e.has(t.name)){e.delete(t.name);continue}if(e.size>0)continue}if(!(n>i)){s++;break}}this.taps[s]=t}}class nt extends st{call(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this.taps.map((t=>t.fn)).forEach((t=>t(...e)))}}var rt;!function(t){t[t.estimate=0]="estimate",t[t.actualBounding=1]="actualBounding",t[t.fontBounding=2]="fontBounding"}(rt||(rt={}));const at=i.tau-1e-8;class ot{constructor(t){this.init(t)}init(t){this.bounds=t}arc(t,e,s,n,r,a){if(Math.abs(r-n)>at)return this.bounds.add(t-s,e-s),void this.bounds.add(t+s,e+s);let o,l,h,c,d=1/0,u=-1/0,p=1/0,f=-1/0;function g(t){h=s*Math.cos(t),c=s*Math.sin(t),h<d&&(d=h),h>u&&(u=h),c<p&&(p=c),c>f&&(f=c)}if(g(n),g(r),r!==n)if((n%=i.tau)<0&&(n+=i.tau),(r%=i.tau)<0&&(r+=i.tau),r<n&&(a=!a,o=n,n=r,r=o),a)for(r-=i.tau,o=n-n%i.halfPi,l=0;l<4&&o>r;++l,o-=i.halfPi)g(o);else for(o=n-n%i.halfPi+i.halfPi,l=0;l<4&&o<r;++l,o+=i.halfPi)g(o);this.bounds.add(t+d,e+p),this.bounds.add(t+u,e+f)}arcTo(t,e,i,s,n){this.bounds.add(t,e)}bezierCurveTo(t,e,i,s,n,r){this.bounds.add(t,e),this.bounds.add(i,s),this.bounds.add(n,r)}closePath(){}ellipse(){throw new Error("不支持ellipse")}lineTo(t,e){this.bounds.add(t,e)}moveTo(t,e){this.bounds.add(t,e)}quadraticCurveTo(t,e,i,s){this.bounds.add(t,e),this.bounds.add(i,s)}rect(t,e,i,s){this.bounds.add(t,e),this.bounds.add(t+i,e+s)}clear(){this.bounds.clear()}release(){}}class lt{constructor(){this.curves=[],this.bounds=new i.AABBBounds}getCurveLengths(){return this.curves.map((t=>t.getLength()))}getPointAt(t){return{x:0,y:0}}getLength(){return 0}getBounds(){return this.bounds}}const ht=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,ct={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7},dt=0,ut=1,pt=2,ft=3,gt=4,mt=5,yt=6,bt=7,xt=8;let vt,_t,At,Bt,Tt,St;var wt,Pt,Mt,Ot,Ct,kt,Lt,Et,It;function Rt(t){const e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],l=t[7],h=l*r,c=-o*a,d=o*r,u=l*a,p=Math.cos(s),f=Math.sin(s),g=Math.cos(n),m=Math.sin(n),y=.5*(n-s),b=Math.sin(.5*y),x=8/3*b*b/Math.sin(y),v=e+p-x*f,_=i+f+x*p,A=e+g,B=i+m,T=A+x*m,S=B-x*g;return[h*v+c*_,d*v+u*_,h*T+c*S,d*T+u*S,h*A+c*B,d*A+u*B]}function Ut(t,e,s,n){const r=function(t,e,s,n,r,a,o,l,h){const c=i.degreeToRadian(o),d=Math.sin(c),u=Math.cos(c),p=u*(l-t)*.5+d*(h-e)*.5,f=u*(h-e)*.5-d*(l-t)*.5;let g=p*p/((s=Math.abs(s))*s)+f*f/((n=Math.abs(n))*n);g>1&&(g=Math.sqrt(g),s*=g,n*=g);const m=u/s,y=d/s,b=-d/n,x=u/n,v=m*l+y*h,_=b*l+x*h,A=m*t+y*e,B=b*t+x*e;let T=1/((A-v)*(A-v)+(B-_)*(B-_))-.25;T<0&&(T=0);let S=Math.sqrt(T);a===r&&(S=-S);const w=.5*(v+A)-S*(B-_),P=.5*(_+B)+S*(A-v),M=Math.atan2(_-P,v-w);let O=Math.atan2(B-P,A-w)-M;O<0&&1===a?O+=i.tau:O>0&&0===a&&(O-=i.tau);const C=Math.ceil(Math.abs(O/(i.halfPi+.001))),k=[];for(let t=0;t<C;++t){const e=M+t*O/C,i=M+(t+1)*O/C;k[t]=[w,P,e,i,s,n,d,u]}return k}(n[5],n[6],n[0],n[1],n[3],n[4],n[2],e,s);for(let e=0;e<r.length;++e){const i=Rt(r[e]);t.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5])}}!function(t){t[t.NONE=0]="NONE",t[t.UPDATE_BOUNDS=1]="UPDATE_BOUNDS",t[t.UPDATE_SHAPE=2]="UPDATE_SHAPE",t[t.CLEAR_SHAPE=253]="CLEAR_SHAPE",t[t.UPDATE_SHAPE_AND_BOUNDS=3]="UPDATE_SHAPE_AND_BOUNDS",t[t.INIT=179]="INIT",t[t.CLEAR_BOUNDS=254]="CLEAR_BOUNDS",t[t.UPDATE_GLOBAL_MATRIX=32]="UPDATE_GLOBAL_MATRIX",t[t.CLEAR_GLOBAL_MATRIX=223]="CLEAR_GLOBAL_MATRIX",t[t.UPDATE_LOCAL_MATRIX=16]="UPDATE_LOCAL_MATRIX",t[t.CLEAR_LOCAL_MATRIX=239]="CLEAR_LOCAL_MATRIX",t[t.UPDATE_GLOBAL_LOCAL_MATRIX=48]="UPDATE_GLOBAL_LOCAL_MATRIX",t[t.UPDATE_LAYOUT=128]="UPDATE_LAYOUT",t[t.CLEAR_LAYOUT=127]="CLEAR_LAYOUT"}(wt||(wt={})),function(t){t[t.GLOBAL=1]="GLOBAL",t[t.LOCAL=16]="LOCAL",t[t.GLOBAL_ACCURATE=3]="GLOBAL_ACCURATE",t[t.LOCAL_ACCURATE=48]="LOCAL_ACCURATE"}(Pt||(Pt={})),function(t){t[t.INIT=0]="INIT",t[t.DEFAULT=1]="DEFAULT",t[t.STATE=2]="STATE",t[t.ANIMATE_BIND=10]="ANIMATE_BIND",t[t.ANIMATE_PLAY=11]="ANIMATE_PLAY",t[t.ANIMATE_START=12]="ANIMATE_START",t[t.ANIMATE_UPDATE=13]="ANIMATE_UPDATE",t[t.ANIMATE_END=14]="ANIMATE_END",t[t.TRANSLATE=20]="TRANSLATE",t[t.TRANSLATE_TO=21]="TRANSLATE_TO",t[t.SCALE=22]="SCALE",t[t.SCALE_TO=23]="SCALE_TO",t[t.ROTATE=24]="ROTATE",t[t.ROTATE_TO=25]="ROTATE_TO"}(Mt||(Mt={})),function(t){t[t.INITIAL=0]="INITIAL",t[t.RUNNING=1]="RUNNING",t[t.PAUSED=2]="PAUSED",t[t.END=3]="END"}(Ot||(Ot={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SET_ATTR_IMMEDIATELY=1]="SET_ATTR_IMMEDIATELY"}(Ct||(Ct={})),function(t){t.wait="wait",t.from="from",t.to="to",t.customAnimate="customAnimate"}(kt||(kt={})),function(t){t[t.ROW=1]="ROW",t[t.COLUMN=2]="COLUMN"}(Lt||(Lt={})),function(t){t[t.CubicBezierCurve=0]="CubicBezierCurve",t[t.QuadraticBezierCurve=1]="QuadraticBezierCurve",t[t.ArcCurve=2]="ArcCurve",t[t.LineCurve=3]="LineCurve",t[t.EllipseCurve=4]="EllipseCurve",t[t.MoveCurve=5]="MoveCurve"}(Et||(Et={})),function(t){t[t.beforeFillStroke=0]="beforeFillStroke",t[t.afterFillStroke=1]="afterFillStroke"}(It||(It={}));const Dt=[(t,e,i,s,n,r,a)=>e.arc(t[1]*n+i,t[2]*r+s,t[3]*(n+r)/2,t[4],t[5],t[6],a),(t,e,i,s,n,r,a)=>e.arcTo(t[1]*n+i,t[2]*r+s,t[3]*n+i,t[4]*r+s,t[5]*(n+r)/2,a),(t,e,i,s,n,r,a)=>e.bezierCurveTo(t[1]*n+i,t[2]*r+s,t[3]*n+i,t[4]*r+s,t[5]*n+i,t[6]*r+s,a),(t,e,i,s)=>e.closePath(),(t,e,i,s,n,r)=>e.ellipse(t[1]*n+i,t[2]*r+s,t[3]*n,t[4]*r,t[5],t[6],t[7],t[8]),(t,e,i,s,n,r,a)=>e.lineTo(t[1]*n+i,t[2]*r+s,a),(t,e,i,s,n,r,a)=>e.moveTo(t[1]*n+i,t[2]*r+s,a),(t,e,i,s,n,r,a)=>e.quadraticCurveTo(t[1]*n+i,t[2]*r+s,t[3]*n+i,t[4]*r+s,a),(t,e,i,s,n,r,a)=>e.rect(t[1]*n+i,t[2]*r+s,t[3]*n,t[4]*r,a)];function Nt(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,a=arguments.length>6?arguments[6]:void 0;for(let o=0;o<t.length;o++){const l=t[o];Dt[l[0]](l,e,i,s,n,r,a)}}class jt{getLength(t){return null!=t?this.calcProjLength(t):(Number.isFinite(this.length)||(this.length=this.calcLength()),this.length)}}function Ft(t,e,s,n,r){return function(t,e){let s=0;const n=t.length;for(let r=0;r<n;r++){const a=t[r],o=e[r],l=t[(r+1)%n],h=e[(r+1)%n];s+=i.PointService.distanceNN(a,o,l,h)}return s/2}([t.x,e.x,s.x,n.x],[t.y,e.y,s.y,n.y])}function zt(t,e,i,s,n){const r=1-n;return r*r*r*t+3*e*n*r*r+3*i*n*n*r+s*n*n*n}function Wt(t,e,s,n,r){const a=zt(t.x,e.x,s.x,n.x,r),o=zt(t.y,e.y,s.y,n.y,r);return new i.Point(a,o)}class Gt extends jt{constructor(t,e,i,s){super(),this.type=Et.CubicBezierCurve,this.p0=t,this.p1=e,this.p2=i,this.p3=s}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y+this.p3.x+this.p3.y)}getPointAt(t){if(!1!==this.defined)return Wt(this.p0,this.p1,this.p2,this.p3,t);throw new Error("defined为false的点不能getPointAt")}calcLength(){return this._validPoint()?Ft(this.p0,this.p1,this.p2,this.p3):60}calcProjLength(t){return t===Lt.ROW?i.abs(this.p0.x-this.p3.x):t===Lt.COLUMN?i.abs(this.p0.y-this.p3.y):0}getAngleAt(t){const e=i.max(t-.01,0),s=i.min(t+.01,1),n=this.getPointAt(e),r=this.getPointAt(s);return i.atan2(r.y-n.y,r.x-n.x)}}class $t extends jt{constructor(t,e){super(),this.type=Et.LineCurve,this.p0=t,this.p1=e}getPointAt(t){if(!1!==this.defined)return i.PointService.pointAtPP(this.p0,this.p1,t);throw new Error("defined为false的点不能getPointAt")}getAngleAt(t){return null==this.angle&&(this.angle=i.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)),this.angle}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y)}calcLength(){return this._validPoint()?i.PointService.distancePP(this.p0,this.p1):60}calcProjLength(t){return t===Lt.ROW?i.abs(this.p0.x-this.p1.x):t===Lt.COLUMN?i.abs(this.p0.y-this.p1.y):0}}class Yt{get endX(){return this._lastX}get endY(){return this._lastY}constructor(t,e){this.init(t,e)}init(t,e){this._lastX=this._lastY=this._startX=this._startY=0,this.curveType=t,this.direction=e,this.curves=[]}bezierCurveTo(t,e,s,n,r,a,o,l){const h=new Gt(new i.Point(this._lastX,this._lastY),new i.Point(t,e),new i.Point(s,n),new i.Point(r,a));h.originP1=this._lastOriginP,h.originP2=l,h.defined=o,this.curves.push(h),this._lastX=r,this._lastY=a,this._lastOriginP=l}closePath(){if(this.curves.length<2)return;const t=this.curves[this.curves.length-1];this.lineTo(this._startX,this._startY,t.defined,this._startOriginP)}ellipse(){throw new Error("SegContext不支持调用ellipse")}lineTo(t,e,i,s){const n=this.addLinearCurve(t,e,i,this._lastOriginP,s);this.curves.push(n),this._lastX=t,this._lastY=e,this._lastOriginP=s}moveTo(t,e,i){return this._lastX=this._startX=t,this._lastY=this._startY=e,this._lastOriginP=i,this._startOriginP=i,this}quadraticCurveTo(t,e,i,s){throw new Error("SegContext不支持调用quadraticCurveTo")}clear(){this.curves=[],this.length=NaN}tryUpdateLength(t){return this.getLength(t)}addLinearCurve(t,e,s,n,r){const a=new $t(new i.Point(this._lastX,this._lastY),new i.Point(t,e));return a.originP1=n,a.originP2=r,a.defined=s,a}getPointAt(t){throw new Error("暂未实现")}getCurveLengths(){return[]}getLength(t){var e,s;if(t===Lt.COLUMN){if(!this.curves.length)return 0;const t=this.curves[0],s=this.curves[this.curves.length-1],n=null!==(e=s.p3)&&void 0!==e?e:s.p1;return i.abs(t.p0.y-n.y)}if(t===Lt.ROW){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1],n=null!==(s=e.p3)&&void 0!==s?s:e.p1;return i.abs(t.p0.x-n.x)}return Number.isFinite(this.length)||(this.length=this.curves.reduce(((t,e)=>t+e.getLength()),0)),this.length}}class Vt extends Yt{bezierCurveTo(t,e,i,s,n,r,a,o){return super.bezierCurveTo(e,t,s,i,r,n,a,o)}lineTo(t,e,i,s){return super.lineTo(e,t,i,s)}moveTo(t,e,i){return super.moveTo(e,t,i)}clear(){return super.clear()}}function Xt(t,e){let i=!1;for(let s=0,n=e.length;s<=n;s++)s>=n===i&&((i=!i)?t.lineStart():t.lineEnd()),i&&t.point(e[s])}function Ht(t,e,s){const n=null!=e?e:i.abs(s[s.length-1].x-s[0].x)>i.abs(s[s.length-1].y-s[0].y)?Lt.ROW:Lt.COLUMN;return"monotoneY"===t?new Vt(t,n):new Yt(t,n)}class Kt{constructor(t,e){this.context=t,e&&(this.startPoint=e)}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;default:this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t)}this._lastDefined=t.defined}tryUpdateLength(){return this.context.tryUpdateLength()}}function qt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;const n=Ht("linear",i,t);return function(t,e){Xt(t,e)}(new Kt(n,s),t),n}function Zt(t,e,i,s,n){t.context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6,s,t.lastPoint1)}class Jt{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){2===this._point&&Zt(this,6*this._x1-(this._x0+4*this._x1),6*this._y1-(this._y0+4*this._y1),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;break;default:Zt(this,e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=i,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}function Qt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;if(t.length<3-Number(!!s))return qt(t,e);const n=Ht("basis",i,t);return function(t,e){Xt(t,e)}(new Jt(n,s),t),n}function te(t){return t<0?-1:1}function ee(t,e,i){const s=t._x1-t._x0,n=e-t._x1,r=(t._y1-t._y0)/(s||Number(n<0&&-0)),a=(i-t._y1)/(n||Number(s<0&&-0)),o=(r*n+a*s)/(s+n);return(te(r)+te(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(o))||0}function ie(t,e){const i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function se(t,e,i,s,n){const r=t._x0,a=t._y0,o=t._x1,l=t._y1,h=(o-r)/3;t.context.bezierCurveTo(r+h,a+h*e,o-h,l-h*i,o,l,s,t.lastPoint1)}class ne{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x1,this._y1,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:se(this,this._t0,ie(this,this._t0),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1)}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){let e=NaN;const i=t.x,s=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(i,s,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(i,s,t);break;case 1:this._point=2;break;case 2:this._point=3,se(this,ie(this,e=ee(this,i,s)),e,!1!==this._lastDefined1&&!1!==this._lastDefined2);break;default:se(this,this._t0,e=ee(this,i,s),!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=s,this._t0=e,this._lastDefined1=this._lastDefined2,this._lastDefined2=!1!==t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}class re extends ne{constructor(t,e){super(t,e)}point(t){return super.point({y:t.x,x:t.y,defined:t.defined})}}function ae(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;if(t.length<3-Number(!!s))return qt(t,e);const n=Ht("monotoneX",i,t);return function(t,e){Xt(t,e)}(new ne(n,s),t),n}function oe(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;if(t.length<3-Number(!!s))return qt(t,e);const n=Ht("monotoneY",i,t);return function(t,e){Xt(t,e)}(new re(n,s),t),n}let le=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=arguments.length>2?arguments[2]:void 0;this.context=t,this._t=e,this.startPoint=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x=this._y=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){0<this._t&&this._t<1&&2===this._point&&this.context.lineTo(this._x,this._y,!1!==this._lastDefined,this.lastPoint),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)}point(t){const e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;default:if(this._t<=0)this.context.lineTo(this._x,i,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t);else{const s=this._x*(1-this._t)+e*this._t;.5===this._t?this.context.lineTo(s,this._y,!1!==this._lastDefined,this.lastPoint):this.context.lineTo(s,this._y,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(s,i,!1!==this._lastDefined&&!1!==t.defined,t)}}this._lastDefined=t.defined,this._x=e,this._y=i,this.lastPoint=t}tryUpdateLength(){return this.context.tryUpdateLength()}};function he(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:n,startPoint:r}=s;if(t.length<2-Number(!!r))return null;const a=new Yt("step",null!=n?n:i.abs(t[t.length-1].x-t[0].x)>i.abs(t[t.length-1].y-t[0].y)?Lt.ROW:Lt.COLUMN);return function(t,e){Xt(t,e)}(new le(a,e,r),t),a}class ce extends Kt{lineEnd(){this.context.closePath()}}function de(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;const n=Ht("linear",i,t);return function(t,e){Xt(t,e)}(new ce(n,s),t),n}function ue(t,e,s,n,r){let a=t._x1,o=t._y1,l=t._x2,h=t._y2;if(t._l01_a>i.epsilon){const e=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);a=(a*e-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*e-t._y0*t._l12_2a+t._y2*t._l01_2a)/i}if(t._l23_a>i.epsilon){const i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,n=3*t._l23_a*(t._l23_a+t._l12_a);l=(l*i+t._x1*t._l23_2a-e*t._l12_2a)/n,h=(h*i+t._y1*t._l23_2a-s*t._l12_2a)/n}t.context.bezierCurveTo(a,o,l,h,t._x2,t._y2,n,t.lastPoint1)}function pe(t,e){return function(i,s){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:r,startPoint:a}=n;if(i.length<2-Number(!!a))return null;if(i.length<3-Number(!!a))return qt(i,n);const o=Ht(t,r,i);return Xt(new e(o,s,a),i),o}}const fe=pe("catmullRom",class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=arguments.length>2?arguments[2]:void 0;this.context=t,this.startPoint=i,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){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(){switch(this._point){case 2:this.context.lineTo(this._x2,this._y2,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:this.point({x:this._x2,y:this._y2})}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const{x:e,y:i}=t;if(this._point){const t=this._x2-e,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(t*t+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2):this.context.moveTo(e,i);break;case 1:this._point=2;break;case 2:this._point=3;default:ue(this,e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=i,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}});const ge=pe("catmullRomClosed",class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=arguments.length>2?arguments[2]:void 0;this.context=t,this.startPoint=i,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){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(){switch(this._point){case 1:this.context.moveTo(this._x3,this._y3,this.lastPoint1),this.context.closePath();break;case 2:this.context.lineTo(this._x3,this._y3,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),this.context.closePath();break;case 3:this.point({x:this._x3,y:this._y3}),this.point({x:this._x4,y:this._y4}),this.point({x:this._x5,y:this._y5})}}point(t){const{x:e,y:i}=t;if(this._point){const t=this._x2-e,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(t*t+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=i;break;case 1:this._point=2,this.context.moveTo(this._x4=e,this._y4=i,t);break;case 2:this._point=3,this._x5=e,this._y5=i;break;default:ue(this,e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=i,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}});function me(t,e,i){var s,n;switch(e){case"linear":default:return qt(t,i);case"basis":return Qt(t,i);case"monotoneX":return ae(t,i);case"monotoneY":return oe(t,i);case"step":return he(t,.5,i);case"stepBefore":return he(t,0,i);case"stepAfter":return he(t,1,i);case"catmullRom":return fe(t,null!==(s=null==i?void 0:i.curveTension)&&void 0!==s?s:.5,i);case"catmullRomClosed":return ge(t,null!==(n=null==i?void 0:i.curveTension)&&void 0!==n?n:.5,i);case"linearClosed":return de(t,i)}}class ye extends lt{constructor(t){super(),this.commandList=[],t&&(this._ctx=t),this._boundsContext=new ot(this.bounds)}setCtx(t){this._ctx=t}moveTo(t,e){return this.commandList.push([yt,t,e]),this._ctx&&this._ctx.moveTo(t,e),this}lineTo(t,e){return this.commandList.push([mt,t,e]),this._ctx&&this._ctx.lineTo(t,e),this}quadraticCurveTo(t,e,i,s){return this.commandList.push([bt,t,e,i,s]),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,n,r){return this.commandList.push([pt,t,e,i,s,n,r]),this._ctx&&this._ctx.bezierCurveTo(t,e,i,s,n,r),this}arcTo(t,e,i,s,n){return this.commandList.push([ut,t,e,i,s,n]),this._ctx&&this._ctx.arcTo(t,e,i,s,n),this}ellipse(t,e,i,s,n,r,a,o){return this.commandList.push([gt,t,e,i,s,n,r,a,o]),this._ctx&&this._ctx.ellipse(t,e,i,s,n,r,a,o),this}rect(t,e,i,s){return this.commandList.push([xt,t,e,i,s]),this._ctx&&this._ctx.rect(t,e,i,s),this}arc(t,e,i,s,n,r){return this.commandList.push([dt,t,e,i,s,n,r]),this._ctx&&this._ctx.arc(t,e,i,s,n,r),this}closePath(){return this.commandList.push([ft]),this._ctx&&this._ctx.closePath(),this}addCurve(t){this.curves.push(t)}clear(){this.transformCbList=null,this.commandList.length=0,this.curves.length=0}beginPath(){this.clear()}toString(){if(!this.toStringCbList){const t=[];t[yt]=t=>`M${t[1]} ${t[2]}`,t[mt]=t=>`L${t[1]} ${t[2]}`,t[bt]=t=>`Q${t[1]} ${t[2]} ${t[3]} ${t[4]}`,t[pt]=t=>`C${t[1]} ${t[2]} ${t[3]} ${t[4]} ${t[5]} ${t[6]}`,t[dt]=t=>{const e=[];((t,e,i,s,n,r,a)=>{const o=Math.abs(i-e),l=o>.5*Math.PI?Math.ceil(2*o/Math.PI):1,h=(i-e)/l;for(let i=0;i<l;i++){const o=e+h*i,l=e+h*(i+1),c=4*Math.tan(Math.abs(h)/4)/3,d=l<o?-1:1,u=Math.cos(o),p=Math.sin(o),f=Math.cos(l),g=Math.sin(l),m=u*r+s,y=p*a+n,b=f*r+s,x=g*a+n,v=r*c*d,_=a*c*d;t.push(m-v*p,y+_*u,b+v*g,x-_*f,b,x)}})(e,t[4],t[5],t[1],t[2],t[3],t[3]);let i="";for(let t=0;t<e.length;t+=6)i+=`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`;return i},t[xt]=t=>`M${t[1]} ${t[2]} h${t[3]} v${t[4]} H${t[1]}Z`,t[ft]=t=>"Z",this.toStringCbList=t}const t=this.toStringCbList;let e="";return this.commandList.forEach((i=>{e+=t[i[0]](i)})),e}fromString(t,e,i,s,n){this.clear();const r=function(t){if(!t)return[];const e=t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);if(null===e)return[];let i,s;const n=[];for(let t=0,r=e.length;t<r;t++)if(vt=e[t],_t=vt.slice(1),At=vt[0],i=[At],s=_t.match(ht),null!==s){for(let t=0,e=s.length;t<e;t++)Bt=s[t],Tt=parseFloat(Bt),Number.isNaN(Tt)||i.push(Tt);if(St=ct[At],i.length-1>St){let t,e=At;for(let s=1,r=i.length;s<r;s+=St){t=[e];for(let e=s,n=s+St;e<n;e++)t.push(i[e]);n.push(t),"m"===e?e="l":"M"===e&&(e="L")}}else n.push(i)}else n.push(i);return n}(t);return this._runCommandStrList(r,e,i,s,n),this._updateBounds(),this}fromLine(t){const{points:e,curveType:i,clipRangeByDimension:s}=t.attribute;if(!e)return;const n=me(e,i);"x"===s?this.direction=Lt.ROW:"y"===s?this.direction=Lt.COLUMN:"auto"===s&&(this.direction=n.direction),this.curves=n.curves}fromCustomPath2D(t,e,i,s,n){return this.clear(),this._runCommandList(t.commandList,e,i,s,n),this._updateBounds(),this}transform(t,e,i,s){const n=this.commandList;if(!this.transformCbList){const t=[];t[yt]=this.moveToTransform,t[mt]=this.lineToTransform,t[bt]=this.quadraticCurveToTransform,t[pt]=this.bezierCurveToTransform,t[ut]=this.arcToTransform,t[gt]=this.ellipseTransform,t[xt]=this.rectTransform,t[dt]=this.arcTransform,t[ft]=this.closePathTransform,this.transformCbList=t}n.forEach((n=>{this.transformCbList[n[0]](n,t,e,i,s)})),this._updateBounds()}moveToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i}lineToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i}quadraticCurveToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s+e,t[4]=t[4]*n+i}bezierCurveToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s+e,t[4]=t[4]*n+i,t[5]=t[5]*s+e,t[6]=t[6]*n+i}arcToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s+e,t[4]=t[4]*n+i,t[5]=t[5]*(s+n)/2}ellipseTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s,t[4]=t[4]*n}rectTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s,t[4]=t[4]*n}arcTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*(s+n)/2}closePathTransform(){}_runCommandStrList(t){let e,i,s,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,c=null,d=0,u=0,p=0,f=0;for(let g=0,m=t.length;g<m;++g){switch(e=t[g],1===l&&1===h||(e=xe(e,l,h)),e[0]){case"l":d+=e[1],u+=e[2],this.lineTo(d+a,u+o);break;case"L":d=e[1],u=e[2],this.lineTo(d+a,u+o);break;case"h":d+=e[1],this.lineTo(d+a,u+o);break;case"H":d=e[1],this.lineTo(d+a,u+o);break;case"v":u+=e[1],this.lineTo(d+a,u+o);break;case"V":u=e[1],this.lineTo(d+a,u+o);break;case"m":d+=e[1],u+=e[2],this.moveTo(d+a,u+o);break;case"M":d=e[1],u=e[2],this.moveTo(d+a,u+o);break;case"c":i=d+e[5],s=u+e[6],p=d+e[3],f=u+e[4],this.bezierCurveTo(d+e[1]+a,u+e[2]+o,p+a,f+o,i+a,s+o),d=i,u=s;break;case"C":d=e[5],u=e[6],p=e[3],f=e[4],this.bezierCurveTo(e[1]+a,e[2]+o,p+a,f+o,d+a,u+o);break;case"s":i=d+e[3],s=u+e[4],p=2*d-p,f=2*u-f,this.bezierCurveTo(p+a,f+o,d+e[1]+a,u+e[2]+o,i+a,s+o),p=d+e[1],f=u+e[2],d=i,u=s;break;case"S":i=e[3],s=e[4],p=2*d-p,f=2*u-f,this.bezierCurveTo(p+a,f+o,e[1]+a,e[2]+o,i+a,s+o),d=i,u=s,p=e[1],f=e[2];break;case"q":i=d+e[3],s=u+e[4],p=d+e[1],f=u+e[2],this.quadraticCurveTo(p+a,f+o,i+a,s+o),d=i,u=s;break;case"Q":i=e[3],s=e[4],this.quadraticCurveTo(e[1]+a,e[2]+o,i+a,s+o),d=i,u=s,p=e[1],f=e[2];break;case"t":i=d+e[1],s=u+e[2],null===c[0].match(/[QqTt]/)?(p=d,f=u):"t"===c[0]?(p=2*d-n,f=2*u-r):"q"===c[0]&&(p=2*d-p,f=2*u-f),n=p,r=f,this.quadraticCurveTo(p+a,f+o,i+a,s+o),d=i,u=s,p=d+e[1],f=u+e[2];break;case"T":i=e[1],s=e[2],p=2*d-p,f=2*u-f,this.quadraticCurveTo(p+a,f+o,i+a,s+o),d=i,u=s;break;case"a":Ut(this,d+a,u+o,[e[1],e[2],e[3],e[4],e[5],e[6]+d+a,e[7]+u+o]),d+=e[6],u+=e[7];break;case"A":Ut(this,d+a,u+o,[e[1],e[2],e[3],e[4],e[5],e[6]+a,e[7]+o]),d=e[6],u=e[7];break;case"z":case"Z":this.closePath()}c=e}}_runCommandList(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if(0!==e||0!==i||1!==s||1!==n)for(let r=0,a=t.length;r<a;++r){const a=t[r].slice();switch(a[0]){case mt:this.lineToTransform(a,e,i,s,n);break;case yt:this.moveToTransform(a,e,i,s,n);break;case pt:this.bezierCurveToTransform(a,e,i,s,n);break;case bt:this.quadraticCurveToTransform(a,e,i,s,n);break;case dt:this.arcToTransform(a,e,i,s,n);break;case gt:this.ellipseTransform(a,e,i,s,n);break;case xt:this.rectTransform(a,e,i,s,n);break;case ut:this.arcToTransform(a,e,i,s,n);break;case ft:this.closePath()}}else this.commandList=t.map((t=>t.slice()))}_updateBounds(){this.bounds.clear(),Nt(this.commandList,this._boundsContext)}release(){this.commandList=[],this._boundsContext=null,this._ctx=null}getLength(){if(this.direction===Lt.COLUMN){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return i.abs(t.p0.y-e.p1.y)}if(this.direction===Lt.ROW){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return i.abs(t.p0.x-e.p1.x)}return this.curves.reduce(((t,e)=>t+e.getLength()),0)}getAttrAt(t){if(!this.curves)return{pos:{x:0,y:0},angle:0};let e,i=0;for(let s=0;s<this.curves.length;s++){e=this.curves[s];const n=e.getLength(this.direction);if(i+n>=t)break;i+=n}const s=(t-i)/e.getLength(this.direction);return{pos:e.getPointAt(s),angle:e.getAngleAt(s)}}}const be=["l",0,0,0,0,0,0,0];function xe(t,e,i){const s=be[0]=t[0];if("a"===s||"A"===s)be[1]=e*t[1],be[2]=i*t[2],be[3]=t[3],be[4]=t[4],be[5]=t[5],be[6]=e*t[6],be[7]=i*t[7];else if("h"===s||"H"===s)be[1]=e*t[1];else if("v"===s||"V"===s)be[1]=i*t[1];else for(let s=1,n=t.length;s<n;++s)be[s]=(s%2==1?e:i)*t[s];return be}const ve={x:0,y:0,z:0,dx:0,dy:0,dz:0,scrollX:0,scrollY:0,scaleX:1,scaleY:1,scaleZ:1,angle:0,alpha:0,beta:0,scaleCenter:[0,0],anchor:[0,0],anchor3d:[0,0],postMatrix:new i.Matrix},_e={strokeOpacity:1,lineDash:[],lineDashOffset:0,lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,strokeBoundsBuffer:2,stroke:!1},Ae=Object.assign({outerBorder:Object.assign(Object.assign({},_e),{distance:0}),innerBorder:Object.assign(Object.assign({},_e),{distance:0})},_e),Be={text:"",maxLineWidth:1/0,maxWidth:1/0,textAlign:"left",textBaseline:"alphabetic",fontSize:16,fontFamily:"PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",fontWeight:"",ellipsis:"…",fontVariant:"",fontStyle:"",lineHeight:void 0,underline:0,lineThrough:0,scaleIn3d:!1,direction:"horizontal",wordBreak:"break-all",ignoreBuf:!1,verticalMode:0,wrap:!1,whiteSpace:"no-wrap",heightLimit:1/0,lineClamp:1/0,suffixPosition:"end",underlineDash:[],underlineOffset:0,disableAutoClipedPoptip:void 0,measureMode:rt.fontBounding,keepCenterInLine:!1},Te=Object.assign(Object.assign(Object.assign(Object.assign({forceBoundsWidth:void 0,forceBoundsHeight:void 0,opacity:1,background:null,backgroundOpacity:1,backgroundCornerRadius:0,texture:null,textureColor:"black",textureSize:10,texturePadding:2,backgroundMode:"no-repeat",backgroundFit:!0,blur:0,cursor:null,html:null,react:null},{fillOpacity:1,fill:!1,shadowBlur:0,shadowColor:"black",shadowOffsetX:0,shadowOffsetY:0}),Ae),{alignSelf:"auto"}),{pickStrokeBuffer:0}),Se={connectedType:"none",connectedStyle:{},connectedX:NaN,connectedY:NaN},we=Object.assign(Object.assign(Object.assign({strokeSeg:null,renderable:!0,pickable:!0,shadowGraphic:void 0,childrenPickable:!0,fillPickable:!0,strokePickable:!0,visible:!0,zIndex:0,layout:null,boundsPadding:0,fillStrokeOrder:0,renderStyle:"default",pickMode:"accurate",customPickShape:null,boundsMode:"accurate",keepDirIn3d:!0,shadowRootIdx:1,globalZIndex:1,globalCompositeOperation:"",overflow:"hidden",shadowPickMode:"graphic",keepStrokeScale:!1},{_debug_bounds:!1}),Te),ve),Pe=Object.assign(Object.assign({},we),{startAngle:0,endAngle:i.pi2,innerRadius:0,outerRadius:1,innerPadding:0,outerPadding:0,cornerRadius:0,padRadius:0,padAngle:0,cap:!1,forceShowCap:!1}),Me=Object.assign(Object.assign(Object.assign({},we),Se),{points:[],segments:[],curveType:"linear",clipRange:1,closePath:!1,curveTension:1}),Oe=Object.assign(Object.assign({},we),{radius:1,startAngle:0,endAngle:i.pi2}),Ce=Object.assign(Object.assign({},we),{width:0,height:0,cornerRadius:0,path:[],clip:!1,visibleAll:!0,display:"relative",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",alignContent:"flex-start",baseOpacity:1}),ke=Object.assign(Object.assign({},we),{path:"",width:0,height:0,cornerRadius:0,clip:!1}),Le=Object.assign(Object.assign(Object.assign({},we),Se),{points:[],segments:[],curveType:"linear",clipRange:1,clipRangeByDimension:"default",closePath:!1,curveTension:1}),Ee=Object.assign(Object.assign({},we),{path:new ye,fillStrokeOrder:1,customPath:()=>{i.Logger.getInstance().warn("空函数")}}),Ie=Object.assign(Object.assign({},we),{points:[],cornerRadius:0,closePath:!0}),Re=Object.assign(Object.assign({},we),{width:0,height:0,x1:0,y1:0,strokeBoundsBuffer:0,cornerRadius:0});Object.assign(Object.assign({},we),{width:0,height:0,x1:0,y1:0,cornerRadius:0,length:0});const Ue=Object.assign(Object.assign({},we),{symbolType:"circle",size:10,keepDirIn3d:!0}),De=Object.assign(Object.assign(Object.assign({},we),Be),{strokeBoundsBuffer:0,keepDirIn3d:!0}),Ne=Object.assign(Object.assign(Object.assign({},we),Be),{editable:!1,width:300,height:300,ellipsis:!0,wordBreak:"break-word",verticalDirection:"top",textAlign:"left",textBaseline:"top",layoutDirection:"horizontal",textConfig:[],disableAutoWrapLine:!1,maxHeight:void 0,maxWidth:void 0,singleLine:!1}),je=Object.assign(Object.assign({repeatX:"no-repeat",repeatY:"no-repeat",image:"",width:0,height:0},we),{fill:!0,cornerRadius:0}),Fe=Object.assign(Object.assign({},je),{backgroundShowMode:"never",backgroundWidth:0,backgroundHeight:0,textAlign:"left",textBaseline:"middle",direction:"horizontal",margin:0,id:"",width:20,height:20,backgroundFill:"rgba(101, 117, 168, 0.1)",backgroundFillOpacity:1,backgroundStroke:!1,backgroundStrokeOpacity:1,backgroundRadius:4,opacity:1});const ze=new class{};function We(t,e,i){let s=e;const{a:n,b:r,c:a,d:o}=t.currentMatrix,l=Math.sign(n)*Math.sqrt(n*n+r*r),h=Math.sign(o)*Math.sqrt(a*a+o*o);return l+h===0?0:(s=s/Math.abs(l+h)*2*i,s)}const Ge=new class{constructor(t){const e=t||{};e.defaultScope=e.defaultScope||z,this.options=e,this.id=w.GenAutoIncrementId(),this._bindingDictionary=new Map,this._metadataReader=new K}load(t){const e=this._getContainerModuleHelpersFactory()(t.id);t.registry(e.bindFunction,e.unbindFunction,e.isboundFunction,e.rebindFunction)}get(t){const e=this._getNotAllArgs(t,!1);return this._get(e)}getAll(t){const e=this._getAllArgs(t);return this._get(e)}getTagged(t,e,i){const s=this._getNotAllArgs(t,!1,e,i);return this._get(s)}getNamed(t,e){return this.getTagged(t,M,e)}isBound(t){return this._bindingDictionary.has(t)}bind(t){const e=this.options.defaultScope,i=new H(t,e),s=this._bindingDictionary.get(t)||[];return s.push(i),this._bindingDictionary.set(t,s),new Q(i)}unbind(t){this._bindingDictionary.delete(t)}rebind(t){return this.unbind(t),this.bind(t)}_getContainerModuleHelpersFactory(){const t=(t,e)=>{t._binding.moduleId=e},e=e=>i=>{const s=this.bind(i);return t(s,e),s},i=()=>t=>this.unbind(t),s=()=>t=>this.isBound(t),n=e=>i=>{const s=this.rebind(i);return t(s,e),s};return t=>({bindFunction:e(t),isboundFunction:s(),rebindFunction:n(t),unbindFunction:i(),unbindAsyncFunction:t=>null})}_getNotAllArgs(t,e,i,s){return{avoidConstraints:!1,isMultiInject:e,serviceIdentifier:t,key:i,value:s}}_getAllArgs(t){return{avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t}}_get(t){const e=[];return this._bindingDictionary.get(t.serviceIdentifier).filter((e=>e.constraint(t))).forEach((t=>{e.push(this._resolveFromBinding(t))})),t.isMultiInject||1!==e.length?e:e[0]}_getChildRequest(t){const e=t.implementationType,{userGeneratedMetadata:i}=this._metadataReader.getConstructorMetadata(e),s=Object.keys(i),n=[];for(let t=0;t<s.length;t++){const e=i[t],s={};e.forEach((t=>{s[t.key]=t.value}));const r={inject:s[O],multiInject:s.multi_inject},a=r.inject||r.multiInject,o={serviceIdentifier:a,constructorArgsMetadata:e},l=(this._bindingDictionary.get(a)||[]).filter((t=>t.constraint(o)));if(l.length){const t={injectIdentifier:a,metadata:e,bindings:l};n.push(t)}}return n}_resolveFromBinding(t){const e=this._getResolvedFromBinding(t);return this._saveToScope(t,e),e}_getResolvedFromBinding(t){let e;switch(t.type){case W:case Y:e=t.cache;break;case V:e=this._resolveInstance(t,t.implementationType);break;default:e=t.dynamicValue({container:this})}return e}_resolveInstance(t,e){if(t.activated)return t.cache;const i=this._getChildRequest(t);return this._createInstance(e,i)}_createInstance(t,e){return e.length?new t(...this._resolveRequests(e)):new t}_resolveRequests(t){return t.map((t=>t.bindings.length>1?t.bindings.map((t=>this._resolveFromBinding(t))):this._resolveFromBinding(t.bindings[0])))}_saveToScope(t,e){t.scope===F&&(t.cache=e,t.activated=!0)}},$e=Symbol.for("CanvasFactory");function Ye(t){return Ge.getNamed($e,ze.global.env)(t)}const Ve=new class{constructor(){this.pools=[],this.allocatedCanvas=[]}shareCanvas(){return this.allocatedCanvas.length?this.allocatedCanvas[0]:this.getCommonCanvas()}getCommonCanvas(){return this._commonCanvas||(this._commonCanvas=this.allocate({width:100,height:100,dpr:2})),this._commonCanvas}allocate(t){if(!this.pools.length){const e=Ye(Object.assign({nativeCanvas:ze.global.createCanvas(t)},t));return this.allocatedCanvas.push(e),e}const e=this.pools.pop();return e.resize(t.width,t.height),e.dpr=t.dpr,e}allocateByObj(t){if(!this.pools.length){const e={width:t.width/t.dpr,height:t.height/t.dpr,dpr:t.dpr},i=Ye(Object.assign({nativeCanvas:ze.global.createCanvas(e)},e));return this.allocatedCanvas.push(i),i}const e=this.pools.pop();return e.width=t.width,e.height=t.height,e}free(t){this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}},Xe={arc:Pe,area:Me,circle:Oe,line:Le,path:Ee,symbol:Ue,text:De,rect:Re,polygon:Ie,richtext:Ne,richtextIcon:Fe,image:je,group:Ce,glyph:ke},He=Object.keys(Xe);function Ke(t,e){Object.keys(e).forEach((i=>{t[i]=e[i]}))}const qe={arc:Object.assign({},Xe.arc),area:Object.assign({},Xe.area),circle:Object.assign({},Xe.circle),line:Object.assign({},Xe.line),path:Object.assign({},Xe.path),symbol:Object.assign({},Xe.symbol),text:Object.assign({},Xe.text),rect:Object.assign({},Xe.rect),polygon:Object.assign({},Xe.polygon),richtext:Object.assign({},Xe.richtext),richtextIcon:Object.assign({},Xe.richtextIcon),image:Object.assign({},Xe.image),group:Object.assign({},Xe.group),glyph:Object.assign({},Xe.glyph)};class Ze{constructor(){this.initTheme(),this.dirty=!1}initTheme(){this._defaultTheme={},He.forEach((t=>{this._defaultTheme[t]=Object.create(qe[t])})),this.combinedTheme=this._defaultTheme}getTheme(t){if(!t)return this.combinedTheme;if(!this.dirty)return this.combinedTheme;let e={};const i=this.getParentWithTheme(t);return i&&(e=i.theme),this.applyTheme(t,e),this.combinedTheme}getParentWithTheme(t){for(;t.parent;)if((t=t.parent).theme)return t;return null}applyTheme(t,e){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.dirty){const n=this.getParentWithTheme(t);if(n){const t=n.theme;(t.dirty||s)&&t.applyTheme(n,e,!0)}this.userTheme?this.doCombine(n&&n.theme.combinedTheme):(n?this.combinedTheme=n.theme.combinedTheme:(this.combinedTheme=this._defaultTheme,i.Logger.getInstance().warn("未知错误,走到不应该走的区域里")),this.dirty=!1)}return this.combinedTheme}doCombine(t){const e=this.userTheme,i=this.combinedTheme;He.forEach((s=>{const n=Object.create(qe[s]);t&&t[s]&&Ke(n,t[s]),i[s]&&Ke(n,i[s]),e[s]&&Ke(n,e[s]),this.combinedTheme[s]=n})),e.common&&He.forEach((t=>{Ke(this.combinedTheme[t],e.common)})),this.dirty=!1}setTheme(t,e){let i=this.userTheme;i?Object.keys(t).forEach((e=>{i[e]?Object.assign(i[e],t[e]):i[e]=Object.assign({},t[e])})):i=t,this.userTheme=i,this.dirty=!0,this.dirtyChildren(e)}resetTheme(t,e){this.userTheme=t,this.dirty=!0,this.dirtyChildren(e)}dirtyChildren(t){t.forEachChildren((t=>{t.isContainer&&(t.theme&&(t.theme.dirty=!0),this.dirtyChildren(t))}))}}const Je=new Ze;function Qe(t,e){return t.glyphHost?Qe(t.glyphHost):e?(t.isContainer,e):function(t){let e;if(e=t.isContainer?t:t.parent,e){for(;e&&!e.theme;)e=e.parent;return e?(e.theme||e.createTheme(),e.theme.getTheme(e)):Je.getTheme()}return null}(t)||t.attachedThemeGraphic&&Qe(t.attachedThemeGraphic)||Je.getTheme()}var ti=function(t,e,i,s){return new(i||(i=Promise))((function(n,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function o(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,o)}l((s=s.apply(t,e||[])).next())}))};class ei extends i.EventEmitter{get previousSibling(){return this._prev}get nextSibling(){return this._next}get children(){return this.getChildren()}get firstChild(){return this._firstChild}get lastChild(){return this._lastChild}get count(){return this._count}get childrenCount(){return this._idMap?this._idMap.size:0}constructor(){super(),this._uid=w.GenAutoIncrementId(),this._firstChild=null,this._lastChild=null,this.parent=null,this._count=1}forEachChildren(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){let e=this._lastChild,i=0;for(;e;){if(t(e,i++))return;e=e._prev}}else{let e=this._firstChild,i=0;for(;e;){if(t(e,i++))return;e=e._next}}}forEachChildrenAsync(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ti(this,void 0,void 0,(function*(){if(e){let e=this._lastChild,i=0;for(;e;){let s=t(e,i++);if(s.then&&(s=yield s),s)return;e=e._prev}}else{let e=this._firstChild,i=0;for(;e;){let s=t(e,i++);if(s.then&&(s=yield s),s)return;e=e._next}}}))}forEach(t){return this.forEachChildren(t)}appendChild(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._uid===t._uid)return null;if(!e&&t.isAncestorsOf(this))throw new Error("【Node::appendChild】不能将父辈元素append为子元素");return t.parent&&t.parent.removeChild(t),t.parent=this,this._lastChild?(this._lastChild._next=t,t._prev=this._lastChild,this._lastChild=t):(this._firstChild=this._lastChild=t,t._prev=t._next=null),this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this.setCount(t.count),this._structEdit=!0,t}appendChildArrHighPerformance(t){return console.error("暂不支持该函数"),t}insertBefore(t,e){if(!e)return this.appendChild(t);if(this===t||t===e)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,t._prev=e._prev,e._prev?e._prev._next=t:this._firstChild=t,e._prev=t,t._next=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}insertAfter(t,e){if(!e)return this.appendChild(t);if(this===t||t===e)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertAfter】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,e._next?(e._next._prev=t,t._next=e._next):this._lastChild=t,e._next=t,t._prev=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}insertInto(t,e){if(!this._ignoreWarn&&this._nodeList&&i.Logger.getInstance().warn("insertIntoKeepIdx和insertInto混用可能会存在错误"),e>=this.childrenCount)return this.appendChild(t);if(this===t)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");if(t.parent&&t.parent.removeChild(t),t.parent=this,0===e)t._next=this._firstChild,this._firstChild&&(this._firstChild._prev=t),t._prev=null,this._firstChild=t;else{let i=this._firstChild;for(let t=0;t<e;t++){if(!i)return null;t>0&&(i=i._next)}if(!i)return null;t._next=i._next,t._prev=i,i._next=t,t._next&&(t._next._prev=t)}return this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t}insertIntoKeepIdx(t,e){if(this._nodeList||(this._nodeList=this.children),this._nodeList[e]){const i=this._nodeList[e];return this._nodeList.splice(e,0,t),this.insertBefore(t,i)}let i;this._nodeList[e]=t;for(let t=e-1;t>=0&&(i=this._nodeList[t],!i);t--);if(i)return i._next?this.insertBefore(t,i._next):this.appendChild(t);this._ignoreWarn=!0;const s=this.insertInto(t,0);return this._ignoreWarn=!1,s}removeChild(t){if(!this._idMap)return null;if(!this._idMap.has(t._uid))return null;if(this._idMap.delete(t._uid),this._nodeList){const e=this._nodeList.findIndex((e=>e===t));e>=0&&this._nodeList.splice(e,1)}return t._prev?t._prev._next=t._next:this._firstChild=t._next,t._next?t._next._prev=t._prev:this._lastChild=t._prev,t.parent=null,t._prev=null,t._next=null,this._structEdit=!0,this.setCount(-t.count),t}delete(){this.parent&&this.parent.removeChild(this)}removeAllChild(t){if(!this._idMap)return;this._nodeList&&(this._nodeList.length=0);let e=this._firstChild;for(;e;){const t=e._next;e.parent=null,e._prev=null,e._next=null,e=e._next,e=t}this._firstChild=null,this._lastChild=null,this._idMap.clear(),this._structEdit=!0,this.setCount(1-this._count)}replaceChild(t,e){throw new Error("暂不支持")}find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=null;return this.forEachChildren(((e,s)=>!(e===this||!t(e,s)||(i=e,0)))),e&&this.forEachChildren((e=>{if(e.isContainer){const s=e.find(t,!0);if(s)return i=s,!0}return!1})),i}findAll(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return this.forEachChildren(((e,s)=>{e!==this&&t(e,s)&&i.push(e)})),e&&this.forEachChildren((e=>{if(e.isContainer){const s=e.findAll(t,!0);s.length&&(i=i.concat(s))}})),i}getElementById(t){return this.find((e=>e.id===t),!0)}findChildById(t){return this.getElementById(t)}findChildByUid(t){return this._idMap&&this._idMap.get(t)||null}getElementsByName(t){return this.findAll((e=>e.name===t),!0)}findChildrenByName(t){return this.getElementsByName(t)}getElementsByType(t){return this.findAll((e=>e.type===t),!0)}getChildByName(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.find((e=>e.name===t),e)}getChildAt(t){let e=this._firstChild;if(!e)return null;for(let i=0;i<t;i++){if(!e._next)return null;e=e._next}return e}at(t){return this.getChildAt(t)}containNode(t){if(!this._idMap)return!1;if(this._idMap.has(t._uid))return!0;let e=this._firstChild;for(;e;){if(e.containNode(t))return!0;e=e._next}return!1}getRootNode(){let t=this.parent;for(;null==t?void 0:t.parent;)t=t.parent;return t||this}hasChildNodes(){return null!==this._firstChild}addChild(t){return this.appendChild(t)}add(t){return this.appendChild(t)}getChildren(){const t=[];let e=this._firstChild;for(;e;)t.push(e),e=e._next;return t}isChildOf(t){return!!this.parent&&this.parent._uid===t._uid}isParentOf(t){return t.isChildOf(this)}isDescendantsOf(t){let e=this.parent;if(!e)return!1;do{if(e._uid===t._uid)return!0;e=e.parent}while(null!==e);return!1}isAncestorsOf(t){return t.isDescendantsOf(this)}getAncestor(t){throw new Error("暂不支持")}setAllDescendantsProps(t,e){let i=this._firstChild;for(;i;)i[t]=e,i.setAllDescendantsProps(t,e),i=i._next}setCount(t){this._count+=t;let e=this.parent;if(e)do{e._count+=t,e=e.parent}while(null!==e)}clone(){throw new Error("暂不支持")}cloneTo(t){throw new Error("暂不支持")}getParent(){return this.parent}del(t){return this.removeChild(t)}addEventListener(t,e,s){const n=i.isBoolean(s,!0)&&s||i.isObject(s)&&s.capture,r=i.isObject(s)&&s.once,a=i.isFunction(e)?void 0:e;return t=n?`${t}capture`:t,e=i.isFunction(e)?e:e.handleEvent,r?super.once(t,e,a):super.on(t,e,a),this}on(t,e,i){return this.addEventListener(t,e,i)}removeEventListener(t,e,s){const n=i.isBoolean(s,!0)&&s||i.isObject(s)&&s.capture,r=i.isFunction(e)?void 0:e;t=n?`${t}capture`:t,e=i.isFunction(e)?e:e.handleEvent;const a=i.isObject(s)&&s.once;return super.off(t,e,r,a),this}off(t,e,i){return this.removeEventListener(t,e,i)}once(t,e,s){return i.isObject(s)?(s.once=!0,this.addEventListener(t,e,s)):this.addEventListener(t,e,{once:!0})}removeAllEventListeners(){return super.removeAllListeners(),this}removeAllListeners(){return this.removeAllEventListeners()}dispatchEvent(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return super.emit(t.type,t,...i),!t.defaultPrevented}emit(t,e){return this.dispatchEvent(t,e)}release(){this.removeAllListeners()}}class ii{get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get x(){return this.canvas.x}get y(){return this.canvas.y}get canvasX(){return this.canvas.x}get canvasY(){return this.canvas.y}get viewX(){return this.viewport.x}get viewY(){return this.viewport.y}constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=ii.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer={x:0,y:0},this.page={x:0,y:0},this.canvas={x:0,y:0},this.viewport={x:0,y:0},this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}composedPath(){return!this.manager||this.path&&this.path[this.path.length-1]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.composedDetailPath(),this.path}composedDetailPath(){return this.pickParams&&this.pickParams.graphic?(this.detailPath=this.path.slice(),this._composedDetailPath(this.pickParams)):this.detailPath=this.path.slice(),this.detailPath}_composedDetailPath(t){if(t&&t.graphic){const e=this.pickParams.graphic;if(e.stage){const i=e.stage.eventSystem.manager.propagationPath(e);this.detailPath.push(i),this._composedDetailPath(t.params)}}}preventDefault(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault()}catch(t){this.nativeEvent.preventDefault&&i.isFunction(this.nativeEvent.preventDefault)&&this.nativeEvent.preventDefault()}this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.stopPropagation()}catch(t){this.nativeEvent.stopPropagation&&i.isFunction(this.nativeEvent.stopPropagation)&&this.nativeEvent.stopPropagation()}this.propagationStopped=!0}initEvent(){}initUIEvent(){}clone(){throw new Error("Method not implemented.")}}class si extends ii{constructor(t,e){super(),this.type=t,this.detail=e}}const ni={dispatchEvent(t){var e;if(!(t instanceof ii))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return t.defaultPrevented=!1,t.path=[],t.detailPath&&(t.detailPath=[]),t.target=this,null===(e=null==t?void 0:t.manager)||void 0===e||e.dispatchEvent(t),!t.defaultPrevented},emit(t,e){return this.dispatchEvent(new si(t,e))}};class ri{constructor(){}static linear(t){return t}static none(){return this.linear}static get(t){return t<-1?t=-1:t>1&&(t=1),function(e){return 0===t?e:t<0?e*(e*-t+1+t):e*((2-e)*t+(1-t))}}static getPowIn(t){return function(e){return Math.pow(e,t)}}static getPowOut(t){return function(e){return 1-Math.pow(1-e,t)}}static getPowInOut(t){return function(e){return(e*=2)<1?.5*Math.pow(e,t):1-.5*Math.abs(Math.pow(2-e,t))}}static getBackIn(t){return function(e){return e*e*((t+1)*e-t)}}static getBackOut(t){return function(e){return--e*e*((t+1)*e+t)+1}}static getBackInOut(t){return t*=1.525,function(e){return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}static sineIn(t){return 1-Math.cos(t*Math.PI/2)}static sineOut(t){return Math.sin(t*Math.PI/2)}static sineInOut(t){return-(Math.cos(Math.PI*t)-1)/2}static expoIn(t){return 0===t?0:Math.pow(2,10*t-10)}static expoOut(t){return 1===t?1:1-Math.pow(2,-10*t)}static expoInOut(t){return 0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2}static circIn(t){return-(Math.sqrt(1-t*t)-1)}static circOut(t){return Math.sqrt(1- --t*t)}static circInOut(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}static bounceOut(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}static bounceIn(t){return 1-ri.bounceOut(1-t)}static bounceInOut(t){return t<.5?.5*ri.bounceIn(2*t):.5*ri.bounceOut(2*t-1)+.5}static getElasticIn(t,e){return function(s){if(0===s||1===s)return s;const n=e/i.pi2*Math.asin(1/t);return-t*Math.pow(2,10*(s-=1))*Math.sin((s-n)*i.pi2/e)}}static getElasticOut(t,e){return function(s){if(0===s||1===s)return s;const n=e/i.pi2*Math.asin(1/t);return t*Math.pow(2,-10*s)*Math.sin((s-n)*i.pi2/e)+1}}static getElasticInOut(t,e){return function(s){const n=e/i.pi2*Math.asin(1/t);return(s*=2)<1?t*Math.pow(2,10*(s-=1))*Math.sin((s-n)*i.pi2/e)*-.5:t*Math.pow(2,-10*(s-=1))*Math.sin((s-n)*i.pi2/e)*.5+1}}}ri.quadIn=ri.getPowIn(2),ri.quadOut=ri.getPowOut(2),ri.quadInOut=ri.getPowInOut(2),ri.cubicIn=ri.getPowIn(3),ri.cubicOut=ri.getPowOut(3),ri.cubicInOut=ri.getPowInOut(3),ri.quartIn=ri.getPowIn(4),ri.quartOut=ri.getPowOut(4),ri.quartInOut=ri.getPowInOut(4),ri.quintIn=ri.getPowIn(5),ri.quintOut=ri.getPowOut(5),ri.quintInOut=ri.getPowInOut(5),ri.backIn=ri.getBackIn(1.7),ri.backOut=ri.getBackOut(1.7),ri.backInOut=ri.getBackInOut(1.7),ri.elasticIn=ri.getElasticIn(1,.3),ri.elasticOut=ri.getElasticOut(1,.3),ri.elasticInOut=ri.getElasticInOut(1,.3*1.5);const ai=new class{constructor(){this.id=w.GenAutoIncrementId(),this.animateHead=null,this.animateTail=null,this.animateCount=0,this.paused=!1}addAnimate(t){this.animateTail?(this.animateTail.nextAnimate=t,t.prevAnimate=this.animateTail,this.animateTail=t,t.nextAnimate=null):(this.animateHead=t,this.animateTail=t),this.animateCount++}pause(){this.paused=!0}resume(){this.paused=!1}tick(t){if(this.paused)return;let e=this.animateHead;for(this.animateCount=0;e;)e.status===Ot.END?this.removeAnimate(e):e.status===Ot.RUNNING||e.status===Ot.INITIAL?(this.animateCount++,e.advance(t)):e.status===Ot.PAUSED&&this.animateCount++,e=e.nextAnimate}clear(){let t=this.animateHead;for(;t;)t.release(),t=t.nextAnimate;this.animateHead=null,this.animateTail=null,this.animateCount=0}removeAnimate(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t._onRemove&&t._onRemove.forEach((t=>t())),t===this.animateHead?(this.animateHead=t.nextAnimate,t===this.animateTail?this.animateTail=null:this.animateHead.prevAnimate=null):t===this.animateTail?(this.animateTail=t.prevAnimate,this.animateTail.nextAnimate=null):(t.prevAnimate.nextAnimate=t.nextAnimate,t.nextAnimate.prevAnimate=t.prevAnimate),e&&t.release()}};class oi{constructor(t,e,i,s,n){this.from=t,this.to=e,this.duration=i,this.easing=s,this.params=n,this.updateCount=0}bind(t,e){this.target=t,this.subAnimate=e,this.onBind()}onBind(){}onFirstRun(){}onStart(){}onEnd(){}getEndProps(){return this.to}getFromProps(){return this.from}getMergedEndProps(){var t;const e=this.getEndProps();return e?this._endProps===e?this._mergedEndProps:(this._endProps=e,void(this._mergedEndProps=Object.assign({},null!==(t=this.step.prev.getLastProps())&&void 0!==t?t:{},e))):this.step.prev?this.step.prev.getLastProps():e}update(t,e,i){if(0===this.updateCount){this.onFirstRun();const t=this.step.getLastProps();Object.keys(t).forEach((e=>{this.subAnimate.animate.validAttr(e)&&(i[e]=t[e])}))}this.updateCount+=1,this.onUpdate(t,e,i),t&&this.onEnd()}}class li extends oi{constructor(t){super(null,null,0,"linear"),this.cb=t}onUpdate(t,e,i){}onStart(){this.cb()}}class hi{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w.GenAutoIncrementId(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ai,i=arguments.length>2?arguments[2]:void 0;this.id=t,this.timeline=e||ai,this.status=Ot.INITIAL,this.tailAnimate=new ci(this),this.subAnimates=[this.tailAnimate],this.timeScale=1,this.rawPosition=-1,this._startTime=0,this._duringTime=0,this.timeline.addAnimate(this),this.slience=i}setTimeline(t){t!==this.timeline&&(this.timeline.removeAnimate(this,!1),t.addAnimate(this))}getStartTime(){return this._startTime}getDuration(){return this.subAnimates.reduce(((t,e)=>t+e.totalDuration),0)}after(t){const e=t.getDuration();return this._startTime=e,this}afterAll(t){let e=-1/0;return t.forEach((t=>{e=i.max(t.getDuration(),e)})),this._startTime=e,this}parallel(t){return this._startTime=t.getStartTime(),this}static AddInterpolate(t,e){hi.interpolateMap.set(t,e)}play(t){if(this.tailAnimate.play(t),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return 1===this.subAnimates.length&&this.tailAnimate.totalDuration===t.duration&&this.trySetAttribute(t.getFromProps(),t.mode),this}trySetAttribute(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hi.mode;t&&e&Ct.SET_ATTR_IMMEDIATELY&&this.target.setAttributes&&this.target.setAttributes(t,!1,{type:Mt.ANIMATE_PLAY})}runCb(t){const e=new li((()=>{t(this,e.step.prev)}));return this.tailAnimate.play(e),this}customInterpolate(t,e,i,s,n,r){const a=hi.interpolateMap.get(t)||hi.interpolateMap.get("");return!!a&&a(t,e,i,s,n,r)}pause(){this.status===Ot.RUNNING&&(this.status=Ot.PAUSED)}resume(){this.status===Ot.PAUSED&&(this.status=Ot.RUNNING)}to(t,e,i,s){if(this.tailAnimate.to(t,e,i,s),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}from(t,e,i,s){if(this.tailAnimate.from(t,e,i,s),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}wait(t){if(this.tailAnimate.wait(t),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}startAt(t){if(this.tailAnimate.startAt(t),this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}loop(t){if(this.tailAnimate.loop=t,this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}reversed(t){if(this.tailAnimate.reversed=t,this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}bounce(t){if(this.tailAnimate.bounce=t,this.target){const t=this.target.stage;t&&t.renderNextFrame()}return this}subAnimate(){const t=new ci(this,this.tailAnimate);return this.tailAnimate=t,this.subAnimates.push(t),t.bind(this.target),this}getStartProps(){return this.subAnimates[0].getStartProps()}getEndProps(){return this.tailAnimate.getEndProps()}depreventAttr(t){this._preventAttrs&&this._preventAttrs.delete(t)}preventAttr(t){this._preventAttrs||(this._preventAttrs=new Set),this._preventAttrs.add(t)}preventAttrs(t){t.forEach((t=>this.preventAttr(t)))}validAttr(t){return!this._preventAttrs||!this._preventAttrs.has(t)}bind(t){return this.target=t,this.target.onAnimateBind&&!this.slience&&this.target.onAnimateBind(this),this.subAnimates.forEach((e=>{e.bind(t)})),this}advance(t){if(this._duringTime<this._startTime){if(this._duringTime+t*this.timeScale<this._startTime)return void(this._duringTime+=t*this.timeScale);t=this._duringTime+t*this.timeScale-this._startTime,this._duringTime=this._startTime}this.status===Ot.INITIAL&&(this.status=Ot.RUNNING,this._onStart&&this._onStart.forEach((t=>t()))),this.setPosition(Math.max(this.rawPosition,0)+t*this.timeScale)&&this.status===Ot.RUNNING&&(this.status=Ot.END,this._onEnd&&this._onEnd.forEach((t=>t())))}setPosition(t){let e,i=0;const s=this.rawPosition,n=this.subAnimates.reduce(((t,e)=>t+e.totalDuration),0);t<0&&(t=0);const r=t>=n;if(r&&(t=n),t===s)return r;for(let s=0;s<this.subAnimates.length&&(e=this.subAnimates[s],!(i+e.totalDuration>=t));s++)i+=e.totalDuration,e=void 0;return this.rawPosition=t,e.setPosition(t-i),r}onStart(t){this._onStart||(this._onStart=[]),this._onStart.push(t)}onEnd(t){this._onEnd||(this._onEnd=[]),this._onEnd.push(t)}onRemove(t){this._onRemove||(this._onRemove=[]),this._onRemove.push(t)}onFrame(t){this._onFrame||(this._onFrame=[]),this._onFrame.push(t)}release(){this.status=Ot.END}stop(t){t||this.target.onStop(),"start"===t?this.target.onStop(this.getStartProps()):"end"===t?this.target.onStop(this.getEndProps()):this.target.onStop(t),this.release()}}hi.mode=Ct.NORMAL,hi.interpolateMap=new Map;class ci{get totalDuration(){return this.calcAttr(),this._totalDuration+this._startAt}constructor(t,e){this.rawPosition=-1,this.position=0,this.loop=0,this.duration=0,this.animate=t,this.stepHead=new di(0,0,e?Object.assign({},e.stepTail.props):{}),this.stepTail=this.stepHead,this.dirty=!0,this._startAt=0}calcAttr(){this.dirty&&(this._totalDuration=this.duration*(this.loop+1))}bind(t){return this.target=t,this}play(t){let e=t.duration;(null==e||e<0)&&(e=0);const i=t.easing,s="string"==typeof i?ri[i]:i,n=this._addStep(e,null,s);return n.type=kt.customAnimate,this._appendProps(t.getEndProps(),n,!1),this._appendCustomAnimate(t,n),this}to(t,e,i,s){(null==e||e<0)&&(e=0);const n="string"==typeof i?ri[i]:i,r=this._addStep(e,null,n);return r.type=kt.to,this._appendProps(t,r,!!s&&s.tempProps),r.propKeys||(r.propKeys=Object.keys(r.props)),s&&s.noPreventAttrs||this.target.animates.forEach((t=>{t.id!==this.animate.id&&t.preventAttrs(r.propKeys)})),this}from(t,e,i,s){this.to(t,0,i,s);const n={};this.stepTail.propKeys||(this.stepTail.propKeys=Object.keys(this.stepTail.props)),this.stepTail.propKeys.forEach((t=>{n[t]=this.getLastPropByName(t,this.stepTail)})),this.to(n,e,i,s),this.stepTail.type=kt.from}startAt(t){return t<0&&(t=0),this._startAt=t,this}getStartProps(){var t;return null===(t=this.stepHead)||void 0===t?void 0:t.props}getEndProps(){return this.stepTail.props}getLastStep(){return this._lastStep}wait(t){if(t>0){const e=this._addStep(+t,null);e.type=kt.wait,e.prev.customAnimate?e.props=e.prev.customAnimate.getEndProps():e.props=e.prev.props,this.target.onAddStep&&this.target.onAddStep(e)}return this}_addStep(t,e,i){const s=new di(this.duration,t,e,i);return this.duration+=t,this.stepTail.append(s),this.stepTail=s,s}_appendProps(t,e,i){e.props=i?t:Object.assign({},t);let s=e.prev;const n=e.props;for(e.propKeys||(e.propKeys=Object.keys(e.props)),e.propKeys.forEach((t=>{void 0===e.props[t]&&(e.props[t]=this.target.getDefaultAttribute(t))}));s.prev;)s.props&&(s.propKeys||(s.propKeys=Object.keys(s.props)),s.propKeys.forEach((t=>{void 0===n[t]&&(n[t]=s.props[t])}))),e.propKeys=Object.keys(e.props),s=s.prev;const r=this.stepHead.props;e.propKeys||(e.propKeys=Object.keys(n)),e.propKeys.forEach((t=>{if(void 0===r[t]){const e=this.animate.getStartProps();r[t]=e[t]=this.target.getComputedAttribute(t)}})),this.target.onAddStep&&this.target.onAddStep(e)}_appendCustomAnimate(t,e){e.customAnimate=t,t.step=e,t.bind(this.target,this)}setPosition(t){var e;const i=this.duration,s=this.loop,n=this.rawPosition;let r,a,o=!1;const l=null!==(e=this._startAt)&&void 0!==e?e:0;if(t<0&&(t=0),t<l)return this.rawPosition=t,!1;if(t-=l,i<=0&&(o=!0,i<0))return o;if(r=Math.floor(t/i),a=t-r*i,o=t>=s*i+i,o&&(a=i,r=s,t=a*r+i),t===n)return o;const h=!this.reversed!=!(this.bounce&&r%2);return h&&(a=i-a),this._deltaPosition=a-this.position,this.position=a,this.rawPosition=t+l,this.updatePosition(o,h),o}updatePosition(t,e){if(!this.stepHead)return;let i=this.stepHead.next;const s=this.position,n=this.duration;if(this.target&&i){let r=i.next;for(;r&&r.position<=s;)i=r,r=i.next;let a=t?0===n?1:s/n:(s-i.position)/i.duration;i.easing&&(a=i.easing(a)),this.tryCallCustomAnimateLifeCycle(i,this._lastStep||(e?this.stepTail:this.stepHead),e),this.updateTarget(i,a,t),this._lastStep=i,this.animate._onFrame&&this.animate._onFrame.forEach((t=>t(i,a)))}}tryCallCustomAnimateLifeCycle(t,e,i){if(t!==e)if(i){let i=e.prev;for(;i&&i!==t;)i.customAnimate&&(i.customAnimate.onStart&&i.customAnimate.onStart(),i.customAnimate.onEnd&&i.customAnimate.onEnd()),i=t.prev;e&&e.customAnimate&&e.customAnimate.onEnd&&e.customAnimate.onEnd(),t&&t.customAnimate&&t.customAnimate.onStart&&t.customAnimate.onStart()}else{let i=e.next;for(;i&&i!==t;)i.customAnimate&&(i.customAnimate.onStart&&i.customAnimate.onStart(),i.customAnimate.onEnd&&i.customAnimate.onEnd()),i=i.next;e&&e.customAnimate&&e.customAnimate.onEnd&&e.customAnimate.onEnd(),t&&t.customAnimate&&t.customAnimate.onStart&&t.customAnimate.onStart()}}getLastPropByName(t,e){let s=e.prev;for(;s;){if(s.props&&void 0!==s.props[t])return s.props[t];if(s.customAnimate){const e=s.customAnimate.getEndProps()[t];if(void 0!==e)return e}s=s.prev}return i.Logger.getInstance().warn("未知错误,step中找不到属性"),e.props[t]}updateTarget(t,e,i){null==t.props&&null==t.customAnimate||this.target.onStep(this,this.animate,t,e,i)}}class di{constructor(t,e,i,s){this.duration=e,this.position=t,this.props=i,this.easing=s}append(t){t.prev=this,t.next=this.next,this.next=t}getLastProps(){let t=this.prev;for(;t;){if(t.props)return t.props;if(t.customAnimate)return t.customAnimate.getMergedEndProps();t=t.prev}return null}}const ui=200,pi="cubicOut";var fi;!function(t){t[t.Top=1]="Top",t[t.Right=2]="Right",t[t.Bottom=4]="Bottom",t[t.Left=8]="Left",t[t.ALL=15]="ALL"}(fi||(fi={}));const gi=[0,0,0,0];function mi(t,e,s){const{x:n,y:r}=i.pointAt(t.x,t.y,e.x,e.y,s),{x:a,y:o}=i.pointAt(t.x1,t.y1,e.x1,e.y1,s),l=new i.Point(n,r,a,o);return l.defined=e.defined,l}function yi(t,e,s){if(!t||!e)return[];Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]);let n=[];if(t.length>e.length){n=e.map((t=>{const e=new i.Point(t.x,t.y,t.x1,t.y1);return e.defined=t.defined,e}));for(let i=0;i<e.length;i++)n[i]=mi(t[i],e[i],s)}else{n=e.map((t=>{const e=new i.Point(t.x,t.y,t.x1,t.y1);return e.defined=t.defined,e}));for(let i=0;i<t.length;i++)n[i]=mi(t[i],e[i],s)}return n}const bi=(t,e)=>{const s=((t,e)=>i.isString(t)&&"%"===t[t.length-1]?e*(Number.parseFloat(t.substring(0,t.length-1))/100):t)(t,e);return isNaN(s)?s:Math.max(e,s)};var xi;!function(t){t[t.Color255=0]="Color255",t[t.Color1=1]="Color1"}(xi||(xi={}));class vi{static Get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xi.Color1,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,0,1];if(e===xi.Color1){const e=vi.store1[t];if(e)return s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s;const n=i.Color.parseColorString(t);if(n){const e=[n.r/255,n.g/255,n.b/255,n.opacity];vi.store1[t]=e,vi.store255[t]=[n.r,n.g,n.b,n.opacity],s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3]}return s}const n=vi.store255[t];if(n)return s[0]=n[0],s[1]=n[1],s[2]=n[2],s[3]=n[3],s;const r=i.Color.parseColorString(t);return r&&(vi.store1[t]=[r.r/255,r.g/255,r.b/255,r.opacity],vi.store255[t]=[r.r,r.g,r.b,r.opacity],s[0]=r.r,s[1]=r.g,s[2]=r.b,s[3]=r.opacity),s}static Set(t,e,i){if(e===xi.Color1){if(vi.store1[t])return;vi.store1[t]=i,vi.store255[t]=[Math.floor(255*i[0]),Math.floor(255*i[1]),Math.floor(255*i[2]),Math.floor(255*i[3])]}else{if(vi.store255[t])return;vi.store255[t]=i,vi.store1[t]=[i[0]/255,i[1]/255,i[2]/255,i[3]]}}}function _i(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(t)&&i.isNumber(t[0])?e?`rgb(${Math.round(t[0])},${Math.round(t[1])},${Math.round(t[2])},${t[3].toFixed(2)})`:`rgb(${Math.round(t[0])},${Math.round(t[1])},${Math.round(t[2])})`:t}function Ai(t,e,s,n,r){return Array.isArray(t)&&!i.isNumber(t[0])||Array.isArray(e)&&!i.isNumber(e[0])?new Array(4).fill(0).map(((r,a)=>Bi(i.isArray(t)?t[a]:t,i.isArray(e)?e[a]:e,s,n))):Bi(t,e,s,n,r)}function Bi(t,e,i,s,n){if(!t||!e)return t&&_i(t)||e&&_i(e)||!1;let r,a,o=!1,l=!1;if(Array.isArray(t)?r=t:"string"==typeof t?r=vi.Get(t,xi.Color255):o=!0,Array.isArray(e)?a=e:"string"==typeof e?a=vi.Get(e,xi.Color255):l=!0,o!==l){const r=o?t:e,a=o?e:t,l=Object.assign(Object.assign({},r),{stops:r.stops.map((t=>Object.assign(Object.assign({},t),{color:_i(a)})))});return o?Ai(r,l,i,s,n):Ai(l,r,i,s,n)}if(o){if(t.gradient===e.gradient){const s=t,n=e,r=s.stops,a=n.stops;if(r.length!==a.length)return!1;if("linear"===s.gradient)return function(t,e,i){const s=t.stops,n=e.stops;return{gradient:"linear",x0:t.x0+(e.x0-t.x0)*i,x1:t.x1+(e.x1-t.x1)*i,y0:t.y0+(e.y0-t.y0)*i,y1:t.y1+(e.y1-t.y1)*i,stops:new Array(s.length).fill(0).map(((t,e)=>({color:wi(s[e].color,n[e].color,i),offset:s[e].offset+(n[e].offset-s[e].offset)*i})))}}(s,n,i);if("radial"===s.gradient)return function(t,e,i){const s=t.stops,n=e.stops;return{gradient:"radial",x0:t.x0+(e.x0-t.x0)*i,x1:t.x1+(e.x1-t.x1)*i,y0:t.y0+(e.y0-t.y0)*i,y1:t.y1+(e.y1-t.y1)*i,r0:t.r0+(e.r0-t.r0)*i,r1:t.r1+(e.r1-t.r1)*i,stops:new Array(s.length).fill(0).map(((t,e)=>({color:wi(s[e].color,n[e].color,i),offset:s[e].offset+(n[e].offset-s[e].offset)*i})))}}(s,n,i);if("conical"===s.gradient)return function(t,e,i){const s=t.stops,n=e.stops;return{gradient:"conical",startAngle:t.startAngle+(e.startAngle-t.startAngle)*i,endAngle:t.endAngle+(e.endAngle-t.endAngle)*i,x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i,stops:new Array(s.length).fill(0).map(((t,e)=>({color:wi(s[e].color,n[e].color,i),offset:s[e].offset+(n[e].offset-s[e].offset)*i})))}}(s,n,i)}return!1}return n&&n(r,a),_i(function(t,e,i){return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i,t[2]+(e[2]-t[2])*i,t[3]+(e[3]-t[3])*i]}(r,a,i),s)}vi.store255={},vi.store1={};const Ti=[0,0,0,0],Si=[0,0,0,0];function wi(t,e,i){return vi.Get(t,xi.Color255,Ti),vi.Get(e,xi.Color255,Si),`rgba(${Math.round(Ti[0]+(Si[0]-Ti[0])*i)},${Math.round(Ti[1]+(Si[1]-Ti[1])*i)},${Math.round(Ti[2]+(Si[2]-Ti[2])*i)},${Ti[3]+(Si[3]-Ti[3])*i})`}class Pi{static GetImage(t,e){var i;const s=Pi.cache.get(t);s?"fail"===s.loadState?ze.global.getRequestAnimationFrame()((()=>{e.imageLoadFail(t)})):"init"===s.loadState||"loading"===s.loadState?null===(i=s.waitingMark)||void 0===i||i.push(e):e&&e.imageLoadSuccess(t,s.data):Pi.loadImage(t,e)}static GetSvg(t,e){var i;let s=Pi.cache.get(t);s?"fail"===s.loadState?ze.global.getRequestAnimationFrame()((()=>{e.imageLoadFail(t)})):"init"===s.loadState||"loading"===s.loadState?null===(i=s.waitingMark)||void 0===i||i.push(e):e&&e.imageLoadSuccess(t,s.data):(s={type:"image",loadState:"init"},Pi.cache.set(t,s),s.dataPromise=ze.global.loadSvg(t),s.dataPromise?(s.waitingMark=[e],s.dataPromise.then((e=>{var i;s.loadState=(null==e?void 0:e.data)?"success":"fail",s.data=null==e?void 0:e.data,null===(i=s.waitingMark)||void 0===i||i.map(((i,n)=>{(null==e?void 0:e.data)?(s.loadState="success",s.data=e.data,i.imageLoadSuccess(t,e.data)):(s.loadState="fail",i.imageLoadFail(t))})),s.waitingMark&&(s.waitingMark=[])}))):(s.loadState="fail",e.imageLoadFail(t)))}static GetFile(t,e){let i=Pi.cache.get(t);return i?"fail"===i.loadState?Promise.reject():"init"===i.loadState||"loading"===i.loadState?i.dataPromise.then((t=>t.data)):Promise.resolve(i.data):(i={type:e,loadState:"init"},Pi.cache.set(t,i),"arrayBuffer"===e?i.dataPromise=ze.global.loadArrayBuffer(t):"blob"===e?i.dataPromise=ze.global.loadBlob(t):"json"===e&&(i.dataPromise=ze.global.loadJson(t)),i.dataPromise.then((t=>t.data)))}static loading(){setTimeout((()=>{if(!Pi.isLoading&&Pi.toLoadAueue.length){Pi.isLoading=!0;const t=Pi.toLoadAueue.splice(0,10),e=[];t.forEach((t=>{const{url:i,marks:s}=t,n={type:"image",loadState:"init"};if(Pi.cache.set(i,n),n.dataPromise=ze.global.loadImage(i),n.dataPromise){n.waitingMark=s;const t=n.dataPromise.then((t=>{var e;n.loadState=(null==t?void 0:t.data)?"success":"fail",n.data=null==t?void 0:t.data,null===(e=n.waitingMark)||void 0===e||e.map(((e,s)=>{(null==t?void 0:t.data)?(n.loadState="success",n.data=t.data,e.imageLoadSuccess(i,t.data)):(n.loadState="fail",e.imageLoadFail(i))})),n.waitingMark&&(n.waitingMark=[])}));e.push(t)}else n.loadState="fail",s.forEach((t=>t.imageLoadFail(i)))})),Promise.all(e).then((()=>{Pi.isLoading=!1,this.onLoadSuccessCb.forEach((t=>t())),Pi.loading()})).catch((t=>{console.error(t),Pi.isLoading=!1,this.onLoadSuccessCb.forEach((t=>t())),Pi.loading()}))}}),0)}static loadImage(t,e){const i=Mi(t,Pi.toLoadAueue);if(-1!==i)return Pi.toLoadAueue[i].marks.push(e),void Pi.loading();Pi.toLoadAueue.push({url:t,marks:[e]}),Pi.loading()}static improveImageLoading(t){const e=Mi(t,Pi.toLoadAueue);if(-1!==e){const t=Pi.toLoadAueue.splice(e,1);Pi.toLoadAueue.unshift(t[0])}}static onLoadSuccess(t){this.onLoadSuccessCb.push(t)}}function Mi(t,e){for(let i=0;i<e.length;i++)if(e[i].url===t)return i;return-1}Pi.cache=new Map,Pi.isLoading=!1,Pi.toLoadAueue=[],Pi.onLoadSuccessCb=[];const Oi=new i.Matrix,Ci=new i.AABBBounds,ki=["lineWidth","scaleX","scaleY","angle","anchor","visible"],Li=["x","y"],Ei=["scaleX","scaleY"],Ii=["angle"],Ri=new i.Point,Ui={strokeSeg:1,boundsPadding:2,pickMode:1,boundsMode:1,customPickShape:1,pickable:1,childrenPickable:1,visible:1,zIndex:1,layout:1,keepDirIn3d:1,globalZIndex:1,outerBorder:1,innerBorder:1,lineDash:1,lineCap:1,lineJoin:1,miterLimit:2,strokeBoundsBuffer:2,scaleCenter:1,anchor:1,anchor3d:1,postMatrix:1,backgroundMode:2,background:1,texture:1,cursor:1,html:1};class Di extends ei{static mixin(t){const e=Object.keys(t);for(let i=0;i<e.length;++i){const s=e[i];Object.defineProperty(Di.prototype,s,Object.getOwnPropertyDescriptor(t,s))}}get AABBBounds(){return this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode)}get OBBBounds(){return this.tryUpdateOBBBounds()}get globalAABBBounds(){return this.tryUpdateGlobalAABBBounds()}get transMatrix(){return this.tryUpdateLocalTransMatrix(!0)}get globalTransMatrix(){return this.tryUpdateGlobalTransMatrix(!0)}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var e;super(),this._AABBBounds=new i.AABBBounds,this._updateTag=wt.INIT,this.attribute=t,this.valid=this.isValid(),this.updateAABBBoundsStamp=0,t.background?this.loadImage(null!==(e=t.background.background)&&void 0!==e?e:t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic)}setMode(t){"3d"===t?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}getOffsetXY(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var i,s;const{dx:n=t.dx,dy:r=t.dy}=this.attribute;if(e&&this.parent){const t=this.parent.attribute;Ri.x=n+(null!==(i=t.scrollX)&&void 0!==i?i:0),Ri.y=r+(null!==(s=t.scrollY)&&void 0!==s?s:0)}else Ri.x=n,Ri.y=r;return Ri}onAnimateBind(t){this._emitCustomEvent("animate-bind",t)}tryUpdateAABBBounds(t){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;if(!this.valid)return this._AABBBounds.clear(),this._AABBBounds;ze.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const e=this.doUpdateAABBBounds(t);return ze.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,!0),e}tryUpdateOBBBounds(){return this._OBBBounds||(this._OBBBounds=new i.OBBBounds),this.tryUpdateAABBBounds(),this.updateOBBBoundsStamp===this.updateAABBBoundsStamp?this._OBBBounds:(this.updateOBBBoundsStamp=this.updateAABBBoundsStamp,this.valid?this.doUpdateOBBBounds():(this._OBBBounds.clear(),this._OBBBounds))}combindShadowAABBBounds(t){if(this.shadowRoot){const e=this.shadowRoot.AABBBounds.clone();t.union(e)}}doUpdateOBBBounds(){return this._OBBBounds}doUpdateAABBBounds(t){this.updateAABBBoundsStamp++;const e=this.getGraphicTheme();this._AABBBounds.clear();const s=this.attribute,n=this.updateAABBBounds(s,e,this._AABBBounds,t),{boundsPadding:r=e.boundsPadding}=s,a=(o=r)?i.isArray(o)?0===o.length?0:1===o.length?o[0]:2===o.length?(gi[0]=o[0],gi[2]=o[0],gi[1]=o[1],gi[3]=o[1],gi):o:o:0;var o;return a&&n.expand(a),this.clearUpdateBoundTag(),n}updatePathProxyAABBBounds(t){const e="function"==typeof this.pathProxy?this.pathProxy(this.attribute):this.pathProxy;if(!e)return!1;const i=new ot(t);return Nt(e.commandList,i,0,0),!0}tryUpdateGlobalAABBBounds(){const t=this.AABBBounds;return this._globalAABBBounds?this._globalAABBBounds.setValue(t.x1,t.y1,t.x2,t.y2):this._globalAABBBounds=t.clone(),this._globalAABBBounds.empty()||this.parent&&this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix),this._globalAABBBounds}tryUpdateGlobalTransMatrix(){if(this._globalTransMatrix){if(this.parent){const t=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();return this.shouldUpdateGlobalMatrix()&&this.doUpdateGlobalMatrix(),this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!0}tryUpdateLocalTransMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._transMatrix||(this._transMatrix=new i.Matrix),this.shouldUpdateLocalMatrix()&&(this.doUpdateLocalMatrix(),t&&this.clearUpdateLocalPositionTag()),this._transMatrix}shouldUpdateAABBBounds(){return this.shadowRoot?(!!(this._updateTag&wt.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds())&&ze.graphicService.validCheck(this.attribute,this.getGraphicTheme(),this._AABBBounds,this):!!(this._updateTag&wt.UPDATE_BOUNDS)&&ze.graphicService.validCheck(this.attribute,this.getGraphicTheme(),this._AABBBounds,this)}shouldSelfChangeUpdateAABBBounds(){return this.shadowRoot?!!(this._updateTag&wt.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&wt.UPDATE_BOUNDS)}shouldUpdateLocalMatrix(){return!!(this._updateTag&wt.UPDATE_LOCAL_MATRIX)}isValid(){var t,e;const i=this.attribute;return Number.isFinite((null!==(t=i.x)&&void 0!==t?t:0)+(null!==(e=i.y)&&void 0!==e?e:0))}_validNumber(t){return null==t||Number.isFinite(t)}shouldUpdateShape(){return!!(this._updateTag&wt.UPDATE_SHAPE)}clearUpdateShapeTag(){this._updateTag&=wt.CLEAR_SHAPE}containsPoint(t,e,s,n){if(!n)return!1;if(s===Pt.GLOBAL){const s=new i.Point(t,e);this.parent&&this.parent.globalTransMatrix.transformPoint(s,s),t=s.x,e=s.y}return n.containsPoint(this,{x:t,y:e})}setAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;(t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,i)||t).background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._setAttributes(t,e,i)}_setAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;const s=Object.keys(t);for(let e=0;e<s.length;e++){const i=s[e];this.attribute[i]=t[i]}this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!e&&!this.needUpdateTags(s)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i)}setAttribute(t,e,s,n){var r;const a=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({[t]:e},this.attribute,t,n);a?this._setAttributes(a,s,n):i.isNil(null===(r=this.normalAttrs)||void 0===r?void 0:r[t])?(this.attribute[t]=e,this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!s&&!this.needUpdateTag(t)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n)):this.normalAttrs[t]=e,"background"===t?this.loadImage(e,!0):"shadowGraphic"===t&&this.setShadowGraphic(e)}needUpdateTags(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ki;for(let i=0;i<e.length;i++){const s=e[i];if(-1!==t.indexOf(s))return!0}return!1}needUpdateTag(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ki;for(let i=0;i<e.length;i++)if(t===e[i])return!0;return!1}initAttributes(t){const e={type:Mt.INIT};t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,e)||t,this.attribute=t,t.background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._updateTag=wt.INIT,this.valid=this.isValid(),this.onAttributeUpdate(e)}translate(t,e){var i,s;if(0===t&&0===e)return this;const n={type:Mt.TRANSLATE},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,Li,n);r&&(t=r.x,e=r.y,delete r.x,delete r.y,this._setAttributes(r));const a=this.attribute,o=a.postMatrix;return o?ze.transformUtil.fromMatrix(o,o).translate(t,e):(a.x=(null!==(i=a.x)&&void 0!==i?i:ve.x)+t,a.y=(null!==(s=a.y)&&void 0!==s?s:ve.y)+e),this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this}translateTo(t,e){const i=this.attribute;if(i.x===t&&i.y===e)return this;const s={type:Mt.TRANSLATE_TO},n=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,Li,s);return n?(this._setAttributes(n,!1,s),this):(i.x=t,i.y=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(s),this)}scale(t,e,s){var n,r;if(1===t&&1===e)return this;const a={type:Mt.SCALE},o=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e,scaleCenter:s},this.attribute,Ei,a);o&&(t=o.scaleX,e=o.scaleY,delete o.scaleX,delete o.scaleY,this._setAttributes(o));const l=this.attribute;if(s){let{postMatrix:n}=this.attribute;n||(n=new i.Matrix,l.postMatrix=n),ze.transformUtil.fromMatrix(n,n).scale(t,e,s)}else l.scaleX=(null!==(n=l.scaleX)&&void 0!==n?n:ve.scaleX)*t,l.scaleY=(null!==(r=l.scaleY)&&void 0!==r?r:ve.scaleY)*e;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(a),this}scaleTo(t,e){const i=this.attribute;if(i.scaleX===t&&i.scaleY===e)return this;const s={type:Mt.SCALE_TO},n=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e},this.attribute,Ei,s);return n?(this._setAttributes(n,!1,s),this):(i.scaleX=t,i.scaleY=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(s),this)}rotate(t,e){var s;if(0===t)return this;const n={type:Mt.ROTATE},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({angle:t,rotateCenter:e},this.attribute,Ii,n);r&&(delete r.angle,this._setAttributes(r,!1,n));const a=this.attribute;if(e){let{postMatrix:s}=this.attribute;s||(s=new i.Matrix,a.postMatrix=s),ze.transformUtil.fromMatrix(s,s).rotate(t,e)}else a.angle=(null!==(s=a.angle)&&void 0!==s?s:ve.angle)+t;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this}rotateTo(t){const e=this.attribute;if(e.angle===t)return this;const i={type:Mt.ROTATE_TO},s=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,Ii,i);return s?(this._setAttributes(s,!1,i),this):(e.angle=t,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i),this)}skewTo(t,e){return this}animate(t){this.animates||(this.animates=new Map);const e=new hi(null==t?void 0:t.id,this.stage&&this.stage.getTimeline(),null==t?void 0:t.slience);if(e.bind(this),t){const{onStart:i,onFrame:s,onEnd:n,onRemove:r}=t;null!=i&&e.onStart(i),null!=s&&e.onFrame(s),null!=n&&e.onEnd(n),null!=r&&e.onRemove(r),e.interpolateFunc=t.interpolate}return this.animates.set(e.id,e),e.onRemove((()=>{this.animates.delete(e.id)})),e}onAttributeUpdate(t){t&&t.skipUpdateCallback||(ze.graphicService.onAttributeUpdate(this),this._emitCustomEvent("afterAttributeUpdate",t))}update(t){t?(t.bounds&&this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),t.trans&&this.tryUpdateLocalTransMatrix()):(this.tryUpdateAABBBounds("imprecise"===this.attribute.boundsMode),this.tryUpdateLocalTransMatrix())}hasState(t){return!(!this.currentStates||!this.currentStates.length)&&(!!i.isNil(t)||this.currentStates.includes(t))}getState(t){var e;return null===(e=this.states)||void 0===e?void 0:e[t]}applyStateAttrs(t,e,i,s){var n,r,a,o;if(i){const i=Object.keys(t),l=this.getNoWorkAnimateAttr(),h={};let c;i.forEach((e=>{l[e]?(c||(c={}),c[e]=t[e]):h[e]=s&&void 0===t[e]?this.getDefaultAttribute(e):t[e]}));const d=this.animate({slience:!0});d.stateNames=e,d.to(h,null!==(r=null===(n=this.stateAnimateConfig)||void 0===n?void 0:n.duration)&&void 0!==r?r:ui,null!==(o=null===(a=this.stateAnimateConfig)||void 0===a?void 0:a.easing)&&void 0!==o?o:pi),c&&this.setAttributes(c,!1,{type:Mt.STATE})}else this.stopStateAnimates(),this.setAttributes(t,!1,{type:Mt.STATE})}updateNormalAttrs(t){const e={};this.normalAttrs?(Object.keys(t).forEach((t=>{t in this.normalAttrs?(e[t]=this.normalAttrs[t],delete this.normalAttrs[t]):e[t]=this.getNormalAttribute(t)})),Object.keys(this.normalAttrs).forEach((e=>{t[e]=this.normalAttrs[e]}))):Object.keys(t).forEach((t=>{e[t]=this.getNormalAttribute(t)})),this.normalAttrs=e}stopStateAnimates(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end";this.animates&&this.animates.forEach((e=>{e.stateNames&&(e.stop(t),this.animates.delete(e.id))}))}getNormalAttribute(t){let e=this.attribute[t];return this.animates&&this.animates.forEach((s=>{if(s.stateNames){const n=s.getEndProps();i.has(n,t)&&(e=n[t])}})),e}clearStates(t){this.hasState()&&this.normalAttrs?(this.currentStates=[],this.applyStateAttrs(this.normalAttrs,this.currentStates,t,!0)):this.currentStates=[],this.normalAttrs=null}removeState(t,e){if((this.currentStates?this.currentStates.indexOf(t):-1)>=0){const i=this.currentStates.filter((e=>e!==t));this.useStates(i,e)}}toggleState(t,e){if(this.hasState(t))this.removeState(t,e);else if((this.currentStates?this.currentStates.indexOf(t):-1)<0){const i=this.currentStates?this.currentStates.slice():[];i.push(t),this.useStates(i,e)}}addState(t,e,i){var s;if(this.currentStates&&this.currentStates.includes(t)&&(e||1===this.currentStates.length))return;const n=e&&(null===(s=this.currentStates)||void 0===s?void 0:s.length)?this.currentStates.concat([t]):[t];this.useStates(n,i)}useStates(t,e){var i;if(!t.length)return void this.clearStates(e);if((null===(i=this.currentStates)||void 0===i?void 0:i.length)===t.length&&!t.some(((t,e)=>this.currentStates[e]!==t)))return;const s={};t.forEach((e=>{var i;const n=this.stateProxy?this.stateProxy(e,t):null===(i=this.states)||void 0===i?void 0:i[e];n&&Object.assign(s,n)})),this.updateNormalAttrs(s),this.currentStates=t,this.applyStateAttrs(s,t,e)}addUpdateBoundTag(){this._updateTag|=wt.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}addUpdateShapeTag(){this._updateTag|=wt.UPDATE_SHAPE}addUpdateShapeAndBoundsTag(){this._updateTag|=wt.UPDATE_SHAPE_AND_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}updateShapeAndBoundsTagSetted(){return(this._updateTag&wt.UPDATE_SHAPE_AND_BOUNDS)===wt.UPDATE_SHAPE_AND_BOUNDS}clearUpdateBoundTag(){this._updateTag&=wt.CLEAR_BOUNDS}addUpdatePositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=wt.UPDATE_GLOBAL_LOCAL_MATRIX}addUpdateGlobalPositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=wt.UPDATE_GLOBAL_MATRIX}clearUpdateLocalPositionTag(){this._updateTag&=wt.CLEAR_LOCAL_MATRIX}clearUpdateGlobalPositionTag(){this._updateTag&=wt.CLEAR_GLOBAL_MATRIX}addUpdateLayoutTag(){this._updateTag|=wt.UPDATE_LAYOUT}clearUpdateLayoutTag(){this._updateTag&=wt.CLEAR_LAYOUT}needUpdateLayout(){return!!(this._updateTag&wt.UPDATE_LAYOUT)}getAnchor(t,e){const i=[0,0],s=()=>{if(e.b)return e.b;const{scaleX:t,scaleY:i,angle:s}=this.attribute;return Ci.copy(this._AABBBounds),this.setAttributes({scaleX:1,scaleY:1,angle:0}),e.b=this.AABBBounds.clone(),this._AABBBounds.copy(Ci),this.setAttributes({scaleX:t,scaleY:i,angle:s}),e.b};if("string"==typeof t[0]){const e=parseFloat(t[0])/100,n=s();i[0]=n.x1+(n.x2-n.x1)*e}else i[0]=t[0];if("string"==typeof t[1]){const e=parseFloat(t[1])/100,n=s();i[1]=n.y1+(n.y2-n.y1)*e}else i[1]=t[1];return i}doUpdateLocalMatrix(){const{x:t=ve.x,y:e=ve.y,scaleX:s=ve.scaleX,scaleY:n=ve.scaleY,angle:r=ve.angle,scaleCenter:a,anchor:o,postMatrix:l}=this.attribute;let h=[0,0];const c={};if(o&&(h=this.getAnchor(o,c)),!a||1===s&&1===n)i.normalTransform(this._transMatrix,this._transMatrix.reset(),t,e,s,n,r,o&&h);else{const i=this._transMatrix;i.reset(),i.translate(h[0],h[1]),i.rotate(r),i.translate(-h[0],-h[1]),i.translate(t,e),h=this.getAnchor(a,c),ze.transformUtil.fromMatrix(i,i).scale(s,n,{x:h[0],y:h[1]})}const d=this.getOffsetXY(ve);if(this._transMatrix.e+=d.x,this._transMatrix.f+=d.y,l){const t=Oi.setValue(l.a,l.b,l.c,l.d,l.e,l.f),e=this._transMatrix;t.multiply(e.a,e.b,e.c,e.d,e.e,e.f),e.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}doUpdateGlobalMatrix(){if(this.parent){this._globalTransMatrix.multiply(this.transMatrix.a,this.transMatrix.b,this.transMatrix.c,this.transMatrix.d,this.transMatrix.e,this.transMatrix.f);const{scrollX:t=0,scrollY:e=0}=this.parent.attribute;this._globalTransMatrix.translate(t,e)}}setStage(t,e){if(this.stage!==t){if(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this.animates&&this.animates.size){const e=t.getTimeline();this.animates.forEach((t=>{t.setTimeline(e)}))}this._onSetStage&&this._onSetStage(this,t,e),ze.graphicService.onSetStage(this,t)}}setStageToShadowRoot(t,e){this.shadowRoot&&this.shadowRoot.setStage(t,e)}onAddStep(t){}onStop(t){t&&this.setAttributes(t,!1,{type:Mt.ANIMATE_END})}onStep(t,e,i,s,n){const r={};if(i.customAnimate)i.customAnimate.update(n,s,r);else{const a=i.props,o=i.parsedProps,l=i.propKeys;this.stepInterpolate(t,e,r,i,s,n,a,void 0,o,l)}this.setAttributes(r,!1,{type:Mt.ANIMATE_UPDATE,animationState:{ratio:s,end:n,step:i,isFirstFrameOfStep:t.getLastStep()!==i}}),this.stage&&this.stage.renderNextFrame()}stepInterpolate(t,e,i,s,n,r,a,o,l,h){h||(h=Object.keys(a),s.propKeys=h),r?s.propKeys.forEach((t=>{e.validAttr(t)&&(i[t]=a[t])})):h.forEach((r=>{var h;if(!e.validAttr(r))return;const c=a[r],d=null!==(h=o&&o[r])&&void 0!==h?h:t.getLastPropByName(r,s);if(null==c||null==d||c===d)return void(i[r]=c);let u;u=e.interpolateFunc&&e.interpolateFunc(r,n,d,c,i),u||(u=e.customInterpolate(r,n,d,c,this,i),u||this.defaultInterpolate(c,d,r,i,l,n)||this._interpolate(r,n,d,c,i))})),s.parsedProps=l}defaultInterpolate(t,e,i,s,n,r){if(Number.isFinite(t))return s[i]=e+(t-e)*r,!0;if("fill"===i){n||(n={});const a=n.fillColorArray,o=Ai(e,null!=a?a:t,r,!1,((t,e)=>{n.fillColorArray=e}));return o&&(s[i]=o),!0}if("stroke"===i){n||(n={});const a=n.strokeColorArray,o=Ai(e,null!=a?a:t,r,!1,((t,e)=>{n.strokeColorArray=e}));return o&&(s[i]=o),!0}if("shadowColor"===i){n||(n={});const a=n.shadowColorArray,o=Ai(e,null!=a?a:t,r,!0,((t,e)=>{n.shadowColorArray=e}));return o&&(s[i]=o),!0}return!1}_interpolate(t,e,i,s,n){}getDefaultAttribute(t){return this.getGraphicTheme()[t]}getComputedAttribute(t){var e;return null!==(e=this.attribute[t])&&void 0!==e?e:this.getDefaultAttribute(t)}onSetStage(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._onSetStage=t,e&&this.stage&&t(this,this.stage)}attachShadow(t){return t&&(t.shadowHost=this),this.shadowRoot=null!=t?t:ze.graphicService.creator.shadowRoot(this),this.addUpdateBoundTag(),this.shadowRoot.setStage(this.stage,this.layer),this.shadowRoot}detachShadow(){this.shadowRoot&&(this.addUpdateBoundTag(),this.shadowRoot=null)}toJson(){return{attribute:this.attribute,_uid:this._uid,type:this.type,name:this.name,children:this.children.map((t=>t.toJson()))}}createPathProxy(t){return i.isString(t,!0)?this.pathProxy=(new ye).fromString(t):this.pathProxy=new ye,this.pathProxy}loadImage(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t||e&&function(t){return!(!t.fill&&!t.stroke)}(t))return;const s=t;this.resources||(this.resources=new Map);const n={data:"init",state:null};this.resources.set(s,n),"string"==typeof t?(n.state="loading",t.startsWith("<svg")?(Pi.GetSvg(t,this),this.backgroundImg=this.backgroundImg||e):(i.isValidUrl(t)||t.includes("/")||i.isBase64(t))&&(Pi.GetImage(t,this),this.backgroundImg=this.backgroundImg||e)):i.isObject(t)?(n.state="success",n.data=t,this.backgroundImg=this.backgroundImg||e):n.state="fail"}setShadowGraphic(t){t?this.attachShadow().add(t):this.detachShadow()}imageLoadSuccess(t,e,i){if(!this.resources)return;const s=this.resources.get(t);s&&(s.state="success",s.data=e,i&&i(),this.addUpdateBoundTag(),this.stage&&this.stage.renderNextFrame())}imageLoadFail(t,e){if(!this.resources)return;const i=this.resources.get(t);i&&(i.state="fail",e&&e())}_stopAnimates(t){t&&t.forEach((t=>{t.stop()}))}stopAnimates(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._stopAnimates(this.animates),this.shadowRoot&&this.shadowRoot.stopAnimates(!0),this.isContainer&&t&&this.forEachChildren((e=>{e.stopAnimates(t)}))}release(){this.releaseStatus="released",ze.graphicService.onRelease(this)}_emitCustomEvent(t,e){var i,s;if(this._events&&t in this._events){const n=new si(t,e);n.bubbles=!1,n.manager=null===(s=null===(i=this.stage)||void 0===i?void 0:i.eventSystem)||void 0===s?void 0:s.manager,this.dispatchEvent(n)}}}Di.mixin(ni);class Ni{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}function ji(t,e,i,s){const n=t.indexOf(e,i);if(-1===n)throw new Error(s);return n+e.length-1}function Fi(t,e,i){const s=function(t,e){let i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",n="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===s[0]){if(!s[1])return{data:n,index:r};if(t[r+1]===s[1])return{data:n,index:r}}else"\t"===e&&(e=" ");n+=e}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!s)return;let n=s.data;const r=s.index,a=n.search(/\s/);let o=n,l=!0;-1!==a&&(o=n.substr(0,a).replace(/\s\s*$/,""),n=n.substr(a+1));const h=o;if(i){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1),l=o!==s.data.substr(t+1))}return{tagName:o,tagExp:n,closeIndex:r,attrExpPresent:l,rawTagName:h}}const zi=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");class Wi{constructor(t){this.currentNode=null,this.options=t,this.tagsNodeStack=[],this.docTypeEntities={}}addChild(t,e,i){const s=e.tagname;"string"==typeof s?(e.tagname=s,t.addChild(e)):t.addChild(e)}buildAttributesMap(t,e,i){const s={};if(!t)return;const n=function(t,e){const i=[];let s=e.exec(t);for(;s;){const n=[];n.startIndex=e.lastIndex-s[0].length;const r=s.length;for(let t=0;t<r;t++)n.push(s[t]);i.push(n),s=e.exec(t)}return i}(t,zi),r=n.length;for(let t=0;t<r;t++){const e=n[t][1],i=n[t][4];e&&(s[e]=void 0===i||(isNaN(i)?i:Number(i)))}return s}parseXml(t){t=t.replace(/\r\n?/g,"\n");const e=new Ni("!xml");let i=e,s="",n="";for(let r=0;r<t.length;r++)if("<"===t[r])if("/"===t[r+1]){const e=ji(t,">",r,"Closing Tag is not closed."),a=n.lastIndexOf(".");n=n.substring(0,a),i=this.tagsNodeStack.pop(),i&&i.child&&s&&i.child[i.child.length-1][":@"]&&(i.child[i.child.length-1][":@"].text=s),s="",r=e}else if("?"===t[r+1])r=Fi(t,r,!1,"?>").closeIndex+1;else if("!--"===t.substr(r+1,3))r=ji(t,"--\x3e",r+4,"Comment is not closed.");else{const a=Fi(t,r,!1);let o=a.tagName,l=a.tagExp;const h=a.attrExpPresent,c=a.closeIndex;if(o!==e.tagname&&(n+=n?"."+o:o),l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===o[o.length-1]?(o=o.substr(0,o.length-1),n=n.substr(0,n.length-1),l=o):l=l.substr(0,l.length-1);const t=new Ni(o);o!==l&&h&&(t[":@"]=this.buildAttributesMap(l,n,o)),this.addChild(i,t,n),n=n.substr(0,n.lastIndexOf("."))}else{const t=new Ni(o);this.tagsNodeStack.push(i),o!==l&&h&&(t[":@"]=this.buildAttributesMap(l,n,o)),this.addChild(i,t,n),i=t}s="",r=c}else s+=t[r];return e.child}}function Gi(t,e){return $i(t)}function $i(t,e){const i={};for(let e=0;e<t.length;e++){const n=t[e],r=Yi(n);if(void 0!==r&&n[r]){const t=$i(n[r]);s=t,Object.keys(s).length,n[":@"]&&Vi(t,n[":@"]),void 0!==i[r]&&i.hasOwnProperty(r)?(Array.isArray(i[r])||(i[r]=[i[r]]),i[r].push(t)):i[r]=t}}var s;return i}function Yi(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function Vi(t,e,i){if(e){const i=Object.keys(e),s=i.length;for(let n=0;n<s;n++){const s=i[n];t[s]=e[s]}}}class Xi{constructor(t){this.options=Object.assign({},Xi.defaultOptions,t)}valid(t){return t.startsWith("<")}parse(t){if(!this.valid)return!1;return Gi(new Wi(this.options).parseXml(t),this.options)}}function Hi(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.expand(e+(s/2+(i?function(t,e){return t?e:0}(i,e):0))),t}Xi.defaultOptions={};let Ki=0;function qi(){return Ki++}var Zi;!function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(Zi||(Zi={}));const Ji=new Map;["…","(",")","—","【","】","「","」","《","》"].forEach((t=>Ji.set(t,!0)));const Qi=new Map;function ts(t){if(Ji.has(t))return!0;if(Qi.has(t))return!1;let e=!1;return t.codePointAt(0)<256&&(e=!0),e}[""].forEach((t=>Qi.set(t,!0))),qi(),qi();const es=qi();qi(),qi();const is=qi();qi();const ss=qi(),ns=qi(),rs=qi();qi(),qi(),qi(),qi();const as=qi(),os=qi(),ls=Symbol.for("GraphicCreator"),hs={"stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-width":"lineWidth","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity",stroke:"stroke",fill:"fill"},cs=Object.keys(hs);var ds;!function(t){t[t.LESS_GROUP=0]="LESS_GROUP",t[t.MORE_GROUP=1]="MORE_GROUP"}(ds||(ds={}));class us extends Di{constructor(t){super(t),this.type="group",this.parent=null,this.isContainer=!0,this.numberType=is,this._childUpdateTag=wt.UPDATE_BOUNDS}setMode(t){"3d"===t?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}setTheme(t){return this.theme||(this.theme=new Ze),this.theme.setTheme(t,this)}createTheme(){this.theme||(this.theme=new Ze)}visibleAll(t){this.setAttribute("visible",t),this.forEachChildren((e=>{e.isContainer&&e.visibleAll?e.visibleAll(t):e.setAttribute("visible",t)}))}hideAll(){this.visibleAll(!1)}showAll(){this.visibleAll(!0)}containsPoint(t,e,s){if(s===Pt.GLOBAL){const s=new i.Point(t,e);return this.parent&&this.parent.globalTransMatrix.transformPoint(s,s),this.AABBBounds.contains(s.x,s.y)}return this.AABBBounds.contains(t,e)}shouldUpdateAABBBounds(){return!!super.shouldUpdateAABBBounds()||!!(this._childUpdateTag&wt.UPDATE_BOUNDS)}tryUpdateAABBBounds(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;ze.graphicService.beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const t=this.shouldSelfChangeUpdateAABBBounds(),e=this.doUpdateAABBBounds();return this.addUpdateLayoutTag(),ze.graphicService.afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,t),e}doUpdateLocalMatrix(){const{x:t=ve.x,y:e=ve.y,dx:i=ve.dx,dy:s=ve.dy,scaleX:n=ve.scaleX,scaleY:r=ve.scaleY,angle:a=ve.angle,postMatrix:o}=this.attribute;if(0!==t||0!==e||0!==i||0!==s||1!==n||1!==r||0!==a||o)return super.doUpdateLocalMatrix();this._transMatrix.reset()}getGraphicTheme(){return Qe(this).group}updateAABBBounds(t,e,i){const s=i;i=i.clone();const{width:n,height:r,path:a,clip:o=e.clip}=t;if(a&&a.length?a.forEach((t=>{i.union(t.AABBBounds)})):null!=n&&null!=r&&i.set(0,0,Math.max(0,n),Math.max(0,r)),!o){this.forEachChildren((t=>{i.union(t.AABBBounds)}));const{scrollX:e=0,scrollY:s=0}=t;i.translate(e,s)}return ze.graphicService.updateTempAABBBounds(i),ze.graphicService.transformAABBBounds(t,i,e,!1,this),s.copy(i),s}doUpdateAABBBounds(){this.updateAABBBoundsStamp++;const t=super.doUpdateAABBBounds();return this.parent&&this.parent.addChildUpdateBoundTag(),this._emitCustomEvent("AAABBBoundsChange"),t}clearUpdateBoundTag(){this._updateTag&=wt.CLEAR_BOUNDS,this._childUpdateTag&=wt.CLEAR_BOUNDS}addUpdateBoundTag(){this._updateTag|=wt.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag()}addChildUpdateBoundTag(){this._childUpdateTag&wt.UPDATE_BOUNDS||(this._childUpdateTag|=wt.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag())}getTheme(){return this.theme.getTheme(this)}incrementalAppendChild(t){const e=super.appendChild(t);return this.stage&&e&&(e.stage=this.stage,e.layer=this.layer),this.addUpdateBoundTag(),ze.graphicService.onAddIncremental(t,this,this.stage),e}incrementalClearChild(){super.removeAllChild(),this.addUpdateBoundTag(),ze.graphicService.onClearIncremental(this,this.stage)}_updateChildToStage(t){return this.stage&&t&&t.setStage(this.stage,this.layer),this.addUpdateBoundTag(),t}appendChild(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=super.appendChild(t);return e&&this.stage&&i&&i.setStage(this.stage,this.layer),this.addUpdateBoundTag(),i}insertBefore(t,e){return this._updateChildToStage(super.insertBefore(t,e))}insertAfter(t,e){return this._updateChildToStage(super.insertAfter(t,e))}insertInto(t,e){return this._updateChildToStage(super.insertInto(t,e))}removeChild(t){const e=super.removeChild(t);return t.stage=null,ze.graphicService.onRemove(t),this.addUpdateBoundTag(),e}removeAllChild(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.forEachChildren((e=>{ze.graphicService.onRemove(e),t&&e.isContainer&&e.removeAllChild(t)})),super.removeAllChild(),this.addUpdateBoundTag()}setStage(t,e){this.stage!==t&&(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this._onSetStage&&this._onSetStage(this,t,e),ze.graphicService.onSetStage(this,t),this.forEachChildren((e=>{e.setStage(t,this.layer)})))}addUpdatePositionTag(){super.addUpdatePositionTag(),this.forEachChildren((t=>{t.isContainer&&t.addUpdateGlobalPositionTag()}))}addUpdateGlobalPositionTag(){super.addUpdateGlobalPositionTag(),this.forEachChildren((t=>{t.isContainer&&t.addUpdateGlobalPositionTag()}))}tryUpdateGlobalTransMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.shouldUpdateGlobalMatrix()){if(this._globalTransMatrix){if(this.parent){const t=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();this.doUpdateGlobalMatrix(),t&&this.clearUpdateGlobalPositionTag()}return this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!!(this._updateTag&wt.UPDATE_GLOBAL_MATRIX)}_getChildByName(t,e){return this.find((e=>e.name===t),e)}createOrUpdateChild(t,e,i){let s=this._getChildByName(t);return s?s.setAttributes(e):(s=ze.graphicService.creator[i](e),s.name=t,this.add(s)),s}clone(){return new us(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return us.NOWORK_ANIMATE_ATTR}}function ps(t){return new us(t)}function fs(t,e){return!(!t&&!e)}function gs(t,e){let s;return s=i.isArray(t)?t.some((t=>t||void 0===t)):!!t,s&&e>0}function ms(t,e,i){return i&&t*e>0}function ys(t,e){return t*e>0}us.NOWORK_ANIMATE_ATTR=Ui;const bs=Symbol.for("PolygonRenderContribution"),xs=Symbol.for("SymbolRenderContribution"),vs=Symbol.for("InteractiveSubRenderContribution");function _s(t,e){return"end"===t||"right"===t?-e:"center"===t?-e/2:0}function As(t,e,i){return"middle"===t?-e/2:"top"===t?0:"bottom"===t?(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)-e:t&&"alphabetic"!==t?0:(i||(i=e),-(e-i)/2-.79*i)}function Bs(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 Ts(t,e,i){const s=i[0],n=i[1],r=i[2];let a,o,l,h,c,d,u,p,f,g,m,y;return e===t?(t[12]=e[0]*s+e[4]*n+e[8]*r+e[12],t[13]=e[1]*s+e[5]*n+e[9]*r+e[13],t[14]=e[2]*s+e[6]*n+e[10]*r+e[14],t[15]=e[3]*s+e[7]*n+e[11]*r+e[15]):(a=e[0],o=e[1],l=e[2],h=e[3],c=e[4],d=e[5],u=e[6],p=e[7],f=e[8],g=e[9],m=e[10],y=e[11],t[0]=a,t[1]=o,t[2]=l,t[3]=h,t[4]=c,t[5]=d,t[6]=u,t[7]=p,t[8]=f,t[9]=g,t[10]=m,t[11]=y,t[12]=a*s+c*n+f*r+e[12],t[13]=o*s+d*n+g*r+e[13],t[14]=l*s+u*n+m*r+e[14],t[15]=h*s+p*n+y*r+e[15]),t}function Ss(t,e,i){const s=e[0],n=e[1],r=e[2],a=e[3],o=e[4],l=e[5],h=e[6],c=e[7],d=e[8],u=e[9],p=e[10],f=e[11],g=e[12],m=e[13],y=e[14],b=e[15];let x=i[0],v=i[1],_=i[2],A=i[3];return t[0]=x*s+v*o+_*d+A*g,t[1]=x*n+v*l+_*u+A*m,t[2]=x*r+v*h+_*p+A*y,t[3]=x*a+v*c+_*f+A*b,x=i[4],v=i[5],_=i[6],A=i[7],t[4]=x*s+v*o+_*d+A*g,t[5]=x*n+v*l+_*u+A*m,t[6]=x*r+v*h+_*p+A*y,t[7]=x*a+v*c+_*f+A*b,x=i[8],v=i[9],_=i[10],A=i[11],t[8]=x*s+v*o+_*d+A*g,t[9]=x*n+v*l+_*u+A*m,t[10]=x*r+v*h+_*p+A*y,t[11]=x*a+v*c+_*f+A*b,x=i[12],v=i[13],_=i[14],A=i[15],t[12]=x*s+v*o+_*d+A*g,t[13]=x*n+v*l+_*u+A*m,t[14]=x*r+v*h+_*p+A*y,t[15]=x*a+v*c+_*f+A*b,t}class ws{constructor(){this.pools=[]}static identity(t){return Bs(t)}allocate(){if(!this.pools.length)return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];const t=this.pools.pop();return ws.identity(t),t}allocateByObj(t){let e;e=this.pools.length?this.pools.pop():[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];for(let i=0;i<e.length;i++)e[i]=t[i];return e}free(t){t&&this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}}const Ps=new ws;var Ms=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Os=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Cs=function(t,e){return function(i,s){e(i,s,t)}};function ks(t,e,i){var s;const{x:n=i.x,y:r=i.y,z:a=i.z,dx:o=i.dx,dy:l=i.dy,dz:h=i.dz,scaleX:c=i.scaleX,scaleY:d=i.scaleY,scaleZ:u=i.scaleZ,alpha:p=i.alpha,beta:f=i.beta,angle:g=i.angle,anchor3d:m=e.attribute.anchor,anchor:y}=e.attribute,b=[0,0,0];if(m){if("string"==typeof m[0]){const t=parseFloat(m[0])/100,i=e.AABBBounds;b[0]=i.x1+(i.x2-i.x1)*t}else b[0]=m[0];if("string"==typeof m[1]){const t=parseFloat(m[1])/100,i=e.AABBBounds;b[1]=i.x1+(i.x2-i.x1)*t}else b[1]=m[1];b[2]=null!==(s=m[2])&&void 0!==s?s:0}if(Bs(t),Ts(t,t,[n+o,r+l,a+h]),Ts(t,t,[b[0],b[1],b[2]]),function(t,e,i){const s=Math.sin(i),n=Math.cos(i),r=e[4],a=e[5],o=e[6],l=e[7],h=e[8],c=e[9],d=e[10],u=e[11];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]=r*n+h*s,t[5]=a*n+c*s,t[6]=o*n+d*s,t[7]=l*n+u*s,t[8]=h*n-r*s,t[9]=c*n-a*s,t[10]=d*n-o*s,t[11]=u*n-l*s}(t,t,f),function(t,e,i){const s=Math.sin(i),n=Math.cos(i),r=e[0],a=e[1],o=e[2],l=e[3],h=e[8],c=e[9],d=e[10],u=e[11];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]=r*n-h*s,t[1]=a*n-c*s,t[2]=o*n-d*s,t[3]=l*n-u*s,t[8]=r*s+h*n,t[9]=a*s+c*n,t[10]=o*s+d*n,t[11]=l*s+u*n}(t,t,p),Ts(t,t,[-b[0],-b[1],b[2]]),function(t,e,i){const s=i[0],n=i[1],r=i[2];t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]}(t,t,[c,d,u]),g){const i=Ps.allocate(),s=[0,0];if(y){if("string"==typeof m[0]){const t=parseFloat(m[0])/100,i=e.AABBBounds;s[0]=i.x1+(i.x2-i.x1)*t}else s[0]=m[0];if("string"==typeof m[1]){const t=parseFloat(m[1])/100,i=e.AABBBounds;s[1]=i.x1+(i.x2-i.x1)*t}else s[1]=m[1]}Ts(i,i,[s[0],s[1],0]),function(t,e,i){const s=Math.sin(i),n=Math.cos(i),r=e[0],a=e[1],o=e[2],l=e[3],h=e[4],c=e[5],d=e[6],u=e[7];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]=r*n+h*s,t[1]=a*n+c*s,t[2]=o*n+d*s,t[3]=l*n+u*s,t[4]=h*n-r*s,t[5]=c*n-a*s,t[6]=d*n-o*s,t[7]=u*n-l*s}(i,i,g),Ts(i,i,[-s[0],-s[1],0]),Ss(t,t,i)}}let Ls=class{constructor(t){this.creator=t,this.hooks={onAttributeUpdate:new nt(["graphic"]),onSetStage:new nt(["graphic","stage"]),onRemove:new nt(["graphic"]),onRelease:new nt(["graphic"]),onAddIncremental:new nt(["graphic","group","stage"]),onClearIncremental:new nt(["graphic","group","stage"]),beforeUpdateAABBBounds:new nt(["graphic","stage","willUpdate","aabbBounds"]),afterUpdateAABBBounds:new nt(["graphic","stage","aabbBounds","globalAABBBounds","selfChange"]),clearAABBBounds:new nt(["graphic","stage","aabbBounds"])},this.tempAABBBounds1=new i.AABBBounds,this.tempAABBBounds2=new i.AABBBounds}onAttributeUpdate(t){this.hooks.onAttributeUpdate.taps.length&&this.hooks.onAttributeUpdate.call(t)}onSetStage(t,e){this.hooks.onSetStage.taps.length&&this.hooks.onSetStage.call(t,e)}onRemove(t){this.hooks.onRemove.taps.length&&this.hooks.onRemove.call(t)}onRelease(t){this.hooks.onRelease.taps.length&&this.hooks.onRelease.call(t)}onAddIncremental(t,e,i){this.hooks.onAddIncremental.taps.length&&this.hooks.onAddIncremental.call(t,e,i)}onClearIncremental(t,e){this.hooks.onClearIncremental.taps.length&&this.hooks.onClearIncremental.call(t,e)}beforeUpdateAABBBounds(t,e,i,s){this.hooks.beforeUpdateAABBBounds.taps.length&&this.hooks.beforeUpdateAABBBounds.call(t,e,i,s)}afterUpdateAABBBounds(t,e,i,s,n){this.hooks.afterUpdateAABBBounds.taps.length&&this.hooks.afterUpdateAABBBounds.call(t,e,i,s,n)}clearAABBBounds(t,e,i){this.hooks.clearAABBBounds.taps.length&&this.hooks.clearAABBBounds.call(t,e,i)}updatePathProxyAABBBounds(t,e){const i="function"==typeof e.pathProxy?e.pathProxy(e.attribute):e.pathProxy;if(!i)return!1;const s=new ot(t);return Nt(i.commandList,s,0,0),!0}updateHTMLTextAABBBounds(t,e,s,n){const{textAlign:r,textBaseline:a}=t;if(null!=t.forceBoundsHeight){const e=i.isNumber(t.forceBoundsHeight)?t.forceBoundsHeight:t.forceBoundsHeight(),n=As(a,e,e);s.set(s.x1,n,s.x2,n+e)}if(null!=t.forceBoundsWidth){const e=i.isNumber(t.forceBoundsWidth)?t.forceBoundsWidth:t.forceBoundsWidth(),n=_s(r,e);s.set(n,s.y1,n+e,s.y2)}}combindShadowAABBBounds(t,e){if(e&&e.shadowRoot){const i=e.shadowRoot.AABBBounds;t.union(i)}}transformAABBBounds(t,e,s,n,r){if(!e.empty()){const{scaleX:i=s.scaleX,scaleY:r=s.scaleY,stroke:a=s.stroke,shadowBlur:o=s.shadowBlur,lineWidth:l=s.lineWidth,pickStrokeBuffer:h=s.pickStrokeBuffer,strokeBoundsBuffer:c=s.strokeBoundsBuffer}=t,d=this.tempAABBBounds1,u=this.tempAABBBounds2;if(a&&l){Hi(d,(l+h)/Math.abs(i+r),n,c),e.union(d),d.setValue(u.x1,u.y1,u.x2,u.y2)}if(o){const{shadowOffsetX:n=s.shadowOffsetX,shadowOffsetY:a=s.shadowOffsetY}=t;Hi(d,o/Math.abs(i+r)*2,!1,c+1),d.translate(n,a),e.union(d)}}if(this.combindShadowAABBBounds(e,r),e.empty())return;let a=!0;const o=r.transMatrix;r&&r.isContainer&&(a=!(1===o.a&&0===o.b&&0===o.c&&1===o.d&&0===o.e&&0===o.f)),a&&i.transformBoundsWithMatrix(e,e,o)}validCheck(t,e,i,s){if(!s)return!0;if(null!=t.forceBoundsHeight||null!=t.forceBoundsWidth)return!0;if(s.shadowRoot||s.isContainer)return!0;const{visible:n=e.visible}=t;return!(!s.valid||!n)||(i.empty()||(s.parent&&i.transformWithMatrix(s.parent.globalTransMatrix),ze.graphicService.clearAABBBounds(s,s.stage,i),i.clear()),!1)}updateTempAABBBounds(t){const e=this.tempAABBBounds1,i=this.tempAABBBounds2;return e.setValue(t.x1,t.y1,t.x2,t.y2),i.setValue(t.x1,t.y1,t.x2,t.y2),{tb1:e,tb2:i}}};Ls=Ms([N(),Cs(0,U(ls)),Os("design:paramtypes",[Object])],Ls);const Es={x:0,y:0,z:0,lastModelMatrix:null};class Is{init(t){t&&(this._renderContribitions=t.getContributions()),this._renderContribitions||(this._renderContribitions=[]),this.builtinContributions&&this.builtinContributions.forEach((t=>this._renderContribitions.push(t))),this._renderContribitions.length&&(this._renderContribitions.sort(((t,e)=>e.order-t.order)),this._beforeRenderContribitions=this._renderContribitions.filter((t=>t.time===It.beforeFillStroke)),this._afterRenderContribitions=this._renderContribitions.filter((t=>t.time===It.afterFillStroke)))}beforeRenderStep(t,e,i,s,n,r,a,o,l,h,c,d,u){this._beforeRenderContribitions&&this._beforeRenderContribitions.forEach((p=>{p.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(p.supportedAppName)?p.supportedAppName:[p.supportedAppName]).includes(t.stage.params.context.appName)||p.drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u)}))}afterRenderStep(t,e,i,s,n,r,a,o,l,h,c,d,u){this._afterRenderContribitions&&this._afterRenderContribitions.forEach((p=>{p.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(p.supportedAppName)?p.supportedAppName:[p.supportedAppName]).includes(t.stage.params.context.appName)||p.drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u)}))}valid(t,e,i,s){const{fill:n=e.fill,background:r,stroke:a=e.stroke,opacity:o=e.opacity,fillOpacity:l=e.fillOpacity,lineWidth:h=e.lineWidth,strokeOpacity:c=e.strokeOpacity,visible:d=e.visible}=t.attribute,u=ms(o,l,n),p=ys(o,c),f=fs(n,r),g=gs(a,h);return!(!t.valid||!d)&&!(!f&&!g)&&!!(u||p||i||s||r)&&{fVisible:u,sVisible:p,doFill:f,doStroke:g}}transform(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{x:n=e.x,y:r=e.y,z:a=e.z,scaleX:o=e.scaleX,scaleY:l=e.scaleY,angle:h=e.angle,postMatrix:c}=t.attribute,d=i.modelMatrix,u=i.camera;Es.x=n,Es.y=r,Es.z=a,Es.lastModelMatrix=d;const p=u&&(s||function(t){const{alpha:e,beta:i}=t.attribute;return e||i}(t)),f=p?t.transMatrix.onlyTranslate()&&!c:1===o&&1===l&&0===h&&!c;if(p){const s=Ps.allocate(),n=Ps.allocate();ks(n,t,e),Ss(s,d||s,n),Es.x=0,Es.y=0,Es.z=0,i.modelMatrix=s,i.setTransform(1,0,0,1,0,0,!0),Ps.free(n)}if(f&&!d){const s=t.getOffsetXY(e);Es.x+=s.x,Es.y+=s.y,Es.z=a,i.setTransformForCurrent()}else if(p)Es.x=0,Es.y=0,Es.z=0,i.setTransform(1,0,0,1,0,0,!0);else if(u&&i.project){const s=t.getOffsetXY(e);Es.x+=s.x,Es.y+=s.y,this.transformWithoutTranslate(i,Es.x,Es.y,Es.z,o,l,h)}else i.transformFromMatrix(t.transMatrix,!0),Es.x=0,Es.y=0,Es.z=0;return Es}transformUseContext2d(t,e,i,s){const n=s.camera;if(this.camera=n,n){const e=t.AABBBounds,n=e.x2-e.x1,r=e.y2-e.y1,a=s.project(0,0,i),o=s.project(n,0,i),l=s.project(n,r,i),h={x:0,y:0},c={x:n,y:0},d={x:n,y:r};s.camera=null;const u=1/(h.x*(d.y-c.y)-c.x*d.y+d.x*c.y+(c.x-d.x)*h.y),p=-(h.y*(l.x-o.x)-c.y*l.x+d.y*o.x+(c.y-d.y)*a.x)*u,f=(c.y*l.y+h.y*(o.y-l.y)-d.y*o.y+(d.y-c.y)*a.y)*u,g=(h.x*(l.x-o.x)-c.x*l.x+d.x*o.x+(c.x-d.x)*a.x)*u,m=-(c.x*l.y+h.x*(o.y-l.y)-d.x*o.y+(d.x-c.x)*a.y)*u,y=(h.x*(d.y*o.x-c.y*l.x)+h.y*(c.x*l.x-d.x*o.x)+(d.x*c.y-c.x*d.y)*a.x)*u,b=(h.x*(d.y*o.y-c.y*l.y)+h.y*(c.x*l.y-d.x*o.y)+(d.x*c.y-c.x*d.y)*a.y)*u;s.setTransform(p,f,g,m,y,b,!0)}}restoreTransformUseContext2d(t,e,i,s){this.camera&&(s.camera=this.camera)}transformWithoutTranslate(t,e,i,s,n,r,a){const o=t.project(e,i,s);t.translate(o.x,o.y,!1),t.scale(n,r,!1),t.rotate(a,!1),t.translate(-o.x,-o.y,!1),t.setTransformForCurrent()}_draw(t,e,i,s,n){const{context:r}=s;if(!r)return;const{renderable:a}=t.attribute;if(!1===a)return;r.highPerformanceSave();const o=this.transform(t,e,r,i),{x:l,y:h,z:c,lastModelMatrix:d}=o;this.z=c,function(t,e,i,s,n,r,a,o){if(!t.pathProxy)return!1;const l=Qe(t,null==r?void 0:r.theme)[t.type.replace("3d","")],{fill:h=l.fill,stroke:c=l.stroke,opacity:d=l.opacity,fillOpacity:u=l.fillOpacity,lineWidth:p=l.lineWidth,strokeOpacity:f=l.strokeOpacity,visible:g=l.visible,x:m=l.x,y:y=l.y}=t.attribute,b=ms(d,u,h),x=ys(d,f),v=fs(h),_=gs(c,p);return!g||(!v&&!_||(!(b||x||a||o)||(e.beginPath(),Nt(("function"==typeof t.pathProxy?t.pathProxy(t.attribute):t.pathProxy).commandList,e,i,s),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),_&&(o?o(e,t.attribute,l):x&&(e.setStrokeStyle(t,t.attribute,i-m,s-y,l),e.stroke())),v&&(a?a(e,t.attribute,l):b&&(e.setCommonStyle(t,t.attribute,i-m,s-y,l),e.fill())),!0)))}(t,r,l,h,0,n)||(this.drawShape(t,r,l,h,s,n),this.z=0,r.modelMatrix!==d&&Ps.free(r.modelMatrix),r.modelMatrix=d),r.highPerformanceRestore()}}var Rs=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Us=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ds=function(t,e){return function(i,s){e(i,s,t)}};const Ns=new class{constructor(){this.time=It.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){var p;const{background:f,backgroundOpacity:g=(null!==(p=t.attribute.fillOpacity)&&void 0!==p?p:l.backgroundOpacity),opacity:m=l.opacity,backgroundMode:y=l.backgroundMode,backgroundFit:b=l.backgroundFit}=t.attribute;if(f)if(t.backgroundImg&&t.resources){const n=t.resources.get(f);if("success"!==n.state||!n.data)return;if(e.save(),t.parent&&!t.transMatrix.onlyTranslate()){const i=Qe(t.parent).group,{scrollX:s=i.scrollX,scrollY:n=i.scrollY}=t.parent.attribute;e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.translate(s,n)}e.clip();const r=t.AABBBounds;e.setCommonStyle(t,t.attribute,i,s,l),e.globalAlpha=g*m,this.doDrawImage(e,n.data,r,y,b),e.restore(),t.transMatrix.onlyTranslate()||e.setTransformForCurrent()}else e.highPerformanceSave(),e.setCommonStyle(t,t.attribute,i,s,l),e.globalAlpha=g*m,e.fillStyle=f,e.fill(),e.highPerformanceRestore()}doDrawImage(t,e,i,s,n){if("no-repeat"===s)t.drawImage(e,i.x1,i.y1,i.width(),i.height());else{const r=i.width(),a=i.height();let o=r,l=a;if(n&&"repeat"!==s&&(e.width||e.height)){const i=e.width,n=e.height;"repeat-x"===s?(o=i*(a/n),l=a):"repeat-y"===s&&(l=n*(r/i),o=r);const h=t.dpr,c=Ve.allocate({width:o,height:l,dpr:h}),d=c.getContext("2d");d&&(d.inuse=!0,d.clearMatrix(),d.setTransformForCurrent(!0),d.clearRect(0,0,o,l),d.drawImage(e,0,0,o,l),e=c.nativeCanvas),Ve.free(c)}const h=t.dpr,c=t.createPattern(e,s);c.setTransform&&c.setTransform(new DOMMatrix([1/h,0,0,1/h,0,0])),t.fillStyle=c,t.translate(i.x1,i.y1),t.fillRect(0,0,r,a),t.translate(-i.x1,-i.y1)}}};let js=class{constructor(t){this.subRenderContribitions=t,this.time=It.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){this._subRenderContribitions||(this._subRenderContribitions=this.subRenderContribitions.getContributions()),this._subRenderContribitions.forEach((p=>{p.render(t,e,i,s,n,r,a,o,l,h,c,d,u)}))}};js=Rs([N(),Ds(0,U(tt)),Ds(0,j(vs)),Us("design:paramtypes",[Object])],js);const Fs=new class{constructor(){this.time=It.afterFillStroke,this.useStyle=!0,this.order=10}createCommonPattern(t,e,i,s,n){const r=(t-2*e)/2,a=s.dpr,o=Ve.allocate({width:t,height:t,dpr:a}),l=o.getContext("2d");if(!l)return null;l.inuse=!0,l.clearMatrix(),l.setTransformForCurrent(!0),l.clearRect(0,0,t,t),n(r,l);const h=s.createPattern(o.nativeCanvas,"repeat");return h.setTransform&&h.setTransform(new DOMMatrix([1/a,0,0,1/a,0,0])),Ve.free(o),h}createCirclePattern(t,e,s,n){return this.createCommonPattern(t,e,s,n,((t,e)=>{e.fillStyle=s,e.arc(t,t,t,0,i.pi2),e.fill()}))}createDiamondPattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((e,s)=>{const n=t/2,r=n;s.fillStyle=i,s.moveTo(n,r-e),s.lineTo(e+n,r),s.lineTo(n,r+e),s.lineTo(n-e,r),s.closePath(),s.fill()}))}createRectPattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((t,s)=>{const n=e,r=n;s.fillStyle=i,s.fillRect(n,r,2*t,2*t)}))}createVerticalLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((s,n)=>{const r=e;n.fillStyle=i,n.fillRect(r,0,2*s,t)}))}createHorizontalLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((s,n)=>{const r=e;n.fillStyle=i,n.fillRect(0,r,t,2*s)}))}createBiasLRLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((e,s)=>{s.strokeStyle=i,s.lineWidth=e,s.moveTo(0,0),s.lineTo(t,t);const n=t/2,r=-n;s.moveTo(n,r),s.lineTo(n+t,r+t),s.moveTo(-n,-r),s.lineTo(-n+t,-r+t),s.stroke()}))}createBiasRLLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((e,s)=>{s.strokeStyle=i,s.lineWidth=e,s.moveTo(t,0),s.lineTo(0,t);const n=t/2,r=n;s.moveTo(t+n,r),s.lineTo(n,r+t),s.moveTo(t-n,-r),s.lineTo(-n,-r+t),s.stroke()}))}createGridPattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((t,s)=>{const n=e,r=n;s.fillStyle=i,s.fillRect(n,r,t,t),s.fillRect(n+t,r+t,t,t)}))}initTextureMap(t,e){this.textureMap=new Map}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){this.textureMap||this.initTextureMap(e,t.stage);const{texture:p=l.texture,textureColor:f=l.textureColor,textureSize:g=l.textureSize,texturePadding:m=l.texturePadding}=t.attribute;p&&this.drawTexture(p,t,e,i,s,l,f,g,m)}drawTexture(t,e,i,s,n,r,a,o,l){let h=this.textureMap.get(t);if(!h)switch(t){case"circle":h=this.createCirclePattern(o,l,a,i);break;case"diamond":h=this.createDiamondPattern(o,l,a,i);break;case"rect":h=this.createRectPattern(o,l,a,i);break;case"vertical-line":h=this.createVerticalLinePattern(o,l,a,i);break;case"horizontal-line":h=this.createHorizontalLinePattern(o,l,a,i);break;case"bias-lr":h=this.createBiasLRLinePattern(o,l,a,i);break;case"bias-rl":h=this.createBiasRLLinePattern(o,l,a,i);break;case"grid":h=this.createGridPattern(o,l,a,i)}h&&(i.highPerformanceSave(),i.setCommonStyle(e,e.attribute,s,n,r),i.fillStyle=h,i.fill(),i.highPerformanceRestore())}};const zs=new class{constructor(){this.time=It.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d){const u=t.getParsedPath();if(!u)return;const{outerBorder:p,innerBorder:f}=t.attribute,g=p&&!1!==p.visible,m=f&&!1!==f.visible;if(!g&&!m)return;const{size:y=l.size,opacity:b=l.opacity,x:x=l.x,y:v=l.y,scaleX:_=l.scaleX,scaleY:A=l.scaleY,keepStrokeScale:B=l.keepStrokeScale}=t.attribute,T=(n,r)=>{const a=!(!n||!n.stroke),{distance:o=l[r].distance}=n,h=B?o:We(e,o,e.dpr),c="outerBorder"===r?1:-1;if(e.beginPath(),!1===u.drawOffset(e,y,i,s,c*h)&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),d)d(e,n,l[r]);else if(a){const a=l[r].opacity;l[r].opacity=b,e.setStrokeStyle(t,n,(x-i)/_,(v-s)/A,l[r]),l[r].opacity=a,e.stroke()}};g&&T(p,"outerBorder"),m&&T(f,"innerBorder")}},Ws=Fs,Gs=Ns;function $s(t,e,s,n){if(!e.p1)return;const{offsetX:r=0,offsetY:a=0,offsetZ:o=0}=n||{};if(1===s)e.p2&&e.p3?t.bezierCurveTo(r+e.p1.x,a+e.p1.y,r+e.p2.x,a+e.p2.y,r+e.p3.x,a+e.p3.y,o):t.lineTo(r+e.p1.x,a+e.p1.y,o);else if(e.p2&&e.p3){const[n]=function(t,e){const{p0:s,p1:n,p2:r,p3:a}=t,o=Wt(s,n,r,a,e),l=i.PointService.pointAtPP(s,n,e),h=i.PointService.pointAtPP(n,r,e),c=i.PointService.pointAtPP(r,a,e),d=i.PointService.pointAtPP(l,h,e),u=i.PointService.pointAtPP(h,c,e);return[new Gt(s,l,d,o),new Gt(o,u,c,a)]}(e,s);t.bezierCurveTo(r+n.p1.x,a+n.p1.y,r+n.p2.x,a+n.p2.y,r+n.p3.x,a+n.p3.y,o)}else{const i=e.getPointAt(s);t.lineTo(r+i.x,a+i.y,o)}}function Ys(t,e,i,s,n,r,a){var o;let l=e.p0,h=s;if(i&&i.originP1===i.originP2&&(l=i.p0),e.defined)s||(t.lineTo(l.x+n,l.y+r,a),h=!s);else{const{originP1:c,originP2:d}=e;let u;if(c&&!1!==c.defined&&!i?u=l:c&&!1!==d.defined&&(u=null!==(o=e.p3)&&void 0!==o?o:e.p1),s){h=!s;const i=u?u.x:e.p0.x,o=u?u.y:e.p0.y;t.moveTo(i+n,o+r,a)}else u&&(h=!s,t.lineTo(u.x+n,u.y+r,a))}return h}var Vs=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let Xs=class extends Is{constructor(){super(...arguments),this.numberType=ss}draw(t,e,i,s){const n=Qe(t,null==s?void 0:s.theme).line;this._draw(t,n,!1,i,s)}drawSegmentItem(t,e,s,n,r,a,o,l,h,c,d,u,p,f,g){var m;if(!e)return;t.beginPath();const y=null!==(m=this.z)&&void 0!==m?m:0;(function(t,e,s,n,r){const{offsetX:a=0,offsetY:o=0,offsetZ:l=0,mode:h="none",drawConnect:c=!1}=r||{};if(c&&"none"===h)return;if(!e)return;let d=!0;const{curves:u}=e;if(s>=1){if(c){let e,i=!0;u.forEach(((s,n)=>{s.originP1!==s.originP2?(i=Ys(t,s,e,i,a,o,l),e=s):e=s}))}else u.forEach((e=>{e.defined?(d&&t.moveTo(e.p0.x+a,e.p0.y+o,l),$s(t,e,1,r),d=!1):d=!0}));return}if(s<=0)return;let p;"x"===n?p=Lt.ROW:"y"===n?p=Lt.COLUMN:"auto"===n&&(p=e.direction);const f=s*e.tryUpdateLength(p);let g=0,m=!0,y=null;for(let e=0,s=u.length;e<s;e++){const s=u[e],n=s.getLength(p),h=(f-g)/n;if(g+=n,h<0)break;if(c){if(s.originP1===s.originP2){y=s;continue}m=Ys(t,s,y,m,a,o,l),y=s}else{if(!s.defined){d=!0;continue}d&&t.moveTo(s.p0.x+a,s.p0.y+o,l),$s(t,s,i.min(h,1),r),d=!1}}})(t.camera?t:t.nativeContext,e,h,c,{offsetX:d,offsetY:u,offsetZ:y}),p.cache&&!i.isArray(p.cache)&&p.cache.curves.every((t=>t.defined))&&p.attribute.curveType&&p.attribute.curveType.includes("Closed")&&t.closePath(),t.setShadowBlendStyle&&t.setShadowBlendStyle(p,o,l);const{x:b=0,x:x=0}=o;return!1!==s&&(f?f(t,o,l):r&&(t.setCommonStyle(p,o,b-d,x-u,l),t.fill())),!1!==n&&(g?g(t,o,l):a&&(t.setStrokeStyle(p,o,b-d,x-u,l),t.stroke())),!1}drawLinearLineHighPerformance(t,e,i,s,n,r,a,o,l,h,c,d,u){var p;e.beginPath();const f=null!==(p=this.z)&&void 0!==p?p:0,{points:g}=t.attribute,m=g[0];e.moveTo(m.x+a,m.y+o,f);for(let t=1;t<g.length;t++){const i=g[t];e.lineTo(i.x+a,i.y+o,f)}e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l);const{x:y=0,x:b=0}=t.attribute;!1!==i&&(d?d(e,t.attribute,l):n&&(e.setCommonStyle(t,t.attribute,y-a,b-o,l),e.fill())),!1!==s&&(u?u(e,t.attribute,l):r&&(e.setStrokeStyle(t,t.attribute,y-a,b-o,l),e.stroke()))}drawShape(t,e,s,n,r,a,o,l){const h=Qe(t,null==a?void 0:a.theme).line,{fill:c=h.fill,stroke:d=h.stroke,fillOpacity:u=h.fillOpacity,strokeOpacity:p=h.strokeOpacity,segments:f,points:g,closePath:m,curveTension:y=h.curveTension,connectedType:b=h.connectedType}=t.attribute;if(!this.valid(t,h,o,l))return;let{curveType:x=h.curveType}=t.attribute;m&&"linear"===x&&(x="linearClosed");const{clipRange:v=h.clipRange,clipRangeByDimension:_=h.clipRangeByDimension}=t.attribute;if(1===v&&!f&&!g.some((t=>!1===t.defined))&&"linear"===x)return this.drawLinearLineHighPerformance(t,e,!!c,!!d,u,p,s,n,h,r,a,o,l);function A(t,e){return"none"===e?t:t.filter((t=>!1!==t.defined))}if(t.shouldUpdateShape()){const{points:e,segments:i}=t.attribute,s=e;if(i&&i.length){let e,s;if(t.cache=i.map(((t,i)=>{if(t.points.length<=1&&0===i)return t.points[0]&&(s={endX:t.points[0].x,endY:t.points[0].y,curves:[{defined:!1!==t.points[0].defined}]}),null;1===i?e={x:s.endX,y:s.endY,defined:s.curves[s.curves.length-1].defined}:i>1&&(e.x=s.endX,e.y=s.endY,e.defined=s.curves[s.curves.length-1].defined);const n=me(A(t.points,b),x,{startPoint:e,curveTension:y});return s=n,n})).filter((t=>!!t)),"linearClosed"===x){let e;for(let i=0;i<t.cache.length;i++){const s=t.cache[i];for(let t=0;t<s.curves.length;t++)if(s.curves[t].defined){e=s.curves[t].p0;break}if(e)break}t.cache[t.cache.length-1]&&t.cache[t.cache.length-1].lineTo(e.x,e.y,!0)}}else{if(!e||!e.length)return t.cache=null,void t.clearUpdateShapeTag();t.cache=me(A(s,b),x,{curveTension:y})}t.clearUpdateShapeTag()}if(Array.isArray(t.cache)){const r=t.attribute.segments.filter((t=>t.points.length));if(1===r[0].points.length&&r.shift(),1===v){let i=!1;t.cache.forEach(((a,f)=>{i||(i=this.drawSegmentItem(e,a,!!c,!!d,u,p,r[f],[h,t.attribute],v,_,s,n,t,o,l))}))}else{const a=t.cache.reduce(((t,e)=>t+e.getLength()),0),f=v*a;let g=0,m=!1;t.cache.forEach(((a,y)=>{if(m)return;const b=a.getLength(),x=(f-g)/b;g+=b,x>0&&(m=this.drawSegmentItem(e,a,!!c,!!d,u,p,r[y],[h,t.attribute],i.min(x,1),_,s,n,t,o,l))}))}}else this.drawSegmentItem(e,t.cache,!!c,!!d,u,p,t.attribute,h,v,_,s,n,t,o,l)}};Xs=Vs([N()],Xs);var Hs=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Ks=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},qs=function(t,e){return function(i,s){e(i,s,t)}};let Zs=class extends Is{constructor(t){super(),this.symbolRenderContribitions=t,this.numberType=as,this.builtinContributions=[zs,Gs,Ws],this.init(t)}drawShape(t,e,s,n,r,a,o,l){var h;const c=Qe(t,null==a?void 0:a.theme).symbol,{size:d=c.size,x:u=c.x,y:p=c.y,scaleX:f=c.scaleX,scaleY:g=c.scaleY,fillStrokeOrder:m=c.fillStrokeOrder}=t.attribute,y=this.valid(t,c,o,l);if(!y)return;const{fVisible:b,sVisible:x,doFill:v,doStroke:_}=y,A=t.getParsedPath();if(!A)return;const{keepDirIn3d:B=c.keepDirIn3d}=t.attribute,T=null!==(h=this.z)&&void 0!==h?h:0;e.beginPath();const S=(i,r)=>{var a,h,d;if(t._parsedPath.svgCache){const e=Object.assign({},r);e.fill=null!==(a=r.fill)&&void 0!==a?a:t.attribute.fill,e.opacity=null!==(h=r.opacity)&&void 0!==h?h:t.attribute.opacity,e.fillOpacity=t.attribute.fillOpacity,e.stroke=null!==(d=r.stroke)&&void 0!==d?d:t.attribute.stroke,r=e}const y=()=>{r.fill&&(o?o(e,t.attribute,c):(e.setCommonStyle(t,r,u-s,p-n,c),e.fill()))},b=()=>{r.stroke&&(l?l(e,t.attribute,c):(e.setStrokeStyle(t,r,(u-s)/f,(p-n)/g,c),e.stroke()))};m?(b(),y()):(y(),b())};if(B&&e.camera&&e.project){const t=e.project(s,n,T),r=e.camera;e.camera=null,!1===A.draw(e,i.isArray(d)?[d[0]*f,d[1]*g]:d*f,t.x,t.y,void 0,S)&&e.closePath(),e.camera=r}else!1===A.draw(e,d,s,n,T,S)&&e.closePath();e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,c),this.beforeRenderStep(t,e,s,n,v,_,b,x,c,r,o,l);const w=()=>{v&&!A.isSvg&&(o?o(e,t.attribute,c):b&&(e.setCommonStyle(t,t.attribute,u-s,p-n,c),e.fill()))},P=()=>{_&&!A.isSvg&&(l?l(e,t.attribute,c):x&&(e.setStrokeStyle(t,t.attribute,(u-s)/f,(p-n)/g,c),e.stroke()))};m?(P(),w()):(w(),P()),this.afterRenderStep(t,e,s,n,v,_,b,x,c,r,o,l)}draw(t,e,i,s){const n=Qe(t,null==s?void 0:s.theme).symbol;this._draw(t,n,!1,i,s)}};Zs=Hs([N(),qs(0,U(tt)),qs(0,j(xs)),Ks("design:paramtypes",[Object])],Zs);const Js=new class{constructor(){this.store=new Map}RegisterGraphicCreator(t,e){this.store.set(t,e),this[t]=e}CreateGraphic(t,e){const i=this.store.get(t);return i?i(e):null}};function Qs(t,e,i,s){t.moveTo(e[0].x+i,e[0].y+s);for(let n=1;n<e.length;n++)t.lineTo(e[n].x+i,e[n].y+s)}function tn(t,e){return Math.sqrt(t*t+e*e)}function en(t,e,i,s,n){const r=e/i;return{x:t.x-s*r,y:t.y-n*r}}const sn=Fs,nn=Ns;var rn=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},an=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},on=function(t,e){return function(i,s){e(i,s,t)}};let ln=class extends Is{constructor(t){super(),this.polygonRenderContribitions=t,this.numberType=rs,this.builtinContributions=[nn,sn],this.init(t)}drawShape(t,e,s,n,r,a,o,l){const h=Qe(t,null==a?void 0:a.theme).polygon,{points:c=h.points,cornerRadius:d=h.cornerRadius,x:u=h.x,y:p=h.y,closePath:f=h.closePath,fillStrokeOrder:g=h.fillStrokeOrder}=t.attribute,m=this.valid(t,h,o,l);if(!m)return;const{fVisible:y,sVisible:b,doFill:x,doStroke:v}=m;e.beginPath(),d<=0||i.isArray(d)&&d.every((t=>0===t))?Qs(e.camera?e:e.nativeContext,c,s,n):function(t,e,i,s,n){let r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];var a;if(e.length<3)return void Qs(t,e,i,s);let o=0,l=e.length-1;r||(o+=1,l-=1,t.moveTo(e[0].x+i,e[0].y+s));for(let r=o;r<=l;r++){const o=e[0===r?l:(r-1)%e.length],h=e[r%e.length],c=e[(r+1)%e.length],d=h.x-o.x,u=h.y-o.y,p=h.x-c.x,f=h.y-c.y,g=(Math.atan2(u,d)-Math.atan2(f,p))/2,m=Math.abs(Math.tan(g));let y=Array.isArray(n)?null!==(a=n[r%e.length])&&void 0!==a?a:0:n,b=y/m;const x=tn(d,u),v=tn(p,f),_=Math.min(x,v);b>_&&(b=_,y=_*m);const A=en(h,b,x,d,u),B=en(h,b,v,p,f),T=2*h.x-A.x-B.x,S=2*h.y-A.y-B.y,w=tn(T,S),P=en(h,tn(b,y),w,T,S);let M=Math.atan2(A.y-P.y,A.x-P.x);const O=Math.atan2(B.y-P.y,B.x-P.x);let C=O-M;C<0&&(M=O,C=-C),C>Math.PI&&(C-=Math.PI),0===r?t.moveTo(A.x+i,A.y+s):t.lineTo(A.x+i,A.y+s),C&&t.arcTo(h.x+i,h.y+s,B.x+i,B.y+s,y),t.lineTo(B.x+i,B.y+s)}r||t.lineTo(e[l+1].x+i,e[l+1].y+s)}(e.camera?e:e.nativeContext,c,s,n,d,f),f&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h),this.beforeRenderStep(t,e,s,n,x,v,y,b,h,r,o,l);const _=()=>{x&&(o?o(e,t.attribute,h):y&&(e.setCommonStyle(t,t.attribute,u-s,p-n,h),e.fill()))},A=()=>{v&&(l?l(e,t.attribute,h):b&&(e.setStrokeStyle(t,t.attribute,u-s,p-n,h),e.stroke()))};g?(A(),_()):(_(),A()),this.afterRenderStep(t,e,s,n,x,v,y,b,h,r,o,l)}draw(t,e,i,s){const n=Qe(t,null==s?void 0:s.theme).polygon;this._draw(t,n,!1,i,s)}};ln=rn([N(),on(0,U(tt)),on(0,j(bs)),an("design:paramtypes",[Object])],ln);const hn=Symbol.for("GraphicRender"),cn=Symbol.for("LineRender"),dn=Symbol.for("PolygonRender"),un=Symbol.for("SymbolRender");class pn{constructor(t,e,i){this.fontFamily=t,this.textOptions=e,this.textMeasure=i}LayoutBBox(t,e,i,s){if(t.xOffset="left"===e||"start"===e?0:"center"===e?t.width/-2:"right"===e||"end"===e?-t.width:0,"top"===i)t.yOffset=0;else if("middle"===i)t.yOffset=t.height/-2;else if("alphabetic"===i){let e=.79;if(1===s.length){const t=s[0];e=t.ascent/(t.ascent+t.descent)}t.yOffset=t.height*-e}else t.yOffset=-t.height;return t}GetLayoutByLines(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;const{lineWidth:o,suffixPosition:l="end",measureMode:h=rt.actualBounding,keepCenterInLine:c=!1}=null!=a?a:{};t=t.map((t=>t.toString()));const d=[],u=[0,0];if("number"==typeof o&&o!==1/0){let e;for(let i=0,s=t.length;i<s;i++){const s=this.textMeasure.measureTextPixelADscentAndWidth(t[i],this.textOptions,h);let a=t[i].toString();if(s.width>o){const s=this.textMeasure.clipTextWithSuffix(t[i],this.textOptions,o,n,r,l);a=s.str,e=s.width}else e=s.width;d.push({str:a,width:e,ascent:s.ascent,descent:s.descent,keepCenterInLine:c})}u[0]=o}else{let e,i,s=0;for(let n=0,r=t.length;n<r;n++){i=t[n];const r=this.textMeasure.measureTextPixelADscentAndWidth(t[n],this.textOptions,h);e=r.width,s=Math.max(s,e),d.push({str:i,width:e,ascent:r.ascent,descent:r.descent,keepCenterInLine:c})}u[0]=s}u[1]=d.length*s,u[0]=d.reduce(((t,e)=>Math.max(t,e.width)),0);const p={xOffset:0,yOffset:0,width:u[0],height:u[1]};return this.LayoutBBox(p,e,i,d),this.layoutWithBBox(p,d,e,i,s)}layoutWithBBox(t,e,i,s,n){const r=[0,0],a=e.length*n;"top"===s||("middle"===s?r[1]=(t.height-a)/2:"bottom"===s&&(r[1]=t.height-a));for(let a=0;a<e.length;a++)this.lineOffset(t,e[a],i,s,n,r);return{bbox:t,lines:e,fontFamily:this.fontFamily,fontSize:this.textOptions.fontSize,fontWeight:this.textOptions.fontWeight,lineHeight:n,textAlign:i,textBaseline:s}}lineOffset(t,e,i,s,n,r){if("left"===i||"start"===i?e.leftOffset=0:"center"===i?e.leftOffset=(t.width-e.width)/2:"right"!==i&&"end"!==i||(e.leftOffset=t.width-e.width),e.topOffset=n/2+(e.ascent-e.descent)/2+r[1],!e.keepCenterInLine){const t=0,i=e.ascent+e.descent+t;if(i<n-t&&("bottom"===s?e.topOffset+=(n-i)/2:"top"===s&&(e.topOffset-=(n-i)/2)),"alphabetic"===s){const t=n/(e.ascent+e.descent);e.topOffset=n/2+(e.ascent-e.descent)/2*t+r[1]}}return r[1]+=n,e}}const fn=["text","maxLineWidth","maxWidth","textAlign","textBaseline","heightLimit","lineClamp","fontSize","fontFamily","fontWeight","ellipsis","lineHeight","direction","wordBreak","heightLimit","lineClamp",...ki];class gn extends Di{get font(){const t=this.getGraphicTheme();return this._font||(this._font=i.getContextFont(this.attribute,t)),this._font}get clipedText(){var t;const e=this.attribute,i=this.getGraphicTheme(),s=this.getMaxWidth(i);return Number.isFinite(s)?(this.tryUpdateAABBBounds(),this.cache.clipedText):(null!==(t=e.text)&&void 0!==t?t:i.text).toString()}get clipedWidth(){return this.tryUpdateAABBBounds(),this.cache.clipedWidth}get cliped(){var t,e;const i=this.getGraphicTheme(),s=this.attribute,n=this.getMaxWidth(i);if(!Number.isFinite(n))return!1;const{text:r}=this.attribute;if(this.tryUpdateAABBBounds(),null===(e=null===(t=this.cache)||void 0===t?void 0:t.layoutData)||void 0===e?void 0:e.lines){let t="";return this.cache.layoutData.lines.forEach((e=>{t+=e.str})),(Array.isArray(r)?r.join(""):r)!==t}return"vertical"===s.direction&&this.cache.verticalList&&this.cache.verticalList[0]?this.cache.verticalList[0].map((t=>t.text)).join("")!==s.text.toString():null!=this.clipedText&&this.clipedText!==s.text.toString()}get multilineLayout(){return this.tryUpdateAABBBounds(),this.cache.layoutData}get isMultiLine(){return Array.isArray(this.attribute.text)||"normal"===this.attribute.whiteSpace}constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{text:"",fontSize:16}),this.type="text",this.numberType=os,this.cache={}}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{text:t}=this.attribute;return i.isArray(t)?!t.every((t=>null==t||""===t)):null!=t&&""!==t}getGraphicTheme(){return Qe(this).text}doUpdateOBBBounds(){const t=this.getGraphicTheme();this._OBBBounds.clear();const e=this.attribute,{angle:s=t.angle}=e;if(!s){const t=this.AABBBounds;return this._OBBBounds.setValue(t.x1,t.y1,t.x2,t.y2),this._OBBBounds}this.obbText||(this.obbText=new gn({})),this.obbText.setAttributes(Object.assign(Object.assign({},e),{angle:0}));const n=this.obbText.AABBBounds,{x:r,y:a}=e,o={x:(n.x1+n.x2)/2,y:(n.y1+n.y2)/2},l=i.rotatePoint(o,s,{x:r,y:a});return this._OBBBounds.copy(n),this._OBBBounds.translate(l.x-o.x,l.y-o.y),this._OBBBounds.angle=s,this._OBBBounds}updateAABBBounds(t,e,s){const{text:n=e.text}=this.attribute;Array.isArray(n)?this.updateMultilineAABBBounds(n):this.updateSingallineAABBBounds(n);const{tb1:r}=ze.graphicService.updateTempAABBBounds(s),{scaleX:a=e.scaleX,scaleY:o=e.scaleY,shadowBlur:l=e.shadowBlur,strokeBoundsBuffer:h=e.strokeBoundsBuffer}=t;if(l){Hi(r,l/Math.abs(a+o),!0,h),s.union(r)}return ze.graphicService.combindShadowAABBBounds(s,this),null==t.forceBoundsHeight&&null==t.forceBoundsWidth||ze.graphicService.updateHTMLTextAABBBounds(t,e,s),i.transformBoundsWithMatrix(s,s,this.transMatrix),s}updateSingallineAABBBounds(t){this.updateMultilineAABBBounds([t]);const e=this.cache.layoutData;if(e&&e.lines&&e.lines.length){const t=e.lines[0];this.cache.clipedText=t.str,this.cache.clipedWidth=t.width}return this._AABBBounds}updateMultilineAABBBounds(t){const e=this.getGraphicTheme(),{direction:i=e.direction,underlineOffset:s=e.underlineOffset}=this.attribute,n="horizontal"===i?this.updateHorizontalMultilineAABBBounds(t):this.updateVerticalMultilineAABBBounds(t);return"horizontal"===i&&s&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+s),n}guessLineHeightBuf(t){return t?.1*t:0}updateHorizontalMultilineAABBBounds(t){var e;const i=this.getGraphicTheme(),s=this.attribute,{fontFamily:n=i.fontFamily,textAlign:r=i.textAlign,textBaseline:a=i.textBaseline,fontSize:o=i.fontSize,fontWeight:l=i.fontWeight,ellipsis:h=i.ellipsis,maxLineWidth:c,stroke:d=i.stroke,wrap:u=i.wrap,measureMode:p=i.measureMode,lineWidth:f=i.lineWidth,whiteSpace:g=i.whiteSpace,suffixPosition:m=i.suffixPosition,ignoreBuf:y=i.ignoreBuf,keepCenterInLine:b=i.keepCenterInLine}=s,x=y?0:this.guessLineHeightBuf(o),v=this.getLineHeight(s,i,x);if("normal"===g||u)return this.updateWrapAABBBounds(t);if(!this.shouldUpdateShape()&&(null===(e=this.cache)||void 0===e?void 0:e.layoutData)){const t=this.cache.layoutData.bbox;return this._AABBBounds.set(t.xOffset,t.yOffset,t.xOffset+t.width,t.yOffset+t.height),d&&this._AABBBounds.expand(f/2),this._AABBBounds}const _=ze.graphicUtil.textMeasure,A=new pn(n,{fontSize:o,fontWeight:l,fontFamily:n,lineHeight:v},_).GetLayoutByLines(t,r,a,v,!0===h?i.ellipsis:h||void 0,!1,{lineWidth:c,suffixPosition:m,measureMode:p,keepCenterInLine:b}),{bbox:B}=A;return this.cache.layoutData=A,this.clearUpdateShapeTag(),this._AABBBounds.set(B.xOffset,B.yOffset,B.xOffset+B.width,B.yOffset+B.height),d&&this._AABBBounds.expand(f/2),this._AABBBounds}updateWrapAABBBounds(t){var e,s,n;const r=this.getGraphicTheme(),{fontFamily:a=r.fontFamily,textAlign:o=r.textAlign,textBaseline:l=r.textBaseline,fontSize:h=r.fontSize,ellipsis:c=r.ellipsis,maxLineWidth:d,stroke:u=r.stroke,lineWidth:p=r.lineWidth,wordBreak:f=r.wordBreak,fontWeight:g=r.fontWeight,ignoreBuf:m=r.ignoreBuf,measureMode:y=r.measureMode,suffixPosition:b=r.suffixPosition,heightLimit:x=0,lineClamp:v,keepCenterInLine:_=r.keepCenterInLine}=this.attribute,A=m?0:this.guessLineHeightBuf(h),B=this.getLineHeight(this.attribute,r,A);if(!this.shouldUpdateShape()&&(null===(e=this.cache)||void 0===e?void 0:e.layoutData)){const t=this.cache.layoutData.bbox;return this._AABBBounds.set(t.xOffset,t.yOffset,t.xOffset+t.width,t.yOffset+t.height),u&&this._AABBBounds.expand(p/2),this._AABBBounds}const T=ze.graphicUtil.textMeasure,S={fontSize:h,fontWeight:g,fontFamily:a,lineHeight:B},w=new pn(a,S,T),P=i.isArray(t)?t.map((t=>t.toString())):[t.toString()],M=[],O=[0,0];let C=1/0;if(x>0&&(C=Math.max(Math.floor(x/B),1)),v&&(C=Math.min(C,v)),"number"==typeof d&&d!==1/0){if(d>0)for(let t=0;t<P.length;t++){const e=P[t];let i=!0;if(t===C-1){const i=T.clipTextWithSuffix(e,S,d,c,!1,b,t!==P.length-1),s=T.measureTextPixelADscentAndWidth(i.str,S,y);M.push({str:i.str,width:i.width,ascent:s.ascent,descent:s.descent,keepCenterInLine:_});break}const r=T.clipText(e,S,d,"break-all"!==f,"keep-all"===f);if(""!==e&&""===r.str||r.wordBreaked){if(c){const t=T.clipTextWithSuffix(e,S,d,c,!1,b);r.str=null!==(s=t.str)&&void 0!==s?s:"",r.width=null!==(n=t.width)&&void 0!==n?n:0}else r.str="",r.width=0;i=!1}const a=T.measureTextPixelADscentAndWidth(r.str,S,y);M.push({str:r.str,width:r.width,ascent:a.ascent,descent:a.descent,keepCenterInLine:_});let o=r.str.length;if(!r.wordBreaked||""!==e&&""===r.str||(i=!0,o=r.wordBreaked),r.str.length===e.length);else if(i){let i=e.substring(o);"keep-all"===f&&(i=i.replace(/^\s+/g,"")),P.splice(t+1,0,i)}}let t=0;M.forEach((e=>{t=Math.max(t,e.width)})),O[0]=t}else{let t,e,i=0;for(let s=0,n=P.length;s<n;s++){if(s===C-1){const t=T.clipTextWithSuffix(P[s],S,d,c,!1,b),e=T.measureTextPixelADscentAndWidth(t.str,S,y);M.push({str:t.str,width:t.width,ascent:e.ascent,descent:e.descent,keepCenterInLine:_}),i=Math.max(i,t.width);break}e=P[s],t=T.measureTextWidth(e,S),i=Math.max(i,t);const n=T.measureTextPixelADscentAndWidth(e,S,y);M.push({str:e,width:t,ascent:n.ascent,descent:n.descent,keepCenterInLine:_})}O[0]=i}O[1]=M.length*B;const k={xOffset:0,yOffset:0,width:O[0],height:O[1]};w.LayoutBBox(k,o,l,M);const L=w.layoutWithBBox(k,M,o,l,B);return this.cache.layoutData=L,this.clearUpdateShapeTag(),this._AABBBounds.set(k.xOffset,k.yOffset,k.xOffset+k.width,k.yOffset+k.height),u&&this._AABBBounds.expand(p/2),this._AABBBounds}updateVerticalMultilineAABBBounds(t){var e,s;const n=this.getGraphicTheme(),r=ze.graphicUtil.textMeasure;let a;const o=this.attribute,{maxLineWidth:l=n.maxLineWidth,ellipsis:h=n.ellipsis,fontFamily:c=n.fontFamily,fontSize:d=n.fontSize,fontWeight:u=n.fontWeight,stroke:p=n.stroke,lineWidth:f=n.lineWidth,verticalMode:g=n.verticalMode,suffixPosition:m=n.suffixPosition}=o,y=this.getLineHeight(o,n,0);let{textAlign:b=n.textAlign,textBaseline:x=n.textBaseline}=o;if(!g){const t=b;b=null!==(e=gn.baselineMapAlign[x])&&void 0!==e?e:"left",x=null!==(s=gn.alignMapBaseline[t])&&void 0!==s?s:"top"}if(a=0,!this.shouldUpdateShape()&&this.cache){this.cache.verticalList.forEach((t=>{const e=t.reduce(((t,e)=>t+e.width),0);a=i.max(e,a)}));const t=_s(b,a),e=this.cache.verticalList.length*y,s=As(x,e,d);return this._AABBBounds.set(s,t,s+e,t+a),p&&this._AABBBounds.expand(f/2),this._AABBBounds}const v=t.map((t=>function(t){const e=[];let i=0,s="";for(let n=0;n<t.length;n++)ts(t[n])?i?s+=t[n]:(i=1,s=t[n]):(i&&(e.push({text:s,direction:Zi.VERTICAL}),s="",i=0),e.push({text:t[n],direction:Zi.HORIZONTAL}));return s&&e.push({text:s,direction:Zi.VERTICAL}),e}(t.toString())));v.forEach(((t,e)=>{if(Number.isFinite(l))if(h){const i=!0===h?n.ellipsis:h,s=r.clipTextWithSuffixVertical(t,{fontSize:d,fontWeight:u,fontFamily:c},l,i,!1,m);v[e]=s.verticalList,a=s.width}else{const i=r.clipTextVertical(t,{fontSize:d,fontWeight:u,fontFamily:c},l,!1);v[e]=i.verticalList,a=i.width}else a=0,t.forEach((t=>{const e=t.direction===Zi.HORIZONTAL?d:r.measureTextWidth(t.text,{fontSize:d,fontWeight:u,fontFamily:c});a+=e,t.width=e}))})),this.cache.verticalList=v,this.clearUpdateShapeTag(),this.cache.verticalList.forEach((t=>{const e=t.reduce(((t,e)=>t+e.width),0);a=i.max(e,a)}));const _=_s(b,a),A=this.cache.verticalList.length*y,B=As(x,A,d);return this._AABBBounds.set(B,_,B+A,_+a),p&&this._AABBBounds.expand(f/2),this._AABBBounds}getMaxWidth(t){var e,i;const s=this.attribute;return null!==(i=null!==(e=s.maxLineWidth)&&void 0!==e?e:s.maxWidth)&&void 0!==i?i:t.maxWidth}getLineHeight(t,e,i){var s;return null!==(s=bi(t.lineHeight,t.fontSize||e.fontSize))&&void 0!==s?s:(t.fontSize||e.fontSize)+i}needUpdateTags(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fn;return super.needUpdateTags(t,e)}needUpdateTag(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fn;return super.needUpdateTag(t,e)}clone(){return new gn(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return gn.NOWORK_ANIMATE_ATTR}getBaselineMapAlign(){return gn.baselineMapAlign}getAlignMapBaseline(){return gn.alignMapBaseline}}function mn(t){return new gn(t)}gn.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,direction:1,textAlign:1,textBaseline:1,fontFamily:1,fontWeight:1},Ui),gn.baselineMapAlign={top:"left",bottom:"right",middle:"center"},gn.alignMapBaseline={left:"top",right:"bottom",center:"middle"};class yn{bounds(t,e){if(i.isNumber(t)){const i=t/2;e.x1=-i,e.x2=i,e.y1=-i,e.y2=i}else e.x1=-t[0]/2,e.x2=t[0]/2,e.y1=-t[1]/2,e.y2=t[1]/2}parseSize(t){return i.isNumber(t)?t:Math.min(t[0],t[1])}}function bn(t,e,s,n,r){return r?t.arc(s,n,e,0,i.tau,!1,r):t.arc(s,n,e,0,i.tau),!1}var xn=new class extends yn{constructor(){super(...arguments),this.type="circle",this.pathStr="M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0"}draw(t,e,i,s,n){return bn(t,this.parseSize(e)/2,i,s,n)}drawOffset(t,e,i,s,n,r){return bn(t,this.parseSize(e)/2+n,i,s,r)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e-n}, ${i} a ${n},${n} 0 1,0 ${2*n},0 a ${n},${n} 0 1,0 -${2*n},0`}};var vn=new class extends yn{constructor(){super(...arguments),this.type="cross",this.pathStr="M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z"}draw(t,e,i,s,n){return function(t,e,i,s,n){return t.moveTo(-3*e+i,-e+s,n),t.lineTo(-e+i,-e+s,n),t.lineTo(-e+i,-3*e+s,n),t.lineTo(e+i,-3*e+s,n),t.lineTo(e+i,-e+s,n),t.lineTo(3*e+i,-e+s,n),t.lineTo(3*e+i,e+s,n),t.lineTo(e+i,e+s,n),t.lineTo(e+i,3*e+s,n),t.lineTo(-e+i,3*e+s,n),t.lineTo(-e+i,e+s,n),t.lineTo(-3*e+i,e+s,n),t.closePath(),!0}(t,this.parseSize(e)/6,i,s,n)}drawOffset(t,e,i,s,n,r){return function(t,e,i,s,n,r){return t.moveTo(-3*e+i-n,-e+s-n,r),t.lineTo(-e+i-n,-e+s-n,r),t.lineTo(-e+i-n,-3*e+s-n,r),t.lineTo(e+i+n,-3*e+s-n,r),t.lineTo(e+i+n,-e+s-n,r),t.lineTo(3*e+i+n,-e+s-n,r),t.lineTo(3*e+i+n,e+s+n,r),t.lineTo(e+i+n,e+s+n,r),t.lineTo(e+i+n,3*e+s+n,r),t.lineTo(-e+i-n,3*e+s+n,r),t.lineTo(-e+i-n,e+s+n,r),t.lineTo(-3*e+i-n,e+s+n,r),t.closePath(),!0}(t,this.parseSize(e)/6,i,s,n,r)}};function _n(t,e,i,s,n){return t.moveTo(i,s-e,n),t.lineTo(e+i,s,n),t.lineTo(i,s+e,n),t.lineTo(i-e,s,n),t.closePath(),!0}var An=new class extends yn{constructor(){super(...arguments),this.type="diamond",this.pathStr="M-0.5,0L0,-0.5L0.5,0L0,0.5Z"}draw(t,e,i,s,n){return _n(t,this.parseSize(e)/2,i,s,n)}drawFitDir(t,e,i,s,n){return _n(t,this.parseSize(e)/2,i,s,n)}drawOffset(t,e,i,s,n,r){return _n(t,this.parseSize(e)/2+n,i,s,r)}};function Bn(t,e,i,s){const n=2*e;return t.rect(i-e,s-e,n,n),!1}var Tn=new class extends yn{constructor(){super(...arguments),this.type="square",this.pathStr="M-0.5,-0.5h1v1h-1Z"}draw(t,e,i,s){return Bn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Bn(t,this.parseSize(e)/2+n,i,s)}};function Sn(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(i+e+2*n,e+s+n),t.lineTo(i-e-2*n,e+s+n),t.lineTo(i,s-e-2*n),t.closePath(),!0}class wn extends yn{constructor(){super(...arguments),this.type="triangleUp",this.pathStr="M0.5,0.5 L-0.5,0.5 L0,-0.5 Z"}draw(t,e,i,s){return Sn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Sn(t,this.parseSize(e)/2,i,s,n)}}var Pn=new wn;var Mn=new class extends wn{constructor(){super(...arguments),this.type="triangle"}};const On=Math.sin(Math.PI/10)/Math.sin(7*Math.PI/10),Cn=Math.sin(i.tau/10)*On,kn=-Math.cos(i.tau/10)*On;function Ln(t,e,s,n){const r=Cn*e,a=kn*e;t.moveTo(s,-e+n),t.lineTo(r+s,a+n);for(let o=1;o<5;++o){const l=i.tau*o/5,h=Math.cos(l),c=Math.sin(l);t.lineTo(c*e+s,-h*e+n),t.lineTo(h*r-c*a+s,c*r+h*a+n)}return t.closePath(),!0}var En=new class extends yn{constructor(){super(...arguments),this.type="star",this.pathStr="M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z"}draw(t,e,i,s){return Ln(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Ln(t,this.parseSize(e)/2+n,i,s)}};const In=i.sqrt(3);function Rn(t,e,i,s){const n=e,r=n/In,a=r/5,o=e;return t.moveTo(0+i,-n+s),t.lineTo(r/2+i,s),t.lineTo(a/2+i,s),t.lineTo(a/2+i,o+s),t.lineTo(-a/2+i,o+s),t.lineTo(-a/2+i,s),t.lineTo(-r/2+i,s),t.closePath(),!0}var Un=new class extends yn{constructor(){super(...arguments),this.type="arrow",this.pathStr="M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z"}draw(t,e,i,s){return Rn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Rn(t,this.parseSize(e)/2+n,i,s)}};function Dn(t,e,i,s){const n=2*e;return t.moveTo(i,-e+s),t.lineTo(n/3/2+i,e+s),t.lineTo(-n/3/2+i,e+s),t.closePath(),!0}var Nn=new class extends yn{constructor(){super(...arguments),this.type="wedge",this.pathStr="M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z"}draw(t,e,i,s){return Dn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Dn(t,this.parseSize(e)/2+n,i,s)}};function jn(t,e,i,s){return t.moveTo(-e+i,s),t.lineTo(i,e+s),!1}var Fn=new class extends yn{constructor(){super(...arguments),this.type="stroke",this.pathStr=""}draw(t,e,i,s){return jn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return jn(t,this.parseSize(e)/2+n,i,s)}};const zn=-.5,Wn=i.sqrt(3)/2,Gn=1/i.sqrt(12);function $n(t,e,i,s){const n=e/2,r=e*Gn,a=n,o=e*Gn+e,l=-a,h=o;return t.moveTo(n+i,r+s),t.lineTo(a+i,o+s),t.lineTo(l+i,h+s),t.lineTo(zn*n-Wn*r+i,Wn*n+zn*r+s),t.lineTo(zn*a-Wn*o+i,Wn*a+zn*o+s),t.lineTo(zn*l-Wn*h+i,Wn*l+zn*h+s),t.lineTo(zn*n+Wn*r+i,zn*r-Wn*n+s),t.lineTo(zn*a+Wn*o+i,zn*o-Wn*a+s),t.lineTo(zn*l+Wn*h+i,zn*h-Wn*l+s),t.closePath(),!1}var Yn=new class extends yn{constructor(){super(...arguments),this.type="wye",this.pathStr="M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z"}draw(t,e,i,s){return $n(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return $n(t,this.parseSize(e)/2+n,i,s)}};function Vn(t,e,i,s,n){return t.moveTo(-e+i-2*n,s),t.lineTo(e+i+n,e+s+2*n),t.lineTo(e+i+n,s-e-2*n),t.closePath(),!0}var Xn=new class extends yn{constructor(){super(...arguments),this.type="triangleLeft",this.pathStr="M-0.5,0 L0.5,0.5 L0.5,-0.5 Z"}draw(t,e,i,s){return Vn(t,this.parseSize(e)/2,i,s,0)}drawOffset(t,e,i,s,n){return Vn(t,this.parseSize(e)/2,i,s,n)}};function Hn(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(i-e-n,e+s+2*n),t.lineTo(e+i+2*n,s),t.lineTo(i-e-n,s-e-2*n),t.closePath(),!0}var Kn=new class extends yn{constructor(){super(...arguments),this.type="triangleRight",this.pathStr="M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z"}draw(t,e,i,s){return Hn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Hn(t,this.parseSize(e)/2,i,s,n)}};function qn(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(i-e-2*n,s-e-n),t.lineTo(i+e+2*n,s-e-n),t.lineTo(i,s+e+2*n),t.closePath(),!0}var Zn=new class extends yn{constructor(){super(...arguments),this.type="triangleDown",this.pathStr="M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z"}draw(t,e,i,s){return qn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return qn(t,this.parseSize(e)/2,i,s,n)}};const Jn=i.sqrt(3);function Qn(t,e,i,s){const n=e*Jn;return t.moveTo(i,s+-n/3*2),t.lineTo(e+i,s+n),t.lineTo(i-e,s+n),t.closePath(),!0}var tr=new class extends yn{constructor(){super(...arguments),this.type="thinTriangle",this.pathStr="M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z"}draw(t,e,i,s){return Qn(t,this.parseSize(e)/2/Jn,i,s)}drawOffset(t,e,i,s,n){return Qn(t,this.parseSize(e)/2/Jn+n,i,s)}};function er(t,e,i,s){const n=2*e;return t.moveTo(e+i,s-n),t.lineTo(i-e,s),t.lineTo(e+i,n+s),!0}var ir=new class extends yn{constructor(){super(...arguments),this.type="arrow2Left",this.pathStr="M 0.25 -0.5 L -0.25 0 l 0.25 0.5"}draw(t,e,i,s){return er(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return er(t,this.parseSize(e)/4+n,i,s)}};function sr(t,e,i,s){const n=2*e;return t.moveTo(i-e,s-n),t.lineTo(i+e,s),t.lineTo(i-e,n+s),!0}var nr=new class extends yn{constructor(){super(...arguments),this.type="arrow2Right",this.pathStr="M -0.25 -0.5 l 0.25 0 l -0.25 0.5"}draw(t,e,i,s){return sr(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return sr(t,this.parseSize(e)/4+n,i,s)}};function rr(t,e,i,s){const n=2*e;return t.moveTo(i-n,s+e),t.lineTo(i,s-e),t.lineTo(i+n,s+e),!0}var ar=new class extends yn{constructor(){super(...arguments),this.type="arrow2Up",this.pathStr="M -0.5 0.25 L 0 -0.25 l 0.5 0.25"}draw(t,e,i,s){return rr(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return rr(t,this.parseSize(e)/4+n,i,s)}};function or(t,e,i,s){const n=2*e;return t.moveTo(i-n,s-e),t.lineTo(i,s+e),t.lineTo(i+n,s-e),!0}var lr=new class extends yn{constructor(){super(...arguments),this.type="arrow2Down",this.pathStr="M -0.5 -0.25 L 0 0.25 l 0.5 -0.25"}draw(t,e,i,s){return or(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return or(t,this.parseSize(e)/4+n,i,s)}};function hr(t,e,i,s,n){return t.moveTo(i,s-e),t.lineTo(i,s+e),!0}var cr=new class extends yn{constructor(){super(...arguments),this.type="lineV",this.pathStr="M0,-0.5L0,0.5"}draw(t,e,i,s,n){return hr(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n,r){return hr(t,this.parseSize(e)/2+n,i,s)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e}, ${i-n} L ${e},${i+n}`}};function dr(t,e,i,s,n){return t.moveTo(i-e,s),t.lineTo(i+e,s),!0}var ur=new class extends yn{constructor(){super(...arguments),this.type="lineH",this.pathStr="M-0.5,0L0.5,0"}draw(t,e,i,s,n){return dr(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n,r){return dr(t,this.parseSize(e)/2+n,i,s)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e-n}, ${i} L ${e+n},${i}`}};function pr(t,e,i,s,n){return t.moveTo(i-e,s-e),t.lineTo(i+e,s+e),t.moveTo(i+e,s-e),t.lineTo(i-e,s+e),!0}var fr=new class extends yn{constructor(){super(...arguments),this.type="close",this.pathStr="M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5"}draw(t,e,i,s,n){return pr(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n,r){return pr(t,this.parseSize(e)/2+n,i,s)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e-n}, ${i-n} L ${e+n},${i+n} M ${e+n}, ${i-n} L ${e-n},${i+n}`}};function gr(t,e,i,s){return t.rect(i-e[0]/2,s-e[1]/2,e[0],e[1]),!1}function mr(t,e,i,s){const n=e,r=e/2;return t.rect(i-n/2,s-r/2,n,r),!1}var yr=new class extends yn{constructor(){super(...arguments),this.type="rect",this.pathStr="M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z"}draw(t,e,s,n){return i.isNumber(e)?mr(t,e,s,n):gr(t,e,s,n)}drawOffset(t,e,s,n,r){return i.isNumber(e)?mr(t,e+2*r,s,n):gr(t,[e[0]+2*r,e[1]+2*r],s,n)}};const br=new i.AABBBounds;class xr{constructor(t,e){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.pathStr="",this.type=t,i.isArray(e)?this.svgCache=e:this.path=e,this.isSvg=s}drawOffset(t,e,i,s,n,r,a){return e=this.parseSize(e),this.isSvg?!!this.svgCache&&(this.svgCache.forEach((n=>{t.beginPath(),Nt(n.path.commandList,t,i,s,e,e),a&&a(n.path,n.attribute)})),!1):(Nt(this.path.commandList,t,i,s,e+n,e+n),!1)}draw(t,e,i,s,n,r){return e=this.parseSize(e),this.drawOffset(t,e,i,s,0,n,r)}parseSize(t){return i.isNumber(t)?t:Math.min(t[0],t[1])}bounds(t,e){if(t=this.parseSize(t),this.isSvg){if(!this.svgCache)return;return e.clear(),void this.svgCache.forEach((i=>{let{path:s}=i;br.x1=s.bounds.x1*t,br.y1=s.bounds.y1*t,br.x2=s.bounds.x2*t,br.y2=s.bounds.y2*t,e.union(br)}))}this.path.bounds&&(e.x1=this.path.bounds.x1*t,e.y1=this.path.bounds.y1*t,e.x2=this.path.bounds.x2*t,e.y2=this.path.bounds.y2*t)}}const vr={};[xn,vn,An,Tn,tr,Mn,En,Un,Nn,Fn,Yn,Xn,Kn,Pn,Zn,ir,nr,ar,lr,yr,cr,ur,fr].forEach((t=>{vr[t.type]=t}));const _r={arrowLeft:"M 0.25 -0.5 L -0.25 0 l 0.5 0.5",arrowRight:"M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5",rectRound:"M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",roundLine:"M 1.2392 -0.258 L -1.3432 -0.258 C -1.4784 -0.258 -1.588 -0.1436 -1.588 -0.002 c 0 0.1416 0.1096 0.256 0.2448 0.256 l 2.5824 0 c 0.1352 0 0.2448 -0.1144 0.2448 -0.256 C 1.484 -0.1436 1.3744 -0.258 1.2392 -0.258 z"},Ar=new i.AABBBounds,Br=["symbolType","size",...ki];let Tr=class t extends Di{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{symbolType:"circle"}),this.type="symbol",this.numberType=as}getParsedPath(){return this.shouldUpdateShape()&&(this.doUpdateParsedPath(),this.clearUpdateShapeTag()),this._parsedPath}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{size:t}=this.attribute;return i.isArray(t)?2===t.length&&t.every(this._validNumber):this._validNumber(t)}doUpdateParsedPath(){const e=this.getGraphicTheme();let{symbolType:s=e.symbolType}=this.attribute,n=vr[s];if(n)return this._parsedPath=n,n;if(n=t.userSymbolMap[s],n)return this._parsedPath=n,n;if(s=_r[s]||s,!0===((r=s).startsWith("<svg")||r.startsWith("<?xml"))){const e=new Xi,{svg:n}=e.parse(s);if(!n)return null;const r=i.isArray(n.path)?n.path:[n.path];Ar.clear();const a=[];r.forEach((t=>{const e=(new ye).fromString(t.d),i={};cs.forEach((e=>{t[e]&&(i[hs[e]]=t[e])})),a.push({path:e,attribute:i}),Ar.union(e.bounds)}));const o=Ar.width(),l=Ar.height(),h=1/i.max(o,l);return a.forEach((t=>t.path.transform(0,0,h,h))),this._parsedPath=new xr(s,a,!0),t.userSymbolMap[s]=this._parsedPath,this._parsedPath}var r;const a=(new ye).fromString(s),o=a.bounds.width(),l=a.bounds.height(),h=1/i.max(o,l);return a.transform(0,0,h,h),this._parsedPath=new xr(s,a),t.userSymbolMap[s]=this._parsedPath,this._parsedPath}getGraphicTheme(){return Qe(this).symbol}updateAABBBounds(t,e,i,s){this.updatePathProxyAABBBounds(i)||(s?this.updateSymbolAABBBoundsImprecise(t,e,i):this.updateSymbolAABBBoundsAccurate(t,e,i));const{tb1:n,tb2:r}=ze.graphicService.updateTempAABBBounds(i);((t,e,i)=>{const{outerBorder:s,shadowBlur:n=e.shadowBlur,strokeBoundsBuffer:r=e.strokeBoundsBuffer}=t;if(s){const t=e.outerBorder,{distance:a=t.distance,lineWidth:o=t.lineWidth}=s;Hi(i,a+(n+o)/2,!0,r)}})(t,e,n),i.union(n),n.setValue(r.x1,r.y1,r.x2,r.y2);const{lineJoin:a=e.lineJoin}=t;return ze.graphicService.transformAABBBounds(t,i,e,"miter"===a,this),i}updateSymbolAABBBoundsImprecise(t,e,s){const{size:n=e.size}=t;if(i.isArray(n))s.set(-n[0]/2,-n[1]/2,n[0]/2,n[1]/2);else{const t=n/2;s.set(-t,-t,t,t)}return s}updateSymbolAABBBoundsAccurate(t,e,i){const{size:s=e.size}=t;return this.getParsedPath().bounds(s,i),i}needUpdateTags(t){return super.needUpdateTags(t,Br)}needUpdateTag(t){return super.needUpdateTag(t,Br)}toCustomPath(){const t=this.getParsedPath(),e=this.attribute.size,s=i.isArray(e)?e:[e,e];return t.path?(new ye).fromCustomPath2D(t.path,0,0,s[0],s[1]):(new ye).fromString(t.pathStr,0,0,s[0],s[1])}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function Sr(t){return new Tr(t)}Tr.userSymbolMap={},Tr.NOWORK_ANIMATE_ATTR=Object.assign({symbolType:1},Ui);const wr=["segments","points","curveType","curveTension",...ki];class Pr extends Di{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.type="line",this.numberType=ss}isValid(){return super.isValid()&&this._isValid()}_isValid(){if(this.pathProxy)return!0;const{points:t,segments:e}=this.attribute;return e?0!==e.length:!(!t||t.length<=1)}_interpolate(t,e,i,s,n){"points"===t&&(n.points=yi(i,s,e))}getGraphicTheme(){return Qe(this).line}updateAABBBounds(t,e,i){this.updatePathProxyAABBBounds(i)||(t.segments?this.updateLineAABBBoundsBySegments(t,e,i):this.updateLineAABBBoundsByPoints(t,e,i)),ze.graphicService.updateTempAABBBounds(i);const{lineJoin:s=e.lineJoin}=t;return ze.graphicService.transformAABBBounds(t,i,e,"miter"===s,this),i}updateLineAABBBoundsByPoints(t,e,i,s){const{points:n=e.points,connectedType:r}=t,a=i;return n.forEach((t=>{!1===t.defined&&"connect"!==r||a.add(t.x,t.y)})),a}updateLineAABBBoundsBySegments(t,e,i,s){const{segments:n=e.segments,connectedType:r}=t,a=i;return n.forEach((t=>{t.points.forEach((t=>{!1===t.defined&&"connect"!==r||a.add(t.x,t.y)}))})),a}needUpdateTags(t){return super.needUpdateTags(t,wr)}needUpdateTag(t){return super.needUpdateTag(t,wr)}toCustomPath(){const t=this.attribute,e=new ye,i=t.segments,s=t=>{if(t&&t.length){let i=!0;t.forEach((t=>{!1!==t.defined&&(i?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y),i=!1)}))}};return i&&i.length?i.forEach((t=>{s(t.points)})):t.points&&s(t.points),e}clone(){return new Pr(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Pr.NOWORK_ANIMATE_ATTR}}function Mr(t){return new Pr(t)}Pr.NOWORK_ANIMATE_ATTR=Object.assign({segments:1,curveType:1},Ui);const Or=["path","customPath",...ki];class Cr extends Di{constructor(t){super(t),this.type="path",this.numberType=ns}get pathShape(){return this.tryUpdateAABBBounds(),this.getParsedPathShape()}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{path:t}=this.attribute;return null!=t&&""!==t}getParsedPathShape(){const t=this.getGraphicTheme();if(!this.valid)return t.path;const e=this.attribute;return e.path instanceof ye?e.path:(i.isNil(this.cache)&&this.doUpdatePathShape(),this.cache instanceof ye?this.cache:t.path)}getGraphicTheme(){return Qe(this).path}updateAABBBounds(t,e,i){if(!this.updatePathProxyAABBBounds(i)){const t=this.getParsedPathShape();i.union(t.getBounds())}const{tb1:s,tb2:n}=ze.graphicService.updateTempAABBBounds(i);((t,e,i)=>{const{outerBorder:s,shadowBlur:n=e.shadowBlur}=t;if(s){const t=e.outerBorder,{distance:r=t.distance,lineWidth:a=t.lineWidth}=s;i.expand(r+(n+a)/2)}})(t,e,s),i.union(s),s.setValue(n.x1,n.y1,n.x2,n.y2);const{lineJoin:r=e.lineJoin}=t;return ze.graphicService.transformAABBBounds(t,i,e,"miter"===r,this),i}doUpdateAABBBounds(t){return this.doUpdatePathShape(),super.doUpdateAABBBounds(t)}doUpdatePathShape(){const t=this.attribute;i.isString(t.path,!0)?this.cache=(new ye).fromString(t.path):t.customPath&&(this.cache=new ye,t.customPath(this.cache,this))}needUpdateTags(t){return super.needUpdateTags(t,Or)}needUpdateTag(t){return super.needUpdateTag(t,Or)}toCustomPath(){return(new ye).fromCustomPath2D(this.getParsedPathShape(),0,0)}clone(){return new Cr(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Cr.NOWORK_ANIMATE_ATTR}}function kr(t){return new Cr(t)}Cr.NOWORK_ANIMATE_ATTR=Object.assign({path:1,customPath:1},Ui);const Lr=["segments","points","curveType","curveTension",...ki];class Er extends Di{constructor(t){super(t),this.type="area",this.numberType=es}isValid(){return super.isValid()&&this._isValid()}_isValid(){if(this.pathProxy)return!0;const{points:t,segments:e}=this.attribute;return e?0!==e.length:!!t&&0!==t.length}getGraphicTheme(){return Qe(this).area}updateAABBBounds(t,e,i){this.updatePathProxyAABBBounds(i)||(t.segments?this.updateAreaAABBBoundsBySegments(t,e,i):this.updateAreaAABBBoundsByPoints(t,e,i)),ze.graphicService.updateTempAABBBounds(i);const{lineJoin:s=e.lineJoin}=t;return ze.graphicService.transformAABBBounds(t,i,e,"miter"===s,this),i}updateAreaAABBBoundsByPoints(t,e,i,s){const{points:n=e.points}=t,r=i;return n.forEach((t=>{var e,i;r.add(t.x,t.y),r.add(null!==(e=t.x1)&&void 0!==e?e:t.x,null!==(i=t.y1)&&void 0!==i?i:t.y)})),r}updateAreaAABBBoundsBySegments(t,e,i,s){const{segments:n=e.segments}=t,r=i;return n.forEach((t=>{t.points.forEach((t=>{var e,i;r.add(t.x,t.y),r.add(null!==(e=t.x1)&&void 0!==e?e:t.x,null!==(i=t.y1)&&void 0!==i?i:t.y)}))})),r}_interpolate(t,e,i,s,n){"points"===t&&(n.points=yi(i,s,e))}needUpdateTags(t){return super.needUpdateTags(t,Lr)}needUpdateTag(t){return super.needUpdateTag(t,Lr)}toCustomPath(){const t=new ye,e=this.attribute,i=e.segments,s=e=>{if(e&&e.length){let i=!0;const s=[];if(e.forEach((e=>{var n,r;!1!==e.defined&&(i?t.moveTo(e.x,e.y):t.lineTo(e.x,e.y),s.push({x:null!==(n=e.x1)&&void 0!==n?n:e.x,y:null!==(r=e.y1)&&void 0!==r?r:e.y}),i=!1)})),s.length){for(let e=s.length-1;e>=0;e--)t.lineTo(s[e].x,s[e].y);t.closePath()}}};return e.points?s(e.points):i&&i.length&&i.forEach((t=>{s(t.points)})),t}clone(){return new Er(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Er.NOWORK_ANIMATE_ATTR}}Er.NOWORK_ANIMATE_ATTR=Object.assign({segments:1,curveType:1},Ui);const Ir=["points","cornerRadius",...ki];class Rr extends Di{constructor(t){super(t),this.type="polygon",this.numberType=rs}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{points:t}=this.attribute;return t&&t.length>=2}getGraphicTheme(){return Qe(this).polygon}updateAABBBounds(t,e,i){this.updatePathProxyAABBBounds(i)||this.updatePolygonAABBBoundsImprecise(t,e,i),ze.graphicService.updateTempAABBBounds(i);const{lineJoin:s=e.lineJoin}=t;return ze.graphicService.transformAABBBounds(t,i,e,"miter"===s,this),i}updatePolygonAABBBoundsImprecise(t,e,i){const{points:s=e.points}=t;return s.forEach((t=>{i.add(t.x,t.y)})),i}_interpolate(t,e,i,s,n){"points"===t&&(n.points=yi(i,s,e))}needUpdateTags(t){return super.needUpdateTags(t,Ir)}needUpdateTag(t){return super.needUpdateTag(t,Ir)}toCustomPath(){const t=this.attribute.points,e=new ye;return t.forEach(((t,i)=>{0===i?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)})),e.closePath(),e}clone(){return new Rr(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Rr.NOWORK_ANIMATE_ATTR}}function Ur(t){return new Rr(t)}Rr.NOWORK_ANIMATE_ATTR=Ui;var Dr=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let Nr,jr=class extends Xs{constructor(){super(...arguments),this.numberType=ss}drawShape(t,e,i,s,n,r,a,o){if(t.incremental&&n.multiGraphicOptions){const{startAtIdx:e,length:r}=n.multiGraphicOptions,{segments:l=[]}=t.attribute;if(e>l.length)return;const h=Qe(t).line,{fill:c=h.fill,stroke:d=h.stroke,opacity:u=h.opacity,fillOpacity:p=h.fillOpacity,strokeOpacity:f=h.strokeOpacity,lineWidth:g=h.lineWidth,visible:m=h.visible}=t.attribute,y=ms(u,p,c),b=ys(u,f),x=fs(c),v=gs(d,g);if(!t.valid||!m)return;if(!x&&!v)return;if(!(y||b||a||o))return;const{context:_}=n;for(let n=e;n<e+r;n++)this.drawIncreaseSegment(t,_,l[n-1],l[n],t.attribute.segments[n],[h,t.attribute],i,s)}else super.drawShape(t,e,i,s,n,r,a,o)}drawIncreaseSegment(t,e,i,s,n,r,a,o){s&&(e.beginPath(),function(t,e,i,s){const{offsetX:n=0,offsetY:r=0}=s||{},a=e?e.points[e.points.length-1]:i.points[0];t.moveTo(a.x+n,a.y+r),i.points.forEach((e=>{!1!==e.defined?t.lineTo(e.x+n,e.y+r):t.moveTo(e.x+n,e.y+r)}))}(e.nativeContext,i,s,{offsetX:a,offsetY:o}),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,n,r),e.setStrokeStyle(t,n,a,o,r),e.stroke())}};jr=Dr([N()],jr);let Fr=!1;const zr=new P((t=>{Fr||(Fr=!0,t(Xs).toSelf().inSingletonScope(),t(jr).toSelf().inSingletonScope(),t(cn).to(Xs).inSingletonScope(),t(hn).toService(cn))}));let Wr=!1;const Gr=new P((t=>{Wr||(Wr=!0,t(Zs).toSelf().inSingletonScope(),t(un).to(Zs).inSingletonScope(),t(hn).toService(un),t(xs).toService(js),it(t,xs))}));let $r=!1;const Yr=new P((t=>{$r||($r=!0,t(dn).to(ln).inSingletonScope(),t(hn).toService(dn),t(bs).toService(js),it(t,bs))}));const Vr=["x","y","dx","dy","scaleX","scaleY","angle","anchor","postMatrix","visible","clip","pickable","childrenPickable","zIndex","cursor"];class Xr extends us{constructor(t,e){super(t),(null==e?void 0:e.mode)&&(this.mode=e.mode,this.setMode(e.mode)),(null==e?void 0:e.skipDefault)&&(this.skipDefault=!0),this.setTheme({common:{strokeBoundsBuffer:0}}),this.attribute=t,this.onSetStage((()=>{this.render(),this.bindEvents()}))}setAttribute(t,e,s,n){const r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({[t]:e},this.attribute,t,n);if(r)return this._setAttributes(r,s);i.isPlainObject(this.attribute[t])&&i.isPlainObject(e)&&!i.isFunction(this.attribute[t])&&!i.isFunction(e)?i.merge(this.attribute[t],e):this.attribute[t]=e,Vr.includes(t)||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!s&&!this.needUpdateTag(t)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}setAttributes(t,e,i){return t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,i)||t,this._setAttributes(t,e)}_setAttributes(t,e){const i=Object.keys(t);this._mergeAttributes(t,i),i.every((t=>Vr.includes(t)))||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!e&&!this.needUpdateTags(i)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}_mergeAttributes(t,e){i.isNil(e)&&(e=Object.keys(t));for(let s=0;s<e.length;s++){const n=e[s];!i.isPlainObject(this.attribute[n])||i.isFunction(this.attribute[n])||i.isFunction(t[n])?this.attribute[n]=t[n]:i.merge(this.attribute[n],t[n])}}bindEvents(){}_getNodeId(t){var e;return`${null!==(e=this.id)&&void 0!==e?e:this._uid}-${this.name}-${t}`}_dispatchEvent(t,e){var i;const s=new si(t,e);s.manager=null===(i=this.stage)||void 0===i?void 0:i.eventSystem.manager,this.dispatchEvent(s)}}const Hr=Symbol.for("MathPickerContribution"),Kr=Symbol.for("MathLinePicker"),qr=Symbol.for("MathSymbolPicker"),Zr=Symbol.for("MathPolygonPicker"),Jr=Symbol.for("CanvasLinePicker"),Qr=Symbol.for("CanvasSymbolPicker"),ta=Symbol.for("CanvasPolygonPicker"),ea=Symbol.for("CanvasPickerContribution");class ia{contains(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;if(!this.canvasRenderer)return!0;const{pickContext:s}=null!=i?i:{};if(!s)return!1;const n=t.getGraphicTheme();s.highPerformanceSave();let{x:r=n.x,y:a=n.y}=t.attribute;if(t.transMatrix.onlyTranslate()){const e=t.getOffsetXY(n);r+=e.x,a+=e.y,s.setTransformForCurrent()}else r=0,a=0,s.transformFromMatrix(t.transMatrix,!0);let o=!1;return this.canvasRenderer.drawShape(t,s,r,a,{},null,((t,i,s)=>!!o||(o=t.isPointInPath(e.x,e.y),o)),((t,i,n)=>{if(o)return!0;const r=i.lineWidth||n.lineWidth,a=i.pickStrokeBuffer||n.pickStrokeBuffer,l=i.keepStrokeScale||n.keepStrokeScale;return s.lineWidth=l?r+a:We(s,r+a,s.dpr),o=t.isPointInStroke(e.x,e.y),o})),s.highPerformanceRestore(),o}}var sa=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},na=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ra=function(t,e){return function(i,s){e(i,s,t)}};let aa=class extends ia{constructor(t){super(),this.canvasRenderer=t,this.type="line",this.numberType=ss}};aa=sa([N(),ra(0,U(cn)),na("design:paramtypes",[Object])],aa);let oa=!1;const la=new P(((t,e,i,s)=>{oa||(oa=!0,t(Kr).to(aa).inSingletonScope(),t(Hr).toService(Kr))}));var ha=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},ca=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},da=function(t,e){return function(i,s){e(i,s,t)}};let ua=class extends ia{constructor(t){super(),this.canvasRenderer=t,this.type="polygon",this.numberType=rs}};ua=ha([N(),da(0,U(dn)),ca("design:paramtypes",[Object])],ua);let pa=!1;const fa=new P(((t,e,i,s)=>{pa||(pa=!0,t(Zr).to(ua).inSingletonScope(),t(Hr).toService(Zr))}));var ga=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},ma=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ya=function(t,e){return function(i,s){e(i,s,t)}};let ba=class extends ia{constructor(t){super(),this.canvasRenderer=t,this.type="symbol",this.numberType=as}};ba=ga([N(),ya(0,U(un)),ma("design:paramtypes",[Object])],ba);let xa=!1;const va=new P(((t,e,i,s)=>{xa||(xa=!0,t(qr).to(ba).inSingletonScope(),t(Hr).toService(qr))}));class _a extends Is{contains(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;const{pickContext:s}=null!=i?i:{};if(!s)return!1;s.highPerformanceSave();const n=t.getGraphicTheme(),r=this.transform(t,n,s),{x:a,y:o,z:l,lastModelMatrix:h}=r;let c=e;if(s.camera){c=e.clone();const i=t.parent.globalTransMatrix;c.x=i.a*e.x+i.c*e.y+i.e,c.y=i.b*e.x+i.d*e.y+i.f}this.canvasRenderer.z=l;let d=!1;return this.canvasRenderer.drawShape(t,s,a,o,{},null,(t=>!!d||(d=t.isPointInPath(c.x,c.y),d)),((t,e,i)=>{if(d)return!0;const n=e.lineWidth||i.lineWidth,r=e.pickStrokeBuffer||i.pickStrokeBuffer,a=e.keepStrokeScale||i.keepStrokeScale;return s.lineWidth=a?n+r:We(s,n+r,s.dpr),d=t.isPointInStroke(c.x,c.y),d})),this.canvasRenderer.z=0,s.modelMatrix!==h&&Ps.free(s.modelMatrix),s.modelMatrix=h,s.highPerformanceRestore(),d}}var Aa=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Ba=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ta=function(t,e){return function(i,s){e(i,s,t)}};let Sa=class extends _a{constructor(t){super(),this.canvasRenderer=t,this.type="line",this.numberType=ss}};Sa=Aa([N(),Ta(0,U(cn)),Ba("design:paramtypes",[Object])],Sa);let wa=!1;const Pa=new P(((t,e,i,s)=>{wa||(wa=!0,t(Jr).to(Sa).inSingletonScope(),t(ea).toService(Jr))}));class Ma extends Is{contains(t,e,i){const{pickContext:s}=null!=i?i:{};if(!s)return!1;const n=t.getGraphicTheme();s.highPerformanceSave();const r=this.transform(t,n,s),{x:a,y:o,z:l,lastModelMatrix:h}=r;let c=e;if(s.camera){c=e.clone();const i=t.parent.globalTransMatrix;c.x=i.a*e.x+i.c*e.y+i.e,c.y=i.b*e.x+i.d*e.y+i.f}this.canvasRenderer.z=l;let d=!1;return this.canvasRenderer.drawShape(t,s,a,o,i,null,((t,e,i)=>!!d||(d=t.isPointInPath(c.x,c.y),d))),this.canvasRenderer.z=0,s.modelMatrix!==h&&Ps.free(s.modelMatrix),s.modelMatrix=h,s.highPerformanceRestore(),d}}var Oa=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Ca=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ka=function(t,e){return function(i,s){e(i,s,t)}};let La=class extends Ma{constructor(t){super(),this.canvasRenderer=t,this.type="symbol",this.numberType=as}contains(t,e,i){const{pickContext:s}=null!=i?i:{};if(!s)return!1;const n=t.getParsedPath();if(!s.camera){if(!t.AABBBounds.containsPoint(e))return!1;if(n.isSvg||"imprecise"===t.attribute.pickMode)return!0}s.highPerformanceSave();const r=t.getGraphicTheme(),a=this.transform(t,r,s),{x:o,y:l,z:h,lastModelMatrix:c}=a;let d=e;if(s.camera){d=e.clone();const i=t.parent.globalTransMatrix;d.x=i.a*e.x+i.c*e.y+i.e,d.y=i.b*e.x+i.d*e.y+i.f}this.canvasRenderer.z=h;let u=!1;return this.canvasRenderer.drawShape(t,s,o,l,{},null,((t,e,i)=>!!u||(u=t.isPointInPath(d.x,d.y),u)),((t,e,i)=>{if(u)return!0;const n=e.lineWidth||i.lineWidth,r=e.pickStrokeBuffer||i.pickStrokeBuffer,a=e.keepStrokeScale||i.keepStrokeScale;return s.lineWidth=a?n+r:We(s,n+r,s.dpr),u=t.isPointInStroke(d.x,d.y),u})),this.canvasRenderer.z=0,s.modelMatrix!==c&&Ps.free(s.modelMatrix),s.modelMatrix=c,s.highPerformanceRestore(),u}};La=Oa([N(),ka(0,U(un)),Ca("design:paramtypes",[Object])],La);let Ea=!1;const Ia=new P(((t,e,i,s)=>{Ea||(Ea=!0,t(Qr).to(La).inSingletonScope(),t(ea).toService(Qr))}));var Ra=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Ua=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Da=function(t,e){return function(i,s){e(i,s,t)}};let Na=class extends ia{constructor(t){super(),this.canvasRenderer=t,this.type="polygon",this.numberType=rs}};Na=Ra([N(),Da(0,U(dn)),Ua("design:paramtypes",[Object])],Na);let ja=!1;const Fa=new P(((t,e,i,s)=>{ja||(ja=!0,t(ta).to(Na).inSingletonScope(),t(ea).toService(ta))})),za=function(){!function(){if(null==Nr)try{const t=document.createElement("canvas"),e=t.getContext("2d");Nr=!!(window&&t.getBoundingClientRect&&requestAnimationFrame&&window.devicePixelRatio&&e&&e.isPointInPath&&e.isPointInStroke),Nr&&(Nr=!!document.createElement)}catch(t){Nr=!1}}();const t=ze.global&&ze.global.env;return t?"browser"===t:Nr}();function Wa(){Wa.__loaded||(Wa.__loaded=!0,Js.RegisterGraphicCreator("group",ps))}Wa.__loaded=!1;const Ga=Wa;function $a(){$a.__loaded||($a.__loaded=!0,Js.RegisterGraphicCreator("line",Mr),Ge.load(zr),Ge.load(za?Pa:la))}$a.__loaded=!1;const Ya=$a;function Va(){Va.__loaded||(Va.__loaded=!0,Js.RegisterGraphicCreator("polygon",Ur),Ge.load(Yr),Ge.load(za?Fa:fa))}Va.__loaded=!1;const Xa=Va;function Ha(){Ha.__loaded||(Ha.__loaded=!0,Js.RegisterGraphicCreator("symbol",Sr),Ge.load(Gr),Ge.load(za?Ia:va))}Ha.__loaded=!1;const Ka=Ha;Ga(),Ya(),Xa(),Ka();class qa extends Xr{getStartAngle(){return i.normalizeAngle(this._startAngle)}getEndAngle(){return i.normalizeAngle(this._endAngle)}getMainSegmentPoints(){return this._mainSegmentPoints}constructor(t,e){super((null==e?void 0:e.skipDefault)?t:i.merge({},qa.defaultAttributes,t)),this.name="segment",this.key="segment",this.lines=[]}render(){this.removeAllChild(!0),this._reset();const{startSymbol:t,endSymbol:e,lineStyle:s,state:n,visible:r=!0,multiSegment:a,mainSegmentIndex:o}=this.attribute;if(!r)return;this._computeLineAngle();const l=this._getMainSegmentPoints(),h=this._renderSymbol(t,l,"start"),c=this._renderSymbol(e,l,"end");if(this.startSymbol=h,this.endSymbol=c,a){const t=[...this.attribute.points];if(i.isValidNumber(o))t[o]=this._clipPoints(t[o]);else{const e=this._clipPoints(i.flattenArray(t));t[0][0]=e[0],t[t.length-1][t[t.length-1].length-1]=e[e.length-1]}t.forEach(((t,e)=>{var r,a;const o=Js.line(Object.assign(Object.assign({points:t},i.isArray(s)?null!==(r=s[e])&&void 0!==r?r:s[s.length-1]:s),{fill:!1}));o.name=`${this.name}-line`,o.id=this._getNodeId("line"+e),i.isEmpty(null==n?void 0:n.line)||(o.states=i.isArray(n.line)?null!==(a=n.line[e])&&void 0!==a?a:n.line[n.line.length-1]:n.line),this.add(o),this.lines.push(o)}))}else{let t=Js.line;i.array(s)[0].cornerRadius&&(t=Js.polygon);const e=t(Object.assign(Object.assign({points:this._clipPoints(this.attribute.points)},i.array(s)[0]),{fill:!1,closePath:!1}));e.name=`${this.name}-line`,e.id=this._getNodeId("line"),i.isEmpty(null==n?void 0:n.line)||(e.states=[].concat(n.line)[0]),this.add(e),this.lines.push(e)}}_computeStartRotate(t){return t+Math.PI/2}_computeEndRotate(t){return t+Math.PI/2}_renderSymbol(t,e,s){if(!e.length)return;const{autoRotate:n=!0}=t;let r;if(t&&t.visible){const a=this.getStartAngle(),o=this.getEndAngle(),{state:l}=this.attribute,h=e[0],c=e[e.length-1],{refX:d=0,refY:u=0,refAngle:p=0,style:f,symbolType:g,size:m=12}=t;let y,b;"start"===s?(y={x:h.x+(i.isValidNumber(a)?d*Math.cos(a)+u*Math.cos(a-Math.PI/2):0),y:h.y+(i.isValidNumber(a)?d*Math.sin(a)+u*Math.sin(a-Math.PI/2):0)},b=this._computeStartRotate(this._startAngle)):(y={x:c.x+(i.isValidNumber(o)?d*Math.cos(o)+u*Math.cos(o-Math.PI/2):0),y:c.y+(i.isValidNumber(o)?d*Math.sin(o)+u*Math.sin(o-Math.PI/2):0)},b=this._computeEndRotate(this._endAngle)),r=Js.symbol(Object.assign(Object.assign(Object.assign({},y),{symbolType:g,size:m,angle:n?b+p:0,strokeBoundsBuffer:0}),f)),r.name=`${this.name}-${s}-symbol`,r.id=this._getNodeId(`${s}-symbol`),i.isEmpty(null==l?void 0:l.symbol)||(r.states=l.symbol),"start"===s?i.isEmpty(null==l?void 0:l.startSymbol)||(r.states=l.startSymbol):i.isEmpty(null==l?void 0:l.endSymbol)||(r.states=l.endSymbol),this.add(r)}return r}_getMainSegmentPoints(){if(this._mainSegmentPoints)return this._mainSegmentPoints;const{points:t,multiSegment:e,mainSegmentIndex:s}=this.attribute;let n;return n=e?i.isValidNumber(s)?t[s]:i.flattenArray(t):t,this._mainSegmentPoints=n,n}_clipPoints(t){const{startSymbol:e={},endSymbol:i={}}=this.attribute;let s=t;if(e.visible){const i=e.clip?e.size||10:0;s=[{x:t[0].x-i/2*(Math.cos(this._startAngle)||0),y:t[0].y-i/2*(Math.sin(this._startAngle)||0)},...s.slice(1)]}if(i.visible){const e=i.clip?i.size||10:0,n={x:t[t.length-1].x-e/2*(Math.cos(this._endAngle)||0),y:t[t.length-1].y-e/2*(Math.sin(this._endAngle)||0)};s=[...s.slice(0,s.length-1),n]}return s}_computeLineAngle(){const t=this._getMainSegmentPoints();if(t.length<=1)return;const e=t[0],i=t[1],s=t[t.length-2],n=t[t.length-1],r=[e.x-i.x,e.y-i.y],a=Math.atan2(r[1],r[0]),o=[n.x-s.x,n.y-s.y],l=Math.atan2(o[1],o[0]);this._startAngle=a,this._endAngle=l}_reset(){this.startSymbol=null,this.endSymbol=null,this._startAngle=null,this._endAngle=null,this._mainSegmentPoints=null}}qa.defaultAttributes={visible:!0,lineStyle:{lineWidth:1,stroke:"#000"},startSymbol:{visible:!1,autoRotate:!0,symbolType:"triangle",size:12,refX:0,refY:0,refAngle:0,style:{fill:"#000",zIndex:1}},endSymbol:{visible:!1,autoRotate:!0,symbolType:"triangle",size:12,refX:0,refY:0,refAngle:0,style:{fill:"#000",zIndex:1}}};const Za="seriesBreak";function Ja(t,e,i,s,n=!1){const r=[],{x:a,y:o}=t,{x:l,y:h}=e,c=n?Math.floor((h-o)/(2*i)):Math.floor((l-a)/(2*i)),d=Math.PI/180*s,u=i*Math.cos(d),p=i*Math.sin(d);r.push(`M ${a} ${o}`);for(let t=0;t<=c;t++){const e=n?a+(t%2==0?u:-u):a+t*i*2,s=n?o+t*i*2:t%2==0?o-p:o+p;r.push(`L ${e} ${s}`)}return r.push(`L ${n?a:l} ${n?h:o}`),r.join(" ")}class Qa extends Xr{constructor(){super(...arguments),this.name=Za}render(){this.removeAllChild();const{data:t=[]}=this.attribute;if(i.isEmpty(t))return;const e=[],s=[];t.forEach((t=>{const{start:n,end:r}=t;((t,e)=>{const{start:s,end:n}=e,r=s.x===n.x,a=r?"x":"y",o=r?"y":"x";let l=!0;const h=1e-6;t.length&&t.forEach((t=>{if(i.isNumberClose(t.start[a],s[a])){const e=Math.min(s[o],n[o]),i=Math.max(s[o],n[o]),r=Math.min(t.start[o],t.end[o]),a=Math.max(t.start[o],t.end[o]);if(!(i<r-h||e>a+h))return t.start[o]=Math.min(r,e),t.end[o]=Math.max(a,i),void(l=!1)}})),l&&t.push(e)})(n.x===r.x?e:s,t)})),[...e,...s].forEach(((t,e)=>{var s;const{start:n,end:r,size:a=4,gap:o=5,style:l={}}=t,h=d(t,["start","end","size","gap","style"]),c=ps({}),u=n.x===r.x;let p,f,g,m;u?(p={x:n.x-o/2,y:n.y},f={x:r.x-o/2,y:r.y},g={x:n.x+o/2,y:n.y},m={x:r.x+o/2,y:r.y}):(p={x:n.x,y:n.y-o/2},f={x:r.x,y:r.y-o/2},g={x:n.x,y:n.y+o/2},m={x:r.x,y:r.y+o/2});const y=Ja(p,f,a,u?75:15,u),b=Ja(n,r,a,u?75:15,u),x=Ja(g,m,a,u?75:15,u);c.add(kr(Object.assign(Object.assign({path:y,stroke:"#000",lineWidth:1},l),{pickable:!1,zIndex:1}))),c.add(kr(Object.assign(Object.assign({path:x,stroke:"#000",lineWidth:1},l),{pickable:!1,zIndex:1}))),c.add(kr({path:b,stroke:"#fff",lineWidth:o,pickable:!1,zIndex:0})),c.name="series-break",c.data=h,i.isValid(h.axisId)&&(c.id=`${null!==(s=h.axisId)&&void 0!==s?s:""}_${e}`),this.add(c)}))}}function to(t,e,i=1){return Math.abs(t-e)<i}function eo(t,e){return{type:"component",componentType:Za,interactive:!0,zIndex:500,style:{data:(s,n)=>{const r=[],a=n.vchart.getChart(),o="horizontal"===a.getAllSeries()[0].direction;return t.forEach(((t,s)=>{var n,l;const h=t.id,c=i.isValid(h)?a.getComponentByUserId(h):e&&i.isValid(e[s])?a.getComponentByIndex("axes",e[s]):null===(n=a.getComponentsByKey("axes").filter((e=>e.getSpec().breaks===t.breaks)))||void 0===n?void 0:n[0];if(!c)return;const d=null!=h?h:`${c.type}-${c.id}`,u=function(t){let{x:e,y:i}=t[0].getLayoutStartPoint(),s=e+t[0].getLayoutRect().width,n=i+t[0].getLayoutRect().height;for(let r=1;r<t.length;r++){const a=t[r],{x:o,y:l}=a.getLayoutStartPoint(),{width:h,height:c}=a.getLayoutRect();e=Math.min(e,o),s=Math.max(s,h+o),i=Math.min(i,l),n=Math.max(n,c+l)}return{x1:e,y1:i,x2:s,y2:n}}(c.getRegions());i.array(null===(l=c._break)||void 0===l?void 0:l.breaks).forEach((t=>{const{range:e,breakSymbol:i,gap:s=5}=t,n=c.valueToPosition(e[0]),l=c.valueToPosition(e[1]),h=(n+l)/2+(o?u.x1:u.y1);a.getAllSeries().forEach((t=>{if("bar"===t.type||"waterfall"===t.type){t.getMarkInName("bar").getGraphics().forEach((t=>{const a=t.AABBBounds;let c,p,f,g,m=!1;o?(m=a.x1<(n+l-s)/2&&a.x2>(n+l+s)/2,c=h,p=Math.max(a.y1+u.y1-2,u.y1),f=h,g=Math.min(a.y2+u.y1+2,u.y2)):(m=a.y1<(n+l-s)/2&&a.y2>(n+l+s)/2,c=Math.max(a.x1+u.x1-2,u.x1),p=h,f=Math.min(a.x2+u.x1+2,u.x2),g=h),m&&r.push({start:{x:c,y:p},end:{x:f,y:g},gap:s,style:null==i?void 0:i.style,axisId:d,data:e})}))}else if("line"===t.type){t.getMarkInName(t.type).getGraphics().forEach((t=>{so(t,"line").forEach((t=>{io(o?{start:{x:(n+l)/2,y:0},end:{x:(n+l)/2,y:u.y2-u.y1}}:{start:{x:0,y:(n+l)/2},end:{x:u.x2-u.x1,y:(n+l)/2}},t).forEach((t=>{let n,a;o?(n={x:h,y:Math.max(t[1]+u.y1-10,u.y1)},a={x:h,y:Math.min(t[1]+u.y1+10,u.y2)}):(n={x:Math.max(t[0]+u.x1-10,u.x1),y:h},a={x:Math.min(t[0]+u.x1+10,u.x2),y:h}),r.push({start:n,end:a,gap:s,style:null==i?void 0:i.style,axisId:d,data:e})}))}))}))}else if("area"===t.type){t.getMarkInName("area").getGraphics().forEach((t=>{so(t,"area").forEach((t=>{const a=io(o?{start:{x:(n+l)/2,y:0},end:{x:(n+l)/2,y:u.y2-u.y1}}:{start:{x:0,y:(n+l)/2},end:{x:u.x2-u.x1,y:(n+l)/2}},t);a.sort(((t,e)=>t[0]-e[0]));for(let n=0;n<a.length-1;n++){const l={x:a[n][0],y:a[n][1]},h={x:a[n+1][0],y:a[n+1][1]};if(no(o?{x:l.x,y:(l.y+h.y)/2}:{x:(l.x+h.x)/2,y:l.y},t)){let t,n;o?(t={x:l.x+u.x1,y:Math.max(l.y+u.y1-0,u.y1)},n={x:h.x+u.x1,y:Math.min(h.y+u.y1+0,u.y2)}):(t={x:Math.max(l.x+u.x1-0,u.x1),y:l.y+u.y1},n={x:Math.min(h.x+u.x1+0,u.x2),y:h.y+u.y1}),r.push({start:t,end:n,gap:s,style:null==i?void 0:i.style,axisId:d,data:e})}}}))}))}}))}))})),r}}}}function io(t,e){const s=[];for(let n=1;n<e.length;n++){const r=i.getIntersectPoint([t.start.x,t.start.y],[t.end.x,t.end.y],[e[n].x,e[n].y],[e[n-1].x,e[n-1].y]);r&&!s.find((t=>to(i.PointService.distancePP({x:t[0],y:t[1]},{x:r[0],y:r[1]}),0)))&&s.push(r)}return s}function so(t,e){const{points:i,segments:s}=t.attribute,n=[];let r=[];const a=t=>{if(t&&t.length){let i=[];if(t.forEach((t=>{var s,a;if(!1===t.defined){if(n.push(r),"area"===e&&i.length){for(let t=i.length-1;t>=0;t--)r.push({x:i[t].x,y:i[t].y});r.push(r[0])}r=[],i=[]}else r.push({x:t.x,y:t.y}),"area"===e&&i.push({x:null!==(s=t.x1)&&void 0!==s?s:t.x,y:null!==(a=t.y1)&&void 0!==a?a:t.y})})),"area"===e&&i.length){for(let t=i.length-1;t>=0;t--)r.push({x:i[t].x,y:i[t].y});r.push(r[0])}n.push(r)}};return i&&i.length?a(i):s&&s.length&&s.forEach((t=>{a(t.points)})),n}function no(t,e){const{x:i,y:s}=t;let n=!1;for(let t=0,r=e.length-1;t<e.length;r=t++){const{x:a,y:o}=e[t],{x:l,y:h}=e[r];o>s!=h>s&&i<(l-a)*(s-o)/(h-o)+a&&(n=!n)}return n}class ro{constructor(t,e,i,s){this.channelEncoder={},this.marks=t,e&&this.registerChannelEncoder(e),i&&this.registerDefaultEncoder(i),this.progressiveChannels&&this.registerProgressiveChannels(s)}getMarks(){return this.marks}registerChannelEncoder(t,e){return i.isString(t)?this.channelEncoder[t]=e:Object.assign(this.channelEncoder,t),this}registerFunctionEncoder(t){return this.functionEncoder=t,this}registerDefaultEncoder(t){return this.defaultEncoder=t,this}registerProgressiveChannels(t){return this.progressiveChannels=i.array(t),this}getChannelEncoder(){return this.channelEncoder}getFunctionEncoder(){return this.functionEncoder}getDefaultEncoder(){return this.defaultEncoder}getProgressiveChannels(){return this.progressiveChannels}}class ao{static registerPlotMarks(t,e){ao._plotMarks[t]=e}static createPlotMark(t,e){return ao._plotMarks[t]?new ao._plotMarks[t](e):null}static registerMark(t,e){ao._marks[t]=e}static createMark(t,e,i){return ao._marks[t]?new ao._marks[t](e,t,i):null}static hasMark(t){return!!ao._marks[t]}static getMark(t){return ao._marks[t]}static registerComponent(t,e){ao._components[t]=e}static createComponent(t,e,i,s){const n=ao._components[t];return n?new n(e,i,s):null}static hasComponent(t){return!!ao._components[t]}static registerGraphicComponent(t,e){ao._graphicComponents[t]=e}static createGraphicComponent(t,e,i){const s=ao._graphicComponents[t];return s?s(e,i):null}static registerTransform(t,e,i){ao._transforms[t]=Object.assign(e,{type:t,isBuiltIn:!!i})}static getTransform(t){return ao._transforms[t]}static unregisterRuntimeTransforms(){Object.keys(ao._transforms).forEach((t=>{ao._transforms[t]&&!ao._transforms[t].isBuiltIn&&(ao._transforms[t]=null)}))}static registerGrammar(t,e,i){ao._grammars[t]={grammarClass:e,specKey:null!=i?i:t}}static createGrammar(t,e,i){var s;const n=null===(s=ao._grammars[t])||void 0===s?void 0:s.grammarClass;return n?new n(e,i):null}static getGrammars(){return this._grammars}static getGlyph(t){return ao._glyphs[t]}static createInteraction(t,e,i){const s=ao._interactions[t];return s?new s(e,i):null}static hasInteraction(t){return!!ao._interactions[t]}}ao._plotMarks={},ao._marks={},ao._components={},ao._graphicComponents={},ao._transforms={},ao._grammars={},ao._glyphs={},ao._animations={},ao._interactions={},ao._graphics={},ao._stageEventPlugins={},ao.registerGlyph=(t,e,i,s,n)=>(ao._glyphs[t]=new ro(e,i,s,n),ao._glyphs[t]),ao.registerAnimationType=(t,e)=>{ao._animations[t]=e},ao.getAnimationType=t=>ao._animations[t],ao.registerInteraction=(t,e)=>{ao._interactions[t]=e},ao.registerGraphic=(t,e)=>{ao._graphics[t]=e},ao.getGraphicType=t=>ao._graphics[t],ao.createGraphic=(t,e)=>{const i=ao._graphics[t];return i?i(e):null},ao.registerDefaultLayout=t=>{ao.defaultLayout=t},ao.getDefaultLayout=()=>ao.defaultLayout,ao.registerStageEventPlugin=(t,e)=>{ao._stageEventPlugins[t]=e},ao.getStageEventPlugin=t=>ao._stageEventPlugins[t];const oo="barLink";class lo extends Xr{constructor(){super(...arguments),this.name=oo}render(){const{data:t,linkStyle:s,areaStyle:n,styleMap:r,label:a,linkType:o="total"}=this.attribute;i.isEmpty(t)||(this.removeAllChild(),t.forEach(((t,l)=>{var h,c,d,u,p;const{linePoints:f,areaPoints:g,id:m=l,color:y,data:b}=t;if(g&&!1!==(null===(h=null==r?void 0:r[`area-${m}`])||void 0===h?void 0:h.visible)){const t=(x=Object.assign(Object.assign({points:g,fillOpacity:.3,fill:y,zIndex:0},n),null==r?void 0:r[`area-${m}`]),new Er(x));t.name="bar-link-area",t.id=`area-${m}`,this.add(t)}var x;if(f&&!1!==(null===(c=null==r?void 0:r[`line-${m}`])||void 0===c?void 0:c.visible)&&0!==(null===(d=null==s?void 0:s.lineStyle)||void 0===d?void 0:d.lineWidth)&&0!==(null===(u=null==r?void 0:r[`line-${m}`])||void 0===u?void 0:u.lineWidth)){const{startSymbol:t={},endSymbol:e={},lineStyle:n}=s||{},a=i.cloneDeep(t),o=i.cloneDeep(e);(null==r?void 0:r[`line-${m}`])&&r[`line-${m}`].stroke&&(a.style=Object.assign(Object.assign({},a.style),{color:r[`line-${m}`].stroke}),o.style=Object.assign(Object.assign({},o.style),{color:r[`line-${m}`].stroke})),a.symbolType||a.originSymbolType||(a.originSymbolType="solidArrow"),o.symbolType||o.originSymbolType||(o.originSymbolType="solidArrow");const l=new qa({points:f,startSymbol:Object.assign({size:8},a),endSymbol:Object.assign({size:8},o),lineStyle:Object.assign(Object.assign({lineDash:[3,3],lineWidth:1,stroke:"#000"},n),null==r?void 0:r[`line-${m}`]),pickable:!0,childrenPickable:!1,zIndex:1});l.name="bar-link-line",l.id=`line-${m}`,this.add(l)}if((null==a?void 0:a.visible)&&!1!==(null===(p=null==r?void 0:r[`label-${m}`])||void 0===p?void 0:p.visible)){const{style:t,formatMethod:i}=a,[s,n]=b;let l=s[e.STACK_FIELD_END],h=n[e.STACK_FIELD_END];"value"===o&&(l=s[e.STACK_FIELD_END]-s[e.STACK_FIELD_START],h=n[e.STACK_FIELD_END]-n[e.STACK_FIELD_START]);const c=h-l,d=(h-l)/l*100,u=mn(Object.assign(Object.assign({x:.5*(f[0].x+f[1].x),y:.5*(f[0].y+f[1].y),text:i?i(c,d,b):`${c} ${d}`,fontSize:14,fill:"#000",stroke:"#fff",lineWidth:1,textAlign:"center",textBaseline:"middle",background:"#fff",zIndex:2},t),null==r?void 0:r[`label-${m}`]));u.name="bar-link-label",u.id=`label-${m}`,this.add(u)}})))}}function ho(t,e,i){const{isHorizontal:s,isXAxisInverse:n,isYAxisInverse:r,linkType:a,doFill:o,regionStartX:l,regionStartY:h}=i,c=t.getGraphicItem(),d=e.getGraphicItem(),u=c.AABBBounds,p=d.AABBBounds;let f,g;return s?(f=[{x:(u.x1+u.x2)/2+l,y:u.y1+h},{x:(p.x1+p.x2)/2+l,y:p.y2+h}],n?("total"===a&&(f=[{x:u.x1+l,y:u.y1+h},{x:p.x1+l,y:p.y2+h}]),o&&(g=[{x:u.x1+l,x1:u.x2+l,y:u.y1+h},{x:p.x1+l,x1:p.x2+l,y:p.y2+h}])):("total"===a&&(f=[{x:u.x2+l,y:u.y1+h},{x:p.x2+l,y:p.y2+h}]),o&&(g=[{x:u.x2+l,x1:u.x1+l,y:u.y1+h},{x:p.x2+l,x1:p.x1+l,y:p.y2+h}]))):(f=[{x:u.x2+l,y:(u.y1+u.y2)/2+h},{x:p.x1+l,y:(p.y1+p.y2)/2+h}],r?("total"===a&&(f=[{x:u.x2+l,y:u.y2+h},{x:p.x1+l,y:p.y2+h}]),o&&(g=[{x:u.x2+l,y:u.y2+h,y1:u.y1+h},{x:p.x1+l,y:p.y2+h,y1:p.y1+h}])):("total"===a&&(f=[{x:u.x2+l,y:u.y1+h},{x:p.x1+l,y:p.y1+h}]),o&&(g=[{x:u.x2+l,y:u.y1+h,y1:u.y2+h},{x:p.x1+l,y:p.y1+h,y1:p.y2+h}]))),{areaPoints:g,linePoints:f,data:[t.data[0],e.data[0]],color:c.attribute.fill}}function co(t={},i){const{linkType:s="total",doFill:n}=t,r=d(t,["linkType","doFill"]);return{type:"component",componentType:oo,zIndex:500,interactive:!1,style:Object.assign(Object.assign({data:(t,i)=>{const{vchart:r}=i,a=r.getChart().getAllRegions(),o=[];return a.forEach((t=>{const i=t.getSeries().filter((t=>"bar"===t.type)),{x:r,y:a}=t.getLayoutStartPoint();if(i.length){const t=i[0].getGroupFields(),l=[];i.forEach((t=>{var e,i;(null===(i=null===(e=t.getMarkInName("bar"))||void 0===e?void 0:e.getProduct())||void 0===i?void 0:i.elements).forEach((t=>{l.push(t)}))}));const h=function(t,e){var i;const s={};for(let n=0;n<t.length;n++){const r=t[n],a=null===(i=r.data)||void 0===i?void 0:i[0],o=e.map((t=>a[t])).join("-");s[o]||(s[o]=[]),s[o].push(r)}return s}(l,t);Object.values(h).forEach((t=>{t.sort(((t,i)=>t.data[0][e.STACK_FIELD_END]-i.data[0][e.STACK_FIELD_END]))}));const c=i[0],d="horizontal"===c.direction,u=c.getYAxisHelper().isInverse(),p=c.getXAxisHelper().isInverse(),f=Object.values(h);if(f.length)if(d){f[0][0].getGraphicItem().AABBBounds.y1<f[f.length-1][0].getGraphicItem().AABBBounds.y1&&f.reverse()}else{f[0][0].getGraphicItem().AABBBounds.x1>f[f.length-1][0].getGraphicItem().AABBBounds.x1&&f.reverse()}for(let t=0;t<f.length-1;t++){const e=f[t],i=f[t+1];if(e.forEach(((t,e)=>{var l;const h=ho(t,null!==(l=i[e])&&void 0!==l?l:i[i.length-1],{isHorizontal:d,isXAxisInverse:p,isYAxisInverse:u,doFill:n,linkType:s,regionStartX:r,regionStartY:a});o.push(h)})),e.length<i.length){const t=e[e.length-1];for(let l=e.length;l<i.length;l++){const e=ho(t,i[l],{isHorizontal:d,isXAxisInverse:p,isYAxisInverse:u,doFill:n,linkType:s,regionStartX:r,regionStartY:a});o.push(e)}}}}})),o},linkType:s},r),i)}}const uo="seriesLabel";function po(t,e=10,i=10,s=.1){const n=t.length;if(!t.every(isFinite))return t;if(!(n>1))return t;const r=function(t,e,i){t=+t,e=+e;let s=arguments.length;i=s<2?(e=t,t=0,1):s<3?1:+i;let n=-1;s=0|Math.max(0,Math.ceil((e-t)/i));const r=new Array(s);for(;++n<s;)r[n]=t+n*i;return r}(t.length);for(let a=0;a<i;++a){r.sort(((e,i)=>{return s=t[e],n=t[i],null==s||null==n?NaN:s<n?-1:s>n?1:s>=n?0:NaN;var s,n}));let i=0;for(let s=1;s<n;++s){let n=t[r[s]]-t[r[s-1]];n<e&&(n=(e-n)/2,i=Math.max(i,n),t[r[s-1]]-=n,t[r[s]]+=n)}if(i<s)break}return t}function fo(t,e){return!(e.x1>t.x2||e.x2<t.x1||e.y1>t.y2||e.y2<t.y1)}function go(t,e=10,i=10){const s=t.length;let n,r=0;do{n=!1;for(let i=0;i<s;++i)for(let r=i+1;r<s;++r){const s=t[i].AABBBounds,a=t[r].AABBBounds;if(fo(s,a)){const i=e-(a.x1-s.x2);i>0&&(t[r].attribute.x+=i,a.x1+=i,a.x2+=i,n=!0)}}r++}while(n&&r<i)}function mo(t,e){const{label:s,line:n}=e;return{type:"component",componentType:uo,interactive:!1,style:{position:t,layout:(t,e)=>{var i;return null!==(i=e.vchart.getChart().getAllSeries()[0].getSpec().direction)&&void 0!==i?i:"vertical"},data:(e,s)=>{var n;const r=s.vchart.getChart(),a=r.getAllSeries()[0],o="horizontal"===a.direction,l=o?a.getYAxisHelper():a.getXAxisHelper(),h=null===(n=l.getScale)||void 0===n?void 0:n.call(l,0),c=l.isInverse(),d=a.getDimensionField()[0],u=a.getSeriesField(),p=r.getAllSeries().map((t=>t.type)).filter(((t,e,i)=>i.indexOf(t)===e)),f=[];if(1===p.length&&["bar","area","line","waterfall"].includes(p[0])){("both-ends"===t?["start","end"]:[t]).forEach((t=>{const e="end"===t?i.last(h.domain()):h.domain()[0],s=a.getRegion(),{x:n,y:l}=s.getLayoutStartPoint();let g=0;r.getAllSeries().forEach((i=>{i.getMarkInName("waterfall"===p[0]?"bar":p[0]).getProduct().elements.forEach((s=>{var r;const a=s.data.find((t=>t[d]===e));if(a){const e=s.getGraphicItem(),h=e.AABBBounds;let m,y,b,x;"bar"===p[0]||"waterfall"===p[0]?(m="end"===t?{x:o?(h.x1+h.x2)/2:c?h.x1:h.x2,y:o?c?h.y2:h.y1:(h.y1+h.y2)/2}:{x:o?(h.x1+h.x2)/2:c?h.x2:h.x1,y:o?c?h.y1:h.y2:(h.y1+h.y2)/2},y=e.attribute.fill):(m=i.dataToPosition(a),y=e.attribute.stroke||e.attribute.fill),"end"===t?(b=o?"center":c?"end":"start",x=o?c?"top":"bottom":"middle"):(b=o?"center":c?"start":"end",x=o?c?"bottom":"top":"middle");const v=null!==(r=a[u])&&void 0!==r?r:a[d];f.push({point:{x:m.x+n,y:m.y+l},label:v,color:y,textAlign:b,textBaseline:x,series:i,datum:a,id:`${t}-${g}`,position:t}),g++}}))}))}))}return f},line:n,label:Object.assign({space:12},s)}}}class yo extends Xr{constructor(){super(...arguments),this.name=uo}render(){var t,e,s,n;this.removeAllChild();const{data:r,layout:a,label:o,line:l={}}=this.attribute;if(i.isEmpty(r))return;const h=null!==(t=null==o?void 0:o.styleMap)&&void 0!==t?t:{},c={},d=r.filter((t=>{var e;return!1!==(null===(e=h[t.id])||void 0===e?void 0:e.visible)}));if("vertical"===a){const t=1.5*(null!==(s=null===(e=null==o?void 0:o.style)||void 0===e?void 0:e.fontSize)&&void 0!==s?s:12),i=(t,e,i)=>{var s,n,r,a,o,l,h,c;const{label:d,color:u,textAlign:p,textBaseline:f,id:g}=t,m=null!==(n=null===(s=i[g])||void 0===s?void 0:s.formatMethod)&&void 0!==n?n:null===(r=this.attribute.label)||void 0===r?void 0:r.formatMethod,y=mn(Object.assign(Object.assign(Object.assign(Object.assign({text:m?m(d,t.datum,{series:t.series}):d},null===(a=this.attribute.label)||void 0===a?void 0:a.style),e),{textAlign:p,textBaseline:f,fill:null!==(h=null===(l=null===(o=this.attribute.label)||void 0===o?void 0:o.style)||void 0===l?void 0:l.fill)&&void 0!==h?h:u}),null===(c=i[g])||void 0===c?void 0:c.style));return y.name="series-label-text",y.id=g,this.add(y),y};["start","end"].forEach((e=>{const s=d.filter((t=>t.position===e)),n=po(s.map((t=>t.point.y)),t);s.forEach(((t,e)=>{var s;const r={x:t.point.x+(null!==(s=null==o?void 0:o.space)&&void 0!==s?s:8)*("start"===t.textAlign?1:-1),y:n[e]};i(t,r,h),c[t.id]=r}))}))}else{const t=[],e=[];d.forEach((i=>{var s,n,r,a,l;const{point:c,label:d,color:u,textAlign:p,textBaseline:f,id:g,position:m}=i,y={x:c.x,y:c.y},b=null!==(n=null===(s=h[g])||void 0===s?void 0:s.formatMethod)&&void 0!==n?n:null==o?void 0:o.formatMethod,x=mn(Object.assign(Object.assign(Object.assign(Object.assign({text:b?b(d,i.datum,{series:i.series}):d},null==o?void 0:o.style),y),{textAlign:p,textBaseline:f,fill:null!==(a=null===(r=null==o?void 0:o.style)||void 0===r?void 0:r.fill)&&void 0!==a?a:u}),null===(l=h[g])||void 0===l?void 0:l.style));x.id=g,x.name="series-label-text",this.add(x),"start"===m?t.push(x):"end"===m&&e.push(x)})),t.length&&go(t,4,10),e.length&&go(e,4,10);const i=null!==(n=null==o?void 0:o.space)&&void 0!==n?n:8;[...t,...e].forEach((t=>{const e="top"===t.attribute.textBaseline?1:-1;t.setAttribute("y",t.attribute.y+i*e),c[t.id]={x:t.attribute.x,y:t.attribute.y}}))}!1!==l.visible&&d.forEach((t=>{var e,i,s,n,r,o;const{point:d,color:u,id:p}=t,f={x:c[p].x+(null!==(s=null===(i=null===(e=h[p])||void 0===e?void 0:e.style)||void 0===i?void 0:i.dx)&&void 0!==s?s:0),y:c[p].y+(null!==(o=null===(r=null===(n=h[p])||void 0===n?void 0:n.style)||void 0===r?void 0:r.dy)&&void 0!==o?o:0)};if(!1!==l.autoVisible){if("vertical"===a&&d.y!==f.y||"horizontal"===a&&d.x!==f.x){const t=Mr(Object.assign({points:[d,f],lineWidth:1,stroke:u},l.style));t.name="series-label-line",this.add(t)}}else{const t=Mr(Object.assign({points:[d,f],lineWidth:1,stroke:u},l.style));t.name="series-label-line",this.add(t)}}))}}t.BAR_LINK=oo,t.BarLinkComponent=lo,t.ConversionFunnelChart=v,t.ConversionFunnelSeries=_,t.DEFAULT_ARROW_MARK_STYLE=A,t.DEFAULT_ARROW_SYMBOL_MARK_STYLE=B,t.DEFAULT_ARROW_TEXT_MARK_STYLE=T,t.DEFAULT_FUNNEL_BACKGROUND_MARK_STYLE=S,t.RankingBar=a,t.SERIES_BREAK=Za,t.SeriesBreakComponent=Qa,t.SeriesLabelComponent=yo,t.appendBarLinkConfig=function(t,e){t.customMark=i.array(t.customMark).filter((t=>t.componentType!==oo)),t.customMark.push(co(e))},t.appendSeriesBreakConfig=t=>{var e;if(null===(e=t.axes)||void 0===e?void 0:e.length){const e=t.axes.filter((t=>t.breaks&&t.breaks.length&&!1!==t.visible));if(e.length)return t.customMark=i.array(t.customMark).filter((t=>t.componentType!==Za)),t.customMark.push(eo(e,e.map((e=>t.axes.indexOf(e))))),!0}return!1},t.appendSeriesLabelConfig=function(t,e){var s,n,r;if(t.customMark=i.array(t.customMark).filter((t=>t.componentType!==uo)),e||(e=null!==(r=null!==(s=i.get(t,uo))&&void 0!==s?s:i.get(null===(n=t.series)||void 0===n?void 0:n[0],uo))&&void 0!==r?r:{}),e.visible){const{position:i="end"}=e,s=d(e,["position"]);t.customMark.push(mo(i,s))}},t.getBarLinkConfig=co,t.getSeriesBreakConfig=eo,t.getSeriesLabelConfig=mo,t.registerBarLink=()=>{ao.registerGraphicComponent(oo,(t=>new lo(t)))},t.registerConversionFunnelChart=t=>{e.registerMarkFilterTransform();const i=(null==t?void 0:t.VChart)||e.VChart;i&&(i.useChart([v]),i.useSeries([_]))},t.registerRankingBarChart=t=>{const i=(null==t?void 0:t.VChart)||e.VChart;i&&i.useChart([a])},t.registerSeriesBreak=()=>{e.Factory.registerGraphicComponent("seriesBreak",(t=>new Qa(t)))},t.registerSeriesLabel=()=>{ao.registerGraphicComponent("seriesLabel",(t=>new yo(t)))}}));
15
+ ***************************************************************************** */function b(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(t);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(i[s[n]]=t[s[n]])}return i}const v={cornerRadius:4,stroke:"black",strokeOpacity:1,lineWidth:1,closePath:!1,pickable:!1},x={symbolType:"triangle",size:8,scaleX:.7,fill:"black"},A={fill:"#606773",fontSize:12},_={fill:"#eff1f9"};class S extends e.FunnelChartSpecTransformer{transformSpec(t){const{conversionArrow:e,extensionMark:i=[],funnelBackground:s}=t;if(e&&e.arrows&&e.arrows.length){const t=function(t){const{arrows:e}=t,i=b(t,["arrows"]),s=e.filter((t=>"left"===t.position)),n=e.filter((t=>"right"===t.position)),r=T(n,i),a=T(s,i),o=[];r&&(r.name="arrowRight",o.push(r));a&&(a.name="arrowLeft",o.push(a));return o}(e);t&&t.length&&i.push(...t)}if(s&&s.visible){const t=function(t){const{style:e={}}=t,i=b(t,["style"]);return Object.assign(Object.assign({type:"rect"},i),{dataIndex:0,zIndex:0,style:Object.assign(Object.assign(Object.assign({},_),e),{x:0,y:(t,e)=>e.getPoints(t)[0].y,width:(t,e)=>{const i=e.getRegion(),{width:s}=i.getLayoutRect();return s},height:(t,e)=>{const i=e.getPoints(t),s=i[0];return i[3].y-s.y}})})}(s);t&&i.push(t)}t.extensionMark=i,super.transformSpec(t)}_getDefaultSeriesSpec(t){const e=super._getDefaultSeriesSpec(t);return e.conversionArrow=t.conversionArrow,e.funnelBackground=t.funnelBackground,e}}function T(t,s){if(0===(null==t?void 0:t.length))return null;const{line:n,symbol:r,text:a,margin:o}=s,l=[],h={type:"group",zIndex:e.LayoutZIndex.Mark+1,children:[]},c=function(t={},e){const{style:i={}}=t,s=b(t,["style"]),n=(t,e)=>{var i,s;const{from:n,to:r}=t,{vchart:a}=e,o=null===(s=null===(i=null==a?void 0:a.getChart())||void 0===i?void 0:i.getSeriesData())||void 0===s?void 0:s.latestData;return!(r>o.length-1||n>o.length-1)};return Object.assign(Object.assign({type:"polygon",interactive:!1},s),{dataKey:t=>`${t.id}`,style:Object.assign(Object.assign(Object.assign({},v),i),{renderable:n,points:(t,i)=>{if(!n(t,i))return[];let s=t.layout.points;return s=B(t,i,e),s}})})}(n,o);c&&l.push(c);const d=function(t={},e){const{style:i={}}=t,s=b(t,["style"]);return Object.assign(Object.assign({type:"symbol",interactive:!1,dataKey:t=>`${t.id}`},s),{style:Object.assign(Object.assign(Object.assign({},x),i),{x:(t,i)=>{var s,n;let r=t.layout.points;return r=B(t,i,e),null!==(n=null===(s=r[(null==r?void 0:r.length)-1])||void 0===s?void 0:s.x)&&void 0!==n?n:NaN},y:(t,i)=>{var s,n;let r=t.layout.points;return r=B(t,i,e),null!==(n=null===(s=r[(null==r?void 0:r.length)-1])||void 0===s?void 0:s.y)&&void 0!==n?n:NaN},angle:t=>"left"===t.position?90:-90})})}(r,o);d&&l.push(d);const u=function(t={},e){const{style:s={},formatMethod:n,textMargin:r=4}=t,a=b(t,["style","formatMethod","textMargin"]);return Object.assign(Object.assign({type:"text",dataKey:t=>`${t.id}`,interactive:!1,animation:!1},a),{style:Object.assign(Object.assign(Object.assign({},A),{text:(t,e)=>{var s,r,a,o,l,h,c;const{text:d}=t;let u=d;if(i.isFunction(n)){const{vchart:i}=e,{from:p,to:g}=t,{field:f}=t.context,m=null!==(a=null===(r=null===(s=null==i?void 0:i.getChart())||void 0===s?void 0:s.getSeriesData())||void 0===r?void 0:r.latestData)&&void 0!==a?a:[],y=null!==(c=null===(h=null===(l=null===(o=null==i?void 0:i.getChart())||void 0===o?void 0:o.getAllSeries()[0])||void 0===l?void 0:l.getViewData())||void 0===h?void 0:h.latestData)&&void 0!==c?c:[],b=y.find((t=>t[f]===m[p][f])),v=y.find((t=>t[f]===m[g][f]));u=n(d,{arrow:t,from:b,to:v})}return u},x:(t,i)=>{var s,n;let a=t.layout.points;return a=B(t,i,e),null!==(n=(null===(s=a[1])||void 0===s?void 0:s.x)+("left"===t.position?-r:r))&&void 0!==n?n:NaN},y:(t,i)=>{var s,n,r;let a=t.layout.points;return a=B(t,i,e),null!==(r=((null===(s=a[1])||void 0===s?void 0:s.y)+(null===(n=a[2])||void 0===n?void 0:n.y))/2)&&void 0!==r?r:NaN},textAlign:t=>"left"===t.position?"right":"left",textBaseline:"middle"}),s)})}(a,o);return u&&l.push(u),h.children=l,h}function B(t,e,i){var s,n,r,a,o;const{vchart:l}=e,{from:h,to:c}=t,{field:d}=t.context,u=null===(n=null===(s=null==l?void 0:l.getChart())||void 0===s?void 0:s.getSeriesData())||void 0===n?void 0:n.latestData,p=null===(o=null===(a=null===(r=null==l?void 0:l.getChart())||void 0===r?void 0:r.getAllSeries()[0])||void 0===a?void 0:a.getViewData())||void 0===o?void 0:o.latestData;let g=[];if(u&&u.length){const s=p.find((t=>t[d]===u[h][d])),n=p.find((t=>t[d]===u[c][d])),r=p[0];if(s&&n&&r){g=function(t,e,i,s,n=12){const{layout:r,distance:a,position:o}=t,{level:l,fromIndex:h,toIndex:c,fromTotal:d,toTotal:u}=r,p="right"===o,g=p?e[1]:e[0],f=p?e[2]:e[3],m=Math.abs(g.y-f.y),y=p?i[1]:i[0],b=p?i[2]:i[3],v=Math.abs(y.y-b.y),x=p?s[1]:s[0],A=m/(d+1),_=v/(u+1),S=g.y+A*(h+1),T=y.y+_*(c+1),B=p?-1:1,w=[{x:g.x-n*B,y:S},{x:x.x-(n+(l+1)*a)*B,y:S},{x:x.x-(n+(l+1)*a)*B,y:T},{x:y.x-n*B,y:T}];return w}(t,e.getPoints(s),e.getPoints(n),e.getPoints(r),i),t.layout.points=g}}return g}function w(t,e){const{from:i,to:s}=t,{from:n,to:r}=e;return s>n&&r>i}function C(t,e){const{from:i,to:s}=t,{from:n,to:r}=e;return i===n&&s===r}const M=(t,e)=>{var s,n,r;if(!t||!(null===(s=t.arrows)||void 0===s?void 0:s.length))return[];const{arrows:a}=t,o=function(t,e){return t.filter((t=>i.isValidNumber(t.from*t.to))).map(((t,i)=>{const{from:s,to:n,position:r="right"}=t;return Object.assign(Object.assign({},t),{position:r,distance:t.distance||40,from:Math.min(s,n),to:Math.max(s,n),span:Math.abs(s-n),isLayout:!1,context:{field:e},layout:{level:0},id:`${s}-${n}-${r}-${i}`})}))}(a,e.categoryField),l=o.filter((t=>"left"===t.position)),h=o.filter((t=>"right"===t.position));return[...null!==(n=P(l))&&void 0!==n?n:[],...null!==(r=P(h))&&void 0!==r?r:[]]};function P(t){if(0===(null==t?void 0:t.length))return null;const e=new Map;return t.forEach((t=>{const s=e.get(t.from);if(i.isValid(s)){const e=s.fromArrows.find((e=>C(e,t)));e?t.layout.duplicateNode=e:s.degree+=1,s.fromArrows.push(t)}else e.set(t.from,{fromArrows:[t],toArrows:[],totalArrows:[],degree:1});const n=e.get(t.to);if(i.isValid(n)){const e=n.toArrows.find((e=>C(e,t)));e?t.layout.duplicateNode=e:n.degree+=1,n.toArrows.push(t)}else e.set(t.to,{toArrows:[t],fromArrows:[],totalArrows:[],degree:1})})),e.forEach((t=>{t.fromArrows.sort(((t,e)=>e.span-t.span)),t.toArrows.sort(((t,e)=>t.span-e.span)),t.totalArrows=[...t.toArrows,...t.fromArrows]})),t.sort(((t,e)=>t.span-e.span)).forEach((s=>{var n;const r=t.filter((t=>t.layout.isLayout)),a=i.maxInArray(r,((t,e)=>t.layout.level-e.layout.level));let o=null!==(n=null==a?void 0:a.layout.level)&&void 0!==n?n:0;for(;o>=0;){if(r.some((t=>t.layout.level===o&&w(t,s)))){o+=1;break}--o}s.layout.level=Math.max(0,o),s.layout.fromTotal=e.get(s.from).degree,s.layout.toTotal=e.get(s.to).degree;const l=s.layout.duplicateNode;l?(s.layout.fromIndex=l.layout.fromIndex,s.layout.toIndex=l.layout.toIndex):(s.layout.fromIndex=k(s,e.get(s.from).totalArrows),s.layout.toIndex=k(s,e.get(s.to).totalArrows)),s.layout.isLayout=!0})),t}function k(t,e){let i=0,s=0;for(let n=0;n<e.length;n++){const r=e[n];if(r===t){i=n-s;break}r.layout.duplicateNode&&s++}return i}class O extends e.FunnelChart{constructor(){super(...arguments),this.type="conversionFunnel",this.transformerConstructor=S}}O.type="conversionFunnel",O.transformerConstructor=S;class R extends e.FunnelSeries{initData(){var t;super.initData();const{conversionArrow:i}=this._spec;i&&(null===(t=i.arrows)||void 0===t?void 0:t.length)&&(this._arrowData=new y(this._dataSet,{name:`${e.PREFIX}_series_${this.id}_arrowData`}),this._dataSet.getTransform("conversionArrow")||this._dataSet.registerTransform("conversionArrow",M),this._arrowData.parse(i).transform({type:"conversionArrow",options:{categoryField:this._spec.categoryField}}))}afterCompile(){var t;null===(t=super.afterCompile)||void 0===t||t.call(this);const e=this.getMarkInName("arrowRight");e&&e.getMarks().forEach((t=>{t.setDataView(this._arrowData),t.compileData(),t.setTransform([{type:"filter",callback:t=>"right"===t.position}])}));const i=this.getMarkInName("arrowLeft");i&&i.getMarks().forEach((t=>{t.setDataView(this._arrowData),t.compileData(),t.setTransform([{type:"filter",callback:t=>"left"===t.position}])}))}}const L="dataKey";class I extends e.CommonChartSpecTransformer{transformSpec(t){var e,i,s,n,r;super.transformSpec(t);const a=function(t){const e=[];return Object.keys(t.data).forEach((i=>{const s=t.data[i].nodes;e.push({data:[{id:"nodes",values:s.map(((t,e)=>Object.assign(Object.assign({},t),{[L]:e})))},{id:"endpoints",values:[]},{id:"iter",values:[{iter:i}]},{id:"background",values:[{iter:i,x:t.scope[0],y:t.scope[1]},{iter:i,x:t.scope[0],y:t.scope[3]},{iter:i,x:t.scope[2],y:t.scope[3]},{iter:i,x:t.scope[2],y:t.scope[1]},{iter:i,x:t.scope[0],y:t.scope[1]}]}]})})),e}(t),o="neighborhood"!==t.taskType;t.type="common",t.dataKey=L,t.data=a[0].data,t.series=[{id:"background-series",type:"area",dataId:"background",interactive:!1,persent:!0,xField:"x",yField:"y",point:{visible:!1},line:{visible:!1},area:{visible:!0,interactive:!1,style:{background:e=>"neighborhood"===t.taskType?"":`https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/sequence-scatter-bgimg-2/${e.iter}.png`,fill:"transparent",fillOpacity:.5}},hover:{enable:!1},select:{enable:!1}},{id:"line-series",type:"line",dataId:"endpoints",xField:"x",yField:"y",seriesField:"edgeId",animation:!0,point:{visible:!1},line:{visible:!0,style:{stroke:t=>t.color,lineDash:t=>"same_type"===t.type?[0,0]:[3,2],lineWidth:.8,strokeOpacity:.6}}},{id:"scatter-series",type:"scatter",dataId:"nodes",xField:t.xField,yField:t.yField,seriesField:"label",point:{state:{hover:{scaleX:1.5,scaleY:1.5,fillOpacity:1},hover_reverse:{scaleX:1,scaleY:1,fillOpacity:.3}},style:{size:()=>"neighborhood"===t.taskType?6:4,fill:e=>{var i;return null!==(i=t.labelColor[e.label])&&void 0!==i?i:"gray"},fillOpacity:t=>t.confidence}},label:{visible:!0,style:{visible:()=>"neighborhood"==t.taskType,type:"text",fontFamily:"Console",fontStyle:"italic",fontSize:12,fill:"black",fillOpacity:.6,text:t=>t.id}}}],t.player&&(t.player=Object.assign(Object.assign({},t.player),{specs:a}),t.animationAppear={duration:null!==(i=null===(e=t.player)||void 0===e?void 0:e.duration)&&void 0!==i?i:2e3,easing:"linear"},t.animationUpdate={duration:null!==(n=null===(s=t.player)||void 0===s?void 0:s.duration)&&void 0!==n?n:2e3,easing:"linear"}),t.axes=[{orient:"left",type:"linear",inverse:!0,min:t.scope[1],max:t.scope[3]},{orient:"bottom",type:"linear",min:t.scope[0],max:t.scope[2]}],t.customMark=[{type:"text",dataId:"iter",style:Object.assign({x:50,y:()=>10,textBaseline:"top",textAlign:"left",fontSize:100,fontWeight:"bolder",fill:"black",fillOpacity:.2},null===(r=t.infoLabel)||void 0===r?void 0:r.style)}],t.legends=[{seriesId:"scatter-series",visible:!0,orient:"right",position:"middle",data:t=>t.map((t=>(t.shape.outerBorder={stroke:t.shape.fill,distance:2,lineWidth:1},t))),title:{visible:!0,align:"left",textStyle:{text:"Classes",fontFamily:"Console",fontSize:18,fontWeight:"bold"}},item:{visible:!0,width:"8%",value:{alignRight:!0,style:{fill:"#000",fillOpacity:1,fontSize:12},state:{unselected:{fill:"#d8d8d8"}}}}}],t.tooltip={visible:o,seriesId:"scatter-series",lockAfterClick:!1,activeType:"mark",trigger:"hover",mark:{title:{visible:!0,value:"Info"},content:[{key:"Label",value:t=>t.label,shapeType:"circle",shapeSize:8},{key:"Prediction",value:t=>t.prediction,shapeType:"circle",shapeSize:8,shapeFill:e=>{var i;return null!==(i=t.labelColor[e.prediction])&&void 0!==i?i:"gray"}},{key:"Confidence",value:t=>t.confidence.toFixed(2),shapeType:"square",shapeSize:8,shapeFill:t=>t.label===t.prediction?"green":"red"}]},style:{panel:{padding:{top:10,bottom:15,left:10,right:10},backgroundColor:"#fff",border:{color:"#eee",width:1,radius:10}},titleLabel:{fontSize:20,fontFamily:"Times New Roman",fill:"brown",fontWeight:"bold",textAlign:"center",lineHeight:24},keyLabel:{fontSize:16,fontFamily:"Times New Roman",fill:"black",textAlign:"center",lineHeight:15,spacing:10},valueLabel:{fontSize:14,fill:"black",textAlign:"center",lineHeight:15,spacing:10}}},t.dataZoom=[{visible:!1,orient:"left",filterMode:"axis",showDetail:!1,roamZoom:{enable:!0,focus:!0,rate:3},roamDrag:{enable:!0,reverse:!0,rate:1}},{visible:!1,orient:"bottom",filterMode:"axis",showDetail:!1,roamZoom:{enable:!0,focus:!0,rate:3},roamDrag:{enable:!0,reverse:!0,rate:1}}],super.transformSpec(t)}}class E extends e.BaseChart{constructor(){super(...arguments),this.type="sequenceScatterLink",this.transformerConstructor=I}init(){this.isValid()&&super.init()}isValid(){var t,e,i,s;const{xField:n,yField:r,data:a}=this._spec;return n&&r?!!a||(null===(s=(i=this._option).onError)||void 0===s||s.call(i,"Data is required"),!1):(null===(e=(t=this._option).onError)||void 0===e||e.call(t,"Missing Required Config: `xField`, `yField` "),!1)}}E.type="sequenceScatterLink",E.view="singleDefault",E.transformerConstructor=I;const D=.2;function j(t){const e=Math.sqrt((2*Math.PI)**2);return Math.exp(-(t**2)/2)/e}const U="dataKey";class F extends e.CommonChartSpecTransformer{transformSpec(t){var e,i,s,n,r,a;super.transformSpec(t);const o=function(t){const e=[];return Object.keys(t.data).forEach((i=>{const s=t.data[i].map(((t,e)=>Object.assign(Object.assign({},t),{[U]:e}))),n=function(t,e=100,i){const s=t.reduce(((t,e)=>{const i=e.label;return t[i]=t[i]||[],t[i].push(e),t}),{}),n=[];return Object.entries(s).forEach((([t,s])=>{const r=i||function(t){return t.length**(-1/6)}(s),a=s.map((t=>t.x)),o=s.map((t=>t.y)),l=Math.min(...a),h=Math.max(...a),c=Math.min(...o),d=Math.max(...o),u=l-(h-l)*D,p=c-(d-c)*D;for(let i=0;i<e;i++)for(let a=0;a<e;a++){const e=u+.1*i,o=p+.1*a;let l=0;for(const t of s)l+=j(Math.sqrt((e-t.x)**2+(o-t.y)**2)/r);l/=s.length*r*r,n.push({x:e,y:o,kde:l,label:t})}})),n}(s,150);e.push({data:[{id:"nodes",values:s},{id:"iter",values:[{iter:i}]},{id:"kde",values:n}]})})),e}(t);t.type="common",t.dataKey=U,t.data=o[0].data,t.scales=[{id:"colorScale",type:"ordinal",specified:{0:"rgb(150, 10, 100)",1:"rgb(31, 119, 180)",2:"rgb(255, 127, 14)",3:"rgb(44, 160, 44)",4:"rgb(214, 39, 40)",5:"rgb(148, 103, 189)",6:"rgb(140, 86, 75)",7:"rgb(227, 119, 194)",8:"rgb(127, 127, 127)",9:"rgb(188, 189, 34)",10:"rgb(23, 190, 207)"}},{id:"brighterColorScale",type:"ordinal",specified:{0:"rgb(150, 10, 150)",1:"rgb(31, 119, 230)",2:"rgb(255, 127, 64)",3:"rgb(44, 160, 94)",4:"rgb(214, 39, 90)",5:"rgb(148, 103, 239)",6:"rgb(140, 86, 125)",7:"rgb(227, 119, 244)",8:"rgb(127, 127, 177)",9:"rgb(188, 189, 84)",10:"rgb(23, 190, 255)"}},...null!==(e=t.scales)&&void 0!==e?e:[]],t.series=[{type:"scatter",dataIndex:0,xField:t.xField,yField:t.yField,seriesField:t.seriesField,size:5,point:{zIndex:1e3,style:{fill:{scale:"colorScale",field:t.seriesField}}}}];t.customMark=[{type:"text",dataIndex:1,style:Object.assign({text:t=>t.iter,x:10,y:()=>10,textBaseline:"top",textAlign:"left",fontSize:25,fontWeight:"bolder",fill:"black",fillOpacity:.2},null===(i=t.infoLabel)||void 0===i?void 0:i.style)},{type:"symbol",dataIndex:2,style:{symbolType:"rect",x:(t,e)=>54+(0,e.chart.getAllSeries()[0]._markAttributeContext.valueToX)([t.x]),y:(t,e)=>(0,e.chart.getAllSeries()[0]._markAttributeContext.valueToY)([t.y])+26,size:5,fill:{scale:"brighterColorScale",field:"label"},fillOpacity:t=>10*t.kde}}],t.tooltip={visible:!0,fields:["x","y","label"]},t.player&&(t.player=Object.assign(Object.assign({},t.player),{specs:o}),t.animationAppear={duration:null!==(n=null===(s=t.player)||void 0===s?void 0:s.duration)&&void 0!==n?n:2e3,easing:"linear"},t.animationUpdate={duration:null!==(a=null===(r=t.player)||void 0===r?void 0:r.duration)&&void 0!==a?a:2e3,easing:"linear"}),t.axes=[{orient:"left",type:"linear",nice:!0},{orient:"bottom",type:"linear",nice:!0,label:{visible:!0}}],super.transformSpec(t)}}class N extends e.BaseChart{constructor(){super(...arguments),this.type="sequenceScatterKDE",this.transformerConstructor=F}init(){this.isValid()&&super.init()}isValid(){var t,e,i,s;const{xField:n,yField:r,data:a}=this._spec;return n&&r?!!a||(null===(s=(i=this._option).onError)||void 0===s||s.call(i,"Data is required"),!1):(null===(e=(t=this._option).onError)||void 0===e||e.call(t,"Missing Required Config: `xField`, `yField` "),!1)}}N.type="sequenceScatterKDE",N.view="singleDefault",N.transformerConstructor=F;const W="dataKey";function z(t){const e=[];return Object.keys(t.data).forEach((i=>{let s=null;if(t.backgroundColors&&t.backgroundColors[i]){const e=function(t,e){var i;if("undefined"==typeof document)throw new Error("Canvas rendering requires browser environment with document object");const s=document.createElement("canvas");s.width=e.width,s.height=e.height;const n=s.getContext("2d");if(!n)throw new Error("Failed to get 2D rendering context from canvas");const r=n.createImageData(e.width,e.height);for(let e=0;e<300;e++)for(let s=0;s<300;s++){const n=(null===(i=t[e])||void 0===i?void 0:i[s])||[0,0,0],a=4*(300*e+s);r.data[a]=Math.round(255*n[0]),r.data[a+1]=Math.round(255*n[1]),r.data[a+2]=Math.round(255*n[2]),r.data[a+3]=255}return n.putImageData(r,0,0),s.toDataURL("image/png")}(t.backgroundColors[i],t);s={imageData:e}}e.push({data:[{id:"nodes",values:t.data[i].map(((t,e)=>Object.assign(Object.assign({},t),{[W]:e})))},{id:"inter",values:[{inter:i}]},{id:"background",values:s?[s]:[]}]})})),e}class G extends e.CommonChartSpecTransformer{transformSpec(t){var e,i,s,n,r;super.transformSpec(t);const a=z(t);t.type="common",t.dataKey=W,t.data=a[0].data,t.width=300,t.height=300,t.autoFit=!1,t.series=[{type:"scatter",xField:t.xField,yField:t.yField}],t.player&&(t.player=Object.assign(Object.assign({},t.player),{specs:a}),t.animationAppear={duration:null!==(i=null===(e=t.player)||void 0===e?void 0:e.duration)&&void 0!==i?i:2e3,easing:"linear"},t.animationUpdate={duration:null!==(n=null===(s=t.player)||void 0===s?void 0:s.duration)&&void 0!==n?n:2e3,easing:"linear"}),t.axes=[{orient:"left",type:"linear"},{orient:"bottom",label:{visible:!0},type:"linear"}],t.customMark=[{type:"image",dataIndex:2,style:{x:0,y:0,width:300,height:300,image:t=>t.imageData,zIndex:-1}},{type:"text",dataIndex:1,style:Object.assign({text:t=>t.inter,x:50,y:()=>10,textBaseline:"top",textAlign:"left",fontSize:100,fontWeight:"bolder",fill:"black",fillOpacity:.2},null===(r=t.infoLabel)||void 0===r?void 0:r.style)}],t.tooltip={visible:!1},super.transformSpec(t)}}class V extends e.BaseChart{constructor(){super(...arguments),this.type="sequenceScatterPixel",this.transformerConstructor=G}init(){this.isValid()&&super.init()}isValid(){var t,e,i,s;const{xField:n,yField:r,data:a}=this._spec;return n&&r?!!a||(null===(s=(i=this._option).onError)||void 0===s||s.call(i,"Data is required"),!1):(null===(e=(t=this._option).onError)||void 0===e||e.call(t,"Missing Required Config: `xField`, `yField` "),!1)}}V.type="sequenceScatterPixel",V.view="singleDefault",V.transformerConstructor=G;class H extends e.BarChartSpecTransformer{_getDefaultSeriesSpec(t){const e=super._getDefaultSeriesSpec(t);return e.barWidth=t.barWidth,e.barMaxWidth=t.barMaxWidth,e.barMinWidth=t.barMinWidth,e.barGapInGroup=t.barGapInGroup,e}}var X,Y,K,$,q;!function(t){t.bar3d="bar3d",t.histogram3d="histogram3d",t.rangeColumn3d="rangeColumn3d",t.pie3d="pie3d",t.wordCloud3d="wordCloud3d",t.funnel3d="funnel3d"}(X||(X={})),function(t){t.rect3d="rect3d",t.arc3d="arc3d",t.pyramid3d="pyramid3d"}(Y||(Y={})),function(t){t.bar3d="bar3d",t.rangeColumn3d="rangeColumn3d",t.pie3d="pie3d",t.wordCloud3d="wordCloud3d",t.funnel3d="funnel3d"}(K||(K={})),function(t){t.bar3d="bar3d",t.funnel3d="funnel3d",t.transform3d="transform3d",t.pie3d="pie3d"}($||($={})),function(t){t.bar3d_horizontal="bar3d_horizontal",t.bar3d_vertical="bar3d_vertical",t.bar3d_stack="bar3d_stack",t.rangeColumn3d_horizontal="rangeColumn3d_horizontal",t.rangeColumn3d_vertical="rangeColumn3d_vertical"}(q||(q={}));class Z{static GenAutoIncrementId(){return Z.auto_increment_id++}}Z.auto_increment_id=0;class J{constructor(t){this.id=Z.GenAutoIncrementId(),this.registry=t}}const Q="named",tt="inject",et="inversify:tagged",it="inversify:paramtypes";class st{constructor(t,e){this.key=t,this.value=e}toString(){return this.key===Q?`named: ${String(this.value).toString()} `:`tagged: { key:${this.key.toString()}, value: ${String(this.value)} }`}}var nt=function(t){var e;return function(t){const e="function"==typeof Symbol&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=Object.getPrototypeOf(Function),s=("object"==typeof process&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL,Map),n=new WeakMap;function r(t,e,i){let r=n.get(t);if(h(r)){if(!i)return;r=new s,n.set(t,r)}let a=r.get(e);if(h(a)){if(!i)return;a=new s,r.set(e,a)}return a}function a(t,e,i){if(o(t,e,i))return!0;const s=f(e);return!c(s)&&a(t,s,i)}function o(t,e,i){const s=r(e,i,!1);return!h(s)&&!!s.has(t)}function l(t,e,i){if(o(t,e,i))return function(t,e,i){const s=r(e,i,!1);if(!h(s))return s.get(t)}(t,e,i);const s=f(e);return c(s)?void 0:l(t,s,i)}function h(t){return void 0===t}function c(t){return null===t}function d(t){return"object"==typeof t?null!==t:"function"==typeof t}function u(t,i){switch(function(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}const s=3===i?"string":5===i?"number":"default",n=function(t,e){const i=t[e];if(null!=i){if(!g(i))throw new TypeError;return i}}(t,e);if(void 0!==n){const e=n.call(t,s);if(d(e))throw new TypeError;return e}return function(t,e){if("string"===e){const e=t.toString;if(g(e)){const i=e.call(t);if(!d(i))return i}const i=t.valueOf;if(g(i)){const e=i.call(t);if(!d(e))return e}}else{const e=t.valueOf;if(g(e)){const i=e.call(t);if(!d(i))return i}const i=t.toString;if(g(i)){const e=i.call(t);if(!d(e))return e}}throw new TypeError}(t,"default"===s?"number":s)}function p(t){const e=u(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function g(t){return"function"==typeof t}function f(t){const e=Object.getPrototypeOf(t);if("function"!=typeof t||t===i)return e;if(e!==i)return e;const s=t.prototype,n=s&&Object.getPrototypeOf(s);if(null==n||n===Object.prototype)return e;const r=n.constructor;return"function"!=typeof r||r===t?e:r}t("defineMetadata",(function(t,e,i,s){if(!d(i))throw new TypeError;return n=t,a=e,void r(i,s,!0).set(n,a);var n,a})),t("hasMetadata",(function(t,e,i){if(!d(e))throw new TypeError;return h(i)||(i=p(i)),a(t,e,i)})),t("hasOwnMetadata",(function(t,e,i){if(!d(e))throw new TypeError;return h(i)||(i=p(i)),o(t,e,i)})),t("getMetadata",(function(t,e,i){if(!d(e))throw new TypeError;return h(i)||(i=p(i)),l(t,e,i)}))}((e=t,function(t,i){"function"!=typeof e[t]&&Object.defineProperty(e,t,{configurable:!0,writable:!0,value:i})})),t}({});function rt(t,e,i,s){!function(t,e,i,s){const n=[s];let r={};nt.hasOwnMetadata(t,e)&&(r=nt.getMetadata(t,e));let a=r[i];void 0===a&&(a=[]),a.push(...n),r[i]=a,nt.defineMetadata(t,r,e)}(et,t,i.toString(),s)}function at(t){return(e,i,s)=>{rt(e,0,s,t)}}const ot=(lt=tt,t=>(e,i,s)=>at(new st(lt,t))(e,i,s));var lt;function ht(){return function(t){return nt.defineMetadata(it,null,t),t}}function ct(t){return at(new st(Q,t))}const dt="Singleton",ut="Transient",pt="ConstantValue",gt="DynamicValue",ft="Factory",mt="Function",yt="Instance",bt="Invalid";class vt{constructor(t,e){this.id=Z.GenAutoIncrementId(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=bt,this.constraint=t=>!0,this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.dynamicValue=null}clone(){const t=new vt(this.serviceIdentifier,this.scope);return t.activated=t.scope===dt&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.provider=this.provider,t.constraint=this.constraint,t.cache=this.cache,t}}class xt{getConstructorMetadata(t){return{compilerGeneratedMetadata:nt.getMetadata(it,t),userGeneratedMetadata:nt.getMetadata(et,t)||{}}}getPropertiesMetadata(t){throw new Error("暂未实现")}}const At=(_t=Q,t=>{const e=e=>{if(null==e)return!1;if(e.key===_t&&e.value===t)return!0;if(null==e.constructorArgsMetadata)return!1;const i=e.constructorArgsMetadata;for(let e=0;e<i.length;e++)if(i[e].key===_t&&i[e].value===t)return!0;return!1};return e.metaData=new st(_t,t),e});var _t;class St{constructor(t){this._binding=t}inRequestScope(){throw new Error("暂未实现")}inSingletonScope(){return this._binding.scope=dt,this}inTransientScope(){return this._binding.scope=ut,this}whenTargetNamed(t){return this._binding.constraint=At(t),this}}class Tt{constructor(t){this._binding=t}to(t){return this._binding.type=yt,this._binding.implementationType=t,new St(this._binding)}toSelf(){const t=this._binding.serviceIdentifier;return this.to(t)}toDynamicValue(t){return this._binding.type=gt,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new St(this._binding)}toConstantValue(t){return this._binding.type=pt,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=dt,new St(this._binding)}toFactory(t){return this._binding.type=ft,this._binding.factory=t,this._binding.scope=dt,new St(this._binding)}toService(t){this.toDynamicValue((e=>e.container.get(t)))}}const Bt=Symbol("ContributionProvider");class wt{constructor(t,e){this.serviceIdentifier=t,this.container=e}getContributions(){return this.caches||(this.caches=[],this.container&&this.container.isBound(this.serviceIdentifier)&&this.caches.push(...this.container.getAll(this.serviceIdentifier))),this.caches}}function Ct(t,e){t(Bt).toDynamicValue((t=>{let{container:i}=t;return new wt(e,i)})).inSingletonScope().whenTargetNamed(e)}class Mt{constructor(t,e){this._args=t,this.name=e,this.taps=[]}tap(t,e){this._tap("sync",t,e)}unTap(t,e){const i="string"==typeof t?t.trim():t.name;i&&(this.taps=this.taps.filter((t=>!(t.name===i&&(!e||t.fn===e)))))}_parseOptions(t,e,i){let s;if("string"==typeof e)s={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof s.name||""===s.name)throw new Error("Missing name for tap");return s=Object.assign({type:t,fn:i},s),s}_tap(t,e,i){this._insert(this._parseOptions(t,e,i))}_insert(t){let e;"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let i=0;"number"==typeof t.stage&&(i=t.stage);let s=this.taps.length;for(;s>0;){s--;const t=this.taps[s];this.taps[s+1]=t;const n=t.stage||0;if(e){if(e.has(t.name)){e.delete(t.name);continue}if(e.size>0)continue}if(!(n>i)){s++;break}}this.taps[s]=t}}class Pt extends Mt{call(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this.taps.map((t=>t.fn)).forEach((t=>t(...e)))}}const kt=new class{};var Ot,Rt,Lt,It;!function(t){t[t.estimate=0]="estimate",t[t.actualBounding=1]="actualBounding",t[t.fontBounding=2]="fontBounding"}(Ot||(Ot={})),function(t){t[t.INITIAL=0]="INITIAL",t[t.RUNNING=1]="RUNNING",t[t.PAUSE=2]="PAUSE"}(Rt||(Rt={})),function(t){t.wait="wait",t.from="from",t.to="to",t.customAnimate="customAnimate"}(Lt||(Lt={})),function(t){t[t.INITIAL=0]="INITIAL",t[t.RUNNING=1]="RUNNING",t[t.PAUSED=2]="PAUSED",t[t.END=3]="END"}(It||(It={}));const Et=i.tau-1e-8;class Dt{constructor(t){this.init(t)}init(t){this.bounds=t}arc(t,e,s,n,r,a){if(Math.abs(r-n)>Et)return this.bounds.add(t-s,e-s),void this.bounds.add(t+s,e+s);let o,l,h,c,d=1/0,u=-1/0,p=1/0,g=-1/0;function f(t){h=s*Math.cos(t),c=s*Math.sin(t),h<d&&(d=h),h>u&&(u=h),c<p&&(p=c),c>g&&(g=c)}if(f(n),f(r),r!==n)if((n%=i.tau)<0&&(n+=i.tau),(r%=i.tau)<0&&(r+=i.tau),r<n&&(a=!a,o=n,n=r,r=o),a)for(r-=i.tau,o=n-n%i.halfPi,l=0;l<4&&o>r;++l,o-=i.halfPi)f(o);else for(o=n-n%i.halfPi+i.halfPi,l=0;l<4&&o<r;++l,o+=i.halfPi)f(o);this.bounds.add(t+d,e+p),this.bounds.add(t+u,e+g)}arcTo(t,e,i,s,n){this.bounds.add(t,e)}bezierCurveTo(t,e,i,s,n,r){this.bounds.add(t,e),this.bounds.add(i,s),this.bounds.add(n,r)}closePath(){}ellipse(){throw new Error("不支持ellipse")}lineTo(t,e){this.bounds.add(t,e)}moveTo(t,e){this.bounds.add(t,e)}quadraticCurveTo(t,e,i,s){this.bounds.add(t,e),this.bounds.add(i,s)}rect(t,e,i,s){this.bounds.add(t,e),this.bounds.add(t+i,e+s)}clear(){this.bounds.clear()}release(){}}class jt{constructor(){this._curves=[],this.bounds=new i.AABBBounds}get curves(){return this._curves}getCurveLengths(){return this._curves.map((t=>t.getLength()))}getPointAt(t){return{x:0,y:0}}getLength(){return 0}getBounds(){return this.bounds}}const Ut=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,Ft={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7},Nt={A:0,AT:1,C:2,Z:3,E:4,L:5,M:6,Q:7,R:8};let Wt,zt,Gt,Vt,Ht,Xt;var Yt,Kt,$t,qt,Zt,Jt;function Qt(t){const e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],l=t[7],h=l*r,c=-o*a,d=o*r,u=l*a,p=Math.cos(s),g=Math.sin(s),f=Math.cos(n),m=Math.sin(n),y=.5*(n-s),b=Math.sin(.5*y),v=8/3*b*b/Math.sin(y),x=e+p-v*g,A=i+g+v*p,_=e+f,S=i+m,T=_+v*m,B=S-v*f;return[h*x+c*A,d*x+u*A,h*T+c*B,d*T+u*B,h*_+c*S,d*_+u*S]}function te(t,e,s,n){const r=function(t,e,s,n,r,a,o,l,h){const c=i.degreeToRadian(o),d=Math.sin(c),u=Math.cos(c),p=u*(l-t)*.5+d*(h-e)*.5,g=u*(h-e)*.5-d*(l-t)*.5;let f=p*p/((s=Math.abs(s))*s)+g*g/((n=Math.abs(n))*n);f>1&&(f=Math.sqrt(f),s*=f,n*=f);const m=u/s,y=d/s,b=-d/n,v=u/n,x=m*l+y*h,A=b*l+v*h,_=m*t+y*e,S=b*t+v*e;let T=1/((_-x)*(_-x)+(S-A)*(S-A))-.25;T<0&&(T=0);let B=Math.sqrt(T);a===r&&(B=-B);const w=.5*(x+_)-B*(S-A),C=.5*(A+S)+B*(_-x),M=Math.atan2(A-C,x-w);let P=Math.atan2(S-C,_-w)-M;P<0&&1===a?P+=i.tau:P>0&&0===a&&(P-=i.tau);const k=Math.ceil(Math.abs(P/(i.halfPi+.001))),O=[];for(let t=0;t<k;++t){const e=M+t*P/k,i=M+(t+1)*P/k;O[t]=[w,C,e,i,s,n,d,u]}return O}(n[5],n[6],n[0],n[1],n[3],n[4],n[2],e,s);for(let e=0;e<r.length;++e){const i=Qt(r[e]);t.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5])}}!function(t){t[t.NONE=0]="NONE",t[t.UPDATE_BOUNDS=1]="UPDATE_BOUNDS",t[t.UPDATE_SHAPE=2]="UPDATE_SHAPE",t[t.CLEAR_SHAPE=253]="CLEAR_SHAPE",t[t.UPDATE_SHAPE_AND_BOUNDS=3]="UPDATE_SHAPE_AND_BOUNDS",t[t.INIT=179]="INIT",t[t.CLEAR_BOUNDS=254]="CLEAR_BOUNDS",t[t.UPDATE_GLOBAL_MATRIX=32]="UPDATE_GLOBAL_MATRIX",t[t.CLEAR_GLOBAL_MATRIX=223]="CLEAR_GLOBAL_MATRIX",t[t.UPDATE_LOCAL_MATRIX=16]="UPDATE_LOCAL_MATRIX",t[t.CLEAR_LOCAL_MATRIX=239]="CLEAR_LOCAL_MATRIX",t[t.UPDATE_GLOBAL_LOCAL_MATRIX=48]="UPDATE_GLOBAL_LOCAL_MATRIX",t[t.UPDATE_LAYOUT=128]="UPDATE_LAYOUT",t[t.CLEAR_LAYOUT=127]="CLEAR_LAYOUT"}(Yt||(Yt={})),function(t){t[t.GLOBAL=1]="GLOBAL",t[t.LOCAL=16]="LOCAL",t[t.GLOBAL_ACCURATE=3]="GLOBAL_ACCURATE",t[t.LOCAL_ACCURATE=48]="LOCAL_ACCURATE"}(Kt||(Kt={})),function(t){t[t.INIT=0]="INIT",t[t.DEFAULT=1]="DEFAULT",t[t.STATE=2]="STATE",t[t.ANIMATE_BIND=10]="ANIMATE_BIND",t[t.ANIMATE_PLAY=11]="ANIMATE_PLAY",t[t.ANIMATE_START=12]="ANIMATE_START",t[t.ANIMATE_UPDATE=13]="ANIMATE_UPDATE",t[t.ANIMATE_END=14]="ANIMATE_END",t[t.TRANSLATE=20]="TRANSLATE",t[t.TRANSLATE_TO=21]="TRANSLATE_TO",t[t.SCALE=22]="SCALE",t[t.SCALE_TO=23]="SCALE_TO",t[t.ROTATE=24]="ROTATE",t[t.ROTATE_TO=25]="ROTATE_TO"}($t||($t={})),function(t){t[t.ROW=1]="ROW",t[t.COLUMN=2]="COLUMN"}(qt||(qt={})),function(t){t[t.CubicBezierCurve=0]="CubicBezierCurve",t[t.QuadraticBezierCurve=1]="QuadraticBezierCurve",t[t.ArcCurve=2]="ArcCurve",t[t.LineCurve=3]="LineCurve",t[t.EllipseCurve=4]="EllipseCurve",t[t.MoveCurve=5]="MoveCurve"}(Zt||(Zt={})),function(t){t[t.beforeFillStroke=0]="beforeFillStroke",t[t.afterFillStroke=1]="afterFillStroke"}(Jt||(Jt={}));const ee=[(t,e,i,s,n,r,a)=>e.arc(t[1]*n+i,t[2]*r+s,t[3]*(n+r)/2,t[4],t[5],t[6],a),(t,e,i,s,n,r,a)=>e.arcTo(t[1]*n+i,t[2]*r+s,t[3]*n+i,t[4]*r+s,t[5]*(n+r)/2,a),(t,e,i,s,n,r,a)=>e.bezierCurveTo(t[1]*n+i,t[2]*r+s,t[3]*n+i,t[4]*r+s,t[5]*n+i,t[6]*r+s,a),(t,e,i,s)=>e.closePath(),(t,e,i,s,n,r)=>e.ellipse(t[1]*n+i,t[2]*r+s,t[3]*n,t[4]*r,t[5],t[6],t[7],t[8]),(t,e,i,s,n,r,a)=>e.lineTo(t[1]*n+i,t[2]*r+s,a),(t,e,i,s,n,r,a)=>e.moveTo(t[1]*n+i,t[2]*r+s,a),(t,e,i,s,n,r,a)=>e.quadraticCurveTo(t[1]*n+i,t[2]*r+s,t[3]*n+i,t[4]*r+s,a),(t,e,i,s,n,r,a)=>e.rect(t[1]*n+i,t[2]*r+s,t[3]*n,t[4]*r,a)];function ie(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,a=arguments.length>6?arguments[6]:void 0;for(let o=0;o<t.length;o++){const l=t[o];ee[l[0]](l,e,i,s,n,r,a)}}class se{getLength(t){return null!=t?this.calcProjLength(t):(Number.isFinite(this.length)||(this.length=this.calcLength()),this.length)}}function ne(t,e){let s=0;const n=t.length;for(let r=0;r<n;r++){const a=t[r],o=e[r],l=t[(r+1)%n],h=e[(r+1)%n];s+=i.PointService.distanceNN(a,o,l,h)}return s/2}function re(t,e,i,s,n){const r=1-n;return r*r*r*t+3*e*n*r*r+3*i*n*n*r+s*n*n*n}function ae(t,e,s,n,r){const a=re(t.x,e.x,s.x,n.x,r),o=re(t.y,e.y,s.y,n.y,r);return new i.Point(a,o)}function oe(t,e,i,s){const n=1-s;return n*n*t+2*n*s*e+s*s*i}function le(t,e,s,n){const r=oe(t.x,e.x,s.x,n),a=oe(t.y,e.y,s.y,n);return new i.Point(r,a)}function he(t,e){const{p0:s,p1:n,p2:r,p3:a}=t,o=ae(s,n,r,a,e),l=i.PointService.pointAtPP(s,n,e),h=i.PointService.pointAtPP(n,r,e),c=i.PointService.pointAtPP(r,a,e),d=i.PointService.pointAtPP(l,h,e),u=i.PointService.pointAtPP(h,c,e);return[new ce(s,l,d,o),new ce(o,u,c,a)]}class ce extends se{constructor(t,e,i,s){super(),this.type=Zt.CubicBezierCurve,this.p0=t,this.p1=e,this.p2=i,this.p3=s}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y+this.p3.x+this.p3.y)}getPointAt(t){if(!1!==this.defined)return ae(this.p0,this.p1,this.p2,this.p3,t);throw new Error("defined为false的点不能getPointAt")}calcLength(){return this._validPoint()?(t=this.p0,e=this.p1,i=this.p2,s=this.p3,ne([t.x,e.x,i.x,s.x],[t.y,e.y,i.y,s.y])):60;var t,e,i,s}calcProjLength(t){return t===qt.ROW?i.abs(this.p0.x-this.p3.x):t===qt.COLUMN?i.abs(this.p0.y-this.p3.y):0}getAngleAt(t){const e=i.max(t-.01,0),s=i.min(t+.01,1),n=this.getPointAt(e),r=this.getPointAt(s);return i.atan2(r.y-n.y,r.x-n.x)}draw(t,e,i,s,n,r){if(t.moveTo(this.p0.x*s+e,this.p0.y*n+i),r>=1)t.bezierCurveTo(this.p1.x*s+e,this.p1.y*n+i,this.p2.x*s+e,this.p2.y*n+i,this.p3.x*s+e,this.p3.y*n+i);else if(r>0){const[a]=he(this,r);t.bezierCurveTo(a.p1.x*s+e,a.p1.y*n+i,a.p2.x*s+e,a.p2.y*n+i,a.p3.x*s+e,a.p3.y*n+i)}}includeX(t){const e=i.min(this.p0.x,this.p1.x,this.p2.x,this.p3.x),s=i.max(this.p0.x,this.p1.x,this.p2.x,this.p3.x);return t>=e&&t<=s}getYAt(t){const e=i.min(this.p0.x,this.p1.x,this.p2.x,this.p3.x),s=(t-e)/(i.max(this.p0.x,this.p1.x,this.p2.x,this.p3.x)-e);return this.getPointAt(s).y}}class de extends se{constructor(t,e){super(),this.type=Zt.LineCurve,this.p0=t,this.p1=e}getPointAt(t){if(!1!==this.defined)return i.PointService.pointAtPP(this.p0,this.p1,t);throw new Error("defined为false的点不能getPointAt")}getAngleAt(t){return null==this.angle&&(this.angle=i.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)),this.angle}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y)}calcLength(){return this._validPoint()?i.PointService.distancePP(this.p0,this.p1):60}calcProjLength(t){return t===qt.ROW?i.abs(this.p0.x-this.p1.x):t===qt.COLUMN?i.abs(this.p0.y-this.p1.y):0}draw(t,e,i,s,n,r){if(t.moveTo(this.p0.x*s+e,this.p0.y*n+i),r>=1)t.lineTo(this.p1.x*s+e,this.p1.y*n+i);else if(r>0){const a=this.getPointAt(r);t.lineTo(a.x*s+e,a.y*n+i)}}includeX(t){return t>=this.p0.x&&t<=this.p1.x||t>=this.p1.x&&t<=this.p0.x}getYAt(t){if(this.includeX(t)){let e=this.p0,i=this.p1;this.p0.x>this.p1.x&&(e=this.p1,i=this.p0);const s=(t-e.x)/(i.x-e.x);return e.y+s*(i.y-e.y)}return 1/0}}class ue{get endX(){return this._lastX}get endY(){return this._lastY}constructor(t,e){this.init(t,e)}init(t,e){this._lastX=this._lastY=this._startX=this._startY=0,this.curveType=t,this.direction=e,this.curves=[]}bezierCurveTo(t,e,s,n,r,a,o,l){const h=new ce(new i.Point(this._lastX,this._lastY),new i.Point(t,e),new i.Point(s,n),new i.Point(r,a));h.originP1=this._lastOriginP,h.originP2=l,h.defined=o,this.curves.push(h),this._lastX=r,this._lastY=a,this._lastOriginP=l}closePath(){if(this.curves.length<2)return;const t=this.curves[this.curves.length-1];this.lineTo(this._startX,this._startY,t.defined,this._startOriginP)}ellipse(){throw new Error("SegContext不支持调用ellipse")}lineTo(t,e,i,s){const n=this.addLinearCurve(t,e,i,this._lastOriginP,s);this.curves.push(n),this._lastX=t,this._lastY=e,this._lastOriginP=s}moveTo(t,e,i){return this._lastX=this._startX=t,this._lastY=this._startY=e,this._lastOriginP=i,this._startOriginP=i,this}quadraticCurveTo(t,e,i,s){throw new Error("SegContext不支持调用quadraticCurveTo")}clear(){this.curves=[],this.length=NaN}tryUpdateLength(t){return this.getLength(t)}addLinearCurve(t,e,s,n,r){const a=new de(new i.Point(this._lastX,this._lastY),new i.Point(t,e));return a.originP1=n,a.originP2=r,a.defined=s,a}getPointAt(t){throw new Error("暂未实现")}getCurveLengths(){return[]}getLength(t){var e,s;if(t===qt.COLUMN){if(!this.curves.length)return 0;const t=this.curves[0],s=this.curves[this.curves.length-1],n=null!==(e=s.p3)&&void 0!==e?e:s.p1;return i.abs(t.p0.y-n.y)}if(t===qt.ROW){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1],n=null!==(s=e.p3)&&void 0!==s?s:e.p1;return i.abs(t.p0.x-n.x)}return Number.isFinite(this.length)||(this.length=this.curves.reduce(((t,e)=>t+e.getLength()),0)),this.length}}class pe extends ue{bezierCurveTo(t,e,i,s,n,r,a,o){return super.bezierCurveTo(e,t,s,i,r,n,a,o)}lineTo(t,e,i,s){return super.lineTo(e,t,i,s)}moveTo(t,e,i){return super.moveTo(e,t,i)}clear(){return super.clear()}}function ge(t,e){let i=!1;for(let s=0,n=e.length;s<=n;s++)s>=n===i&&((i=!i)?t.lineStart():t.lineEnd()),i&&t.point(e[s])}function fe(t,e,s){const n=null!=e?e:i.abs(s[s.length-1].x-s[0].x)>i.abs(s[s.length-1].y-s[0].y)?qt.ROW:qt.COLUMN;return"monotoneY"===t?new pe(t,n):new ue(t,n)}class me{constructor(t,e){this.context=t,e&&(this.startPoint=e)}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;default:this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t)}this._lastDefined=t.defined}tryUpdateLength(){return this.context.tryUpdateLength()}}function ye(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;const n=fe("linear",i,t);return function(t,e){ge(t,e)}(new me(n,s),t),n}function be(t,e,i,s,n){t.context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6,s,t.lastPoint1)}class ve{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){2===this._point&&be(this,6*this._x1-(this._x0+4*this._x1),6*this._y1-(this._y0+4*this._y1),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;break;default:be(this,e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=i,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}function xe(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;if(t.length<3-Number(!!s))return ye(t,e);const n=fe("basis",i,t);return function(t,e){ge(t,e)}(new ve(n,s),t),n}function Ae(t){return t<0?-1:1}function _e(t,e,i){const s=t._x1-t._x0,n=e-t._x1,r=(t._y1-t._y0)/(s||Number(n<0&&-0)),a=(i-t._y1)/(n||Number(s<0&&-0)),o=(r*n+a*s)/(s+n);return(Ae(r)+Ae(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(o))||0}function Se(t,e){const i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function Te(t,e,i,s,n){const r=t._x0,a=t._y0,o=t._x1,l=t._y1,h=(o-r)/3;t.context.bezierCurveTo(r+h,a+h*e,o-h,l-h*i,o,l,s,t.lastPoint1)}class Be{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x1,this._y1,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:Te(this,this._t0,Se(this,this._t0),!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1)}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){let e=NaN;const i=t.x,s=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(i,s,!1!==this._lastDefined1&&!1!==this._lastDefined2,t):this.context.moveTo(i,s,t);break;case 1:this._point=2;break;case 2:this._point=3,Te(this,Se(this,e=_e(this,i,s)),e,!1!==this._lastDefined1&&!1!==this._lastDefined2);break;default:Te(this,this._t0,e=_e(this,i,s),!1!==this._lastDefined1&&!1!==this._lastDefined2)}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=s,this._t0=e,this._lastDefined1=this._lastDefined2,this._lastDefined2=!1!==t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}class we extends Be{constructor(t,e){super(t,e)}point(t){return super.point({y:t.x,x:t.y,defined:t.defined})}}function Ce(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;if(t.length<3-Number(!!s))return ye(t,e);const n=fe("monotoneX",i,t);return function(t,e){ge(t,e)}(new Be(n,s),t),n}function Me(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;if(t.length<3-Number(!!s))return ye(t,e);const n=fe("monotoneY",i,t);return function(t,e){ge(t,e)}(new we(n,s),t),n}let Pe=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=arguments.length>2?arguments[2]:void 0;this.context=t,this._t=e,this.startPoint=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x=this._y=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){0<this._t&&this._t<1&&2===this._point&&this.context.lineTo(this._x,this._y,!1!==this._lastDefined,this.lastPoint),(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)}point(t){const e=t.x,i=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t):this.context.moveTo(e,i,t);break;case 1:this._point=2;default:if(this._t<=0)this.context.lineTo(this._x,i,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(e,i,!1!==this._lastDefined&&!1!==t.defined,t);else{const s=this._x*(1-this._t)+e*this._t;.5===this._t?this.context.lineTo(s,this._y,!1!==this._lastDefined,this.lastPoint):this.context.lineTo(s,this._y,!1!==this._lastDefined&&!1!==t.defined,this.lastPoint),this.context.lineTo(s,i,!1!==this._lastDefined&&!1!==t.defined,t)}}this._lastDefined=t.defined,this._x=e,this._y=i,this.lastPoint=t}tryUpdateLength(){return this.context.tryUpdateLength()}};class ke extends Pe{lineEnd(){this.context.closePath()}}function Oe(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:n,startPoint:r}=s;if(t.length<2-Number(!!r))return null;const a=new ue("step",null!=n?n:i.abs(t[t.length-1].x-t[0].x)>i.abs(t[t.length-1].y-t[0].y)?qt.ROW:qt.COLUMN);return Re(new Pe(a,e,r),t),a}function Re(t,e){return ge(t,e)}class Le extends me{lineEnd(){this.context.closePath()}}function Ie(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{direction:i,startPoint:s}=e;if(t.length<2-Number(!!s))return null;const n=fe("linear",i,t);return function(t,e){ge(t,e)}(new Le(n,s),t),n}function Ee(t,e,s,n,r){let a=t._x1,o=t._y1,l=t._x2,h=t._y2;if(t._l01_a>i.epsilon){const e=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);a=(a*e-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*e-t._y0*t._l12_2a+t._y2*t._l01_2a)/i}if(t._l23_a>i.epsilon){const i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,n=3*t._l23_a*(t._l23_a+t._l12_a);l=(l*i+t._x1*t._l23_2a-e*t._l12_2a)/n,h=(h*i+t._y1*t._l23_2a-s*t._l12_2a)/n}t.context.bezierCurveTo(a,o,l,h,t._x2,t._y2,n,t.lastPoint1)}function De(t,e){return function(i,s){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:r,startPoint:a}=n;if(i.length<2-Number(!!a))return null;if(i.length<3-Number(!!a))return ye(i,n);const o=fe(t,r,i);return ge(new e(o,s,a),i),o}}const je=De("catmullRom",class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=arguments.length>2?arguments[2]:void 0;this.context=t,this.startPoint=i,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){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(){switch(this._point){case 2:this.context.lineTo(this._x2,this._y2,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1);break;case 3:this.point({x:this._x2,y:this._y2})}(this._line||0!==this._line&&1===this._point)&&this.context.closePath(),this._line=1-this._line}point(t){const{x:e,y:i}=t;if(this._point){const t=this._x2-e,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(t*t+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2):this.context.moveTo(e,i);break;case 1:this._point=2;break;case 2:this._point=3;default:Ee(this,e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=i,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}});const Ue=De("catmullRomClosed",class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=arguments.length>2?arguments[2]:void 0;this.context=t,this.startPoint=i,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){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(){switch(this._point){case 1:this.context.moveTo(this._x3,this._y3,this.lastPoint1),this.context.closePath();break;case 2:this.context.lineTo(this._x3,this._y3,!1!==this._lastDefined1&&!1!==this._lastDefined2,this.lastPoint1),this.context.closePath();break;case 3:this.point({x:this._x3,y:this._y3}),this.point({x:this._x4,y:this._y4}),this.point({x:this._x5,y:this._y5})}}point(t){const{x:e,y:i}=t;if(this._point){const t=this._x2-e,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(t*t+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=i;break;case 1:this._point=2,this.context.moveTo(this._x4=e,this._y4=i,t);break;case 2:this._point=3,this._x5=e,this._y5=i;break;default:Ee(this,e,i,!1!==this._lastDefined1&&!1!==this._lastDefined2)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=i,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}});class Fe extends se{constructor(t,e,i){super(),this.type=Zt.QuadraticBezierCurve,this.p0=t,this.p1=e,this.p2=i}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y)}getPointAt(t){if(!1!==this.defined)return le(this.p0,this.p1,this.p2,t);throw new Error("defined为false的点不能getPointAt")}calcLength(){return this._validPoint()?(t=this.p0,e=this.p1,i=this.p2,ne([t.x,e.x,i.x],[t.y,e.y,i.y])):60;var t,e,i}calcProjLength(t){return t===qt.ROW?i.abs(this.p0.x-this.p2.x):t===qt.COLUMN?i.abs(this.p0.y-this.p2.y):0}getAngleAt(t){const e=i.max(t-.01,0),s=i.min(t+.01,1),n=this.getPointAt(e),r=this.getPointAt(s);return i.atan2(r.y-n.y,r.x-n.x)}draw(t,e,s,n,r,a){if(t.moveTo(this.p0.x*n+e,this.p0.y*r+s),a>=1)t.quadraticCurveTo(this.p1.x*n+e,this.p1.y*r+s,this.p2.x*n+e,this.p2.y*r+s);else if(a>0){const[o]=function(t,e){const{p0:s,p1:n,p2:r}=t,a=le(s,n,r,e),o=i.PointService.pointAtPP(s,n,e),l=i.PointService.pointAtPP(n,r,e);return[new Fe(s,o,a),new Fe(a,l,r)]}(this,a);t.quadraticCurveTo(o.p1.x*n+e,o.p1.y*r+s,o.p2.x*n+e,o.p2.y*r+s)}}getYAt(t){throw new Error("QuadraticBezierCurve暂不支持getYAt")}includeX(t){throw new Error("QuadraticBezierCurve暂不支持includeX")}}class Ne{constructor(t){this.path=t,this._lastX=this._lastY=this._startX=this._startY=0}moveTo(t,e){return this._lastX=this._startX=t,this._lastY=this._startY=e,this}lineTo(t,e){const i=this.addLinearCurve(t,e);this.path.addCurve(i),this._lastX=t,this._lastY=e}addLinearCurve(t,e){return new de(new i.Point(this._lastX,this._lastY),new i.Point(t,e))}quadraticCurveTo(t,e,s,n){const r=new Fe(new i.Point(this._lastX,this._lastY),new i.Point(t,e),new i.Point(s,n));this.path.addCurve(r),this._lastX=s,this._lastY=n}bezierCurveTo(t,e,s,n,r,a){const o=new ce(new i.Point(this._lastX,this._lastY),new i.Point(t,e),new i.Point(s,n),new i.Point(r,a));this.path.addCurve(o),this._lastX=r,this._lastY=a}arcTo(t,e,i,s,n){throw new Error("CurveContext不支持调用arcTo")}ellipse(t,e,i,s,n,r,a,o){throw new Error("CurveContext不支持调用ellipse")}rect(t,e,i,s){throw new Error("CurveContext不支持调用rect")}arc(t,e,i,s,n,r){throw new Error("CurveContext不支持调用arc")}closePath(){this.path.curves.length<2||this.lineTo(this._startX,this._startY)}}function We(t,e,s){var n,r;switch(e){case"linear":default:return ye(t,s);case"basis":return xe(t,s);case"monotoneX":return Ce(t,s);case"monotoneY":return Me(t,s);case"step":return Oe(t,.5,s);case"stepClosed":return function(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{direction:n,startPoint:r}=s;if(t.length<2-Number(!!r))return null;const a=new ue("step",null!=n?n:i.abs(t[t.length-1].x-t[0].x)>i.abs(t[t.length-1].y-t[0].y)?qt.ROW:qt.COLUMN);return Re(new ke(a,e,r),t),a}(t,.5,s);case"stepBefore":return Oe(t,0,s);case"stepAfter":return Oe(t,1,s);case"catmullRom":return je(t,null!==(n=null==s?void 0:s.curveTension)&&void 0!==n?n:.5,s);case"catmullRomClosed":return Ue(t,null!==(r=null==s?void 0:s.curveTension)&&void 0!==r?r:.5,s);case"linearClosed":return Ie(t,s)}}class ze extends jt{constructor(t){super(),this.commandList=[],t&&(this._ctx=t),this._boundsContext=new Dt(this.bounds)}get curves(){return this.tryBuildCurves()}setCtx(t){this._ctx=t}moveTo(t,e){return this.commandList.push([Nt.M,t,e]),this._ctx&&this._ctx.moveTo(t,e),this}lineTo(t,e){return this.commandList.push([Nt.L,t,e]),this._ctx&&this._ctx.lineTo(t,e),this}quadraticCurveTo(t,e,i,s){return this.commandList.push([Nt.Q,t,e,i,s]),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,n,r){return this.commandList.push([Nt.C,t,e,i,s,n,r]),this._ctx&&this._ctx.bezierCurveTo(t,e,i,s,n,r),this}arcTo(t,e,i,s,n){return this.commandList.push([Nt.AT,t,e,i,s,n]),this._ctx&&this._ctx.arcTo(t,e,i,s,n),this}ellipse(t,e,i,s,n,r,a,o){return this.commandList.push([Nt.E,t,e,i,s,n,r,a,o]),this._ctx&&this._ctx.ellipse(t,e,i,s,n,r,a,o),this}rect(t,e,i,s){return this.commandList.push([Nt.R,t,e,i,s]),this._ctx&&this._ctx.rect(t,e,i,s),this}arc(t,e,i,s,n,r){return this.commandList.push([Nt.A,t,e,i,s,n,r]),this._ctx&&this._ctx.arc(t,e,i,s,n,r),this}closePath(){return this.commandList.push([Nt.Z]),this._ctx&&this._ctx.closePath(),this}addCurve(t){this._curves.push(t)}clear(){this.transformCbList=null,this.commandList.length=0,this._curves.length=0}beginPath(){this.clear()}tryBuildCurves(){if(!this._curves||!this._curves.length){const t=new Ne(this);ie(this.commandList,t,0,0,1,1)}return this._curves}toString(){if(!this.toStringCbList){const t=[];t[Nt.M]=t=>`M${t[1]} ${t[2]}`,t[Nt.L]=t=>`L${t[1]} ${t[2]}`,t[Nt.Q]=t=>`Q${t[1]} ${t[2]} ${t[3]} ${t[4]}`,t[Nt.C]=t=>`C${t[1]} ${t[2]} ${t[3]} ${t[4]} ${t[5]} ${t[6]}`,t[Nt.A]=t=>{const e=[],i=t[1],s=t[2],n=t[3];!function(t,e,i,s,n,r,a){let o=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const l=2*Math.PI,h=(e%l+l)%l;let c,d=(i%l+l)%l;o?(d>=h&&(d-=l),c=d-h):(d<=h&&(d+=l),c=d-h);const u=Math.ceil(Math.abs(c)/(.5*Math.PI)),p=c/u;for(let e=0;e<u;e++){const i=h+p*e,l=h+p*(e+1),c=4/3*Math.tan(Math.abs(p)/4),d=Math.cos(i),u=Math.sin(i),g=Math.cos(l),f=Math.sin(l),m=d*r+s,y=u*a+n,b=g*r+s,v=f*a+n,x=o?-1:1,A=r*c*x,_=a*c*x;t.push(m-A*u,y+_*d,b+A*f,v-_*g,b,v)}}(e,t[4],t[5],i,s,n,n,t[6]);let r="";for(let t=0;t<e.length;t+=6)r+=`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`;return r},t[Nt.R]=t=>`M${t[1]} ${t[2]} h${t[3]} v${t[4]} H${t[1]}Z`,t[Nt.Z]=t=>"Z",this.toStringCbList=t}const t=this.toStringCbList;let e="";return this.commandList.forEach((i=>{e+=t[i[0]](i)})),e}fromString(t,e,i,s,n){this.clear();const r=function(t){if(!t)return[];const e=t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);if(null===e)return[];let i,s;const n=[];for(let t=0,r=e.length;t<r;t++)if(Wt=e[t],zt=Wt.slice(1),Gt=Wt[0],i=[Gt],s=zt.match(Ut),null!==s){for(let t=0,e=s.length;t<e;t++)Vt=s[t],Ht=parseFloat(Vt),Number.isNaN(Ht)||i.push(Ht);if(Xt=Ft[Gt],i.length-1>Xt){let t,e=Gt;for(let s=1,r=i.length;s<r;s+=Xt){t=[e];for(let e=s,n=s+Xt;e<n;e++)t.push(i[e]);n.push(t),"m"===e?e="l":"M"===e&&(e="L")}}else n.push(i)}else n.push(i);return n}(t);return this._runCommandStrList(r,e,i,s,n),this._updateBounds(),this}fromLine(t){const{points:e,curveType:i,clipRangeByDimension:s}=t.attribute;if(!e)return;const n=We(e,i);"x"===s?this.direction=qt.ROW:"y"===s?this.direction=qt.COLUMN:"auto"===s&&(this.direction=n.direction),this._curves=n.curves}fromCustomPath2D(t,e,i,s,n){return this.clear(),this._runCommandList(t.commandList,e,i,s,n),this._updateBounds(),this}transform(t,e,i,s){const n=this.commandList;if(!this.transformCbList){const t=[];t[Nt.M]=this.moveToTransform,t[Nt.L]=this.lineToTransform,t[Nt.Q]=this.quadraticCurveToTransform,t[Nt.C]=this.bezierCurveToTransform,t[Nt.AT]=this.arcToTransform,t[Nt.E]=this.ellipseTransform,t[Nt.R]=this.rectTransform,t[Nt.A]=this.arcTransform,t[Nt.Z]=this.closePathTransform,this.transformCbList=t}n.forEach((n=>{this.transformCbList[n[0]](n,t,e,i,s)})),this._updateBounds()}moveToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i}lineToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i}quadraticCurveToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s+e,t[4]=t[4]*n+i}bezierCurveToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s+e,t[4]=t[4]*n+i,t[5]=t[5]*s+e,t[6]=t[6]*n+i}arcToTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s+e,t[4]=t[4]*n+i,t[5]=t[5]*(s+n)/2}ellipseTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s,t[4]=t[4]*n}rectTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*s,t[4]=t[4]*n}arcTransform(t,e,i,s,n){t[1]=t[1]*s+e,t[2]=t[2]*n+i,t[3]=t[3]*(s+n)/2}closePathTransform(){}_runCommandStrList(t){let e,i,s,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,c=null,d=0,u=0,p=0,g=0;for(let f=0,m=t.length;f<m;++f){switch(e=t[f],1===l&&1===h||(e=Ve(e,l,h)),e[0]){case"l":d+=e[1],u+=e[2],this.lineTo(d+a,u+o);break;case"L":d=e[1],u=e[2],this.lineTo(d+a,u+o);break;case"h":d+=e[1],this.lineTo(d+a,u+o);break;case"H":d=e[1],this.lineTo(d+a,u+o);break;case"v":u+=e[1],this.lineTo(d+a,u+o);break;case"V":u=e[1],this.lineTo(d+a,u+o);break;case"m":d+=e[1],u+=e[2],this.moveTo(d+a,u+o);break;case"M":d=e[1],u=e[2],this.moveTo(d+a,u+o);break;case"c":i=d+e[5],s=u+e[6],p=d+e[3],g=u+e[4],this.bezierCurveTo(d+e[1]+a,u+e[2]+o,p+a,g+o,i+a,s+o),d=i,u=s;break;case"C":d=e[5],u=e[6],p=e[3],g=e[4],this.bezierCurveTo(e[1]+a,e[2]+o,p+a,g+o,d+a,u+o);break;case"s":i=d+e[3],s=u+e[4],null===c[0].match(/[CcSs]/)?(p=d,g=u):(p=2*d-p,g=2*u-g),n=d+e[1],r=u+e[2],this.bezierCurveTo(p+a,g+o,n+a,r+o,i+a,s+o),p=n,g=r,d=i,u=s;break;case"S":i=e[3],s=e[4],null===c[0].match(/[CcSs]/)?(p=d,g=u):(p=2*d-p,g=2*u-g),n=e[1],r=e[2],this.bezierCurveTo(p+a,g+o,n+a,r+o,i+a,s+o),p=n,g=r,d=i,u=s;break;case"q":i=d+e[3],s=u+e[4],p=d+e[1],g=u+e[2],this.quadraticCurveTo(p+a,g+o,i+a,s+o),d=i,u=s;break;case"Q":i=e[3],s=e[4],this.quadraticCurveTo(e[1]+a,e[2]+o,i+a,s+o),d=i,u=s,p=e[1],g=e[2];break;case"t":i=d+e[1],s=u+e[2],null===c[0].match(/[QqTt]/)?(p=d,g=u):"t"===c[0]?(p=2*d-n,g=2*u-r):"q"===c[0]&&(p=2*d-p,g=2*u-g),n=p,r=g,this.quadraticCurveTo(p+a,g+o,i+a,s+o),d=i,u=s,p=d+e[1],g=u+e[2];break;case"T":i=e[1],s=e[2],p=2*d-p,g=2*u-g,this.quadraticCurveTo(p+a,g+o,i+a,s+o),d=i,u=s;break;case"a":te(this,d+a,u+o,[e[1],e[2],e[3],e[4],e[5],e[6]+d+a,e[7]+u+o]),d+=e[6],u+=e[7];break;case"A":te(this,d+a,u+o,[e[1],e[2],e[3],e[4],e[5],e[6]+a,e[7]+o]),d=e[6],u=e[7];break;case"z":case"Z":this.closePath()}c=e}}_runCommandList(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if(0!==e||0!==i||1!==s||1!==n)for(let r=0,a=t.length;r<a;++r){const a=t[r].slice();switch(a[0]){case Nt.L:this.lineToTransform(a,e,i,s,n);break;case Nt.M:this.moveToTransform(a,e,i,s,n);break;case Nt.C:this.bezierCurveToTransform(a,e,i,s,n);break;case Nt.Q:this.quadraticCurveToTransform(a,e,i,s,n);break;case Nt.A:this.arcToTransform(a,e,i,s,n);break;case Nt.E:this.ellipseTransform(a,e,i,s,n);break;case Nt.R:this.rectTransform(a,e,i,s,n);break;case Nt.AT:this.arcToTransform(a,e,i,s,n);break;case Nt.Z:this.closePath()}}else this.commandList=t.map((t=>t.slice()))}_updateBounds(){this.bounds.clear(),ie(this.commandList,this._boundsContext)}release(){this.commandList=[],this._boundsContext=null,this._ctx=null}getLength(){if(this.direction===qt.COLUMN){if(!this._curves.length)return 0;const t=this._curves[0],e=this._curves[this._curves.length-1];return i.abs(t.p0.y-e.p1.y)}if(this.direction===qt.ROW){if(!this._curves.length)return 0;const t=this._curves[0],e=this._curves[this._curves.length-1];return i.abs(t.p0.x-e.p1.x)}return this._curves.reduce(((t,e)=>t+e.getLength()),0)}getYAt(t){if(!this.curves)return 1/0;for(let e=0;e<this.curves.length;e++){const i=this.curves[e];if(i.includeX(t))return i.getYAt(t)}return 1/0}getAttrAt(t){if(!this._curves)return{pos:{x:0,y:0},angle:0};let e,i=0;for(let s=0;s<this._curves.length;s++){e=this._curves[s];const n=e.getLength(this.direction);if(i+n>=t)break;i+=n}const s=(t-i)/e.getLength(this.direction);return{pos:e.getPointAt(s),angle:e.getAngleAt(s)}}drawWithClipRange(t,e,i,s,n){this.tryBuildCurves();const r=this.getLength()*n;let a=0;for(let n=0;n<this._curves.length;n++){const o=this._curves[n],l=o.getLength(this.direction);if(!(a+l<=r)){const n=1-(a+l-r)/l;o.draw(t,i,s,e,e,n);break}o.draw(t,i,s,e,e,1),a+=l}}}const Ge=["l",0,0,0,0,0,0,0];function Ve(t,e,i){const s=Ge[0]=t[0];if("a"===s||"A"===s)Ge[1]=e*t[1],Ge[2]=i*t[2],Ge[3]=t[3],Ge[4]=t[4],Ge[5]=t[5],Ge[6]=e*t[6],Ge[7]=i*t[7];else if("h"===s||"H"===s)Ge[1]=e*t[1];else if("v"===s||"V"===s)Ge[1]=i*t[1];else for(let s=1,n=t.length;s<n;++s)Ge[s]=(s%2==1?e:i)*t[s];return Ge}const He={x:0,y:0,z:0,dx:0,dy:0,dz:0,scrollX:0,scrollY:0,scaleX:1,scaleY:1,scaleZ:1,angle:0,alpha:0,beta:0,scaleCenter:[0,0],anchor:[0,0],anchor3d:[0,0],postMatrix:new i.Matrix},Xe={strokeOpacity:1,lineDash:[],lineDashOffset:0,lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,strokeBoundsBuffer:2,stroke:!1},Ye=Object.assign({outerBorder:Object.assign(Object.assign({},Xe),{distance:0}),innerBorder:Object.assign(Object.assign({},Xe),{distance:0})},Xe),Ke={text:"",maxLineWidth:1/0,maxWidth:1/0,textAlign:"left",textBaseline:"alphabetic",fontSize:16,fontFamily:"PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",fontWeight:"",ellipsis:"…",fontVariant:"",fontStyle:"",lineHeight:void 0,underline:0,lineThrough:0,scaleIn3d:!1,direction:"horizontal",wordBreak:"break-all",ignoreBuf:!1,verticalMode:0,wrap:!1,whiteSpace:"no-wrap",heightLimit:1/0,lineClamp:1/0,suffixPosition:"end",underlineDash:[],underlineOffset:0,disableAutoClipedPoptip:void 0,measureMode:Ot.fontBounding,keepCenterInLine:!1},$e=Object.assign(Object.assign(Object.assign(Object.assign({forceBoundsWidth:void 0,forceBoundsHeight:void 0,opacity:1,background:null,autoAnimateTexture:!1,textureRatio:1,textureOptions:null,backgroundOpacity:1,backgroundCornerRadius:0,texture:null,textureColor:"black",textureSize:10,texturePadding:2,backgroundMode:"no-repeat",backgroundFit:!0,backgroundKeepAspectRatio:!1,backgroundClip:!0,backgroundScale:1,backgroundOffsetX:0,backgroundOffsetY:0,blur:0,filter:"",cursor:null,html:null,react:null,vue:null},{fillOpacity:1,fill:!1,shadowBlur:0,shadowColor:"black",shadowOffsetX:0,shadowOffsetY:0}),Ye),{alignSelf:"auto"}),{pickStrokeBuffer:0}),qe={connectedType:"none",connectedStyle:{},connectedX:NaN,connectedY:NaN},Ze=Object.assign(Object.assign(Object.assign({strokeSeg:null,renderable:!0,pickable:!0,shadowGraphic:void 0,childrenPickable:!0,fillPickable:!0,strokePickable:!0,visible:!0,zIndex:0,layout:null,boundsPadding:0,fillStrokeOrder:0,renderStyle:"default",pickMode:"accurate",customPickShape:null,boundsMode:"accurate",keepDirIn3d:!0,shadowRootIdx:1,globalZIndex:1,globalCompositeOperation:"",overflow:"hidden",shadowPickMode:"graphic",keepStrokeScale:!1,clipConfig:null,roughStyle:null},{_debug_bounds:!1}),$e),He),Je=Object.assign(Object.assign({},Ze),{startAngle:0,endAngle:i.pi2,innerRadius:0,outerRadius:1,innerPadding:0,outerPadding:0,cornerRadius:0,padRadius:0,padAngle:0,cap:!1,forceShowCap:!1}),Qe=Object.assign(Object.assign(Object.assign({},Ze),qe),{points:[],segments:[],curveType:"linear",clipRange:1,closePath:!1,curveTension:1}),ti=Object.assign(Object.assign({},Ze),{radius:1,startAngle:0,endAngle:i.pi2}),ei=Object.assign(Object.assign({},Ze),{width:0,height:0,cornerRadius:0,path:[],clip:!1,visibleAll:!0,display:"relative",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",alignContent:"flex-start",baseOpacity:1,cornerType:"round"}),ii=Object.assign(Object.assign({},Ze),{path:"",width:0,height:0,cornerRadius:0,clip:!1}),si=Object.assign(Object.assign(Object.assign({},Ze),qe),{points:[],segments:[],curveType:"linear",clipRange:1,clipRangeByDimension:"default",closePath:!1,curveTension:1}),ni=Object.assign(Object.assign({},Ze),{path:new ze,fillStrokeOrder:1,clipRange:1,customPath:()=>{i.Logger.getInstance().warn("空函数")}}),ri=Object.assign(Object.assign({},Ze),{points:[],cornerRadius:0,closePath:!0}),ai=Object.assign(Object.assign({},Ze),{width:100,height:100,spikes:5,thickness:.5}),oi=Object.assign(Object.assign({},Ze),{width:0,height:0,x1:0,y1:0,strokeBoundsBuffer:0,cornerRadius:0,cornerType:"round"});Object.assign(Object.assign({},Ze),{width:0,height:0,x1:0,y1:0,cornerRadius:0,length:0,cornerType:"round"});const li=Object.assign(Object.assign({},Ze),{symbolType:"circle",size:10,keepDirIn3d:!0,clipRange:1}),hi=Object.assign(Object.assign(Object.assign({},Ze),Ke),{strokeBoundsBuffer:0,keepDirIn3d:!0}),ci=Object.assign(Object.assign(Object.assign({},Ze),Ke),{upgradeAttrs:null,editable:!1,editOptions:null,ascentDescentMode:"actual",width:300,height:300,ellipsis:!0,wordBreak:"break-word",verticalDirection:"top",textAlign:"left",textBaseline:"top",layoutDirection:"horizontal",textConfig:[],disableAutoWrapLine:!1,maxHeight:void 0,maxWidth:void 0,singleLine:!1}),di=Object.assign(Object.assign({repeatX:"no-repeat",repeatY:"no-repeat",image:"",width:0,height:0,maxWidth:500,maxHeight:500},Ze),{fill:!0,cornerRadius:0,cornerType:"round"}),ui=Object.assign(Object.assign({},di),{backgroundShowMode:"never",backgroundWidth:0,backgroundHeight:0,textAlign:"left",textBaseline:"middle",direction:"horizontal",margin:0,id:"",width:20,height:20,backgroundFill:"rgba(101, 117, 168, 0.1)",backgroundFillOpacity:1,backgroundStroke:!1,backgroundStrokeOpacity:1,backgroundRadius:4,opacity:1}),pi=function(){const t={linearGradient:/^(linear\-gradient)/i,radialGradient:/^(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/,fromAngleValue:/^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/(^\#[0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,rgbaColor:/^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/};let e="";function i(t){const i=new Error(e+": "+t);throw i.source=e,i}function s(){return n("linear",t.linearGradient,r)||n("radial",t.radialGradient,o)||n("conic",t.conicGradient,a)}function n(e,s,n){return function(s,r){const a=y(s);if(a){y(t.startCall)||i("Missing (");const s=function(s){const r=n();return r&&(y(t.comma)||i("Missing comma before color stops")),{type:e,orientation:r,colorStops:u(p)}}();return y(t.endCall)||i("Missing )"),s}}(s)}function r(){return m("directional",t.sideOrCorner,1)||m("angular",t.angleValue,1)}function a(){return m("angular",t.fromAngleValue,1)}function o(){let i,s,n=l();return n&&(i=[],i.push(n),s=e,y(t.comma)&&(n=l(),n?i.push(n):e=s)),i}function l(){let t=function(){const t=m("shape",/^(circle)/i,0);return t&&(t.style=f()||h()),t}()||function(){const t=m("shape",/^(ellipse)/i,0);return t&&(t.style=g()||h()),t}();if(t)t.at=c();else{const e=h();if(e){t=e;const i=c();i&&(t.at=i)}else{const e=d();e&&(t={type:"default-radial",at:e})}}return t}function h(){return m("extent-keyword",t.extentKeywords,1)}function c(){if(m("position",/^at/,0)){const t=d();return t||i("Missing positioning value"),t}}function d(){const t={x:g(),y:g()};if(t.x||t.y)return{type:"position",value:t}}function u(e){let s=e();const n=[];if(s)for(n.push(s);y(t.comma);)s=e(),s?n.push(s):i("One extra comma");return n}function p(){const e=m("hex",t.hexColor,1)||m("rgba",t.rgbaColor,1)||m("rgb",t.rgbColor,1)||m("literal",t.literalColor,0);return e||i("Expected color definition"),e.length=g(),e}function g(){return m("%",t.percentageValue,1)||m("position-keyword",t.positionKeywords,1)||f()}function f(){return m("px",t.pixelValue,1)||m("em",t.emValue,1)}function m(t,e,i){const s=y(e);if(s)return{type:t,value:s[i]}}function y(t){const i=/^[\n\r\t\s]+/.exec(e);i&&b(i[0].length);const s=t.exec(e);return s&&b(s[0].length),s}function b(t){e=e.substr(t)}return function(t){return e=t.toString(),function(){const t=u(s);return e.length>0&&i("Invalid input not EOF"),t}()}}();class gi{static IsGradient(t){return!("string"==typeof t&&!t.includes("gradient"))}static IsGradientStr(t){return"string"==typeof t&&t.includes("gradient")}static Parse(t){if(gi.IsGradientStr(t))try{const e=pi(t)[0];if(e){if("linear"===e.type)return gi.ParseLinear(e);if("radial"===e.type)return gi.ParseRadial(e);if("conic"===e.type)return gi.ParseConic(e)}}catch(e){return t}return t}static ParseConic(t){const{orientation:e,colorStops:s=[]}=t,n=i.pi/2,r=parseFloat(e.value)/180*i.pi-n;return{gradient:"conical",x:.5,y:.5,startAngle:r,endAngle:r+i.pi2,stops:s.map((t=>({color:t.value,offset:parseFloat(t.length.value)/100})))}}static ParseRadial(t){const{colorStops:e=[]}=t;return{gradient:"radial",x0:.5,y0:.5,x1:.5,y1:.5,r0:0,r1:1,stops:e.map((t=>({color:t.value,offset:parseFloat(t.length.value)/100})))}}static ParseLinear(t){const{orientation:e,colorStops:s=[]}=t,n=i.pi/2;let r="angular"===e.type?parseFloat(e.value)/180*i.pi:0;for(;r<0;)r+=i.pi2;for(;r>=i.pi2;)r-=i.pi2;let a=0,o=0,l=0,h=0;return r<n?(a=0,o=1,l=Math.sin(r),h=o-Math.cos(r)):r<i.pi?(a=0,o=0,l=Math.cos(r-n),h=Math.sin(r-n)):r<i.pi+n?(a=1,o=0,l=a-Math.sin(r-i.pi),h=Math.cos(r-i.pi)):(a=1,l=a-Math.cos(r-n-i.pi),h-=Math.sin(r-n-i.pi)),{gradient:"linear",x0:a,y0:o,x1:l,y1:h,stops:s.map((t=>({color:t.value,offset:parseFloat(t.length.value)/100})))}}}function fi(t,e,i){let s=e;const{a:n,b:r,c:a,d:o}=t.currentMatrix,l=Math.sign(n)*Math.sqrt(n*n+r*r),h=Math.sign(o)*Math.sqrt(a*a+o*o);return l+h===0?0:(s=s/Math.abs(l+h)*2*i,s)}function mi(t,e,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;var a,o,l,h;if(!e||!0===e)return"black";let c,d;if(i.isArray(e))for(let t=0;t<e.length&&(d=e[t],!d);t++);else d=e;if(d=gi.Parse(d),"string"==typeof d)return d;if(s.AABBBounds&&(!s.attribute||0!==s.attribute.scaleX||0!==s.attribute.scaleY)){const e=s.AABBBounds;let i=e.x2-e.x1,u=e.y2-e.y1,p=e.x1-n,g=e.y1-r;if(s.attribute){const{scaleX:t=1,scaleY:e=1,angle:n=0}=s.attribute;i/=t,u/=e,p/=t,g/=e,(n||1!==t||1!==e)&&(p=null!==(a=s.x1WithoutTransform)&&void 0!==a?a:0,g=null!==(o=s.y1WithoutTransform)&&void 0!==o?o:0,i=null!==(l=s.widthWithoutTransform)&&void 0!==l?l:i,u=null!==(h=s.heightWithoutTransform)&&void 0!==h?h:u)}"linear"===d.gradient?c=function(t,e,i,s,n,r){var a,o,l,h;const c=t.createLinearGradient(i+(null!==(a=e.x0)&&void 0!==a?a:0)*n,s+(null!==(o=e.y0)&&void 0!==o?o:0)*r,i+(null!==(l=e.x1)&&void 0!==l?l:1)*n,s+(null!==(h=e.y1)&&void 0!==h?h:0)*r);return e.stops.forEach((t=>{c.addColorStop(t.offset,t.color)})),c}(t,d,p,g,i,u):"conical"===d.gradient?c=function(t,e,i,s,n,r){var a,o;const l=t.createConicGradient(i+(null!==(a=e.x)&&void 0!==a?a:0)*n,s+(null!==(o=e.y)&&void 0!==o?o:0)*r,e.startAngle,e.endAngle);return e.stops.forEach((t=>{l.addColorStop(t.offset,t.color)})),l.GetPattern?l.GetPattern(n+i,r+s,void 0):l}(t,d,p,g,i,u):"radial"===d.gradient&&(c=function(t,e,i,s,n,r){var a,o,l,h,c,d;const u=t.createRadialGradient(i+(null!==(a=e.x0)&&void 0!==a?a:.5)*n,s+(null!==(o=e.y0)&&void 0!==o?o:.5)*r,Math.max(n,r)*(null!==(l=e.r0)&&void 0!==l?l:0),i+(null!==(h=e.x1)&&void 0!==h?h:.5)*n,s+(null!==(c=e.y1)&&void 0!==c?c:.5)*r,Math.max(n,r)*(null!==(d=e.r1)&&void 0!==d?d:.5));return e.stops.forEach((t=>{u.addColorStop(t.offset,t.color)})),u}(t,d,p,g,i,u))}return c||"orange"}const yi={horizontal:{width:"width",height:"height",left:"left",top:"top",x:"x",y:"y",bottom:"bottom"},vertical:{width:"height",height:"width",left:"top",top:"left",x:"y",y:"x",bottom:"right"}},bi=!0,vi=!1,xi=/\w|\(|\)|-/,Ai=/[.?!,;:/,。?!、;:]/,_i=/\S/,Si=(t,e)=>{let i=e.fontSize||16;switch(e.script){case"super":case"sub":i*=.8}t.setTextStyle({textAlign:"left",textBaseline:e.textBaseline||"alphabetic",fontStyle:e.fontStyle||"",fontWeight:e.fontWeight||"",fontSize:i,fontFamily:e.fontFamily})};function Ti(t,e,i,s,n){if(t.length<=1)return 0;if(!e||e<=0)return 0;const r=kt.graphicUtil.textMeasure;let a=s,o=t.slice(0,a),l=Math.floor(r.measureText(o,i).width),h=t.slice(0,a+1),c=Math.floor(r.measureText(h,i).width);for(;l>e||c<=e;){if(l>e?a--:a++,a>t.length){a=t.length;break}if(a<0){a=0;break}o=t.slice(0,a),l=Math.floor(r.measureText(o,i).width),h=t.slice(0,a+1),c=Math.floor(r.measureText(h,i).width)}return n&&(a=function(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=e;for(;xi.test(t[s-1])&&xi.test(t[s])||Ai.test(t[s]);)if(s--,s<=0)return i?Bi(t,e):e;return s}(t,a)),a}function Bi(t,e){let i=e;for(;xi.test(t[i+1])&&xi.test(t[i])||Ai.test(t[i]);)if(i++,i>=t.length)return i;return i+1}function wi(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"actual";var s;if(""===t)return{ascent:0,height:0,descent:0,width:0};const n=kt.graphicUtil.textMeasure.measureText(t,e),r={ascent:0,height:0,descent:0,width:0},a="actual"===i?n.actualBoundingBoxAscent:n.fontBoundingBoxAscent,o="actual"===i?n.actualBoundingBoxDescent:n.fontBoundingBoxDescent;"number"!=typeof a||"number"!=typeof o?(r.width=Math.floor(n.width),r.height=e.fontSize||0,r.ascent=r.height,r.descent=0):(r.width=Math.floor(n.width),r.height=Math.floor(a+o),r.ascent=Math.floor(a),r.descent=r.height-r.ascent);const l=null!==(s=e.space)&&void 0!==s?s:0;return r.width+=l,r}const Ci=new class{constructor(t){const e=t||{};e.defaultScope=e.defaultScope||ut,this.options=e,this.id=Z.GenAutoIncrementId(),this._bindingDictionary=new Map,this._metadataReader=new xt}load(t){const e=this._getContainerModuleHelpersFactory()(t.id);t.registry(e.bindFunction,e.unbindFunction,e.isboundFunction,e.rebindFunction)}get(t){const e=this._getNotAllArgs(t,!1);return this._get(e)}getAll(t){const e=this._getAllArgs(t);return this._get(e)}getTagged(t,e,i){const s=this._getNotAllArgs(t,!1,e,i);return this._get(s)}getNamed(t,e){return this.getTagged(t,Q,e)}isBound(t){return this._bindingDictionary.has(t)}bind(t){const e=this.options.defaultScope,i=new vt(t,e),s=this._bindingDictionary.get(t)||[];return s.push(i),this._bindingDictionary.set(t,s),new Tt(i)}unbind(t){this._bindingDictionary.delete(t)}rebind(t){return this.unbind(t),this.bind(t)}_getContainerModuleHelpersFactory(){const t=(t,e)=>{t._binding.moduleId=e},e=e=>i=>{const s=this.bind(i);return t(s,e),s},i=()=>t=>this.unbind(t),s=()=>t=>this.isBound(t),n=e=>i=>{const s=this.rebind(i);return t(s,e),s};return t=>({bindFunction:e(t),isboundFunction:s(),rebindFunction:n(t),unbindFunction:i(),unbindAsyncFunction:t=>null})}_getNotAllArgs(t,e,i,s){return{avoidConstraints:!1,isMultiInject:e,serviceIdentifier:t,key:i,value:s}}_getAllArgs(t){return{avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t}}_get(t){const e=[];return this._bindingDictionary.get(t.serviceIdentifier).filter((e=>e.constraint(t))).forEach((t=>{e.push(this._resolveFromBinding(t))})),t.isMultiInject||1!==e.length?e:e[0]}_getChildRequest(t){const e=t.implementationType,{userGeneratedMetadata:i}=this._metadataReader.getConstructorMetadata(e),s=Object.keys(i),n=[];for(let t=0;t<s.length;t++){const e=i[t],s={};e.forEach((t=>{s[t.key]=t.value}));const r={inject:s[tt],multiInject:s.multi_inject},a=r.inject||r.multiInject,o={serviceIdentifier:a,constructorArgsMetadata:e},l=(this._bindingDictionary.get(a)||[]).filter((t=>t.constraint(o)));if(l.length){const t={injectIdentifier:a,metadata:e,bindings:l};n.push(t)}}return n}_resolveFromBinding(t){const e=this._getResolvedFromBinding(t);return this._saveToScope(t,e),e}_getResolvedFromBinding(t){let e;switch(t.type){case pt:case mt:e=t.cache;break;case yt:e=this._resolveInstance(t,t.implementationType);break;default:e=t.dynamicValue({container:this})}return e}_resolveInstance(t,e){if(t.activated)return t.cache;const i=this._getChildRequest(t);return this._createInstance(e,i)}_createInstance(t,e){return e.length?new t(...this._resolveRequests(e)):new t}_resolveRequests(t){return t.map((t=>t.bindings.length>1?t.bindings.map((t=>this._resolveFromBinding(t))):this._resolveFromBinding(t.bindings[0])))}_saveToScope(t,e){t.scope===dt&&(t.cache=e,t.activated=!0)}},Mi=Symbol.for("CanvasFactory");function Pi(t){return Ci.getNamed(Mi,kt.global.env)(t)}const ki=1e-4,Oi=Math.sqrt(3),Ri=1/3;function Li(t){return t>-Xi&&t<Xi}function Ii(t){return t>Xi||t<-Xi}const Ei=[0,0],Di=[0,0],ji=[0,0];function Ui(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function Fi(t,e,i,s){const n=1-s;return n*(n*t+2*s*e)+s*s*i}function Ni(t,e,i,s,n){const r=1-n;return r*r*(r*t+3*n*e)+n*n*(n*s+3*r*i)}function Wi(t){return(t%=i.pi2)<0&&(t+=i.pi2),t}function zi(t,e,i,s,n,r,a,o,l){if(0===a)return!1;const h=a;return!(l>e+h&&l>s+h&&l>r+h||l<e-h&&l<s-h&&l<r-h||o>t+h&&o>i+h&&o>n+h||o<t-h&&o<i-h&&o<n-h)&&function(t,e,i,s,n,r,a,o,l){let h=0,c=.005,d=1/0;Ei[0]=a,Ei[1]=o;for(let a=0;a<1;a+=.05){Di[0]=Fi(t,i,n,a),Di[1]=Fi(e,s,r,a);const o=Ui(Ei,Di);o<d&&(h=a,d=o)}d=1/0;for(let a=0;a<32&&!(c<ki);a++){const a=h-c,o=h+c;Di[0]=Fi(t,i,n,a),Di[1]=Fi(e,s,r,a);const l=Ui(Di,Ei);if(a>=0&&l<d)h=a,d=l;else{ji[0]=Fi(t,i,n,o),ji[1]=Fi(e,s,r,o);const a=Ui(ji,Ei);o<=1&&a<d?(h=o,d=a):c*=.5}}return l&&(l[0]=Fi(t,i,n,h),l[1]=Fi(e,s,r,h)),Math.sqrt(d)}(t,e,i,s,n,r,o,l,null)<=h/2}function Gi(t,e,i,s,n,r,a,o,l,h,c){if(0===l)return!1;const d=l;return!(c>e+d&&c>s+d&&c>r+d&&c>o+d||c<e-d&&c<s-d&&c<r-d&&c<o-d||h>t+d&&h>i+d&&h>n+d&&h>a+d||h<t-d&&h<i-d&&h<n-d&&h<a-d)&&function(t,e,i,s,n,r,a,o,l,h,c){let d,u,p,g,f=0,m=.005,y=1/0;Ei[0]=l,Ei[1]=h;for(let l=0;l<1;l+=.05)Di[0]=Ni(t,i,n,a,l),Di[1]=Ni(e,s,r,o,l),p=Ui(Ei,Di),p<y&&(f=l,y=p);y=1/0;for(let l=0;l<32&&!(m<ki);l++)d=f-m,u=f+m,Di[0]=Ni(t,i,n,a,d),Di[1]=Ni(e,s,r,o,d),p=Ui(Di,Ei),d>=0&&p<y?(f=d,y=p):(ji[0]=Ni(t,i,n,a,u),ji[1]=Ni(e,s,r,o,u),g=Ui(ji,Ei),u<=1&&g<y?(f=u,y=g):m*=.5);return c&&(c[0]=Ni(t,i,n,a,f),c[1]=Ni(e,s,r,o,f)),Math.sqrt(y)}(t,e,i,s,n,r,a,o,h,c,null)<=d/2}function Vi(t,e,s,n,r,a,o,l,h){if(0===o)return!1;const c=o;l-=t,h-=e;const d=Math.sqrt(l*l+h*h);if(d-c>s||d+c<s)return!1;if(Math.abs(n-r)%i.pi2<1e-4)return!0;if(a){const t=n;n=Wi(r),r=Wi(t)}else n=Wi(n),r=Wi(r);n>r&&(r+=i.pi2);let u=Math.atan2(h,l);return u<0&&(u+=i.pi2),u>=n&&u<=r||u+i.pi2>=n&&u+i.pi2<=r}function Hi(t,e,i,s,n,r,a){if(0===n)return!1;const o=n,l=n/2;let h=0,c=t;if(a>e+l&&a>s+l||a<e-l&&a<s-l||r>t+l&&r>i+l||r<t-l&&r<i-l)return!1;if(t===i)return Math.abs(r-t)<=o/2;h=(e-s)/(t-i),c=(t*s-i*e)/(t-i);const d=h*r-a+c;return d*d/(h*h+1)<=o/2*o/2}const Xi=1e-4;function Yi(t,e,i,s,n){const r=6*i-12*e+6*t,a=9*e+3*s-3*t-9*i,o=3*e-3*t;let l=0;if(Li(a)){if(Ii(r)){const t=-o/r;t>=0&&t<=1&&(n[l++]=t)}}else{const t=r*r-4*a*o;if(Li(t))n[0]=-r/(2*a);else if(t>0){const e=Math.sqrt(t),i=(-r+e)/(2*a),s=(-r-e)/(2*a);i>=0&&i<=1&&(n[l++]=i),s>=0&&s<=1&&(n[l++]=s)}}return l}const Ki=[-1,-1,-1],$i=[-1,-1];function qi(){const t=$i[0];$i[0]=$i[1],$i[1]=t}function Zi(t,e,i,s,n,r,a,o,l,h){if(h>e&&h>s&&h>r&&h>o||h<e&&h<s&&h<r&&h<o)return 0;const c=function(t,e,i,s,n,r){const a=s+3*(e-i)-t,o=3*(i-2*e+t),l=3*(e-t),h=t-n,c=o*o-3*a*l,d=o*l-9*a*h,u=l*l-3*o*h;let p=0;if(Li(c)&&Li(d))if(Li(o))r[0]=0;else{const t=-l/o;t>=0&&t<=1&&(r[p++]=t)}else{const t=d*d-4*c*u;if(Li(t)){const t=d/c,e=-o/a+t,i=-t/2;e>=0&&e<=1&&(r[p++]=e),i>=0&&i<=1&&(r[p++]=i)}else if(t>0){const e=Math.sqrt(t);let i=c*o+1.5*a*(-d+e),s=c*o+1.5*a*(-d-e);i=i<0?-Math.pow(-i,Ri):Math.pow(i,Ri),s=s<0?-Math.pow(-s,Ri):Math.pow(s,Ri);const n=(-o-(i+s))/(3*a);n>=0&&n<=1&&(r[p++]=n)}else{const t=(2*c*o-3*a*d)/(2*Math.sqrt(c*c*c)),e=Math.acos(t)/3,i=Math.sqrt(c),s=Math.cos(e),n=(-o-2*i*s)/(3*a),l=(-o+i*(s+Oi*Math.sin(e)))/(3*a),h=(-o+i*(s-Oi*Math.sin(e)))/(3*a);n>=0&&n<=1&&(r[p++]=n),l>=0&&l<=1&&(r[p++]=l),h>=0&&h<=1&&(r[p++]=h)}}return p}(e,s,r,o,h,Ki);if(0===c)return 0;let d=0,u=-1,p=0,g=0;for(let h=0;h<c;h++){const c=Ki[h],f=0===c||1===c?.5:1;Ni(t,i,n,a,c)<l||(u<0&&(u=Yi(e,s,r,o,$i),$i[1]<$i[0]&&u>1&&qi(),p=Ni(e,s,r,o,$i[0]),u>1&&(g=Ni(e,s,r,o,$i[1]))),2===u?c<$i[0]?d+=p<e?f:-f:c<$i[1]?d+=g<p?f:-f:d+=o<g?f:-f:c<$i[0]?d+=p<e?f:-f:d+=o<p?f:-f)}return d}function Ji(t,e,i,s,n,r,a,o){if(o>e&&o>s&&o>r||o<e&&o<s&&o<r)return 0;const l=function(t,e,i,s,n){const r=t-2*e+i,a=2*(e-t),o=t-s;let l=0;if(Li(r)){if(Ii(a)){const t=-o/a;t>=0&&t<=1&&(n[l++]=t)}}else{const t=a*a-4*r*o;if(Li(t)){const t=-a/(2*r);t>=0&&t<=1&&(n[l++]=t)}else if(t>0){const e=Math.sqrt(t),i=(-a+e)/(2*r),s=(-a-e)/(2*r);i>=0&&i<=1&&(n[l++]=i),s>=0&&s<=1&&(n[l++]=s)}}return l}(e,s,r,o,Ki);if(0===l)return 0;const h=function(t,e,i){const s=t+i-2*e;return 0===s?.5:(t-e)/s}(e,s,r);if(h>=0&&h<=1){let o=0;const c=Fi(e,s,r,h);for(let s=0;s<l;s++){const l=0===Ki[s]||1===Ki[s]?.5:1;Fi(t,i,n,Ki[s])<a||(Ki[s]<h?o+=c<e?l:-l:o+=r<c?l:-l)}return o}const c=0===Ki[0]||1===Ki[0]?.5:1;return Fi(t,i,n,Ki[0])<a?0:r<e?c:-c}function Qi(t,e,s,n,r,a,o,l){if((l-=e)>s||l<-s)return 0;const h=Math.sqrt(s*s-l*l);Ki[0]=-h,Ki[1]=h;const c=Math.abs(n-r);if(c<1e-4)return 0;if(c>=i.pi2-1e-4){n=0,r=i.pi2;const e=a?1:-1;return o>=Ki[0]+t&&o<=Ki[1]+t?e:0}if(n>r){const t=n;n=r,r=t}n<0&&(n+=i.pi2,r+=i.pi2);let d=0;for(let e=0;e<2;e++){const s=Ki[e];if(s+t>o){let t=Math.atan2(l,s),e=a?1:-1;t<0&&(t=i.pi2+t),(t>=n&&t<=r||t+i.pi2>=n&&t+i.pi2<=r)&&(t>i.pi/2&&t<1.5*i.pi&&(e=-e),d+=e)}}return d}function ts(t){return Math.round(t/i.pi*1e8)/1e8%2*i.pi}function es(t,e){let s=ts(t[0]);s<0&&(s+=i.pi2);const n=s-t[0];let r=t[1];r+=n,!e&&r-s>=i.pi2?r=s+i.pi2:e&&s-r>=i.pi2?r=s-i.pi2:!e&&s>r?r=s+(i.pi2-ts(s-r)):e&&s<r&&(r=s-(i.pi2-ts(r-s))),t[0]=s,t[1]=r}const is=[0,0];function ss(t,e,s,n,r){const a=t,o=t.length;let l,h,c=0,d=0,u=0,p=0,g=0;for(let t=0;t<o;t++){const o=a[t],f=0===t;o[0]===Nt.M&&t>1&&(s||(c+=i.isPointInLine(d,u,p,g,n,r))),f&&(d=o[1],u=o[2],p=d,g=u);const m=o[0],y=o[1],b=o[2],v=o[3],x=o[4],A=o[5],_=o[6];let S=x,T=A;is[0]=S,is[1]=T,es(is,Boolean(o[6])),S=is[0],T=is[1];const B=S,w=T-S,C=!!(1-(o[6]?0:1)),M=(n-y)*v/v+y;switch(m){case Nt.M:p=y,g=b,d=p,u=g;break;case Nt.L:if(s){if(Hi(d,u,y,b,e,n,r))return!0}else c+=i.isPointInLine(d,u,y,b,n,r)||0;d=y,u=b;break;case Nt.C:if(s){if(Gi(d,u,y,b,v,x,A,_,e,n,r))return!0}else c+=Zi(d,u,y,b,v,x,A,_,n,r)||0;d=A,u=_;break;case Nt.Q:if(s){if(zi(d,u,y,b,v,x,e,n,r))return!0}else c+=Ji(d,u,y,b,v,x,n,r)||0;d=v,u=x;break;case Nt.A:if(l=Math.cos(B)*v+y,h=Math.sin(B)*v+b,f?(p=l,g=h):c+=i.isPointInLine(d,u,l,h,n,r),s){if(Vi(y,b,v,B,B+w,C,e,M,r))return!0}else c+=Qi(y,b,v,B,B+w,C,M,r);d=Math.cos(B+w)*v+y,u=Math.sin(B+w)*v+b;break;case Nt.R:if(p=d=y,g=u=b,l=p+v,h=g+x,s){if(Hi(p,g,l,g,e,n,r)||Hi(l,g,l,h,e,n,r)||Hi(l,h,p,h,e,n,r)||Hi(p,h,p,g,e,n,r))return!0}else c+=i.isPointInLine(l,g,l,h,n,r),c+=i.isPointInLine(p,h,p,g,n,r);break;case Nt.Z:if(s){if(Hi(d,u,p,g,e,n,r))return!0}else c+=i.isPointInLine(d,u,p,g,n,r);d=p,u=g}}return s||(f=u,m=g,Math.abs(f-m)<Xi)||(c+=i.isPointInLine(d,u,p,g,n,r)||0),0!==c;var f,m}const ns=new class{constructor(){this.pools=[],this.allocatedCanvas=[]}shareCanvas(){return this.allocatedCanvas.length?this.allocatedCanvas[0]:this.getCommonCanvas()}getCommonCanvas(){return this._commonCanvas||(this._commonCanvas=this.allocate({width:100,height:100,dpr:2})),this._commonCanvas}allocate(t){if(!this.pools.length){const e=Pi(Object.assign({nativeCanvas:kt.global.createCanvas(t)},t));return this.allocatedCanvas.push(e),e}const e=this.pools.pop();return e.resize(t.width,t.height),e.dpr=t.dpr,e}allocateByObj(t){if(!this.pools.length){const e={width:t.width/t.dpr,height:t.height/t.dpr,dpr:t.dpr},i=Pi(Object.assign({nativeCanvas:kt.global.createCanvas(e)},e));return this.allocatedCanvas.push(i),i}const e=this.pools.pop();return e.width=t.width,e.height=t.height,e}free(t){this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}},rs={arc:Je,area:Qe,circle:ti,line:si,path:ni,symbol:li,text:hi,rect:oi,polygon:ri,star:ai,richtext:ci,richtextIcon:ui,image:di,group:ei,glyph:ii},as=Object.keys(rs);function os(t,e){Object.keys(e).forEach((i=>{t[i]=e[i]}))}const ls={arc:Object.assign({},rs.arc),area:Object.assign({},rs.area),circle:Object.assign({},rs.circle),line:Object.assign({},rs.line),path:Object.assign({},rs.path),symbol:Object.assign({},rs.symbol),text:Object.assign({},rs.text),rect:Object.assign({},rs.rect),polygon:Object.assign({},rs.polygon),star:Object.assign({},rs.star),richtext:Object.assign({},rs.richtext),richtextIcon:Object.assign({},rs.richtextIcon),image:Object.assign({},rs.image),group:Object.assign({},rs.group),glyph:Object.assign({},rs.glyph)};class hs{constructor(){this.initTheme(),this.dirty=!1}initTheme(){this._defaultTheme={},as.forEach((t=>{this._defaultTheme[t]=Object.create(ls[t])})),this.combinedTheme=this._defaultTheme}getTheme(t){if(!t)return this.combinedTheme;if(!this.dirty)return this.combinedTheme;let e={};const i=this.getParentWithTheme(t);return i&&(e=i.theme),this.applyTheme(t,e),this.combinedTheme}getParentWithTheme(t){for(;t.parent;)if((t=t.parent).theme)return t;return null}applyTheme(t,e){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.dirty){const n=this.getParentWithTheme(t);if(n){const t=n.theme;(t.dirty||s)&&t.applyTheme(n,e,!0)}this.userTheme?this.doCombine(n&&n.theme.combinedTheme):(n?this.combinedTheme=n.theme.combinedTheme:(this.combinedTheme=this._defaultTheme,i.Logger.getInstance().warn("未知错误,走到不应该走的区域里")),this.dirty=!1)}return this.combinedTheme}doCombine(t){const e=this.userTheme,i=this.combinedTheme;as.forEach((s=>{const n=Object.create(ls[s]);t&&t[s]&&os(n,t[s]),i[s]&&os(n,i[s]),e[s]&&os(n,e[s]),this.combinedTheme[s]=n})),e.common&&as.forEach((t=>{os(this.combinedTheme[t],e.common)})),this.dirty=!1}setTheme(t,e){let i=this.userTheme;i?Object.keys(t).forEach((e=>{i[e]?Object.assign(i[e],t[e]):i[e]=Object.assign({},t[e])})):i=t,this.userTheme=i,this.dirty=!0,this.dirtyChildren(e)}resetTheme(t,e){this.userTheme=t,this.dirty=!0,this.dirtyChildren(e)}dirtyChildren(t){t.forEachChildren((t=>{t.isContainer&&(t.theme&&(t.theme.dirty=!0),this.dirtyChildren(t))}))}}const cs=new hs;function ds(t,e){return t.glyphHost?ds(t.glyphHost):e?(t.isContainer,e):function(t){let e;if(e=t.isContainer?t:t.parent,e){for(;e&&!e.theme;)e=e.parent;return e?(e.theme||e.createTheme(),e.theme.getTheme(e)):cs.getTheme()}return null}(t)||t.attachedThemeGraphic&&ds(t.attachedThemeGraphic)||cs.getTheme()}var us=function(t,e,i,s){return new(i||(i=Promise))((function(n,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function o(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,o)}l((s=s.apply(t,e||[])).next())}))};class ps extends i.EventEmitter{get previousSibling(){return this._prev}get nextSibling(){return this._next}get children(){return this.getChildren()}get firstChild(){return this._firstChild}get lastChild(){return this._lastChild}get count(){return this._count}get childrenCount(){return this._idMap?this._idMap.size:0}constructor(){super(),this._uid=Z.GenAutoIncrementId(),this._firstChild=null,this._lastChild=null,this.parent=null,this._count=1}forEachChildren(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){let e=this._lastChild,i=0;for(;e;){if(t(e,i++))return;e=e._prev}}else{let e=this._firstChild,i=0;for(;e;){if(t(e,i++))return;e=e._next}}}forEachChildrenAsync(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return us(this,void 0,void 0,(function*(){if(e){let e=this._lastChild,i=0;for(;e;){let s=t(e,i++);if(s.then&&(s=yield s),s)return;e=e._prev}}else{let e=this._firstChild,i=0;for(;e;){let s=t(e,i++);if(s.then&&(s=yield s),s)return;e=e._next}}}))}forEach(t){return this.forEachChildren(t)}appendChild(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._uid===t._uid)return null;if(!e&&t.isAncestorsOf(this))throw new Error("【Node::appendChild】不能将父辈元素append为子元素");return t.parent&&t.parent.removeChild(t),t.parent=this,this._lastChild?(this._lastChild._next=t,t._prev=this._lastChild,this._lastChild=t):(this._firstChild=this._lastChild=t,t._prev=t._next=null),this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this.setCount(t.count),this._structEdit=!0,t}appendChildArrHighPerformance(t){return console.error("暂不支持该函数"),t}insertBefore(t,e){if(!e)return this.appendChild(t);if(this===t||t===e)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,t._prev=e._prev,e._prev?e._prev._next=t:this._firstChild=t,e._prev=t,t._next=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}insertAfter(t,e){if(!e)return this.appendChild(t);if(this===t||t===e)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertAfter】不能将父辈元素insert为子元素");return e.parent!==this?null:(t.parent&&t.parent.removeChild(t),t.parent=this,e._next?(e._next._prev=t,t._next=e._next):this._lastChild=t,e._next=t,t._prev=e,this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t)}insertInto(t,e){if(!this._ignoreWarn&&this._nodeList&&i.Logger.getInstance().warn("insertIntoKeepIdx和insertInto混用可能会存在错误"),e>=this.childrenCount)return this.appendChild(t);if(this===t)return null;if(t.isAncestorsOf(this))throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");if(t.parent&&t.parent.removeChild(t),t.parent=this,0===e)t._next=this._firstChild,this._firstChild&&(this._firstChild._prev=t),t._prev=null,this._firstChild=t;else{let i=this._firstChild;for(let t=0;t<e;t++){if(!i)return null;t>0&&(i=i._next)}if(!i)return null;t._next=i._next,t._prev=i,i._next=t,t._next&&(t._next._prev=t)}return this._idMap||(this._idMap=new Map),this._idMap.set(t._uid,t),this._structEdit=!0,this.setCount(t.count),t}insertIntoKeepIdx(t,e){if(this._nodeList||(this._nodeList=this.children),this._nodeList[e]){const i=this._nodeList[e];return this._nodeList.splice(e,0,t),this.insertBefore(t,i)}let i;this._nodeList[e]=t;for(let t=e-1;t>=0&&(i=this._nodeList[t],!i);t--);if(i)return i._next?this.insertBefore(t,i._next):this.appendChild(t);this._ignoreWarn=!0;const s=this.insertInto(t,0);return this._ignoreWarn=!1,s}removeChild(t){if(!this._idMap)return null;if(!this._idMap.has(t._uid))return null;if(this._idMap.delete(t._uid),this._nodeList){const e=this._nodeList.findIndex((e=>e===t));e>=0&&this._nodeList.splice(e,1)}return t._prev?t._prev._next=t._next:this._firstChild=t._next,t._next?t._next._prev=t._prev:this._lastChild=t._prev,t.parent=null,t._prev=null,t._next=null,this._structEdit=!0,this.setCount(-t.count),t}delete(){this.parent&&this.parent.removeChild(this)}removeAllChild(t){if(!this._idMap)return;this._nodeList&&(this._nodeList.length=0);let e=this._firstChild;for(;e;){const t=e._next;e.parent=null,e._prev=null,e._next=null,e=e._next,e=t}this._firstChild=null,this._lastChild=null,this._idMap.clear(),this._structEdit=!0,this.setCount(1-this._count)}replaceChild(t,e){throw new Error("暂不支持")}find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=null;return this.forEachChildren(((e,s)=>!(e===this||!t(e,s)||(i=e,0)))),e&&this.forEachChildren((e=>{if(e.isContainer){const s=e.find(t,!0);if(s)return i=s,!0}return!1})),i}findAll(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return this.forEachChildren(((e,s)=>{e!==this&&t(e,s)&&i.push(e)})),e&&this.forEachChildren((e=>{if(e.isContainer){const s=e.findAll(t,!0);s.length&&(i=i.concat(s))}})),i}getElementById(t){return this.find((e=>e.id===t),!0)}findChildById(t){return this.getElementById(t)}findChildByUid(t){return this._idMap&&this._idMap.get(t)||null}getElementsByName(t){return this.findAll((e=>e.name===t),!0)}findChildrenByName(t){return this.getElementsByName(t)}getElementsByType(t){return this.findAll((e=>e.type===t),!0)}getChildByName(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.find((e=>e.name===t),e)}getChildAt(t){let e=this._firstChild;if(!e)return null;for(let i=0;i<t;i++){if(!e._next)return null;e=e._next}return e}at(t){return this.getChildAt(t)}containNode(t){if(!this._idMap)return!1;if(this._idMap.has(t._uid))return!0;let e=this._firstChild;for(;e;){if(e.containNode(t))return!0;e=e._next}return!1}getRootNode(){let t=this.parent;for(;null==t?void 0:t.parent;)t=t.parent;return t||this}hasChildNodes(){return null!==this._firstChild}addChild(t){return this.appendChild(t)}add(t){return this.appendChild(t)}getChildren(){const t=[];let e=this._firstChild;for(;e;)t.push(e),e=e._next;return t}isChildOf(t){return!!this.parent&&this.parent._uid===t._uid}isParentOf(t){return t.isChildOf(this)}isDescendantsOf(t){let e=this.parent;if(!e)return!1;do{if(e._uid===t._uid)return!0;e=e.parent}while(null!==e);return!1}isAncestorsOf(t){return t.isDescendantsOf(this)}getAncestor(t){throw new Error("暂不支持")}setAllDescendantsProps(t,e){let i=this._firstChild;for(;i;)i[t]=e,i.setAllDescendantsProps(t,e),i=i._next}setCount(t){this._count+=t;let e=this.parent;if(e)do{e._count+=t,e=e.parent}while(null!==e)}clone(){throw new Error("暂不支持")}cloneTo(t){throw new Error("暂不支持")}getParent(){return this.parent}del(t){return this.removeChild(t)}addEventListener(t,e,s){const n=i.isBoolean(s,!0)&&s||i.isObject(s)&&s.capture,r=i.isObject(s)&&s.once,a=i.isFunction(e)?void 0:e;return t=n?`${t}capture`:t,e=i.isFunction(e)?e:e.handleEvent,r?super.once(t,e,a):super.on(t,e,a),this}on(t,e,i){return this.addEventListener(t,e,i)}removeEventListener(t,e,s){const n=i.isBoolean(s,!0)&&s||i.isObject(s)&&s.capture,r=i.isFunction(e)?void 0:e;t=n?`${t}capture`:t,e=i.isFunction(e)?e:e.handleEvent;const a=i.isObject(s)&&s.once;return super.off(t,e,r,a),this}off(t,e,i){return this.removeEventListener(t,e,i)}once(t,e,s){return i.isObject(s)?(s.once=!0,this.addEventListener(t,e,s)):this.addEventListener(t,e,{once:!0})}removeAllEventListeners(){return super.removeAllListeners(),this}removeAllListeners(){return this.removeAllEventListeners()}dispatchEvent(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return super.emit(t.type,t,...i),!t.defaultPrevented}emit(t,e){return this.dispatchEvent(t,e)}release(){this.removeAllListeners()}}class gs{get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get x(){return this.canvas.x}get y(){return this.canvas.y}get canvasX(){return this.canvas.x}get canvasY(){return this.canvas.y}get viewX(){return this.viewport.x}get viewY(){return this.viewport.y}constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=gs.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer={x:0,y:0},this.page={x:0,y:0},this.canvas={x:0,y:0},this.viewport={x:0,y:0},this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}composedPath(){return!this.manager||this.path&&this.path[this.path.length-1]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.composedDetailPath(),this.path}composedDetailPath(){return this.pickParams&&this.pickParams.graphic?(this.detailPath=this.path.slice(),this._composedDetailPath(this.pickParams)):this.detailPath=this.path.slice(),this.detailPath}_composedDetailPath(t){if(t&&t.graphic){const e=t.graphic;if(e.stage){const i=e.stage.eventSystem.manager.propagationPath(e);this.detailPath.push(i),this._composedDetailPath(t.params)}}}preventDefault(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault()}catch(t){this.nativeEvent.preventDefault&&i.isFunction(this.nativeEvent.preventDefault)&&this.nativeEvent.preventDefault()}this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){try{this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.stopPropagation()}catch(t){this.nativeEvent.stopPropagation&&i.isFunction(this.nativeEvent.stopPropagation)&&this.nativeEvent.stopPropagation()}this.propagationStopped=!0}initEvent(){}initUIEvent(){}clone(){throw new Error("Method not implemented.")}}class fs extends gs{constructor(t,e){super(),this.type=t,this.detail=e}}const ms={dispatchEvent(t){var e;if(!(t instanceof gs))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return t.defaultPrevented=!1,t.path=[],t.detailPath&&(t.detailPath=[]),t.target=this,null===(e=null==t?void 0:t.manager)||void 0===e||e.dispatchEvent(t),!t.defaultPrevented},emit(t,e){return this.dispatchEvent(new fs(t,e))}};class ys{static GetImage(t,e){var i;const s=ys.cache.get(t);s?"fail"===s.loadState?kt.global.getRequestAnimationFrame()((()=>{e.imageLoadFail(t)})):"init"===s.loadState||"loading"===s.loadState?null===(i=s.waitingMark)||void 0===i||i.push(e):e&&e.imageLoadSuccess(t,s.data):ys.loadImage(t,e)}static GetSvg(t,e){var i;let s=ys.cache.get(t);s?"fail"===s.loadState?kt.global.getRequestAnimationFrame()((()=>{e.imageLoadFail(t)})):"init"===s.loadState||"loading"===s.loadState?null===(i=s.waitingMark)||void 0===i||i.push(e):e&&e.imageLoadSuccess(t,s.data):(s={type:"image",loadState:"init"},ys.cache.set(t,s),s.dataPromise=kt.global.loadSvg(t),s.dataPromise?(s.waitingMark=[e],s.dataPromise.then((e=>{var i;s.loadState=(null==e?void 0:e.data)?"success":"fail",s.data=null==e?void 0:e.data,null===(i=s.waitingMark)||void 0===i||i.map(((i,n)=>{(null==e?void 0:e.data)?(s.loadState="success",s.data=e.data,i.imageLoadSuccess(t,e.data)):(s.loadState="fail",i.imageLoadFail(t))})),s.waitingMark&&(s.waitingMark=[])}))):(s.loadState="fail",e.imageLoadFail(t)))}static GetFile(t,e){let i=ys.cache.get(t);return i?"fail"===i.loadState?Promise.reject():"init"===i.loadState||"loading"===i.loadState?i.dataPromise.then((t=>t.data)):Promise.resolve(i.data):(i={type:e,loadState:"init"},ys.cache.set(t,i),"arrayBuffer"===e?i.dataPromise=kt.global.loadArrayBuffer(t):"blob"===e?i.dataPromise=kt.global.loadBlob(t):"json"===e&&(i.dataPromise=kt.global.loadJson(t)),i.dataPromise.then((t=>t.data)))}static loading(){setTimeout((()=>{if(!ys.isLoading&&ys.toLoadAueue.length){ys.isLoading=!0;const t=ys.toLoadAueue.splice(0,10),e=[];t.forEach((t=>{const{url:i,marks:s}=t,n={type:"image",loadState:"init"};if(ys.cache.set(i,n),n.dataPromise=kt.global.loadImage(i),n.dataPromise){n.waitingMark=s;const t=n.dataPromise.then((t=>{var e;n.loadState=(null==t?void 0:t.data)?"success":"fail",n.data=null==t?void 0:t.data,null===(e=n.waitingMark)||void 0===e||e.map(((e,s)=>{(null==t?void 0:t.data)?(n.loadState="success",n.data=t.data,e.imageLoadSuccess(i,t.data)):(n.loadState="fail",e.imageLoadFail(i))})),n.waitingMark&&(n.waitingMark=[])}));e.push(t)}else n.loadState="fail",s.forEach((t=>t.imageLoadFail(i)))})),Promise.all(e).then((()=>{ys.isLoading=!1,this.onLoadSuccessCb.forEach((t=>t())),ys.loading()})).catch((t=>{console.error(t),ys.isLoading=!1,this.onLoadSuccessCb.forEach((t=>t())),ys.loading()}))}}),0)}static loadImage(t,e){const i=bs(t,ys.toLoadAueue);if(-1!==i)return ys.toLoadAueue[i].marks.push(e),void ys.loading();ys.toLoadAueue.push({url:t,marks:[e]}),ys.loading()}static improveImageLoading(t){const e=bs(t,ys.toLoadAueue);if(-1!==e){const t=ys.toLoadAueue.splice(e,1);ys.toLoadAueue.unshift(t[0])}}static onLoadSuccess(t){this.onLoadSuccessCb.push(t)}}function bs(t,e){for(let i=0;i<e.length;i++)if(e[i].url===t)return i;return-1}var vs;ys.cache=new Map,ys.isLoading=!1,ys.toLoadAueue=[],ys.onLoadSuccessCb=[],function(t){t[t.Top=1]="Top",t[t.Right=2]="Right",t[t.Bottom=4]="Bottom",t[t.Left=8]="Left",t[t.ALL=15]="ALL"}(vs||(vs={}));const xs=[!1,!1,!1,!1],As=[0,0,0,0],_s=t=>t?i.isArray(t)?0===t.length?0:1===t.length?t[0]:2===t.length?(As[0]=t[0],As[2]=t[0],As[1]=t[1],As[3]=t[1],As):t:t:0,Ss=[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],Ts=[1,2,3,0,1,2,3,0];function Bs(t,e,s,n){for(;t>=i.pi2;)t-=i.pi2;for(;t<0;)t+=i.pi2;for(;t>e;)e+=i.pi2;Ss[0].x=s,Ss[1].y=s,Ss[2].x=-s,Ss[3].y=-s;const r=Math.ceil(t/i.halfPi)%4,a=Math.ceil(e/i.halfPi)%4;if(n.add(i.cos(t)*s,i.sin(t)*s),n.add(i.cos(e)*s,i.sin(e)*s),r!==a||e-t>i.pi){let t=!1;for(let e=0;e<Ts.length;e++)if(t||r!==Ts[e]){if(t&&a===Ts[e])break;if(t){const t=Ss[Ts[e]];n.add(t.x,t.y)}}else{t=!0;const e=Ss[r];n.add(e.x,e.y)}}}function ws(t,e,s){const{x:n,y:r}=i.pointAt(t.x,t.y,e.x,e.y,s),{x:a,y:o}=i.pointAt(t.x1,t.y1,e.x1,e.y1,s),l=new i.Point(n,r,a,o);return l.defined=e.defined,l}function Cs(t,e,s){if(!t||!e)return[];Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]);let n=[];if(t.length>e.length){n=e.map((t=>{const e=new i.Point(t.x,t.y,t.x1,t.y1);return e.defined=t.defined,e}));for(let i=0;i<e.length;i++)n[i]=ws(t[i],e[i],s)}else{n=e.map((t=>{const e=new i.Point(t.x,t.y,t.x1,t.y1);return e.defined=t.defined,e}));for(let i=0;i<t.length;i++)n[i]=ws(t[i],e[i],s)}return n}const Ms=(t,e)=>{const s=((t,e)=>i.isString(t)&&"%"===t[t.length-1]?e*(Number.parseFloat(t.substring(0,t.length-1))/100):t)(t,e);return isNaN(s)?s:Math.max(e,s)};class Ps{bounds(t,e){if(i.isNumber(t)){const i=t/2;e.x1=-i,e.x2=i,e.y1=-i,e.y2=i}else e.x1=-t[0]/2,e.x2=t[0]/2,e.y1=-t[1]/2,e.y2=t[1]/2}parseSize(t){return i.isNumber(t)?t:Math.min(t[0],t[1])}}function ks(t,e,s,n,r){return r?t.arc(s,n,e,0,i.tau,!1,r):t.arc(s,n,e,0,i.tau),!1}var Os=new class extends Ps{constructor(){super(...arguments),this.type="circle",this.pathStr="M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0"}draw(t,e,i,s,n){return ks(t,this.parseSize(e)/2,i,s,n)}drawOffset(t,e,i,s,n,r){return ks(t,this.parseSize(e)/2+n,i,s,r)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e-n}, ${i} a ${n},${n} 0 1,0 ${2*n},0 a ${n},${n} 0 1,0 -${2*n},0`}};var Rs=new class extends Ps{constructor(){super(...arguments),this.type="cross",this.pathStr="M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z"}draw(t,e,i,s,n){return function(t,e,i,s,n){return t.moveTo(-3*e+i,-e+s,n),t.lineTo(-e+i,-e+s,n),t.lineTo(-e+i,-3*e+s,n),t.lineTo(e+i,-3*e+s,n),t.lineTo(e+i,-e+s,n),t.lineTo(3*e+i,-e+s,n),t.lineTo(3*e+i,e+s,n),t.lineTo(e+i,e+s,n),t.lineTo(e+i,3*e+s,n),t.lineTo(-e+i,3*e+s,n),t.lineTo(-e+i,e+s,n),t.lineTo(-3*e+i,e+s,n),t.closePath(),!0}(t,this.parseSize(e)/6,i,s,n)}drawOffset(t,e,i,s,n,r){return function(t,e,i,s,n,r){return t.moveTo(-3*e+i-n,-e+s-n,r),t.lineTo(-e+i-n,-e+s-n,r),t.lineTo(-e+i-n,-3*e+s-n,r),t.lineTo(e+i+n,-3*e+s-n,r),t.lineTo(e+i+n,-e+s-n,r),t.lineTo(3*e+i+n,-e+s-n,r),t.lineTo(3*e+i+n,e+s+n,r),t.lineTo(e+i+n,e+s+n,r),t.lineTo(e+i+n,3*e+s+n,r),t.lineTo(-e+i-n,3*e+s+n,r),t.lineTo(-e+i-n,e+s+n,r),t.lineTo(-3*e+i-n,e+s+n,r),t.closePath(),!0}(t,this.parseSize(e)/6,i,s,n,r)}};function Ls(t,e,i,s,n){return t.moveTo(i,s-e,n),t.lineTo(e+i,s,n),t.lineTo(i,s+e,n),t.lineTo(i-e,s,n),t.closePath(),!0}var Is=new class extends Ps{constructor(){super(...arguments),this.type="diamond",this.pathStr="M-0.5,0L0,-0.5L0.5,0L0,0.5Z"}draw(t,e,i,s,n){return Ls(t,this.parseSize(e)/2,i,s,n)}drawFitDir(t,e,i,s,n){return Ls(t,this.parseSize(e)/2,i,s,n)}drawOffset(t,e,i,s,n,r){return Ls(t,this.parseSize(e)/2+n,i,s,r)}};function Es(t,e,i,s){const n=2*e;return t.rect(i-e,s-e,n,n),!1}var Ds=new class extends Ps{constructor(){super(...arguments),this.type="square",this.pathStr="M-0.5,-0.5h1v1h-1Z"}draw(t,e,i,s){return Es(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Es(t,this.parseSize(e)/2+n,i,s)}};function js(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(i+e+2*n,e+s+n),t.lineTo(i-e-2*n,e+s+n),t.lineTo(i,s-e-2*n),t.closePath(),!0}class Us extends Ps{constructor(){super(...arguments),this.type="triangleUp",this.pathStr="M0.5,0.5 L-0.5,0.5 L0,-0.5 Z"}draw(t,e,i,s){return js(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return js(t,this.parseSize(e)/2,i,s,n)}}var Fs=new Us;var Ns=new class extends Us{constructor(){super(...arguments),this.type="triangle"}};const Ws=Math.sin(Math.PI/10)/Math.sin(7*Math.PI/10),zs=Math.sin(i.tau/10)*Ws,Gs=-Math.cos(i.tau/10)*Ws;function Vs(t,e,s,n){const r=zs*e,a=Gs*e;t.moveTo(s,-e+n),t.lineTo(r+s,a+n);for(let o=1;o<5;++o){const l=i.tau*o/5,h=Math.cos(l),c=Math.sin(l);t.lineTo(c*e+s,-h*e+n),t.lineTo(h*r-c*a+s,c*r+h*a+n)}return t.closePath(),!0}var Hs=new class extends Ps{constructor(){super(...arguments),this.type="star",this.pathStr="M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z"}draw(t,e,i,s){return Vs(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Vs(t,this.parseSize(e)/2+n,i,s)}};const Xs=i.sqrt(3);function Ys(t,e,i,s){const n=e,r=n/Xs,a=r/5,o=e;return t.moveTo(0+i,-n+s),t.lineTo(r/2+i,s),t.lineTo(a/2+i,s),t.lineTo(a/2+i,o+s),t.lineTo(-a/2+i,o+s),t.lineTo(-a/2+i,s),t.lineTo(-r/2+i,s),t.closePath(),!0}var Ks=new class extends Ps{constructor(){super(...arguments),this.type="arrow",this.pathStr="M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z"}draw(t,e,i,s){return Ys(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Ys(t,this.parseSize(e)/2+n,i,s)}};function $s(t,e,i,s){const n=2*e;return t.moveTo(i,-e+s),t.lineTo(n/3/2+i,e+s),t.lineTo(-n/3/2+i,e+s),t.closePath(),!0}var qs=new class extends Ps{constructor(){super(...arguments),this.type="wedge",this.pathStr="M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z"}draw(t,e,i,s){return $s(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return $s(t,this.parseSize(e)/2+n,i,s)}};function Zs(t,e,i,s){return t.moveTo(-e+i,s),t.lineTo(i,e+s),!1}var Js=new class extends Ps{constructor(){super(...arguments),this.type="stroke",this.pathStr=""}draw(t,e,i,s){return Zs(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return Zs(t,this.parseSize(e)/2+n,i,s)}};const Qs=-.5,tn=i.sqrt(3)/2,en=1/i.sqrt(12);function sn(t,e,i,s){const n=e/2,r=e*en,a=n,o=e*en+e,l=-a,h=o;return t.moveTo(n+i,r+s),t.lineTo(a+i,o+s),t.lineTo(l+i,h+s),t.lineTo(Qs*n-tn*r+i,tn*n+Qs*r+s),t.lineTo(Qs*a-tn*o+i,tn*a+Qs*o+s),t.lineTo(Qs*l-tn*h+i,tn*l+Qs*h+s),t.lineTo(Qs*n+tn*r+i,Qs*r-tn*n+s),t.lineTo(Qs*a+tn*o+i,Qs*o-tn*a+s),t.lineTo(Qs*l+tn*h+i,Qs*h-tn*l+s),t.closePath(),!1}var nn=new class extends Ps{constructor(){super(...arguments),this.type="wye",this.pathStr="M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z"}draw(t,e,i,s){return sn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return sn(t,this.parseSize(e)/2+n,i,s)}};function rn(t,e,i,s,n){return t.moveTo(-e+i-2*n,s),t.lineTo(e+i+n,e+s+2*n),t.lineTo(e+i+n,s-e-2*n),t.closePath(),!0}var an=new class extends Ps{constructor(){super(...arguments),this.type="triangleLeft",this.pathStr="M-0.5,0 L0.5,0.5 L0.5,-0.5 Z"}draw(t,e,i,s){return rn(t,this.parseSize(e)/2,i,s,0)}drawOffset(t,e,i,s,n){return rn(t,this.parseSize(e)/2,i,s,n)}};function on(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(i-e-n,e+s+2*n),t.lineTo(e+i+2*n,s),t.lineTo(i-e-n,s-e-2*n),t.closePath(),!0}var ln=new class extends Ps{constructor(){super(...arguments),this.type="triangleRight",this.pathStr="M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z"}draw(t,e,i,s){return on(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return on(t,this.parseSize(e)/2,i,s,n)}};function hn(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return t.moveTo(i-e-2*n,s-e-n),t.lineTo(i+e+2*n,s-e-n),t.lineTo(i,s+e+2*n),t.closePath(),!0}var cn=new class extends Ps{constructor(){super(...arguments),this.type="triangleDown",this.pathStr="M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z"}draw(t,e,i,s){return hn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n){return hn(t,this.parseSize(e)/2,i,s,n)}};const dn=i.sqrt(3);function un(t,e,i,s){const n=e*dn;return t.moveTo(i,s+-n/3*2),t.lineTo(e+i,s+n),t.lineTo(i-e,s+n),t.closePath(),!0}var pn=new class extends Ps{constructor(){super(...arguments),this.type="thinTriangle",this.pathStr="M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z"}draw(t,e,i,s){return un(t,this.parseSize(e)/2/dn,i,s)}drawOffset(t,e,i,s,n){return un(t,this.parseSize(e)/2/dn+n,i,s)}};function gn(t,e,i,s){const n=2*e;return t.moveTo(e+i,s-n),t.lineTo(i-e,s),t.lineTo(e+i,n+s),!0}var fn=new class extends Ps{constructor(){super(...arguments),this.type="arrow2Left",this.pathStr="M 0.25 -0.5 L -0.25 0 l 0.25 0.5"}draw(t,e,i,s){return gn(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return gn(t,this.parseSize(e)/4+n,i,s)}};function mn(t,e,i,s){const n=2*e;return t.moveTo(i-e,s-n),t.lineTo(i+e,s),t.lineTo(i-e,n+s),!0}var yn=new class extends Ps{constructor(){super(...arguments),this.type="arrow2Right",this.pathStr="M -0.25 -0.5 l 0.25 0 l -0.25 0.5"}draw(t,e,i,s){return mn(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return mn(t,this.parseSize(e)/4+n,i,s)}};function bn(t,e,i,s){const n=2*e;return t.moveTo(i-n,s+e),t.lineTo(i,s-e),t.lineTo(i+n,s+e),!0}var vn=new class extends Ps{constructor(){super(...arguments),this.type="arrow2Up",this.pathStr="M -0.5 0.25 L 0 -0.25 l 0.5 0.25"}draw(t,e,i,s){return bn(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return bn(t,this.parseSize(e)/4+n,i,s)}};function xn(t,e,i,s){const n=2*e;return t.moveTo(i-n,s-e),t.lineTo(i,s+e),t.lineTo(i+n,s-e),!0}var An=new class extends Ps{constructor(){super(...arguments),this.type="arrow2Down",this.pathStr="M -0.5 -0.25 L 0 0.25 l 0.5 -0.25"}draw(t,e,i,s){return xn(t,this.parseSize(e)/4,i,s)}drawOffset(t,e,i,s,n){return xn(t,this.parseSize(e)/4+n,i,s)}};function _n(t,e,i,s,n){return t.moveTo(i,s-e),t.lineTo(i,s+e),!0}var Sn=new class extends Ps{constructor(){super(...arguments),this.type="lineV",this.pathStr="M0,-0.5L0,0.5"}draw(t,e,i,s,n){return _n(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n,r){return _n(t,this.parseSize(e)/2+n,i,s)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e}, ${i-n} L ${e},${i+n}`}};function Tn(t,e,i,s,n){return t.moveTo(i-e,s),t.lineTo(i+e,s),!0}var Bn=new class extends Ps{constructor(){super(...arguments),this.type="lineH",this.pathStr="M-0.5,0L0.5,0"}draw(t,e,i,s,n){return Tn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n,r){return Tn(t,this.parseSize(e)/2+n,i,s)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e-n}, ${i} L ${e+n},${i}`}};function wn(t,e,i,s,n){return t.moveTo(i-e,s-e),t.lineTo(i+e,s+e),t.moveTo(i+e,s-e),t.lineTo(i-e,s+e),!0}var Cn=new class extends Ps{constructor(){super(...arguments),this.type="close",this.pathStr="M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5"}draw(t,e,i,s,n){return wn(t,this.parseSize(e)/2,i,s)}drawOffset(t,e,i,s,n,r){return wn(t,this.parseSize(e)/2+n,i,s)}drawToSvgPath(t,e,i,s){const n=this.parseSize(t)/2;return`M ${e-n}, ${i-n} L ${e+n},${i+n} M ${e+n}, ${i-n} L ${e-n},${i+n}`}};function Mn(t,e,i,s){return t.rect(i-e[0]/2,s-e[1]/2,e[0],e[1]),!1}function Pn(t,e,i,s){const n=e,r=e/2;return t.rect(i-n/2,s-r/2,n,r),!1}var kn=new class extends Ps{constructor(){super(...arguments),this.type="rect",this.pathStr="M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z"}draw(t,e,s,n){return i.isNumber(e)?Pn(t,e,s,n):Mn(t,e,s,n)}drawWithClipRange(t,e,s,n,r,a,o){i.isNumber(e)&&(e=[e,e/2]);const l=2*(e[0]+e[1])*r,h=[{x:s+e[0]/2,y:n-e[1]/2},{x:s+e[0]/2,y:n+e[1]/2},{x:s-e[0]/2,y:n+e[1]/2},{x:s-e[0]/2,y:n-e[1]/2}];let c=0,d=h[3];t.moveTo(d.x,d.y);for(let e=0;e<h.length;e++){const i=h[e],s=Math.sqrt((i.x-d.x)*(i.x-d.x)+(i.y-d.y)*(i.y-d.y));if(c+s>l){const e=(i.x-d.x)*(l-c)/s,n=(i.y-d.y)*(l-c)/s;t.lineTo(d.x+e,d.y+n);break}t.lineTo(i.x,i.y),d=i,c+=s}return!1}drawOffset(t,e,s,n,r){return i.isNumber(e)?Pn(t,e+2*r,s,n):Mn(t,[e[0]+2*r,e[1]+2*r],s,n)}};const On=new i.AABBBounds;class Rn{constructor(t,e){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.pathStr="",this.type=t,i.isArray(e)?this.svgCache=e:this.path=e,this.isSvg=s}drawOffset(t,e,i,s,n,r,a){return e=this.parseSize(e),this.isSvg?!!this.svgCache&&(this.svgCache.forEach((n=>{t.beginPath(),ie(n.path.commandList,t,i,s,e,e),a&&a(n.path,n.attribute)})),!1):(ie(this.path.commandList,t,i,s,e+n,e+n),!1)}draw(t,e,i,s,n,r){return e=this.parseSize(e),this.drawOffset(t,e,i,s,0,n,r)}parseSize(t){return i.isNumber(t)?t:Math.min(t[0],t[1])}drawWithClipRange(t,e,i,s,n,r,a){return e=this.parseSize(e),this.isSvg?!!this.svgCache&&(this.svgCache.forEach((r=>{r.path.drawWithClipRange(t,e,i,s,n),a&&a(r.path,r.attribute)})),!1):(this.path.drawWithClipRange(t,e,i,s,n),!1)}bounds(t,e){if(t=this.parseSize(t),this.isSvg){if(!this.svgCache)return;return e.clear(),void this.svgCache.forEach((i=>{let{path:s}=i;On.x1=s.bounds.x1*t,On.y1=s.bounds.y1*t,On.x2=s.bounds.x2*t,On.y2=s.bounds.y2*t,e.union(On)}))}this.path.bounds&&(e.x1=this.path.bounds.x1*t,e.y1=this.path.bounds.y1*t,e.x2=this.path.bounds.x2*t,e.y2=this.path.bounds.y2*t)}}const Ln={};[Os,Rs,Is,Ds,pn,Ns,Hs,Ks,qs,Js,nn,an,ln,Fs,cn,fn,yn,vn,An,kn,Sn,Bn,Cn].forEach((t=>{Ln[t.type]=t}));const In={arrowLeft:"M 0.25 -0.5 L -0.25 0 l 0.5 0.5",arrowRight:"M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5",rectRound:"M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",roundLine:"M 1.2392 -0.258 L -1.3432 -0.258 C -1.4784 -0.258 -1.588 -0.1436 -1.588 -0.002 c 0 0.1416 0.1096 0.256 0.2448 0.256 l 2.5824 0 c 0.1352 0 0.2448 -0.1144 0.2448 -0.256 C 1.484 -0.1436 1.3744 -0.258 1.2392 -0.258 z"};class En{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}function Dn(t,e,i,s){const n=t.indexOf(e,i);if(-1===n)throw new Error(s);return n+e.length-1}function jn(t,e,i){const s=function(t,e){let i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",n="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===s[0]){if(!s[1])return{data:n,index:r};if(t[r+1]===s[1])return{data:n,index:r}}else"\t"===e&&(e=" ");n+=e}}(t,e+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!s)return;let n=s.data;const r=s.index,a=n.search(/\s/);let o=n,l=!0;-1!==a&&(o=n.substr(0,a).replace(/\s\s*$/,""),n=n.substr(a+1));const h=o;if(i){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1),l=o!==s.data.substr(t+1))}return{tagName:o,tagExp:n,closeIndex:r,attrExpPresent:l,rawTagName:h}}const Un=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");class Fn{constructor(t){this.currentNode=null,this.options=t,this.tagsNodeStack=[],this.docTypeEntities={}}addChild(t,e,i){const s=e.tagname;"string"==typeof s?(e.tagname=s,t.addChild(e)):t.addChild(e)}buildAttributesMap(t,e,i){const s={};if(!t)return;const n=function(t,e){const i=[];let s=e.exec(t);for(;s;){const n=[];n.startIndex=e.lastIndex-s[0].length;const r=s.length;for(let t=0;t<r;t++)n.push(s[t]);i.push(n),s=e.exec(t)}return i}(t,Un),r=n.length;for(let t=0;t<r;t++){const e=n[t][1],i=n[t][4];e&&(s[e]=void 0===i||(isNaN(i)?i:Number(i)))}return s}parseXml(t){t=t.replace(/\r\n?/g,"\n");const e=new En("!xml");let i=e,s="",n="";for(let r=0;r<t.length;r++)if("<"===t[r])if("/"===t[r+1]){const e=Dn(t,">",r,"Closing Tag is not closed."),a=n.lastIndexOf(".");n=n.substring(0,a),i=this.tagsNodeStack.pop(),i&&i.child&&s&&i.child[i.child.length-1][":@"]&&(i.child[i.child.length-1][":@"].text=s),s="",r=e}else if("?"===t[r+1])r=jn(t,r,!1,"?>").closeIndex+1;else if("!--"===t.substr(r+1,3))r=Dn(t,"--\x3e",r+4,"Comment is not closed.");else{const a=jn(t,r,!1);let o=a.tagName,l=a.tagExp;const h=a.attrExpPresent,c=a.closeIndex;if(o!==e.tagname&&(n+=n?"."+o:o),l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===o[o.length-1]?(o=o.substr(0,o.length-1),n=n.substr(0,n.length-1),l=o):l=l.substr(0,l.length-1);const t=new En(o);o!==l&&h&&(t[":@"]=this.buildAttributesMap(l,n,o)),this.addChild(i,t,n),n=n.substr(0,n.lastIndexOf("."))}else{const t=new En(o);this.tagsNodeStack.push(i),o!==l&&h&&(t[":@"]=this.buildAttributesMap(l,n,o)),this.addChild(i,t,n),i=t}s="",r=c}else s+=t[r];return e.child}}function Nn(t,e){return Wn(t)}function Wn(t,e){const i={};for(let e=0;e<t.length;e++){const n=t[e],r=zn(n);if(void 0!==r&&n[r]){const t=Wn(n[r]);s=t,Object.keys(s).length,n[":@"]&&Gn(t,n[":@"]),void 0!==i[r]&&i.hasOwnProperty(r)?(Array.isArray(i[r])||(i[r]=[i[r]]),i[r].push(t)):i[r]=t}}var s;return i}function zn(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function Gn(t,e,i){if(e){const i=Object.keys(e),s=i.length;for(let n=0;n<s;n++){const s=i[n];t[s]=e[s]}}}class Vn{constructor(t){this.options=Object.assign({},Vn.defaultOptions,t)}valid(t){return t.startsWith("<")}parse(t){if(!this.valid)return!1;return Nn(new Fn(this.options).parseXml(t),this.options)}}function Hn(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.expand(e+(s/2+(i?function(t,e){return t?e:0}(i,e):0))),t}Vn.defaultOptions={};let Xn=0;function Yn(){return Xn++}var Kn;!function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(Kn||(Kn={}));const $n=new Map;["…","(",")","—","【","】","「","」","《","》"].forEach((t=>$n.set(t,!0)));const qn=new Map;function Zn(t){if($n.has(t))return!0;if(qn.has(t))return!1;let e=!1;return t.codePointAt(0)<256&&(e=!0),e}[""].forEach((t=>qn.set(t,!0)));const Jn=Yn(),Qn=Yn(),tr=Yn();Yn(),Yn();const er=Yn(),ir=Yn(),sr=Yn(),nr=Yn(),rr=Yn(),ar=Yn(),or=Yn(),lr=Yn(),hr=Yn();Yn();const cr=Yn(),dr=Yn(),ur=Symbol.for("GraphicCreator"),pr={"stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-width":"lineWidth","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity",stroke:"stroke",fill:"fill"},gr=Object.keys(pr),fr={duration:200,easing:"cubicOut"};function mr(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 yr(t,e,i){const s=i[0],n=i[1],r=i[2];let a,o,l,h,c,d,u,p,g,f,m,y;return e===t?(t[12]=e[0]*s+e[4]*n+e[8]*r+e[12],t[13]=e[1]*s+e[5]*n+e[9]*r+e[13],t[14]=e[2]*s+e[6]*n+e[10]*r+e[14],t[15]=e[3]*s+e[7]*n+e[11]*r+e[15]):(a=e[0],o=e[1],l=e[2],h=e[3],c=e[4],d=e[5],u=e[6],p=e[7],g=e[8],f=e[9],m=e[10],y=e[11],t[0]=a,t[1]=o,t[2]=l,t[3]=h,t[4]=c,t[5]=d,t[6]=u,t[7]=p,t[8]=g,t[9]=f,t[10]=m,t[11]=y,t[12]=a*s+c*n+g*r+e[12],t[13]=o*s+d*n+f*r+e[13],t[14]=l*s+u*n+m*r+e[14],t[15]=h*s+p*n+y*r+e[15]),t}function br(t,e,i){const s=e[0],n=e[1],r=e[2],a=e[3],o=e[4],l=e[5],h=e[6],c=e[7],d=e[8],u=e[9],p=e[10],g=e[11],f=e[12],m=e[13],y=e[14],b=e[15];let v=i[0],x=i[1],A=i[2],_=i[3];return t[0]=v*s+x*o+A*d+_*f,t[1]=v*n+x*l+A*u+_*m,t[2]=v*r+x*h+A*p+_*y,t[3]=v*a+x*c+A*g+_*b,v=i[4],x=i[5],A=i[6],_=i[7],t[4]=v*s+x*o+A*d+_*f,t[5]=v*n+x*l+A*u+_*m,t[6]=v*r+x*h+A*p+_*y,t[7]=v*a+x*c+A*g+_*b,v=i[8],x=i[9],A=i[10],_=i[11],t[8]=v*s+x*o+A*d+_*f,t[9]=v*n+x*l+A*u+_*m,t[10]=v*r+x*h+A*p+_*y,t[11]=v*a+x*c+A*g+_*b,v=i[12],x=i[13],A=i[14],_=i[15],t[12]=v*s+x*o+A*d+_*f,t[13]=v*n+x*l+A*u+_*m,t[14]=v*r+x*h+A*p+_*y,t[15]=v*a+x*c+A*g+_*b,t}function vr(t,e,i){const s=e[0],n=e[1],r=e[2];let a=i[3]*s+i[7]*n+i[11]*r+i[15];return a=a||1,t[0]=(i[0]*s+i[4]*n+i[8]*r+i[12])/a,t[1]=(i[1]*s+i[5]*n+i[9]*r+i[13])/a,t[2]=(i[2]*s+i[6]*n+i[10]*r+i[14])/a,t}class xr{constructor(){this.pools=[]}static identity(t){return mr(t)}allocate(){if(!this.pools.length)return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];const t=this.pools.pop();return xr.identity(t),t}allocateByObj(t){let e;e=this.pools.length?this.pools.pop():[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];for(let i=0;i<e.length;i++)e[i]=t[i];return e}free(t){t&&this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}}const Ar=new class{constructor(){this.pools=[]}allocate(t,e,s,n,r,a){if(!this.pools.length)return new i.Matrix(t,e,s,n,r,a);const o=this.pools.pop();return o.a=t,o.b=e,o.c=s,o.d=n,o.e=r,o.f=a,o}allocateByObj(t){if(!this.pools.length)return new i.Matrix(t.a,t.b,t.c,t.d,t.e,t.f);const e=this.pools.pop();return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e}free(t){this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}},_r=new xr;var Sr=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Tr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const Br=new i.Matrix(1,0,0,1,0,0),wr={x:0,y:0};let Cr=class{get nativeContext(){return this.path}constructor(t,e){this.matrix=new i.Matrix(1,0,0,1,0,0),this.stack=[],this.dpr=e,this.applyedMatrix=new i.Matrix(1,0,0,1,0,0),this.path=new ze,this._clearMatrix=new i.Matrix(1,0,0,1,0,0)}getCanvas(){throw new Error("不支持getCanvas")}getContext(){throw new Error("不支持getContext")}setTransformForCurrent(){!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.applyedMatrix.equalToMatrix(this.matrix)||(this.applyedMatrix=this.cloneMatrix(this.matrix))}get currentMatrix(){return this.matrix}cloneMatrix(t){return Ar.allocateByObj(t)}clear(){this.save(),this.resetTransform(),this.restore()}reset(){this.matrix.setValue(1,0,0,1,0,0),this.applyedMatrix=new i.Matrix(1,0,0,1,0,0),this.stack.length=0}restore(){this.stack.length>0&&(Ar.free(this.matrix),this.matrix=this.stack.pop(),this.setTransformForCurrent())}highPerformanceRestore(){this.stack.length>0&&(Ar.free(this.matrix),this.matrix=this.stack.pop())}rotate(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.matrix.rotate(t),e&&this.setTransformForCurrent()}save(){const t=this.cloneMatrix(this.matrix);this.stack.push(t)}highPerformanceSave(){const t=this.cloneMatrix(this.matrix);this.stack.push(t)}scale(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.matrix.scale(t,e),i&&this.setTransformForCurrent()}setScale(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.matrix.setScale(t,e),i&&this.setTransformForCurrent()}scalePoint(t,e,i,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];this.translate(i,s,!1),this.scale(t,e,!1),this.translate(-i,-s,!1),n&&this.setTransformForCurrent()}setTransform(t,e,i,s,n,r){let a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:this.dpr;this.matrix.setValue(o*t,o*e,o*i,o*s,o*n,o*r),a&&this.setTransformForCurrent()}setTransformFromMatrix(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dpr;this.matrix.setValue(t.a*i,t.b*i,t.c*i,t.d*i,t.e*i,t.f*i),e&&this.setTransformForCurrent()}resetTransform(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.dpr;this.setTransform(e,0,0,e,0,0),t&&this.setTransformForCurrent()}transform(t,e,i,s,n,r){let a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];this.matrix.multiply(t,e,i,s,n,r),a&&this.setTransformForCurrent()}transformFromMatrix(t,e){this.matrix.multiply(t.a,t.b,t.c,t.d,t.e,t.f),e&&this.setTransformForCurrent()}translate(t,e){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.matrix.translate(t,e),i&&this.setTransformForCurrent()}rotateDegrees(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=t*Math.PI/180;this.rotate(i,e)}rotateAbout(t,e,i){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.translate(e,i,!1),this.rotate(t,!1),this.translate(-e,-i,!1),s&&this.setTransformForCurrent()}rotateDegreesAbout(t,e,i){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.translate(e,i,!1),this.rotateDegrees(t,!1),this.translate(-e,-i,!1),s&&this.setTransformForCurrent()}beginPath(){this.path.clear()}clip(t,e){}arc(t,e,i,s,n,r){this.path.arc(t,e,i,s,n,r)}arcTo(t,e,i,s,n){this.path.arcTo(t,e,i,s,n)}bezierCurveTo(t,e,i,s,n,r){this.path.bezierCurveTo(t,e,i,s,n,r)}closePath(){this.path.closePath()}ellipse(t,e,i,s,n,r,a,o){}lineTo(t,e){this.path.lineTo(t,e)}moveTo(t,e){this.path.moveTo(t,e)}quadraticCurveTo(t,e,i,s){this.path.quadraticCurveTo(t,e,i,s)}rect(t,e,i,s){this.path.rect(t,e,i,s)}createImageData(t,e){return null}createLinearGradient(t,e,i,s){throw new Error("不支持createLinearGradient")}createPattern(t,e){throw new Error("不支持createPattern")}createRadialGradient(t,e,i,s,n,r){throw new Error("不支持createRadialGradient")}createConicGradient(t,e,i,s){return null}fill(t,e){}fillRect(t,e,i,s){this.path.rect(t,e,i,s)}clearRect(t,e,i,s){}fillText(t,e,i){}getImageData(t,e,i,s){return null}getLineDash(){return[]}isPointInPath(t,e){return this.matrix.transformPoint({x:t,y:e},wr),function(t,e,i){return ss(t,0,!1,e,i)}(this.path.commandList,wr.x,wr.y)}isPointInStroke(t,e){if(!this.lineWidth)return!1;this.matrix.transformPoint({x:t,y:e},wr);const i=fi(this,this.lineWidth,this.dpr);return function(t,e,i,s){return ss(t,e,!0,i,s)}(this.path.commandList,i,wr.x,wr.y)}measureText(t){throw new Error("不支持measureText")}putImageData(t,e,i){throw new Error("不支持measureText")}setLineDash(t){}stroke(t){}strokeRect(t,e,i,s){this.path.rect(t,e,i,s)}strokeText(t,e,i){}drawImage(){}setCommonStyle(t,e,i,s,n){}_setCommonStyle(t,e,i,s){}setStrokeStyle(t,e,i,s,n){}_setStrokeStyle(t,e,i,s){}setTextStyleWithoutAlignBaseline(t,e){}setTextStyle(t,e){}draw(){}clearMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.dpr;this.setTransformFromMatrix(Br,t,e)}setClearMatrix(t,e,i,s,n,r){this._clearMatrix.setValue(t,e,i,s,n,r)}onlyTranslate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dpr;return this.matrix.a===t&&0===this.matrix.b&&0===this.matrix.c&&this.matrix.d===t}release(){this.stack.forEach((t=>Ar.free(t))),this.stack.length=0}};var Mr;Cr=Sr([ht(),Tr("design:paramtypes",[Object,Number])],Cr),function(t){t[t.Color255=0]="Color255",t[t.Color1=1]="Color1"}(Mr||(Mr={}));class Pr{static Get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mr.Color1,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,0,1];if(e===Mr.Color1){const e=Pr.store1[t];if(e)return s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s;const n=i.Color.parseColorString(t);if(n){const e=[n.r/255,n.g/255,n.b/255,n.opacity];Pr.store1[t]=e,Pr.store255[t]=[n.r,n.g,n.b,n.opacity],s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3]}return s}const n=Pr.store255[t];if(n)return s[0]=n[0],s[1]=n[1],s[2]=n[2],s[3]=n[3],s;const r=i.Color.parseColorString(t);return r&&(Pr.store1[t]=[r.r/255,r.g/255,r.b/255,r.opacity],Pr.store255[t]=[r.r,r.g,r.b,r.opacity],s[0]=r.r,s[1]=r.g,s[2]=r.b,s[3]=r.opacity),s}static Set(t,e,i){if(e===Mr.Color1){if(Pr.store1[t])return;Pr.store1[t]=i,Pr.store255[t]=[Math.floor(255*i[0]),Math.floor(255*i[1]),Math.floor(255*i[2]),Math.floor(255*i[3])]}else{if(Pr.store255[t])return;Pr.store255[t]=i,Pr.store1[t]=[i[0]/255,i[1]/255,i[2]/255,i[3]]}}}function kr(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(t)&&i.isNumber(t[0])?e?`rgb(${Math.round(t[0])},${Math.round(t[1])},${Math.round(t[2])},${t[3].toFixed(2)})`:`rgb(${Math.round(t[0])},${Math.round(t[1])},${Math.round(t[2])})`:t}function Or(t,e,s,n,r){return Array.isArray(t)&&!i.isNumber(t[0])||Array.isArray(e)&&!i.isNumber(e[0])?new Array(4).fill(0).map(((r,a)=>{var o,l;return Rr(i.isArray(t)?null!==(o=t[a])&&void 0!==o?o:t[0]:t,i.isArray(e)?null!==(l=e[a])&&void 0!==l?l:e[0]:e,s,n)})):Rr(t,e,s,n,r)}function Rr(t,e,i,s,n){if(!t||!e)return t&&kr(t)||e&&kr(e)||!1;let r,a,o=!1,l=!1;if(Array.isArray(t)?r=t:"string"==typeof t?r=Pr.Get(t,Mr.Color255):o=!0,Array.isArray(e)?a=e:"string"==typeof e?a=Pr.Get(e,Mr.Color255):l=!0,o!==l){const r=o?t:e,a=o?e:t,l=Object.assign(Object.assign({},r),{stops:r.stops.map((t=>Object.assign(Object.assign({},t),{color:kr(a)})))});return o?Or(r,l,i,s,n):Or(l,r,i,s,n)}if(o){if(t.gradient===e.gradient){const s=t,n=e,r=s.stops,a=n.stops;if(r.length!==a.length)return!1;if("linear"===s.gradient)return function(t,e,i){const s=t.stops,n=e.stops;return{gradient:"linear",x0:t.x0+(e.x0-t.x0)*i,x1:t.x1+(e.x1-t.x1)*i,y0:t.y0+(e.y0-t.y0)*i,y1:t.y1+(e.y1-t.y1)*i,stops:new Array(s.length).fill(0).map(((t,e)=>({color:Dr(s[e].color,n[e].color,i),offset:s[e].offset+(n[e].offset-s[e].offset)*i})))}}(s,n,i);if("radial"===s.gradient)return function(t,e,i){const s=t.stops,n=e.stops;return{gradient:"radial",x0:t.x0+(e.x0-t.x0)*i,x1:t.x1+(e.x1-t.x1)*i,y0:t.y0+(e.y0-t.y0)*i,y1:t.y1+(e.y1-t.y1)*i,r0:t.r0+(e.r0-t.r0)*i,r1:t.r1+(e.r1-t.r1)*i,stops:new Array(s.length).fill(0).map(((t,e)=>({color:Dr(s[e].color,n[e].color,i),offset:s[e].offset+(n[e].offset-s[e].offset)*i})))}}(s,n,i);if("conical"===s.gradient)return function(t,e,i){const s=t.stops,n=e.stops;return{gradient:"conical",startAngle:t.startAngle+(e.startAngle-t.startAngle)*i,endAngle:t.endAngle+(e.endAngle-t.endAngle)*i,x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i,stops:new Array(s.length).fill(0).map(((t,e)=>({color:Dr(s[e].color,n[e].color,i),offset:s[e].offset+(n[e].offset-s[e].offset)*i})))}}(s,n,i)}return!1}return n&&n(r,a),kr(function(t,e,i){return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i,t[2]+(e[2]-t[2])*i,t[3]+(e[3]-t[3])*i]}(r,a,i),s)}function Lr(t,e,i){return`rgba(${t[0]+(e[0]-t[0])*i},${t[1]+(e[1]-t[1])*i},${t[2]+(e[2]-t[2])*i},${t[3]+(e[3]-t[3])*i})`}Pr.store255={},Pr.store1={};const Ir=[0,0,0,0],Er=[0,0,0,0];function Dr(t,e,i){return Pr.Get(t,Mr.Color255,Ir),Pr.Get(e,Mr.Color255,Er),`rgba(${Math.round(Ir[0]+(Er[0]-Ir[0])*i)},${Math.round(Ir[1]+(Er[1]-Ir[1])*i)},${Math.round(Ir[2]+(Er[2]-Ir[2])*i)},${Ir[3]+(Er[3]-Ir[3])*i})`}const jr=new i.AABBBounds,Ur=new i.Matrix;new i.AABBBounds;const Fr=["lineWidth","scaleX","scaleY","angle","anchor","visible"],Nr=["x","y"],Wr=["scaleX","scaleY"],zr=["angle"],Gr=new i.Point,Vr={strokeSeg:1,boundsPadding:2,pickMode:1,boundsMode:1,customPickShape:1,pickable:1,childrenPickable:1,visible:1,zIndex:1,layout:1,keepDirIn3d:1,globalZIndex:1,outerBorder:1,innerBorder:1,lineDash:1,lineCap:1,lineJoin:1,miterLimit:2,strokeBoundsBuffer:2,scaleCenter:1,anchor:1,anchor3d:1,postMatrix:1,backgroundMode:2,background:1,texture:1,cursor:1,html:1};class Hr extends ps{static mixin(t){const e=Object.keys(t);for(let i=0;i<e.length;++i){const s=e[i];Object.defineProperty(Hr.prototype,s,Object.getOwnPropertyDescriptor(t,s))}}get AABBBounds(){return this.tryUpdateAABBBounds()}get OBBBounds(){return this.tryUpdateOBBBounds()}get globalAABBBounds(){return this.tryUpdateGlobalAABBBounds()}get transMatrix(){return this.tryUpdateLocalTransMatrix(!0)}get globalTransMatrix(){return this.tryUpdateGlobalTransMatrix(!0)}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var e;super(),this._AABBBounds=new i.AABBBounds,this._updateTag=Yt.INIT,this.attribute=t,this.valid=this.isValid(),this.updateAABBBoundsStamp=0,t.background?this.loadImage(null!==(e=t.background.background)&&void 0!==e?e:t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic)}getGraphicService(){var t,e;return null!==(e=null===(t=this.stage)||void 0===t?void 0:t.graphicService)&&void 0!==e?e:kt.graphicService}getAttributes(){return this.attribute}setMode(t){"3d"===t?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}getOffsetXY(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var i,s;const{dx:n=t.dx,dy:r=t.dy}=this.attribute;if(e&&this.parent){const t=this.parent.attribute;Gr.x=n+(null!==(i=t.scrollX)&&void 0!==i?i:0),Gr.y=r+(null!==(s=t.scrollY)&&void 0!==s?s:0)}else Gr.x=n,Gr.y=r;return Gr}onAnimateBind(t){this._emitCustomEvent("animate-bind",t)}tryUpdateAABBBounds(){const t="imprecise"===this.attribute.boundsMode;if(!this.shouldUpdateAABBBounds())return this._AABBBounds;if(!this.valid)return this._AABBBounds.clear(),this._AABBBounds;this.getGraphicService().beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const e=this.doUpdateAABBBounds(t);return this.getGraphicService().afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,!0),"empty"===this.attribute.boundsMode&&e.clear(),e}tryUpdateOBBBounds(){return this._OBBBounds||(this._OBBBounds=new i.OBBBounds),this.tryUpdateAABBBounds(),this.updateOBBBoundsStamp===this.updateAABBBoundsStamp?this._OBBBounds:(this.updateOBBBoundsStamp=this.updateAABBBoundsStamp,this.valid?this.doUpdateOBBBounds():(this._OBBBounds.clear(),this._OBBBounds))}combindShadowAABBBounds(t){if(this.shadowRoot){const e=this.shadowRoot.AABBBounds.clone();t.union(e)}}doUpdateOBBBounds(){return this._OBBBounds}getClipPath(){const{clipConfig:t}=this.attribute;if(!t)return null;this.clipPathMap||(this.clipPathMap=new Map);const{shape:e}=t;let i=this.clipPathMap.get(e)||null;return i||(this.clipPathMap.size>10&&this.clipPathMap.clear(),i=this.parsePath(e),i&&this.clipPathMap.set(e,i)),i}parsePath(t){if(!t)return null;let e=Ln[t];if(e)return e;if(e=Hr.userSymbolMap[t],e)return e;if(!0===((s=t=In[t]||t).startsWith("<svg")||s.startsWith("<?xml"))){const e=new Vn,{svg:s}=e.parse(t);if(!s)return null;const n=i.isArray(s.path)?s.path:[s.path];jr.clear();const r=[];n.forEach((t=>{const e=(new ze).fromString(t.d),i={};gr.forEach((e=>{t[e]&&(i[pr[e]]=t[e])})),r.push({path:e,attribute:i}),jr.union(e.bounds)}));const a=jr.width(),o=jr.height(),l=1/i.max(a,o);r.forEach((t=>t.path.transform(0,0,l,l)));const h=new Rn(t,r,!0);return Hr.userSymbolMap[t]=h,h}var s;const n=(new ze).fromString(t),r=n.bounds.width(),a=n.bounds.height(),o=1/i.max(r,a);n.transform(0,0,o,o);const l=new Rn(t,n);return Hr.userSymbolMap[t]=l,l}doUpdateAABBBounds(t){this.updateAABBBoundsStamp++;const e=this.getGraphicTheme();this._AABBBounds.clear();const i=this.attribute,s=this.updateAABBBounds(i,e,this._AABBBounds,t),{boundsPadding:n=e.boundsPadding}=i,r=_s(n);return r&&s.expand(r),this.clearUpdateBoundTag(),s}updatePathProxyAABBBounds(t){const e="function"==typeof this.pathProxy?this.pathProxy(this.attribute):this.pathProxy;if(!e)return!1;const i=new Dt(t);return ie(e.commandList,i,0,0),!0}tryUpdateGlobalAABBBounds(){const t=this.AABBBounds;return this._globalAABBBounds?this._globalAABBBounds.setValue(t.x1,t.y1,t.x2,t.y2):this._globalAABBBounds=t.clone(),this._globalAABBBounds.empty()||this.parent&&this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix),this._globalAABBBounds}tryUpdateGlobalTransMatrix(){if(this._globalTransMatrix){if(this.parent){const t=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();return this.shouldUpdateGlobalMatrix()&&this.doUpdateGlobalMatrix(),this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!0}tryUpdateLocalTransMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._transMatrix||(this._transMatrix=new i.Matrix),this.shouldUpdateLocalMatrix()&&(this.doUpdateLocalMatrix(),t&&this.clearUpdateLocalPositionTag()),this._transMatrix}shouldUpdateAABBBounds(){return this.shadowRoot?(!!(this._updateTag&Yt.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds())&&this.getGraphicService().validCheck(this.attribute,this.getGraphicTheme(),this._AABBBounds,this):!!(this._updateTag&Yt.UPDATE_BOUNDS)&&this.getGraphicService().validCheck(this.attribute,this.getGraphicTheme(),this._AABBBounds,this)}shouldSelfChangeUpdateAABBBounds(){return this.shadowRoot?!!(this._updateTag&Yt.UPDATE_BOUNDS)||this.shadowRoot.shouldUpdateAABBBounds():!!(this._updateTag&Yt.UPDATE_BOUNDS)}shouldUpdateLocalMatrix(){return!!(this._updateTag&Yt.UPDATE_LOCAL_MATRIX)}isValid(){var t,e;const i=this.attribute;return Number.isFinite((null!==(t=i.x)&&void 0!==t?t:0)+(null!==(e=i.y)&&void 0!==e?e:0))}_validNumber(t){return null==t||Number.isFinite(t)}shouldUpdateShape(){return!!(this._updateTag&Yt.UPDATE_SHAPE)}clearUpdateShapeTag(){this._updateTag&=Yt.CLEAR_SHAPE}containsPoint(t,e,s,n){if(!n)return!1;if(s===Kt.GLOBAL){const s=new i.Point(t,e);this.parent&&this.parent.globalTransMatrix.transformPoint(s,s),t=s.x,e=s.y}return n.containsPoint(this,{x:t,y:e})}setWidthHeightWithoutTransform(t){this.widthWithoutTransform=t.x2-t.x1,this.heightWithoutTransform=t.y2-t.y1}setAttributesAndPreventAnimate(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;this.setAttributes(t,e,i),this.animates&&this.animates.forEach((e=>{Object.keys(t).forEach((t=>{e.preventAttr(t)}))}))}setAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;(t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,i)||t).background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._setAttributes(t,e,i)}_setAttributes(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;const s=Object.keys(t);for(let e=0;e<s.length;e++){const i=s[e];this.attribute[i]=t[i]}this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!e&&!this.needUpdateTags(s)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i)}setAttribute(t,e,s,n){var r;const a=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({[t]:e},this.attribute,t,n);a?this._setAttributes(a,s,n):i.isNil(null===(r=this.normalAttrs)||void 0===r?void 0:r[t])?(this.attribute[t]=e,this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!s&&!this.needUpdateTag(t)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n)):this.normalAttrs[t]=e,"background"===t?this.loadImage(e,!0):"shadowGraphic"===t&&this.setShadowGraphic(e)}needUpdateTags(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr;for(let i=0;i<e.length;i++){const s=e[i];if(-1!==t.indexOf(s))return!0}return!1}needUpdateTag(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr;for(let i=0;i<e.length;i++)if(t===e[i])return!0;return!1}initAttributes(t){const e={type:$t.INIT};t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,e)||t,this.attribute=t,t.background?this.loadImage(t.background,!0):t.shadowGraphic&&this.setShadowGraphic(t.shadowGraphic),this._updateTag=Yt.INIT,this.valid=this.isValid(),this.onAttributeUpdate(e)}translate(t,e){var i,s;if(0===t&&0===e)return this;const n={type:$t.TRANSLATE},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,Nr,n);r&&(t=r.x,e=r.y,delete r.x,delete r.y,this._setAttributes(r));const a=this.attribute,o=a.postMatrix;return o?kt.transformUtil.fromMatrix(o,o).translate(t,e):(a.x=(null!==(i=a.x)&&void 0!==i?i:He.x)+t,a.y=(null!==(s=a.y)&&void 0!==s?s:He.y)+e),this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this}translateTo(t,e){const i=this.attribute;if(i.x===t&&i.y===e)return this;const s={type:$t.TRANSLATE_TO},n=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({x:t,y:e},this.attribute,Nr,s);return n?(this._setAttributes(n,!1,s),this):(i.x=t,i.y=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(s),this)}scale(t,e,s){var n,r;if(1===t&&1===e)return this;const a={type:$t.SCALE},o=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e,scaleCenter:s},this.attribute,Wr,a);o&&(t=o.scaleX,e=o.scaleY,delete o.scaleX,delete o.scaleY,this._setAttributes(o));const l=this.attribute;if(s){let{postMatrix:n}=this.attribute;n||(n=new i.Matrix,l.postMatrix=n),kt.transformUtil.fromMatrix(n,n).scale(t,e,s)}else l.scaleX=(null!==(n=l.scaleX)&&void 0!==n?n:He.scaleX)*t,l.scaleY=(null!==(r=l.scaleY)&&void 0!==r?r:He.scaleY)*e;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(a),this}scaleTo(t,e){const i=this.attribute;if(i.scaleX===t&&i.scaleY===e)return this;const s={type:$t.SCALE_TO},n=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({scaleX:t,scaleY:e},this.attribute,Wr,s);return n?(this._setAttributes(n,!1,s),this):(i.scaleX=t,i.scaleY=e,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(s),this)}rotate(t,e){var s;if(0===t)return this;const n={type:$t.ROTATE},r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({angle:t,rotateCenter:e},this.attribute,zr,n);r&&(delete r.angle,this._setAttributes(r,!1,n));const a=this.attribute;if(e){let{postMatrix:s}=this.attribute;s||(s=new i.Matrix,a.postMatrix=s),kt.transformUtil.fromMatrix(s,s).rotate(t,e)}else a.angle=(null!==(s=a.angle)&&void 0!==s?s:He.angle)+t;return this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(n),this}rotateTo(t){const e=this.attribute;if(e.angle===t)return this;const i={type:$t.ROTATE_TO},s=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,zr,i);return s?(this._setAttributes(s,!1,i),this):(e.angle=t,this.addUpdatePositionTag(),this.addUpdateBoundTag(),this.addUpdateLayoutTag(),this.onAttributeUpdate(i),this)}skewTo(t,e){return this}onAttributeUpdate(t){t&&t.skipUpdateCallback||(this.getGraphicService().onAttributeUpdate(this),this._emitCustomEvent("afterAttributeUpdate",t))}update(t){t?(t.bounds&&this.tryUpdateAABBBounds(),t.trans&&this.tryUpdateLocalTransMatrix()):(this.tryUpdateAABBBounds(),this.tryUpdateLocalTransMatrix())}hasState(t){return!(!this.currentStates||!this.currentStates.length)&&(!!i.isNil(t)||this.currentStates.includes(t))}getState(t){var e;return null===(e=this.states)||void 0===e?void 0:e[t]}applyStateAttrs(t,e,i,s){var n,r;if(i){const e=Object.keys(t),i=this.getNoWorkAnimateAttr(),a={};let o;e.forEach((e=>{i[e]?(o||(o={}),o[e]=t[e]):a[e]=s&&void 0===t[e]?this.getDefaultAttribute(e):t[e]}));const l=null!==(r=null!==(n=this.context&&this.context.stateAnimateConfig)&&void 0!==n?n:this.stateAnimateConfig)&&void 0!==r?r:fr;this.applyAnimationState(["state"],[{name:"state",animation:{type:"state",to:a,duration:l.duration,easing:l.easing}}]),o&&this.setAttributesAndPreventAnimate(o,!1,{type:$t.STATE})}else this.stopStateAnimates(),this.setAttributesAndPreventAnimate(t,!1,{type:$t.STATE});this._emitCustomEvent("afterStateUpdate",{type:$t.STATE})}updateNormalAttrs(t){const e={};this.normalAttrs?(Object.keys(t).forEach((t=>{t in this.normalAttrs?(e[t]=this.normalAttrs[t],delete this.normalAttrs[t]):e[t]=this.getNormalAttribute(t)})),Object.keys(this.normalAttrs).forEach((e=>{t[e]=this.normalAttrs[e]}))):Object.keys(t).forEach((t=>{e[t]=this.getNormalAttribute(t)})),this.normalAttrs=e}stopStateAnimates(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"end";this.animates&&this.animates.forEach((e=>{e.stateNames&&(e.stop(t),this.animates.delete(e.id))}))}getNormalAttribute(t){var e,i;const s=this.attribute[t];return this.animates?null===(e=this.finalAttribute)||void 0===e?void 0:e[t]:null!=s?s:null===(i=this.finalAttribute)||void 0===i?void 0:i[t]}clearStates(t){this.hasState()&&this.normalAttrs?(this.currentStates=[],this.applyStateAttrs(this.normalAttrs,this.currentStates,t,!0)):this.currentStates=[],this.normalAttrs=null}removeState(t,e){if(this.currentStates){const s=i.isArray(t)?e=>!t.includes(e):e=>e!==t,n=this.currentStates.filter(s);n.length!==this.currentStates.length&&this.useStates(n,e)}}toggleState(t,e){if(this.hasState(t))this.removeState(t,e);else if((this.currentStates?this.currentStates.indexOf(t):-1)<0){const i=this.currentStates?this.currentStates.slice():[];i.push(t),this.useStates(i,e)}}addState(t,e,i){var s;if(this.currentStates&&this.currentStates.includes(t)&&(e||1===this.currentStates.length))return;const n=e&&(null===(s=this.currentStates)||void 0===s?void 0:s.length)?this.currentStates.concat([t]):[t];this.useStates(n,i)}useStates(t,e){var i;if(!t.length)return void this.clearStates(e);if((null===(i=this.currentStates)||void 0===i?void 0:i.length)===t.length&&!t.some(((t,e)=>this.currentStates[e]!==t)))return;const s={};t.forEach((e=>{var i;const n=this.stateProxy?this.stateProxy(e,t):null===(i=this.states)||void 0===i?void 0:i[e];n&&Object.assign(s,n)})),this.updateNormalAttrs(s),this.currentStates=t,this.applyStateAttrs(s,t,e)}addUpdateBoundTag(){this._updateTag|=Yt.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}addUpdateShapeTag(){this._updateTag|=Yt.UPDATE_SHAPE}addUpdateShapeAndBoundsTag(){this._updateTag|=Yt.UPDATE_SHAPE_AND_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag(),this.glyphHost&&this.glyphHost.addUpdateBoundTag()}updateShapeAndBoundsTagSetted(){return(this._updateTag&Yt.UPDATE_SHAPE_AND_BOUNDS)===Yt.UPDATE_SHAPE_AND_BOUNDS}clearUpdateBoundTag(){this._updateTag&=Yt.CLEAR_BOUNDS}addUpdatePositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=Yt.UPDATE_GLOBAL_LOCAL_MATRIX}addUpdateGlobalPositionTag(){this.shadowRoot&&this.shadowRoot.addUpdateGlobalPositionTag(),this._updateTag|=Yt.UPDATE_GLOBAL_MATRIX}clearUpdateLocalPositionTag(){this._updateTag&=Yt.CLEAR_LOCAL_MATRIX}clearUpdateGlobalPositionTag(){this._updateTag&=Yt.CLEAR_GLOBAL_MATRIX}addUpdateLayoutTag(){this._updateTag|=Yt.UPDATE_LAYOUT}clearUpdateLayoutTag(){this._updateTag&=Yt.CLEAR_LAYOUT}needUpdateLayout(){return!!(this._updateTag&Yt.UPDATE_LAYOUT)}getAnchor(t,e,i){const s=[0,0],n=()=>{if(e.b)return e.b;const t=this.clone();return t.attribute.angle=0,t.attribute.scaleCenter=null,i&&(t.attribute.scaleX=1,t.attribute.scaleY=1),e.b=t.AABBBounds,e.b};if("string"==typeof t[0]){const e=parseFloat(t[0])/100,i=n();s[0]=i.x1+(i.x2-i.x1)*e}else s[0]=t[0];if("string"==typeof t[1]){const e=parseFloat(t[1])/100,i=n();s[1]=i.y1+(i.y2-i.y1)*e}else s[1]=t[1];return s}doUpdateLocalMatrix(){const{x:t=He.x,y:e=He.y,scaleX:s=He.scaleX,scaleY:n=He.scaleY,angle:r=He.angle,scaleCenter:a,anchor:o,postMatrix:l}=this.attribute;let h=[0,0];const c={};if(o&&r&&(h=this.getAnchor(o,c)),!a||1===s&&1===n)i.normalTransform(this._transMatrix,this._transMatrix.reset(),t,e,s,n,r,o&&h);else{const i=this._transMatrix;i.reset(),i.translate(h[0],h[1]),i.rotate(r),i.translate(-h[0],-h[1]),i.translate(t,e),h=this.getAnchor(a,c,!0),kt.transformUtil.fromMatrix(i,i).scale(s,n,{x:h[0],y:h[1]})}const d=this.getOffsetXY(He);if(this._transMatrix.e+=d.x,this._transMatrix.f+=d.y,l){const t=Ur.setValue(l.a,l.b,l.c,l.d,l.e,l.f),e=this._transMatrix;t.multiply(e.a,e.b,e.c,e.d,e.e,e.f),e.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}doUpdateGlobalMatrix(){if(this.parent){this._globalTransMatrix.multiply(this.transMatrix.a,this.transMatrix.b,this.transMatrix.c,this.transMatrix.d,this.transMatrix.e,this.transMatrix.f);const{scrollX:t=0,scrollY:e=0}=this.parent.attribute;this._globalTransMatrix.translate(t,e)}}setStage(t,e){if(this.stage!==t){if(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this.animates&&this.animates.size){const e=t.getTimeline();this.animates.forEach((t=>{t.timeline.isGlobal&&(t.setTimeline(e),e.addAnimate(t))}))}this._onSetStage&&this._onSetStage(this,t,e),this.getGraphicService().onSetStage(this,t)}}setStageToShadowRoot(t,e){this.shadowRoot&&this.shadowRoot.setStage(t,e)}onAddStep(t){}onStop(t){t&&this.setAttributes(t,!1,{type:$t.ANIMATE_END})}getDefaultAttribute(t){return this.getGraphicTheme()[t]}getComputedAttribute(t){var e;return null!==(e=this.attribute[t])&&void 0!==e?e:this.getDefaultAttribute(t)}onSetStage(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._onSetStage=t,e&&this.stage&&t(this,this.stage)}attachShadow(t){return t&&(t.shadowHost=this),this.shadowRoot=null!=t?t:kt.graphicService.creator.shadowRoot(this),this.addUpdateBoundTag(),this.shadowRoot.setStage(this.stage,this.layer),this.shadowRoot}detachShadow(){this.shadowRoot&&(this.addUpdateBoundTag(),this.shadowRoot.release(!0),this.shadowRoot=null)}toJson(){return{attribute:this.attribute,_uid:this._uid,type:this.type,name:this.name,children:this.children.map((t=>t.toJson()))}}createPathProxy(t){return i.isString(t,!0)?this.pathProxy=(new ze).fromString(t):this.pathProxy=new ze,this.pathProxy}loadImage(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t||e&&function(t){return!(!t.fill&&!t.stroke)}(t))return;const s=t;this.resources||(this.resources=new Map);const n={data:"init",state:null};this.resources.set(s,n),"string"==typeof t?(n.state="loading",t.startsWith("<svg")?(ys.GetSvg(t,this),this.backgroundImg=this.backgroundImg||e):(i.isValidUrl(t)||t.includes("/")||i.isBase64(t))&&(ys.GetImage(t,this),this.backgroundImg=this.backgroundImg||e)):i.isObject(t)?(n.state="success",n.data=t,this.backgroundImg=this.backgroundImg||e):n.state="fail"}setShadowGraphic(t){t?this.attachShadow().add(t):this.detachShadow()}imageLoadSuccess(t,e,i){if(!this.resources)return;const s=this.resources.get(t);s&&(s.state="success",s.data=e,i&&i(),this.addUpdateBoundTag(),this.stage&&this.stage.renderNextFrame())}imageLoadFail(t,e){if(!this.resources)return;const i=this.resources.get(t);i&&(i.state="fail",e&&e())}_stopAnimates(t){t&&t.forEach((t=>{t.stop()}))}stopAnimates(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._stopAnimates(this.animates),this.shadowRoot&&this.shadowRoot.stopAnimates(!0),this.isContainer&&t&&this.forEachChildren((e=>{e.stopAnimates(t)}))}release(){this.releaseStatus="released",this.stopAnimates(),kt.graphicService.onRelease(this)}_emitCustomEvent(t,e){var i,s;if(this._events&&t in this._events){const n=new fs(t,e);n.bubbles=!1,n.manager=null===(s=null===(i=this.stage)||void 0===i?void 0:i.eventSystem)||void 0===s?void 0:s.manager,this.dispatchEvent(n)}}toCustomPath(){var t,e,i;const s=null===(i=null===(e=(null===(t=this.stage)||void 0===t?void 0:t.renderService)||kt.renderService)||void 0===e?void 0:e.drawContribution)||void 0===i?void 0:i.getRenderContribution(this);if(s){const t=new Cr(null,1);return s.drawShape(this,t,0,0,{},{}),t.path}return null}}var Xr;Hr.userSymbolMap={},Hr.mixin(ms),function(t){t[t.LESS_GROUP=0]="LESS_GROUP",t[t.MORE_GROUP=1]="MORE_GROUP"}(Xr||(Xr={}));class Yr extends Hr{constructor(t){super(t),this.type="group",this.parent=null,this.isContainer=!0,this.numberType=er,this._childUpdateTag=Yt.UPDATE_BOUNDS}setMode(t){"3d"===t?this.set3dMode():this.set2dMode()}set3dMode(){this.in3dMode=!0}set2dMode(){this.in3dMode=!1}setTheme(t){return this.theme||(this.theme=new hs),this.theme.setTheme(t,this)}createTheme(){this.theme||(this.theme=new hs)}visibleAll(t){this.setAttribute("visible",t),this.forEachChildren((e=>{e.isContainer&&e.visibleAll?e.visibleAll(t):e.setAttribute("visible",t)}))}hideAll(){this.visibleAll(!1)}showAll(){this.visibleAll(!0)}containsPoint(t,e,s){if(s===Kt.GLOBAL){const s=new i.Point(t,e);return this.parent&&this.parent.globalTransMatrix.transformPoint(s,s),this.AABBBounds.contains(s.x,s.y)}return this.AABBBounds.contains(t,e)}shouldUpdateAABBBounds(){return!!super.shouldUpdateAABBBounds()||!!(this._childUpdateTag&Yt.UPDATE_BOUNDS)}tryUpdateAABBBounds(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;this.getGraphicService().beforeUpdateAABBBounds(this,this.stage,!0,this._AABBBounds);const t=this.shouldSelfChangeUpdateAABBBounds(),e=this.doUpdateAABBBounds();return this.addUpdateLayoutTag(),this.getGraphicService().afterUpdateAABBBounds(this,this.stage,this._AABBBounds,this,t),"empty"===this.attribute.boundsMode&&e.clear(),e}doUpdateLocalMatrix(){const{x:t=He.x,y:e=He.y,dx:i=He.dx,dy:s=He.dy,scaleX:n=He.scaleX,scaleY:r=He.scaleY,angle:a=He.angle,postMatrix:o}=this.attribute;if(0!==t||0!==e||0!==i||0!==s||1!==n||1!==r||0!==a||o)return super.doUpdateLocalMatrix();this._transMatrix.reset()}getGraphicTheme(){return ds(this).group}updateAABBBounds(t,e,i){const s=i;i=i.clone();const{width:n,height:r,path:a,clip:o=e.clip}=t;if(a&&a.length?a.forEach((t=>{i.union(t.AABBBounds)})):null!=n&&null!=r&&i.set(0,0,Math.max(0,n),Math.max(0,r)),!o){this.forEachChildren((t=>{i.union(t.AABBBounds)}));const{scrollX:e=0,scrollY:s=0}=t;i.translate(e,s)}return kt.graphicService.updateTempAABBBounds(i),kt.graphicService.transformAABBBounds(t,i,e,!1,this),s.copy(i),s}doUpdateAABBBounds(){this.updateAABBBoundsStamp++;const t=super.doUpdateAABBBounds();return this.parent&&this.parent.addChildUpdateBoundTag(),this._emitCustomEvent("AAABBBoundsChange"),t}clearUpdateBoundTag(){this._updateTag&=Yt.CLEAR_BOUNDS,this._childUpdateTag&=Yt.CLEAR_BOUNDS}addUpdateBoundTag(){this._updateTag|=Yt.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag()}addChildUpdateBoundTag(){this._childUpdateTag&Yt.UPDATE_BOUNDS||(this._childUpdateTag|=Yt.UPDATE_BOUNDS,this.parent&&this.parent.addChildUpdateBoundTag())}getTheme(){return this.theme.getTheme(this)}incrementalAppendChild(t){const e=super.appendChild(t);return this.stage&&e&&(e.stage=this.stage,e.layer=this.layer),this.addUpdateBoundTag(),this.getGraphicService().onAddIncremental(t,this,this.stage),e}incrementalClearChild(){super.removeAllChild(),this.addUpdateBoundTag(),this.getGraphicService().onClearIncremental(this,this.stage)}_updateChildToStage(t){return this.stage&&t&&t.setStage(this.stage,this.layer),this.addUpdateBoundTag(),t}appendChild(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=super.appendChild(t);return e&&this.stage&&i&&i.setStage(this.stage,this.layer),this.addUpdateBoundTag(),i}insertBefore(t,e){return this._updateChildToStage(super.insertBefore(t,e))}insertAfter(t,e){return this._updateChildToStage(super.insertAfter(t,e))}insertInto(t,e){return this._updateChildToStage(super.insertInto(t,e))}removeChild(t){const e=super.removeChild(t);return t.stage=null,this.getGraphicService().onRemove(t),this.addUpdateBoundTag(),e}removeAllChild(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.forEachChildren((e=>{this.getGraphicService().onRemove(e),t&&e.isContainer&&e.removeAllChild(t)})),super.removeAllChild(),this.addUpdateBoundTag()}setStage(t,e){this.stage!==t&&(this.stage=t,this.layer=e,this.setStageToShadowRoot(t,e),this._onSetStage&&this._onSetStage(this,t,e),this.getGraphicService().onSetStage(this,t),this.forEachChildren((e=>{e.setStage(t,this.layer)})))}addUpdatePositionTag(){super.addUpdatePositionTag(),this.forEachChildren((t=>{t.isContainer&&t.addUpdateGlobalPositionTag()}))}addUpdateGlobalPositionTag(){super.addUpdateGlobalPositionTag(),this.forEachChildren((t=>{t.isContainer&&t.addUpdateGlobalPositionTag()}))}tryUpdateGlobalTransMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.shouldUpdateGlobalMatrix()){if(this._globalTransMatrix){if(this.parent){const t=this.parent.globalTransMatrix;this._globalTransMatrix.setValue(t.a,t.b,t.c,t.d,t.e,t.f)}}else this._globalTransMatrix=this.parent?this.parent.globalTransMatrix.clone():this.transMatrix.clone();this.doUpdateGlobalMatrix(),t&&this.clearUpdateGlobalPositionTag()}return this._globalTransMatrix}shouldUpdateGlobalMatrix(){return!!(this._updateTag&Yt.UPDATE_GLOBAL_MATRIX)}_getChildByName(t,e){return this.find((e=>e.name===t),e)}createOrUpdateChild(t,e,i){let s=this._getChildByName(t);return s?s.setAttributes(e):(s=kt.graphicService.creator[i](e),s.name=t,this.add(s)),s}clone(){return new Yr(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Yr.NOWORK_ANIMATE_ATTR}release(t){t&&this.forEachChildren((e=>{e.release(t)})),super.release()}}function Kr(t){return new Yr(t)}function $r(t,e){return!(!t&&!e)}function qr(t,e){let s;return s=i.isArray(t)?t.some((t=>t||void 0===t)):!!t,s&&e>0}function Zr(t,e,i){return i&&t*e>0}function Jr(t,e,i,s,n){return n&&t*e>0&&0!==i&&0!==s}function Qr(t,e){return t*e>0}function ta(t,e,i,s){return t*e>0&&0!==i&&0!==s}function ea(t,e,i,s,n,r,a){const o=t-i,l=e-s,h=(a?r:-r)/Math.sqrt(o*o+l*l),c=h*l,d=-h*o,u=t+c,p=e+d,g=i+c,f=s+d,m=(u+g)/2,y=(p+f)/2,b=g-u,v=f-p,x=b*b+v*v,A=n-r,_=u*f-g*p,S=(v<0?-1:1)*Math.sqrt(Math.max(0,A*A*x-_*_));let T=(_*v-b*S)/x,B=(-_*b-v*S)/x;const w=(_*v+b*S)/x,C=(-_*b+v*S)/x,M=T-m,P=B-y,k=w-m,O=C-y;return M*M+P*P>k*k+O*O&&(T=w,B=C),{cx:T,cy:B,x01:-c,y01:-d,x11:T*(n/A-1),y11:B*(n/A-1)}}function ia(t,e,s,n,r){const a=i.abs(s-e),o=t.getParsedCornerRadius(),l=i.isArray(o),{outerDeltaAngle:h,innerDeltaAngle:c,outerStartAngle:d,outerEndAngle:u,innerEndAngle:p,innerStartAngle:g}=t.getParsePadAngle(e,s),f=l?o[0]:o,m=l?o[1]:o,y=l?o[2]:o,b=l?o[3]:o,v=Math.max(m,f),x=Math.max(y,b);let A=v,_=x;const S=r*i.cos(d),T=r*i.sin(d),B=n*i.cos(p),w=n*i.sin(p);let C,M,P,k;if((x>i.epsilon||v>i.epsilon)&&(C=r*i.cos(u),M=r*i.sin(u),P=n*i.cos(g),k=n*i.sin(g),a<i.pi)){const t=function(t,e,s,n,r,a,o,l){const h=s-t,c=n-e,d=o-r,u=l-a;let p=u*h-d*c;return p*p<i.epsilon?[]:(p=(d*(e-a)-u*(t-r))/p,[t+p*h,e+p*c])}(S,T,P,k,C,M,B,w);if(t){const e=S-t[0],s=T-t[1],a=C-t[0],o=M-t[1],l=1/i.sin(i.acos((e*a+s*o)/(i.sqrt(e*e+s*s)*i.sqrt(a*a+o*o)))/2),h=i.sqrt(t[0]*t[0]+t[1]*t[1]);_=i.min(x,(n-h)/(l-1)),A=i.min(v,(r-h)/(l+1))}}return{outerDeltaAngle:h,xors:S,yors:T,xirs:P,yirs:k,xore:C,yore:M,xire:B,yire:w,limitedOcr:A,limitedIcr:_,outerCornerRadiusStart:f,outerCornerRadiusEnd:m,maxOuterCornerRadius:v,maxInnerCornerRadius:x,outerStartAngle:d,outerEndAngle:u,innerDeltaAngle:c,innerEndAngle:p,innerStartAngle:g,innerCornerRadiusStart:b,innerCornerRadiusEnd:y}}function sa(t,e,s,n,r,a,o){const{startAngle:l,endAngle:h}=t.getParsedAngle(),c=i.abs(h-l),d=h>l;let u=!1;if(r<a){const t=r;r=a,a=t}if(r<=i.epsilon)e.moveTo(s,n);else if(c>=i.pi2-i.epsilon)e.moveTo(s+r*i.cos(l),n+r*i.sin(l)),e.arc(s,n,r,l,h,!d),a>i.epsilon&&(e.moveTo(s+a*i.cos(h),n+a*i.sin(h)),e.arc(s,n,a,h,l,d));else{const{outerDeltaAngle:c,xors:p,yors:g,xirs:f,yirs:m,limitedOcr:y,outerCornerRadiusStart:b,outerCornerRadiusEnd:v,maxOuterCornerRadius:x,xore:A,yore:_,xire:S,yire:T,outerStartAngle:B,outerEndAngle:w,limitedIcr:C,innerDeltaAngle:M,innerEndAngle:P,innerStartAngle:k,innerCornerRadiusStart:O,innerCornerRadiusEnd:R,maxInnerCornerRadius:L}=ia(t,l,h,a,r);if(c<.001)o&&(o[3]||o[1])&&e.moveTo(s+p,n+g),u=!0;else if(y>i.epsilon){const t=i.min(b,y),a=i.min(v,y),l=ea(f,m,p,g,r,t,Number(d)),h=ea(A,_,S,T,r,a,Number(d));y<x&&t===a?!o||o[0]?(e.moveTo(s+l.cx+l.x01,n+l.cy+l.y01),e.arc(s+l.cx,n+l.cy,y,i.atan2(l.y01,l.x01),i.atan2(h.y01,h.x01),!d)):e.moveTo(s+l.cx+y*i.cos(i.atan2(h.y01,h.x01)),n+l.cy+y*i.sin(i.atan2(h.y01,h.x01))):!o||o[0]?(e.moveTo(s+l.cx+l.x01,n+l.cy+l.y01),t>0&&e.arc(s+l.cx,n+l.cy,t,i.atan2(l.y01,l.x01),i.atan2(l.y11,l.x11),!d),e.arc(s,n,r,i.atan2(l.cy+l.y11,l.cx+l.x11),i.atan2(h.cy+h.y11,h.cx+h.x11),!d),a>0&&e.arc(s+h.cx,n+h.cy,a,i.atan2(h.y11,h.x11),i.atan2(h.y01,h.x01),!d)):a>0?e.moveTo(s+h.cx+a*i.cos(i.atan2(h.y01,h.x01)),n+h.cy+a*i.sin(i.atan2(h.y01,h.x01))):e.moveTo(s+A,n+r*i.sin(w))}else!o||o[0]?(e.moveTo(s+p,n+g),e.arc(s,n,r,B,w,!d)):e.moveTo(s+r*i.cos(w),n+r*i.sin(w));if(!(a>i.epsilon)||M<.001)!o||o[1]?e.lineTo(s+S,n+T):e.moveTo(s+S,n+T),u=!0;else if(C>i.epsilon){const t=i.min(O,C),r=i.min(R,C),l=ea(S,T,A,_,a,-r,Number(d)),h=ea(p,g,f,m,a,-t,Number(d));if(!o||o[1]?e.lineTo(s+l.cx+l.x01,n+l.cy+l.y01):e.moveTo(s+l.cx+l.x01,n+l.cy+l.y01),C<L&&t===r){const t=i.atan2(h.y01,h.x01);!o||o[2]?e.arc(s+l.cx,n+l.cy,C,i.atan2(l.y01,l.x01),t,!d):e.moveTo(s+l.cx+i.cos(t),n+l.cy+i.sin(t))}else!o||o[2]?(r>0&&e.arc(s+l.cx,n+l.cy,r,i.atan2(l.y01,l.x01),i.atan2(l.y11,l.x11),!d),e.arc(s,n,a,i.atan2(l.cy+l.y11,l.cx+l.x11),i.atan2(h.cy+h.y11,h.cx+h.x11),d),t>0&&e.arc(s+h.cx,n+h.cy,t,i.atan2(h.y11,h.x11),i.atan2(h.y01,h.x01),!d)):t>0?e.moveTo(s+h.cx+t*i.cos(i.atan2(h.y01,h.x01)),n+h.cy+t*i.sin(i.atan2(h.y01,h.x01))):e.moveTo(s+f,n+m)}else!o||o[1]?e.lineTo(s+S,n+T):e.moveTo(s+S,n+T),!o||o[2]?e.arc(s,n,a,P,k,d):e.moveTo(s+a*i.cos(k),n+a*i.sin(k))}return o?o[3]&&e.lineTo(s+r*i.cos(l),n+r*i.sin(l)):e.closePath(),u}Yr.NOWORK_ANIMATE_ATTR=Vr;const na=Symbol.for("ArcRenderContribution"),ra=Symbol.for("ImageRenderContribution"),aa=Symbol.for("PolygonRenderContribution"),oa=Symbol.for("RectRenderContribution"),la=Symbol.for("SymbolRenderContribution"),ha=Symbol.for("TextRenderContribution"),ca=Symbol.for("InteractiveSubRenderContribution");function da(t,e){return"end"===t||"right"===t?-e:"center"===t?-e/2:0}function ua(t,e,i){return"middle"===t?-e/2:"top"===t?0:"bottom"===t?(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)-e:t&&"alphabetic"!==t?0:(i||(i=e),-(e-i)/2-.79*i)}var pa=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},ga=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},fa=function(t,e){return function(i,s){e(i,s,t)}};function ma(t,e,i){var s;const{x:n=i.x,y:r=i.y,z:a=i.z,dx:o=i.dx,dy:l=i.dy,dz:h=i.dz,scaleX:c=i.scaleX,scaleY:d=i.scaleY,scaleZ:u=i.scaleZ,alpha:p=i.alpha,beta:g=i.beta,angle:f=i.angle,anchor3d:m=e.attribute.anchor,anchor:y}=e.attribute,b=[0,0,0];if(m){if("string"==typeof m[0]){const t=parseFloat(m[0])/100,i=e.AABBBounds;b[0]=i.x1+(i.x2-i.x1)*t}else b[0]=m[0];if("string"==typeof m[1]){const t=parseFloat(m[1])/100,i=e.AABBBounds;b[1]=i.x1+(i.x2-i.x1)*t}else b[1]=m[1];b[2]=null!==(s=m[2])&&void 0!==s?s:0}if(mr(t),yr(t,t,[n+o,r+l,a+h]),yr(t,t,[b[0],b[1],b[2]]),function(t,e,i){const s=Math.sin(i),n=Math.cos(i),r=e[4],a=e[5],o=e[6],l=e[7],h=e[8],c=e[9],d=e[10],u=e[11];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]=r*n+h*s,t[5]=a*n+c*s,t[6]=o*n+d*s,t[7]=l*n+u*s,t[8]=h*n-r*s,t[9]=c*n-a*s,t[10]=d*n-o*s,t[11]=u*n-l*s}(t,t,g),function(t,e,i){const s=Math.sin(i),n=Math.cos(i),r=e[0],a=e[1],o=e[2],l=e[3],h=e[8],c=e[9],d=e[10],u=e[11];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]=r*n-h*s,t[1]=a*n-c*s,t[2]=o*n-d*s,t[3]=l*n-u*s,t[8]=r*s+h*n,t[9]=a*s+c*n,t[10]=o*s+d*n,t[11]=l*s+u*n}(t,t,p),yr(t,t,[-b[0],-b[1],b[2]]),function(t,e,i){const s=i[0],n=i[1],r=i[2];t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]}(t,t,[c,d,u]),f){const i=_r.allocate(),s=[0,0];if(y){if("string"==typeof m[0]){const t=parseFloat(m[0])/100,i=e.AABBBounds;s[0]=i.x1+(i.x2-i.x1)*t}else s[0]=m[0];if("string"==typeof m[1]){const t=parseFloat(m[1])/100,i=e.AABBBounds;s[1]=i.x1+(i.x2-i.x1)*t}else s[1]=m[1]}yr(i,i,[s[0],s[1],0]),function(t,e,i){const s=Math.sin(i),n=Math.cos(i),r=e[0],a=e[1],o=e[2],l=e[3],h=e[4],c=e[5],d=e[6],u=e[7];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]=r*n+h*s,t[1]=a*n+c*s,t[2]=o*n+d*s,t[3]=l*n+u*s,t[4]=h*n-r*s,t[5]=c*n-a*s,t[6]=d*n-o*s,t[7]=u*n-l*s}(i,i,f),yr(i,i,[-s[0],-s[1],0]),br(t,t,i)}}let ya=class{constructor(t){this.creator=t,this.hooks={onAttributeUpdate:new Pt(["graphic"]),onSetStage:new Pt(["graphic","stage"]),onRemove:new Pt(["graphic"]),onRelease:new Pt(["graphic"]),onAddIncremental:new Pt(["graphic","group","stage"]),onClearIncremental:new Pt(["graphic","group","stage"]),beforeUpdateAABBBounds:new Pt(["graphic","stage","willUpdate","aabbBounds"]),afterUpdateAABBBounds:new Pt(["graphic","stage","aabbBounds","globalAABBBounds","selfChange"]),clearAABBBounds:new Pt(["graphic","stage","aabbBounds"])},this.tempAABBBounds1=new i.AABBBounds,this.tempAABBBounds2=new i.AABBBounds}onAttributeUpdate(t){this.hooks.onAttributeUpdate.taps.length&&this.hooks.onAttributeUpdate.call(t)}onSetStage(t,e){this.hooks.onSetStage.taps.length&&this.hooks.onSetStage.call(t,e)}onRemove(t){this.hooks.onRemove.taps.length&&this.hooks.onRemove.call(t)}onRelease(t){this.hooks.onRelease.taps.length&&this.hooks.onRelease.call(t)}onAddIncremental(t,e,i){this.hooks.onAddIncremental.taps.length&&this.hooks.onAddIncremental.call(t,e,i)}onClearIncremental(t,e){this.hooks.onClearIncremental.taps.length&&this.hooks.onClearIncremental.call(t,e)}beforeUpdateAABBBounds(t,e,i,s){this.hooks.beforeUpdateAABBBounds.taps.length&&this.hooks.beforeUpdateAABBBounds.call(t,e,i,s)}afterUpdateAABBBounds(t,e,i,s,n){this.hooks.afterUpdateAABBBounds.taps.length&&this.hooks.afterUpdateAABBBounds.call(t,e,i,s,n)}clearAABBBounds(t,e,i){this.hooks.clearAABBBounds.taps.length&&this.hooks.clearAABBBounds.call(t,e,i)}updatePathProxyAABBBounds(t,e){const i="function"==typeof e.pathProxy?e.pathProxy(e.attribute):e.pathProxy;if(!i)return!1;const s=new Dt(t);return ie(i.commandList,s,0,0),!0}updateHTMLTextAABBBounds(t,e,s,n){const{textAlign:r,textBaseline:a}=t;if(null!=t.forceBoundsHeight){const e=i.isNumber(t.forceBoundsHeight)?t.forceBoundsHeight:t.forceBoundsHeight(),n=ua(a,e,e);s.set(s.x1,n,s.x2,n+e)}if(null!=t.forceBoundsWidth){const e=i.isNumber(t.forceBoundsWidth)?t.forceBoundsWidth:t.forceBoundsWidth(),n=da(r,e);s.set(n,s.y1,n+e,s.y2)}}combindShadowAABBBounds(t,e){if(e&&e.shadowRoot){const i=e.shadowRoot.AABBBounds;t.union(i)}}transformAABBBounds(t,e,s,n,r){if(!e.empty()){const{scaleX:i=s.scaleX,scaleY:r=s.scaleY,stroke:a=s.stroke,shadowBlur:o=s.shadowBlur,lineWidth:l=s.lineWidth,pickStrokeBuffer:h=s.pickStrokeBuffer,strokeBoundsBuffer:c=s.strokeBoundsBuffer}=t,d=this.tempAABBBounds1,u=this.tempAABBBounds2;if(a&&l){Hn(d,(l+h)/Math.abs(i+r),n,c),e.union(d),d.setValue(u.x1,u.y1,u.x2,u.y2)}if(o){const{shadowOffsetX:n=s.shadowOffsetX,shadowOffsetY:a=s.shadowOffsetY}=t;Hn(d,o/Math.abs(i+r)*2,!1,c+1),d.translate(n,a),e.union(d)}}if(this.combindShadowAABBBounds(e,r),e.empty())return;let a=!0;const o=r.transMatrix;r&&r.isContainer&&(a=!(1===o.a&&0===o.b&&0===o.c&&1===o.d&&0===o.e&&0===o.f)),a&&i.transformBoundsWithMatrix(e,e,o)}validCheck(t,e,i,s){if(!s)return!0;if(null!=t.forceBoundsHeight||null!=t.forceBoundsWidth)return!0;if(s.shadowRoot||s.isContainer)return!0;const{visible:n=e.visible}=t;return!(!s.valid||!n)||(i.empty()||(s.parent&&i.transformWithMatrix(s.parent.globalTransMatrix),this.clearAABBBounds(s,s.stage,i),i.clear()),!1)}updateTempAABBBounds(t){const e=this.tempAABBBounds1,i=this.tempAABBBounds2;return e.setValue(t.x1,t.y1,t.x2,t.y2),i.setValue(t.x1,t.y1,t.x2,t.y2),{tb1:e,tb2:i}}};ya=pa([ht(),fa(0,ot(ur)),ga("design:paramtypes",[Object])],ya);const ba=(t,e,i)=>{const{outerBorder:s,shadowBlur:n=e.shadowBlur}=t;if(s){const t=e.outerBorder,{distance:r=t.distance,lineWidth:a=t.lineWidth}=s;i.expand(r+(n+a)/2)}return i};class va{constructor(t,e,i){this.fontFamily=t,this.textOptions=e,this.textMeasure=i}LayoutBBox(t,e,i,s){if(t.xOffset="left"===e||"start"===e?0:"center"===e?t.width/-2:"right"===e||"end"===e?-t.width:0,"top"===i)t.yOffset=0;else if("middle"===i)t.yOffset=t.height/-2;else if("alphabetic"===i){let e=.79;if(1===s.length){const t=s[0];e=t.ascent/(t.ascent+t.descent)}t.yOffset=t.height*-e}else t.yOffset=-t.height;return t}GetLayoutByLines(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;const{lineWidth:o,suffixPosition:l="end",measureMode:h=Ot.actualBounding,keepCenterInLine:c=!1}=null!=a?a:{};t=t.map((t=>t.toString()));const d=[],u=[0,0];if("number"==typeof o&&o!==1/0){let e;for(let i=0,s=t.length;i<s;i++){const s=this.textMeasure.measureTextPixelADscentAndWidth(t[i],this.textOptions,h);let a=t[i].toString();if(s.width>o){const s=this.textMeasure.clipTextWithSuffix(t[i],this.textOptions,o,n,r,l);a=s.str,e=s.width}else e=s.width;d.push({str:a,width:e,ascent:s.ascent,descent:s.descent,keepCenterInLine:c})}u[0]=o}else{let e,i,s=0;for(let n=0,r=t.length;n<r;n++){i=t[n];const r=this.textMeasure.measureTextPixelADscentAndWidth(t[n],this.textOptions,h);e=r.width,s=Math.max(s,e),d.push({str:i,width:e,ascent:r.ascent,descent:r.descent,keepCenterInLine:c})}u[0]=s}u[1]=d.length*s,u[0]=d.reduce(((t,e)=>Math.max(t,e.width)),0);const p={xOffset:0,yOffset:0,width:u[0],height:u[1]};return this.LayoutBBox(p,e,i,d),this.layoutWithBBox(p,d,e,i,s)}layoutWithBBox(t,e,i,s,n){const r=[0,0],a=e.length*n;"top"===s||("middle"===s?r[1]=(t.height-a)/2:"bottom"===s&&(r[1]=t.height-a));for(let a=0;a<e.length;a++)this.lineOffset(t,e[a],i,s,n,r);return{bbox:t,lines:e,fontFamily:this.fontFamily,fontSize:this.textOptions.fontSize,fontWeight:this.textOptions.fontWeight,lineHeight:n,textAlign:i,textBaseline:s}}lineOffset(t,e,i,s,n,r){if("left"===i||"start"===i?e.leftOffset=0:"center"===i?e.leftOffset=(t.width-e.width)/2:"right"!==i&&"end"!==i||(e.leftOffset=t.width-e.width),e.topOffset=n/2+(e.ascent-e.descent)/2+r[1],!e.keepCenterInLine){const t=0,i=e.ascent+e.descent+t;if(i<n-t&&("bottom"===s?e.topOffset+=(n-i)/2:"top"===s&&(e.topOffset-=(n-i)/2)),"alphabetic"===s){const t=n/(e.ascent+e.descent);e.topOffset=n/2+(e.ascent-e.descent)/2*t+r[1]}}return r[1]+=n,e}}const xa=["text","maxLineWidth","maxWidth","textAlign","textBaseline","heightLimit","lineClamp","fontSize","fontFamily","fontWeight","ellipsis","lineHeight","direction","wordBreak","heightLimit","lineClamp",...Fr];class Aa extends Hr{get font(){const t=this.getGraphicTheme();return this._font||(this._font=i.getContextFont(this.attribute,t)),this._font}get clipedText(){var t;const e=this.attribute,i=this.getGraphicTheme(),s=this.getMaxWidth(i);return Number.isFinite(s)?(this.tryUpdateAABBBounds(),this.cache.clipedText):(null!==(t=e.text)&&void 0!==t?t:i.text).toString()}get clipedWidth(){return this.tryUpdateAABBBounds(),this.cache.clipedWidth}get cliped(){var t,e;const i=this.getGraphicTheme(),s=this.attribute,n=this.getMaxWidth(i);if(!Number.isFinite(n))return!1;const{text:r}=this.attribute;if(this.tryUpdateAABBBounds(),null===(e=null===(t=this.cache)||void 0===t?void 0:t.layoutData)||void 0===e?void 0:e.lines){let t="";return this.cache.layoutData.lines.forEach((e=>{t+=e.str})),(Array.isArray(r)?r.join(""):r)!==t}return"vertical"===s.direction&&this.cache.verticalList&&this.cache.verticalList[0]?this.cache.verticalList[0].map((t=>t.text)).join("")!==s.text.toString():null!=this.clipedText&&this.clipedText!==s.text.toString()}get multilineLayout(){return this.tryUpdateAABBBounds(),this.cache.layoutData}get isMultiLine(){return Array.isArray(this.attribute.text)||"normal"===this.attribute.whiteSpace}constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{text:"",fontSize:16}),this.type="text",this.numberType=dr,this.cache={}}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{text:t}=this.attribute;return i.isArray(t)?!t.every((t=>null==t||""===t)):null!=t&&""!==t}getGraphicTheme(){return ds(this).text}doUpdateOBBBounds(){const t=this.getGraphicTheme();this._OBBBounds.clear();const e=this.attribute,{angle:s=t.angle}=e;if(!s){const t=this.AABBBounds;return this._OBBBounds.setValue(t.x1,t.y1,t.x2,t.y2),this._OBBBounds}this.obbText||(this.obbText=new Aa({})),this.obbText.setAttributes(Object.assign(Object.assign({},e),{angle:0}));const n=this.obbText.AABBBounds,{x:r,y:a}=e,o={x:(n.x1+n.x2)/2,y:(n.y1+n.y2)/2},l=i.rotatePoint(o,s,{x:r,y:a});return this._OBBBounds.copy(n),this._OBBBounds.translate(l.x-o.x,l.y-o.y),this._OBBBounds.angle=s,this._OBBBounds}updateAABBBounds(t,e,s){const{text:n=e.text}=this.attribute;Array.isArray(n)?this.updateMultilineAABBBounds(n):this.updateSingallineAABBBounds(n);const{tb1:r}=kt.graphicService.updateTempAABBBounds(s),{scaleX:a=e.scaleX,scaleY:o=e.scaleY,shadowBlur:l=e.shadowBlur,strokeBoundsBuffer:h=e.strokeBoundsBuffer}=t;if(l){Hn(r,l/Math.abs(a+o),!0,h),s.union(r)}return kt.graphicService.combindShadowAABBBounds(s,this),null==t.forceBoundsHeight&&null==t.forceBoundsWidth||kt.graphicService.updateHTMLTextAABBBounds(t,e,s),this.widthWithoutTransform=s.x2-s.x1,this.heightWithoutTransform=s.y2-s.y1,i.transformBoundsWithMatrix(s,s,this.transMatrix),s}updateSingallineAABBBounds(t){this.updateMultilineAABBBounds([t]);const e=this.cache.layoutData;if(e&&e.lines&&e.lines.length){const t=e.lines[0];this.cache.clipedText=t.str,this.cache.clipedWidth=t.width}return this._AABBBounds}updateMultilineAABBBounds(t){const e=this.getGraphicTheme(),{direction:i=e.direction,underlineOffset:s=e.underlineOffset}=this.attribute,n="horizontal"===i?this.updateHorizontalMultilineAABBBounds(t):this.updateVerticalMultilineAABBBounds(t);return"horizontal"===i&&s&&this._AABBBounds.add(this._AABBBounds.x1,this._AABBBounds.y2+s),n}guessLineHeightBuf(t){return t?.1*t:0}updateHorizontalMultilineAABBBounds(t){var e;const i=this.getGraphicTheme(),s=this.attribute,{fontFamily:n=i.fontFamily,textAlign:r=i.textAlign,textBaseline:a=i.textBaseline,fontSize:o=i.fontSize,fontWeight:l=i.fontWeight,ellipsis:h=i.ellipsis,maxLineWidth:c,stroke:d=i.stroke,wrap:u=i.wrap,measureMode:p=i.measureMode,lineWidth:g=i.lineWidth,whiteSpace:f=i.whiteSpace,suffixPosition:m=i.suffixPosition,ignoreBuf:y=i.ignoreBuf,keepCenterInLine:b=i.keepCenterInLine}=s,v=y?0:this.guessLineHeightBuf(o),x=this.getLineHeight(s,i,v);if("normal"===f||u)return this.updateWrapAABBBounds(t);if(!this.shouldUpdateShape()&&(null===(e=this.cache)||void 0===e?void 0:e.layoutData)){const t=this.cache.layoutData.bbox;return this._AABBBounds.set(t.xOffset,t.yOffset,t.xOffset+t.width,t.yOffset+t.height),d&&this._AABBBounds.expand(g/2),this._AABBBounds}const A=kt.graphicUtil.textMeasure,_=new va(n,{fontSize:o,fontWeight:l,fontFamily:n,lineHeight:x},A).GetLayoutByLines(t,r,a,x,!0===h?i.ellipsis:h||void 0,!1,{lineWidth:c,suffixPosition:m,measureMode:p,keepCenterInLine:b}),{bbox:S}=_;return this.cache.layoutData=_,this.clearUpdateShapeTag(),this._AABBBounds.set(S.xOffset,S.yOffset,S.xOffset+S.width,S.yOffset+S.height),d&&this._AABBBounds.expand(g/2),this._AABBBounds}updateWrapAABBBounds(t){var e,s,n;const r=this.getGraphicTheme(),{fontFamily:a=r.fontFamily,textAlign:o=r.textAlign,textBaseline:l=r.textBaseline,fontSize:h=r.fontSize,ellipsis:c=r.ellipsis,maxLineWidth:d,stroke:u=r.stroke,lineWidth:p=r.lineWidth,wordBreak:g=r.wordBreak,fontWeight:f=r.fontWeight,ignoreBuf:m=r.ignoreBuf,measureMode:y=r.measureMode,suffixPosition:b=r.suffixPosition,heightLimit:v=0,lineClamp:x,keepCenterInLine:A=r.keepCenterInLine}=this.attribute,_=m?0:this.guessLineHeightBuf(h),S=this.getLineHeight(this.attribute,r,_);if(!this.shouldUpdateShape()&&(null===(e=this.cache)||void 0===e?void 0:e.layoutData)){const t=this.cache.layoutData.bbox;return this._AABBBounds.set(t.xOffset,t.yOffset,t.xOffset+t.width,t.yOffset+t.height),u&&this._AABBBounds.expand(p/2),this._AABBBounds}const T=kt.graphicUtil.textMeasure,B={fontSize:h,fontWeight:f,fontFamily:a,lineHeight:S},w=new va(a,B,T),C=i.isArray(t)?t.map((t=>t.toString())):[t.toString()],M=[],P=[0,0];let k=1/0;if(v>0&&(k=Math.max(Math.floor(v/S),1)),x&&(k=Math.min(k,x)),"number"==typeof d&&d!==1/0){if(d>0)for(let t=0;t<C.length;t++){const e=C[t];let i=!0;if(t===k-1){const i=T.clipTextWithSuffix(e,B,d,c,!1,b,t!==C.length-1),s=T.measureTextPixelADscentAndWidth(i.str,B,y);M.push({str:i.str,width:i.width,ascent:s.ascent,descent:s.descent,keepCenterInLine:A});break}const r=T.clipText(e,B,d,"break-all"!==g,"keep-all"===g);if(""!==e&&""===r.str||r.wordBreaked){if(c){const t=T.clipTextWithSuffix(e,B,d,c,!1,b);r.str=null!==(s=t.str)&&void 0!==s?s:"",r.width=null!==(n=t.width)&&void 0!==n?n:0}else r.str="",r.width=0;i=!1}const a=T.measureTextPixelADscentAndWidth(r.str,B,y);M.push({str:r.str,width:r.width,ascent:a.ascent,descent:a.descent,keepCenterInLine:A});let o=r.str.length;if(!r.wordBreaked||""!==e&&""===r.str||(i=!0,o=r.wordBreaked),r.str.length===e.length);else if(i){let i=e.substring(o);"keep-all"===g&&(i=i.replace(/^\s+/g,"")),C.splice(t+1,0,i)}}let t=0;M.forEach((e=>{t=Math.max(t,e.width)})),P[0]=t}else{let t,e,i=0;for(let s=0,n=C.length;s<n;s++){if(s===k-1){const t=T.clipTextWithSuffix(C[s],B,d,c,!1,b),e=T.measureTextPixelADscentAndWidth(t.str,B,y);M.push({str:t.str,width:t.width,ascent:e.ascent,descent:e.descent,keepCenterInLine:A}),i=Math.max(i,t.width);break}e=C[s],t=T.measureTextWidth(e,B),i=Math.max(i,t);const n=T.measureTextPixelADscentAndWidth(e,B,y);M.push({str:e,width:t,ascent:n.ascent,descent:n.descent,keepCenterInLine:A})}P[0]=i}P[1]=M.length*S;const O={xOffset:0,yOffset:0,width:P[0],height:P[1]};w.LayoutBBox(O,o,l,M);const R=w.layoutWithBBox(O,M,o,l,S);return this.cache.layoutData=R,this.clearUpdateShapeTag(),this._AABBBounds.set(O.xOffset,O.yOffset,O.xOffset+O.width,O.yOffset+O.height),u&&this._AABBBounds.expand(p/2),this._AABBBounds}updateVerticalMultilineAABBBounds(t){var e,s;const n=this.getGraphicTheme(),r=kt.graphicUtil.textMeasure;let a;const o=this.attribute,{maxLineWidth:l=n.maxLineWidth,ellipsis:h=n.ellipsis,fontFamily:c=n.fontFamily,fontSize:d=n.fontSize,fontWeight:u=n.fontWeight,stroke:p=n.stroke,lineWidth:g=n.lineWidth,verticalMode:f=n.verticalMode,suffixPosition:m=n.suffixPosition}=o,y=this.getLineHeight(o,n,0);let{textAlign:b=n.textAlign,textBaseline:v=n.textBaseline}=o;if(!f){const t=b;b=null!==(e=Aa.baselineMapAlign[v])&&void 0!==e?e:"left",v=null!==(s=Aa.alignMapBaseline[t])&&void 0!==s?s:"top"}if(a=0,!this.shouldUpdateShape()&&this.cache){this.cache.verticalList.forEach((t=>{const e=t.reduce(((t,e)=>t+e.width),0);a=i.max(e,a)}));const t=da(b,a),e=this.cache.verticalList.length*y,s=ua(v,e,d);return this._AABBBounds.set(s,t,s+e,t+a),p&&this._AABBBounds.expand(g/2),this._AABBBounds}const x=t.map((t=>function(t){const e=[];let i=0,s="";for(let n=0;n<t.length;n++)Zn(t[n])?i?s+=t[n]:(i=1,s=t[n]):(i&&(e.push({text:s,direction:Kn.VERTICAL}),s="",i=0),e.push({text:t[n],direction:Kn.HORIZONTAL}));return s&&e.push({text:s,direction:Kn.VERTICAL}),e}(t.toString())));x.forEach(((t,e)=>{if(Number.isFinite(l))if(h){const i=!0===h?n.ellipsis:h,s=r.clipTextWithSuffixVertical(t,{fontSize:d,fontWeight:u,fontFamily:c},l,i,!1,m);x[e]=s.verticalList,a=s.width}else{const i=r.clipTextVertical(t,{fontSize:d,fontWeight:u,fontFamily:c},l,!1);x[e]=i.verticalList,a=i.width}else a=0,t.forEach((t=>{const e=t.direction===Kn.HORIZONTAL?d:r.measureTextWidth(t.text,{fontSize:d,fontWeight:u,fontFamily:c});a+=e,t.width=e}))})),this.cache.verticalList=x,this.clearUpdateShapeTag(),this.cache.verticalList.forEach((t=>{const e=t.reduce(((t,e)=>t+e.width),0);a=i.max(e,a)}));const A=da(b,a),_=this.cache.verticalList.length*y,S=ua(v,_,d);return this._AABBBounds.set(S,A,S+_,A+a),p&&this._AABBBounds.expand(g/2),this._AABBBounds}getMaxWidth(t){var e,i;const s=this.attribute;return null!==(i=null!==(e=s.maxLineWidth)&&void 0!==e?e:s.maxWidth)&&void 0!==i?i:t.maxWidth}getLineHeight(t,e,i){var s;return null!==(s=Ms(t.lineHeight,t.fontSize||e.fontSize))&&void 0!==s?s:(t.fontSize||e.fontSize)+i}needUpdateTags(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xa;return super.needUpdateTags(t,e)}needUpdateTag(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xa;return super.needUpdateTag(t,e)}_interpolate(t,e,i,s,n){"text"===t&&(n.text=s)}clone(){return new Aa(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Aa.NOWORK_ANIMATE_ATTR}getBaselineMapAlign(){return Aa.baselineMapAlign}getAlignMapBaseline(){return Aa.alignMapBaseline}}function _a(t){return new Aa(t)}Aa.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,direction:1,textAlign:1,textBaseline:1,fontFamily:1,fontWeight:1},Vr),Aa.baselineMapAlign={top:"left",bottom:"right",middle:"center"},Aa.alignMapBaseline={left:"top",right:"bottom",center:"middle"};const Sa=["symbolType","size",...Fr];let Ta=class t extends Hr{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{symbolType:"circle"}),this.type="symbol",this.numberType=cr}getParsedPath(){return this.shouldUpdateShape()&&(this._parsedPath=this.doUpdateParsedPath(),this.clearUpdateShapeTag()),this._parsedPath}getParsedPath2D(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=null;try{s=new Path2D}catch(t){return null}const n=this.getParsedPath();if(!n)return null;n.draw(s,i,t,e)}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{size:t}=this.attribute;return i.isArray(t)?2===t.length&&t.every(this._validNumber):this._validNumber(t)}doUpdateParsedPath(){const{symbolType:t="circle"}=this.attribute;return super.parsePath(t)}getGraphicTheme(){return ds(this).symbol}updateAABBBounds(t,e,i,s){this.updatePathProxyAABBBounds(i)||(s?this.updateSymbolAABBBoundsImprecise(t,e,i):this.updateSymbolAABBBoundsAccurate(t,e,i));const{tb1:n,tb2:r}=kt.graphicService.updateTempAABBBounds(i);((t,e,i)=>{const{outerBorder:s,shadowBlur:n=e.shadowBlur,strokeBoundsBuffer:r=e.strokeBoundsBuffer}=t;if(s){const t=e.outerBorder,{distance:a=t.distance,lineWidth:o=t.lineWidth}=s;Hn(i,a+(n+o)/2,!0,r)}})(t,e,n),i.union(n),n.setValue(r.x1,r.y1,r.x2,r.y2),this.widthWithoutTransform=i.x2-i.x1,this.heightWithoutTransform=i.y2-i.y1,this.x1WithoutTransform=i.x1,this.y1WithoutTransform=i.y1;const{lineJoin:a=e.lineJoin}=t;return kt.graphicService.transformAABBBounds(t,i,e,"miter"===a,this),i}updateSymbolAABBBoundsImprecise(t,e,s){const{size:n=e.size}=t;if(i.isArray(n))s.set(-n[0]/2,-n[1]/2,n[0]/2,n[1]/2);else{const t=n/2;s.set(-t,-t,t,t)}return s}updateSymbolAABBBoundsAccurate(t,e,i){const{size:s=e.size}=t;return this.getParsedPath().bounds(s,i),i}needUpdateTags(t){return super.needUpdateTags(t,Sa)}needUpdateTag(t){return super.needUpdateTag(t,Sa)}toCustomPath(){const t=this.getParsedPath(),e=this.attribute.size,s=i.isArray(e)?e:[e,e];return t.path?(new ze).fromCustomPath2D(t.path,0,0,s[0],s[1]):(new ze).fromString(t.pathStr,0,0,s[0],s[1])}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function Ba(t){return new Ta(t)}Ta.NOWORK_ANIMATE_ATTR=Object.assign({symbolType:1},Vr);const wa=["segments","points","curveType","curveTension",...Fr];let Ca=class t extends Hr{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.type="line",this.numberType=sr}isValid(){return super.isValid()&&this._isValid()}_isValid(){if(this.pathProxy)return!0;const{points:t,segments:e}=this.attribute;return e?0!==e.length:!(!t||t.length<=1)}_interpolate(t,e,i,s,n){"points"===t&&(n.points=Cs(i,s,e))}getGraphicTheme(){return ds(this).line}updateAABBBounds(t,e,i){this.updatePathProxyAABBBounds(i)||(t.segments?this.updateLineAABBBoundsBySegments(t,e,i):this.updateLineAABBBoundsByPoints(t,e,i)),kt.graphicService.updateTempAABBBounds(i),this.widthWithoutTransform=i.x2-i.x1,this.heightWithoutTransform=i.y2-i.y1;const{lineJoin:s=e.lineJoin}=t;return kt.graphicService.transformAABBBounds(t,i,e,"miter"===s,this),i}updateLineAABBBoundsByPoints(t,e,i,s){const{points:n=e.points,connectedType:r}=t,a=i;return n.forEach((t=>{!1===t.defined&&"connect"!==r||a.add(t.x,t.y)})),a}updateLineAABBBoundsBySegments(t,e,i,s){const{segments:n=e.segments,connectedType:r}=t,a=i;return n.forEach((t=>{t.points.forEach((t=>{!1===t.defined&&"connect"!==r||a.add(t.x,t.y)}))})),a}needUpdateTags(t){return super.needUpdateTags(t,wa)}needUpdateTag(t){return super.needUpdateTag(t,wa)}toCustomPath(){let t=super.toCustomPath();if(t)return t;const e=this.attribute;t=new ze;const i=e.segments,s=e=>{if(e&&e.length){let i=!0;e.forEach((e=>{!1!==e.defined&&(i?t.moveTo(e.x,e.y):t.lineTo(e.x,e.y),i=!1)}))}};return i&&i.length?i.forEach((t=>{s(t.points)})):e.points&&s(e.points),t}clone(){return new t(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return t.NOWORK_ANIMATE_ATTR}};function Ma(t){return new Ca(t)}Ca.NOWORK_ANIMATE_ATTR=Object.assign({segments:1,curveType:1},Vr);const Pa=["width","x1","y1","height","cornerRadius",...Fr];class ka extends Hr{constructor(t){super(t),this.type="rect",this.numberType=or}isValid(){return super.isValid()&&this._isValid()}_isValid(){return!0}getGraphicTheme(){return ds(this).rect}updateAABBBounds(t,e,i){if(!this.updatePathProxyAABBBounds(i)){let{width:e,height:s}=t;const{x1:n,y1:r,x:a,y:o}=t;e=null!=e?e:n-a,s=null!=s?s:r-o,(isFinite(e)||isFinite(s)||isFinite(a)||isFinite(o))&&i.set(0,0,e||0,s||0)}const{tb1:s,tb2:n}=kt.graphicService.updateTempAABBBounds(i);return ba(t,e,s),i.union(s),s.setValue(n.x1,n.y1,n.x2,n.y2),this.widthWithoutTransform=i.x2-i.x1,this.heightWithoutTransform=i.y2-i.y1,kt.graphicService.transformAABBBounds(t,i,e,!1,this),i}needUpdateTags(t){return super.needUpdateTags(t,Pa)}needUpdateTag(t){return super.needUpdateTag(t,Pa)}toCustomPath(){let t=super.toCustomPath();if(t)return t;const e=this.attribute,{x:s,y:n,width:r,height:a}=(t=>{if(!t)return{x:0,y:0,width:0,height:0};let e=i.isNil(t.width)?t.x1-t.x:t.width,s=i.isNil(t.height)?t.y1-t.y:t.height,n=0,r=0;return e<0?(n=e,e=-e):Number.isNaN(e)&&(e=0),s<0?(r=s,s=-s):Number.isNaN(s)&&(s=0),{x:n,y:r,width:e,height:s}})(e);return t=new ze,t.moveTo(s,n),t.rect(s,n,r,a),t}clone(){return new ka(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return ka.NOWORK_ANIMATE_ATTR}}function Oa(t){return new ka(t)}ka.NOWORK_ANIMATE_ATTR=Vr;const Ra=[[0,0,0],[1,0,0],[1,1,0],[0,1,0],[0,0,1],[1,0,1],[1,1,1],[0,1,1]];class La extends ka{constructor(t){super(t),this.type="rect3d",this.numberType=lr}findFace(){const t={polygons:[],vertices:[],edges:[]},e=this.getGraphicTheme(),{x1:s,y1:n,x:r,y:a,length:o=i.min(e.width,e.height)}=this.attribute;let{width:l,height:h}=this.attribute;l=null!=l?l:s-r,h=null!=h?h:n-a;for(let e=0;e<Ra.length;e++){const i=Ra[e];t.vertices.push([i[0]*l,i[1]*h,i[2]*o])}return t.polygons.push({polygon:[0,1,5,4],normal:[0,-1,0]}),t.polygons.push({polygon:[2,3,7,6],normal:[0,1,0]}),t.polygons.push({polygon:[4,7,3,0],normal:[-1,0,0]}),t.polygons.push({polygon:[1,2,6,5],normal:[1,0,0]}),t.polygons.push({polygon:[0,1,2,3],normal:[0,0,-1]}),t.polygons.push({polygon:[4,5,6,7],normal:[0,0,1]}),t.edges=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[3,7],[1,5],[2,6]],t}getNoWorkAnimateAttr(){return La.NOWORK_ANIMATE_ATTR}}function Ia(t){return new La(t)}La.NOWORK_ANIMATE_ATTR=Vr;class Ea{constructor(t,e,i,s,n,r,a,o,l,h,c,d,u,p){this.left=t,this.top=e,this.width=i,this.height=s,this.actualHeight=0,this.bottom=e+s,this.right=t+i,this.ellipsis=n,this.wordBreak=r,this.verticalDirection=a,this.lines=[],this.globalAlign=o,this.globalBaseline=l,this.layoutDirection=h,this.directionKey=yi[this.layoutDirection],this.isWidthMax=c,this.isHeightMax=d,this.singleLine=u,p?(p.clear(),this.icons=p):this.icons=new Map}draw(t,e){const{width:i,height:s}=this.getActualSize(),n=this.isWidthMax?Math.min(this.width,i):this.width||i||0;let r=this.isHeightMax?Math.min(this.height,s):this.height||s||0;r=Math.min(r,s);let a=0;switch(this.globalBaseline){case"top":a=0;break;case"middle":a=-r/2;break;case"bottom":a=-r}let o=0;"right"===this.globalAlign||"end"===this.globalAlign?o=-n:"center"===this.globalAlign&&(o=-n/2);let l=this[this.directionKey.height];this.singleLine&&(l=this.lines[0].height+1);let h=!1;if("middle"===this.verticalDirection)if(this.actualHeight>=l&&0!==l)for(let i=0;i<this.lines.length;i++){const{top:s,height:n}=this.lines[i];if(s+n<this[this.directionKey.top]||s+n>this[this.directionKey.top]+l)return h;let r=!1;this.ellipsis&&this.lines[i+1]&&this.lines[i+1].top+this.lines[i+1].height>this[this.directionKey.top]+l&&(r=!0,h=!0),this.lines[i].draw(t,r,this.lines[i][this.directionKey.left]+o,this.lines[i][this.directionKey.top]+a,this.ellipsis,e)}else{const i=Math.floor((l-this.actualHeight)/2);"vertical"===this.layoutDirection?o+=i:a+=i;for(let i=0;i<this.lines.length;i++)this.lines[i].draw(t,!1,this.lines[i][this.directionKey.left]+o,this.lines[i][this.directionKey.top]+a,this.ellipsis,e)}else if("bottom"===this.verticalDirection&&"vertical"!==this.layoutDirection)for(let i=0;i<this.lines.length;i++){const{top:s,height:n}=this.lines[i],r=l-this.lines[i].top-this.lines[i].height;if(0===l)this.lines[i].draw(t,!1,o,r+a,this.ellipsis,e);else{if(r+n>this[this.directionKey.top]+l||r<this[this.directionKey.top])return h;{let s=!1;this.ellipsis&&this.lines[i+1]&&r-this.lines[i+1].height<this[this.directionKey.top]&&(s=!0,h=!0),this.lines[i].draw(t,s,o,r+a,this.ellipsis,e)}}}else{"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&this.singleLine&&this.isWidthMax&&(o+=this.lines[0].height+1);for(let i=0;i<this.lines.length;i++){"bottom"===this.verticalDirection&&"vertical"===this.layoutDirection&&(o-=this.lines[i].height+this.lines[i].top);const{top:s,height:n}=this.lines[i];if(0===l)this.lines[i].draw(t,!1,this.lines[i][this.directionKey.left]+o,this.lines[i][this.directionKey.top]+a,this.ellipsis,e);else{if(s+n<this[this.directionKey.top]||s+n>this[this.directionKey.top]+l)return h;{let s=!1;this.ellipsis&&this.lines[i+1]&&this.lines[i+1].top+this.lines[i+1].height>this[this.directionKey.top]+l&&(s=!0,h=!0),this.lines[i].draw(t,s,this.lines[i][this.directionKey.left]+o,this.lines[i][this.directionKey.top]+a,this.ellipsis,e)}}}}return h}getActualSize(){return this.ellipsis?this.getActualSizeWidthEllipsis():this.getRawActualSize()}getRawActualSize(){let t=0,e=0;for(let i=0;i<this.lines.length;i++){const s=this.lines[i];s.actualWidth>t&&(t=s.actualWidth),e+=s.height}return{width:"vertical"===this.layoutDirection?e:t,height:"vertical"===this.layoutDirection?t:e}}getActualSizeWidthEllipsis(){let t=0,e=0;const{width:i,height:s}=this.getRawActualSize();this.width,this.height;let n=this[this.directionKey.height];if(this.singleLine&&(n=this.lines[0].height+1),"middle"===this.verticalDirection)if(this.actualHeight>=n&&0!==n)for(let i=0;i<this.lines.length;i++){const{top:s,height:r}=this.lines[i];if(s+r<this[this.directionKey.top]||s+r>this[this.directionKey.top]+n);else if(this.ellipsis&&this.lines[i+1]&&this.lines[i+1].top+this.lines[i+1].height>this[this.directionKey.top]+n){const s=!0===this.ellipsis?"...":this.ellipsis||"",n=this.lines[i].getWidthWithEllips(s);n>t&&(t=n),e+=this.lines[i].height}else this.lines[i].actualWidth>t&&(t=this.lines[i].actualWidth),e+=this.lines[i].height}else{Math.floor((n-this.actualHeight)/2);for(let i=0;i<this.lines.length;i++)this.lines[i].actualWidth>t&&(t=this.lines[i].actualWidth),e+=this.lines[i].height}else if("bottom"===this.verticalDirection)for(let i=0;i<this.lines.length;i++){const{top:s,height:r}=this.lines[i],a=n-this.lines[i].top-this.lines[i].height;if(0===n)this.lines[i].actualWidth>t&&(t=this.lines[i].actualWidth),e+=this.lines[i].height;else if(a+r>this[this.directionKey.top]+n||a<this[this.directionKey.top]);else if(this.ellipsis&&this.lines[i+1]&&a-this.lines[i+1].height<this[this.directionKey.top]){const s=!0===this.ellipsis?"...":this.ellipsis||"",n=this.lines[i].getWidthWithEllips(s);n>t&&(t=n),e+=this.lines[i].height}else this.lines[i].actualWidth>t&&(t=this.lines[i].actualWidth),e+=this.lines[i].height}else for(let i=0;i<this.lines.length;i++){const{top:s,height:r}=this.lines[i];if(0===n)this.lines[i].actualWidth>t&&(t=this.lines[i].actualWidth),e+=this.lines[i].height;else if(s+r<this[this.directionKey.top]||s+r>this[this.directionKey.top]+n);else if(this.ellipsis&&this.lines[i+1]&&this.lines[i+1].top+this.lines[i+1].height>this[this.directionKey.top]+n){const s=!0===this.ellipsis?"...":this.ellipsis||"",n=this.lines[i].getWidthWithEllips(s);n>t&&(t=n),e+=this.lines[i].height}else this.lines[i].actualWidth>t&&(t=this.lines[i].actualWidth),e+=this.lines[i].height}return{width:"vertical"===this.layoutDirection?e:t,height:"vertical"===this.layoutDirection?t:e}}}function Da(t,e,i,s){const n=Math.round(t),r=Math.round(i),a=Math.round(e),o=Math.round(s);return{left:t>n?n:n-.5,top:i>r?r:r-.5,right:a>e?a:a+.5,bottom:o>s?o:o+.5}}class ja{constructor(t,e,i,s){var n,r;this.fontSize=i.fontSize||16,this.textBaseline=i.textBaseline||"alphabetic",this.ascentDescentMode=s;const a=Ms(i.lineHeight,this.fontSize);this.lineHeight="number"==typeof a?a>this.fontSize?a:this.fontSize:Math.floor(1.2*this.fontSize),this.height=this.lineHeight;const{ascent:o,height:l,descent:h,width:c}=wi(t,i,this.ascentDescentMode);let d=0,u=0,p=0;this.height>l&&(d=(this.height-l)/2,u=Math.ceil(d),p=Math.floor(d)),"top"===this.textBaseline?(this.ascent=d,this.descent=l-d):"bottom"===this.textBaseline?(this.ascent=l-d,this.descent=d):"middle"===this.textBaseline?(this.ascent=this.height/2,this.descent=this.height/2):(this.ascent=o+u,this.descent=h+p),this.length=t.length,this.width=c||0,this.text=t||"",this.newLine=e||!1,this.character=i,this.left=0,this.top=0,this.ellipsis="normal",this.ellipsisWidth=0,this.ellipsisOtherParagraphWidth=0,this.space=i.space,this.dx=null!==(n=i.dx)&&void 0!==n?n:0,this.dy=null!==(r=i.dy)&&void 0!==r?r:0,"vertical"===i.direction&&(this.direction=i.direction,this.widthOrigin=this.width,this.heightOrigin=this.height,this.width=this.heightOrigin,this.height=this.widthOrigin,this.lineHeight=this.height),this.ellipsisStr="..."}updateWidth(){const{width:t}=wi(this.text,this.character,this.ascentDescentMode);this.width=t,"vertical"===this.direction&&(this.widthOrigin=this.width,this.width=this.heightOrigin,this.height=this.widthOrigin)}drawBackground(t,e,i,s,n,r,a){if(""===this.text||"\n"===this.text||!this.character.background||this.character.backgroundOpacity&&!(this.character.backgroundOpacity>0))return;let o=e+i,l=this.text,h=this.left+s;o+=this.top;let c=this.direction;if(this.verticalEllipsis)l=this.ellipsisStr,c="vertical",o-=this.ellipsisWidth/2;else{if("hide"===this.ellipsis)return;if("add"===this.ellipsis)l+=this.ellipsisStr,"right"!==r&&"end"!==r||(h-=this.ellipsisWidth);else if("replace"===this.ellipsis){const t=Ti(l,("vertical"===c?this.height:this.width)-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,l.length-1);if(l=l.slice(0,t),l+=this.ellipsisStr,"right"===r||"end"===r)if("vertical"===c);else{const{width:e}=wi(this.text.slice(t),this.character,this.ascentDescentMode);h-=this.ellipsisWidth-e}}}const d=Da(h,h+(this.widthOrigin||this.width),e,e+a);return Object.assign(Object.assign({},d),{fillStyle:this.character.background,globalAlpha:this.character.backgroundOpacity})}draw(t,e,i,s,n,r,a){var o;let l=e+i,h=this.text,c=this.left+s+(null!==(o=this.space)&&void 0!==o?o:0)/2;l+=this.top;let d=this.direction;if(this.verticalEllipsis)h=this.ellipsisStr,d="vertical",l-=this.ellipsisWidth/2;else{if("hide"===this.ellipsis)return;if("add"===this.ellipsis)h+=this.ellipsisStr,"right"!==r&&"end"!==r||(c-=this.ellipsisWidth);else if("replace"===this.ellipsis){const t=Ti(h,("vertical"===d?this.height:this.width)-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,h.length-1);if(h=h.slice(0,t),h+=this.ellipsisStr,"right"===r||"end"===r)if("vertical"===d);else{const{width:e}=wi(this.text.slice(t),this.character,this.ascentDescentMode);c-=this.ellipsisWidth-e}}}switch(this.character.script){case"super":l-=this.ascent*(1/3);break;case"sub":l+=this.descent/2}"vertical"===d&&(t.save(),t.rotateAbout(Math.PI/2,c,l),t.translate(-this.heightOrigin||-this.lineHeight/2,-this.descent/2),t.translate(c,l),c=0,l=0);const{lineWidth:u=1}=this.character;if(this.character.stroke&&u&&t.strokeText(h,c+this.dx,l+this.dy),this.character.fill&&t.fillText(h,c+this.dx,l+this.dy),this.character.fill)if(this.character.lineThrough||this.character.underline){if(this.character.underline){const e=1+l,i=Da(c,c+(this.widthOrigin||this.width),e,e+(this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1));t.fillRect(i.left,1+l,i.right-i.left,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)}if(this.character.lineThrough){const e=1+l-this.ascent/2,i=Da(c,c+(this.widthOrigin||this.width),e,e+(this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1));t.fillRect(i.left,1+l-this.ascent/2,i.right-i.left,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)}}else if("underline"===this.character.textDecoration){const e=1+l,i=Da(c,c+(this.widthOrigin||this.width),e,e+(this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1));t.fillRect(i.left,1+l,i.right-i.left,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)}else if("line-through"===this.character.textDecoration){const e=1+l-this.ascent/2,i=Da(c,c+(this.widthOrigin||this.width),e,e+(this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1));t.fillRect(i.left,1+l-this.ascent/2,i.right-i.left,this.character.fontSize?Math.max(1,Math.floor(this.character.fontSize/10)):1)}"vertical"===d&&t.restore()}getWidthWithEllips(t){let e=this.text;const i="vertical"===t?this.height:this.width;if("hide"===this.ellipsis)return i;if("add"===this.ellipsis)return i+this.ellipsisWidth;if("replace"===this.ellipsis){const t=Ti(e,i-this.ellipsisWidth+this.ellipsisOtherParagraphWidth,this.character,e.length-1);e=e.slice(0,t),e+=this.ellipsisStr;const{width:s}=wi(this.text.slice(t),this.character,this.ascentDescentMode);return i+this.ellipsisWidth-s}return i}}const Ua=["width","height","image",...Fr];class Fa extends Hr{constructor(t){super(t),this.type="image",this.numberType=ir,this.loadImage(this.attribute.image)}getImageElement(){const{image:t}=this.attribute;if(!t||!this.resources)return null;const e=this.resources.get(t);return"success"!==e.state?null:e.data}get width(){return this.tryUpdateAABBBounds(),this._actualWidth}get height(){return this.tryUpdateAABBBounds(),this._actualHeight}get repeatX(){var t;return null!==(t=this.attribute.repeatX)&&void 0!==t?t:"no-repeat"}set repeatX(t){this.attribute.repeatX===t&&(this.attribute.repeatX=t)}get repeatY(){var t;return null!==(t=this.attribute.repeatY)&&void 0!==t?t:"no-repeat"}set repeatY(t){this.attribute.repeatY===t&&(this.attribute.repeatY=t)}get image(){return this.attribute.image}set image(t){t!==this.attribute.image&&(this.attribute.image=t,this.loadImage(this.attribute.image))}imageLoadSuccess(t,e,i){super.imageLoadSuccess(t,e,(()=>{this.successCallback&&this.successCallback()})),this.addUpdateBoundTag()}imageLoadFail(t,e){super.imageLoadFail(t,(()=>{this.failCallback&&this.failCallback()}))}setAttributes(t,e,i){return t.image&&this.loadImage(t.image),super.setAttributes(t,e,i)}setAttribute(t,e,i,s){return"image"===t&&this.loadImage(e),super.setAttribute(t,e,i,s)}getGraphicTheme(){return ds(this).image}updateAABBBounds(t,e,i){if(!this.updatePathProxyAABBBounds(i)){const{maxWidth:s=e.maxWidth,maxHeight:n=e.maxHeight}=t;let{width:r,height:a}=t;if(null==r||null==a){const t=this.getImageElement();if(t){const e=t.width,i=t.height;if(null!=r)a=r*(i/e);else if(null!=a)r=a*(e/i);else{const t=e/i;t>s/n?(r=s,a=s/t):(a=n,r=n*t)}}else r=s,a=n}this._actualWidth=r,this._actualHeight=a,i.set(0,0,r,a)}const{tb1:s,tb2:n}=kt.graphicService.updateTempAABBBounds(i);return ba(t,e,s),i.union(s),s.setValue(n.x1,n.y1,n.x2,n.y2),this.widthWithoutTransform=i.x2-i.x1,this.heightWithoutTransform=i.y2-i.y1,kt.graphicService.transformAABBBounds(t,i,e,!1,this),i}getDefaultAttribute(t){return di[t]}needUpdateTags(t){return super.needUpdateTags(t,Ua)}needUpdateTag(t){return super.needUpdateTag(t,Ua)}clone(){return new Fa(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Fa.NOWORK_ANIMATE_ATTR}}function Na(t){return new Fa(t)}Fa.NOWORK_ANIMATE_ATTR=Object.assign({image:1,repeatX:1,repeatY:1},Vr);class Wa extends Fa{constructor(t){if(super(t),this._x=0,this._y=0,this._hovered=!1,this._marginArray=[0,0,0,0],"always"===t.backgroundShowMode&&(this._hovered=!0),t.margin){const e=_s(t.margin);this._marginArray="number"==typeof e?[e,e,e,e]:e}this.onBeforeAttributeUpdate=(t,e,s)=>{if(i.isArray(s)&&-1!==s.indexOf("margin")||"margin"===s)if(e.margin){const t=_s(e.margin);this._marginArray="number"==typeof t?[t,t,t,t]:t}else this._marginArray=[0,0,0,0]}}get width(){var t;return(null!==(t=this.attribute.width)&&void 0!==t?t:0)+this._marginArray[1]+this._marginArray[3]}get height(){var t;return(null!==(t=this.attribute.height)&&void 0!==t?t:0)+this._marginArray[0]+this._marginArray[2]}tryUpdateAABBBounds(){if(!this.shouldUpdateAABBBounds())return this._AABBBounds;this.doUpdateAABBBounds();const{width:t=di.width,height:e=di.height}=this.attribute,{backgroundWidth:i=t,backgroundHeight:s=e}=this.attribute,n=(i-t)/2,r=(s-e)/2;return this._AABBBounds.expand([0,2*n,2*r,0]),this._AABBBounds}setHoverState(t){"hover"===this.attribute.backgroundShowMode&&this._hovered!==t&&(this._hovered=t)}}class za{constructor(t,e,i,s,n,r,a,o){this.left=t,this.width=e,this.baseline=i,this.ascent=s,this.descent=n,this.top=i-s,this.paragraphs=r.map((t=>t)),this.textAlign=(this.paragraphs[0]instanceof Wa?this.paragraphs[0].attribute.textAlign:this.paragraphs[0].character.textAlign)||"left",this.direction=a,this.directionKey=yi[this.direction],this.actualWidth=0;let l=0;this.paragraphs.forEach(((t,e)=>{if(0===e&&t instanceof ja){const e=_i.exec(t.text);0!==(null==e?void 0:e.index)&&(t.text=t.text.slice(null==e?void 0:e.index),t.updateWidth())}this.actualWidth+=t[this.directionKey.width],l=Math.max(t[this.directionKey.height],l)})),this.height=l,this.blankWidth=o?0:this.width-this.actualWidth,this.calcOffset(e,o)}calcOffset(t,e){const i=this.directionKey,s=this.height;let n=this.left,r=0;this.actualWidth<t&&!e&&("right"===this.textAlign||"end"===this.textAlign?n=t-this.actualWidth:"center"===this.textAlign?n=(t-this.actualWidth)/2:"justify"===this.textAlign&&(this.paragraphs.length<2?n=(t-this.actualWidth)/2:r=(t-this.actualWidth)/(this.paragraphs.length-1))),this.paragraphs.map((function(t){t instanceof Wa?(t["_"+i.x]=n,n+=t[i.width]+r,t["_"+i.y]="top"===t.attribute.textBaseline?0:"bottom"===t.attribute.textBaseline?s-t.height:(s-t.height)/2):(t[i.left]=n,n+=t[i.width]+r)}))}draw(t,e,i,s,n,r){if(n&&(e||this.paragraphs.some((t=>t.overflow)))){let t=!0,i=!1;for(let e=this.paragraphs.length-1;e>=0;e--){const s=this.paragraphs[e];if(s.overflow)t=t&&""===s.text;else if(t){i=!0;break}}let s=0;if(!i)for(let t=this.paragraphs.length-1;t>=0;t--){const i=this.paragraphs[t];if(i.overflow){if(""===i.text)break;continue}if(i instanceof Wa)break;if("vertical"===this.direction&&"vertical"!==i.direction){i.verticalEllipsis=!0;break}const r=!0===n?"...":n||"";i.ellipsisStr=r;const{width:a}=wi(r,i.character,i.ascentDescentMode),o=a||0;if(o<=this.blankWidth+s){e&&(i.ellipsis="add");break}if(o<=this.blankWidth+s+i.width){i.ellipsis="replace",i.ellipsisWidth=o,i.ellipsisOtherParagraphWidth=this.blankWidth+s;break}i.ellipsis="hide",s+=i.width}}let a="",o=-1,l=[];const h=[l];this.paragraphs.forEach(((e,n)=>{if(e instanceof Wa)return;const r=e.drawBackground(t,s,this.ascent,i,0===n,this.textAlign,this.height);r&&(a===r.fillStyle&&o===r.globalAlpha||(l=[],h.push(l),a=r.fillStyle,o=r.globalAlpha),l.push(r))})),h.forEach((e=>{if(0===e.length)return;const i=e[0],s=e[e.length-1];t.fillStyle=i.fillStyle,t.globalAlpha=i.globalAlpha,t.fillRect(i.left,i.top,s.right-i.left,s.bottom-i.top)})),this.paragraphs.forEach(((e,n)=>{if(e instanceof Wa)return e.setAttributes({x:i+e._x,y:s+e._y}),void r(e,t,i+e._x,s+e._y,this.ascent);const a={x1:this.left,y1:this.top,x2:this.left+this.actualWidth,y2:this.top+this.height};(function(t,e){const i=e&&e.stroke||vi;if(!i)return void(t.globalAlpha=0);const{strokeOpacity:s=1,opacity:n=1}=e;t.globalAlpha=s*n,t.lineWidth=e&&"number"==typeof e.lineWidth?e.lineWidth:1,t.strokeStyle=i,Si(t,e)})(t,e.character),function(t,e,i){const s=e&&e.fill||bi;if(!s)return void(t.globalAlpha=0);const{fillOpacity:n=1,opacity:r=1}=e;t.globalAlpha=n*r,t.fillStyle=i?mi(t,s,{AABBBounds:i}):s,Si(t,e)}(t,e.character,a),e.draw(t,s,this.ascent,i,0===n,this.textAlign,this.height)}))}getWidthWithEllips(t){let e=0;for(let i=this.paragraphs.length-1;i>=0;i--){const s=this.paragraphs[i];if(s instanceof Wa)break;const{width:n}=wi(t,s.character,s.ascentDescentMode),r=n||0;if(r<=this.blankWidth+e){s.ellipsis="add",s.ellipsisWidth=r;break}if(r<=this.blankWidth+e+s.width){s.ellipsis="replace",s.ellipsisWidth=r,s.ellipsisOtherParagraphWidth=this.blankWidth+e;break}s.ellipsis="hide",e+=s.width}let i=0;return this.paragraphs.forEach(((t,e)=>{i+=t instanceof Wa?t.width:t.getWidthWithEllips(this.direction)})),i}}class Ga{constructor(t){this.frame=t,this.width=this.frame.width,this.height=this.frame.height,this.lineWidth=0,this.y=this.frame.top,this.maxAscent=0,this.maxDescent=0,this.maxAscentForBlank=0,this.maxDescentForBlank=0,this.lineBuffer=[],this.direction=t.layoutDirection,this.directionKey=yi[this.direction]}store(t){if(t instanceof Wa){this.frame.icons.set(t.richtextId,t),this.lineBuffer.push(t),this.lineWidth+=t[this.directionKey.width];let e=0,i=0;"top"===t.attribute.textBaseline?(e=0,i=t.height):"bottom"===t.attribute.textBaseline?(e=t.height,i=0):(e=t.height/2,i=t.height/2),this.maxAscent=Math.max(this.maxAscent,e),this.maxDescent=Math.max(this.maxDescent,i)}else this.lineBuffer.push(t),0!==t.text.length?(this.lineWidth+=t[this.directionKey.width],this.maxAscent=Math.max(this.maxAscent,t.ascent),this.maxDescent=Math.max(this.maxDescent,t.descent)):(this.maxAscentForBlank=Math.max(this.maxAscentForBlank,t.ascent),this.maxDescentForBlank=Math.max(this.maxDescentForBlank,t.descent))}send(){if(0===this.lineBuffer.length)return;const t=0===this.maxAscent?this.maxAscentForBlank:this.maxAscent,e=0===this.maxDescent?this.maxDescentForBlank:this.maxDescent,i=new za(this.frame.left,this[this.directionKey.width],this.y+t,t,e,this.lineBuffer,this.direction,"horizontal"===this.direction?this.frame.isWidthMax:this.frame.isHeightMax);this.frame.lines.push(i),this.frame.actualHeight+=i.height,this.y+=i.height,this.lineBuffer.length=0,this.lineWidth=this.maxAscent=this.maxDescent=this.maxAscentForBlank=this.maxDescentForBlank=0}deal(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t instanceof Wa?"horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+t[this.directionKey.width]<=this[this.directionKey.width]?this.store(t):0===this.lineBuffer.length?(this.store(t),this.send()):(this.send(),this.deal(t)):"number"!=typeof this.width||this.width<0||(t.newLine&&this.send(),(0!==t.text.length||this.newLine)&&("horizontal"===this.direction&&0===this.width||"vertical"===this.direction&&0===this.height||this.lineWidth+t[this.directionKey.width]<=this[this.directionKey.width]?this.store(t):this.lineWidth===this[this.directionKey.width]?(this.send(),this.deal(t)):this.cut(t,e)))}cut(t,e){const i=this[this.directionKey.width]-this.lineWidth||0,s=Math.ceil(i/t[this.directionKey.width]*t.length)||0,n=Ti(t.text,i,t.character,s,"break-word"===this.frame.wordBreak);if(0!==n){const[i,s]=function(t,e){const i=t.text.slice(0,e),s=t.text.slice(e);return[new ja(i,t.newLine,t.character,t.ascentDescentMode),new ja(s,!0,t.character,t.ascentDescentMode)]}(t,n);this.store(i),e?this.send():this.deal(s)}else 0!==this.lineBuffer.length&&(this.send(),this.deal(t))}}let Va=!1;try{Va=Intl&&"function"==typeof Intl.Segmenter}catch(t){Va=!1}const Ha=["width","height","ellipsis","wordBreak","verticalDirection","maxHeight","maxWidth","textAlign","textBaseline","textConfig","layoutDirection","fill","stroke","fontSize","fontFamily","fontStyle","fontWeight","lineWidth","opacity","fillOpacity","strokeOpacity",...Fr];class Xa extends Hr{constructor(t){super(t),this.type="richtext",this._currentHoverIcon=null,this.numberType=hr,this.onBeforeAttributeUpdate=(t,e,i)=>{for(const i in t)if("hoverIconId"===i){if(t[i]===e[i])continue;const s=this._frameCache.icons.get(t[i]);this.updateHoverIconState(s)}}}get width(){var t;return null!==(t=this.attribute.width)&&void 0!==t?t:ci.width}set width(t){this.attribute.width!==t&&(this.attribute.width=t,this.addUpdateShapeAndBoundsTag())}get height(){var t;return null!==(t=this.attribute.height)&&void 0!==t?t:ci.height}set height(t){this.attribute.height!==t&&(this.attribute.height=t,this.addUpdateShapeAndBoundsTag())}get maxWidth(){return this.attribute.maxWidth}set maxWidth(t){this.attribute.maxWidth!==t&&(this.attribute.maxWidth=t,this.addUpdateShapeAndBoundsTag())}get maxHeight(){return this.attribute.maxHeight}set maxHeight(t){this.attribute.maxHeight!==t&&(this.attribute.maxHeight=t,this.addUpdateShapeAndBoundsTag())}get ellipsis(){var t;return null!==(t=this.attribute.ellipsis)&&void 0!==t?t:ci.ellipsis}set ellipsis(t){this.attribute.ellipsis!==t&&(this.attribute.ellipsis=t,this.addUpdateShapeAndBoundsTag())}get wordBreak(){var t;return null!==(t=this.attribute.wordBreak)&&void 0!==t?t:ci.wordBreak}set wordBreak(t){this.attribute.wordBreak!==t&&(this.attribute.wordBreak=t,this.addUpdateShapeAndBoundsTag())}get verticalDirection(){var t;return null!==(t=this.attribute.verticalDirection)&&void 0!==t?t:ci.verticalDirection}set verticalDirection(t){this.attribute.verticalDirection!==t&&(this.attribute.verticalDirection=t,this.addUpdateShapeAndBoundsTag())}get textAlign(){var t;return null!==(t=this.attribute.textAlign)&&void 0!==t?t:ci.textAlign}set textAlign(t){this.attribute.textAlign!==t&&(this.attribute.textAlign=t,this.addUpdateShapeAndBoundsTag())}get textBaseline(){var t;return null!==(t=this.attribute.textBaseline)&&void 0!==t?t:ci.textBaseline}set textBaseline(t){this.attribute.textBaseline!==t&&(this.attribute.textBaseline=t,this.addUpdateShapeAndBoundsTag())}get textConfig(){var t;return null!==(t=this.attribute.textConfig)&&void 0!==t?t:ci.textConfig}set textConfig(t){this.attribute.textConfig=t,this.addUpdateShapeAndBoundsTag()}getGraphicTheme(){return ds(this).richtext}static AllSingleCharacter(t){return t.lines?t.lines.every((t=>t.paragraphs.every((t=>!(t.text&&i.isString(t.text)&&Xa.splitText(t.text).length>1))))):t.every((t=>t.isComposing||!(t.text&&i.isString(t.text)&&Xa.splitText(t.text).length>1)))}static splitText(t){if(Va){const e=new Intl.Segmenter(void 0,{granularity:"grapheme"}),i=[];for(const{segment:s}of e.segment(t))i.push(s);return i}return Array.from(t)}static TransformTextConfig2SingleCharacter(t){const e=[];return t.forEach((t=>{const s=Xa.splitText(t.text.toString());if(i.isString(t.text)&&s.length>1)for(let i=0;i<s.length;i++){const n=s[i];e.push(Object.assign(Object.assign({},t),{text:n}))}else e.push(t)})),e}updateAABBBounds(t,e,i){var s,n,r,a;const{width:o=e.width,height:l=e.height,maxWidth:h=e.maxWidth,maxHeight:c=e.maxHeight,textAlign:d=e.textAlign,textBaseline:u=(null!==(n=null!==(s=t.textBaseline)&&void 0!==s?s:e.textBaseline)&&void 0!==n?n:"top"),editOptions:p}=t;if(o>0&&l>0)i.set(0,0,o,l);else{const t=this.getFrameCache(),{width:e,height:s}=t.getActualSize();let n=o||e||0,r=l||s||0;r="number"==typeof c&&r>c?c:r||0,n="number"==typeof h&&n>h?h:n||0,i.set(0,0,n,r)}p&&p.keepHeightWhileEmpty&&!i.height()&&!(null===(r=t.textConfig)||void 0===r?void 0:r.length)&&(i.y2=i.y1+(null!==(a=t.fontSize)&&void 0!==a?a:12),i.x2=i.x1+2);let g=0;switch(u){case"top":g=0;break;case"middle":g=-i.height()/2;break;case"bottom":g=-i.height()}let f=0;switch(d){case"left":f=0;break;case"center":f=-i.width()/2;break;case"right":f=-i.width()}return i.translate(f,g),kt.graphicService.updateTempAABBBounds(i),null==t.forceBoundsHeight&&null==t.forceBoundsWidth||kt.graphicService.updateHTMLTextAABBBounds(t,e,i),this.widthWithoutTransform=i.x2-i.x1,this.heightWithoutTransform=i.y2-i.y1,kt.graphicService.transformAABBBounds(t,i,e,!1,this),0===i.width()&&0===i.height()&&i.clear(),i}needUpdateTags(t){return super.needUpdateTags(t,Ha)}needUpdateTag(t){return super.needUpdateTag(t,Ha)}getFrameCache(){return this.shouldUpdateShape()&&(this.doUpdateFrameCache(),this.clearUpdateShapeTag()),this._frameCache}get cliped(){const t=this.getFrameCache();if(t.actualHeight>t.height)return!0;const{disableAutoWrapLine:e}=this.attribute;if(e)for(let e=0;e<t.lines.length;e++){const i=t.lines[e];for(let t=0;t<i.paragraphs.length;t++){const e=i.paragraphs[t];if(e.overflow&&""!==e.text)return!0}}return!1}combinedStyleToCharacter(t){const{fill:e,stroke:i,fontSize:s,fontFamily:n,fontStyle:r,fontWeight:a,lineWidth:o,opacity:l,fillOpacity:h,lineHeight:c,strokeOpacity:d,upgradeAttrs:u}=this.attribute,p=Object.assign({fill:e,stroke:i,fontSize:s,fontFamily:n,fontStyle:r,fontWeight:a,lineWidth:o,opacity:l,fillOpacity:h,strokeOpacity:d},t);return(null==u?void 0:u.lineHeight)&&(p.lineHeight=c),p}doUpdateFrameCache(t){var e;const{maxWidth:s,maxHeight:n,width:r,height:a,ellipsis:o,wordBreak:l,verticalDirection:h,textAlign:c,textBaseline:d,layoutDirection:u,singleLine:p,disableAutoWrapLine:g,editable:f,ascentDescentMode:m,upgradeAttrs:y}=this.attribute,b=y&&y.multiBreakLine;let{textConfig:v=[]}=this.attribute;f&&v.length>0&&!Xa.AllSingleCharacter(v)&&(v=Xa.TransformTextConfig2SingleCharacter(v),this.attribute.textConfig=v);const x=[],A=null!=t?t:v;for(let t=0;t<A.length;t++)if("image"in A[t]){const e=this.combinedStyleToCharacter(A[t]);e.lineWidth=void 0;const i=e.id&&this._frameCache&&this._frameCache.icons&&this._frameCache.icons.get(e.id);if(i)x.push(i);else{const t=new Wa(e);t.successCallback=()=>{var t;this.addUpdateBoundTag(),null===(t=this.stage)||void 0===t||t.renderNextFrame()},t.richtextId=e.id,x.push(t)}}else{const e=this.combinedStyleToCharacter(A[t]);if(i.isNumber(e.text)&&(e.text=`${e.text}`),e.text&&e.text.includes("\n")){const i=e.text.split("\n");for(let s=0;s<i.length;s++)if(0===s)x.push(new ja(i[s],!1,e,m));else if(i[s]||t===A.length-1)x.push(new ja(i[s],!0,e,m));else{const e=this.combinedStyleToCharacter(A[t+1]);x.push(new ja(i[s],!0,e,m))}}else e.text&&x.push(new ja(e.text,!1,e,m))}const _="number"==typeof s&&Number.isFinite(s)&&s>0,S="number"==typeof n&&Number.isFinite(n)&&n>0,T="number"==typeof r&&Number.isFinite(r)&&r>0&&(!_||r<=s),B="number"==typeof a&&Number.isFinite(a)&&a>0&&(!S||a<=n),w=new Ea(0,0,(T?r:_?s:0)||0,(B?a:S?n:0)||0,o,l,h,c,d,u||"horizontal",!T&&_,!B&&S,p||!1,null===(e=this._frameCache)||void 0===e?void 0:e.icons),C=new Ga(w);if(C.newLine=b,g){let t=0,e=!1;for(let i=0;i<x.length;i++){const s=x[i];e?(s.overflow=!0,s.left=1/0,s.top=1/0,!s.newLine&&w.lines[w.lines.length-1].paragraphs.push(s)):C.deal(s,!0),w.lines.length!==t&&(t=w.lines.length,C.lineBuffer.length=0,s.overflow=!0,s.left=1e3,s.top=1e3,w.lines[w.lines.length-1].paragraphs.push(s),e=!0),s.newLine&&(e=!1,C.lineWidth=0),C.send()}}else for(let t=0;t<x.length;t++)C.deal(x[t]);if(C.send(),!("horizontal"===w.layoutDirection?T:B)){const t=w.getActualSizeWidthEllipsis();let e="horizontal"===w.layoutDirection?t.width:t.height;("horizontal"===w.layoutDirection?_:S)&&(e=Math.min(e,"horizontal"===w.layoutDirection?s:n)),w.lines.forEach((function(t){t.calcOffset(e,!1)}))}b&&w.lines.forEach((t=>{const e=t.paragraphs;t.paragraphs=t.paragraphs.filter((t=>""!==t.text)),0===t.paragraphs.length&&e.length&&(e[0].text="\n",t.paragraphs.push(e[0]))})),this._frameCache=w}clone(){return new Xa(Object.assign({},this.attribute))}setStage(t,e){super.setStage(t,e),this.getFrameCache().icons.forEach((i=>{i.setStage(t,e)}))}bindIconEvent(){this.addEventListener("pointermove",(t=>{const e=this.pickIcon(t.global);e&&e===this._currentHoverIcon||(e?this.setAttribute("hoverIconId",e.richtextId):!e&&this._currentHoverIcon&&this.setAttribute("hoverIconId",void 0))})),this.addEventListener("pointerleave",(t=>{this._currentHoverIcon&&this.setAttribute("hoverIconId",void 0)}))}updateHoverIconState(t){var e,i,s,n,r;t?(null===(e=this._currentHoverIcon)||void 0===e||e.setHoverState(!1),this._currentHoverIcon=t,this._currentHoverIcon.setHoverState(!0),null===(i=this.stage)||void 0===i||i.setCursor(t.attribute.cursor),null===(s=this.stage)||void 0===s||s.renderNextFrame()):(this._currentHoverIcon.setHoverState(!1),this._currentHoverIcon=null,null===(n=this.stage)||void 0===n||n.setCursor(),null===(r=this.stage)||void 0===r||r.renderNextFrame())}pickIcon(t){const e=this.getFrameCache(),{e:i,f:s}=this.globalTransMatrix;let n;return e.icons.forEach(((e,r)=>{var a,o;const l=e.AABBBounds.clone();l.translate(e._marginArray[3],e._marginArray[0]),l.containsPoint({x:t.x-i,y:t.y-s})&&(n=e,n.globalX=(null!==(a=n.attribute.x)&&void 0!==a?a:0)+i+e._marginArray[3],n.globalY=(null!==(o=n.attribute.y)&&void 0!==o?o:0)+s+e._marginArray[0])})),n}getNoWorkAnimateAttr(){return Xa.NOWORK_ANIMATE_ATTR}}function Ya(t){return new Xa(t)}Xa.NOWORK_ANIMATE_ATTR=Object.assign({ellipsis:1,wordBreak:1,verticalDirection:1,textAlign:1,textBaseline:1,textConfig:1,layoutDirection:1},Vr);const Ka=["path","customPath",...Fr];class $a extends Hr{constructor(t){super(t),this.type="path",this.numberType=nr}get pathShape(){return this.tryUpdateAABBBounds(),this.getParsedPathShape()}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{path:t}=this.attribute;return null!=t&&""!==t}getParsedPathShape(){const t=this.getGraphicTheme();if(!this.valid)return t.path;const e=this.attribute;return e.path instanceof ze?e.path:(i.isNil(this.cache)&&this.doUpdatePathShape(),this.cache instanceof ze?this.cache:t.path)}getGraphicTheme(){return ds(this).path}updateAABBBounds(t,e,i){if(!this.updatePathProxyAABBBounds(i)){const t=this.getParsedPathShape();i.union(t.getBounds())}const{tb1:s,tb2:n}=kt.graphicService.updateTempAABBBounds(i);ba(t,e,s),i.union(s),s.setValue(n.x1,n.y1,n.x2,n.y2),this.widthWithoutTransform=i.x2-i.x1,this.heightWithoutTransform=i.y2-i.y1;const{lineJoin:r=e.lineJoin}=t;return kt.graphicService.transformAABBBounds(t,i,e,"miter"===r,this),i}doUpdateAABBBounds(t){return this.doUpdatePathShape(),super.doUpdateAABBBounds(t)}doUpdatePathShape(){const t=this.attribute;i.isString(t.path,!0)?this.cache=(new ze).fromString(t.path):t.customPath&&(this.cache=new ze,t.customPath(this.cache,this))}needUpdateTags(t){return super.needUpdateTags(t,Ka)}needUpdateTag(t){return super.needUpdateTag(t,Ka)}toCustomPath(){return(new ze).fromCustomPath2D(this.getParsedPathShape(),0,0)}clone(){return new $a(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return $a.NOWORK_ANIMATE_ATTR}}function qa(t){return new $a(t)}$a.NOWORK_ANIMATE_ATTR=Object.assign({path:1,customPath:1},Vr);const Za=["segments","points","curveType","curveTension",...Fr];class Ja extends Hr{constructor(t){super(t),this.type="area",this.numberType=tr}isValid(){return super.isValid()&&this._isValid()}_isValid(){if(this.pathProxy)return!0;const{points:t,segments:e}=this.attribute;return e?0!==e.length:!!t&&0!==t.length}getGraphicTheme(){return ds(this).area}updateAABBBounds(t,e,i){this.updatePathProxyAABBBounds(i)||(t.segments?this.updateAreaAABBBoundsBySegments(t,e,i):this.updateAreaAABBBoundsByPoints(t,e,i)),kt.graphicService.updateTempAABBBounds(i),this.setWidthHeightWithoutTransform(i);const{lineJoin:s=e.lineJoin}=t;return kt.graphicService.transformAABBBounds(t,i,e,"miter"===s,this),i}updateAreaAABBBoundsByPoints(t,e,i,s){const{points:n=e.points}=t,r=i;return n.forEach((t=>{var e,i;r.add(t.x,t.y),r.add(null!==(e=t.x1)&&void 0!==e?e:t.x,null!==(i=t.y1)&&void 0!==i?i:t.y)})),r}updateAreaAABBBoundsBySegments(t,e,i,s){const{segments:n=e.segments}=t,r=i;return n.forEach((t=>{t.points.forEach((t=>{var e,i;r.add(t.x,t.y),r.add(null!==(e=t.x1)&&void 0!==e?e:t.x,null!==(i=t.y1)&&void 0!==i?i:t.y)}))})),r}_interpolate(t,e,i,s,n){"points"===t&&(n.points=Cs(i,s,e))}needUpdateTags(t){return super.needUpdateTags(t,Za)}needUpdateTag(t){return super.needUpdateTag(t,Za)}toCustomPath(){let t=super.toCustomPath();if(t)return t;t=new ze;const e=this.attribute,i=e.segments,s=e=>{if(e&&e.length){let i=!0;const s=[];if(e.forEach((e=>{var n,r;!1!==e.defined&&(i?t.moveTo(e.x,e.y):t.lineTo(e.x,e.y),s.push({x:null!==(n=e.x1)&&void 0!==n?n:e.x,y:null!==(r=e.y1)&&void 0!==r?r:e.y}),i=!1)})),s.length){for(let e=s.length-1;e>=0;e--)t.lineTo(s[e].x,s[e].y);t.closePath()}}};return e.points?s(e.points):i&&i.length&&i.forEach((t=>{s(t.points)})),t}clone(){return new Ja(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return Ja.NOWORK_ANIMATE_ATTR}}Ja.NOWORK_ANIMATE_ATTR=Object.assign({segments:1,curveType:1},Vr);const Qa=["innerRadius","outerRadius","startAngle","endAngle","cornerRadius","padAngle","padRadius","cap",...Fr];class to extends Hr{constructor(t){super(t),this.type="arc",this.numberType=Jn}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{startAngle:t,endAngle:e,outerRadius:i,innerRadius:s}=this.attribute;return this._validNumber(t)&&this._validNumber(e)&&this._validNumber(i)&&this._validNumber(s)}getParsedCornerRadius(){const t=this.getGraphicTheme(),{cornerRadius:e=t.cornerRadius,innerPadding:s=t.innerPadding,outerPadding:n=t.outerPadding}=this.attribute;let{outerRadius:r=t.outerRadius,innerRadius:a=t.innerRadius}=this.attribute;if(r+=n,a-=s,0===e||"0%"===e)return 0;const o=Math.abs(r-a),l=t=>Math.min(i.isNumber(t,!0)?t:o*parseFloat(t)/100,o/2);if(i.isArray(e)){const t=e.map((t=>l(t)||0));return 0===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.push(0),t)}return l(e)}getParsedAngle(){const t=this.getGraphicTheme();let{startAngle:e=t.startAngle,endAngle:s=t.endAngle}=this.attribute;const{cap:n=t.cap}=this.attribute,r=s-e>=0?1:-1,a=s-e;if(e=i.clampAngleByRadian(e),s=e+a,n&&i.abs(a)<i.pi2-i.epsilon){let a=1,o=1;n.length&&(a=Number(n[0]),o=Number(n[1]));let{outerRadius:l=t.outerRadius,innerRadius:h=t.innerRadius}=this.attribute;const{outerPadding:c=t.outerPadding,innerPadding:d=t.innerPadding}=this.attribute;l+=c,h-=d;const u=Math.abs(l-h)/2,p=u/l;if(u>i.epsilon&&l>i.epsilon)return{startAngle:e-r*p*a,endAngle:s+r*p*o,sc:r*p*a,ec:r*p*o}}return{startAngle:e,endAngle:s}}getParsePadAngle(t,e){const s=this.getGraphicTheme(),{innerPadding:n=s.innerPadding,outerPadding:r=s.outerPadding,padAngle:a=s.padAngle}=this.attribute;let{outerRadius:o=s.outerRadius,innerRadius:l=s.innerRadius}=this.attribute;o+=r,l-=n;const{padRadius:h=i.sqrt(o*o+l*l)}=this.attribute,c=i.abs(e-t);let d=t,u=e,p=t,g=e;const f=a/2;let m=c,y=c;if(f>i.epsilon&&h>i.epsilon){const s=e>t?1:-1;let n=i.asin(Number(h)/l*i.sin(f)),r=i.asin(Number(h)/o*i.sin(f));return(m-=2*n)>i.epsilon?(n*=s,p+=n,g-=n):(m=0,p=g=(t+e)/2),(y-=2*r)>i.epsilon?(r*=s,d+=r,u-=r):(y=0,d=u=(t+e)/2),{outerStartAngle:d,outerEndAngle:u,innerStartAngle:p,innerEndAngle:g,innerDeltaAngle:m,outerDeltaAngle:y}}return{outerStartAngle:d,outerEndAngle:u,innerStartAngle:p,innerEndAngle:g,innerDeltaAngle:m,outerDeltaAngle:y}}getGraphicTheme(){return ds(this).arc}updateAABBBounds(t,e,i,s){this.updatePathProxyAABBBounds(i)||(s?this.updateArcAABBBoundsImprecise(t,e,i):this.updateArcAABBBoundsAccurate(t,e,i));const{tb1:n,tb2:r}=kt.graphicService.updateTempAABBBounds(i);ba(t,e,n),i.union(n),n.setValue(r.x1,r.y1,r.x2,r.y2),this.setWidthHeightWithoutTransform(i);const{lineJoin:a=e.lineJoin}=t;return kt.graphicService.transformAABBBounds(t,i,e,"miter"===a,this),i}updateArcAABBBoundsImprecise(t,e,i){let{outerRadius:s=e.outerRadius,innerRadius:n=e.innerRadius}=t;const{outerPadding:r=e.outerPadding,innerPadding:a=e.innerPadding}=t;return s+=r,n-=a,s<n&&(s=n),i.set(-s,-s,s,s),i}updateArcAABBBoundsAccurate(t,e,s){let{outerRadius:n=e.outerRadius,innerRadius:r=e.innerRadius}=t;const{outerPadding:a=e.outerPadding,innerPadding:o=e.innerPadding}=t;if(n+=a,r-=o,n<r){const t=n;n=r,r=t}let{endAngle:l=e.endAngle,startAngle:h=e.startAngle}=t;if(h>l){const t=h;h=l,l=t}return n<=i.epsilon?s.set(0,0,0,0):Math.abs(l-h)>i.pi2-i.epsilon?s.set(-n,-n,n,n):(Bs(h,l,n,s),Bs(h,l,r,s)),s}needUpdateTags(t){return super.needUpdateTags(t,Qa)}needUpdateTag(t){return super.needUpdateTag(t,Qa)}toCustomPath(){var t,e,s,n;let r=super.toCustomPath();if(r)return r;const a=this.attribute,{startAngle:o,endAngle:l}=this.getParsedAngle();let h=(null!==(t=a.innerRadius)&&void 0!==t?t:0)-(null!==(e=a.innerPadding)&&void 0!==e?e:0),c=(null!==(s=a.outerRadius)&&void 0!==s?s:0)-(null!==(n=a.outerPadding)&&void 0!==n?n:0);const d=i.abs(l-o),u=l>o;if(c<h){const t=c;c=h,h=t}if(r=new ze,c<=i.epsilon)r.moveTo(0,0);else if(d>=i.pi2-i.epsilon)r.moveTo(0+c*i.cos(o),0+c*i.sin(o)),r.arc(0,0,c,o,l,!u),h>i.epsilon&&(r.moveTo(0+h*i.cos(l),0+h*i.sin(l)),r.arc(0,0,h,l,o,u));else{const t=c*i.cos(o),e=c*i.sin(o),s=h*i.cos(l),n=h*i.sin(l);r.moveTo(0+t,0+e),r.arc(0,0,c,o,l,!u),r.lineTo(0+s,0+n),r.arc(0,0,h,l,o,u),r.closePath()}return r}clone(){return new to(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return to.NOWORK_ANIMATE_ATTR}}function eo(t){return new to(t)}to.NOWORK_ANIMATE_ATTR=Object.assign({cap:1},Vr);class io extends to{constructor(t){super(t),this.type="arc3d",this.numberType=Qn}updateAABBBounds(t,e,i){const s=this.stage;if(!s||!s.camera)return i;const{outerRadius:n=e.outerRadius,height:r=0}=t,a=n+r;return i.setValue(-a,-a,a,a),kt.graphicService.updateTempAABBBounds(i),kt.graphicService.transformAABBBounds(t,i,e,!1,this),i}getNoWorkAnimateAttr(){return io.NOWORK_ANIMATE_ATTR}}function so(t){return new io(t)}io.NOWORK_ANIMATE_ATTR=Object.assign({cap:1},Vr);const no=["points","cornerRadius",...Fr];class ro extends Hr{constructor(t){super(t),this.type="polygon",this.numberType=rr}isValid(){return super.isValid()&&this._isValid()}_isValid(){const{points:t}=this.attribute;return t&&t.length>=2}getGraphicTheme(){return ds(this).polygon}updateAABBBounds(t,e,i){this.updatePathProxyAABBBounds(i)||this.updatePolygonAABBBoundsImprecise(t,e,i),kt.graphicService.updateTempAABBBounds(i),this.widthWithoutTransform=i.x2-i.x1,this.heightWithoutTransform=i.y2-i.y1;const{lineJoin:s=e.lineJoin}=t;return kt.graphicService.transformAABBBounds(t,i,e,"miter"===s,this),i}updatePolygonAABBBoundsImprecise(t,e,i){const{points:s=e.points}=t;return s.forEach((t=>{i.add(t.x,t.y)})),i}_interpolate(t,e,i,s,n){"points"===t&&(n.points=Cs(i,s,e))}needUpdateTags(t){return super.needUpdateTags(t,no)}needUpdateTag(t){return super.needUpdateTag(t,no)}toCustomPath(){const t=this.attribute.points,e=new ze;return t.forEach(((t,i)=>{0===i?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)})),e.closePath(),e}clone(){return new ro(Object.assign({},this.attribute))}getNoWorkAnimateAttr(){return ro.NOWORK_ANIMATE_ATTR}}function ao(t){return new ro(t)}ro.NOWORK_ANIMATE_ATTR=Vr;class oo extends ro{constructor(t){super(t),this.type="pyramid3d",this.numberType=ar}updateAABBBounds(t,e,i){const s=this.stage;return s&&s.camera?(this.findFace().vertices.forEach((t=>{const e=t[0],s=t[1];i.add(e,s)})),kt.graphicService.updateTempAABBBounds(i),kt.graphicService.transformAABBBounds(t,i,e,!1,this),i):i}findFace(){const{points:t}=this.attribute,e=t.map(((e,i)=>{const s=3===i?t[0]:t[i+1],n=e.x-s.x;return 0===n?0:(e.y-s.y)/n})),s=t.map((t=>({p:t,d:0})));let n=!1,r=0;for(let t=0;t<e.length-1;t++){for(let a=t+1;a<e.length;a++){if(e[t]===e[a]){n=!0;const e=i.PointService.distancePP(s[t].p,s[t+1].p);s[t].d=e,s[t+1].d=e,r=i.max(r,e);const o=i.PointService.distancePP(s[a].p,s[a+1].p);s[a].d=o,s[a+1].d=o,r=i.max(r,o)}if(n)break}if(n)break}for(let e=t.length-1;e>=0;e--){const i=t[e];s.unshift({p:i,d:0})}for(let e=0;e<t.length;e++){const i=(r-s[e+t.length].d)/2;s[e].d+=i,s[e+t.length].d+=i}const a={polygons:[],vertices:[],edges:[]};return s.forEach((t=>{a.vertices.push([t.p.x,t.p.y,t.d])})),a.polygons.push({polygon:[0,4,5,1],normal:[0,-1,0]}),a.polygons.push({polygon:[7,6,2,3],normal:[0,1,0]}),a.polygons.push({polygon:[0,4,7,3],normal:[-1,0,0]}),a.polygons.push({polygon:[1,5,6,2],normal:[1,0,0]}),a.polygons.push({polygon:[0,1,2,3],normal:[0,0,-1]}),a.polygons.push({polygon:[4,5,6,7],normal:[0,0,1]}),a.edges=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[3,7],[1,5],[2,6]],a}_isValid(){return super._isValid()&&4===this.attribute.points.length}getNoWorkAnimateAttr(){return oo.NOWORK_ANIMATE_ATTR}}function lo(t){return new oo(t)}oo.NOWORK_ANIMATE_ATTR=Vr;class ho extends Yr{constructor(t){super({x:0,y:0}),this.type="shadowroot",this.shadowHost=t}clearUpdateBoundTag(){super.clearUpdateBoundTag(),this.shadowHost&&this.shadowHost.clearUpdateBoundTag()}addUpdateBoundTag(){super.addUpdateBoundTag(),this.shadowHost&&this.shadowHost.addUpdateBoundTag()}addUpdateShapeAndBoundsTag(){super.addUpdateShapeAndBoundsTag(),this.shadowHost&&this.shadowHost.addUpdateBoundTag()}tryUpdateGlobalTransMatrix(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.shouldUpdateGlobalMatrix()){const e=this.transMatrix;this._globalTransMatrix?this._globalTransMatrix.setValue(e.a,e.b,e.c,e.d,e.e,e.f):this._globalTransMatrix=e.clone(),this.doUpdateGlobalMatrix(),t&&this.clearUpdateGlobalPositionTag()}return this._globalTransMatrix}doUpdateGlobalMatrix(){if(this.shadowHost){const t=this.shadowHost.globalTransMatrix;this._globalTransMatrix.multiply(t.a,t.b,t.c,t.d,t.e,t.f)}}tryUpdateGlobalAABBBounds(){return this._globalAABBBounds?this._globalAABBBounds.setValue(this._AABBBounds.x1,this._AABBBounds.y1,this._AABBBounds.x2,this._AABBBounds.y2):this._globalAABBBounds=this._AABBBounds.clone(),this.shadowHost&&this._globalAABBBounds.transformWithMatrix(this.shadowHost.globalTransMatrix),this._globalAABBBounds}}function co(t){return new ho(t)}const uo=new class{constructor(){this.store=new Map}RegisterGraphicCreator(t,e){this.store.set(t,e),this[t]=e}CreateGraphic(t,e){const i=this.store.get(t);return i?i(e):null}};let po;function go(t){return po||(po=uo.CreateGraphic("text",{})),po.initAttributes(t),po.AABBBounds}var fo=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},mo=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},yo=function(t,e){return function(i,s){e(i,s,t)}};class bo{constructor(){this.time=Jt.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){var p;const{background:g,backgroundOpacity:f=(null!==(p=t.attribute.fillOpacity)&&void 0!==p?p:l.backgroundOpacity),opacity:m=l.opacity,backgroundMode:y=l.backgroundMode,backgroundFit:b=l.backgroundFit,backgroundKeepAspectRatio:v=l.backgroundKeepAspectRatio,backgroundScale:x=l.backgroundScale,backgroundOffsetX:A=l.backgroundOffsetX,backgroundOffsetY:_=l.backgroundOffsetY,backgroundClip:S=l.backgroundClip}=t.attribute;if(g)if(t.backgroundImg&&t.resources){const n=t.resources.get(g);if("success"!==n.state||!n.data)return;if(e.save(),t.parent&&!t.transMatrix.onlyTranslate()){const i=ds(t.parent).group,{scrollX:s=i.scrollX,scrollY:n=i.scrollY}=t.parent.attribute;e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.translate(s,n)}S&&e.clip();const r=t.AABBBounds;e.setCommonStyle(t,t.attribute,i,s,l),e.globalAlpha=f*m,this.doDrawImage(e,n.data,r,{backgroundMode:y,backgroundFit:b,backgroundKeepAspectRatio:v,backgroundScale:x,backgroundOffsetX:A,backgroundOffsetY:_}),e.restore(),t.transMatrix.onlyTranslate()||e.setTransformForCurrent()}else e.highPerformanceSave(),e.setCommonStyle(t,t.attribute,i,s,l),e.globalAlpha=f*m,e.fillStyle=g,e.fill(),e.highPerformanceRestore()}doDrawImage(t,e,i,s){const{backgroundMode:n,backgroundFit:r,backgroundKeepAspectRatio:a,backgroundScale:o=1,backgroundOffsetX:l=0,backgroundOffsetY:h=0}=s,c=i.width(),d=i.height();let u=c,p=d;if("no-repeat"===n)if(r)if(a){const s=Math.max(c/e.width,d/e.height);t.drawImage(e,i.x1+l,i.y1+h,e.width*s*o,e.height*s*o)}else t.drawImage(e,i.x1,i.y1,i.width(),i.height());else{const s=e.width*o,n=e.height*o;t.drawImage(e,i.x1+l,i.y1+h,s,n)}else{if(r&&"repeat"!==n&&(e.width||e.height)){const i=e.width,s=e.height;"repeat-x"===n?(u=i*(d/s),p=d):"repeat-y"===n&&(p=s*(c/i),u=c);const r=t.dpr,a=ns.allocate({width:u,height:p,dpr:r}),o=a.getContext("2d");o&&(o.inuse=!0,o.clearMatrix(),o.setTransformForCurrent(!0),o.clearRect(0,0,u,p),o.drawImage(e,0,0,u,p),e=a.nativeCanvas),ns.free(a)}const s=t.dpr,a=t.createPattern(e,n);a.setTransform&&a.setTransform(new DOMMatrix([1/s,0,0,1/s,0,0])),t.fillStyle=a,t.translate(i.x1,i.y1),t.fillRect(0,0,c,d),t.translate(-i.x1,-i.y1)}}}const vo=new bo;let xo=class{constructor(t){this.subRenderContribitions=t,this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){this._subRenderContribitions||(this._subRenderContribitions=this.subRenderContribitions.getContributions()),this._subRenderContribitions.forEach((p=>{p.render(t,e,i,s,n,r,a,o,l,h,c,d,u)}))}};xo=fo([ht(),yo(0,ot(Bt)),yo(0,ct(ca)),mo("design:paramtypes",[Object])],xo);const Ao=new class{constructor(){this.time=Jt.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){var p,g;const{clipConfig:f}=t.attribute;if(!f)return;const m=t.getClipPath();if(!m)return;const y=!(c||d),b=t.AABBBounds,v=null!==(p=t.attribute.width)&&void 0!==p?p:b.width(),x=null!==(g=t.attribute.height)&&void 0!==g?g:b.height();y&&e.save(),e.beginPath(),!1===m.draw(e,[v,x],i+v/2,s+x/2,0)&&e.closePath(),c&&c(e,t.attribute,l,!0),y&&e.clip()}};const _o=new class{constructor(){this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){const{clipConfig:p}=t.attribute;p&&t.getClipPath()&&(c||d||e.restore())}};const So=new class{constructor(){this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=10,this._tempSymbolGraphic=null}createCommonPattern(t,e,i,s,n){const r=(t-2*e)/2,a=s.dpr,o=ns.allocate({width:t,height:t,dpr:a}),l=o.getContext("2d");if(!l)return null;l.inuse=!0,l.clearMatrix(),l.setTransformForCurrent(!0),l.clearRect(0,0,t,t),n(r,l);const h=s.createPattern(o.nativeCanvas,"repeat");return h.setTransform&&h.setTransform(new DOMMatrix([1/a,0,0,1/a,0,0])),ns.free(o),h}createCirclePattern(t,e,s,n){return this.createCommonPattern(t,e,s,n,((t,e)=>{e.fillStyle=s,e.arc(t,t,t,0,i.pi2),e.fill()}))}createDiamondPattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((e,s)=>{const n=t/2,r=n;s.fillStyle=i,s.moveTo(n,r-e),s.lineTo(e+n,r),s.lineTo(n,r+e),s.lineTo(n-e,r),s.closePath(),s.fill()}))}createRectPattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((t,s)=>{const n=e,r=n;s.fillStyle=i,s.fillRect(n,r,2*t,2*t)}))}createVerticalLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((s,n)=>{const r=e;n.fillStyle=i,n.fillRect(r,0,2*s,t)}))}createHorizontalLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((s,n)=>{const r=e;n.fillStyle=i,n.fillRect(0,r,t,2*s)}))}createBiasLRLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((e,s)=>{s.strokeStyle=i,s.lineWidth=e,s.moveTo(0,0),s.lineTo(t,t);const n=t/2,r=-n;s.moveTo(n,r),s.lineTo(n+t,r+t),s.moveTo(-n,-r),s.lineTo(-n+t,-r+t),s.stroke()}))}createBiasRLLinePattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((e,s)=>{s.strokeStyle=i,s.lineWidth=e,s.moveTo(t,0),s.lineTo(0,t);const n=t/2,r=n;s.moveTo(t+n,r),s.lineTo(n,r+t),s.moveTo(t-n,-r),s.lineTo(-n,-r+t),s.stroke()}))}createGridPattern(t,e,i,s){return this.createCommonPattern(t,e,i,s,((t,s)=>{const n=e,r=n;s.fillStyle=i,s.fillRect(n,r,t,t),s.fillRect(n+t,r+t,t,t)}))}initTextureMap(t,e){this.textureMap=new Map}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){this.textureMap||this.initTextureMap(e,t.stage);const{texture:p=l.texture,textureColor:g=l.textureColor,textureSize:f=l.textureSize,texturePadding:m=l.texturePadding}=t.attribute;p&&this.drawTexture(p,t,e,i,s,l,g,f,m)}drawTexture(t,e,i,s,n,r,a,o,l){var h;const{textureRatio:c=r.textureRatio,textureOptions:d=null}=e.attribute;let u=this.textureMap.get(t);if(!u)switch(t){case"circle":u=this.createCirclePattern(o,l,a,i);break;case"diamond":u=this.createDiamondPattern(o,l,a,i);break;case"rect":u=this.createRectPattern(o,l,a,i);break;case"vertical-line":u=this.createVerticalLinePattern(o,l,a,i);break;case"horizontal-line":u=this.createHorizontalLinePattern(o,l,a,i);break;case"bias-lr":u=this.createBiasLRLinePattern(o,l,a,i);break;case"bias-rl":u=this.createBiasRLLinePattern(o,l,a,i);break;case"grid":u=this.createGridPattern(o,l,a,i)}if(d&&d.dynamicTexture){const{gridConfig:u={},useNewCanvas:p}=d,g=e.AABBBounds;s=g.x1,n=g.y1;const f=i;let m;if(p){m=ns.allocate({width:g.width(),height:g.height(),dpr:i.dpr});const t=m.getContext("2d");t.clearRect(0,0,g.width(),g.height()),s=0,n=0,i=t}if(f.save(),e.parent&&!e.transMatrix.onlyTranslate()){const{scrollX:t=0,scrollY:i=0}=e.parent.attribute;f.setTransformFromMatrix(e.parent.globalTransMatrix),f.translate(t,i,!0)}f.setCommonStyle(e,e.attribute,s,n,r),f.clip();const y=g.width(),b=g.height(),v=l,x=o,A=u.columns?u.columns:Math.ceil(y/x),_=u.rows?u.rows:Math.ceil(b/x),S=u.gutterColumn?u.gutterColumn:2*v,T=u.gutterRow?u.gutterRow:2*v;this._tempSymbolGraphic||(this._tempSymbolGraphic=Ba({}));const B=u.columns?y/u.columns:x,w=u.rows?b/u.rows:x;this._tempSymbolGraphic.setAttributes({size:[B-S,w-T],symbolType:t});const C=this._tempSymbolGraphic.getParsedPath();for(let t=0;t<_;t++)for(let r=0;r<A;r++){const o=s+x/2+r*x,l=n+x/2+t*x;null===(h=d.beforeDynamicTexture)||void 0===h||h.call(d,i,t,r,_,A,c,e,g.width(),g.height()),i.beginPath(),!1===C.draw(i,Math.min(B-S,w-T),o,l,0)&&i.closePath(),i.fillStyle=a,d.dynamicTexture(i,t,r,_,A,c,e,g.width(),g.height())}p&&(f.globalAlpha=1,f.drawImage(m.nativeCanvas,0,0,m.nativeCanvas.width,m.nativeCanvas.height,g.x1,g.y1,g.width()*f.dpr,g.height()*f.dpr)),f.restore()}else if(u)i.highPerformanceSave(),i.setCommonStyle(e,e.attribute,s,n,r),i.fillStyle=u,i.fill(),i.highPerformanceRestore();else if("wave"===t){i.save(),i.setCommonStyle(e,e.attribute,s,n,r),i.clip();const t=e.AABBBounds;(function(t,e,i,s,n,r,a){const{fill:o="orange",percent:l=.6,frequency:h=4,opacity:c,phi:d=0}=n;let{amplitude:u=10}=n;u*=function(t){return t<=.5?4*t-1:-4*t+3}(e);const p=s*(1-l),g=i,f=Math.max(Math.round(g/70),2);t.beginPath(),t.moveTo(0+r,s+a),t.lineTo(0+r,p+a);const m=g/h*e,y=g/Math.PI/(2*h);for(let e=0;e<g;e+=f){const i=u*Math.sin((e+m+d)/y+d);t.lineTo(e+r,p+i+a)}t.lineTo(g+r,s+a),t.closePath(),t.fillStyle=o,isFinite(c)&&(t.globalAlpha=c),t.fill()})(i,c,t.width(),t.height(),Object.assign(Object.assign({},d||{}),{fill:a}),s+t.x1-s,n+t.y1-n),i.restore()}}};const To=new class{constructor(){this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d){const{outerBorder:u,innerBorder:p}=t.attribute,g=u&&!1!==u.visible,f=p&&!1!==p.visible;if(!g&&!f)return;const{innerPadding:m=l.innerPadding,outerPadding:y=l.outerPadding,startAngle:b=l.startAngle,endAngle:v=l.endAngle,opacity:x=l.opacity,x:A=l.x,y:_=l.y,scaleX:S=l.scaleX,scaleY:T=l.scaleY,keepStrokeScale:B=l.keepStrokeScale}=t.attribute;let{innerRadius:w=l.innerRadius,outerRadius:C=l.outerRadius}=t.attribute;C+=y,w-=m;const M=(n,r)=>{const a=!(!n||!n.stroke),{distance:o=l[r].distance}=n,h=B?o:fi(e,o,e.dpr),c=o/C,u="outerBorder"===r?1:-1;if(t.setAttributes({outerRadius:C+u*h,innerRadius:w-u*h,startAngle:b-u*c,endAngle:v+u*c}),e.beginPath(),sa(t,e,i,s,C+u*h,w-u*h),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),d)d(e,n,l[r]);else if(a){const a=l[r].opacity;l[r].opacity=x,e.setStrokeStyle(t,n,(A-i)/S,(_-s)/T,l[r]),l[r].opacity=a,e.stroke()}};g&&M(u,"outerBorder"),f&&M(p,"innerBorder"),t.setAttributes({outerRadius:C,innerRadius:w,startAngle:b,endAngle:v})}},Bo=So,wo=vo,Co=i.pi/2;function Mo(t,e,s,n,r,a){let o,l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],h=arguments.length>7?arguments[7]:void 0;if(Array.isArray(l)&&(h=l,l=!0),n<0&&(e+=n,n=-n),r<0&&(s+=r,r=-r),i.isNumber(a,!0))o=[a=i.abs(a),a,a,a];else if(Array.isArray(a)){const t=a;let e,s;switch(t.length){case 0:o=[0,0,0,0];break;case 1:e=i.abs(t[0]),o=[e,e,e,e];break;case 2:case 3:e=i.abs(t[0]),s=i.abs(t[1]),o=[e,s,e,s];break;default:o=t,o[0]=i.abs(o[0]),o[1]=i.abs(o[1]),o[2]=i.abs(o[2]),o[3]=i.abs(o[3])}}else o=[0,0,0,0];if(n<0||o[0]+o[1]+o[2]+o[3]<1e-12)return t.rect(e,s,n,r);const[c,d,u,p]=[[e,s],[e+n,s],[e+n,s+r],[e,s+r]],g=Math.min(n/2,r/2),f=[Math.min(g,o[0]),Math.min(g,o[1]),Math.min(g,o[2]),Math.min(g,o[3])],m=[c[0]+f[0],c[1]],y=[c[0],c[1]+f[0]],b=[d[0]-f[1],d[1]],v=[d[0],d[1]+f[1]],x=[u[0]-f[2],u[1]],A=[u[0],u[1]-f[2]],_=[p[0]+f[3],p[1]],S=[p[0],p[1]-f[3]];if(t.moveTo(m[0],m[1]),l){if(h&&h[0]?h[0](m[0],m[1],b[0],b[1]):t.lineTo(b[0],b[1]),!i.arrayEqual(b,v)){h&&h[0]&&t.moveTo(b[0],b[1]);const e=b[0],i=b[1]+f[1];t.arc(e,i,f[1],-Co,0,!1)}if(h&&h[1]?h[1](v[0],v[1],A[0],A[1]):t.lineTo(A[0],A[1]),!i.arrayEqual(x,A)){const e=A[0]-f[2],i=A[1];h&&h[1]&&t.moveTo(A[0],A[1]),t.arc(e,i,f[2],0,Co,!1)}if(h&&h[2]?h[2](x[0],x[1],_[0],_[1]):t.lineTo(_[0],_[1]),!i.arrayEqual(_,S)){const e=_[0],s=_[1]-f[3];h&&h[2]&&t.moveTo(_[0],_[1]),t.arc(e,s,f[3],Co,i.pi,!1)}if(h&&h[3]?h[3](S[0],S[1],y[0],y[1]):t.lineTo(y[0],y[1]),!i.arrayEqual(m,y)){const e=m[0],s=m[1]+f[0];h&&h[3]&&t.moveTo(y[0],y[1]),t.arc(e,s,f[0],i.pi,i.pi+Co,!1)}}else h&&h[0]?h[0](m[0],m[1],b[0],b[1]):t.lineTo(b[0],b[1]),h&&h[1]?h[1](b[0],b[1],x[0],x[1]):t.lineTo(x[0],x[1]),h&&h[2]?h[2](x[0],x[1],_[0],_[1]):t.lineTo(_[0],_[1]),h&&h[2]?h[2](_[0],_[1],m[0],m[1]):t.lineTo(m[0],m[1]);return!h&&t.closePath(),t}var Po=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class ko{constructor(){this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,s,n,r,a,o,l,h,c,d,u){const{outerBorder:p,innerBorder:g}=t.attribute,f=p&&!1!==p.visible,m=g&&!1!==g.visible;if(!f&&!m)return;const{cornerRadius:y=h.cornerRadius,cornerType:b=h.cornerType,opacity:v=h.opacity,x:x=h.x,y:A=h.y,scaleX:_=h.scaleX,scaleY:S=h.scaleY,x1:T,y1:B,keepStrokeScale:w=h.keepStrokeScale}=t.attribute;let{width:C,height:M}=t.attribute;C=(null!=C?C:T-s)||0,M=(null!=M?M:B-n)||0;const P=(r,a)=>{const o=!(!r||!r.stroke),l="outerBorder"===a?-1:1,{distance:c=h[a].distance}=r,d=w?c:fi(e,c,e.dpr),p=s+l*d,g=n+l*d,f=2*d;if(0===y||i.isArray(y)&&y.every((t=>0===t))?(e.beginPath(),e.rect(p,g,C-l*f,M-l*f)):(e.beginPath(),Mo(e,p,g,C-l*f,M-l*f,y,"bevel"!==b)),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h),u)u(e,r,h[a]);else if(o){const i=h[a].opacity;h[a].opacity=v,e.setStrokeStyle(t,r,(x-s)/_,(A-n)/S,h[a]),h[a].opacity=i,e.stroke()}};f&&P(p,"outerBorder"),m&&P(g,"innerBorder")}}let Oo=class{constructor(){this.time=Jt.beforeFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){const{stroke:p=l.stroke}=t.attribute;Array.isArray(p)&&p.some((t=>!1===t))&&(u.doStroke=!1)}};Oo=Po([ht()],Oo);let Ro=class{constructor(){this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,s,n,r,a,o,l,h,c,d,u){const{x1:p,y1:g,x:f=h.x,y:m=h.y,stroke:y=h.stroke,cornerRadius:b=h.cornerRadius,cornerType:v=h.cornerType}=t.attribute;let{width:x,height:A}=t.attribute;if(x=(null!=x?x:p-f)||0,A=(null!=A?A:g-m)||0,Array.isArray(y)&&y.some((t=>!1===t))){if(e.setStrokeStyle(t,t.attribute,s,n,h),!(0===b||i.isArray(b)&&b.every((t=>0===t)))){let i,r=0;return Mo(e,s,n,x,A,b,"bevel"!==v,new Array(4).fill(0).map(((a,o)=>(a,l,c,d)=>{y[o]&&(r===o-1&&y[o]===i||(e.setStrokeStyle(t,Object.assign(Object.assign({},t.attribute),{stroke:y[o]}),s,n,h),e.beginPath(),e.moveTo(a,l),i=y[o]),r=o,e.lineTo(c,d),e.stroke(),3===o&&e.beginPath())}))),void e.stroke()}if(e.beginPath(),e.moveTo(s,n),y[0]?e.lineTo(s+x,n):e.moveTo(s+x,n),y[1]?e.lineTo(s+x,n+A):e.moveTo(s+x,n+A),y[2]?e.lineTo(s,n+A):e.moveTo(s,n+A),y[3]){const t=y[0]?n-e.lineWidth/2:n;e.lineTo(s,t)}else e.moveTo(s,n);e.stroke()}}};Ro=Po([ht()],Ro);const Lo=new ko,Io=So,Eo=vo;const Do=new class extends ko{constructor(){super(...arguments),this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d){return super.drawShape(t,e,i,s,n,r,a,o,l,h,c,d)}},jo=vo;const Uo=new class{constructor(){this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d){const u=t.getParsedPath();if(!u)return;const{outerBorder:p,innerBorder:g}=t.attribute,f=p&&!1!==p.visible,m=g&&!1!==g.visible;if(!f&&!m)return;const{size:y=l.size,opacity:b=l.opacity,x:v=l.x,y:x=l.y,scaleX:A=l.scaleX,scaleY:_=l.scaleY,keepStrokeScale:S=l.keepStrokeScale}=t.attribute,T=(n,r)=>{const a=!(!n||!n.stroke),{distance:o=l[r].distance}=n,h=S?o:fi(e,o,e.dpr),c="outerBorder"===r?1:-1;if(e.beginPath(),!1===u.drawOffset(e,y,i,s,c*h)&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),d)d(e,n,l[r]);else if(a){const a=l[r].opacity;l[r].opacity=b,e.setStrokeStyle(t,n,(v-i)/A,(x-s)/_,l[r]),l[r].opacity=a,e.stroke()}};f&&T(p,"outerBorder"),m&&T(g,"innerBorder")}},Fo=new class{constructor(){this.time=Jt.afterFillStroke,this.useStyle=!0,this.order=0}drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u){const{clipRange:p=l.clipRange,x:g=l.x,y:f=l.y,z:m=l.z,size:y=l.size,scaleX:b=l.scaleX,scaleY:v=l.scaleY}=t.attribute,x=t.getParsedPath();x&&p<1&&p>0&&(e.beginPath(),x.drawWithClipRange&&x.drawWithClipRange(e,y,i,s,p,m,((n,r)=>{var a,h,c,u;if(t._parsedPath.svgCache){const e=Object.assign({},r);e.fill=null!==(a=r.fill)&&void 0!==a?a:t.attribute.fill,e.opacity=null!==(h=r.opacity)&&void 0!==h?h:t.attribute.opacity,e.fillOpacity=t.attribute.fillOpacity,e.stroke=null!==(c=r.stroke)&&void 0!==c?c:t.attribute.stroke,e.lineWidth=null!==(u=r.lineWidth)&&void 0!==u?u:t.attribute.lineWidth,r=e}r.stroke&&(d?d(e,t.attribute,l):o&&(e.setStrokeStyle(t,r,(g-i)/b,(f-s)/v,l),e.stroke()))})),r&&!x.isSvg&&(d?d(e,t.attribute,l):o&&(e.setStrokeStyle(t,t.attribute,(g-i)/b,(f-s)/v,l),e.stroke())))}},No=So,Wo=vo,zo={x:0,y:0,z:0,lastModelMatrix:null};class Go{init(t){t&&(this._renderContribitions=t.getContributions()),this._renderContribitions||(this._renderContribitions=[]),this.builtinContributions||(this.builtinContributions=[]),this.builtinContributions.push(Ao),this.builtinContributions.push(_o),this.builtinContributions.forEach((t=>this._renderContribitions.push(t))),this._renderContribitions.length&&(this._renderContribitions.sort(((t,e)=>e.order-t.order)),this._beforeRenderContribitions=this._renderContribitions.filter((t=>t.time===Jt.beforeFillStroke)),this._afterRenderContribitions=this._renderContribitions.filter((t=>t.time===Jt.afterFillStroke)))}beforeRenderStep(t,e,i,s,n,r,a,o,l,h,c,d,u){this._beforeRenderContribitions&&this._beforeRenderContribitions.forEach((p=>{p.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(p.supportedAppName)?p.supportedAppName:[p.supportedAppName]).includes(t.stage.params.context.appName)||p.drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u)}))}afterRenderStep(t,e,i,s,n,r,a,o,l,h,c,d,u){this._afterRenderContribitions&&this._afterRenderContribitions.forEach((p=>{p.supportedAppName&&t.stage&&t.stage.params&&t.stage.params.context&&t.stage.params.context.appName&&!(Array.isArray(p.supportedAppName)?p.supportedAppName:[p.supportedAppName]).includes(t.stage.params.context.appName)||p.drawShape(t,e,i,s,n,r,a,o,l,h,c,d,u)}))}drawPathProxy(t,e,i,s,n,r,a,o){if(!t.pathProxy)return!1;const l=ds(t,null==r?void 0:r.theme)[t.type.replace("3d","")],{fill:h=l.fill,stroke:c=l.stroke,opacity:d=l.opacity,fillOpacity:u=l.fillOpacity,lineWidth:p=l.lineWidth,strokeOpacity:g=l.strokeOpacity,visible:f=l.visible,x:m=l.x,y:y=l.y}=t.attribute,b=Zr(d,u,h),v=Qr(d,g),x=$r(h),A=qr(c,p);if(!f)return!0;if(!x&&!A)return!0;if(!(b||v||a||o))return!0;e.beginPath();return ie(("function"==typeof t.pathProxy?t.pathProxy(t.attribute):t.pathProxy).commandList,e,i,s),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l),this.beforeRenderStep(t,e,i,s,x,A,b,v,l,n,a,o),A&&(o?o(e,t.attribute,l):v&&(e.setStrokeStyle(t,t.attribute,i-m,s-y,l),e.stroke())),x&&(a?a(e,t.attribute,l):b&&(e.setCommonStyle(t,t.attribute,i-m,s-y,l),e.fill())),this.afterRenderStep(t,e,i,s,x,A,b,v,l,n,a,o),!0}valid(t,e,i,s){const{fill:n=e.fill,background:r,stroke:a=e.stroke,opacity:o=e.opacity,fillOpacity:l=e.fillOpacity,lineWidth:h=e.lineWidth,strokeOpacity:c=e.strokeOpacity,visible:d=e.visible}=t.attribute,u=Zr(o,l,n),p=Qr(o,c),g=$r(n,r),f=qr(a,h);return!(!t.valid||!d)&&!(!g&&!f)&&!!(u||p||i||s||r)&&{fVisible:u,sVisible:p,doFill:g,doStroke:f}}transform(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{x:n=e.x,y:r=e.y,z:a=e.z,scaleX:o=e.scaleX,scaleY:l=e.scaleY,angle:h=e.angle,postMatrix:c}=t.attribute,d=i.modelMatrix,u=i.camera;zo.x=n,zo.y=r,zo.z=a,zo.lastModelMatrix=d;const p=u&&(s||function(t){const{alpha:e,beta:i}=t.attribute;return e||i}(t)),g=p?t.transMatrix.onlyTranslate()&&!c:1===o&&1===l&&0===h&&!c;if(p){const s=_r.allocate(),n=_r.allocate();ma(n,t,e),br(s,d||s,n),zo.x=0,zo.y=0,zo.z=0,i.modelMatrix=s,i.setTransform(1,0,0,1,0,0,!0),_r.free(n)}if(g&&!d){const s=t.getOffsetXY(e);zo.x+=s.x,zo.y+=s.y,zo.z=a,i.setTransformForCurrent()}else if(p)zo.x=0,zo.y=0,zo.z=0,i.setTransform(1,0,0,1,0,0,!0);else if(u&&i.project){const s=t.getOffsetXY(e);zo.x+=s.x,zo.y+=s.y,this.transformWithoutTranslate(i,zo.x,zo.y,zo.z,o,l,h)}else i.transformFromMatrix(t.transMatrix,!0),zo.x=0,zo.y=0,zo.z=0;return zo}transformUseContext2d(t,e,i,s){const n=s.camera;if(this.camera=n,n){const e=t.AABBBounds,n=e.x2-e.x1,r=e.y2-e.y1,a=s.project(0,0,i),o=s.project(n,0,i),l=s.project(n,r,i),h={x:0,y:0},c={x:n,y:0},d={x:n,y:r};s.camera=null;const u=1/(h.x*(d.y-c.y)-c.x*d.y+d.x*c.y+(c.x-d.x)*h.y),p=-(h.y*(l.x-o.x)-c.y*l.x+d.y*o.x+(c.y-d.y)*a.x)*u,g=(c.y*l.y+h.y*(o.y-l.y)-d.y*o.y+(d.y-c.y)*a.y)*u,f=(h.x*(l.x-o.x)-c.x*l.x+d.x*o.x+(c.x-d.x)*a.x)*u,m=-(c.x*l.y+h.x*(o.y-l.y)-d.x*o.y+(d.x-c.x)*a.y)*u,y=(h.x*(d.y*o.x-c.y*l.x)+h.y*(c.x*l.x-d.x*o.x)+(d.x*c.y-c.x*d.y)*a.x)*u,b=(h.x*(d.y*o.y-c.y*l.y)+h.y*(c.x*l.y-d.x*o.y)+(d.x*c.y-c.x*d.y)*a.y)*u;s.setTransform(p,g,f,m,y,b,!0)}}restoreTransformUseContext2d(t,e,i,s){this.camera&&(s.camera=this.camera)}transformWithoutTranslate(t,e,i,s,n,r,a){const o=t.project(e,i,s);t.translate(o.x,o.y,!1),t.scale(n,r,!1),t.rotate(a,!1),t.translate(-o.x,-o.y,!1),t.setTransformForCurrent()}_draw(t,e,i,s,n,r){const{context:a}=s;if(!a)return;const{renderable:o}=t.attribute;if(!1===o)return;a.highPerformanceSave();const l=this.transform(t,e,a,i),{x:h,y:c,z:d,lastModelMatrix:u}=l;this.z=d,this.drawPathProxy(t,a,h,c,s,n)||(this.drawShape(t,a,h,c,s,n,null,null,r),this.z=0,a.modelMatrix!==u&&_r.free(a.modelMatrix),a.modelMatrix=u),a.highPerformanceRestore()}}var Vo=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Ho=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Xo=function(t,e){return function(i,s){e(i,s,t)}};let Yo=class extends Go{constructor(t){super(),this.arcRenderContribitions=t,this.numberType=Jn,this.builtinContributions=[To,wo,Bo],this.init(t)}drawArcTailCapPath(t,e,s,n,r,a,o,l){const h=l-o,c=t.getParsedAngle(),d=c.startAngle;let u=c.endAngle;u=l,i.abs(u-d);const p=u>d;let g=!1;if(r<a){const t=r;r=a,a=t}const{outerDeltaAngle:f,xors:m,yors:y,xirs:b,yirs:v,limitedOcr:x,outerCornerRadiusStart:A,outerCornerRadiusEnd:_,maxOuterCornerRadius:S,xore:T,yore:B,xire:w,yire:C,limitedIcr:M,innerDeltaAngle:P,innerStartAngle:k,innerCornerRadiusStart:O,innerCornerRadiusEnd:R,maxInnerCornerRadius:L}=ia(t,d,u,a,r);if(x>i.epsilon){const t=i.min(A,x),a=i.min(_,x),o=ea(b,v,m,y,r,t,Number(p)),l=ea(T,B,w,C,r,a,Number(p));if(x<S&&t===a)e.moveTo(s+o.cx+o.x01,n+o.cy+o.y01),e.arc(s+o.cx,n+o.cy,x,i.atan2(o.y01,o.x01),i.atan2(l.y01,l.x01),!p);else{const t=u-h-.03,o=i.atan2(l.y11,l.x11);e.arc(s,n,r,t,o,!p),a>0&&e.arc(s+l.cx,n+l.cy,a,i.atan2(l.y11,l.x11),i.atan2(l.y01,l.x01),!p)}}else e.moveTo(s+m,n+y);if(!(a>i.epsilon)||P<.001)e.lineTo(s+w,n+C),g=!0;else if(M>i.epsilon){const t=i.min(O,M),r=i.min(R,M),o=ea(w,C,T,B,a,-r,Number(p)),l=ea(m,y,b,v,a,-t,Number(p));if(e.lineTo(s+o.cx+o.x01,n+o.cy+o.y01),M<L&&t===r){const t=i.atan2(l.y01,l.x01);e.arc(s+o.cx,n+o.cy,M,i.atan2(o.y01,o.x01),t,!p)}else{r>0&&e.arc(s+o.cx,n+o.cy,r,i.atan2(o.y01,o.x01),i.atan2(o.y11,o.x11),!p);const t=i.atan2(o.cy+o.y11,o.cx+o.x11),l=u-h-.03;e.arc(s,n,a,t,l,p)}}else e.lineTo(s+a*i.cos(k),n+a*i.sin(k));return g}drawShape(t,e,s,n,r,a,o,l,h){h=null!=h?h:ds(t,null==a?void 0:a.theme).arc;const{fill:c=h.fill,stroke:d=h.stroke,x:u=h.x,y:p=h.y,fillStrokeOrder:g=h.fillStrokeOrder}=t.attribute,f=this.valid(t,h,o,l);if(!f)return;const{fVisible:m,sVisible:y,doFill:b,doStroke:v}=f,{outerPadding:x=h.outerPadding,innerPadding:A=h.innerPadding,cap:_=h.cap,forceShowCap:S=h.forceShowCap}=t.attribute;let{outerRadius:T=h.outerRadius,innerRadius:B=h.innerRadius}=t.attribute;T+=x,B-=A;let w=0;const C=(i.isBoolean(_)&&_||_[0])&&"conical"===c.gradient;if(C){const{sc:e,startAngle:s,endAngle:n}=t.getParsedAngle();i.abs(n-s)<i.pi2-i.epsilon&&(w=e||0,c.startAngle-=w,c.endAngle-=w)}let M=!1;const{isFullStroke:P,stroke:k}=(t=>{var e;let s=!0;if(i.isBoolean(t,!0)){for(let i=0;i<4;i++)xs[i]=t,s&&(s=!(null!==(e=xs[i])&&void 0!==e&&!e));s=t}else if(Array.isArray(t))for(let e=0;e<4;e++)xs[e]=!!t[e],s&&(s=!!xs[e]);else xs[0]=!1,xs[1]=!1,xs[2]=!1,xs[3]=!1;return{isFullStroke:s,stroke:xs}})(d);if((b||P)&&(e.beginPath(),sa(t,e,s,n,T,B),M=!0,e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h),this.beforeRenderStep(t,e,s,n,b,v,m,y,h,r,o,l),g?(this._runStroke(t,e,s,n,h,v,P,y,l),this._runFill(t,e,s,n,h,b,m,u,p,o)):(this._runFill(t,e,s,n,h,b,m,u,p,o),this._runStroke(t,e,s,n,h,v,P,y,l))),!P&&v&&(e.beginPath(),sa(t,e,s,n,T,B,k),M||this.beforeRenderStep(t,e,s,n,b,v,m,y,h,r,o,l),l?l(e,t.attribute,h):y&&(e.setStrokeStyle(t,t.attribute,s,n,h),e.stroke())),(i.isBoolean(_)&&_||_[1])&&S){const{startAngle:a,endAngle:c}=t.getParsedAngle();if(i.abs(c-a)>=i.pi2-i.epsilon){e.beginPath();const a=Math.abs(T-B)/2/T,{endAngle:c=h.endAngle,fill:d=h.fill}=t.attribute,u=c;this.drawArcTailCapPath(t,e,s,n,T,B,u,u+a),M||this.beforeRenderStep(t,e,s,n,b,v,m,y,h,r,o,l);const p=()=>{if(b){const r=d;if("conical"===r.gradient){const a=function(t,e,s,n){const{stops:r,startAngle:a,endAngle:o}=n;for(;s<0;)s+=i.pi2;for(;s>i.pi2;)s-=i.pi2;if(s<a)return r[0].color;if(s>o)return r[0].color;let l,h,c=(s-a)/(o-a);for(let t=0;t<r.length;t++)if(r[t].offset>=c){l=r[t-1],h=r[t];break}return c=(c-l.offset)/(h.offset-l.offset),Or(l.color,h.color,c,!1)}(0,0,c,r);o||Zr&&(e.setCommonStyle(t,t.attribute,s,n,h),e.fillStyle=a,e.fill())}}},g=()=>{v&&(l||y&&(e.setStrokeStyle(t,t.attribute,s,n,h),e.stroke()))};p(),g()}}this.afterRenderStep(t,e,s,n,b,v,m,y,h,r,o,l),C&&(c.startAngle+=w,c.endAngle+=w)}_runFill(t,e,i,s,n,r,a,o,l,h){r&&(h?h(e,t.attribute,n):a&&(e.setCommonStyle(t,t.attribute,o-i,l-s,n),e.fill()))}_runStroke(t,e,i,s,n,r,a,o,l){r&&a&&(l||o&&(e.setStrokeStyle(t,t.attribute,i,s,n),e.stroke()))}draw(t,e,i,s){const n=ds(t,null==s?void 0:s.theme).arc;this._draw(t,n,!1,i,s,n)}};function Ko(t,e,i,s){if(!e.p1)return;const{offsetX:n=0,offsetY:r=0,offsetZ:a=0}=s||{};if(1===i)e.p2&&e.p3?t.bezierCurveTo(n+e.p1.x,r+e.p1.y,n+e.p2.x,r+e.p2.y,n+e.p3.x,r+e.p3.y,a):t.lineTo(n+e.p1.x,r+e.p1.y,a);else if(e.p2&&e.p3){const[s]=he(e,i);t.bezierCurveTo(n+s.p1.x,r+s.p1.y,n+s.p2.x,r+s.p2.y,n+s.p3.x,r+s.p3.y,a)}else{const s=e.getPointAt(i);t.lineTo(n+s.x,r+s.y,a)}}function $o(t,e,i,s,n,r,a){var o;let l=e.p0,h=s;if(i&&i.originP1===i.originP2&&(l=i.p0),e.defined)s||(t.lineTo(l.x+n,l.y+r,a),h=!s);else{const{originP1:c,originP2:d}=e;let u;if(c&&!1!==c.defined&&!i?u=l:c&&!1!==d.defined&&(u=null!==(o=e.p3)&&void 0!==o?o:e.p1),s){h=!s;const i=u?u.x:e.p0.x,o=u?u.y:e.p0.y;t.moveTo(i+n,o+r,a)}else u&&(h=!s,t.lineTo(u.x+n,u.y+r,a))}return h}Yo=Vo([ht(),Xo(0,ot(Bt)),Xo(0,ct(na)),Ho("design:paramtypes",[Object])],Yo);var qo=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let Zo=class extends Go{constructor(){super(...arguments),this.numberType=sr}draw(t,e,i,s){const n=ds(t,null==s?void 0:s.theme).line;this._draw(t,n,!1,i,s)}drawSegmentItem(t,e,s,n,r,a,o,l,h,c,d,u,p,g,f){var m;if(!e)return;t.beginPath();(function(t,e,s,n,r){const{offsetX:a=0,offsetY:o=0,offsetZ:l=0,mode:h="none",drawConnect:c=!1}=r||{};if(c&&"none"===h)return;if(!e)return;let d=!0;const{curves:u}=e;if(s>=1){if(c){let e,i=!0;u.forEach(((s,n)=>{s.originP1!==s.originP2?(i=$o(t,s,e,i,a,o,l),e=s):e=s}))}else u.forEach((e=>{e.defined?(d&&t.moveTo(e.p0.x+a,e.p0.y+o,l),Ko(t,e,1,r),d=!1):d=!0}));return}if(s<=0)return;let p;"x"===n?p=qt.ROW:"y"===n?p=qt.COLUMN:"auto"===n&&(p=e.direction);const g=s*e.tryUpdateLength(p);let f=0,m=!0,y=null;for(let e=0,s=u.length;e<s;e++){const s=u[e],n=s.getLength(p),h=(g-f)/n;if(f+=n,h<0)break;if(c){if(s.originP1===s.originP2){y=s;continue}m=$o(t,s,y,m,a,o,l),y=s}else{if(!s.defined){d=!0;continue}d&&t.moveTo(s.p0.x+a,s.p0.y+o,l),Ko(t,s,i.min(h,1),r),d=!1}}})(t,e,h,c,{offsetX:d,offsetY:u,offsetZ:null!==(m=this.z)&&void 0!==m?m:0}),p.cache&&!i.isArray(p.cache)&&p.cache.curves.every((t=>t.defined))&&p.attribute.curveType&&p.attribute.curveType.includes("Closed")&&t.closePath(),t.setShadowBlendStyle&&t.setShadowBlendStyle(p,o,l);const{x:y=0,x:b=0}=o;return!1!==s&&(g?g(t,o,l):r&&(t.setCommonStyle(p,o,y-d,b-u,l),t.fill())),!1!==n&&(f?f(t,o,l):a&&(t.setStrokeStyle(p,o,y-d,b-u,l),t.stroke())),!1}drawLinearLineHighPerformance(t,e,i,s,n,r,a,o,l,h,c,d,u){var p;e.beginPath();const g=null!==(p=this.z)&&void 0!==p?p:0,{points:f}=t.attribute,m=f[0];e.moveTo(m.x+a,m.y+o,g);for(let t=1;t<f.length;t++){const i=f[t];e.lineTo(i.x+a,i.y+o,g)}e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,l);const{x:y=0,x:b=0}=t.attribute;!1!==i&&(d?d(e,t.attribute,l):n&&(e.setCommonStyle(t,t.attribute,y-a,b-o,l),e.fill())),!1!==s&&(u?u(e,t.attribute,l):r&&(e.setStrokeStyle(t,t.attribute,y-a,b-o,l),e.stroke()))}drawShape(t,e,s,n,r,a,o,l){const h=ds(t,null==a?void 0:a.theme).line,{fill:c=h.fill,stroke:d=h.stroke,fillOpacity:u=h.fillOpacity,strokeOpacity:p=h.strokeOpacity,segments:g,points:f,closePath:m,curveTension:y=h.curveTension,connectedType:b=h.connectedType}=t.attribute;if(!this.valid(t,h,o,l))return;let{curveType:v=h.curveType}=t.attribute;m&&"linear"===v&&(v="linearClosed");const{clipRange:x=h.clipRange,clipRangeByDimension:A=h.clipRangeByDimension}=t.attribute;if(1===x&&!g&&!f.some((t=>!1===t.defined))&&"linear"===v)return this.drawLinearLineHighPerformance(t,e,!!c,!!d,u,p,s,n,h,r,a,o,l);function _(t,e){return"none"===e?t:t.filter((t=>!1!==t.defined))}if(t.shouldUpdateShape()){const{points:e,segments:i}=t.attribute,s=e;if(i&&i.length){let e,s;if(t.cache=i.map(((t,i)=>{if(t.points.length<=1&&0===i)return t.points[0]&&(s={endX:t.points[0].x,endY:t.points[0].y,curves:[{defined:!1!==t.points[0].defined}]}),null;1===i?e={x:s.endX,y:s.endY,defined:s.curves[s.curves.length-1].defined}:i>1&&(e.x=s.endX,e.y=s.endY,e.defined=s.curves[s.curves.length-1].defined);const n=We(_(t.points,b),v,{startPoint:e,curveTension:y});return s=n,n})).filter((t=>!!t)),"linearClosed"===v){let e;for(let i=0;i<t.cache.length;i++){const s=t.cache[i];for(let t=0;t<s.curves.length;t++)if(s.curves[t].defined){e=s.curves[t].p0;break}if(e)break}t.cache[t.cache.length-1]&&t.cache[t.cache.length-1].lineTo(e.x,e.y,!0)}}else{if(!e||!e.length)return t.cache=null,void t.clearUpdateShapeTag();t.cache=We(_(s,b),v,{curveTension:y})}t.clearUpdateShapeTag()}if(Array.isArray(t.cache)){const r=t.attribute.segments.filter((t=>t.points.length));if(1===r[0].points.length&&r.shift(),1===x){let i=!1;t.cache.forEach(((a,g)=>{i||(i=this.drawSegmentItem(e,a,!!c,!!d,u,p,r[g],[h,t.attribute],x,A,s,n,t,o,l))}))}else{const a=t.cache.reduce(((t,e)=>t+e.getLength()),0),g=x*a;let f=0,m=!1;t.cache.forEach(((a,y)=>{if(m)return;const b=a.getLength(),v=(g-f)/b;f+=b,v>0&&(m=this.drawSegmentItem(e,a,!!c,!!d,u,p,r[y],[h,t.attribute],i.min(v,1),A,s,n,t,o,l))}))}}else this.drawSegmentItem(e,t.cache,!!c,!!d,u,p,t.attribute,h,x,A,s,n,t,o,l)}};Zo=qo([ht()],Zo);var Jo=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Qo=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},tl=function(t,e){return function(i,s){e(i,s,t)}};let el=class extends Go{constructor(t){super(),this.rectRenderContribitions=t,this.type="rect",this.numberType=or,this.builtinContributions=[Lo,Eo,Io],this.init(t)}drawShape(t,e,s,n,r,a,o,l,h){h=null!=h?h:ds(t,null==a?void 0:a.theme).rect;const{fill:c=h.fill,background:d,stroke:u=h.stroke,cornerRadius:p=h.cornerRadius,cornerType:g=h.cornerType,opacity:f=h.opacity,fillOpacity:m=h.fillOpacity,lineWidth:y=h.lineWidth,strokeOpacity:b=h.strokeOpacity,visible:v=h.visible,x1:x,y1:A,x:_=h.x,y:S=h.y,fillStrokeOrder:T=h.fillStrokeOrder}=t.attribute;let{width:B,height:w}=t.attribute;B=(null!=B?B:x-_)||0,w=(null!=w?w:A-S)||0;const C=Jr(f,m,B,w,c),M=ta(f,b,B,w),P=$r(c,d),k=qr(u,y);if(!t.valid||!v)return;if(!P&&!k)return;if(!(C||M||o||l||d))return;0===p||i.isArray(p)&&p.every((t=>0===t))?(e.beginPath(),e.rect(s,n,B,w)):(e.beginPath(),Mo(e,s,n,B,w,p,"bevel"!==g));const O={doFill:P,doStroke:k};e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h),this.beforeRenderStep(t,e,s,n,P,k,C,M,h,r,o,l,O),T?(this._runStroke(t,e,s,n,h,O,M,_,S,l),this._runFill(t,e,s,n,h,O,C,_,S,o)):(this._runFill(t,e,s,n,h,O,C,_,S,o),this._runStroke(t,e,s,n,h,O,M,_,S,l)),this.afterRenderStep(t,e,s,n,P,k,C,M,h,r,o,l)}_runFill(t,e,i,s,n,r,a,o,l,h){r.doFill&&(h?h(e,t.attribute,n):a&&(e.setCommonStyle(t,t.attribute,o-i,l-s,n),e.fill()))}_runStroke(t,e,i,s,n,r,a,o,l,h){r.doStroke&&(h?h(e,t.attribute,n):a&&(e.setStrokeStyle(t,t.attribute,o-i,l-s,n),e.stroke()))}draw(t,e,i,s){const n=ds(t,null==s?void 0:s.theme).rect;this._draw(t,n,!1,i,s,n)}};el=Jo([ht(),tl(0,ot(Bt)),tl(0,ct(oa)),Qo("design:paramtypes",[Object])],el);var il=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},sl=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},nl=function(t,e){return function(i,s){e(i,s,t)}};let rl=class extends Go{constructor(t){super(),this.symbolRenderContribitions=t,this.numberType=cr,this.builtinContributions=[Uo,Wo,No,Fo],this.init(t)}drawShape(t,e,s,n,r,a,o,l,h){var c;h=null!=h?h:ds(t,null==a?void 0:a.theme).symbol;const{size:d=h.size,x:u=h.x,y:p=h.y,scaleX:g=h.scaleX,scaleY:f=h.scaleY,fillStrokeOrder:m=h.fillStrokeOrder,clipRange:y=h.clipRange}=t.attribute,b=this.valid(t,h,o,l);if(!b)return;const{fVisible:v,sVisible:x,doFill:A,doStroke:_}=b,S=t.getParsedPath();if(!S)return;const{keepDirIn3d:T=h.keepDirIn3d}=t.attribute,B=null!==(c=this.z)&&void 0!==c?c:0;e.beginPath();let w=s,C=n,M=B;const P=e.camera;if(T&&P&&e.project){const t=e.project(s,n,B);e.camera=null,i.isArray(d)&&(d[0],d[1]),w=t.x,C=t.y,M=void 0}!1===S.draw(e,d,w,C,M,((i,r)=>{var a,c,d,b;if(t._parsedPath.svgCache){const e=Object.assign({},r);e.fill=null!==(a=r.fill)&&void 0!==a?a:t.attribute.fill,e.opacity=null!==(c=r.opacity)&&void 0!==c?c:t.attribute.opacity,e.fillOpacity=t.attribute.fillOpacity,e.stroke=null!==(d=r.stroke)&&void 0!==d?d:t.attribute.stroke,e.lineWidth=null!==(b=r.lineWidth)&&void 0!==b?b:t.attribute.lineWidth,r=e}const v=()=>{r.fill&&(o?o(e,t.attribute,h):(e.setCommonStyle(t,r,u-s,p-n,h),e.fill()))},A=()=>{r.stroke&&(l?l(e,t.attribute,h):x&&y>=1&&(e.setStrokeStyle(t,r,(u-s)/g,(p-n)/f,h),e.stroke()))};m?(A(),v()):(v(),A())}))&&e.closePath(),e.camera=P,e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h),this.beforeRenderStep(t,e,s,n,A,_,v,x,h,r,o,l),m?(this._runStroke(t,e,s,n,h,_,x,u,p,S,y,g,f,l),this._runFill(t,e,s,n,h,A,v,u,p,S,o)):(this._runFill(t,e,s,n,h,A,v,u,p,S,o),this._runStroke(t,e,s,n,h,_,x,u,p,S,y,g,f,l)),this.afterRenderStep(t,e,s,n,A,_,v,x,h,r,o,l)}_runFill(t,e,i,s,n,r,a,o,l,h,c){r&&!h.isSvg&&(c?c(e,t.attribute,n):a&&(e.setCommonStyle(t,t.attribute,o-i,l-s,n),e.fill()))}_runStroke(t,e,i,s,n,r,a,o,l,h,c,d,u,p){r&&!h.isSvg&&(p?p(e,t.attribute,n):a&&c>=1&&(e.setStrokeStyle(t,t.attribute,(o-i)/d,(l-s)/u,n),e.stroke()))}draw(t,e,i,s){const n=ds(t,null==s?void 0:s.theme).symbol;this._draw(t,n,!1,i,s)}};rl=il([ht(),nl(0,ot(Bt)),nl(0,ct(la)),sl("design:paramtypes",[Object])],rl);const al=new class{constructor(){this.pools=[];for(let t=0;t<10;t++)this.pools.push(new i.AABBBounds)}allocate(t,e,s,n){if(!this.pools.length)return(new i.AABBBounds).setValue(t,e,s,n);const r=this.pools.pop();return r.x1=t,r.y1=e,r.x2=s,r.y2=n,r}allocateByObj(t){if(!this.pools.length)return new i.AABBBounds(t);const e=this.pools.pop();return e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e}free(t){this.pools.push(t)}get length(){return this.pools.length}release(){this.pools=[]}};const ol=new class extends bo{constructor(){super(...arguments),this.time=Jt.beforeFillStroke}drawShape(t,e,s,n,r,a,o,l,h,c,d,u){var p,g,f,m,y,b,v,x,A,_;const{backgroundMode:S=h.backgroundMode,backgroundFit:T=h.backgroundFit,backgroundKeepAspectRatio:B=h.backgroundKeepAspectRatio}=t.attribute;let w,{background:C}=t.attribute;if(!C)return;const M=()=>{"richtext"===t.type&&(e.restore(),e.save(),w&&e.setTransformFromMatrix(w,!0,1))};let P;"richtext"===t.type&&(w=e.currentMatrix.clone(),e.restore(),e.save(),e.setTransformForCurrent());const k=i.isObject(C)&&C.background,O=t.transMatrix.onlyTranslate();if(k){const e=t.AABBBounds,i=(null!==(p=C.x)&&void 0!==p?p:e.x1)+(null!==(g=C.dx)&&void 0!==g?g:0),s=(null!==(f=C.y)&&void 0!==f?f:e.y1)+(null!==(m=C.dy)&&void 0!==m?m:0),n=null!==(y=C.width)&&void 0!==y?y:e.width(),r=null!==(b=C.height)&&void 0!==b?b:e.height();if(P=al.allocate(i,s,i+n,s+r),C=C.background,!O){const t=P.width(),e=P.height();P.set((null!==(v=C.x)&&void 0!==v?v:0)+(null!==(x=C.dx)&&void 0!==x?x:0),(null!==(A=C.y)&&void 0!==A?A:0)+(null!==(_=C.dy)&&void 0!==_?_:0),t,e)}}else P=t.AABBBounds,O||(P=go(Object.assign(Object.assign({},t.attribute),{angle:0,scaleX:1,scaleY:1,x:0,y:0,dx:0,dy:0})).clone());if(t.backgroundImg&&t.resources){const i=t.resources.get(C);if("success"!==i.state||!i.data)return void M();e.highPerformanceSave(),O&&e.setTransformFromMatrix(t.parent.globalTransMatrix,!0),e.setCommonStyle(t,t.attribute,s,n,h),this.doDrawImage(e,i.data,P,{backgroundMode:S,backgroundFit:T,backgroundKeepAspectRatio:B}),e.highPerformanceRestore(),e.setTransformForCurrent()}else{const{backgroundCornerRadius:i}=t.attribute;e.highPerformanceSave(),e.setCommonStyle(t,t.attribute,s,n,h),e.fillStyle=C,i?(Mo(e,P.x1,P.y1,P.width(),P.height(),i,!0),e.fill()):e.fillRect(P.x1,P.y1,P.width(),P.height()),e.highPerformanceRestore()}k&&al.free(P),M()}};var ll=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},hl=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},cl=function(t,e){return function(i,s){e(i,s,t)}};let dl=class extends Go{constructor(t){super(),this.textRenderContribitions=t,this.numberType=dr,this.builtinContributions=[ol],this.init(t)}drawShape(t,e,s,n,r,a,o,l){var h,c,d;const u=ds(t,null==a?void 0:a.theme).text,{text:p,underline:g=u.underline,lineThrough:f=u.lineThrough,keepDirIn3d:m=u.keepDirIn3d,direction:y=u.direction,fontSize:b=u.fontSize,verticalMode:v=u.verticalMode,x:x=u.x,y:A=u.y}=t.attribute,_=null!==(h=Ms(t.attribute.lineHeight,b))&&void 0!==h?h:b,S=this.valid(t,u,o,l);if(!S)return;const{fVisible:T,sVisible:B,doFill:w,doStroke:C}=S,M=!m,P=this.z||0;e.beginPath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,u),this.beforeRenderStep(t,e,s,n,w,C,T,B,u,r,o,l),M&&this.transformUseContext2d(t,u,P,e);const k=(i,r,a,h)=>{let c=s+r;const d=n+a;if(h){e.highPerformanceSave(),c+=b;const t=Ar.allocate(1,0,0,1,0,0);t.rotateByCenter(Math.PI/2,c,d),e.transformFromMatrix(t,!0),Ar.free(t)}C&&(l?l(e,t.attribute,u):B&&(e.setStrokeStyle(t,t.attribute,x-s,A-n,u),e.strokeText(i,c,d,P))),w&&(o?o(e,t.attribute,u):T&&(e.setCommonStyle(t,t.attribute,x-s,A-n,u),e.fillText(i,c,d,P))),h&&(e.highPerformanceRestore(),e.setTransformForCurrent())};if(e.setTextStyleWithoutAlignBaseline(t.attribute,u,P),"horizontal"===y){const{multilineLayout:i}=t;if(!i)return void e.highPerformanceRestore();const{xOffset:r,yOffset:a}=i.bbox;C&&(l?l(e,t.attribute,u):B&&(e.setStrokeStyle(t,t.attribute,x-s,A-n,u),i.lines.forEach((t=>{e.strokeText(t.str,(t.leftOffset||0)+r+s,(t.topOffset||0)+a+n,P)})))),w&&(o?o(e,t.attribute,u):T&&(e.setCommonStyle(t,t.attribute,x-s,A-n,u),i.lines.forEach((i=>{e.fillText(i.str,(i.leftOffset||0)+r+s,(i.topOffset||0)+a+n,P),this.drawUnderLine(g,f,t,(i.leftOffset||0)+r+s,(i.topOffset||0)+a+n,i.descent,(i.descent-i.ascent)/2,P,u,e,{width:i.width})}))))}else{let{textAlign:s=u.textAlign,textBaseline:n=u.textBaseline}=t.attribute;if(!v){const e=s;s=null!==(c=t.getBaselineMapAlign()[n])&&void 0!==c?c:"left",n=null!==(d=t.getAlignMapBaseline()[e])&&void 0!==d?d:"top"}t.tryUpdateAABBBounds();const r=t.cache,{verticalList:a}=r;e.textAlign="left",e.textBaseline="top";const o=_*a.length;let l=0;a.forEach((t=>{const e=t.reduce(((t,e)=>t+(e.width||0)),0);l=i.max(e,l)}));let h=0,p=0;"bottom"===n?p=-o:"middle"===n&&(p=-o/2),"center"===s?h-=l/2:"right"===s&&(h-=l),a.forEach(((t,e)=>{const i=t.reduce(((t,e)=>t+(e.width||0)),0),n=l-i;let r=h;"center"===s?r+=n/2:"right"===s&&(r+=n),t.forEach((t=>{const{text:i,width:s,direction:n}=t;k(i,o-(e+1)*_+p,r,n),r+=s}))}))}M&&this.restoreTransformUseContext2d(t,u,P,e),this.afterRenderStep(t,e,s,n,w,C,T,B,u,r,o,l)}draw(t,e,i,s){const n=ds(t,null==s?void 0:s.theme).text,{keepDirIn3d:r=n.keepDirIn3d}=t.attribute,a=!r;this._draw(t,n,a,i,s)}drawUnderLine(t,e,s,n,r,a,o,l,h,c,d){if(e+t<=0)return;const{textAlign:u=h.textAlign,fill:p=h.fill,opacity:g=h.opacity,underlineOffset:f=h.underlineOffset,underlineDash:m=h.underlineDash,fillOpacity:y=h.fillOpacity}=s.attribute,b=!i.isNil(d),v=b?d.width:s.clipedWidth,x=b?0:da(u,v),A={lineWidth:0,stroke:p,opacity:g,strokeOpacity:y};if(t){A.lineWidth=t,c.setStrokeStyle(s,A,n,r,h),m&&c.setLineDash(m),c.beginPath();const e=r+a+f;c.moveTo(n+x,e,l),c.lineTo(n+x+v,e,l),c.stroke()}if(e){A.lineWidth=e,c.setStrokeStyle(s,A,n,r,h),c.beginPath();const t=r+o;c.moveTo(n+x,t,l),c.lineTo(n+x+v,t,l),c.stroke()}}};function ul(t,e,i,s){t.moveTo(e[0].x+i,e[0].y+s);for(let n=1;n<e.length;n++)t.lineTo(e[n].x+i,e[n].y+s)}function pl(t,e){return Math.sqrt(t*t+e*e)}function gl(t,e,i,s,n){const r=e/i;return{x:t.x-s*r,y:t.y-n*r}}dl=ll([ht(),cl(0,ot(Bt)),cl(0,ct(ha)),hl("design:paramtypes",[Object])],dl);const fl=So,ml=vo;var yl=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},bl=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vl=function(t,e){return function(i,s){e(i,s,t)}};let xl=class extends Go{constructor(t){super(),this.polygonRenderContribitions=t,this.numberType=rr,this.builtinContributions=[ml,fl],this.init(t)}drawShape(t,e,s,n,r,a,o,l){const h=ds(t,null==a?void 0:a.theme).polygon,{points:c=h.points,cornerRadius:d=h.cornerRadius,x:u=h.x,y:p=h.y,closePath:g=h.closePath,fillStrokeOrder:f=h.fillStrokeOrder}=t.attribute,m=this.valid(t,h,o,l);if(!m)return;const{fVisible:y,sVisible:b,doFill:v,doStroke:x}=m;e.beginPath(),d<=0||i.isArray(d)&&d.every((t=>0===t))?ul(e.camera?e:e.nativeContext,c,s,n):function(t,e,i,s,n){let r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];var a;if(e.length<3)return void ul(t,e,i,s);let o=0,l=e.length-1;r||(o+=1,l-=1,t.moveTo(e[0].x+i,e[0].y+s));for(let r=o;r<=l;r++){const o=e[0===r?l:(r-1)%e.length],h=e[r%e.length],c=e[(r+1)%e.length],d=h.x-o.x,u=h.y-o.y,p=h.x-c.x,g=h.y-c.y,f=(Math.atan2(u,d)-Math.atan2(g,p))/2,m=Math.abs(Math.tan(f));let y=Array.isArray(n)?null!==(a=n[r%e.length])&&void 0!==a?a:0:n,b=y/m;const v=pl(d,u),x=pl(p,g),A=Math.min(v,x);b>A&&(b=A,y=A*m);const _=gl(h,b,v,d,u),S=gl(h,b,x,p,g),T=2*h.x-_.x-S.x,B=2*h.y-_.y-S.y,w=pl(T,B),C=gl(h,pl(b,y),w,T,B);let M=Math.atan2(_.y-C.y,_.x-C.x);const P=Math.atan2(S.y-C.y,S.x-C.x);let k=P-M;k<0&&(M=P,k=-k),k>Math.PI&&(k-=Math.PI),0===r?t.moveTo(_.x+i,_.y+s):t.lineTo(_.x+i,_.y+s),k&&t.arcTo(h.x+i,h.y+s,S.x+i,S.y+s,y),t.lineTo(S.x+i,S.y+s)}r||t.lineTo(e[l+1].x+i,e[l+1].y+s)}(e.camera?e:e.nativeContext,c,s,n,d,g),g&&e.closePath(),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h),this.beforeRenderStep(t,e,s,n,v,x,y,b,h,r,o,l);const A=()=>{v&&(o?o(e,t.attribute,h):y&&(e.setCommonStyle(t,t.attribute,u-s,p-n,h),e.fill()))},_=()=>{x&&(l?l(e,t.attribute,h):b&&(e.setStrokeStyle(t,t.attribute,u-s,p-n,h),e.stroke()))};f?(_(),A()):(A(),_()),this.afterRenderStep(t,e,s,n,v,x,y,b,h,r,o,l)}draw(t,e,i,s){const n=ds(t,null==s?void 0:s.theme).polygon;this._draw(t,n,!1,i,s)}};xl=yl([ht(),vl(0,ot(Bt)),vl(0,ct(aa)),bl("design:paramtypes",[Object])],xl);var Al=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},_l=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Sl=function(t,e){return function(i,s){e(i,s,t)}};const Tl=["","repeat-x","repeat-y","repeat"];let Bl=class extends Go{constructor(t){super(),this.imageRenderContribitions=t,this.numberType=ir,this.builtinContributions=[Do,jo],this.init(t)}drawShape(t,e,s,n,r,a,o,l){const h=ds(t).image,{repeatX:c=h.repeatX,repeatY:d=h.repeatY,x:u=h.x,y:p=h.y,cornerRadius:g=h.cornerRadius,fillStrokeOrder:f=h.fillStrokeOrder,cornerType:m=h.cornerType,image:y}=t.attribute,b=this.valid(t,h,o);if(!b)return;const{fVisible:v,sVisible:x,doFill:A,doStroke:_}=b;if(!y||!t.resources)return;const S=t.resources.get(y);if("success"!==S.state)return;const T=t.width,B=t.height;e.beginPath();let w=!1;0===g||i.isArray(g)&&g.every((t=>0===t))?e.rect(s,n,T,B):(Mo(e,s,n,T,B,g,"bevel"!==m),w=!0),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,h);const C=()=>{if(A)if(o)o(e,t.attribute,h);else if(v){e.setCommonStyle(t,t.attribute,s,n,h);let i=0;if("repeat"===c&&(i|=1),"repeat"===d&&(i|=2),i){const t=e.createPattern(S.data,Tl[i]);e.fillStyle=t,e.translate(s,n,!0),e.fillRect(0,0,T,B),e.translate(-s,-n,!0)}else e.drawImage(S.data,s,n,T,B)}},M=()=>{_&&(l?l(e,t.attribute,h):x&&(e.setStrokeStyle(t,t.attribute,u-s,p-n,h),e.stroke()))};f?(M(),w&&(e.save(),e.clip()),this.beforeRenderStep(t,e,s,n,A,!1,v,!1,h,r,o),C(),w&&e.restore()):(w&&(e.save(),e.clip()),this.beforeRenderStep(t,e,s,n,A,!1,v,!1,h,r,o),C(),w&&e.restore(),M()),this.afterRenderStep(t,e,s,n,A,!1,v,!1,h,r,o)}draw(t,e,s){const{image:n}=t.attribute;if(!n||!t.resources)return;const r=t.resources.get(n);if("loading"===r.state&&i.isString(n))return void ys.improveImageLoading(n);if("success"!==r.state)return;const{context:a}=e.drawParams;if(!a)return;const o=ds(t).image;this._draw(t,o,!1,s)}};Bl=Al([ht(),Sl(0,ot(Bt)),Sl(0,ct(ra)),_l("design:paramtypes",[Object])],Bl);const wl=Symbol.for("ArcRender"),Cl=Symbol.for("Arc3dRender"),Ml=Symbol.for("GraphicRender"),Pl=Symbol.for("LineRender"),kl=Symbol.for("PolygonRender"),Ol=Symbol.for("RectRender"),Rl=Symbol.for("Rect3DRender"),Ll=Symbol.for("SymbolRender"),Il=Symbol.for("TextRender"),El=Symbol.for("RichTextRender"),Dl=Symbol.for("Pyramid3dRender"),jl=Symbol.for("ImageRender");var Ul=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let Fl,Nl=class extends Zo{constructor(){super(...arguments),this.numberType=sr}drawShape(t,e,i,s,n,r,a,o){if(t.incremental&&n.multiGraphicOptions){const{startAtIdx:e,length:r}=n.multiGraphicOptions,{segments:l=[]}=t.attribute;if(e>l.length)return;const h=ds(t).line,{fill:c=h.fill,stroke:d=h.stroke,opacity:u=h.opacity,fillOpacity:p=h.fillOpacity,strokeOpacity:g=h.strokeOpacity,lineWidth:f=h.lineWidth,visible:m=h.visible}=t.attribute,y=Zr(u,p,c),b=Qr(u,g),v=$r(c),x=qr(d,f);if(!t.valid||!m)return;if(!v&&!x)return;if(!(y||b||a||o))return;const{context:A}=n;for(let n=e;n<e+r;n++)this.drawIncreaseSegment(t,A,l[n-1],l[n],t.attribute.segments[n],[h,t.attribute],i,s)}else super.drawShape(t,e,i,s,n,r,a,o)}drawIncreaseSegment(t,e,i,s,n,r,a,o){s&&(e.beginPath(),function(t,e,i,s){const{offsetX:n=0,offsetY:r=0}=s||{},a=e?e.points[e.points.length-1]:i.points[0];t.moveTo(a.x+n,a.y+r),i.points.forEach((e=>{!1!==e.defined?t.lineTo(e.x+n,e.y+r):t.moveTo(e.x+n,e.y+r)}))}(e.nativeContext,i,s,{offsetX:a,offsetY:o}),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,n,r),e.setStrokeStyle(t,n,a,o,r),e.stroke())}};Nl=Ul([ht()],Nl);class Wl{static registerPlugin(t,e){Wl._pluginClasses[t]=e}static getPlugin(t){return Wl._pluginClasses[t]}}Wl._pluginClasses={};class zl{constructor(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.dir=t,this.color=e,this.colorRgb=Pr.Get(e,Mr.Color1),this.ambient=s;const n=i.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);this.formatedDir=[t[0]/n,t[1]/n,t[2]/n]}computeColor(t,e){const s=this.formatedDir,n=i.min(i.max((t[0]*s[0]+t[1]*s[1]+t[2]*s[2])*(1-this.ambient/2),0)+this.ambient,1);let r;r=i.isString(e)?Pr.Get(e,Mr.Color1):e;const a=this.colorRgb;return`rgb(${a[0]*r[0]*n}, ${a[1]*r[1]*n}, ${a[2]*r[2]*n})`}}const Gl=()=>{Wl.registerPlugin("DirectionalLight",zl)};class Vl{set params(t){this._params=Object.assign({},t),this._projectionMatrixCached=this.forceGetProjectionMatrix(),this._viewMatrixCached=this.forceGetViewMatrix()}get params(){return Object.assign({},this._params)}constructor(t){this.params=t}getViewMatrix(){return this._viewMatrixCached||(this._viewMatrixCached=_r.allocate()),this._viewMatrixCached}forceGetViewMatrix(){this._viewMatrixCached||(this._viewMatrixCached=_r.allocate());const{pos:t,center:e,up:s}=this.params.viewParams;return function(t,e,s,n){let r,a,o,l,h,c,d,u,p,g;const f=e[0],m=e[1],y=e[2],b=n[0],v=n[1],x=n[2],A=s[0],_=s[1],S=s[2];Math.abs(f-A)<i.epsilon&&Math.abs(m-_)<i.epsilon&&Math.abs(y-S)<i.epsilon?mr(t):(d=f-A,u=m-_,p=y-S,g=1/Math.hypot(d,u,p),d*=g,u*=g,p*=g,r=v*p-x*u,a=x*d-b*p,o=b*u-v*d,g=Math.hypot(r,a,o),g?(g=1/g,r*=g,a*=g,o*=g):(r=0,a=0,o=0),l=u*o-p*a,h=p*r-d*o,c=d*a-u*r,g=Math.hypot(l,h,c),g?(g=1/g,l*=g,h*=g,c*=g):(l=0,h=0,c=0),t[0]=r,t[1]=l,t[2]=d,t[3]=0,t[4]=a,t[5]=h,t[6]=u,t[7]=0,t[8]=o,t[9]=c,t[10]=p,t[11]=0,t[12]=-(r*f+a*m+o*y),t[13]=-(l*f+h*m+c*y),t[14]=-(d*f+u*m+p*y),t[15]=1)}(this._viewMatrixCached,t,e,s),this._vp||(this._vp=_r.allocate()),this._vp=br(this._vp,this.getProjectionMatrix(),this.getViewMatrix()),this._viewMatrixCached}getProjectionMatrix(){return this._projectionMatrixCached||(this._projectionMatrixCached=_r.allocate()),this._projectionMatrixCached}forceGetProjectionMatrix(){this._projectionMatrixCached||(this._projectionMatrixCached=_r.allocate());const{left:t,top:e,right:i,bottom:s}=this._params;return function(t,e,i,s,n,r,a){const o=1/(e-i),l=1/(s-n),h=1/(r-a);t[0]=-2*o,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*h,t[11]=0,t[12]=(e+i)*o,t[13]=(n+s)*l,t[14]=(a+r)*h,t[15]=1}(this._projectionMatrixCached,t,i,s,e,0,-2e6),this._vp||(this._vp=_r.allocate()),this._vp=br(this._vp,this.getProjectionMatrix(),this.getViewMatrix()),this._projectionMatrixCached}getField(){const{fieldRatio:t=.8,fieldDepth:e,left:i,right:s}=this._params;return(null!=e?e:s-i)*t}getProjectionScale(t){const e=this.getField();return e/(e+t)}view(t,e,i){const s=[0,0,0];return vr(s,[t,e,i],this._viewMatrixCached),s}vp(t,e,i){const s=[0,0,0],{pos:n}=this._params.viewParams;vr(s,[t,e,i],this._viewMatrixCached),t=s[0],e=s[1],i=s[2];const r=this.getProjectionScale(i);return{x:t*r+n[0],y:e*r+n[1]}}}const Hl=()=>{Wl.registerPlugin("OrthoCamera",Vl)};let Xl=!1;const Yl=new J((t=>{Xl||(Xl=!0,t(Yo).toSelf().inSingletonScope(),t(wl).to(Yo).inSingletonScope(),t(Ml).toService(wl),t(na).toService(xo),Ct(t,na))}));let Kl=!1;const $l=new J((t=>{Kl||(Kl=!0,t(el).toSelf().inSingletonScope(),t(Ol).to(el).inSingletonScope(),t(Ml).toService(Ol),t(Ro).toSelf(),t(Oo).toSelf(),t(oa).toService(Ro),t(oa).toService(Oo),t(oa).toService(xo),Ct(t,oa))}));let ql=!1;const Zl=new J((t=>{ql||(ql=!0,t(Zo).toSelf().inSingletonScope(),t(Nl).toSelf().inSingletonScope(),t(Pl).to(Zo).inSingletonScope(),t(Ml).toService(Pl))}));let Jl=!1;const Ql=new J((t=>{Jl||(Jl=!0,t(rl).toSelf().inSingletonScope(),t(Ll).to(rl).inSingletonScope(),t(Ml).toService(Ll),t(la).toService(xo),Ct(t,la))}));let th=!1;const eh=new J((t=>{th||(th=!0,t(Il).to(dl).inSingletonScope(),t(Ml).toService(Il),t(ha).toService(xo),Ct(t,ha))}));let ih=!1;const sh=new J((t=>{ih||(ih=!0,t(kl).to(xl).inSingletonScope(),t(Ml).toService(kl),t(aa).toService(xo),Ct(t,aa))}));var nh=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},rh=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ah=class extends Go{constructor(){super(),this.numberType=hr,this.builtinContributions=[ol],this.init()}drawShape(t,e,i,s,n){const r=ds(t).richtext,{strokeOpacity:a=r.strokeOpacity,opacity:o=r.opacity,fillOpacity:l=r.fillOpacity,visible:h=r.visible}=t.attribute;if(!t.valid||!h)return;const c=Zr(o,l,!0),d=Zr(o,a,!0);c&&(e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,r),e.translate(i,s),this.beforeRenderStep(t,e,i,s,c,d,c,d,r,n),t.getFrameCache().draw(e,this.drawIcon),this.afterRenderStep(t,e,i,s,c,d,c,d,r,n))}drawIcon(t,e,i,s,n){var r;const a=ds(t).richtextIcon,{width:o=a.width,height:l=a.height,opacity:h=a.opacity,image:c,backgroundFill:d=a.backgroundFill,backgroundFillOpacity:u=a.backgroundFillOpacity,backgroundStroke:p=a.backgroundStroke,backgroundStrokeOpacity:g=a.backgroundStrokeOpacity,backgroundRadius:f=a.backgroundRadius,margin:m}=t.attribute,{backgroundWidth:y=o,backgroundHeight:b=l}=t.attribute;if(m&&(i+=t._marginArray[3],s+=t._marginArray[0]),t._hovered){const t=(y-o)/2,n=(b-l)/2;0===f?(e.beginPath(),e.rect(i-t,s-n,y,b)):(e.beginPath(),Mo(e,i-t,s-n,y,b,f,!0)),d&&(e.globalAlpha=u,e.fillStyle=d,e.fill()),p&&(e.globalAlpha=g,e.strokeStyle=p,e.stroke())}const v=c&&(null===(r=null==t?void 0:t.resources)||void 0===r?void 0:r.get(c));v&&"success"===v.state&&(e.globalAlpha=h,e.drawImage(v.data,i,s,o,l))}draw(t,e,i){const s=ds(t).richtext;this._draw(t,s,!1,i)}};ah=nh([ht(),rh("design:paramtypes",[])],ah);let oh=!1;const lh=new J((t=>{oh||(oh=!0,t(El).to(ah).inSingletonScope(),t(Ml).toService(El))}));let hh=!1;const ch=new J((t=>{hh||(hh=!0,t(jl).to(Bl).inSingletonScope(),t(Ml).toService(jl),t(ra).toService(xo),Ct(t,ra))}));class dh extends Go{stroke(t,e,i,s,n){const r=s.vertices;s.edges.forEach((s=>{const a=r[s[0]],o={x:t+a[0],y:e+a[1],z:i+a[2]},l=r[s[1]],h={x:t+l[0],y:e+l[1],z:i+l[2]};n.beginPath(),n.moveTo(o.x,o.y,o.z),n.lineTo(h.x,h.y,h.z),n.stroke()}))}fill(t,e,i,s,n,r,a,o,l,h,c){const d=Pr.Get(r,Mr.Color255),u=s.vertices,p=u.map((t=>a.view(t[0],t[1],t[2])[2])),g=[];s.polygons.forEach(((t,e)=>{if(n&&!n[e])return;g.push({faceIdx:e,polygon:t});const{polygon:i}=t,s=p[i[0]],r=p[i[1]],a=p[i[2]],o=p[i[3]];t.ave_z=s+r+a+o})),g.sort(((t,e)=>e.polygon.ave_z-t.polygon.ave_z)),g.forEach((s=>{const{polygon:n,normal:p}=s.polygon,g=u[n[0]],f=u[n[1]],m=u[n[2]],y=u[n[3]],b={x:t+g[0],y:e+g[1],z:i+g[2]},v={x:t+f[0],y:e+f[1],z:i+f[2]},x={x:t+m[0],y:e+m[1],z:i+m[2]},A={x:t+y[0],y:e+y[1],z:i+y[2]};a.beginPath(),a.moveTo(b.x,b.y,b.z),a.lineTo(v.x,v.y,v.z),a.lineTo(x.x,x.y,x.z),a.lineTo(A.x,A.y,A.z),a.closePath(),c?c(a,l&&l.attribute,h):(a.fillStyle=o?o.computeColor(p,d):r,a.fill())}))}}var uh=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let ph=class extends dh{constructor(){super(...arguments),this.type="rect3d",this.numberType=lr}drawShape(t,e,i,s,n,r,a,o){var l;const h=ds(t,null==r?void 0:r.theme).rect,{fill:c=h.fill,stroke:d=h.stroke,x1:u,y1:p,x:g,y:f,opacity:m=h.opacity,fillOpacity:y=h.fillOpacity,lineWidth:b=h.lineWidth,strokeOpacity:v=h.strokeOpacity,visible:x=h.visible}=t.attribute;let{width:A,height:_}=t.attribute;A=(null!=A?A:u-g)||0,_=(null!=_?_:p-f)||0;const S=null!==(l=this.z)&&void 0!==l?l:0,T=Jr(m,y,A,_,c),B=ta(m,v,A,_),w=$r(c),C=qr(d,b);if(!t.valid||!x)return;if(!w&&!C)return;if(!(T||B||a||o))return;const{light:M}=n.stage||{},P=t.findFace();if(!1!==c){e.setCommonStyle(t,t.attribute,i,s,h);let n=c;"string"!=typeof n&&(n="black"),this.fill(i,s,S,P,null,n,e,M,null,null,a)}!1!==d&&(e.setStrokeStyle(t,t.attribute,i,s,h),this.stroke(i,s,S,P,e))}draw(t,e,i){const s=ds(t).rect;this._draw(t,s,!1,i)}};ph=uh([ht()],ph);let gh=!1;const fh=new J((t=>{gh||(gh=!0,t(Rl).to(ph).inSingletonScope(),t(Ml).toService(Rl))}));var mh=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let yh=class extends Go{constructor(){super(...arguments),this.numberType=Qn}drawShape(t,e,s,n,r,a,o,l){var h;const c=ds(t,null==a?void 0:a.theme).arc,{fill:d=c.fill}=t.attribute,u=this.valid(t,c,o,l);if(!u)return;const{fVisible:p,sVisible:g,doFill:f,doStroke:m}=u,y=null!==(h=this.z)&&void 0!==h?h:0,{outerPadding:b=c.outerPadding,innerPadding:v=c.innerPadding,height:x=10}=t.attribute;let{outerRadius:A=c.outerRadius,innerRadius:_=c.innerRadius}=t.attribute;A+=b,_-=v;const S=Pr.Get(d,Mr.Color255),{light:T}=r.stage||{},B=r.hack_pieFace,w={top:y,bottom:y+x},C={top:[0,1,0],bottom:[0,-1,0],outside:[1,0,-1],inside:[1,0,-1]};"bottom"===B||"top"===B?(e.beginPath(),function(t,e,s,n,r,a,o){const{startAngle:l,endAngle:h}=t.getParsedAngle(),c=i.abs(h-l),d=h>l;let u=!1;if(a<o){const t=a;a=o,o=t}if(a<=i.epsilon)e.moveTo(s,n,r);else if(c>=i.pi2-i.epsilon)e.moveTo(s+a*i.cos(l),n+a*i.sin(l),r),e.arc(s,n,a,l,h,!d,r),o>i.epsilon&&(e.moveTo(s+o*i.cos(h),n+o*i.sin(h),r),e.arc(s,n,o,h,l,d,r));else{const{outerDeltaAngle:c,innerDeltaAngle:p,outerStartAngle:g,outerEndAngle:f,innerEndAngle:m,innerStartAngle:y}=t.getParsePadAngle(l,h),b=a*i.cos(g),v=a*i.sin(g),x=o*i.cos(m),A=o*i.sin(m);c<.001?u=!0:(e.moveTo(s+b,n+v,r),e.arc(s,n,a,g,f,!d,r)),!(o>i.epsilon)||p<.001?(e.lineTo(s+x,n+A,r),u=!0):(e.lineTo(s+x,n+A,r),e.arc(s,n,o,m,y,d,r))}e.closePath()}(t,e,s,n,w[B],A,_),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,c),f&&(o?o(e,t.attribute,c):p&&(e.setCommonStyle(t,t.attribute,s,n,c),e.fillStyle=T?T.computeColor(C[B],S):d,e.fill())),m&&(l?l(e,t.attribute,c):g&&(e.setStrokeStyle(t,t.attribute,s,n,c),e.stroke()))):"outside"!==B&&"inside"!==B||("inside"===B&&(e.save(),e.beginPath(),e.arc(s,n,_,0,i.pi2,!0,w.top),e.clip()),e.beginPath(),function(t,e,s,n,r,a,o,l){const{startAngle:h,endAngle:c}=t.getParsedAngle(),d=i.abs(c-h),u=c>h;let p=!1;if(o<=i.epsilon)e.moveTo(s,n,r);else if(d>=i.pi2-i.epsilon)e.moveTo(s+o*i.cos(h),n+o*i.sin(h),r),e.arc(s,n,o,h,c,!u,r),e.lineTo(s+o*i.cos(c),n+o*i.sin(c),a),e.arc(s,n,o,c,h,u,a);else{const{innerouterDeltaAngle:t,innerouterStartAngle:d,innerouterEndAngle:g}=l(h,c),f=o*i.cos(d),m=o*i.sin(d),y=o*i.cos(g),b=o*i.sin(g);t<.001?p=!0:(e.moveTo(s+f,n+m,r),e.arc(s,n,o,d,g,!u,r),e.lineTo(s+y,n+b,a),e.arc(s,n,o,g,d,u,a))}e.closePath()}(t,e,s,n,w.top,w.bottom,"outside"===B?A:_,((e,i)=>{const{outerDeltaAngle:s,innerDeltaAngle:n,outerStartAngle:r,outerEndAngle:a,innerEndAngle:o,innerStartAngle:l}=t.getParsePadAngle(e,i);return"outside"===B?{innerouterDeltaAngle:s,innerouterEndAngle:a,innerouterStartAngle:r}:{innerouterDeltaAngle:n,innerouterEndAngle:o,innerouterStartAngle:l}})),e.setShadowBlendStyle&&e.setShadowBlendStyle(t,t.attribute,c),f&&(o?o(e,t.attribute,c):p&&(e.setCommonStyle(t,t.attribute,s,n,c),e.fillStyle=T?T.computeColor(C[B],S):d,e.fill())),m&&(l?l(e,t.attribute,c):g&&(e.setStrokeStyle(t,t.attribute,s,n,c),e.stroke())),"inside"===B&&e.restore())}draw(t,e,i,s){const n=ds(t,null==s?void 0:s.theme).arc;this._draw(t,n,!1,i,s)}};yh=mh([ht()],yh);let bh=!1;const vh=new J((t=>{bh||(bh=!0,t(Cl).to(yh).inSingletonScope(),t(Ml).toService(Cl))}));var xh=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let Ah=class extends dh{constructor(){super(...arguments),this.type="pyramid3d",this.numberType=ar}drawShape(t,e,i,s,n,r,a,o){var l;const h=ds(t,null==r?void 0:r.theme).polygon,{fill:c=h.fill,stroke:d=h.stroke,face:u=[!0,!0,!0,!0,!0,!0]}=t.attribute,p=null!==(l=this.z)&&void 0!==l?l:0;if(!this.valid(t,h,a,o))return;const{light:g}=n.stage||{},f=t.findFace();if(!1!==c){e.setCommonStyle(t,t.attribute,i,s,h);let n=c;"string"!=typeof n&&(n="black"),this.fill(i,s,p,f,u,n,e,g,t,h,a)}!1!==d&&(e.setStrokeStyle(t,t.attribute,i,s,h),this.stroke(i,s,p,f,e))}draw(t,e,i){const s=ds(t).polygon;this._draw(t,s,!1,i)}};Ah=xh([ht()],Ah);let _h=!1;const Sh=new J((t=>{_h||(_h=!0,t(Dl).to(Ah).inSingletonScope(),t(Ml).toService(Dl))}));class Th{constructor(){this.name="ViewTransform3dPlugin",this.activeEvent="onRegister",this._uid=Z.GenAutoIncrementId(),this.key=this.name+this._uid,this.onMouseDown=t=>{this.option3d||(this.option3d=this.pluginService.stage.option3d),this.option3d&&(this.mousedown=!0,this.pageX=t.page.x,this.pageY=t.page.y)},this.onMouseUp=t=>{this.option3d||(this.option3d=this.pluginService.stage.option3d),this.option3d&&(this.mousedown=!1)},this.onMouseMove=t=>{var e,i;const s=this.pluginService.stage;if(this.option3d||(this.option3d=s.option3d),this.option3d&&this.mousedown)if(this.pageX&&this.pageY){const n=t.page.x-this.pageX,r=t.page.y-this.pageY;this.pageX=t.page.x,this.pageY=t.page.y;const a=n/100,o=r/100;this.option3d.alpha=(null!==(e=this.option3d.alpha)&&void 0!==e?e:0)+a,this.option3d.beta=(null!==(i=this.option3d.beta)&&void 0!==i?i:0)+o,s.set3dOptions(this.option3d),s.renderNextFrame()}else this.pageX=t.page.x,this.pageY=t.page.y}}activate(t){this.pluginService=t;const e=t.stage;this.option3d=e.option3d,e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mousemove",this.onMouseMove)}deactivate(t){const e=t.stage;e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mousemove",this.onMouseMove)}}const Bh=t=>t.zField||t.series&&t.series.some((t=>t.zField));class wh extends e.BasePlugin{constructor(){super(wh.type),this.type="VChart3dPlugin"}onInit(t,e){var i,s,n;if(this._is3d=!!(s=e)&&("bar3d"===(n=s.type)||"funnel3d"===n||"histogram3d"===n||"pie3d"===n||"rangeColumn3d"===n||"wordCloud3d"===n||Bh(s),!0),this._is3d){const{globalInstance:e}=t;e.getCompiler().getStage().set3dOptions(Object.assign({},null===(i=e._option)||void 0===i?void 0:i.options3d))}}onBeforeInitChart(t,e,i){this._is3d&&Bh(e)&&(e.layout={type:"layout3d"})}}wh.pluginType="chart",wh.type="VChart3dPlugin";const Ch=()=>{e.registerChartPlugin(wh),Gl(),Hl(),Wl.registerPlugin("ViewTransform3dPlugin",Th)},Mh={label:{name:"label",type:"text"},bar3d:{name:"bar3d",type:"rect3d"}};class Ph extends e.BarSeriesSpecTransformer{_transformLabelSpec(t){this._addMarkLabelSpec(t,"bar3d")}}const kh=Symbol.for("MathPickerContribution"),Oh=Symbol.for("MathArcPicker"),Rh=Symbol.for("MathImagePicker"),Lh=Symbol.for("MathLinePicker"),Ih=Symbol.for("MathRectPicker"),Eh=Symbol.for("MathSymbolPicker"),Dh=Symbol.for("MathTextPicker"),jh=Symbol.for("MathPolygonPicker"),Uh=Symbol.for("CanvasArcPicker"),Fh=Symbol.for("CanvasArc3dPicker"),Nh=Symbol.for("CanvasImagePicker"),Wh=Symbol.for("CanvasLinePicker"),zh=Symbol.for("CanvasRectPicker"),Gh=Symbol.for("CanvasRect3dPicker"),Vh=Symbol.for("CanvasSymbolPicker"),Hh=Symbol.for("CanvasTextPicker"),Xh=Symbol.for("CanvasPolygonPicker"),Yh=Symbol.for("CanvasPyramid3dPicker"),Kh=Symbol.for("CanvasRichTextPicker"),$h=Symbol.for("CanvasPickerContribution");class qh{contains(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;if(!this.canvasRenderer)return!0;const{pickContext:s}=null!=i?i:{};if(!s)return!1;const n=t.getGraphicTheme();s.highPerformanceSave();let{x:r=n.x,y:a=n.y}=t.attribute;if(t.transMatrix.onlyTranslate()){const e=t.getOffsetXY(n);r+=e.x,a+=e.y,s.setTransformForCurrent()}else r=0,a=0,s.transformFromMatrix(t.transMatrix,!0);let o=!1,l=!1;return this.canvasRenderer.drawShape(t,s,r,a,{},null,((t,i,s,n)=>!(!o&&!l)||(o=t.isPointInPath(e.x,e.y),l=n||l,o)),((t,i,n,r)=>{if(o||l)return!0;const a=i.lineWidth||n.lineWidth,h=i.pickStrokeBuffer||n.pickStrokeBuffer,c=i.keepStrokeScale||n.keepStrokeScale;return s.lineWidth=c?a+h:fi(s,a+h,s.dpr),o=t.isPointInStroke(e.x,e.y),l=r||l,o})),s.highPerformanceRestore(),o}}var Zh=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Jh=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Qh=function(t,e){return function(i,s){e(i,s,t)}};let tc=class extends qh{constructor(t){super(),this.canvasRenderer=t,this.type="arc",this.numberType=Jn}};tc=Zh([ht(),Qh(0,ot(wl)),Jh("design:paramtypes",[Object])],tc);let ec=!1;const ic=new J(((t,e,i,s)=>{ec||(ec=!0,t(Oh).to(tc).inSingletonScope(),t(kh).toService(Oh))}));var sc=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let nc=class{constructor(){this.type="image",this.numberType=ir}contains(t,e,i){const{pickContext:s}=null!=i?i:{};return!!s&&!!t.AABBBounds.containsPoint(e)}};nc=sc([ht()],nc);let rc=!1;const ac=new J(((t,e,i,s)=>{rc||(rc=!0,t(Rh).to(nc).inSingletonScope(),t(nc).toService(Rh))}));var oc=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},lc=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},hc=function(t,e){return function(i,s){e(i,s,t)}};let cc=class extends qh{constructor(t){super(),this.canvasRenderer=t,this.type="line",this.numberType=sr}};cc=oc([ht(),hc(0,ot(Pl)),lc("design:paramtypes",[Object])],cc);let dc=!1;const uc=new J(((t,e,i,s)=>{dc||(dc=!0,t(Lh).to(cc).inSingletonScope(),t(kh).toService(Lh))}));var pc=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},gc=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},fc=function(t,e){return function(i,s){e(i,s,t)}};let mc=class extends qh{constructor(t){super(),this.canvasRenderer=t,this.type="polygon",this.numberType=rr}};mc=pc([ht(),fc(0,ot(kl)),gc("design:paramtypes",[Object])],mc);let yc=!1;const bc=new J(((t,e,i,s)=>{yc||(yc=!0,t(jh).to(mc).inSingletonScope(),t(kh).toService(jh))})),vc=new i.AABBBounds;class xc{constructor(){this.type="rect",this.numberType=or}contains(t,e,s){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;const{pickContext:n}=null!=s?s:{};if(!n)return!1;const r=t.getGraphicTheme(),{cornerRadius:a=r.cornerRadius}=t.attribute;let{x:o=r.x,y:l=r.y}=t.attribute;n.highPerformanceSave();let h=!0;if(t.transMatrix.onlyTranslate()){const e=t.getOffsetXY(r);o+=e.x,l+=e.y,n.setTransformForCurrent()}else o=0,l=0,h=!1,n.transformFromMatrix(t.transMatrix,!0);let c=!0;if(!h||t.shadowRoot||i.isNumber(a,!0)&&0!==a||i.isArray(a)&&a.some((t=>0!==t)))c=!1,this.canvasRenderer.drawShape(t,n,o,l,{},null,((t,i,s)=>!!c||(c=t.isPointInPath(e.x,e.y),c)),((t,i,s)=>{if(c)return!0;const r=i.lineWidth||s.lineWidth,a=i.pickStrokeBuffer||s.pickStrokeBuffer,o=i.keepStrokeScale||s.keepStrokeScale;return n.lineWidth=o?r+a:fi(n,r+a,n.dpr),c=t.isPointInStroke(e.x,e.y),c}));else{const{fill:i=r.fill,stroke:s=r.stroke,lineWidth:n=r.lineWidth}=t.attribute;if(i)c=!0;else if(s){const i=t.AABBBounds;vc.setValue(i.x1,i.y1,i.x2,i.y2),vc.expand(-n/2),c=!vc.containsPoint(e)}}return n.highPerformanceRestore(),c}}var Ac=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},_c=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Sc=function(t,e){return function(i,s){e(i,s,t)}};let Tc=class extends xc{constructor(t){super(),this.canvasRenderer=t}};Tc=Ac([ht(),Sc(0,ot(Ol)),_c("design:paramtypes",[Object])],Tc);let Bc=!1;const wc=new J(((t,e,i,s)=>{Bc||(Bc=!0,t(Ih).to(Tc).inSingletonScope(),t(kh).toService(Ih))}));let Cc=!1;const Mc=new J(((t,e,i,s)=>{Cc||(Cc=!0,t(Rh).to(nc).inSingletonScope(),t(nc).toService(Rh))}));var Pc=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},kc=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Oc=function(t,e){return function(i,s){e(i,s,t)}};let Rc=class extends qh{constructor(t){super(),this.canvasRenderer=t,this.type="symbol",this.numberType=cr}};Rc=Pc([ht(),Oc(0,ot(Ll)),kc("design:paramtypes",[Object])],Rc);let Lc=!1;const Ic=new J(((t,e,i,s)=>{Lc||(Lc=!0,t(Eh).to(Rc).inSingletonScope(),t(kh).toService(Eh))}));var Ec=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let Dc=class{constructor(){this.type="text",this.numberType=dr}contains(t,e,i){return!!t.AABBBounds.containsPoint(e)}};Dc=Ec([ht()],Dc);let jc=!1;const Uc=new J(((t,e,i,s)=>{jc||(jc=!0,t(Dh).to(Dc).inSingletonScope(),t(kh).toService(Dh))}));var Fc=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Nc=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Wc=function(t,e){return function(i,s){e(i,s,t)}};let zc=class extends qh{constructor(t){super(),this.canvasRenderer=t,this.type="arc",this.numberType=Jn}};zc=Fc([ht(),Wc(0,ot(wl)),Nc("design:paramtypes",[Object])],zc);let Gc=!1;const Vc=new J(((t,e,i,s)=>{Gc||(Gc=!0,t(Uh).to(zc).inSingletonScope(),t($h).toService(Uh))}));var Hc=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Xc=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yc=function(t,e){return function(i,s){e(i,s,t)}};let Kc=class extends xc{constructor(t){super(),this.canvasRenderer=t}};Kc=Hc([ht(),Yc(0,ot(Ol)),Xc("design:paramtypes",[Object])],Kc);let $c=!1;const qc=new J(((t,e,i,s)=>{$c||($c=!0,t(zh).to(Kc).inSingletonScope(),t($h).toService(zh))}));class Zc extends Go{contains(t,e,i){if(!t.AABBBounds.containsPoint(e))return!1;if("imprecise"===t.attribute.pickMode)return!0;const{pickContext:s}=null!=i?i:{};if(!s)return!1;s.highPerformanceSave();const n=t.getGraphicTheme(),r=this.transform(t,n,s),{x:a,y:o,z:l,lastModelMatrix:h}=r;let c=e;if(s.camera){c=e.clone();const i=t.parent.globalTransMatrix;c.x=i.a*e.x+i.c*e.y+i.e,c.y=i.b*e.x+i.d*e.y+i.f}this.canvasRenderer.z=l;let d=!1;return this.canvasRenderer.drawShape(t,s,a,o,{},null,(t=>!!d||(d=t.isPointInPath(c.x,c.y),d)),((t,e,i)=>{if(d)return!0;const n=e.lineWidth||i.lineWidth,r=e.pickStrokeBuffer||i.pickStrokeBuffer,a=e.keepStrokeScale||i.keepStrokeScale;return s.lineWidth=a?n+r:fi(s,n+r,s.dpr),d=t.isPointInStroke(c.x,c.y),d})),this.canvasRenderer.z=0,s.modelMatrix!==h&&_r.free(s.modelMatrix),s.modelMatrix=h,s.highPerformanceRestore(),d}}var Jc=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Qc=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},td=function(t,e){return function(i,s){e(i,s,t)}};let ed=class extends Zc{constructor(t){super(),this.canvasRenderer=t,this.type="line",this.numberType=sr}};ed=Jc([ht(),td(0,ot(Pl)),Qc("design:paramtypes",[Object])],ed);let id=!1;const sd=new J(((t,e,i,s)=>{id||(id=!0,t(Wh).to(ed).inSingletonScope(),t($h).toService(Wh))}));class nd extends Go{contains(t,e,i){const{pickContext:s}=null!=i?i:{};if(!s)return!1;const n=t.getGraphicTheme();s.highPerformanceSave();const r=this.transform(t,n,s),{x:a,y:o,z:l,lastModelMatrix:h}=r;let c=e;if(s.camera){c=e.clone();const i=t.parent.globalTransMatrix;c.x=i.a*e.x+i.c*e.y+i.e,c.y=i.b*e.x+i.d*e.y+i.f}this.canvasRenderer.z=l;let d=!1;return this.canvasRenderer.drawShape(t,s,a,o,i,null,((t,e,i)=>!!d||(d=t.isPointInPath(c.x,c.y),d))),this.canvasRenderer.z=0,s.modelMatrix!==h&&_r.free(s.modelMatrix),s.modelMatrix=h,s.highPerformanceRestore(),d}}var rd=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},ad=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},od=function(t,e){return function(i,s){e(i,s,t)}};let ld=class extends nd{constructor(t){super(),this.canvasRenderer=t,this.type="symbol",this.numberType=cr}contains(t,e,i){const{pickContext:s}=null!=i?i:{};if(!s)return!1;const n=t.getParsedPath();if(!s.camera){if(!t.AABBBounds.containsPoint(e))return!1;if(n.isSvg||"imprecise"===t.attribute.pickMode)return!0}s.highPerformanceSave();const r=t.getGraphicTheme(),a=this.transform(t,r,s),{x:o,y:l,z:h,lastModelMatrix:c}=a;let d=e;if(s.camera){d=e.clone();const i=t.parent.globalTransMatrix;d.x=i.a*e.x+i.c*e.y+i.e,d.y=i.b*e.x+i.d*e.y+i.f}this.canvasRenderer.z=h;let u=!1;return this.canvasRenderer.drawShape(t,s,o,l,{},null,((t,e,i)=>!!u||(u=t.isPointInPath(d.x,d.y),u)),((t,e,i)=>{if(u)return!0;const n=e.lineWidth||i.lineWidth,r=e.pickStrokeBuffer||i.pickStrokeBuffer,a=e.keepStrokeScale||i.keepStrokeScale;return s.lineWidth=a?n+r:fi(s,n+r,s.dpr),u=t.isPointInStroke(d.x,d.y),u})),this.canvasRenderer.z=0,s.modelMatrix!==c&&_r.free(s.modelMatrix),s.modelMatrix=c,s.highPerformanceRestore(),u}};ld=rd([ht(),od(0,ot(Ll)),ad("design:paramtypes",[Object])],ld);let hd=!1;const cd=new J(((t,e,i,s)=>{hd||(hd=!0,t(Vh).to(ld).inSingletonScope(),t($h).toService(Vh))}));var dd=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},ud=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},pd=function(t,e){return function(i,s){e(i,s,t)}};let gd=class extends nd{constructor(t){super(),this.canvasRenderer=t,this.type="text",this.numberType=dr}contains(t,e,i){const{pickContext:s}=null!=i?i:{};if(!s)return!1;const n=t.AABBBounds;if(!s.camera)return!!n.containsPoint(e);s.highPerformanceSave();const r=t.getGraphicTheme(),{keepDirIn3d:a=r.keepDirIn3d}=t.attribute,o=!a,l=this.transform(t,r,s,o),{x:h,y:c,z:d,lastModelMatrix:u}=l;this.canvasRenderer.z=d;let p=e;if(s.camera){p=e.clone();const i=t.parent.globalTransMatrix;p.x=i.a*e.x+i.c*e.y+i.e,p.y=i.b*e.x+i.d*e.y+i.f}let g=!1;return this.canvasRenderer.drawShape(t,s,h,c,{},null,((e,i,s)=>{if(g)return!0;const{fontSize:n=r.fontSize,textBaseline:a=r.textBaseline,textAlign:o=r.textAlign}=t.attribute,l=t.AABBBounds,u=l.height(),f=l.width(),m=ua(a,u,n),y=da(o,f);return e.rect(y+h,m+c,f,u,d),g=e.isPointInPath(p.x,p.y),g}),((t,e,i)=>g)),this.canvasRenderer.z=0,s.modelMatrix!==u&&_r.free(s.modelMatrix),s.modelMatrix=u,s.highPerformanceRestore(),g}};gd=dd([ht(),pd(0,ot(Il)),ud("design:paramtypes",[Object])],gd);let fd=!1;const md=new J(((t,e,i,s)=>{fd||(fd=!0,t(Hh).to(gd).inSingletonScope(),t($h).toService(Hh))}));var yd=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},bd=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vd=function(t,e){return function(i,s){e(i,s,t)}};let xd=class extends qh{constructor(t){super(),this.canvasRenderer=t,this.type="polygon",this.numberType=rr}};xd=yd([ht(),vd(0,ot(kl)),bd("design:paramtypes",[Object])],xd);let Ad=!1;const _d=new J(((t,e,i,s)=>{Ad||(Ad=!0,t(Xh).to(xd).inSingletonScope(),t($h).toService(Xh))}));var Sd=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Td=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Bd=function(t,e){return function(i,s){e(i,s,t)}};let wd=class{constructor(t){this.canvasRenderer=t,this.type="richtext",this.numberType=hr}contains(t,e,i){return!!t.AABBBounds.containsPoint(e)}};wd=Sd([ht(),Bd(0,ot(El)),Td("design:paramtypes",[Object])],wd);let Cd=!1;const Md=new J(((t,e,i,s)=>{Cd||(Cd=!0,t(Kh).to(wd).inSingletonScope(),t($h).toService(Kh))}));var Pd=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},kd=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Od=function(t,e){return function(i,s){e(i,s,t)}};let Rd=class extends qh{constructor(t){super(),this.canvasRenderer=t,this.type="image",this.numberType=ir}};Rd=Pd([ht(),Od(0,ot(jl)),kd("design:paramtypes",[Object])],Rd);let Ld=!1;const Id=new J(((t,e,i,s)=>{Ld||(Ld=!0,t(Nh).to(Rd).inSingletonScope(),t($h).toService(Nh))}));var Ed=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Dd=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},jd=function(t,e){return function(i,s){e(i,s,t)}};let Ud=class extends nd{constructor(t){super(),this.canvasRenderer=t,this.type="rect3d",this.numberType=lr,this.themeType="rect"}};Ud=Ed([ht(),jd(0,ot(Rl)),Dd("design:paramtypes",[Object])],Ud);let Fd=!1;const Nd=new J(((t,e,i,s)=>{Fd||(Fd=!0,t(Gh).to(Ud).inSingletonScope(),t($h).toService(Gh))}));var Wd=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},zd=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Gd=function(t,e){return function(i,s){e(i,s,t)}};let Vd=class extends nd{constructor(t){super(),this.canvasRenderer=t,this.type="arc3d",this.numberType=Qn,this.themeType="arc"}};Vd=Wd([ht(),Gd(0,ot(Cl)),zd("design:paramtypes",[Object])],Vd);let Hd=!1;const Xd=new J(((t,e,i,s)=>{Hd||(Hd=!0,t(Fh).to(Vd).inSingletonScope(),t($h).toService(Fh))}));var Yd=function(t,e,i,s){var n,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},Kd=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},$d=function(t,e){return function(i,s){e(i,s,t)}};let qd=class extends nd{constructor(t){super(),this.canvasRenderer=t,this.type="pyramid3d",this.numberType=ar,this.themeType="polygon"}};qd=Yd([ht(),$d(0,ot(Dl)),Kd("design:paramtypes",[Object])],qd);let Zd=!1;const Jd=new J(((t,e,i,s)=>{Zd||(Zd=!0,t(Yh).to(qd).inSingletonScope(),t($h).toService(Yh))})),Qd=function(){!function(){if(null==Fl)try{const t=document.createElement("canvas"),e=t.getContext("2d");Fl=!!(window&&t.getBoundingClientRect&&requestAnimationFrame&&window.devicePixelRatio&&e&&e.isPointInPath&&e.isPointInStroke),Fl&&(Fl=!!document.createElement)}catch(t){Fl=!1}}();const t=kt.global&&kt.global.env;return t?"browser"===t:Fl}();function tu(){tu.__loaded||(tu.__loaded=!0,uo.RegisterGraphicCreator("arc",eo),Ci.load(Yl),Ci.load(Qd?Vc:ic))}tu.__loaded=!1;const eu=tu;function iu(){iu.__loaded||(iu.__loaded=!0,uo.RegisterGraphicCreator("arc3d",so),Gl(),Hl(),Ci.load(vh),Ci.load(Xd))}iu.__loaded=!1;const su=iu;function nu(){nu.__loaded||(nu.__loaded=!0,uo.RegisterGraphicCreator("group",Kr))}nu.__loaded=!1;const ru=nu;function au(){au.__loaded||(au.__loaded=!0,uo.RegisterGraphicCreator("image",Na),Ci.load(ch),Ci.load(Qd?Id:ac))}au.__loaded=!1;const ou=au;function lu(){lu.__loaded||(lu.__loaded=!0,uo.RegisterGraphicCreator("line",Ma),Ci.load(Zl),Ci.load(Qd?sd:uc))}lu.__loaded=!1;const hu=lu;function cu(){cu.__loaded||(cu.__loaded=!0,uo.RegisterGraphicCreator("polygon",ao),Ci.load(sh),Ci.load(Qd?_d:bc))}cu.__loaded=!1;const du=cu;function uu(){uu.__loaded||(uu.__loaded=!0,uo.RegisterGraphicCreator("pyramid3d",lo),Gl(),Hl(),Ci.load(Sh),Ci.load(Jd))}uu.__loaded=!1;const pu=uu;function gu(){gu.__loaded||(gu.__loaded=!0,uo.RegisterGraphicCreator("rect",Oa),Ci.load($l),Ci.load(Qd?qc:wc))}gu.__loaded=!1;const fu=gu;function mu(){mu.__loaded||(mu.__loaded=!0,uo.RegisterGraphicCreator("rect3d",Ia),Ci.load(fh),Ci.load(Nd))}mu.__loaded=!1;const yu=mu;function bu(){bu.__loaded||(bu.__loaded=!0,uo.RegisterGraphicCreator("richtext",Ya),Ci.load(lh),Ci.load(Qd?Md:Mc))}bu.__loaded=!1;const vu=bu;function xu(){xu.__loaded||(xu.__loaded=!0,uo.RegisterGraphicCreator("shadowRoot",co))}xu.__loaded=!1;const Au=xu;function _u(){_u.__loaded||(_u.__loaded=!0,uo.RegisterGraphicCreator("symbol",Ba),Ci.load(Ql),Ci.load(Qd?cd:Ic))}_u.__loaded=!1;const Su=_u;function Tu(){Tu.__loaded||(Tu.__loaded=!0,uo.RegisterGraphicCreator("text",_a),Ci.load(eh),Ci.load(Qd?md:Uc))}Tu.__loaded=!1;const Bu=Tu;class wu extends e.BaseMark{_getDefaultStyle(){return Object.assign(Object.assign({},super._getDefaultStyle()),{width:void 0,height:void 0,length:3})}setDataLabelType(){return"rect"}constructor(t,e){super(t,e),this.type=wu.type,this._markConfig.support3d=!0}setMarkConfig(t){super.setMarkConfig(t),this._markConfig.support3d=!0}}wu.type="rect3d";const Cu=()=>{e.Factory.registerMark(wu.type,wu),Au(),yu(),e.registerRectAnimation(),e.Factory.registerGraphicComponent("rect3d",Ia)};class Mu extends e.BarSeries{constructor(){super(...arguments),this.type=K.bar3d,this._barMarkName="bar3d",this._barMarkType="rect3d",this.transformerConstructor=Ph}}Mu.type=K.bar3d,Mu.mark=Mh,Mu.builtInTheme={bar3d:{bar3d:{style:{length:3}},label:{visible:!1,style:{offset:12,position:"outside"}}}},Mu.transformerConstructor=Ph;const Pu=()=>{e.Factory.registerAnimation("bar3d",((t,i)=>({appear:e.barPresetAnimation(t,i),enter:e.barGrowIn(t,!1),exit:e.barGrowOut(t,!1),disappear:e.barGrowOut(t)}))),Cu(),e.registerCartesianBandAxis(),e.registerCartesianLinearAxis(),e.Factory.registerSeries(Mu.type,Mu)};class ku extends e.Layout{layoutItems(t,i,s,n){this._layoutInit(t,i,s,n);const r={recomputeWidth:this.recomputeWidth,recomputeHeight:this.recomputeHeight};this._layoutNormalItems(i,r);const a={left:this.leftCurrent,top:this.topCurrent,right:this.rightCurrent,bottom:this.bottomCurrent},o=i.filter((t=>"absolute"===t.layoutType)),l=o.filter((t=>"z"===t.layoutOrient));let h={width:0,height:0};if(l.length){h=l[0].getLayoutRect()}this.leftCurrent+=h.width/8,this.rightCurrent-=h.width/8,this.topCurrent+=h.height/8,this.bottomCurrent-=h.height/8;const{regionItems:c,relativeItems:d,relativeOverlapItems:u,allRelatives:p,overlapItems:g}=this._groupItems(i);this.layoutRegionItems(c,d,u,g,r),this._processAutoIndent(c,d,u,g,p,a,r);const f=o.filter((t=>"z"!==t.layoutOrient));this.layoutAbsoluteItems(f);const m=d.filter((t=>"axes"===t.model.specKey&&e.isXAxis(t.layoutOrient)))[0],y=d.filter((t=>"axes"===t.model.specKey&&e.isYAxis(t.layoutOrient)))[0];if(m&&l.length){const t=m.getLayoutStartPoint(),e=m.getLayoutRect(),i={x:"left"===y.layoutOrient?t.x+e.width:t.x,y:t.y,width:this._chartLayoutRect.width,height:this._chartLayoutRect.height};l[0].model.directionStr="left"===y.layoutOrient?"r2l":"l2r";const s=m.getLayoutRect(),n=y.getLayoutRect(),r={length:l[0].getLayoutRect().width,width:s.width,height:n.height};m.model.setLayout3dBox&&m.model.setLayout3dBox(r),y.model.setLayout3dBox&&y.model.setLayout3dBox(r),l[0].model.setLayout3dBox&&l[0].model.setLayout3dBox(r),this.layoutZAxisItems(l,i)}}layoutZAxisItems(t,e){t.forEach((t=>{t.absoluteLayoutInRect(e)}))}getItemComputeLayoutRect(t,e){e||(e={offsetLeft:0,offsetRight:0,offsetTop:0,offsetBottom:0});return{width:this.rightCurrent-this.leftCurrent-t.layoutPaddingLeft-t.layoutPaddingRight-(e.offsetLeft+e.offsetRight),height:this.bottomCurrent-this.topCurrent-t.layoutPaddingTop-t.layoutPaddingBottom-(e.offsetTop+e.offsetBottom)}}_checkAutoIndent(t){const e={top:0,left:0,bottom:0,right:0},i=this._chartViewBox.x2-this._chartViewBox.x1-this.rightCurrent,s=this._chartViewBox.y2-this._chartViewBox.y1-this.bottomCurrent;return t.forEach((t=>{if(!t.getModelVisible()||!t.autoIndent)return;const n="left"===t.layoutOrient||"right"===t.layoutOrient,r=t.getLastComputeOutBounds();n?(e.top=Math.max(e.top,r.y1-this.topCurrent),e.bottom=Math.max(e.bottom,r.y2-s)):(e.left=Math.max(e.left,r.x1-this.leftCurrent),e.right=Math.max(e.right,r.x2-i))})),e}}ku.type="layout3d";const Ou=()=>{e.Factory.registerLayout(ku.type,ku)};class Ru extends e.BarChart{constructor(){super(...arguments),this.transformerConstructor=H,this.type="bar3d",this.seriesType=K.bar3d}}Ru.type="bar3d",Ru.seriesType=K.bar3d,Ru.transformerConstructor=H;const Lu=Object.assign(Object.assign({},e.baseSeriesMark),{funnel3d:{name:"funnel3d",type:"pyramid3d"},transform3d:{name:"transform3d",type:"pyramid3d"},transformLabel:{name:"transformLabel",type:"text"},outerLabel:{name:"outerLabel",type:"text"},outerLabelLine:{name:"outerLabelLine",type:"rule"}});class Iu extends e.FunnelSeriesSpecTransformer{_transformLabelSpec(t){this._addMarkLabelSpec(t,"funnel3d"),t.isTransform&&this._addMarkLabelSpec(t,"transform3d","transformLabel")}}class Eu extends e.BasePolygonMark{_getDefaultStyle(){const t=super._getDefaultStyle();return t.stroke=!1,t}constructor(t,e){super(t,e),this.type=Eu.type,this._markConfig.support3d=!0}setMarkConfig(t){super.setMarkConfig(t),this._markConfig.support3d=!0}}Eu.type="pyramid3d";const Du=e.getFunnelTheme(!0);class ju extends e.FunnelSeries{constructor(){super(...arguments),this.type=K.funnel3d,this._funnelMarkName="funnel3d",this._funnelMarkType="pyramid3d",this._transformMarkName="transform3d",this._transformMarkType="pyramid3d",this.transformerConstructor=Iu}initMark(){var t,e,i,s,n,r,a,o;if(this._funnelMark=this._createMark(Object.assign(Object.assign({},ju.mark.funnel3d),{name:this._funnelMarkName,type:this._funnelMarkType}),{themeSpec:null===(t=this._theme)||void 0===t?void 0:t.funnel3d,key:this._seriesField,isSeriesMark:!0},{support3d:!0}),this._spec.isTransform&&(this._funnelTransformMark=this._createMark(Object.assign(Object.assign({},ju.mark.transform3d),{name:this._transformMarkName,type:this._transformMarkType}),{themeSpec:null===(e=this._theme)||void 0===e?void 0:e.transform3d,key:this._seriesField,skipBeforeLayouted:!1,dataView:this._viewDataTransform.getDataView(),dataProductId:this._viewDataTransform.getProductId()})),null===(s=null===(i=this._spec)||void 0===i?void 0:i.outerLabel)||void 0===s?void 0:s.visible){const{line:t}=null!==(n=this._spec.outerLabel)&&void 0!==n?n:{},{line:e}=null!==(a=null===(r=this._theme)||void 0===r?void 0:r.outerLabel)&&void 0!==a?a:{};this._funnelOuterLabelMark.label=this._createMark(ju.mark.outerLabel,{themeSpec:null===(o=this._theme)||void 0===o?void 0:o.outerLabel,key:this._seriesField,markSpec:this._spec.outerLabel}),this._funnelOuterLabelMark.line=this._createMark(ju.mark.outerLabelLine,{themeSpec:e,key:this._seriesField,markSpec:t})}}initMarkStyle(){super.initMarkStyle();const t=this._funnelMark;t&&this.setMarkStyle(t,{z:t=>{if(this._isHorizontal())return 0;const e=this.getPoints(t),i=Math.max(Math.abs(e[0].x-e[1].x),Math.abs(e[2].x-e[3].x));return(this._computeMaxSize()-i)/2}},"normal",e.AttributeLevel.Series)}initLabelMarkStyle(t){var i,s;super.initLabelMarkStyle(t),this.setMarkStyle(t,{z:t=>{if(this._isHorizontal())return 0;const e=this.getPoints(t),i=Math.max(Math.abs(e[0].x-e[1].x),Math.abs(e[2].x-e[3].x));return(this._computeMaxSize()-i)/2}},"normal",e.AttributeLevel.Series),this._labelMark=t,null===(i=this._funnelOuterLabelMark)||void 0===i||i.label,null===(s=this._funnelOuterLabelMark)||void 0===s||s.line}}ju.type=K.funnel3d,ju.mark=Lu,ju.builtInTheme={funnel3d:Du},ju.transformerConstructor=Iu;const Uu=()=>{e.Factory.registerMark(Eu.type,Eu),Au(),pu(),e.registerPolygonAnimation(),e.Factory.registerGraphicComponent("pyramid3d",lo),e.registerTextMark(),e.registerRuleMark(),e.Factory.registerSeries(ju.type,ju)};class Fu extends e.BaseChart{constructor(){super(...arguments),this.transformerConstructor=e.FunnelChartSpecTransformer,this.type="funnel3d",this.seriesType=K.funnel3d}}Fu.type="funnel3d",Fu.seriesType=K.funnel3d,Fu.transformerConstructor=e.FunnelChartSpecTransformer;class Nu extends e.BaseHistogramChart{constructor(){super(...arguments),this.transformerConstructor=e.HistogramChartSpecTransformer,this.type="histogram3d",this.seriesType=K.bar3d}_setModelOption(){this._modelOption.getDimensionInfo=e.getCartesianDimensionInfo,this._modelOption.getDimensionInfoByValue=e.getDimensionInfoByValue,this._modelOption.getRectByDimensionData=e.getCartesianCrosshairRect}}Nu.type="histogram3d",Nu.seriesType=K.bar3d,Nu.transformerConstructor=e.HistogramChartSpecTransformer;class Wu extends e.BasePieChartSpecTransformer{transformSpec(t){super.transformSpec(t),t.series.forEach((e=>{"pie3d"===e.type&&(e.angle3d=t.angle3d)}))}}class zu extends e.BaseArcMark{setDataLabelType(){return"arc"}constructor(t,e){super(t,e),this.type=zu.type,this._markConfig.support3d=!0}setMarkConfig(t){super.setMarkConfig(t),this._markConfig.support3d=!0}}zu.type="arc3d";const Gu=Object.assign(Object.assign({},e.baseSeriesMark),{pie3d:{name:"pie3d",type:"arc3d"},labelLine:{name:"labelLine",type:"path"}});class Vu extends e.PieSeriesSpecTransformer{_transformLabelSpec(t){this._addMarkLabelSpec(t,"pie3d")}}class Hu extends e.BasePieSeries{constructor(){super(...arguments),this.type=K.pie3d,this._pieMarkName="pie3d",this._pieMarkType="arc3d",this.transformerConstructor=Vu}setAttrFromSpec(){var t,e;super.setAttrFromSpec(),this._angle3d=null!==(e=null===(t=this._spec)||void 0===t?void 0:t.angle3d)&&void 0!==e?e:-Math.PI/3}initMarkStyle(){super.initMarkStyle();const t=this._pieMark;t&&this.setMarkStyle(t,{beta:()=>this._angle3d},"normal",e.AttributeLevel.Series)}initLabelMarkStyle(t,i={}){t&&(super.initLabelMarkStyle(t),this.setMarkStyle(t,{support3d:!0},void 0,e.AttributeLevel.Mark))}}Hu.type=K.pie3d,Hu.mark=Gu,Hu.builtInTheme={pie3d:{outerRadius:.6,pie3d:{style:{height:10,fillOpacity:1}},label:{visible:!1,interactive:!0,position:"outside"}}},Hu.transformerConstructor=Vu;const Xu=()=>{e.Factory.registerAnimation("pie3d",((t,i)=>({appear:e.piePresetAnimation(t,i),enter:e.pieEnter(t),exit:e.pieExit(t),disappear:e.pieDisappear(t)}))),e.registerArcAnimation(),Au(),su(),e.Factory.registerGraphicComponent("arc3d",so),e.Factory.registerMark("arc3d",zu),e.Factory.registerSeries(Hu.type,Hu)};class Yu extends e.BasePieChart{constructor(){super(...arguments),this.transformerConstructor=Wu,this.type="pie3d",this.seriesType=K.pie3d}}Yu.type="pie3d",Yu.seriesType=K.pie3d,Yu.transformerConstructor=Wu;class Ku{constructor(){}static linear(t){return t}static none(){return this.linear}static get(t){return t<-1?t=-1:t>1&&(t=1),function(e){return 0===t?e:t<0?e*(e*-t+1+t):e*((2-e)*t+(1-t))}}static getPowIn(t){return function(e){return Math.pow(e,t)}}static getPowOut(t){return function(e){return 1-Math.pow(1-e,t)}}static getPowInOut(t){return function(e){return(e*=2)<1?.5*Math.pow(e,t):1-.5*Math.abs(Math.pow(2-e,t))}}static getBackIn(t){return function(e){return e*e*((t+1)*e-t)}}static getBackOut(t){return function(e){return--e*e*((t+1)*e+t)+1}}static getBackInOut(t){return t*=1.525,function(e){return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}static sineIn(t){return 1-Math.cos(t*Math.PI/2)}static sineOut(t){return Math.sin(t*Math.PI/2)}static sineInOut(t){return-(Math.cos(Math.PI*t)-1)/2}static expoIn(t){return 0===t?0:Math.pow(2,10*t-10)}static expoOut(t){return 1===t?1:1-Math.pow(2,-10*t)}static expoInOut(t){return 0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2}static circIn(t){return-(Math.sqrt(1-t*t)-1)}static circOut(t){return Math.sqrt(1- --t*t)}static circInOut(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}static bounceOut(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}static bounceIn(t){return 1-Ku.bounceOut(1-t)}static bounceInOut(t){return t<.5?.5*Ku.bounceIn(2*t):.5*Ku.bounceOut(2*t-1)+.5}static getElasticIn(t,e){return function(s){if(0===s||1===s)return s;const n=e/i.pi2*Math.asin(1/t);return-t*Math.pow(2,10*(s-=1))*Math.sin((s-n)*i.pi2/e)}}static getElasticOut(t,e){return function(s){if(0===s||1===s)return s;const n=e/i.pi2*Math.asin(1/t);return t*Math.pow(2,-10*s)*Math.sin((s-n)*i.pi2/e)+1}}static getElasticInOut(t,e){return function(s){const n=e/i.pi2*Math.asin(1/t);return(s*=2)<1?t*Math.pow(2,10*(s-=1))*Math.sin((s-n)*i.pi2/e)*-.5:t*Math.pow(2,-10*(s-=1))*Math.sin((s-n)*i.pi2/e)*.5+1}}static registerFunc(t,e){Ku[t]=e}}function $u(t,e){const i=1/e;let s=1;for(;t>i;)t-=i,s*=-1;const n=s*t/i;return n>0?n:1+n}Ku.quadIn=Ku.getPowIn(2),Ku.quadOut=Ku.getPowOut(2),Ku.quadInOut=Ku.getPowInOut(2),Ku.cubicIn=Ku.getPowIn(3),Ku.cubicOut=Ku.getPowOut(3),Ku.cubicInOut=Ku.getPowInOut(3),Ku.quartIn=Ku.getPowIn(4),Ku.quartOut=Ku.getPowOut(4),Ku.quartInOut=Ku.getPowInOut(4),Ku.quintIn=Ku.getPowIn(5),Ku.quintOut=Ku.getPowOut(5),Ku.quintInOut=Ku.getPowInOut(5),Ku.backIn=Ku.getBackIn(1.7),Ku.backOut=Ku.getBackOut(1.7),Ku.backInOut=Ku.getBackInOut(1.7),Ku.elasticIn=Ku.getElasticIn(1,.3),Ku.elasticOut=Ku.getElasticOut(1,.3),Ku.elasticInOut=Ku.getElasticInOut(1,.3*1.5),Ku.easeInOutQuad=t=>(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2),Ku.easeOutElastic=t=>{const e=2*Math.PI/3;return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin((10*t-.75)*e)+1},Ku.easeInOutElastic=t=>{const e=2*Math.PI/4.5;return 0===t?0:1===t?1:t<.5?-Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*e)/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*e)/2+1};for(let t=0;t<10;t++)Ku[`flicker${t}`]=e=>$u(e,t);for(let t=2;t<10;t++)Ku[`aIn${t}`]=e=>t*e*e+(1-t)*e;function qu(t,e,i){return t+(e-t)*i}const Zu=new class{constructor(){this.opacity=(t,e,i,s,n,r)=>{r.attribute.opacity=qu(e,i,s)},this.baseOpacity=(t,e,i,s,n,r)=>{r.attribute.baseOpacity=qu(e,i,s)},this.fillOpacity=(t,e,i,s,n,r)=>{r.attribute.fillOpacity=qu(e,i,s)},this.strokeOpacity=(t,e,i,s,n,r)=>{r.attribute.strokeOpacity=qu(e,i,s)},this.zIndex=(t,e,i,s,n,r)=>{r.attribute.zIndex=qu(e,i,s)},this.backgroundOpacity=(t,e,i,s,n,r)=>{r.attribute.backgroundOpacity=qu(e,i,s)},this.shadowOffsetX=(t,e,i,s,n,r)=>{r.attribute.shadowOffsetX=qu(e,i,s)},this.shadowOffsetY=(t,e,i,s,n,r)=>{r.attribute.shadowOffsetY=qu(e,i,s)},this.shadowBlur=(t,e,i,s,n,r)=>{r.attribute.shadowBlur=qu(e,i,s)},this.fill=(t,e,i,s,n,r)=>{r.attribute.fill=Or(e,i,s,!1)},this.fillPure=(t,e,i,s,n,r)=>{r.attribute.fill=n.fromParsedProps.fill?Lr(n.fromParsedProps.fill,n.toParsedProps.fill,s):n.toParsedProps.fill},this.stroke=(t,e,i,s,n,r)=>{r.attribute.stroke=Or(e,i,s,!1)},this.strokePure=(t,e,i,s,n,r)=>{r.attribute.stroke=n.fromParsedProps.stroke?Lr(n.fromParsedProps.stroke,n.toParsedProps.stroke,s):n.toParsedProps.stroke},this.width=(t,e,i,s,n,r)=>{r.attribute.width=qu(e,i,s),r.addUpdateBoundTag()},this.height=(t,e,i,s,n,r)=>{r.attribute.height=qu(e,i,s),r.addUpdateBoundTag()},this.x=(t,e,i,s,n,r)=>{r.attribute.x=qu(e,i,s),r.addUpdateBoundTag(),r.addUpdatePositionTag()},this.y=(t,e,i,s,n,r)=>{r.attribute.y=qu(e,i,s),r.addUpdateBoundTag(),r.addUpdatePositionTag()},this.angle=(t,e,i,s,n,r)=>{r.attribute.angle=qu(e,i,s),r.addUpdateBoundTag(),r.addUpdatePositionTag()},this.scaleX=(t,e,i,s,n,r)=>{r.attribute.scaleX=qu(e,i,s),r.addUpdateBoundTag(),r.addUpdatePositionTag()},this.scaleY=(t,e,i,s,n,r)=>{r.attribute.scaleY=qu(e,i,s),r.addUpdateBoundTag(),r.addUpdatePositionTag()},this.lineWidth=(t,e,i,s,n,r)=>{r.attribute.lineWidth=qu(e,i,s),r.addUpdateBoundTag()},this.startAngle=(t,e,i,s,n,r)=>{r.attribute.startAngle=qu(e,i,s),r.addUpdateBoundTag()},this.endAngle=(t,e,i,s,n,r)=>{r.attribute.endAngle=qu(e,i,s),r.addUpdateBoundTag()},this.radius=(t,e,i,s,n,r)=>{r.attribute.radius=qu(e,i,s),r.addUpdateBoundTag()},this.outerRadius=(t,e,i,s,n,r)=>{r.attribute.outerRadius=qu(e,i,s),r.addUpdateBoundTag()},this.innerRadius=(t,e,i,s,n,r)=>{r.attribute.innerRadius=qu(e,i,s),r.addUpdateBoundTag()},this.size=(t,e,i,s,n,r)=>{r.attribute.size=qu(e,i,s),r.addUpdateBoundTag()},this.points=(t,e,i,s,n,r)=>{r.attribute.points=Cs(e,i,s),r.addUpdateBoundTag()}}};function Ju(t,e,i,s,n,r){if(Number.isFinite(i)&&Number.isFinite(e))return r.attribute[t]=e+(i-e)*s,!0;if(Array.isArray(i)&&Array.isArray(e)&&i.length===e.length){const n=[];let a=!0;for(let t=0;t<i.length;t++){const r=e[t],o=r+(i[t]-r)*s;if(!Number.isFinite(o)){a=!1;break}n.push(o)}return a&&(r.attribute[t]=n),!0}return!1}function Qu(){}class tp{constructor(t,e,i,s){this._startTime=0,this._hasFirstRun=!1,this._syncAttributeUpdate=()=>{this.target.setAttributes(this.target.attribute)},this.type=t,this.props=e,this.duration=i,this.easing=s?"function"==typeof s?s:Ku[s]:Ku.linear,"wait"===t&&(this.onUpdate=Qu),this.id=Z.GenAutoIncrementId(),this.syncAttributeUpdate=Qu}bind(t,e){this.target=t,this.animate=e,this.onBind(),this.syncAttributeUpdate()}append(t){this.next=t,t.prev=this,t.setStartTime(this.getStartTime()+this.duration,!1)}updateDownstreamStartTimes(){let t=this.next,e=this._startTime+this.duration;for(;t;)t.setStartTime(e,!1),e+=t.duration,t=t.next;this.animate.updateDuration()}getLastProps(){return this.prev?this.prev.props||{}:this.animate.getStartProps()}setDuration(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.duration=t,e&&this.updateDownstreamStartTimes()}getDuration(){return this.duration}determineInterpolateUpdateFunction(){if(!this.props)return;const t=[];this.propKeys.forEach((e=>{if("fill"===e||"stroke"===e){const s=this.fromProps[e],n=this.props[e];if(i.isString(s)&&i.isString(n)){const i=Pr.Get(s,Mr.Color255),r=Pr.Get(n,Mr.Color255);this.fromParsedProps||(this.fromParsedProps={}),this.toParsedProps||(this.toParsedProps={}),this.fromParsedProps[e]=i,this.toParsedProps[e]=r,t.push(Zu["fill"===e?"fillPure":"strokePure"])}else Zu[e]?t.push(Zu[e]):t.push(Ju)}else Zu[e]?t.push(Zu[e]):t.push(Ju)})),this.interpolateUpdateFunctions=t}setStartTime(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._startTime=t,e&&this.updateDownstreamStartTimes()}getStartTime(){return this._startTime}onBind(){"glyph"===this.target.type&&(this.syncAttributeUpdate=this._syncAttributeUpdate)}onFirstRun(){}onStart(){if(!this._hasFirstRun){this._hasFirstRun=!0,this.fromProps=this.getLastProps();const t=this.animate.getStartProps();this.propKeys&&this.propKeys.forEach((e=>{var i;this.fromProps[e]=null!==(i=this.fromProps[e])&&void 0!==i?i:t[e]})),this.determineInterpolateUpdateFunction(),this.tryPreventConflict(),this.trySyncStartProps(),this.onFirstRun()}}tryPreventConflict(){const t=this.animate;this.target.animates.forEach((e=>{if(e===t||e.priority>t.priority||e.priority===1/0)return;const i=e.getStartProps();this.propKeys.forEach((t=>{null!=i[t]&&e.preventAttr(t)}))}))}deleteSelfAttr(t){var e;delete this.props[t],this.fromProps&&delete this.fromProps[t];const i=this.propKeys.indexOf(t);-1!==i&&(this.propKeys.splice(i,1),null===(e=this.interpolateUpdateFunctions)||void 0===e||e.splice(i,1))}trySyncStartProps(){this.propKeys.forEach((t=>{this.fromProps[t]=this.animate.target.getComputedAttribute(t)}))}update(t,e,i){if(this.onStart(),!this.props||!this.propKeys)return;const s=this.easing(e);this.animate.interpolateUpdateFunction?this.animate.interpolateUpdateFunction(this.fromProps,this.props,s,this,this.target):this.interpolateUpdateFunctions.forEach(((t,e)=>{if(!this.animate.validAttr(this.propKeys[e]))return;const i=this.propKeys[e];t(i,this.fromProps[i],this.props[i],s,this,this.target)})),this.onUpdate(t,s,i),this.syncAttributeUpdate()}onUpdate(t,e,i){}onEnd(t){this.target.setAttributes(this.props),t?this._endCb=t:this._endCb&&this._endCb(this.animate,this)}getEndProps(){return this.props}getFromProps(){return this.fromProps}getMergedEndProps(){return this.getEndProps()}stop(){}}class ep extends tp{constructor(t,e,i,s){super(t,e,i,s)}onStart(){super.onStart()}onFirstRun(){const t=this.getFromProps();this.target.setAttributes(t)}update(t,e,i){this.onStart()}determineInterpolateUpdateFunction(){}}class ip extends i.EventEmitter{get animateCount(){return this._animateCount}constructor(){super(),this.head=null,this.tail=null,this.animateMap=new Map,this._animateCount=0,this._playSpeed=1,this._totalDuration=0,this._startTime=0,this._currentTime=0,this.id=Z.GenAutoIncrementId(),this.paused=!1}isRunning(){return!this.paused&&this._animateCount>0}forEachAccessAnimate(t){let e=this.head,i=0;for(;e;){const s=e.next;t(e.animate,i),i++,e=s}}addAnimate(t){const e={animate:t,next:null,prev:null};this.head?this.tail&&(this.tail.next=e,e.prev=this.tail,this.tail=e):(this.head=e,this.tail=e),this.animateMap.set(t,e),this._animateCount++,this._totalDuration=Math.max(this._totalDuration,t.getStartTime()+t.getDuration())}pause(){this.paused=!0}resume(){this.paused=!1}tick(t){if(this.paused)return;const e=t*this._playSpeed;this._currentTime+=e,this.forEachAccessAnimate(((t,i)=>{t.status===It.END?this.removeAnimate(t,!0):t.status!==It.RUNNING&&t.status!==It.INITIAL||t.advance(e)})),0===this._animateCount&&this.emit("animationEnd")}clear(){this.forEachAccessAnimate((t=>{t.release()})),this.head=null,this.tail=null,this.animateMap.clear(),this._animateCount=0,this._totalDuration=0}removeAnimate(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.animateMap.get(t);i&&(e&&(t._onRemove&&t._onRemove.forEach((t=>t())),t.release()),i.prev?i.prev.next=i.next:this.head=i.next,i.next?i.next.prev=i.prev:this.tail=i.prev,this.animateMap.delete(t),this._animateCount--,t.getStartTime()+t.getDuration()>=this._totalDuration&&this.recalculateTotalDuration())}recalculateTotalDuration(){this._totalDuration=0,this.forEachAccessAnimate((t=>{this._totalDuration=Math.max(this._totalDuration,t.getStartTime()+t.getDuration())}))}getTotalDuration(){return this._totalDuration}getPlaySpeed(){return this._playSpeed}setPlaySpeed(t){this._playSpeed=t}getPlayState(){return this.paused?"paused":0===this.animateCount?"stopped":"playing"}setStartTime(t){this._startTime=t}getStartTime(){return this._startTime}getCurrentTime(){return this._currentTime}setCurrentTime(t){this._currentTime=t}}const sp=new ip;sp.isGlobal=!0;class np{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z.GenAutoIncrementId(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sp,i=arguments.length>2?arguments[2]:void 0;this.id=t,this.status=It.INITIAL,this._timeline=e,e.addAnimate(this),this.slience=i,this._startTime=0,this._duration=0,this._totalDuration=0,this._loopCount=0,this._currentLoop=0,this._bounce=!1,this._firstStep=null,this._lastStep=null,this._startProps={},this._endProps={},this._preventAttrs=new Set,this.currentTime=0,this.interpolateUpdateFunction=null,this.priority=0}getStartProps(){return this._startProps}getEndProps(){return this._endProps}setTimeline(t){this._timeline=t}getTimeline(){return this._timeline}get timeline(){return this._timeline}bind(t){return this.target=t,this.target.onAnimateBind&&!this.slience&&this.target.onAnimateBind(this),this.target.animationAttribute||(this.target.animationAttribute={}),this}to(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"linear";const s=new tp(Lt.to,t,e,i);return s.bind(this.target,this),this.updateStepAfterAppend(s),this}wait(t){const e=new ep(Lt.wait,{},t,"linear");return e.bind(this.target,this),this.updateStepAfterAppend(e),this}updateStepAfterAppend(t){this._firstStep?(this._lastStep.append(t),this._lastStep=t):(this._firstStep=t,this._lastStep=t),this.parseStepProps(t),this.updateDuration()}parseStepProps(t){this._lastStep&&(t.propKeys=t.propKeys||Object.keys(t.props),Object.keys(this._endProps).forEach((e=>{var i;t.props[e]=null!==(i=t.props[e])&&void 0!==i?i:this._endProps[e]})),t.propKeys.forEach((e=>{this._endProps[e]=t.props[e]})))}reSyncProps(){if(!this._lastStep)return;this._endProps={};let t=this._firstStep;for(;t;)Object.keys(this._endProps).forEach((e=>{var i;t.props[e]=null!==(i=t.props[e])&&void 0!==i?i:this._endProps[e]})),t.propKeys.forEach((e=>{this._endProps[e]=t.props[e]})),t=t.next}from(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"linear";const s=new tp(Lt.from,t,e,i);return this._firstStep?(this._lastStep.append(s),this._lastStep=s):(this._firstStep=s,this._lastStep=s),this.updateDuration(),this}play(t){return t.bind(this.target,this),this.updateStepAfterAppend(t),this}pause(){this.status===It.RUNNING&&(this.status=It.PAUSED)}resume(){this.status===It.PAUSED&&(this.status=It.RUNNING)}onStart(t){var e;t?(this._onStart||(this._onStart=[]),this._onStart.push(t)):(null===(e=this._onStart)||void 0===e||e.forEach((t=>t())),Object.keys(this._endProps).forEach((t=>{this._startProps[t]=this.target.getComputedAttribute(t)})))}onEnd(t){var e;t?(this._onEnd||(this._onEnd=[]),this._onEnd.push(t)):null===(e=this._onEnd)||void 0===e||e.forEach((t=>t()))}onFrame(t){t&&(this._onFrame||(this._onFrame=[]),this._onFrame.push(t))}onRemove(t){var e;t?(this._onRemove||(this._onRemove=[]),this._onRemove.push(t)):null===(e=this._onRemove)||void 0===e||e.forEach((t=>t()))}preventAttr(t){this._preventAttrs.add(t),delete this._startProps[t],delete this._endProps[t];let e=this._firstStep;for(;e;)e.deleteSelfAttr(t),e=e.next}preventAttrs(t){t.forEach((t=>this._preventAttrs.add(t)))}validAttr(t){return!this._preventAttrs.has(t)}runCb(t){var e;return null===(e=this._lastStep)||void 0===e||e.onEnd(t),this}startAt(t){return this._startTime=t,this}customInterpolate(t,e,i,s,n,r){return!1}getFromValue(){return this._startProps}getToValue(){return this._endProps}stop(t){let e=this._firstStep;for(;e;)e.stop(),e=e.next;this.status!==It.END&&this.onEnd(),this.status=It.END,this.target&&("start"===t?this.target.setAttributes(this._startProps):"end"===t?this.target.setAttributes(this._endProps):t&&this.target.setAttributes(t))}release(){this.status=It.END,this._onRemove&&this._onRemove.forEach((t=>t())),this._onStart=[],this._onFrame=[],this._onEnd=[],this._onRemove=[]}getDuration(){return this._duration}getStartTime(){return this._startTime}afterAll(t){if(!t||0===t.length)return this;let e=0;return t.forEach((t=>{const i=t.getStartTime()+t.getTotalDuration();e=Math.max(e,i)})),this.startAt(e)}after(t){if(!t)return this;const e=t.getStartTime()+t.getTotalDuration();return this.startAt(e)}parallel(t){return t?(this.startAt(t.getStartTime()),this):this}loop(t){return!0===t?t=1/0:!1===t&&(t=0),this._loopCount=t,this.updateDuration(),this}bounce(t){return this._bounce=t,this}advance(t){var e,i,s;if(this.status===It.END)return void console.warn("aaa 动画已经结束,不能推进");const n=this.currentTime+t;if(n<this._startTime)return void(this.currentTime=n);if(n>=this._startTime+this._totalDuration)return null===(e=this._lastStep)||void 0===e||e.onUpdate(!0,1,{}),null===(i=this._lastStep)||void 0===i||i.onEnd(),this.onEnd(),void(this.status=It.END);this.status=It.RUNNING,this.currentTime<=this._startTime&&this.onStart(),this.currentTime=n;let r=n-this._startTime,a=!1,o=!1;if(this._loopCount>0){r=(n-this._startTime)%this._duration;const t=Math.floor((n-this._startTime)/this._duration);a=t>this._currentLoop,this._currentLoop=t,o=this._bounce&&t%2==1,o&&(r=this._duration-r)}a&&!o&&this.target.setAttributes(this._startProps);let l=null;if(this._lastStep===this._firstStep)l=this._firstStep;else{let t=this._firstStep;for(;t;){const e=t.getStartTime(),i=t.getDuration();if(r>=e&&r<=e+i){l=t;break}t=t.next}}if(!l)return;l!==this.lastRunStep&&(null===(s=this.lastRunStep)||void 0===s||s.onEnd()),this.lastRunStep=l;const h=(r-l.getStartTime())/l.getDuration(),c=h>=1;l.update(c,h,{}),c&&(l.onEnd(),this.lastRunStep=null)}updateDuration(){this._lastStep?(this._duration=this._lastStep.getStartTime()+this._lastStep.getDuration(),this._totalDuration=this._duration*(this._loopCount+1)):this._duration=0}getTotalDuration(){return this._totalDuration}getLoop(){return this._loopCount}}const rp=new class{constructor(){this.nextAnimationFrameCbs=[],this._rafHandle=null,this.runAnimationFrame=t=>{this._rafHandle=null;const e=this.nextAnimationFrameCbs;this.nextAnimationFrameCbs=[];for(let i=0;i<e.length;i++)e[i]&&e[i](t)},this.tryRunAnimationFrameNextFrame=()=>{null===this._rafHandle&&0!==this.nextAnimationFrameCbs.length&&(this._rafHandle=kt.global.getRequestAnimationFrame()(this.runAnimationFrame))}}addAnimationFrameCb(t){return this.nextAnimationFrameCbs.push(t),this.tryRunAnimationFrameNextFrame(),this.nextAnimationFrameCbs.length-1}removeAnimationFrameCb(t){return t>=0&&t<this.nextAnimationFrameCbs.length&&(this.nextAnimationFrameCbs[t]=null,!0)}};class ap{constructor(){this.released=!1}tick(t,e){rp.addAnimationFrameCb((()=>{if(!this.released)return e(this)}))}release(){this.released=!0}getTime(){return Date.now()}}class op extends i.EventEmitter{constructor(t){super(),this.timelines=[],this.frameTimeHistory=[],this.handleTick=(t,e)=>{const{once:i=!1}=null!=e?e:{};if(this.ifCanStop())return this.stop(),!1;const s=t.getTime();this._lastTickTime=s,this.lastFrameTime<0&&(this.lastFrameTime=s-this.interval+this.timeOffset,this.frameTimeHistory.push(this.lastFrameTime));const n=s-this.lastFrameTime,r=this.checkSkip(n);return r||(this._handlerTick(n),this.lastFrameTime=s,this.frameTimeHistory.push(this.lastFrameTime)),i||t.tick(this.interval,this.handleTick),!r},this._handlerTick=t=>{this.status===Rt.RUNNING&&(this.tickCounts++,this.timelines.forEach((e=>{e.tick(t)})),this.emit("tick",t))},this.init(),this.lastFrameTime=-1,this.tickCounts=0,this.stage=t,this.autoStop=!0,this.interval=16,this.computeTimeOffsetAndJitter()}bindStage(t){this.stage=t}computeTimeOffsetAndJitter(){this.timeOffset=Math.floor(Math.random()*this.interval),this._jitter=Math.min(Math.max(.2*this.interval,6),.7*this.interval)}init(){this.interval=16,this.status=Rt.INITIAL,kt.global.hooks.onSetEnv.tap("graph-ticker",(()=>{this.initHandler()})),kt.global.env&&this.initHandler()}addTimeline(t){this.timelines.push(t)}remTimeline(t){this.timelines=this.timelines.filter((e=>e!==t))}getTimelines(){return this.timelines}initHandler(){this.setupTickHandler()}setupTickHandler(){const t=new ap;return this.tickerHandler&&this.tickerHandler.release(),this.tickerHandler=t,!0}setInterval(t){this.interval=t,this.computeTimeOffsetAndJitter()}getInterval(){return this.interval}setFPS(t){this.setInterval(Math.floor(1e3/t))}getFPS(){return 1e3/this.interval}tick(t){this.tickerHandler.tick(t,(t=>this.handleTick(t,{once:!0})))}tickTo(t){this.tickerHandler.tickTo&&this.tickerHandler.tickTo(t,(t=>{this.handleTick(t,{once:!0})}))}pause(){return this.status!==Rt.INITIAL&&(this.status=Rt.PAUSE,!0)}resume(){return this.status!==Rt.INITIAL&&(this.status=Rt.RUNNING,!0)}ifCanStop(){if(this.autoStop){if(!this.timelines.length)return!0;if(this.timelines.every((t=>!t.isRunning())))return!0}return!1}start(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.status===Rt.RUNNING)return!1;if(!this.tickerHandler)return!1;if(!t){if(this.status===Rt.PAUSE)return!1;if(this.ifCanStop())return!1}return this.status=Rt.RUNNING,this.tickerHandler.tick(0,this.handleTick),!0}stop(){this.status=Rt.INITIAL,this.setupTickHandler(),this.lastFrameTime=-1}trySyncTickStatus(){this.status===Rt.INITIAL&&this.timelines.some((t=>t.isRunning()))?this.start():this.status===Rt.RUNNING&&this.timelines.every((t=>!t.isRunning()))&&this.stop()}release(){var t;this.stop(),this.timelines=[],null===(t=this.tickerHandler)||void 0===t||t.release(),this.tickerHandler=null,this.lastFrameTime=-1}checkSkip(t){return"performance"!==this.stage.params.optimize.tickRenderMode&&t<this.interval+2*(Math.random()-.5)*this._jitter}}class lp{constructor(){this.transitions=new Map,this.registerDefaultTransitions()}static getInstance(){return lp.instance||(lp.instance=new lp),lp.instance}registerDefaultTransitions(){this.registerTransition("appear","*",(()=>({allowTransition:!0,stopOriginalTransition:!1}))),this.registerTransition("appear","appear",(()=>({allowTransition:!1,stopOriginalTransition:!1}))),this.registerTransition("appear","disappear",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("appear","exit",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("normal","*",(()=>({allowTransition:!0,stopOriginalTransition:!1}))),this.registerTransition("normal","normal",(()=>({allowTransition:!1,stopOriginalTransition:!1}))),this.registerTransition("normal","disappear",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("normal","exit",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("exit","*",(()=>({allowTransition:!1,stopOriginalTransition:!1}))),this.registerTransition("exit","disappear",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("exit","enter",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("exit","exit",(()=>({allowTransition:!1,stopOriginalTransition:!1}))),this.registerTransition("enter","*",(()=>({allowTransition:!0,stopOriginalTransition:!1}))),this.registerTransition("enter","enter",(()=>({allowTransition:!1,stopOriginalTransition:!1}))),this.registerTransition("enter","disappear",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("enter","exit",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("disappear","*",(()=>({allowTransition:!1,stopOriginalTransition:!1}))),this.registerTransition("disappear","appear",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("update","*",(()=>({allowTransition:!0,stopOriginalTransition:!1}))),this.registerTransition("update","disappear",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("update","exit",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("state","*",(()=>({allowTransition:!0,stopOriginalTransition:!1}))),this.registerTransition("state","disappear",(()=>({allowTransition:!0,stopOriginalTransition:!0}))),this.registerTransition("state","exit",(()=>({allowTransition:!0,stopOriginalTransition:!0})))}isTransitionAllowed(t,e,i){var s,n,r,a;let o=null===(s=this.transitions.get(t))||void 0===s?void 0:s.get(e);return o?o(i,t):(o=null===(n=this.transitions.get(t))||void 0===n?void 0:n.get("*"),o?o(i,t):(o=null===(r=this.transitions.get("*"))||void 0===r?void 0:r.get(e),o?o(i,t):(o=null===(a=this.transitions.get("*"))||void 0===a?void 0:a.get("*"),o?o(i,t):{allowTransition:!0,stopOriginalTransition:!0})))}registerTransition(t,e,i){let s=this.transitions.get(t);s||(s=new Map,this.transitions.set(t,s)),s.set(e,i)}}lp.getInstance();class hp{static registerBuiltInAnimate(t,e){hp.builtInAnimateMap[t]=e}constructor(t){this._animates=[],this._startCallbacks=[],this._endCallbacks=[],this._started=!1,this._activeCount=0,this._target=t}onStart(t){t?(this._startCallbacks.push(t),this._started&&this._activeCount>0&&t()):this._startCallbacks.forEach((t=>{t()}))}onEnd(t){t?this._endCallbacks.push(t):this._endCallbacks.forEach((t=>{t()}))}_trackAnimation(t){this._animates.push(t),this._activeCount++,1!==this._activeCount||this._started||(this._started=!0,this.onStart()),t.onEnd((()=>{this._activeCount--;const e=this._animates.indexOf(t);e>=0&&this._animates.splice(e,1),0===this._activeCount&&this._started&&(this._started=!1,this.onEnd())}))}parseParams(t,e,s){var n,r;const a=this.resolveValue(t.totalTime,void 0,void 0),o=this.resolveValue(t.startTime,void 0,0),l=Object.assign({},t);l.oneByOneDelay=0,l.startTime=o,l.totalTime=a;const h=this.resolveValue(t.oneByOne,s,!1);if(e){const t=l.timeSlices;i.isArray(t)||(l.timeSlices=[t]);let e=0;l.timeSlices=l.timeSlices.map((t=>{const i=this.resolveValue(t.delay,s,0),n=this.resolveValue(t.delayAfter,s,0),r=this.resolveValue(t.duration,s,300);return e+=i+r+n,Object.assign(Object.assign({},t),{delay:i,delayAfter:n,duration:r})}));let n=0;h&&(n="number"==typeof h?h:h?e:0),l.oneByOneDelay=n;let r=1;if(a){const t=e+n*(this._target.count-2);r=a?a/t:1}l.timeSlices=l.timeSlices.map((t=>{let e=t.effects;return Array.isArray(e)||(e=[e]),Object.assign(Object.assign({},t),{delay:t.delay*r,delayAfter:t.delayAfter*r,duration:t.duration*r,effects:e.map((t=>{var e,s;const n=null!==(e=t.custom)&&void 0!==e?e:hp.builtInAnimateMap[null!==(s=t.type)&&void 0!==s?s:"fromTo"],r=n&&i.isFunction(n)?/^class\s/.test(Function.prototype.toString.call(n))?1:2:0;return Object.assign(Object.assign({},t),{custom:n,customType:r})}))})})),l.oneByOneDelay=n*r,l.startTime=o*r}else{const e=this.resolveValue(t.delay,s,0),c=this.resolveValue(t.delayAfter,s,0),d=this.resolveValue(t.duration,s,300);let u=0;h&&(u="number"==typeof h?h:h?e+c+d:0),l.oneByOneDelay=u,l.custom=null!==(n=t.custom)&&void 0!==n?n:hp.builtInAnimateMap[null!==(r=t.type)&&void 0!==r?r:"fromTo"];const p=l.custom&&i.isFunction(l.custom)?/^class\s/.test(Function.prototype.toString.call(l.custom))?1:2:0;if(l.customType=p,a){const t=e+c+d+u*(this._target.count-2),i=a?a/t:1;l.delay=e*i,l.delayAfter=c*i,l.duration=d*i,l.oneByOneDelay=u*i,l.startTime=o}}return l}execute(t){Array.isArray(t)?t.forEach((t=>this._execute(t))):this._execute(t)}_execute(t){if(t.selfOnly)return this._executeItem(t,this._target,0,1);const e="timeSlices"in t;let i;e&&t.partitioner&&(i=(null!=i?i:this._target.getChildren()).filter((e=>{var i,s;return t.partitioner(null===(s=null===(i=e.context)||void 0===i?void 0:i.data)||void 0===s?void 0:s[0],e,{})}))),e&&t.sort&&(i=null!=i?i:this._target.getChildren(),i.sort(((e,i)=>{var s,n,r,a;return t.sort(null===(n=null===(s=e.context)||void 0===s?void 0:s.data)||void 0===n?void 0:n[0],null===(a=null===(r=i.context)||void 0===r?void 0:r.data)||void 0===a?void 0:a[0],e,i,{})})));const s=e?(i,s,n)=>{const r=this.parseParams(t,e,i),a=this.executeTimelineItem(r,i,s,n);a&&this._trackAnimation(a)}:(i,s,n)=>{const r=this.parseParams(t,e,i),a=this.executeTypeConfigItem(r,i,s,n);a&&this._trackAnimation(a)};i?i.forEach(((t,e)=>s(t,e,i.length))):this._target.count<=1?s(this._target,0,1):this._target.forEachChildren(((t,e)=>s(t,e,this._target.count-1)))}executeTypeConfigItem(t,e,s,n){var r,a,o,l,h,c,d,u;const{type:p="fromTo",channel:g,customParameters:f,easing:m="linear",delay:y=0,delayAfter:b=0,duration:v=300,startTime:x=0,oneByOneDelay:A=0,loop:_,bounce:S,priority:T=0,options:B,custom:w,customType:C,controlOptions:M}=t,P=e.animate();P.priority=T;const k=i.isFunction(y)?y(null===(a=null===(r=e.context)||void 0===r?void 0:r.data)||void 0===a?void 0:a[0],e,{}):y,O=null===(l=null===(o=e.context)||void 0===o?void 0:o.data)||void 0===l?void 0:l[0],R=null===(h=e.context)||void 0===h?void 0:h.indexKey;O&&R&&(s=null!==(c=O[R])&&void 0!==c?c:s),P.startAt(x);const L=s*A+k;L>0&&P.wait(L);let I=null,E=t.to,D=t.from;E||(I||(I=this.createPropsFromChannel(g,e)),E=I.props),D||(I||(I=this.createPropsFromChannel(g,e)),D=I.from),this._handleRunAnimate(P,w,C,D,E,v,m,f,M,B,p,e);let j=0;A&&(j=A*(n-s-1));const U=i.isFunction(b)?b(null===(u=null===(d=e.context)||void 0===d?void 0:d.data)||void 0===u?void 0:u[0],e,{}):b;return U>0&&(j+=U),j>0&&P.wait(j),_&&_>0&&P.loop(_),S&&P.bounce(!0),P}_handleRunAnimate(t,e,s,n,r,a,o,l,h,c,d,u){var p,g,f,m;if(e&&s){const d=this.resolveValue(l,u,{}),y=i.isFunction(c)?c.call(null,null!==(g=d&&(null===(p=d.data)||void 0===p?void 0:p[0]))&&void 0!==g?g:null===(m=null===(f=u.context)||void 0===f?void 0:f.data)||void 0===m?void 0:m[0],u,d):c;d.options=y,d.controlOptions=h,1===s?this.createCustomAnimation(t,e,n,r,a,o,d):2===s&&this.createCustomInterpolatorAnimation(t,e,r,a,o,d)}else"to"===d?t.to(r,a,o):"from"===d&&t.from(r,a,o)}executeTimelineItem(t,e,i,s){var n,r,a,o;const{timeSlices:l,startTime:h=0,loop:c,bounce:d,oneByOneDelay:u,priority:p,controlOptions:g}=t,f=null===(r=null===(n=e.context)||void 0===n?void 0:n.data)||void 0===r?void 0:r[0],m=null===(a=e.context)||void 0===a?void 0:a.indexKey;f&&m&&(i=null!==(o=f[m])&&void 0!==o?o:i);const y=e.animate();return y.priority=p,y.startAt(h),y.wait(i*u),c&&c>0&&y.loop(c),d&&y.bounce(!0),(Array.isArray(l)?l:[l]).forEach((t=>{this.applyTimeSliceToAnimate(t,y,e,g)})),u&&y.wait(u*(s-i-1)),y}applyTimeSliceToAnimate(t,e,s,n){var r,a,o,l;const{effects:h,duration:c=300,delay:d=0,delayAfter:u=0}=t,p=i.isFunction(d)?d(null===(a=null===(r=s.context)||void 0===r?void 0:r.data)||void 0===a?void 0:a[0],s,{}):d,g=i.isFunction(u)?u(null===(l=null===(o=s.context)||void 0===o?void 0:o.data)||void 0===l?void 0:l[0],s,{}):u;p>0&&e.wait(p),(Array.isArray(h)?h:[h]).forEach((t=>{var i;const{type:r="fromTo",channel:a,customParameters:o,easing:l="linear",options:h}=t;let d=null,u=t.to,p=t.from;u||(d||(d=this.createPropsFromChannel(a,s)),u=d.props),p||(d||(d=this.createPropsFromChannel(a,s)),p=d.from);const g=null!==(i=t.custom)&&void 0!==i?i:hp.builtInAnimateMap[r],f=t.customType;this._handleRunAnimate(e,g,f,p,u,c,l,o,n,h,r,s)})),g>0&&e.wait(g)}createCustomInterpolatorAnimation(t,e,i,s,n,r){const a=i;Object.keys(a).forEach((e=>{t.target.getComputedAttribute(e)})),t.interpolateUpdateFunction=(i,s,n,a,o)=>{e(n,i,s,a,o,t.target,r)},t.to(i,s,n)}createCustomAnimation(t,e,i,s,n,r,a){const o=new e(i,s,n,r,a);t.play(o)}createPropsFromChannel(t,e){const i={};let s=null;return t?(Array.isArray(t)?t.forEach((t=>{var s,n;const r=null===(n=null===(s=e.context)||void 0===s?void 0:s.diffAttrs)||void 0===n?void 0:n[t];void 0!==r&&(i[t]=r)})):Object.keys(t).forEach((n=>{var r,a,o,l;const h=t[n];void 0!==h.to&&("function"==typeof h.to?i[n]=h.to(null===(a=null===(r=e.context)||void 0===r?void 0:r.data)||void 0===a?void 0:a[0],e,{}):i[n]=h.to),void 0!==h.from&&(s||(s={}),"function"==typeof h.from?s[n]=h.from(null===(l=null===(o=e.context)||void 0===o?void 0:o.data)||void 0===l?void 0:l[0],e,{}):s[n]=h.from)})),{from:s,props:i}):{from:s,props:i}}resolveValue(t,e,i){var s,n;return void 0===t?i:"function"==typeof t&&e?t(null===(n=null===(s=e.context)||void 0===s?void 0:s.data)||void 0===n?void 0:n[0],e,{}):t}executeItem(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Array.isArray(t)?t.map((t=>this._executeItem(t,e,i,s))).filter(Boolean):[this._executeItem(t,e,i,s)].filter(Boolean)}_executeItem(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;const n="timeSlices"in t;let r=null;const a=this.parseParams(t,n);return r=n?this.executeTimelineItem(a,e,i,s):this.executeTypeConfigItem(a,e,i,s),r&&this._trackAnimation(r),r}stop(t){for(;this._animates.length>0;){const e=this._animates.pop();null==e||e.stop(t)}this._animates=[],this._activeCount=0,this._started&&(this._started=!1,this.onEnd())}}hp.builtInAnimateMap={};const cp="appear",dp="disappear",up="update",pp="highlight",gp="unhighlight";class fp{constructor(t){this.graphic=t}registerState(t){this.states||(this.states=new Map),this.states.set(t.name,t)}clearStates(){var t;null===(t=this.states)||void 0===t||t.clear()}}class mp{constructor(t){this.stateList=null,this.graphic=t}applyState(t,e,s){const n=lp.getInstance(),r=[],a=[];if(this.stateList&&this.stateList.length?t.forEach(((t,s)=>{const o={allowTransition:!0,stopOriginalTransition:!0};this.stateList.forEach((e=>{const i=n.isTransitionAllowed(e.state,t,this.graphic);o.allowTransition=o.allowTransition&&i.allowTransition})),o.allowTransition&&(a.push({state:t,animationConfig:i.isArray(e[s])?e[s].map((t=>t.animation)):e[s].animation,executor:new hp(this.graphic)}),this.stateList.forEach((e=>{n.isTransitionAllowed(e.state,t,this.graphic).stopOriginalTransition&&r.push(e)})))})):t.forEach(((t,s)=>{a.push({state:t,animationConfig:i.isArray(e[s])?e[s].map((t=>t.animation)):e[s].animation,executor:new hp(this.graphic)})})),r.forEach((t=>{t.executor.stop()})),a.length){a[0].executor.execute(a[0].animationConfig);for(let t=0;t<a.length;t++){const e=a[t+1],i=a[t];i.executor.onEnd((()=>{e&&e.executor.execute(e.animationConfig),this.stateList=this.stateList.filter((t=>t!==i)),t===a.length-1&&s&&s(!1)}))}}else s&&s(!0);this.stateList?this.stateList=this.stateList.filter((t=>!r.includes(t))):this.stateList=[],this.stateList.push(...a)}applyAppearState(t,e){this.applyState([cp],[{name:cp,animation:t}],e)}applyDisappearState(t,e){this.applyState([dp],[{name:dp,animation:t}],e)}applyUpdateState(t,e){this.applyState([up],[{name:up,animation:t}],e)}applyHighlightState(t,e){this.applyState([pp],[{name:pp,animation:t}],e)}applyUnhighlightState(t,e){this.applyState([gp],[{name:gp,animation:t}],e)}stopState(t,e){var i;const s=null===(i=this.stateList)||void 0===i?void 0:i.find((e=>e.state===t));s&&s.executor.stop(e)}clearState(){var t;null===(t=this.stateList)||void 0===t||t.forEach((t=>{t.executor.stop()})),this.stateList=null}}class yp{_getAnimationStateManager(t){return t._animationStateManager||(t._animationStateManager=new mp(t)),t._animationStateManager}_getAnimationStateStore(t){return t._animationStateStore||(t._animationStateStore=new fp(t)),t._animationStateStore}registerAnimationState(t){return this._getAnimationStateStore(this).registerState(t),this}applyAnimationState(t,e,i){return this._getAnimationStateManager(this).applyState(t,e,i),this}applyAppearState(t,e){return this._getAnimationStateManager(this).applyAppearState(t,e),this}applyDisappearState(t,e){return this._getAnimationStateManager(this).applyDisappearState(t,e),this}applyUpdateState(t,e){return this._getAnimationStateManager(this).applyUpdateState(t,e),this}applyHighlightState(t,e){return this._getAnimationStateManager(this).applyHighlightState(t,e),this}applyUnhighlightState(t,e){return this._getAnimationStateManager(this).applyUnhighlightState(t,e),this}stopAnimationState(t,e){return this._getAnimationStateManager(this).stopState(t,e),this}clearAnimationStates(){return this._getAnimationStateManager(this).clearState(),this}static extend(t){return(new yp)._getAnimationStateManager(t),t}}class bp{getAttributes(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.finalAttribute?this.finalAttribute:this.attribute}animate(t){var e,i,s;this.animates||(this.animates=new Map);const n=new np(null==t?void 0:t.id,null!==(i=null!==(e=null==t?void 0:t.timeline)&&void 0!==e?e:this.stage&&this.stage.getTimeline())&&void 0!==i?i:sp,null==t?void 0:t.slience);if(n.bind(this),t){const{onStart:e,onEnd:i,onRemove:s}=t;null!=e&&n.onStart(e),null!=i&&n.onEnd(i),null!=s&&n.onRemove(s)}return this.animates.set(n.id,n),n.onRemove((()=>{n.stop(),this.animates.delete(n.id)})),null===(s=this.stage)||void 0===s||s.ticker.start(),n}createTimeline(){return new ip}createTicker(t){return new op(t)}setFinalAttribute(t){this.finalAttribute||(this.finalAttribute={}),Object.assign(this.finalAttribute,t)}initFinalAttribute(t){this.finalAttribute=t}initAnimateExecutor(){this._animateExecutor||(this._animateExecutor=new hp(this))}executeAnimation(t){return this.initAnimateExecutor(),this._animateExecutor.execute(t),this}executeAnimations(t){return this.initAnimateExecutor(),t.forEach((t=>{this._animateExecutor.execute(t)})),this}getFinalAttribute(){return this.finalAttribute}getGraphicAttribute(t){return!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&this.finalAttribute?this.finalAttribute[t]:this.attribute[t]}}function vp(){i.mixin(Hr,yp),i.mixin(Hr,bp)}class xp extends tp{constructor(t,e,i,s,n){super("customAnimate",e,i,s),this.type="customAnimate",this.customFrom=t,this.params=n}update(t,e,i){if(this.onStart(),!this.props||!this.propKeys)return;const s=this.easing(e);this.onUpdate(t,s,i),this.syncAttributeUpdate()}setProps(t){this.props=t,this.propKeys=Object.keys(t),this.animate.reSyncProps()}}class Ap extends xp{onStart(){const{center:t,r:e}="function"==typeof this.params?this.params():this.params,s=this.target.getComputedAttribute("x"),n=this.target.getComputedAttribute("y"),r=this.target.getComputedAttribute("z"),a=Math.acos((n-t.y)/e);let o=Math.acos((s-t.x)/e/Math.sin(a));r-t.z<0&&(o=i.pi2-o),this.theta=o,this.phi=a}onBind(){super.onBind()}onEnd(){}onUpdate(t,e,s){if(null==this.phi||null==this.theta)return;const{center:n,r:r,cb:a}="function"==typeof this.params?this.params():this.params,o=2*Math.PI*e,l=this.theta+o,h=this.phi,c=r*Math.sin(h)*Math.cos(l)+n.x,d=r*Math.cos(h)+n.y,u=r*Math.sin(h)*Math.sin(l)+n.z;for(s.x=c,s.y=d,s.z=u,s.alpha=l+i.pi/2;s.alpha>i.pi2;)s.alpha-=i.pi2;s.alpha=i.pi2-s.alpha,s.zIndex=-1e4*s.z,a&&a(s)}}const _p=t=>({custom:Ap,customParameters:()=>t,easing:"linear",loop:1/0,duration:6e3});class Sp extends e.BaseWordCloudSeries{constructor(){super(...arguments),this.type=K.wordCloud3d}_wordCloudTransformOption(){var t;return Object.assign(Object.assign({},super._wordCloudTransformOption()),{postProjection:null!==(t=this._spec.postProjection)&&void 0!==t?t:"StereographicProjection",depth_3d:this._spec.depth_3d})}_wordCloudShapeTransformOption(){var t;return Object.assign(Object.assign({},super._wordCloudShapeTransformOption()),{postProjection:null!==(t=this._spec.postProjection)&&void 0!==t?t:"StereographicProjection",depth_3d:this._spec.depth_3d})}initMark(){this._wordMark=this._createMark(e.BaseWordCloudSeries.mark.word,{groupKey:this._seriesField,isSeriesMark:!0},{support3d:!0})}initMarkStyle(){super.initMarkStyle();const t=this._wordMark;t&&this.setMarkStyle(t,{z:t=>{var e;return null!==(e=t.z)&&void 0!==e?e:0}},"normal",e.AttributeLevel.Series)}initAnimation(){var t,i;const s=null!==(t=this._padding)&&void 0!==t?t:{};this._wordMark&&this._wordMark.setAnimationConfig(e.animationConfig(null===(i=e.Factory.getAnimationInKey("wordCloud3d"))||void 0===i?void 0:i((()=>{var t;const e=this.getCompiler().getStage(),i=e.width-s.left||0-s.right||0,n=e.height-s.top||0-s.bottom||0,r=Math.max(i,n)/2;return{center:{x:r,y:r,z:null!==(t=this._spec.depth_3d)&&void 0!==t?t:r},r:r}})),e.userAnimationConfig("word",this._spec,this._markAttributeContext)))}}Sp.type=K.wordCloud3d,Sp.builtInTheme={wordCloud3d:{word:{padding:1,style:{textAlign:"center",textBaseline:"alphabetic"}}}};const Tp=()=>{e.registerTextMark(),e.Factory.registerAnimation("wordCloud3d",(t=>({enter:_p(t)}))),e.Factory.registerSeries(Sp.type,Sp)},Bp=()=>{Tp()};class wp extends e.BaseWordCloudChartSpecTransformer{_getDefaultSeriesSpec(t){const e=super._getDefaultSeriesSpec(t);return e.depth_3d=t.depth_3d,e}}class Cp extends e.BaseWordCloudChart{constructor(){super(...arguments),this.transformerConstructor=wp,this.type="wordCloud3d",this.seriesType=K.wordCloud3d}}Cp.type="wordCloud3d",Cp.seriesType=K.wordCloud3d,Cp.transformerConstructor=wp;const Mp=()=>{Ch(),Tp(),e.Factory.registerChart(Cp.type,Cp)},Pp=(t,i)=>{var s;const n=e.getCombinedSizeOfRegions(t.getRegions()),{width:r}=t.getLayoutRect(),a=r,o=t.layout3dBox?t.layout3dBox.length:0,l=t.layout3dBox?t.layout3dBox.width:0,h={x:o,y:0},c=t.getLabelItems(a),d={start:{x:0,y:0},end:h,title:{text:t._spec.title.text||t._dataFieldText,maxWidth:t._getTitleLimit(!1)},items:c,scale:t._scale.clone()};i||(d.grid={type:"line",start:{x:0,y:0},end:h,items:c[0],verticalFactor:t._axisStyle.verticalFactor,depth:l,length:i?0:n.height});const u=null!==(s=t.directionStr)&&void 0!==s?s:"r2l";let p=[0,0],g=-Math.PI/2,f=0;return"l2r"===u&&(f=t.layout3dBox.length,p=[0,0,0],g=Math.PI/2),d.z=f,d.alpha=g,d.anchor3d=p,d},kp={label:{space:0}};class Op extends e.CartesianBandAxis{setLayout3dBox(t){this.layout3dBox=t}_getUpdateAttribute(t){return e.isZAxis(this._orient)?Pp(this,t):super._getUpdateAttribute(t)}}Op.builtInTheme=Object.assign(Object.assign({},e.CartesianBandAxis.builtInTheme),{axisZ:Object.assign(Object.assign({},e.CartesianBandAxis.builtInTheme.axisX),kp)}),i.mixin(Op,e.BandAxisMixin);class Rp extends e.CartesianLinearAxis{setLayout3dBox(t){this.layout3dBox=t}_getUpdateAttribute(t){if(!e.isZAxis(this._orient)){const e=super._getUpdateAttribute(t);return t||(e.grid.depth=this.layout3dBox?this.layout3dBox.length:0),e}return Pp(this,t)}}Rp.builtInTheme=Object.assign(Object.assign({},e.CartesianLinearAxis.builtInTheme),{axisZ:Object.assign(Object.assign({},e.CartesianLinearAxis.builtInTheme.axisX),kp)}),i.mixin(Rp,e.LinearAxisMixin);class Lp extends e.CartesianLogAxis{setLayout3dBox(t){this.layout3dBox=t}_getUpdateAttribute(t){return e.isZAxis(this._orient)?Pp(this,t):super._getUpdateAttribute(t)}}Lp.builtInTheme=Object.assign(Object.assign({},e.CartesianLogAxis.builtInTheme),{axisZ:Object.assign(Object.assign({},e.CartesianLogAxis.builtInTheme.axisX),kp)}),i.mixin(Lp,e.LinearAxisMixin);class Ip extends e.CartesianSymlogAxis{setLayout3dBox(t){this.layout3dBox=t}_getUpdateAttribute(t){return e.isZAxis(this._orient)?Pp(this,t):super._getUpdateAttribute(t)}}Ip.builtInTheme=Object.assign(Object.assign({},e.CartesianSymlogAxis.builtInTheme),{axisZ:Object.assign(Object.assign({},e.CartesianSymlogAxis.builtInTheme.axisX),kp)}),i.mixin(Ip,e.LinearAxisMixin);class Ep extends e.CartesianTimeAxis{setLayout3dBox(t){this.layout3dBox=t}_getUpdateAttribute(t){return e.isZAxis(this._orient)?Pp(this,t):super._getUpdateAttribute(t)}}Ep.builtInTheme=Object.assign(Object.assign({},e.CartesianTimeAxis.builtInTheme),{axisZ:Object.assign(Object.assign({},e.CartesianTimeAxis.builtInTheme.axisX),kp)}),i.mixin(Ep,e.LinearAxisMixin);const Dp=Object.assign(Object.assign({},Mh),{minLabel:{name:"minLabel",type:"text"},maxLabel:{name:"maxLabel",type:"text"}});class jp extends e.RangeColumnSeries{constructor(){super(...arguments),this.type=K.rangeColumn3d,this._barMarkType="rect3d",this._barName=K.bar3d}}jp.type=K.rangeColumn3d,jp.mark=Dp;const Up=()=>{Cu(),e.registerCartesianBandAxis(),e.registerCartesianLinearAxis(),e.Factory.registerSeries(jp.type,jp)};class Fp extends e.RangeColumnSeriesSpecTransformer{_transformLabelSpec(t){var e;"bothEnd"!==(null===(e=t.label)||void 0===e?void 0:e.position)&&this._addMarkLabelSpec(t,"bar3d")}}class Np extends e.CartesianChartSpecTransformer{_getDefaultSeriesSpec(t){var e,i;const s=super._getDefaultSeriesSpec(t,["bar3d","barGapInGroup"]);return"horizontal"===t.direction?s.xField=null!==(e=t.xField)&&void 0!==e?e:[t.minField,t.maxField]:s.yField=null!==(i=t.yField)&&void 0!==i?i:[t.minField,t.maxField],s}}class Wp extends e.BaseChart{constructor(){super(...arguments),this.transformerConstructor=Np,this.type="rangeColumn3d",this.seriesType=K.rangeColumn3d}_setModelOption(){this._modelOption.getDimensionInfo=e.getCartesianDimensionInfo,this._modelOption.getDimensionInfoByValue=e.getDimensionInfoByValue,this._modelOption.getRectByDimensionData=e.getCartesianCrosshairRect}}Wp.type="rangeColumn3d",Wp.seriesType=K.rangeColumn3d,Wp.transformerConstructor=Np;const zp=["x","y","dx","dy","scaleX","scaleY","angle","anchor","postMatrix","visible","clip","pickable","childrenPickable","zIndex","cursor"];class Gp extends Yr{constructor(t,e){super(t),this._skipRenderAttributes=zp,(null==e?void 0:e.mode)&&(this.mode=e.mode,this.setMode(e.mode)),(null==e?void 0:e.skipDefault)&&(this.skipDefault=!0),this.setTheme({common:{strokeBoundsBuffer:0}}),this.attribute=t,this.onSetStage((()=>{this.render(),this.bindEvents()}))}setAttribute(t,e,s,n){const r=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate({[t]:e},this.attribute,t,n);if(r)return this._setAttributes(r,s);i.isPlainObject(this.attribute[t])&&i.isPlainObject(e)&&!i.isFunction(this.attribute[t])&&!i.isFunction(e)?i.merge(this.attribute[t],e):this.attribute[t]=e,this._skipRenderAttributes.includes(t)||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!s&&!this.needUpdateTag(t)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}setAttributes(t,e,i){return t=this.onBeforeAttributeUpdate&&this.onBeforeAttributeUpdate(t,this.attribute,null,i)||t,this._setAttributes(t,e)}_setAttributes(t,e){const i=Object.keys(t);this._mergeAttributes(t,i),i.every((t=>this._skipRenderAttributes.includes(t)))||this.render(),this.valid=this.isValid(),this.updateShapeAndBoundsTagSetted()||!e&&!this.needUpdateTags(i)?this.addUpdateBoundTag():this.addUpdateShapeAndBoundsTag(),this.addUpdatePositionTag(),this.onAttributeUpdate()}_mergeAttributes(t,e){i.isNil(e)&&(e=Object.keys(t));for(let s=0;s<e.length;s++){const n=e[s];!i.isPlainObject(this.attribute[n])||i.isFunction(this.attribute[n])||i.isFunction(t[n])?this.attribute[n]=t[n]:i.merge(this.attribute[n],t[n])}}bindEvents(){}_getNodeId(t){var e;return`${null!==(e=this.id)&&void 0!==e?e:this._uid}-${this.name}-${t}`}_dispatchEvent(t,e){var i;const s=new fs(t,e);s.manager=null===(i=this.stage)||void 0===i?void 0:i.eventSystem.manager,this.dispatchEvent(s)}}var Vp;!function(t){t.selected="selected",t.selectedReverse="selected_reverse",t.hover="hover",t.hoverReverse="hover_reverse"}(Vp||(Vp={}));const Hp={[Vp.selectedReverse]:{},[Vp.selected]:{},[Vp.hover]:{},[Vp.hoverReverse]:{}};function Xp(t,e){t.forEachChildren((t=>{const i=e(t);t.isContainer&&!i&&Xp(t,e)}))}function Yp(t){return t>=0&&t<Math.PI/2||t>3*Math.PI/2&&t<=2*Math.PI}function Kp(t,e,i){return Math.abs(t-e)<i}function $p(t){return"rich"===function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type";var s,n;return i.isObject(t.text)&&"type"in t.text?null!==(s=t.text.type)&&void 0!==s?s:"text":e in t&&null!==(n=t[e])&&void 0!==n?n:"text"}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type")}const qp=(t,e)=>{const i=Math.atan2(t,e);return i<0?i+2*Math.PI:i};function Zp(){ru(),fu(),Su(),vu(),Bu()}var Jp=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(t);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(i[s[n]]=t[s[n]])}return i};Zp();class Qp extends Gp{getBgRect(){return this._bgRect}getTextShape(){return this._textShape}constructor(t,e){super((null==e?void 0:e.skipDefault)?t:i.merge({},Qp.defaultAttributes,t)),this.name="tag",this._tagStates=[],this._rectStates=[],this._symbolStates=[],this._textStates=[]}render(){var t,e,s;this.cacheStates();const{text:n="",textStyle:r={},shape:a={},panel:o={},space:l=4,minWidth:h,maxWidth:c,padding:d=4,visible:u,state:p,type:g,textAlwaysCenter:f,containerTextAlign:m}=this.attribute,y=i.normalizePadding(d),b=this.createOrUpdateChild("tag-content",{x:0,y:0,zIndex:1},"group");let v,x=-y[3],A=-y[0],_=y[1]+y[3],S=y[0]+y[2],T=0,B=0;const{visible:w}=a,C=Jp(a,["visible"]);if(i.isBoolean(w)){const t=(null==C?void 0:C.size)||10,e=i.isNumber(t)?t:Math.max(t[0],t[1]);v=b.createOrUpdateChild("tag-shape",Object.assign(Object.assign({symbolType:"circle",size:t,strokeBoundsBuffer:0},C),{visible:w,x:e/2,y:e/2}),"symbol"),i.isEmpty(null==p?void 0:p.shape)||(v.states=p.shape),w&&(B=e+l)}let M,P,k;if(_+=B,T+=B,$p({text:n})||"rich"===g){const t=Object.assign(Object.assign(Object.assign({},function(t){var e,s;return i.isValid(t.maxLineWidth)&&(t.maxWidth=t.maxLineWidth,delete t.maxLineWidth),t.width=null!==(e=t.width)&&void 0!==e?e:0,t.height=null!==(s=t.height)&&void 0!==s?s:0,t.textConfig=t.text.text||t.text,t}(Object.assign({type:g,text:n},r))),r),{visible:i.isValid(n)&&!1!==u,x:T,y:0});i.isNil(t.lineHeight)&&(t.lineHeight=r.fontSize),M=b.createOrUpdateChild("tag-text",t,"richtext"),P=M.AABBBounds.width(),k=M.AABBBounds.height()}else{const s=Object.assign(Object.assign({text:i.isObject(n)&&"type"in n&&"text"===n.type?n.text:n,visible:i.isValid(n)&&!1!==u,lineHeight:null==r?void 0:r.fontSize},r),{x:T,y:0});i.isNil(s.lineHeight)&&(s.lineHeight=r.fontSize),M=b.createOrUpdateChild("tag-text",s,"text");const a=function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return{width:0,height:0};const s=go({text:t,fontFamily:e.fontFamily||i.fontFamily||"PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",fontSize:e.fontSize||i.fontSize||12,fontWeight:e.fontWeight||i.fontWeight,textAlign:e.textAlign||"center",textBaseline:e.textBaseline,ellipsis:!!e.ellipsis,maxLineWidth:e.maxLineWidth||1/0,lineHeight:e.fontSize||i.fontSize||12});return{width:s.width(),height:s.height()}}(s.text,r,null===(e=null===(t=this.stage)||void 0===t?void 0:t.getTheme())||void 0===e?void 0:e.text);P=a.width,k=a.height}_+=P;const O=null!==(s=a.size)&&void 0!==s?s:10,R=i.isNumber(O)?O:Math.max(O[0],O[1]);S+=Math.max(k,a.visible?R:0);const{textAlign:L,textBaseline:I}=r;(i.isValid(h)||i.isValid(c))&&(i.isValid(h)&&_<h&&(_=h),i.isValid(c)&&_>c&&(_=c,M.setAttribute("maxLineWidth",c-y[1]-y[2]))),x=0,A=0;let E=0;"left"===L||"start"===L?E=1:"right"===L||"end"===L?E=-1:"center"===L&&(E=0),E?E<0?(x-=_,v&&v.setAttribute("x",(v.attribute.x||0)-P),b.setAttribute("x",-y[1]-B)):E>0&&b.setAttribute("x",y[3]):(x-=_/2,v&&v.setAttribute("x",(v.attribute.x||0)-P/2),b.setAttribute("x",-B/2));const D="right"===m||"end"===m,j="left"===m||"start"===m,U=(t,e)=>{"richtext"===M.type?M.setAttributes({x:t,textAlign:e,textConfig:i.array(M.attribute.textConfig).map((t=>Object.assign(Object.assign({},t),{textAlign:e})))}):M.setAttributes({x:t,textAlign:e})};if((m?"center"===m:f)&&E){const t=_-y[1]-y[3],e=P+B,i=1===E?(t-e)/2+B+P/2:y[0]+B-(_/2+e/2-B)+P/2;if(U(i,"center"),v){const t=i-P/2-B+R/2;v.setAttributes({x:t})}}if(j&&1!==E){const t=_-y[1]-y[3],e=0===E?-t/2+B/2:-_+y[3]+y[1]+B;if(U(e+B,"left"),v){const t=e+R/2;v.setAttributes({x:t})}}if(D&&-1!==E){const t=_-y[1]-y[3],e=0===E?t/2+B/2:t;if(U(e,"right"),v){const t=e-P-B+R/2;v.setAttributes({x:t})}}"middle"===I?(A-=S/2,v&&v.setAttribute("y",0)):"bottom"===I?(A-=S,v&&v.setAttribute("y",-k/2),b.setAttribute("y",-y[2])):"top"===I&&(b.setAttribute("y",y[0]),v&&v.setAttribute("y",k/2)),i.isEmpty(null==p?void 0:p.text)||(M.states=p.text);const{visible:F}=o,N=Jp(o,["visible"]);if(u&&i.isBoolean(F)){const t=this.createOrUpdateChild("tag-panel",Object.assign(Object.assign({},N),{visible:F&&!!n,width:_,height:S,x:x,y:A}),"rect");if(i.isEmpty(null==p?void 0:p.panel)||(t.states=p.panel),N.customShape){const e=N.customShape;t.pathProxy=t=>e(this,t,new ze)}this._bgRect=t}this._textShape=M,this._symbol=v,this.resetStates()}initAttributes(t,e){t=(null==e?void 0:e.skipDefault)?t:i.merge({},Qp.defaultAttributes,t),super.initAttributes(t),this.render()}addState(t,e,i){super.addState(t,e,i),this._textShape&&this._textShape.addState(t,e,i),this._bgRect&&this._bgRect.addState(t,e,i),this._symbol&&this._symbol.addState(t,e,i)}removeState(t,e){super.removeState(t,e),this._textShape&&this._textShape.removeState(t,e),this._bgRect&&this._bgRect.removeState(t,e),this._symbol&&this._symbol.removeState(t,e)}cacheStates(){var t,e,i,s,n,r,a,o,l,h,c,d,u,p;this._tagStates=null!==(e=null===(t=this.currentStates)||void 0===t?void 0:t.slice())&&void 0!==e?e:[],this._rectStates=null!==(n=null===(s=null===(i=this._bgRect)||void 0===i?void 0:i.currentStates)||void 0===s?void 0:s.slice())&&void 0!==n?n:[],this._symbolStates=null!==(o=null===(a=null===(r=this._symbol)||void 0===r?void 0:r.currentStates)||void 0===a?void 0:a.slice())&&void 0!==o?o:[],this._textStates=null!==(c=null===(h=null===(l=this._textShape)||void 0===l?void 0:l.currentStates)||void 0===h?void 0:h.slice())&&void 0!==c?c:[],this.clearStates(),null===(d=this._bgRect)||void 0===d||d.clearStates(),null===(u=this._symbol)||void 0===u||u.clearStates(),null===(p=this._textShape)||void 0===p||p.clearStates()}resetStates(){var t,e,i;this._tagStates.length&&this.useStates(this._tagStates),this._rectStates.length&&(null===(t=this._bgRect)||void 0===t||t.useStates(this._rectStates)),this._symbolStates.length&&(null===(e=this._symbol)||void 0===e||e.useStates(this._symbolStates)),this._textStates.length&&(null===(i=this._textShape)||void 0===i||i.useStates(this._textStates))}}function tg(){ru(),hu(),du(),Su()}function eg(){ru(),hu(),eu(),Su()}Qp.defaultAttributes={visible:!0,textStyle:{fontSize:12,fill:"#000",textAlign:"left",textBaseline:"top"},space:4,padding:4,shape:{fill:"#000"}},tg();class ig extends Gp{getStartAngle(){return i.normalizeAngle(this._startAngle)}getEndAngle(){return i.normalizeAngle(this._endAngle)}getMainSegmentPoints(){return this._mainSegmentPoints}constructor(t,e){super((null==e?void 0:e.skipDefault)?t:i.merge({},ig.defaultAttributes,t)),this.name="segment",this.key="segment",this.lines=[]}render(){this.removeAllChild(!0),this._reset();const{startSymbol:t,endSymbol:e,lineStyle:s,state:n,visible:r=!0,multiSegment:a,mainSegmentIndex:o}=this.attribute;if(!r)return;this._computeLineAngle();const l=this._getMainSegmentPoints(),h=this._renderSymbol(t,l,"start"),c=this._renderSymbol(e,l,"end");if(this.startSymbol=h,this.endSymbol=c,a){const t=[...this.attribute.points];if(i.isValidNumber(o))t[o]=this._clipPoints(t[o]);else{const e=this._clipPoints(i.flattenArray(t));t[0][0]=e[0],t[t.length-1][t[t.length-1].length-1]=e[e.length-1]}t.forEach(((t,e)=>{var r,a;const o=uo.line(Object.assign(Object.assign({points:t},i.isArray(s)?null!==(r=s[e])&&void 0!==r?r:s[s.length-1]:s),{fill:!1}));o.name=`${this.name}-line`,o.id=this._getNodeId("line"+e),i.isEmpty(null==n?void 0:n.line)||(o.states=i.isArray(n.line)?null!==(a=n.line[e])&&void 0!==a?a:n.line[n.line.length-1]:n.line),this.add(o),this.lines.push(o)}))}else{let t=uo.line;i.array(s)[0].cornerRadius&&(t=uo.polygon);const e=t(Object.assign(Object.assign({points:this._clipPoints(this.attribute.points)},i.array(s)[0]),{fill:!1,closePath:!1}));e.name=`${this.name}-line`,e.id=this._getNodeId("line"),i.isEmpty(null==n?void 0:n.line)||(e.states=[].concat(n.line)[0]),this.add(e),this.lines.push(e)}}_computeStartRotate(t){return t+Math.PI/2}_computeEndRotate(t){return t+Math.PI/2}_renderSymbol(t,e,s){if(!e.length)return;const{autoRotate:n=!0}=t;let r;if(t&&t.visible){const a=this.getStartAngle(),o=this.getEndAngle(),{state:l}=this.attribute,h=e[0],c=e[e.length-1],{refX:d=0,refY:u=0,refAngle:p=0,style:g,symbolType:f,size:m=12}=t;let y,b;"start"===s?(y={x:h.x+(i.isValidNumber(a)?d*Math.cos(a)+u*Math.cos(a-Math.PI/2):0),y:h.y+(i.isValidNumber(a)?d*Math.sin(a)+u*Math.sin(a-Math.PI/2):0)},b=this._computeStartRotate(this._startAngle)):(y={x:c.x+(i.isValidNumber(o)?d*Math.cos(o)+u*Math.cos(o-Math.PI/2):0),y:c.y+(i.isValidNumber(o)?d*Math.sin(o)+u*Math.sin(o-Math.PI/2):0)},b=this._computeEndRotate(this._endAngle)),r=uo.symbol(Object.assign(Object.assign(Object.assign({},y),{symbolType:f,size:m,angle:n?b+p:0,strokeBoundsBuffer:0}),g)),r.name=`${this.name}-${s}-symbol`,r.id=this._getNodeId(`${s}-symbol`),i.isEmpty(null==l?void 0:l.symbol)||(r.states=l.symbol),"start"===s?i.isEmpty(null==l?void 0:l.startSymbol)||(r.states=l.startSymbol):i.isEmpty(null==l?void 0:l.endSymbol)||(r.states=l.endSymbol),this.add(r)}return r}_getMainSegmentPoints(){if(this._mainSegmentPoints)return this._mainSegmentPoints;const{points:t,multiSegment:e,mainSegmentIndex:s}=this.attribute;let n;return n=e?i.isValidNumber(s)?t[s]:i.flattenArray(t):t,this._mainSegmentPoints=n,n}_clipPoints(t){const{startSymbol:e={},endSymbol:i={}}=this.attribute;let s=t;if(e.visible){const i=e.clip?e.size||10:0;s=[{x:t[0].x-i/2*(Math.cos(this._startAngle)||0),y:t[0].y-i/2*(Math.sin(this._startAngle)||0)},...s.slice(1)]}if(i.visible){const e=i.clip?i.size||10:0,n={x:t[t.length-1].x-e/2*(Math.cos(this._endAngle)||0),y:t[t.length-1].y-e/2*(Math.sin(this._endAngle)||0)};s=[...s.slice(0,s.length-1),n]}return s}_computeLineAngle(){const t=this._getMainSegmentPoints();if(t.length<=1)return;const e=t[0],i=t[1],s=t[t.length-2],n=t[t.length-1],r=[e.x-i.x,e.y-i.y],a=Math.atan2(r[1],r[0]),o=[n.x-s.x,n.y-s.y],l=Math.atan2(o[1],o[0]);this._startAngle=a,this._endAngle=l}_reset(){this.startSymbol=null,this.endSymbol=null,this._startAngle=null,this._endAngle=null,this._mainSegmentPoints=null}}ig.defaultAttributes={visible:!0,lineStyle:{lineWidth:1,stroke:"#000"},startSymbol:{visible:!1,autoRotate:!0,symbolType:"triangle",size:12,refX:0,refY:0,refAngle:0,style:{fill:"#000",zIndex:1}},endSymbol:{visible:!1,autoRotate:!0,symbolType:"triangle",size:12,refX:0,refY:0,refAngle:0,style:{fill:"#000",zIndex:1}}},eg();class sg extends ig{constructor(t,e){super((null==e?void 0:e.skipDefault)?t:i.merge({},ig.defaultAttributes,t)),this.name="arc-segment",this.key="arc-segment",this.isReverseArc=!1}getStartAngle(){const t=this.isReverseArc?this._startAngle+Math.PI/2:this._startAngle-Math.PI/2;return t<0?t+2*Math.PI:t>2*Math.PI?t-2*Math.PI:t}getEndAngle(){const t=this.isReverseArc?this._endAngle-Math.PI/2:this._endAngle+Math.PI/2;return t<0?t+2*Math.PI:t>2*Math.PI?t-2*Math.PI:t}getMainSegmentPoints(){return this._mainSegmentPoints}_computeStartRotate(t){return this.isReverseArc?t+Math.PI:t}_computeEndRotate(t){return this.isReverseArc?t:t+Math.PI}render(){this.removeAllChild(!0),this._reset();const{startSymbol:t,endSymbol:e,lineStyle:s,state:n,visible:r=!0,radius:a,startAngle:o,endAngle:l,center:h}=this.attribute;if(!r)return;this._startAngle=o,this._endAngle=l,this.isReverseArc=o>l;const c={x:h.x+a*Math.cos(this._startAngle),y:h.y+a*Math.sin(this._startAngle)},d={x:h.x+a*Math.cos(this._endAngle),y:h.y+a*Math.sin(this._endAngle)};this._mainSegmentPoints=[c,d];const u=this._renderSymbol(t,this._mainSegmentPoints,"start"),p=this._renderSymbol(e,this._mainSegmentPoints,"end");this.startSymbol=u,this.endSymbol=p;const g=uo.arc(Object.assign({x:h.x,y:h.y,startAngle:o,endAngle:l,innerRadius:a,outerRadius:a},s));g.name=`${this.name}-line`,g.id=this._getNodeId("arc"),i.isEmpty(null==n?void 0:n.line)||(g.states=[].concat(n.line)[0]),this.add(g),this.line=g}}var ng,rg,ag,og;!function(t){t.start="start",t.startTop="startTop",t.startBottom="startBottom",t.insideStart="insideStart",t.insideStartTop="insideStartTop",t.insideStartBottom="insideStartBottom",t.middle="middle",t.insideMiddleTop="insideMiddleTop",t.insideMiddleBottom="insideMiddleBottom",t.end="end",t.endTop="endTop",t.endBottom="endBottom",t.insideEnd="insideEnd",t.insideEndTop="insideEndTop",t.insideEndBottom="insideEndBottom"}(ng||(ng={})),function(t){t.left="left",t.right="right",t.top="top",t.bottom="bottom",t.topLeft="topLeft",t.topRight="topRight",t.bottomLeft="bottomLeft",t.bottomRight="bottomRight",t.middle="middle",t.insideLeft="insideLeft",t.insideRight="insideRight",t.insideTop="insideTop",t.insideBottom="insideBottom",t.insideTopLeft="insideTopLeft",t.insideTopRight="insideTopRight",t.insideBottomLeft="insideBottomLeft",t.insideBottomRight="insideBottomRight"}(rg||(rg={})),function(t){t.arcInnerStart="arcInnerStart",t.arcInnerEnd="arcInnerEnd",t.arcInnerMiddle="arcInnerMiddle",t.arcOuterStart="arcOuterStart",t.arcOuterEnd="arcOuterEnd",t.arcOuterMiddle="arcOuterMiddle",t.center="center"}(ag||(ag={})),function(t){t.top="top",t.bottom="bottom",t.middle="middle",t.insideTop="insideTop",t.insideBottom="insideBottom",t.insideMiddle="insideMiddle"}(og||(og={}));class lg extends Gp{constructor(){super(...arguments),this.name="marker",this._onHover=t=>{this._lastHover=((t,e,s)=>{const n=t.target;return n!==s&&n.name&&!i.isEmpty(n.states)?(n.addState(Vp.hover,!0),Xp(e,(t=>{t!==n&&t.name&&!i.isEmpty(t.states)&&t.addState(Vp.hoverReverse,!0)})),n):s})(t,this._container,this._lastHover)},this._onUnHover=t=>{this._lastHover=((t,e,s)=>s?(Xp(e,(t=>{t.name&&!i.isEmpty(t.states)&&(t.removeState(Vp.hoverReverse),t.removeState(Vp.hover))})),null):s)(0,this._container,this._lastHover)},this._onClick=t=>{this._lastSelect=((t,e,s)=>{const n=t.target;return s===n&&n.hasState(Vp.selected)?(Xp(e,(t=>{t.name&&!i.isEmpty(t.states)&&(t.removeState(Vp.selectedReverse),t.removeState(Vp.selected))})),null):n.name&&!i.isEmpty(n.states)?(n.addState(Vp.selected,!0),Xp(e,(t=>{t!==n&&t.name&&!i.isEmpty(t.states)&&t.addState(Vp.selectedReverse,!0)})),n):s})(t,this._container,this._lastSelect)}}transAnimationConfig(){var t,e,s;if(!1!==this.attribute.animation){const n=i.isObject(this.attribute.animation)?this.attribute.animation:{};this._animationConfig={enter:i.merge({},this.defaultUpdateAnimation,n,null!==(t=this.attribute.animationEnter)&&void 0!==t?t:{}),exit:i.merge({},this.defaultExitAnimation,n,null!==(e=this.attribute.animationExit)&&void 0!==e?e:{}),update:i.merge({},this.defaultUpdateAnimation,n,null!==(s=this.attribute.animationUpdate)&&void 0!==s?s:{})}}}setAttribute(t,e,i){super.setAttribute(t,e,i),"visible"===t&&this.render()}_bindEvent(){var t,e,i;if(!this.attribute.interactive)return;const{hover:s,select:n}=this.attribute;s&&(null===(t=this._container)||void 0===t||t.addEventListener("pointermove",this._onHover),null===(e=this._container)||void 0===e||e.addEventListener("pointerout",this._onUnHover)),n&&(null===(i=this._container)||void 0===i||i.addEventListener("pointerdown",this._onClick))}_releaseEvent(){var t,e,i;null===(t=this._container)||void 0===t||t.removeEventListener("pointermove",this._onHover),null===(e=this._container)||void 0===e||e.removeEventListener("pointerout",this._onUnHover),null===(i=this._container)||void 0===i||i.removeEventListener("pointerdown",this._onClick)}_initContainer(){var t,e;const{limitRect:i={},clipInRange:s}=this.attribute;let n;if(s){const s=uo.group(Object.assign(Object.assign({},i),{clip:!0,pickable:!1}));n=uo.group({x:-(null!==(t=i.x)&&void 0!==t?t:0),y:-(null!==(e=i.y)&&void 0!==e?e:0),pickable:!1}),s.add(n),this._containerClip=s,this.add(s)}else n=uo.group({x:0,y:0,pickable:!1}),this.add(n);n.name="marker-container",this._container=n}_updateContainer(){var t,e;const{limitRect:i={},clipInRange:s}=this.attribute;this._containerClip&&this._containerClip.setAttributes(Object.assign({},i)),this._container.setAttributes({x:s?-(null!==(t=i.x)&&void 0!==t?t:0):0,y:s?-(null!==(e=i.y)&&void 0!==e?e:0):0})}render(){var t;this.transAnimationConfig(),this.setAttribute("pickable",!1);const e=null===(t=this.attribute.visible)||void 0===t||t;!1===this.attribute.interactive&&this.setAttribute("childrenPickable",!1),e&&this.isValidPoints()?this._container?(this._updateContainer(),this.updateMarker(),this.markerAnimate("update")):(this._initContainer(),this.initMarker(this._container),this.markerAnimate("enter")):(this.markerAnimate("exit"),this._container=null,this.removeAllChild(!0)),this._releaseEvent(),this._bindEvent()}release(){this.markerAnimate("exit"),super.release(),this._releaseEvent(),this._container=null}}const hg={type:"callIn",duration:500,easing:"linear",delay:0},cg={type:"fadeOut",duration:500,easing:"linear",delay:0},dg=.001;ng.end,ag.arcOuterMiddle,rg.right,ag.arcOuterMiddle;const ug={postiveXAxis:{top:{textAlign:"left",textBaseline:"bottom"},bottom:{textAlign:"left",textBaseline:"top"},middle:{textAlign:"left",textBaseline:"middle"},insideTop:{textAlign:"right",textBaseline:"bottom"},insideBottom:{textAlign:"right",textBaseline:"top"},insideMiddle:{textAlign:"right",textBaseline:"middle"}},negativeXAxis:{top:{textAlign:"right",textBaseline:"bottom"},bottom:{textAlign:"right",textBaseline:"top"},middle:{textAlign:"right",textBaseline:"middle"},insideTop:{textAlign:"left",textBaseline:"bottom"},insideBottom:{textAlign:"left",textBaseline:"top"},insideMiddle:{textAlign:"left",textBaseline:"middle"}}};ru(),Zp(),vp(),tg(),eg(),Su(),ou(),hu(),vp();class pg extends lg{markerAnimate(t){pg._animate&&this._animationConfig&&pg._animate([this._line,this._decorativeLine],this._item,this._animationConfig,t)}constructor(t,e){super((null==e?void 0:e.skipDefault)?t:i.merge({},pg.defaultAttributes,t)),this.name="markPoint",this.defaultUpdateAnimation=hg,this.defaultExitAnimation=cg,this._isArcLine=!1,this._isStraightLine=!1}setLabelPos(){}getTextAlignAttr(t,e,i,s,n){return Kp(Math.abs(s),Math.PI/2,dg)||Kp(Math.abs(s),3*Math.PI/2,dg)?function(t,e,i){return t?{textAlign:"right",textBaseline:"middle"}:{textAlign:e<Math.PI&&i.toLocaleLowerCase().includes("top")||e>Math.PI&&i.toLocaleLowerCase().includes("bottom")?"left":e<Math.PI&&i.toLocaleLowerCase().includes("bottom")||e>Math.PI&&i.toLocaleLowerCase().includes("top")?"right":"center",textBaseline:e<Math.PI&&i.includes("inside")||e>Math.PI&&!i.includes("inside")?"bottom":"top"}}(t,s,n):Yp(s)?ug.postiveXAxis[n]:ug.negativeXAxis[n]}setItemAttributes(t,e,s,n,r){var a,o;if(!t)return;const{autoRotate:l=!0,refX:h=0,refY:c=0,refAngle:d=0,style:u,position:p=og.middle}=e,{state:g}=this.attribute,f=(null===(a=this._line)||void 0===a?void 0:a.getEndAngle())||0,m=h*Math.cos(f)+c*Math.cos(f-Math.PI/2),y=h*Math.sin(f)+c*Math.sin(f-Math.PI/2);if("text"===r){const r=n.x-s.x,a=n.y-s.y;t.setAttributes(Object.assign(Object.assign({},u),{textStyle:Object.assign(Object.assign({},this.getTextAlignAttr(l,r,a,f,null!==(o=e.position)&&void 0!==o?o:"end")),u.textStyle),state:{panel:i.merge({},Hp,null==g?void 0:g.textBackground),text:i.merge({},Hp,null==g?void 0:g.itemContent)}}))}else("richText"===r||"image"===r)&&(t.setAttributes({dx:this.getItemDx(t,p,u)+(u.dx||0),dy:this.getItemDy(t,p,u)+(u.dy||0)}),t.states=i.merge({},Hp,null==g?void 0:g.itemContent));const b=Yp(f)?f:f-Math.PI;t.setAttributes({x:n.x+(m||0),y:n.y+(y||0),angle:l&&b+d})}getItemDx(t,e,i){var s,n;const r=null!==(n=null===(s=null==t?void 0:t.AABBBounds)||void 0===s?void 0:s.width())&&void 0!==n?n:(null==i?void 0:i.width)||0;return e.includes("inside")?-r:0}getItemDy(t,e,i){var s,n;const r=null!==(n=null===(s=null==t?void 0:t.AABBBounds)||void 0===s?void 0:s.height())&&void 0!==n?n:(null==i?void 0:i.height)||0;return e.includes("top")||e.includes("Top")?-r:e.includes("middle")||e.includes("Middle")?-r/2:0}initItem(t,e,s){const{state:n}=this.attribute,{type:r="text",style:a,renderCustomCallback:o}=t;let l;return"symbol"===r?(l=uo.symbol(Object.assign(Object.assign({},s),a)),l.states=i.merge({},Hp,null==n?void 0:n.itemContent)):"text"===r?l=new Qp(Object.assign(Object.assign({},s),{state:{panel:i.merge({},Hp,null==n?void 0:n.textBackground),text:i.merge({},Hp,null==n?void 0:n.itemContent)}})):"richText"===r?(l=uo.richtext(Object.assign(Object.assign({},s),a)),l.states=i.merge({},Hp,null==n?void 0:n.itemContent)):"image"===r?(l=uo.image(Object.assign(Object.assign({},s),a)),l.states=i.merge({},Hp,null==n?void 0:n.itemContent)):"custom"===r&&o&&(l=o(),l.states=i.merge({},Hp,null==n?void 0:n.itemContent)),l.name=`mark-point-${r}`,this.setItemAttributes(l,t,e,s,r),l}getItemLineAttr(t,e,i){let s=[],n={x:0,y:0},r=0,a=0,o=0;const{type:l="type-s",arcRatio:h=.8}=t,c=i.x-e.x,d=i.y-e.y;if(this._isStraightLine=Kp(c,0,dg)||Kp(d,0,dg),this._isArcLine){const{x:t,y:e}=this.attribute.position,{x:s,y:l}=i,c=(t+s)/2,d=c+h*(l>e?-1:1)*c,u=(e===l?0:-(t-s)/(e-l))*(d-c)+(e+l)/2;a=qp(e-u,t-d),o=qp(l-u,s-d),n={x:d,y:u};const p=Math.sqrt((d-t)*(d-t)+(u-e)*(u-e)),g=this.attribute.targetSymbol.style.size/2;a+=2*Math.acos(Math.sqrt(1-g*g/(4*p*p))),h>0?o<a&&(o+=2*Math.PI):a<o&&(a+=2*Math.PI),r=Math.sqrt((d-t)*(d-t)+(u-e)*(u-e))}else s="type-do"!==l||this._isStraightLine?"type-po"!==l||this._isStraightLine?"type-op"!==l||this._isStraightLine?[e,i]:[e,{x:e.x,y:i.y},i]:[e,{x:i.x,y:e.y},i]:[e,{x:(e.x+i.x)/2,y:i.y},i];return s=function(t){const e=[t[0]];for(let i=1;i<t.length;i++)t[i].x===t[i-1].x&&t[i].y===t[i-1].y||e.push(t[i]);return e}(s),{points:s,center:n,radius:r,startAngle:a,endAngle:o}}reDrawLine(t,e){this._line.release();const{startSymbol:s,endSymbol:n,lineStyle:r,type:a="type-s"}=t,{state:o}=this.attribute,l=this._isArcLine?sg:ig;this._container.removeChild(this._line),this._line=new l(Object.assign(Object.assign({},e),{pickable:!1,startSymbol:s,endSymbol:n,lineStyle:r,visible:t.visible,state:{line:i.merge({},Hp,null==o?void 0:o.line),startSymbol:i.merge({},Hp,null==o?void 0:o.lineStartSymbol),endSymbol:i.merge({},Hp,null==o?void 0:o.lineEndSymbol)}})),this._container.add(this._line)}setItemLineAttr(t,e,s){if(this._line){const{startSymbol:n,endSymbol:r,lineStyle:a,type:o="type-s"}=t,{state:l}=this.attribute,h=this.getItemLineAttr(t,e,s);this._isArcLine&&"arc-segment"===this._line.key||!this._isArcLine&&"segment"===this._line.key?this._line.setAttributes(Object.assign(Object.assign({},h),{startSymbol:n,endSymbol:r,lineStyle:a,visible:t.visible,state:{line:i.merge({},Hp,null==l?void 0:l.line),startSymbol:i.merge({},Hp,null==l?void 0:l.lineStartSymbol),endSymbol:i.merge({},Hp,null==l?void 0:l.lineEndSymbol)}})):this.reDrawLine(t,h)}}getDecorativeLineAttr(t){var e;const i=(null===(e=null==t?void 0:t.decorativeLine)||void 0===e?void 0:e.length)||10,s=this._line.getEndAngle()||0;return{startPointOffsetX:i/2*Math.cos(s-Math.PI/2),startPointOffsetY:i/2*Math.sin(s-Math.PI/2),endPointOffsetX:-i/2*Math.cos(s-Math.PI/2),endPointOffsetY:-i/2*Math.sin(s-Math.PI/2)}}setDecorativeLineAttr(t,e,s){var n;if(this._decorativeLine){const{lineStyle:r}=t,{startPointOffsetX:a,startPointOffsetY:o,endPointOffsetX:l,endPointOffsetY:h}=this.getDecorativeLineAttr(t);this._decorativeLine.setAttributes(Object.assign(Object.assign({points:[{x:e.x+a,y:e.y+o},{x:e.x+l,y:e.y+h}]},r),{visible:s})),this._decorativeLine.states=i.merge({},Hp,null===(n=this.attribute.state)||void 0===n?void 0:n.line)}}setTargetItemAttributes(t,e){var s,n;this._targetItem&&(this._targetItem.setAttributes(Object.assign({x:e.x,y:e.y,visible:null!==(s=t.visible)&&void 0!==s&&s,size:t.size},t.style)),this._targetItem.states=i.merge({},Hp,null===(n=this.attribute.state)||void 0===n?void 0:n.targetItem))}setAllOfItemsAttr(t,e){var i;const{position:s,itemLine:n={},itemContent:r={},limitRect:a,targetSymbol:o}=this.attribute,{type:l="text",confine:h}=r;if(a&&h){const{x:t,y:i,width:s,height:n}=a,{dx:r,dy:o}=function(t,e){const{x1:i,y1:s,x2:n,y2:r}=e,{x1:a,y1:o,x2:l,y2:h}=t.AABBBounds;let c=0,d=0;return a<i&&(c=i-a),o<s&&(d=s-o),l>n&&(c=n-l),h>r&&(d=r-h),{dx:c,dy:d}}(this._item,{x1:t,y1:i,x2:t+s,y2:i+n});e.x=e.x+r,e.y=e.y+o}this.setTargetItemAttributes(o,s),this.setItemLineAttr(n,t,e),this.setItemAttributes(this._item,r,t,e,l),this.setDecorativeLineAttr(n,e,null===(i=n.decorativeLine)||void 0===i?void 0:i.visible)}computeNewPositionAfterTargetItem(t){var e,i;const{itemContent:s={},targetSymbol:n,itemLine:r}=this.attribute,{offsetX:a=0,offsetY:o=0}=s,{offset:l=0,style:h,visible:c=!1,size:d}=n,u=c?null!==(i=null!==(e=h.size)&&void 0!==e?e:d)&&void 0!==i?i:20:0;let p;return p="type-do"===r.type?qp(o,a/2):"type-po"===r.type?qp(0,a):"type-op"===r.type?qp(o,0):qp(o,a),{newPosition:{x:t.x+(u/2+l)*Math.cos(p),y:t.y+(u/2+l)*Math.sin(p)},newItemPosition:{x:t.x+(u/2+l)*Math.cos(p)+a,y:t.y+(u/2+l)*Math.sin(p)+o}}}initMarker(t){const{position:e,itemContent:i={},itemLine:s}=this.attribute,{type:n="type-s",arcRatio:r=.8}=s,{offsetX:a=0,offsetY:o=0}=i;this._isStraightLine=Kp(a,0,dg)||Kp(o,0,dg),this._isArcLine="type-arc"===n&&0!==r&&!this._isStraightLine;const{newPosition:l,newItemPosition:h}=this.computeNewPositionAfterTargetItem(e),c=new(this._isArcLine?sg:ig)({points:[],pickable:!1,center:{x:0,y:0},radius:0,startAngle:0,endAngle:0});c.name="mark-point-line",this._line=c,t.add(c);const d=uo.line({points:[]});d.name="mark-point-decorativeLine",this._decorativeLine=d,t.add(d);const u=uo.symbol({});u.name="mark-point-targetItem",this._targetItem=u,t.add(this._targetItem);const p=this.initItem(i,l,h);this._item=p,t.add(p),this.setAllOfItemsAttr(l,h)}updateMarker(){const{position:t,itemContent:e={},itemLine:i}=this.attribute,{type:s="text"}=e,{type:n="type-s",arcRatio:r=.8}=i,{offsetX:a=0,offsetY:o=0}=e;this._isStraightLine=Kp(a,0,dg)||Kp(o,0,dg);const l="type-arc"===n&&0!==r&&!this._isStraightLine,{newPosition:h,newItemPosition:c}=this.computeNewPositionAfterTargetItem(t);l!==this._isArcLine?(this._isArcLine=l,this.reDrawLine(i,{points:[{x:0,y:0}],pickable:!1,center:{x:0,y:0},radius:0,startAngle:0,endAngle:0})):this._isArcLine=l,this.setItemAttributes(this._item,e,h,c,s),this.setAllOfItemsAttr(h,c)}isValidPoints(){const{position:t}=this.attribute;return!(!i.isValidNumber(t.x)||!i.isValidNumber(t.y))}}pg.defaultAttributes={interactive:!0,targetSymbol:{visible:!1,offset:0,style:{symbolType:"circle",size:20,fill:!1,stroke:"rgba(46, 47, 50)"}},itemLine:{visible:!0,decorativeLine:{visible:!1,length:30},startSymbol:{visible:!0,clip:!0,symbolType:"circle",size:20,style:{fill:!1,stroke:"rgba(46, 47, 50)"}},endSymbol:{visible:!1,clip:!0,symbolType:"triangle",size:12,style:{fill:!1,stroke:"rgba(46, 47, 50)"}},lineStyle:{stroke:"#000",lineWidth:1}},itemContent:{type:"text",position:"middle",refX:10}};const gg="seriesBreak";function fg(t,e,i,s,n=!1){const r=[],{x:a,y:o}=t,{x:l,y:h}=e,c=n?Math.floor((h-o)/(2*i)):Math.floor((l-a)/(2*i)),d=Math.PI/180*s,u=i*Math.cos(d),p=i*Math.sin(d);r.push(`M ${a} ${o}`);for(let t=0;t<=c;t++){const e=n?a+(t%2==0?u:-u):a+t*i*2,s=n?o+t*i*2:t%2==0?o-p:o+p;r.push(`L ${e} ${s}`)}return r.push(`L ${n?a:l} ${n?h:o}`),r.join(" ")}class mg extends Gp{constructor(){super(...arguments),this.name=gg}render(){this.removeAllChild();const{data:t=[]}=this.attribute;if(i.isEmpty(t))return;const e=[],s=[];t.forEach((t=>{const{start:n,end:r}=t;((t,e)=>{const{start:s,end:n}=e,r=s.x===n.x,a=r?"x":"y",o=r?"y":"x";let l=!0;const h=1e-6;t.length&&t.forEach((t=>{if(i.isNumberClose(t.start[a],s[a])){const e=Math.min(s[o],n[o]),i=Math.max(s[o],n[o]),r=Math.min(t.start[o],t.end[o]),a=Math.max(t.start[o],t.end[o]);if(!(i<r-h||e>a+h))return t.start[o]=Math.min(r,e),t.end[o]=Math.max(a,i),void(l=!1)}})),l&&t.push(e)})(n.x===r.x?e:s,t)})),[...e,...s].forEach(((t,e)=>{var s;const{start:n,end:r,size:a=4,gap:o=5,style:l={}}=t,h=b(t,["start","end","size","gap","style"]),c=Kr({}),d=n.x===r.x;let u,p,g,f;d?(u={x:n.x-o/2,y:n.y},p={x:r.x-o/2,y:r.y},g={x:n.x+o/2,y:n.y},f={x:r.x+o/2,y:r.y}):(u={x:n.x,y:n.y-o/2},p={x:r.x,y:r.y-o/2},g={x:n.x,y:n.y+o/2},f={x:r.x,y:r.y+o/2});const m=fg(u,p,a,d?75:15,d),y=fg(n,r,a,d?75:15,d),v=fg(g,f,a,d?75:15,d);c.add(qa(Object.assign(Object.assign({path:m,stroke:"#000",lineWidth:1},l),{pickable:!1,zIndex:1}))),c.add(qa(Object.assign(Object.assign({path:v,stroke:"#000",lineWidth:1},l),{pickable:!1,zIndex:1}))),c.add(qa({path:y,stroke:"#fff",lineWidth:o,pickable:!1,zIndex:0})),c.name="series-break",c.data=h,i.isValid(h.axisId)&&(c.id=`${null!==(s=h.axisId)&&void 0!==s?s:""}_${e}`),this.add(c)}))}}function yg(t,e,i=1){return Math.abs(t-e)<i}function bg(t,e){return{type:"component",componentType:gg,interactive:!0,zIndex:500,style:{data:(s,n)=>{const r=[],a=n.vchart.getChart(),o="horizontal"===a.getAllSeries()[0].direction;return t.forEach(((t,s)=>{var n,l;const h=t.id,c=i.isValid(h)?a.getComponentByUserId(h):e&&i.isValid(e[s])?a.getComponentByIndex("axes",e[s]):null===(n=a.getComponentsByKey("axes").filter((e=>e.getSpec().breaks===t.breaks)))||void 0===n?void 0:n[0];if(!c)return;const d=null!=h?h:`${c.type}-${c.id}`,u=function(t){let{x:e,y:i}=t[0].getLayoutStartPoint(),s=e+t[0].getLayoutRect().width,n=i+t[0].getLayoutRect().height;for(let r=1;r<t.length;r++){const a=t[r],{x:o,y:l}=a.getLayoutStartPoint(),{width:h,height:c}=a.getLayoutRect();e=Math.min(e,o),s=Math.max(s,h+o),i=Math.min(i,l),n=Math.max(n,c+l)}return{x1:e,y1:i,x2:s,y2:n}}(c.getRegions());i.array(null===(l=c._break)||void 0===l?void 0:l.breaks).forEach((t=>{const{range:e,breakSymbol:i,gap:s=5}=t,n=c.valueToPosition(e[0]),l=c.valueToPosition(e[1]),h=(n+l)/2+(o?u.x1:u.y1);a.getAllSeries().forEach((t=>{if("bar"===t.type||"waterfall"===t.type){t.getMarkInName("bar").getGraphics().forEach((t=>{const a=t.AABBBounds;let c,p,g,f,m=!1;o?(m=a.x1<(n+l-s)/2&&a.x2>(n+l+s)/2,c=h,p=Math.max(a.y1+u.y1-2,u.y1),g=h,f=Math.min(a.y2+u.y1+2,u.y2)):(m=a.y1<(n+l-s)/2&&a.y2>(n+l+s)/2,c=Math.max(a.x1+u.x1-2,u.x1),p=h,g=Math.min(a.x2+u.x1+2,u.x2),f=h),m&&r.push({start:{x:c,y:p},end:{x:g,y:f},gap:s,style:null==i?void 0:i.style,axisId:d,data:e})}))}else if("line"===t.type){t.getMarkInName(t.type).getGraphics().forEach((t=>{xg(t,"line").forEach((t=>{vg(o?{start:{x:(n+l)/2,y:0},end:{x:(n+l)/2,y:u.y2-u.y1}}:{start:{x:0,y:(n+l)/2},end:{x:u.x2-u.x1,y:(n+l)/2}},t).forEach((t=>{let n,a;o?(n={x:h,y:Math.max(t[1]+u.y1-10,u.y1)},a={x:h,y:Math.min(t[1]+u.y1+10,u.y2)}):(n={x:Math.max(t[0]+u.x1-10,u.x1),y:h},a={x:Math.min(t[0]+u.x1+10,u.x2),y:h}),r.push({start:n,end:a,gap:s,style:null==i?void 0:i.style,axisId:d,data:e})}))}))}))}else if("area"===t.type){t.getMarkInName("area").getGraphics().forEach((t=>{xg(t,"area").forEach((t=>{const a=vg(o?{start:{x:(n+l)/2,y:0},end:{x:(n+l)/2,y:u.y2-u.y1}}:{start:{x:0,y:(n+l)/2},end:{x:u.x2-u.x1,y:(n+l)/2}},t);a.sort(((t,e)=>t[0]-e[0]));for(let n=0;n<a.length-1;n++){const l={x:a[n][0],y:a[n][1]},h={x:a[n+1][0],y:a[n+1][1]};if(Ag(o?{x:l.x,y:(l.y+h.y)/2}:{x:(l.x+h.x)/2,y:l.y},t)){let t,n;o?(t={x:l.x+u.x1,y:Math.max(l.y+u.y1-0,u.y1)},n={x:h.x+u.x1,y:Math.min(h.y+u.y1+0,u.y2)}):(t={x:Math.max(l.x+u.x1-0,u.x1),y:l.y+u.y1},n={x:Math.min(h.x+u.x1+0,u.x2),y:h.y+u.y1}),r.push({start:t,end:n,gap:s,style:null==i?void 0:i.style,axisId:d,data:e})}}}))}))}}))}))})),r}}}}function vg(t,e){const s=[];for(let n=1;n<e.length;n++){const r=i.getIntersectPoint([t.start.x,t.start.y],[t.end.x,t.end.y],[e[n].x,e[n].y],[e[n-1].x,e[n-1].y]);r&&!s.find((t=>yg(i.PointService.distancePP({x:t[0],y:t[1]},{x:r[0],y:r[1]}),0)))&&s.push(r)}return s}function xg(t,e){const{points:i,segments:s}=t.attribute,n=[];let r=[];const a=t=>{if(t&&t.length){let i=[];if(t.forEach((t=>{var s,a;if(!1===t.defined){if(n.push(r),"area"===e&&i.length){for(let t=i.length-1;t>=0;t--)r.push({x:i[t].x,y:i[t].y});r.push(r[0])}r=[],i=[]}else r.push({x:t.x,y:t.y}),"area"===e&&i.push({x:null!==(s=t.x1)&&void 0!==s?s:t.x,y:null!==(a=t.y1)&&void 0!==a?a:t.y})})),"area"===e&&i.length){for(let t=i.length-1;t>=0;t--)r.push({x:i[t].x,y:i[t].y});r.push(r[0])}n.push(r)}};return i&&i.length?a(i):s&&s.length&&s.forEach((t=>{a(t.points)})),n}function Ag(t,e){const{x:i,y:s}=t;let n=!1;for(let t=0,r=e.length-1;t<e.length;r=t++){const{x:a,y:o}=e[t],{x:l,y:h}=e[r];o>s!=h>s&&i<(l-a)*(s-o)/(h-o)+a&&(n=!n)}return n}const _g="barLink";class Sg extends Gp{constructor(){super(...arguments),this.name=_g}render(){const{data:t,linkStyle:s,areaStyle:n,styleMap:r,label:a,linkType:o="total"}=this.attribute;i.isEmpty(t)||(this.removeAllChild(),t.forEach(((t,l)=>{var h,c,d,u,p;const{linePoints:g,areaPoints:f,id:m=l,color:y,data:b}=t;if(f&&!1!==(null===(h=null==r?void 0:r[`area-${m}`])||void 0===h?void 0:h.visible)){const t=(v=Object.assign(Object.assign({points:f,fillOpacity:.3,fill:y,zIndex:0},n),null==r?void 0:r[`area-${m}`]),new Ja(v));t.name="bar-link-area",t.id=`area-${m}`,this.add(t)}var v;if(g&&!1!==(null===(c=null==r?void 0:r[`line-${m}`])||void 0===c?void 0:c.visible)&&0!==(null===(d=null==s?void 0:s.lineStyle)||void 0===d?void 0:d.lineWidth)&&0!==(null===(u=null==r?void 0:r[`line-${m}`])||void 0===u?void 0:u.lineWidth)){const{startSymbol:t={},endSymbol:e={},lineStyle:n}=s||{},a=i.cloneDeep(t),o=i.cloneDeep(e);(null==r?void 0:r[`line-${m}`])&&r[`line-${m}`].stroke&&(a.style=Object.assign(Object.assign({},a.style),{color:r[`line-${m}`].stroke}),o.style=Object.assign(Object.assign({},o.style),{color:r[`line-${m}`].stroke})),a.symbolType||a.originSymbolType||(a.originSymbolType="solidArrow"),o.symbolType||o.originSymbolType||(o.originSymbolType="solidArrow");const l=new ig({points:g,startSymbol:Object.assign({size:8},a),endSymbol:Object.assign({size:8},o),lineStyle:Object.assign(Object.assign({lineDash:[3,3],lineWidth:1,stroke:"#000"},n),null==r?void 0:r[`line-${m}`]),pickable:!0,childrenPickable:!1,zIndex:1});l.name="bar-link-line",l.id=`line-${m}`,this.add(l)}if((null==a?void 0:a.visible)&&!1!==(null===(p=null==r?void 0:r[`label-${m}`])||void 0===p?void 0:p.visible)){const{style:t,formatMethod:i}=a,[s,n]=b;let l=s[e.STACK_FIELD_END],h=n[e.STACK_FIELD_END];"value"===o&&(l=s[e.STACK_FIELD_END]-s[e.STACK_FIELD_START],h=n[e.STACK_FIELD_END]-n[e.STACK_FIELD_START]);const c=h-l,d=(h-l)/l*100,u=_a(Object.assign(Object.assign({x:.5*(g[0].x+g[1].x),y:.5*(g[0].y+g[1].y),text:i?i(c,d,b):`${c} ${d}`,fontSize:14,fill:"#000",stroke:"#fff",lineWidth:1,textAlign:"center",textBaseline:"middle",background:"#fff",zIndex:2},t),null==r?void 0:r[`label-${m}`]));u.name="bar-link-label",u.id=`label-${m}`,this.add(u)}})))}}function Tg(t,i,s){const{isHorizontal:n,isXAxisInverse:r,isYAxisInverse:a,linkType:o,doFill:l,regionStartX:h,regionStartY:c}=s,d=t.AABBBounds,u=i.AABBBounds;let p,g;return n?(p=[{x:(d.x1+d.x2)/2+h,y:d.y1+c},{x:(u.x1+u.x2)/2+h,y:u.y2+c}],r?("total"===o&&(p=[{x:d.x1+h,y:d.y1+c},{x:u.x1+h,y:u.y2+c}]),l&&(g=[{x:d.x1+h,x1:d.x2+h,y:d.y1+c},{x:u.x1+h,x1:u.x2+h,y:u.y2+c}])):("total"===o&&(p=[{x:d.x2+h,y:d.y1+c},{x:u.x2+h,y:u.y2+c}]),l&&(g=[{x:d.x2+h,x1:d.x1+h,y:d.y1+c},{x:u.x2+h,x1:u.x1+h,y:u.y2+c}]))):(p=[{x:d.x2+h,y:(d.y1+d.y2)/2+c},{x:u.x1+h,y:(u.y1+u.y2)/2+c}],a?("total"===o&&(p=[{x:d.x2+h,y:d.y2+c},{x:u.x1+h,y:u.y2+c}]),l&&(g=[{x:d.x2+h,y:d.y2+c,y1:d.y1+c},{x:u.x1+h,y:u.y2+c,y1:u.y1+c}])):("total"===o&&(p=[{x:d.x2+h,y:d.y1+c},{x:u.x1+h,y:u.y1+c}]),l&&(g=[{x:d.x2+h,y:d.y1+c,y1:d.y2+c},{x:u.x1+h,y:u.y1+c,y1:u.y2+c}]))),{areaPoints:g,linePoints:p,data:[e.getDatumOfGraphic(t),e.getDatumOfGraphic(i)],color:t.attribute.fill}}function Bg(t={},i){const{linkType:s="total",doFill:n}=t,r=b(t,["linkType","doFill"]);return{type:"component",componentType:_g,zIndex:500,interactive:!1,style:Object.assign(Object.assign({data:(t,i)=>{const{vchart:r}=i,a=r.getChart().getAllRegions(),o=[];return a.forEach((t=>{const i=t.getSeries().filter((t=>"bar"===t.type)),{x:r,y:a}=t.getLayoutStartPoint();if(i.length){const t=i[0].getGroupFields(),l=[];i.forEach((t=>{var e;(null===(e=t.getMarkInName("bar"))||void 0===e?void 0:e.getGraphics()).forEach((t=>{l.push(t)}))}));const h=function(t,i){const s={};for(let n=0;n<t.length;n++){const r=t[n],a=e.getDatumOfGraphic(r),o=i.map((t=>a[t])).join("-");s[o]||(s[o]=[]),s[o].push(r)}return s}(l,t);Object.values(h).forEach((t=>{t.sort(((t,i)=>e.getDatumOfGraphic(t)[e.STACK_FIELD_END]-e.getDatumOfGraphic(i)[e.STACK_FIELD_END]))}));const c=i[0],d="horizontal"===c.direction,u=c.getYAxisHelper().isInverse(),p=c.getXAxisHelper().isInverse(),g=Object.values(h);if(g.length)if(d){g[0][0].AABBBounds.y1<g[g.length-1][0].AABBBounds.y1&&g.reverse()}else{g[0][0].AABBBounds.x1>g[g.length-1][0].AABBBounds.x1&&g.reverse()}for(let t=0;t<g.length-1;t++){const e=g[t],i=g[t+1];if(e.forEach(((t,e)=>{var l;const h=Tg(t,null!==(l=i[e])&&void 0!==l?l:i[i.length-1],{isHorizontal:d,isXAxisInverse:p,isYAxisInverse:u,doFill:n,linkType:s,regionStartX:r,regionStartY:a});o.push(h)})),e.length<i.length){const t=e[e.length-1];for(let l=e.length;l<i.length;l++){const e=Tg(t,i[l],{isHorizontal:d,isXAxisInverse:p,isYAxisInverse:u,doFill:n,linkType:s,regionStartX:r,regionStartY:a});o.push(e)}}}}})),o},linkType:s},r),i)}}const wg="seriesLabel";function Cg(t,e=10,i=10,s=.1){const n=t.length;if(!t.every(isFinite))return t;if(!(n>1))return t;const r=function(t,e,i){t=+t,e=+e;let s=arguments.length;i=s<2?(e=t,t=0,1):s<3?1:+i;let n=-1;s=0|Math.max(0,Math.ceil((e-t)/i));const r=new Array(s);for(;++n<s;)r[n]=t+n*i;return r}(t.length);for(let a=0;a<i;++a){r.sort(((e,i)=>{return s=t[e],n=t[i],null==s||null==n?NaN:s<n?-1:s>n?1:s>=n?0:NaN;var s,n}));let i=0;for(let s=1;s<n;++s){let n=t[r[s]]-t[r[s-1]];n<e&&(n=(e-n)/2,i=Math.max(i,n),t[r[s-1]]-=n,t[r[s]]+=n)}if(i<s)break}return t}function Mg(t,e){return!(e.x1>t.x2||e.x2<t.x1||e.y1>t.y2||e.y2<t.y1)}function Pg(t,e=10,i=10){const s=t.length;let n,r=0;do{n=!1;for(let i=0;i<s;++i)for(let r=i+1;r<s;++r){const s=t[i].AABBBounds,a=t[r].AABBBounds;if(Mg(s,a)){const i=e-(a.x1-s.x2);i>0&&(t[r].attribute.x+=i,a.x1+=i,a.x2+=i,n=!0)}}r++}while(n&&r<i)}function kg(t,e){const{label:s,line:n}=e;return{type:"component",componentType:wg,interactive:!1,style:{position:t,layout:(t,e)=>{var i;return null!==(i=e.vchart.getChart().getAllSeries()[0].getSpec().direction)&&void 0!==i?i:"vertical"},data:(e,s)=>{var n;const r=s.vchart.getChart(),a=r.getAllSeries()[0],o="horizontal"===a.direction,l=o?a.getYAxisHelper():a.getXAxisHelper(),h=null===(n=l.getScale)||void 0===n?void 0:n.call(l,0),c=l.isInverse(),d=a.getDimensionField()[0],u=a.getSeriesField(),p=r.getAllSeries().map((t=>t.type)).filter(((t,e,i)=>i.indexOf(t)===e)),g=[];if(1===p.length&&["bar","area","line","waterfall"].includes(p[0])){("both-ends"===t?["start","end"]:[t]).forEach((t=>{const e="end"===t?i.last(h.domain()):h.domain()[0],s=a.getRegion(),{x:n,y:l}=s.getLayoutStartPoint();let f=0;r.getAllSeries().forEach((i=>{i.getMarkInName("waterfall"===p[0]?"bar":p[0]).getGraphics().forEach((s=>{var r;const a=s.context.data.find((t=>t[d]===e));if(a){const e=s.AABBBounds;let h,m,y,b;"bar"===p[0]||"waterfall"===p[0]?(h="end"===t?{x:o?(e.x1+e.x2)/2:c?e.x1:e.x2,y:o?c?e.y2:e.y1:(e.y1+e.y2)/2}:{x:o?(e.x1+e.x2)/2:c?e.x2:e.x1,y:o?c?e.y1:e.y2:(e.y1+e.y2)/2},m=s.attribute.fill):(h=i.dataToPosition(a),m=s.attribute.stroke||s.attribute.fill),"end"===t?(y=o?"center":c?"end":"start",b=o?c?"top":"bottom":"middle"):(y=o?"center":c?"start":"end",b=o?c?"bottom":"top":"middle");const v=null!==(r=a[u])&&void 0!==r?r:a[d];g.push({point:{x:h.x+n,y:h.y+l},label:v,color:m,textAlign:y,textBaseline:b,series:i,datum:a,id:`${t}-${f}`,position:t}),f++}}))}))}))}return g},line:n,label:Object.assign({space:12},s)}}}class Og extends Gp{constructor(){super(...arguments),this.name=wg}render(){var t,e,s,n;this.removeAllChild();const{data:r,layout:a,label:o,line:l={}}=this.attribute;if(i.isEmpty(r))return;const h=null!==(t=null==o?void 0:o.styleMap)&&void 0!==t?t:{},c={},d=r.filter((t=>{var e;return!1!==(null===(e=h[t.id])||void 0===e?void 0:e.visible)}));if("vertical"===a){const t=1.5*(null!==(s=null===(e=null==o?void 0:o.style)||void 0===e?void 0:e.fontSize)&&void 0!==s?s:12),i=(t,e,i)=>{var s,n,r,a,o,l,h,c;const{label:d,color:u,textAlign:p,textBaseline:g,id:f}=t,m=null!==(n=null===(s=i[f])||void 0===s?void 0:s.formatMethod)&&void 0!==n?n:null===(r=this.attribute.label)||void 0===r?void 0:r.formatMethod,y=_a(Object.assign(Object.assign(Object.assign(Object.assign({text:m?m(d,t.datum,{series:t.series}):d},null===(a=this.attribute.label)||void 0===a?void 0:a.style),e),{textAlign:p,textBaseline:g,fill:null!==(h=null===(l=null===(o=this.attribute.label)||void 0===o?void 0:o.style)||void 0===l?void 0:l.fill)&&void 0!==h?h:u}),null===(c=i[f])||void 0===c?void 0:c.style));return y.name="series-label-text",y.id=f,this.add(y),y};["start","end"].forEach((e=>{const s=d.filter((t=>t.position===e)),n=Cg(s.map((t=>t.point.y)),t);s.forEach(((t,e)=>{var s;const r={x:t.point.x+(null!==(s=null==o?void 0:o.space)&&void 0!==s?s:8)*("start"===t.textAlign?1:-1),y:n[e]};i(t,r,h),c[t.id]=r}))}))}else{const t=[],e=[];d.forEach((i=>{var s,n,r,a,l;const{point:c,label:d,color:u,textAlign:p,textBaseline:g,id:f,position:m}=i,y={x:c.x,y:c.y},b=null!==(n=null===(s=h[f])||void 0===s?void 0:s.formatMethod)&&void 0!==n?n:null==o?void 0:o.formatMethod,v=_a(Object.assign(Object.assign(Object.assign(Object.assign({text:b?b(d,i.datum,{series:i.series}):d},null==o?void 0:o.style),y),{textAlign:p,textBaseline:g,fill:null!==(a=null===(r=null==o?void 0:o.style)||void 0===r?void 0:r.fill)&&void 0!==a?a:u}),null===(l=h[f])||void 0===l?void 0:l.style));v.id=f,v.name="series-label-text",this.add(v),"start"===m?t.push(v):"end"===m&&e.push(v)})),t.length&&Pg(t,4,10),e.length&&Pg(e,4,10);const i=null!==(n=null==o?void 0:o.space)&&void 0!==n?n:8;[...t,...e].forEach((t=>{const e="top"===t.attribute.textBaseline?1:-1;t.setAttribute("y",t.attribute.y+i*e),c[t.id]={x:t.attribute.x,y:t.attribute.y}}))}!1!==l.visible&&d.forEach((t=>{var e,i,s,n,r,o;const{point:d,color:u,id:p}=t,g={x:c[p].x+(null!==(s=null===(i=null===(e=h[p])||void 0===e?void 0:e.style)||void 0===i?void 0:i.dx)&&void 0!==s?s:0),y:c[p].y+(null!==(o=null===(r=null===(n=h[p])||void 0===n?void 0:n.style)||void 0===r?void 0:r.dy)&&void 0!==o?o:0)};if(!1!==l.autoVisible){if("vertical"===a&&d.y!==g.y||"horizontal"===a&&d.x!==g.x){const t=Ma(Object.assign({points:[d,g],lineWidth:1,stroke:u},l.style));t.name="series-label-line",this.add(t)}}else{const t=Ma(Object.assign({points:[d,g],lineWidth:1,stroke:u},l.style));t.name="series-label-line",this.add(t)}}))}}function Rg(t,e,i=0){return i>Math.max(e.x1-t.x2,t.x1-e.x2,e.y1-t.y2,t.y1-e.y2)}function Lg(t){return{x1:t.x,x2:t.x+t.width,y1:t.y,y2:t.y+t.height}}function Ig(t){var e;if(!t||0===t.length)return[];if(1===t.length)return[t[0].rect];const i=t.map((t=>{var e;return Object.assign(Object.assign({},t),{bound:Lg(t.rect),anchorCandidates:Ng(null!==(e=t.anchors)&&void 0!==e?e:[],t.point,t.rect,t.offset)})})),s=[];s.push(i[0].bound);for(let t=1;t<=i.length-1;t++){const n=i[t],r=n.bound;let a=s.some((t=>Rg(t,r)));if(n.anchorCandidates)if(a&&(null===(e=n.anchorCandidates)||void 0===e?void 0:e.length)>0){for(let t=0;t<n.anchorCandidates.length;t++){const e=n.anchorCandidates[t],i={x1:e.x,y1:e.y,x2:e.x+r.x2-r.x1,y2:e.y+r.y2-r.y1,anchor:e};if(!s.some((t=>Rg(t,i)))){s.push(i),a=!1;break}}a&&s.push(n.bound)}else s.push(n.bound)}return s.map((t=>function(t){return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}}(t)))}function Eg(t,e,s){const n=t.map((t=>t.pointCoord)),{x1:r,x2:a,y1:o,y2:l}=i.getAABBFromPoints(n),h=s([(r+a)/2,(o+l)/2]);if(!h)return[];const c=t.map((t=>{const n=t.rect,r=Ug(e,t.pointCoord)?s(function(t,e,s,n=200){const r=5621/n;let a=e;for(let e=1;e<=r;e++){const e=i.destination(a,n,s);if(!Ug(t,e))return[e.x,e.y];a=[e.x,e.y]}return e}(e,[t.pointCoord.x,t.pointCoord.y],Dg(jg(t.point,h)))):t.point;r&&(n.x=r.x,n.y=r.y);const a=Dg(jg(t.point,h));let o;const l=[];return a>=-45&&a<45?(o="top",l.push("left","right")):a>=45&&a<135?o="right":a>=-135&&a<-45?(o="left",l.push("left")):(o="bottom",l.push("left","right")),t.anchors=l,t.offset=20,t.rect=Fg(t.rect,o,0),t}));return Ig(c)}function Dg(t){return t>180?t-360:t}function jg(t,e){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI+90}function Ug(t,e){for(let s=0;s<t.length;s++){if(i.isPointInPolygon(e,t[s]))return!0}return!1}function Fg(t,e,i=0){const s=Object.assign({},t);return"top"===e?(s.x-=t.width/2,s.y-=i+t.height/2):"bottom"===e?(s.x-=t.width/2,s.y+=i-t.height/2):"left"===e?(s.x-=i+t.width,s.y-=t.height/2):"right"===e&&(s.x+=i,s.y-=t.height/2),s}function Ng(t,e,i,s=0){const n=[];return t.forEach((t=>{const{x:r,y:a}=Fg(Object.assign(Object.assign({},e),{width:i.width,height:i.height}),t,s);n.push({x:r,y:a})})),n}const Wg={visible:!0,offset:12,position:"top",space:10,nameLabel:{visible:!0,style:{textBaseline:"middle",textAlign:"left",fill:"black",fontSize:10}},valueLabel:{visible:!0,style:{textBaseline:"middle",textAlign:"left",fill:"black",fontSize:10}},background:{visible:!0,padding:{top:4,bottom:4,left:6,right:6},style:{cornerRadius:2,lineWidth:1,fill:"white",stroke:"grey"}},leader:{visible:!1,style:{lineWidth:1,stroke:"black"}}};class zg extends e.BaseComponentSpecTransformer{_getDefaultSpecFromChart(){return Wg}}class Gg extends e.BaseComponent{constructor(){super(...arguments),this.type="mapLabel",this.name=" mapLabel",this.specKey="mapLabel",this.transformerConstructor=zg,this.layoutType="none",this.layoutZIndex=e.LayoutZIndex.MarkPoint,this._activeDatum=[]}static getSpecInfo(t){return e.getSpecInfo(t,this.specKey,this.type,(t=>t.visible&&i.isValid(t.seriesId)))}setAttrFromSpec(){var t,e,i,s;this.nameField=null!==(t=this._spec.nameField)&&void 0!==t?t:null===(e=this._series)||void 0===e?void 0:e.getDimensionField()[0],this.valueField=null!==(i=this._spec.valueField)&&void 0!==i?i:null===(s=this._series)||void 0===s?void 0:s.getMeasureField()[0]}created(){super.created(),!1!=!!this._spec.visible&&(this.initRelatedInfo(),this.initData(),this.initEvent())}initRelatedInfo(){var t,e,i,s,n,r,a,o;this._series=this._option.getSeriesInUserIdOrIndex([this._spec.seriesId])[0],"outer"===this._spec.position&&(this._map=null===(e=null===(t=this._regions[0].getSeriesInType("map")[0])||void 0===t?void 0:t.getMapViewData())||void 0===e?void 0:e.latestData,this._longitudeField=null===(n=null===(s=(i=this._regions[0]).getSpec)||void 0===s?void 0:s.call(i))||void 0===n?void 0:n.longitudeField,this._latitudeField=null===(o=null===(a=(r=this._regions[0]).getSpec)||void 0===a?void 0:a.call(r))||void 0===o?void 0:o.latitudeField)}initData(){const t=this._series;if(!t)return;const i=t.getViewData();if(i){const t=new y(this._option.dataSet,{name:`${this.name}_data`});t.parse([i],{type:"dataview"}),t.transform({type:"copyDataView",level:e.TransformLevel.copyDataView},!1),this._data=new e.CompilableData(this._option,t),t.target.addListener("change",(()=>{"hover"!==this._spec.trigger&&"click"!==this._spec.trigger&&(this._activeDatum=this._data.getLatestData())}))}}initEvent(){this.event.on("zoom",{filter:t=>this._isRelativeModel(t.model)},(()=>(this.handleZoom(),!0))),this.event.on("panmove",{filter:t=>this._isRelativeModel(t.model)},(t=>(this.handlePan(t),!0)));const t=this._spec.trigger;"none"!==t&&("hover"===t?(this.event.on("element-highlight:start",(t=>{const i=t.graphics[0];this._isRelativeSeries(i)&&this._updateDatum(e.getDatumOfGraphic(i))})),this.event.on("element-highlight:reset",(t=>{this._activeDatum&&this._updateDatum(null)}))):"click"===t&&(this.event.on("element-select:start",(t=>{const i=t.graphics[0];this._isRelativeSeries(i)&&this._updateDatum(e.getDatumOfGraphic(i))})),this.event.on("elementSelectReset",(t=>{this._activeDatum&&this._updateDatum([])}))))}handlePan(t){const{delta:e}=t;this._markerComponents.forEach((t=>{t.translate(e[0],e[1])}))}handleZoom(){this._updateMarkerLayoutAttribute()}_updateDatum(t){this._activeDatum=t,this._markerComponents.forEach(((t,e)=>{var i;const s=null===(i=this._data)||void 0===i?void 0:i.getLatestData()[e];this._activeDatum.includes(s)?t.setAttribute("visible",!0):t.setAttribute("visible",!1)}))}dataToPosition(t){return this._series.dataToPosition(t)}updateLayoutAttribute(){var t;const e=null===(t=this._data)||void 0===t?void 0:t.getLatestData();e&&0!==e.length&&(super.updateLayoutAttribute(),this._updateMarkerLayoutAttribute())}_updateMarkerLayoutAttribute(){var t;const e=[],i=[];this._markerComponents||(this._markerComponents=null===(t=this._data)||void 0===t?void 0:t.getLatestData().map(((t,e)=>{var i;const s=new pg({position:void 0,animation:!1});return s&&(s.name=`${this.name}_marker_${e}`,s.id=null!==(i=this._spec.id)&&void 0!==i?i:`${this.name}_marker_${this.id}`,s.setAttribute("zIndex",this.layoutZIndex)),s})));this._markerComponents.forEach(((t,s)=>{const{pairInfo:n,contentMarks:r}=this._evaluateMarker(this._data.getLatestData()[s],s);n&&e.push(n),r&&i.push(r)}));const s=this._layoutLabels(e);this._layoutMarkers(s,i),this._renderMarkers()}_evaluateMarker(t,s){var n,r,a,o,l,h,c,d,u,p,g,f,m,y;let b=0,v=0,x=0,A=0,_=0;const S=this._spec.position||"top",T=this._spec.offset,B=e.normalizeLayoutPaddingSpec(null===(n=this._spec.background)||void 0===n?void 0:n.padding),w=this._spec.space||0;v+=((null==B?void 0:B.left)||0)+((null==B?void 0:B.right)||0),x+=((null==B?void 0:B.top)||0)+((null==B?void 0:B.bottom)||0);const C={},M=this.dataToPosition(t),P=uo.group({});if(P.name=`${this.name}_marker_itemContainer_${s}`,C.container=P,null===(r=this._spec.background)||void 0===r?void 0:r.visible){const t=uo.rect(e.transformToGraphic(Object.assign({},this._spec.background.style)));t.setAttributes(M),C.labelBackground=t,P.appendChild(t)}if(null===(a=this._spec.icon)||void 0===a?void 0:a.visible){const t=uo.symbol(e.transformToGraphic(Object.assign({},this._spec.icon.style)));t.setAttributes(M),t.setAttribute("symbolType",null!==(l=null===(o=this._spec.icon.style)||void 0===o?void 0:o.symbolType)&&void 0!==l?l:null===(h=this._spec.icon.style)||void 0===h?void 0:h.shape);const i=t.AABBBounds,s=null!==(c=(null==i?void 0:i.y2)-(null==i?void 0:i.y1))&&void 0!==c?c:0,n=null!==(d=(null==i?void 0:i.x2)-(null==i?void 0:i.x1))&&void 0!==d?d:0;C.icon=t,P.appendChild(t),_=s,A+=n,b++}if(null===(u=this._spec.nameLabel)||void 0===u?void 0:u.visible){const i=uo.text(e.transformToGraphic(Object.assign({},this._spec.nameLabel.style)));i.setAttributes(M),i.setAttribute("text",t[this.nameField]);const s=i.AABBBounds,n=null!==(p=(null==s?void 0:s.y2)-(null==s?void 0:s.y1))&&void 0!==p?p:0,r=null!==(g=(null==s?void 0:s.x2)-(null==s?void 0:s.x1))&&void 0!==g?g:0;C.nameLabel=i,P.appendChild(i),_=Math.max(_,n),A+=r,b++}if((null===(f=this._spec.valueLabel)||void 0===f?void 0:f.visible)&&i.isValid(t[this.valueField])){const i=uo.text(e.transformToGraphic(Object.assign({},this._spec.valueLabel.style)));i.setAttributes(M),i.setAttribute("text",t[this.valueField]);const s=i.AABBBounds,n=null!==(m=(null==s?void 0:s.y2)-(null==s?void 0:s.y1))&&void 0!==m?m:0,r=null!==(y=(null==s?void 0:s.x2)-(null==s?void 0:s.x1))&&void 0!==y?y:0;C.valueLabel=i,P.appendChild(i),_=Math.max(_,n),A+=r,b++}const k=Object.values(C).find((t=>!!t&&"group"!==t.type)),O={x:null==k?void 0:k.getComputedAttribute("x"),y:null==k?void 0:k.getComputedAttribute("y")},R={x:O.x,y:O.y,width:0,height:0};R.width=v+A+(b-1)*w,R.height=x+_;const L={rect:R,point:O,index:s};if("outer"!==S){const t=["top","right","left","bottom"].filter((t=>t!==S));L.rect=Fg(R,S,T),L.anchors=t,L.offset=T}else L.pointCoord={x:+(null==t?void 0:t[this._longitudeField]),y:+(null==t?void 0:t[this._latitudeField])};return{pairInfo:L,contentMarks:C}}_layoutMarkers(t,i){var s,n,r;for(let a=0;a<i.length;a++){if(!t[a]||!i[a])return;const{icon:o,nameLabel:l,valueLabel:h,labelBackground:c,container:d}=i[a],u=t[a],p=e.normalizeLayoutPaddingSpec(null===(s=this._spec.background)||void 0===s?void 0:s.padding),g=this._spec.space||0,f=u.height/2;let m=(null==p?void 0:p.left)||0;[o,l,h].forEach(((t,e)=>{var i,s;if(t){const n=t.AABBBounds;let r=0;"symbol"===t.type&&(r+=(null!==(i=n.x2-n.x1)&&void 0!==i?i:0)/2),t.setAttributes({x:m+r,y:f}),m+=null!==(s=n.x2-n.x1)&&void 0!==s?s:0,2!==e&&(m+=g)}})),null==c||c.setAttributes({x:0,y:0,width:u.width,height:u.height}),null==d||d.setAttributes({dx:-u.width/2,dy:-u.height/2});const y=this._data.getLatestData()[a],b=this.dataToPosition(y),v=this.getRegions()[0].getLayoutStartPoint(),x=!(!(null===(n=this._spec.leader)||void 0===n?void 0:n.visible)||!(o||l||h));this._markerComponents[a].setAttributes({x:v.x,y:v.y,position:b,visible:this._activeDatum.includes(y),itemContent:{refX:0,type:"custom",renderCustomCallback:()=>d,autoRotate:!1,offsetX:u.x+u.width/2-b.x,offsetY:u.y+u.height/2-b.y},itemLine:{visible:x,type:"type-po",lineStyle:e.transformToGraphic(Object.assign({},null===(r=this._spec.leader)||void 0===r?void 0:r.style)),startSymbol:{visible:!1}}})}}_renderMarkers(){if(this._markerComponents&&this._markerComponents.length)for(let t=0;t<this._markerComponents.length;t++)this.getContainer().add(this._markerComponents[t])}_layoutLabels(t){return"outer"===this._spec.position&&this._map?Eg(t,this._map,(t=>this._series.dataToPosition({[this._longitudeField]:t[0],[this._latitudeField]:t[1]}))):Ig(t)}_isRelativeModel(t){var e,i,s;const n=null!==(i=null===(e=this._series.getXAxisHelper())||void 0===e?void 0:e.getAxisId())&&void 0!==i?i:null===(s=this._series.getCoordinateHelper())||void 0===s?void 0:s.getCoordinateId();return(null==t?void 0:t.id)===n}_isRelativeSeries(t){var e;return(null===(e=t.context)||void 0===e?void 0:e.modelId)===this._series.id}_getNeedClearVRenderComponents(){return this._markerComponents}getVRenderComponents(){return this._markerComponents}}Gg.type="mapLabel",Gg.specKey="mapLabel",Gg.transformerConstructor=zg;t.BAR_LINK=_g,t.Bar3dChart=Ru,t.Bar3dChartSpecTransformer=H,t.Bar3dSeries=Mu,t.Bar3dSeriesSpecTransformer=Ph,t.BarLinkComponent=Sg,t.ConversionFunnelChart=O,t.ConversionFunnelSeries=R,t.DefaultBandWidth=6,t.Funnel3dChart=Fu,t.Funnel3dSeries=ju,t.Funnel3dSeriesSpecTransformer=Iu,t.Histogram3dChart=Nu,t.MapLabelComponent=Gg,t.Pie3dChart=Yu,t.Pie3dChartSpecTransformer=Wu,t.Pie3dSeries=Hu,t.Pie3dSeriesSpecTransformer=Vu,t.RangeColumn3dChart=Wp,t.RangeColumn3dChartSpecTransformer=Np,t.RangeColumn3dSeries=jp,t.RangeColumn3dSeriesSpecTransformer=Fp,t.RankingBar=a,t.RankingList=g,t.SERIES_BREAK=gg,t.SequenceScatterKDE=N,t.SequenceScatterLink=E,t.SequenceScatterPixel=V,t.SeriesBreakComponent=mg,t.SeriesLabelComponent=Og,t.WordCloud3dChart=Cp,t.WordCloud3dChartSpecTransformer=wp,t.WordCloud3dSeries=Sp,t.appendBarLinkConfig=function(t,e){t.customMark=i.array(t.customMark).filter((t=>t.componentType!==_g)),t.customMark.push(Bg(e))},t.appendSeriesBreakConfig=t=>{var e;if(null===(e=t.axes)||void 0===e?void 0:e.length){const e=t.axes.filter((t=>t.breaks&&t.breaks.length&&!1!==t.visible));if(e.length)return t.customMark=i.array(t.customMark).filter((t=>t.componentType!==gg)),t.customMark.push(bg(e,e.map((e=>t.axes.indexOf(e))))),!0}return!1},t.appendSeriesLabelConfig=function(t,e){var s,n,r;if(t.customMark=i.array(t.customMark).filter((t=>t.componentType!==wg)),e||(e=null!==(r=null!==(s=i.get(t,wg))&&void 0!==s?s:i.get(null===(n=t.series)||void 0===n?void 0:n[0],wg))&&void 0!==r?r:{}),e.visible){const{position:i="end"}=e,s=b(e,["position"]);t.customMark.push(kg(i,s))}},t.getBarLinkConfig=Bg,t.getSeriesBreakConfig=bg,t.getSeriesLabelConfig=kg,t.register3DPlugin=Ch,t.registerAxis3dPlugin=()=>{Ch(),Ou(),e.Factory.registerComponent(e.CartesianBandAxis.type,Op,!1),e.Factory.registerComponent(e.CartesianLinearAxis.type,Rp,!1),e.Factory.registerComponent(e.CartesianTimeAxis.type,Ep,!1),e.Factory.registerComponent(e.CartesianSymlogAxis.type,Ip,!1),e.Factory.registerComponent(e.CartesianLogAxis.type,Lp,!1)},t.registerBar3dChart=()=>{Ch(),Ou(),Pu(),e.Factory.registerChart(Ru.type,Ru)},t.registerBar3dSeries=Pu,t.registerBarLink=()=>{e.Factory.registerGraphicComponent(_g,(t=>new Sg(t)))},t.registerConversionFunnelChart=t=>{e.registerMarkFilterTransform();const i=(null==t?void 0:t.VChart)||e.VChart;i&&(i.useChart([O]),i.useSeries([R]))},t.registerFunnel3dChart=()=>{e.registerMarkTooltipProcessor(),Ch(),Ou(),Uu(),e.Factory.registerChart(Fu.type,Fu)},t.registerFunnel3dSeries=Uu,t.registerHistogram3dChart=()=>{e.registerGroupTooltipProcessor(),e.registerDimensionTooltipProcessor(),e.registerMarkTooltipProcessor(),e.registerDimensionEvents(),e.registerDimensionHover(),Ch(),Ou(),Pu(),e.Factory.registerChart(Nu.type,Nu)},t.registerMapLabel=t=>{const i=(null==t?void 0:t.VChart)||e.VChart;i&&i.useComponent([Gg])},t.registerPie3dChart=()=>{e.registerMarkTooltipProcessor(),Ch(),Ou(),Xu(),e.Factory.registerChart(Yu.type,Yu)},t.registerPie3dSeries=Xu,t.registerRangeColumn3dChart=()=>{e.registerDimensionTooltipProcessor(),e.registerMarkTooltipProcessor(),e.registerDimensionEvents(),e.registerDimensionHover(),Ch(),Ou(),Up(),e.Factory.registerChart(Wp.type,Wp)},t.registerRangeColumn3dSeries=Up,t.registerRankingBarChart=t=>{const i=(null==t?void 0:t.VChart)||e.VChart;i&&i.useChart([a])},t.registerRankingList=t=>{const i=(null==t?void 0:t.VChart)||e.VChart;i&&i.useChart([g,e.BarChart])},t.registerSequenceScatterKDE=t=>{const i=(null==t?void 0:t.VChart)||e.VChart;i&&i.useChart([N,e.ScatterChart])},t.registerSequenceScatterLink=t=>{const i=(null==t?void 0:t.VChart)||e.VChart;i&&i.useChart([E,e.ScatterChart])},t.registerSequenceScatterPixel=t=>{const i=(null==t?void 0:t.VChart)||e.VChart;i&&i.useChart([V,e.ScatterChart])},t.registerSeriesBreak=()=>{e.Factory.registerGraphicComponent("seriesBreak",(t=>new mg(t)))},t.registerSeriesLabel=()=>{e.Factory.registerGraphicComponent("seriesLabel",(t=>new Og(t)))},t.registerWordCloud3dChart=Mp,t.registerWordCloud3dSeries=Tp,t.registerWordCloudShape3dChart=()=>{Ch(),Bp(),Mp()},t.registerWordCloudShape3dSeries=Bp}));